/* assets/asse-style.css */
.asse-dream-team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Epilogue", Helvetica, Arial, Lucida, sans-serif
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.asse-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.asse-header h2 {
    font-size: 0.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.user-info-section, .tactical-section {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 1px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 80%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
}

.tactical-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tactical-btn {
    padding: 15px 30px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tactical-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.tactical-btn.active {
    background: #2E7D32;
    transform: scale(1.05);
}

.football-field {
    background: linear-gradient(to bottom, #4CAF50 0%, #66BB6A 100%);
    border: 4px solid white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    min-height: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.field-section {
    text-align: center;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    margin: 10px 0;
}

.field-section h4 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 1.3em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.position-slots {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.position-slot {
    width: 120px;
    height: 60px;
    border: 3px dashed white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
}

.position-slot:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.position-slot.filled {
    background: rgba(46, 125, 50, 0.8);
    border: 3px solid #2E7D32;
    color: white;
}

.coach-selection {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 2px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.modal {
    display: none; /* Cache la modale par défaut */
    position: fixed; /* Reste en place même en cas de défilement */
    z-index: 10000; /* <--- VALEUR TRÈS ÉLEVÉE pour être au premier plan */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Active le défilement si nécessaire */
    background-color: rgba(0,0,0,0.7); /* Fond noir semi-transparent (l'overlay) */
    backdrop-filter: blur(5px); /* Optionnel : effet de flou pour améliorer l'esthétique */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 30px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px; 
    border-radius: 8px;
    position: relative;
    z-index: 10001; 

    width: 90%;          /* S'assure qu'elle est large sur tous les écrans */
    max-width: 80vw; 
    display: flex; /* Active Flexbox */
    flex-direction: column; /* Organise les enfants verticalement */

    /* NOUVEAU : Limiter la hauteur du contenu de la modale */
    max-height: 60vh; /* 60% de la hauteur du viewport */
    /*overflow-y: auto; /* Permet le défilement vertical si le contenu dépasse 60vh */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* ------------------------------------------- */
/* NOUVEAU : GESTION DE L'AFFICHAGE MULTI-COLONNES */
/* ------------------------------------------- */
#player-list {
    /* L'élément prend tout l'espace vertical restant */
    flex-grow: 1; 
    
    /* Gère le défilement de l'élément flexible */
    overflow-y: auto; 
    
    /* ... (Le reste des styles pour la grille des joueurs) ... */
    display: flex;
    flex-wrap: wrap; 
    gap: 10px; 
    
    /* Reset la max-height si vous utilisez flex-grow: */
    max-height: none; /* TRÈS IMPORTANT: Annule la formule calc() */
}

#player-list {
    /* Permet le défilement dans la zone restante (basé sur notre précédent ajustement) */
    /*max-height: calc(80vh - 160px); /* Ajuster la hauteur max pour 80vh - (Titre + Recherche + Marge) */
    overflow-y: auto; 
    padding-top: 10px;
    border-top: 1px solid #eee;
    
    /* UTILISER FLEXBOX pour l'affichage multi-colonne */
    /*display: flex;
    flex-wrap: wrap; /* Permet aux options de passer à la ligne suivante */
    gap: 10px; /* Espace entre les options de joueurs */
}

.player-option {
    /* Propriétés de base existantes */
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    
    /* MODIFICATION : Optimiser pour l'affichage côte à côte */
    flex: 1 1 200px; /* Flex-grow 1, Flex-shrink 1, Base width 200px */
    /* Chaque option prendra au moins 200px de large et s'étirera si nécessaire. */
    
    display: flex; /* Pour aligner le nom et le label de sélection */
    justify-content: space-between;
    align-items: center;

}

/* Styles pour les joueurs déjà sélectionnés (désactivés) */
.player-option.disabled-player {
    /* NOUVELLE APPARENCE VISUELLE */
    background: #c8e6c9;      /* Fond vert pâle */
    border: 1px solid #ccc;
    border-left: 5px solid #2E7D32; /* Bordure gauche verte foncée */
    
    /* Propriétés de désactivation (à conserver) */
    color: #555; /* Assombrir légèrement le texte pour la lisibilité */
    cursor: not-allowed;
    pointer-events: none; /* TRÈS IMPORTANT : Empêche l'événement de clic */
}

.player-option.disabled-player strong {
    color: #444;
}


.player-item {
    padding: 15px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.player-item:hover {
    background: #e8f5e8;
    transform: translateX(5px);
}

.player-item.selected {
    background: #c8e6c9;
    border-left-color: #2E7D32;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.captcha-section {
    text-align: center;
    margin: 20px 0;
}

/* Administration */
.asse-admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #4CAF50;
}

.asse-admin-section {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.asse-stats-container {
    display: grid;
    gap: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .asse-dream-team-container {
        padding: 5px;
    }
    
    .asse-header h2 {
        font-size: 0.8em;
    }
    
    .tactical-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tactical-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .position-slots {
        flex-direction: column;
        align-items: center;
    }
    
    .position-slot {
        /*width: 200px;
        height: 50px;*/
    }
    
    .modal-content {
        width: 95%;
/*        margin: 10% auto;
        padding: 20px;*/
    }
}
