/* ==========================================================================
   SOMMAIRE STYLE.CSS
   1. FOND & NORMALISATION (Body, Background)
   2. LAYOUT (Structure Globale : Header, Contenu)
   3. COMPOSANTS UI (Boutons, Alertes, Onglets)
   4. FORMULAIRES (Champs, Labels, Actions)
   5. VUES SPÉCIFIQUES (Accueil, Équipe, Tournoi, Admin)
   6. UTILITAIRES (Marges, Alignements)
   ========================================================================== */


/* ==========================================================================
    1. FOND & NORMALISATION (Body, Background)
   ========================================================================== */
body {
    /* Ton ancienne police d'écriture et tes marges restent ici */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;

    /* --- Fond principal --- */
    /* 1. Le filtre sombre (rgba) pour la lisibilité */
    /* 2. L'URL de l'image */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../img/terrain2.jpg');

    /* On centre l'image, on empêche la répétition, et on la fixe lorsque l'on scroll */
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;

    min-height: 100vh;
}


/* ==========================================================================
   2. LAYOUT (Structure Globale)
   ========================================================================== */
/* --- Header --- */
header {
    background-color: #2ecc71;
    /* Vert Five M2L */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    /* Reste en haut lorsque l'on scroll */
    top: 0;
    z-index: 1000;
    /* Reste au-dessus du reste du contenu */
}

.logo-container {
    flex: 1;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    color: white;
    text-decoration: none;
    border: 3px solid white;
    padding: 5px 10px;
    border-radius: 8px;
    background-color: #1b5e20;
}

.titre-container {
    flex: 2;
    text-align: center;
}

