/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ===== LAYOUT ===== */
.conteneur {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.ligne {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/*Mobile*/
.largeur-totale { width: 100%; padding: 0 15px; }
/*Tablette*/
.tablette-demi { width: 50%; padding: 0 15px; }
.tablette-deux-tiers{ width: 66.666%; padding: 0 15px; }
.tablette-un-tiers{ width: 33.333%; padding: 0 15px; }
/*Ordinateur*/
.desktop{ width: 50%; padding: 0 15px; }

/* ===== NAVIGATION ===== */
.barre-navigation {
    background-color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.marque-navigation {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.marque-navigation:hover {
    color: #ecf0f1;
    text-decoration: none;
}

.liens-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lien-navigation {
    color: #bdc3c7;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lien-navigation:hover,
.lien-navigation.actif {
    color: white;
    background-color: #34495e;
    text-decoration: none;
}

/* ===== CARTES ===== */
.carte {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.entete-carte {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.entete-carte.entete-primaire {
    background-color: #3498db;
    color: white;
}

.entete-carte.entete-succes {
    background-color: #27ae60;
    color: white;
}

.entete-carte.entete-avertissement {
    background-color: #f39c12;
    color: white;
}

.entete-carte.entete-danger {
    background-color: #e74c3c;
    color: white;
}

.entete-carte.entete-secondaire {
    background-color: #95a5a6;
    color: white;
}

.corps-carte {
    padding: 1.5rem;
}

/* ===== BOUTONS ===== */
.bouton {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bouton:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.bouton-composer {
    background-color: #3498db;
    color: white;
}

.bouton-composer:hover {
    background-color: #2980b9;
    color: white;
}

.bouton-succes {
    background-color: #27ae60;
    color: white;
}

.bouton-succes:hover {
    background-color: #219a52;
    color: white;
}

.bouton-modifier {
    background-color: #f39c12;
    color: white;
}

.bouton-modifier:hover {
    background-color: #d68910;
    color: white;
}

.bouton-supprimer {
    background-color: #e74c3c;
    color: white;
}

.bouton-supprimer:hover {
    background-color: #c0392b;
    color: white;
}

.bouton-consulter {
    background-color: #3498db;
    color: white;
}

.bouton-consulter:hover {
    background-color: #2980b9;
    color: white;
}

.bouton-retour {
    background-color: #a295a6;
    color: white;
}

.bouton-retour:hover {
    background-color: #7f8c8d;
    color: white;
}

.bouton-petit {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.bouton-grand {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* ===== FORMULAIRES ===== */
.champ-formulaire {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.champ-formulaire:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.selection-formulaire {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.selection-formulaire:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.etiquette-formulaire {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

/* ===== TABLEAUX ===== */
.tableau {
    width: 100%;
    border-collapse: collapse;
}

.tableau th,
.tableau td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.tableau th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.tableau-bande tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.tableau-survol tbody tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

.entete-tableau-sombre th {
    background-color: #2c3e50;
    color: white;
}

/* ===== ALERTES ===== */
.alerte {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alerte-succes {
    background-color: #d5f4e6;
    border-color: #27ae60;
    color: #155724;
}

.alerte-danger {
    background-color: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.alerte-avertissement {
    background-color: #fff3cd;
    border-color: #f39c12;
    color: #856404;
}

.alerte-info {
    background-color: #d1ecf1;
    border-color: #3498db;
    color: #0c5460;
}

.lien-alerte {
    color: inherit;
    text-decoration: underline;
    font-weight: bold;
}

.lien-alerte:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

.fond-primaire { background-color: #3498db; color: white; }
.fond-succes { background-color: #27ae60; color: white; }
.fond-danger { background-color: #e74c3c; color: white; }
.fond-avertissement { background-color: #f39c12; color: white; }
.fond-info { background-color: #17a2b8; color: white; }
.fond-secondaire { background-color: #6c757d; color: white; }

.badge-compteur {
    font-size: 0.9em;
    margin-left: 10px;
    padding: 3px 8px;
}

.badge-sans-resultat {
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.badge-a-venir {
    background-color: #f39c12;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* ===== UTILITAIRES ===== */
.centrer-texte { text-align: center; }
.centrer { justify-content: center; }
.droite-auto { margin-left: auto; }
.marge-bas { margin-bottom: 1rem; }
.marge-bas-grande { margin-bottom: 3rem; }
.marge-haut { margin-top: 1rem; }
.marge-haut-grande { margin-top: 3rem; }
.marge-droite { margin-right: 1rem; }
.espacement { padding: 2rem; }
.espacement-vertical { padding: 2rem 0; }
.largeur-totale { width: 100%; }
.hauteur-totale { height: 100%; }
.page { padding: 2rem 0; }
.entete-page {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tableau-responsive {
    overflow-x: auto;
}

.tableau-compact th,
.tableau-compact td {
    padding: 0.5rem;
}

.texte-mute {
    color: #6c757d;
}

.texte-blanc {
    color: white;
}

/* ===== FEUILLE DE MATCH - SPÉCIFIQUE ===== */

/* Section d'informations du match */
.info-match-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-match-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.info-match-item h6 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.info-match-item p {
    margin: 0;
    color: #495057;
}

/* En-tête de section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.titre-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.titre-section small {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Zone de lecture seule */
.zone-lecture-seule {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-height: 46px;
}

.selection-formulaire[disabled],
.champ-formulaire[disabled] {
    background-color: #e9ecef !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    border-color: #ced4da !important;
}

/* Informations joueur */
.joueur-info-basique {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.info-joueur-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease;
}

/* Badges de statistiques */
.stat-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 5px;
}

.stat-nb-matchs {
    background: #e3f2fd;
    color: #1565c0;
}

/* Affichage des postes */
.poste-display {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.poste-display span {
    color: #7f8c8d;
    font-weight: normal;
    font-size: 0.9em;
}

/* Historique des matchs */
.historique-matchs {
    max-height: 120px;
    overflow-y: auto;
    margin-top: 5px;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    font-size: 0.8em;
    border: 1px solid #dee2e6;
}

.match-historique {
    padding: 3px 0;
    border-bottom: 1px solid #eee;
}

.match-historique:last-child {
    border-bottom: none;
}

.match-date {
    color: #6c757d;
    font-size: 0.85em;
}

.match-info {
    margin-left: 10px;
}

/* Commentaires */
.commentaire-court {
    display: inline;
}

.voir-plus {
    color: #3498db;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 5px;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}

.voir-plus:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Messages de validation */
.validation-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

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

/* Compteurs */
.compteur-titulaires {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.compteur-ok {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.compteur-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.compteur-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== NOTATION DES JOUEURS ===== */
.note-buttons {
    display: flex;
    gap: 5px;
}

.note-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.note-btn:hover {
    transform: scale(1.1);
}

.note-btn.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
    color: #007bff;
}

.note-btn.note-1 { border-color: #dc3545; }
.note-btn.note-2 { border-color: #fd7e14; }
.note-btn.note-3 { border-color: #ffc107; }
.note-btn.note-4 { border-color: #28a745; }
.note-btn.note-5 { border-color: #20c997; }

.note-btn.note-1.selected { 
    background-color: #f8d7da; 
    color: #721c24; 
    border-color: #dc3545;
}

.note-btn.note-2.selected { 
    background-color: #fff3cd; 
    color: #856404; 
    border-color: #fd7e14;
}

.note-btn.note-3.selected { 
    background-color: #fff3cd; 
    color: #856404; 
    border-color: #ffc107;
}

.note-btn.note-4.selected { 
    background-color: #d4edda; 
    color: #155724; 
    border-color: #28a745;
}

.note-btn.note-5.selected { 
    background-color: #d1ecf1; 
    color: #0c5460; 
    border-color: #20c997;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== EFFETS VISUELS ===== */
.carte:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.bouton:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .conteneur {
        padding: 0 10px;
    }
    
    .tablette-demi,
    .tablette-deux-tiers,
    .tablette-un-tiers,
    .desktop {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .liens-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .entete-page {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Responsive pour feuille de match */
    .info-match-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .historique-matchs {
        max-height: 100px;
    }
    
    .note-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .note-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* ===== FOOTER ===== */
.pied-page {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 3rem;
}
/* ===== TABLEAU DE BORD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 15px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.dashboard-card a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
}

.dashboard-card a:hover {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
}

.card-icon {
    width: 64px;
    height: 64px;
    background-color: #e3f2fd;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 1.8rem;
}


/* Section d'accueil */
.welcome-section {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin: 2rem 15px;
    text-align: center;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Header spécifique du dashboard */
header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 0;
}

.header-content {
    padding: 1rem 2rem;
}

.header-content:first-child {
    background-color: rgba(0, 0, 0, 0.1);
}

nav.header-content {
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 2rem;
}

nav.header-content a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav.header-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #c0392b;
    color: white;
    text-decoration: none;
}

main {
    padding: 2rem 0;
}

/* Responsive pour le dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-card {
        padding: 1.5rem;
    }
    
    .welcome-section {
        padding: 2rem 1rem;
        margin: 1rem 10px;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    nav.header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }
    
    .header-content {
        padding: 0.75rem 1rem;
    }
}
.info-joueur-details {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    padding: 10px;
    border-left: 3px solid #27ae60;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: none;
}
.historique-matchs {
    max-height: 120px;
    overflow-y: auto;
    margin-top: 5px;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    font-size: 0.8em;
    border: 1px solid #dee2e6;
}
.match-historique {
    padding: 3px 0;
    border-bottom: 1px solid #eee;
}
.match-historique:last-child {
    border-bottom: none;
}
.match-date {
    color: #6c757d;
    font-size: 0.85em;
}
.match-info {
    margin-left: 10px;
}
.commentaire-court {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
    vertical-align: bottom;
}
.voir-plus {
    color: #3498db;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 5px;
    text-decoration: underline;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}