.titre-container h1 {
    margin: 0;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Animation des ballons */
.titre-container h1:hover .ballon {
    display: inline-block;
    animation: tourne 1s linear infinite;
}

@keyframes tourne {
    100% {
        transform: rotate(360deg);
    }
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.pseudo-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pseudo-nom {
    font-weight: bold;
    color: white;
    font-size: 22px;
    letter-spacing: 1px;
}

.pseudo-equipe {
    font-size: 13px;
    color: #d4f5d4;
    font-weight: normal;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

/* --- Conteneur Principal --- */
/* --- Conteneur Principal --- */
.contenu {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    /* J'ai réduit le padding pour que les cartes aient plus d'espace */
    min-height: 500px;

    /* ON A SUPPRIMÉ LE FOND, LE FLOU ET L'OMBRE ! C'est juste un conteneur invisible maintenant. */
    color: #333;
}

.page-auth .contenu {
    margin-top: 40px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
}


/* ==========================================================================
   3. COMPOSANTS UI (Réutilisables partout)
   ========================================================================== */
/* --- Boutons --- */
.btn {
    background-color: white;
    color: #2e7d32;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-left: 10px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn:hover {
    background-color: #c8e6c9;
}

.btn.btn-rouge {
    background-color: #d32f2f;
    color: white;
    border: none;
}

.btn.btn-rouge:hover {
    background-color: #b71c1c;
}

/* --- Alertes / Messages Flash --- */
.alerte {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.alerte-orange {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --- Onglets Principaux (Navigation Globale) --- */
.barre-onglets {
    background-color: #4caf50;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.onglet {
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    margin: 0 5px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}

.onglet:hover {
    background-color: #81c784;
}

.onglet.actif {
    background-color: white;
    color: #2e7d32;
}

.onglet-admin {
    background-color: #d32f2f;
}

.onglet-admin:hover {
    background-color: #b71c1c;
}

.onglet.onglet-admin.actif {
    background-color: white;
    color: #d32f2f;
}


/* ==========================================================================
   4. FORMULAIRES GÉNÉRAUX
   ========================================================================== */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-groupe {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-groupe>label {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 20px;
    font-weight: bold;
    color: #2e7d32;
}

.form-groupe input[type="text"],
.form-groupe input[type="password"],
.form-groupe select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* Cas particulier : Formulaire vertical */
.form-groupe-vertical {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-groupe-vertical label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

/* On ajoute les passwords et les dates dans la liste ! */
.form-groupe-vertical input[type="text"],
.form-groupe-vertical input[type="password"],
.form-groupe-vertical input[type="date"],
.form-groupe-vertical select {
    padding: 12px;
    border: 1px solid #ccc;
    font-size: 16px;
    /* 16px force les navigateurs mobiles et les dates à s'afficher correctement */
    font-family: inherit;
    /* Force le champ date à utiliser la police du site */
    transition: border-color 0.3s ease;
}

/* On n'oublie pas de les ajouter aussi pour l'effet au clic (focus) */
.form-groupe-vertical input[type="text"]:focus,
.form-groupe-vertical input[type="password"]:focus,
.form-groupe-vertical input[type="date"]:focus,
.form-groupe-vertical select:focus {
    border-color: #333;
    outline: none;
}

/* Boutons de soumission globaux */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions input[type="submit"] {
    background-color: #2e7d32;
    color: white;
    padding: 12px 30px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.form-actions input[type="submit"]:hover {
    background-color: #1b5e20;
}

/* Styles spécifiques Profil / Mot de passe */
.form-groupe.form-groupe-haut {
    align-items: flex-start;
}

.form-groupe.form-groupe-haut>label {
    margin-top: 0;
    padding-top: 11px;
}

.input-et-regles {
    flex: 1;
    text-align: left;
}

.input-et-regles input {
    width: 100%;
    box-sizing: border-box;
}

.bloc-regles-mdp {
    font-size: 0.85em;
    color: #555;
    margin-top: 8px;
    line-height: 1.5;
}

.bloc-regles-mdp .valide {
    color: green;
}

.radio-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.radio-options label {
    font-weight: normal;
    cursor: pointer;
}

.lien-connexion {
    margin-top: 25px;
    text-align: center;
    font-size: 15px;
}

.lien-connexion a {
    color: #2e7d32;
    font-weight: bold;
    text-decoration: none;
}

.lien-connexion a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   5. VUES SPÉCIFIQUES (Hub Équipe, Accueil, Tournoi)
   ========================================================================== */
/* --- Accueil --- */
.encart-action-accueil {
    background-color: #f1f8e9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    border: 2px dashed #8bc34a;
}

.encart-action-accueil h2 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 15px;
}

.actions-accueil {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.accueil-dashboard {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 16px;
}

.accueil-colonne {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accueil-bloc {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 14px;
}

.accueil-bloc h3 {
    margin: 0 0 10px 0;
    color: #1f5f2a;
    font-size: 1.04em;
}

.accueil-ligne-titre {
    font-weight: 700;
    color: #1f3c88;
    margin: 0 0 6px 0;
}

.bloc-tournoi-clicable {
    display: block;
    text-decoration: none;
    color: #333;
    background: #f7fbff;
    border: 1px solid #d9ebff;
    border-radius: 7px;
    padding: 10px;
}

.bloc-tournoi-clicable:hover {
    background: #eef7ff;
}

.accueil-indice-lien {
    margin: 8px 0 0 0;
    color: #1976d2;
    font-weight: 600;
}

.accueil-liste-tournois,
.accueil-liste-matchs {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.accueil-tournoi-card,
.accueil-match-card {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 7px;
    padding: 10px;
}

.accueil-tournoi-lien {
    display: block;
    text-decoration: none;
    color: inherit;
}

.accueil-tournoi-lien:hover {
    background: #f3f8ff;
    border-color: #d9ebff;
}

.accueil-match-card.a-venir {
    border-left: 4px solid #f57f17;
}

.accueil-match-card.termine {
    border-left: 4px solid #2e7d32;
}

.accueil-match-meta {
    margin: 0;
    font-size: 0.86em;
    color: #666;
}

.accueil-match-equipes {
    margin: 6px 0;
    font-weight: 600;
}

.accueil-match-infos {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92em;
}

@media (max-width: 1100px) {
    .accueil-dashboard {
        grid-template-columns: 1fr;
    }
}

/* --- Hub Équipe & Sous-Onglets --- */
.hub-equipe-entete {
    text-align: center;
    margin-bottom: 30px;
}

.hub-equipe-entete h1 {
    margin-bottom: 10px;
    color: #333;
}

.actions-visiteur {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.sous-navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

.sous-onglet {
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    background-color: #f5f5f5;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.sous-onglet:hover {
    background-color: #e0e0e0;
}

.sous-onglet.onglet-vert.actif {
    background-color: #2e7d32;
    color: white;
}

.sous-onglet.onglet-orange.actif {
    background-color: #e65100;
    color: white;
}

.sous-onglet.actif:not(.onglet-vert):not(.onglet-orange) {
    background-color: #333;
    color: white;
}

/* --- Cartes et Listes d'Équipe --- */

.liste-equipes-publiques {
    background-color: rgba(255, 255, 255, 0.50);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;

    /* ON SUPPRIME LE max-width: 600px ET LE margin: 0 auto D'ICI */
    /* C'est la classe .w-m ou .w-p dans le HTML qui gérera la taille */

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.liste-equipes-publiques ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.liste-equipes-publiques li {
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.liste-equipes-publiques li:last-child {
    border-bottom: none;
}

.carte-action {
    /* 1. Transparence à 85% */
    background-color: rgba(255, 255, 255, 0.50);

    /* 2. Le flou (verre dépoli) appliqué directement à la carte */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.carte-rejoindre {
    border-top: 4px solid #2e7d32;
}

.carte-creer {
    border-top: 4px solid #e65100;
}

.carte-action h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}

/* --- TAILLES DE CARTES UNIFORMISÉES --- */
/* Ces classes forcent maintenant la largeur et le centrage */
.w-p {
    max-width: 600px !important;
    margin: 0 auto 20px auto;
}

.w-m {
    max-width: 850px !important;
    margin: 0 auto 20px auto;
}

.w-g {
    max-width: 1100px !important;
    margin: 0 auto 20px auto;
}

/* Grande (Tableaux stats) */

/* On ajuste la carte navigation pour être en w-m */
.carte-navigation {
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.alerte-capitaine {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.code-secret {
    font-size: 1.2em;
    letter-spacing: 2px;
    color: #d32f2f;
    background: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px dashed #d32f2f;
}

.form-annulation {
    text-align: center;
    margin-bottom: 20px;
}

/* --- Détails de la vue Tournoi --- */
.ligne-tournoi {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.tournoi-entete-ligne {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.tournoi-titre-ligne {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.info-tournoi h2 {
    margin: 0;
    color: #333;
}

.date-tournoi {
    margin: 5px 0;
    color: #666;
    font-size: 1.03em;
}

.places-tournoi {
    margin: 0;
    font-size: 1em;
}

.form-sans-marge {
    display: inline;
    margin: 0;
    padding: 0;
}

.badge-inscrit {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    border: 1px solid #c8e6c9;
}

.btn-desactive {
    cursor: not-allowed;
    opacity: 0.7;
}

.texte-centré {
    text-align: center;
    color: #666;
    margin-top: 20px;
}

/* --- Ajustements Admin & Gestion Tournois --- */

/* --- ÉDITION EN LIGNE DES TOURNOIS --- */
.carte-edition {
    border: 2px dashed #f39c12;
    background-color: #fdfbf7;
}

/* Pour mettre les dates côte à côte proprement */
.form-groupe-horizontal {
    display: flex;
    gap: 15px;
}

/* Pour que les éléments enfants prennent le même espace */
.flex-1 {
    flex: 1;
}

.form-actions-edition {
    margin-top: 15px;
}

/* --- ÉDITION EN LIGNE DES ÉQUIPES --- */

.actions-admin-equipe {
    display: flex;
    gap: 5px;
    /* Espace entre le crayon et la poubelle */
    align-items: center;
    justify-content: center;
    /* Pour la vue tournoi */
    margin-top: 10px;
}

.mode-edition-equipe {
    background-color: #fdfbf7;
    border-left: 3px solid #f39c12;
    padding-left: 10px;
}

.form-edition-inline {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    gap: 10px;
}

.input-inline {
    flex: 1;
    padding: 5px;
    margin: 0;
}

.actions-inline {
    display: flex;
    gap: 5px;
}

/* --- ADMINISTRATION CONTEXTUELLE --- */
.btn-petit {
    padding: 5px 10px;
    font-size: 0.85em;
    min-width: auto;
}

.btn-action-admin {
    margin-top: 10px;
    display: block;
    text-align: center;
}

.ligne-equipe-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    /* Optionnel : un petit trait de séparation */
}

/* --- BADGE DE NOTIFICATION ADMIN --- */
.badge-notification {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    /* Rouge vif type alerte */
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 50%;
    /* Pour faire un rond parfait */
    min-width: 18px;
    height: 18px;
    padding: 2px 5px;
    margin-left: 5px;
    vertical-align: text-top;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* --- ENCART D'ACTION ADMIN --- */
.encart-action-admin {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff3cd;
    /* Fond jaune alerte */
    border: 1px solid #ffe69c;
    border-radius: 5px;
    text-align: center;
}

.texte-action-admin {
    margin: 0 0 10px 0;
    color: #664d03;
    font-weight: bold;
}

.btn-large {
    width: 100%;
    font-size: 1.1em;
    padding: 10px;
}



.ligne-demande {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5px;
    border-bottom: 1px solid #eee;
}

.ligne-demande:last-child {
    border-bottom: none;
}

.groupe-boutons {
    display: flex;
    gap: 10px;
}

/* Bouton de suppression / action miniature pour les listes Admin */
.btn-action-mini {
    padding: 4px 8px;
    font-size: 0.8em;
    margin-left: 10px;
    line-height: 1;
    /* Pour bien centrer l'icône verticalement */
}

.btn-vert-admin {
    background-color: #2e7d32;
    color: white;
}

.btn-vert-admin:hover {
    background-color: #1b5e20;
}

.ligne-liste-tournoi {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ligne-liste-tournoi:last-child {
    border-bottom: none;
}

.info-tournoi-admin strong {
    font-size: 1.1em;
    color: #333;
}

.dates-admin {
    font-size: 0.9em;
    color: #666;
    margin-left: 5px;
}

.stats-tournoi-admin {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-bulle {
    background: #f1f8e9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #2e7d32;
    font-weight: bold;
    border: 1px solid #c8e6c9;
}

.badge-statut {
    font-size: 0.7em;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.statut-ouvert {
    color: #2e7d32;
    border: 1px solid #2e7d32;
    background-color: rgba(46, 125, 50, 0.05);
}

.statut-en_cours {
    color: #f57f17;
    border: 1px solid #f57f17;
    background-color: rgba(245, 127, 23, 0.05);
}

/* ==========================================================================
   6. CLASSES UTILITAIRES (À garder à la fin)
   ========================================================================== */


.mt-40 {
    margin-top: 40px;
}

.ml-10 {
    margin-left: 10px;
}

/* --- Utilitaires supplémentaires --- */
.mt-10 {
    margin-top: 10px;
}

.btn-large-ajuste {
    padding: 8px;
    font-size: 0.95em;
}

.form-en-ligne {
    display: inline-block;
    margin: 0;
}

/* --- ACCORDÉON DES POULES --- */
.accordéon-poules {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
}

/* Le bouton cliquable */
.accordéon-titre {
    cursor: pointer;
    font-weight: bold;
    color: #2e7d32;
    padding: 5px;
    list-style: none;
    /* Cache la flèche moche par défaut sur certains navigateurs */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cache la flèche par défaut de Safari/Chrome */
.accordéon-titre::-webkit-details-marker {
    display: none;
}

/* Notre flèche personnalisée */
.fleche {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

/* Quand l'accordéon est ouvert, la flèche tourne ! */
details[open] .fleche {
    transform: rotate(180deg);
}

/* --- GRILLE DES POULES (Déjà vue, adaptée pour la carte) --- */
.grille-poules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Un peu plus petit pour rentrer dans la carte */
    gap: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.poule-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.poule-header {
    background-color: #2e7d32;
    color: white;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

.poule-liste {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poule-liste li {
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    font-size: 0.9em;
    color: #333;
}

.poule-liste li:last-child {
    border-bottom: none;
}

.poule-vide {
    color: #999;
}

/* ==========================================================================
   STYLES POUR TABLEAUX ET CARTES D'ÉQUIPES
   ========================================================================== */

/* Tableaux des joueurs */
.tableau-joueurs {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tableau-joueurs thead {
    background-color: #2e7d32;
    color: white;
}

.tableau-joueurs th {
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    border: none;
}

.tableau-joueurs td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.tableau-joueurs tbody tr:hover {
    background-color: rgba(46, 125, 50, 0.05);
}

.tableau-joueurs tbody tr:last-child td {
    border-bottom: none;
}

/* Tableau plus petit pour liste équipes */
.tableau-joueurs-petit {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.95em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tableau-joueurs-petit thead {
    background-color: #1b5e20;
    color: white;
}

.tableau-joueurs-petit th {
    padding: 8px 12px;
    text-align: left;
    font-weight: bold;
    border: none;
    font-size: 0.9em;
}

.tableau-joueurs-petit td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.tableau-joueurs-petit tbody tr:hover {
    background-color: rgba(46, 125, 50, 0.03);
}

.tableau-joueurs-petit tbody tr:last-child td {
    border-bottom: none;
}

/* Conteneurs des sous-onglets */
.sous-navigation {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.sous-onglet {
    padding: 12px 20px;
    border: none;
    background-color: transparent;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.sous-onglet:hover {
    color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.05);
}

.sous-onglet.actif {
    color: #2e7d32;
    border-bottom-color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.05);
}

.onglet-bleu.actif {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background-color: rgba(25, 118, 210, 0.05);
}

.contenu-sous-onglet {
    padding: 20px 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cartes d'équipes détaillées */
.carte-equipe-detail {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carte-equipe-detail h3 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 1.2em;
    border-bottom: 2px solid #2e7d32;
    padding-bottom: 10px;
}

.liste-equipes-complete {
    display: grid;
    gap: 20px;
}

.mon-equipe-detail h2,
.toutes-equipes-detail h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Info des équipes */
.info-equipe {
    text-align: right;
    color: #666;
    font-size: 0.95em;
    margin-top: 10px;
    font-style: italic;
}

.info-equipe-petit {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* ==========================================================================
   STYLES POUR LES MATCHS ET PHASES DE POULE
   ========================================================================== */

.matchs-par-poule {
    display: grid;
    gap: 20px;
}

.poule-contenu {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 15px;
    align-items: start;
}

.classement-poule {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 10px;
}

.classement-poule h5 {
    margin: 0 0 10px 0;
    color: #2e7d32;
    font-size: 1em;
}

.table-classement-poule {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93em;
}

.table-classement-poule th,
.table-classement-poule td {
    padding: 7px;
    border-bottom: 1px solid #efefef;
    text-align: left;
}

.table-classement-poule tr.qualifie {
    background: rgba(46, 125, 50, 0.1);
}

.note-qualification {
    margin: 8px 0 0 0;
    font-size: 0.82em;
    color: #2e7d32;
    font-weight: 600;
}

/* --- Classement final d'un tournoi terminé --- */
.table-classement-final {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
}

.table-classement-final th {
    background-color: #1b5e20;
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: bold;
}

.table-classement-final td {
    padding: 9px 14px;
    border-bottom: 1px solid #efefef;
}

.table-classement-final .col-rang {
    width: 50px;
    text-align: center;
}

.table-classement-final tr:last-child td {
    border-bottom: none;
}

/* Ligne 1 : or */
.table-classement-final tr.rang-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    font-weight: bold;
}

/* Ligne 2 : argent */
.table-classement-final tr.rang-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
    font-weight: bold;
}

/* Lignes 3 : bronze */
.table-classement-final tr.rang-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    font-weight: 600;
}

/* Lignes 5 : quart-finalistes */
.table-classement-final tr.rang-5 {
    background: rgba(255, 255, 255, 0.5);
}

/* Lignes 9 : éliminés poule */
.table-classement-final tr.rang-9 {
    background: rgba(245, 245, 245, 0.6);
    color: #666;
}

.badge-statut.statut-termine {
    color: #555;
    border: 1px solid #aaa;
    background-color: rgba(0, 0, 0, 0.04);
}

.poule-matchs {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #2e7d32;
}

.poule-matchs h4 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 1.1em;
    font-weight: bold;
}

.liste-matchs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ligne-match {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #eee;
    border-radius: 6px;
    border-left: 3px solid #ddd;
    flex-wrap: wrap;
}

.ligne-match.terminé {
    border-left-color: #2e7d32;
    background: rgba(46, 125, 50, 0.02);
}

.ligne-match.erreur {
    border-left-color: #d32f2f;
    background: rgba(211, 47, 47, 0.02);
}

.ligne-match.à_jouer {
    border-left-color: #f57f17;
    background: rgba(245, 127, 23, 0.02);
}

.match-equipes {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    font-weight: 500;
}

.match-equipes .equipe1,
.match-equipes .equipe2 {
    flex: 1;
    word-break: break-word;
    color: #333;
}

.match-equipes .vs {
    color: #999;
    font-size: 0.85em;
    padding: 0 8px;
}

.match-resultat {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.resultat-valide {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.resultat-valide .score {
    font-size: 1.1em;
}

.resultat-erreur {
    background-color: #ffcdd2;
    color: #b71c1c;
    font-size: 0.9em;
}

.resultat-pending {
    background-color: #fff3cd;
    color: #856404;
    font-size: 0.9em;
}

.resultat-pending a.btn {
    padding: 4px 8px;
    font-size: 0.85em;
}

.resultat-pending a.btn-primaire {
    background-color: #1976d2;
    color: white;
}

.match-date {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    padding: 0 8px;
    border-left: 1px solid #ddd;
}

.phase-label {
    background: #2e7d32;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.phases-finales {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #1976d2;
}

.phases-finales .ligne-match {
    border-left: 3px solid #ddd;
}

.phases-finales .ligne-match.terminé {
    border-left-color: #1976d2;
}

.groupe-phase-finale {
    margin-bottom: 18px;
}

.groupe-phase-finale:last-child {
    margin-bottom: 0;
}

.titre-phase-finale {
    font-size: 1em;
    font-weight: 700;
    color: #1976d2;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #e3f0fc;
}

.groupe-phase-finale:last-child .titre-phase-finale {
    color: #b8860b;
    border-bottom-color: #fff3cd;
}

.texte-centre {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.participants-tournoi {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 12px;
}

.participants-tournoi h4 {
    margin: 0 0 8px 0;
    color: #2e7d32;
}

.liste-participants-tournoi {
    margin: 0;
    padding-left: 18px;
    columns: 2;
    column-gap: 24px;
}

.liste-participants-tournoi li {
    margin: 3px 0;
}

@media (max-width: 768px) {
    .tournoi-entete-ligne {
        flex-direction: column;
    }

    .tournoi-titre-ligne {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .poule-contenu {
        grid-template-columns: 1fr;
    }

    .ligne-match {
        flex-direction: column;
        align-items: flex-start;
    }

    .match-equipes {
        width: 100%;
    }

    .match-resultat {
        align-self: flex-start;
        width: 100%;
    }

    .match-date {
        border-left: none;
        width: 100%;
    }
}

/* ==========================================================================
   STYLES POUR LA SAISIE DES RÉSULTATS
   ========================================================================== */

.match-detail-saisie {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
}

.equipes-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(46, 125, 50, 0.05);
    border-radius: 8px;
}

.equipe-match {
    text-align: center;
}

.equipe-match h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
}

.badge-mon-equipe {
    display: inline-block;
    background: #2e7d32;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.vs-sepa {
    font-size: 1.8em;
    font-weight: bold;
    color: #2e7d32;
    text-align: center;
}

.formulaire-match {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.inputs-score {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.groupe-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.groupe-input label {
    font-weight: bold;
    color: #333;
}

.groupe-input input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    text-align: center;
}

.groupe-input input:focus {
    border-color: #2e7d32;
    outline: none;
    background: #f0f8f5;
}

.info-saisie {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    color: #856404;
}

.info-saisie p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .equipes-match {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .vs-sepa {
        font-size: 1.2em;
        padding: 10px 0;
    }

    .inputs-score {
        grid-template-columns: 1fr;
    }
}