/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-color: #00336C;
    --secondary-color: #0055a5;
    --accent-color: #ffcc00;
    --danger-color: #ff3333;
    --danger-hover: #cc0000;
    --warning-color: #f39c12;
    --text-dark: #333;
    --text-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#global {
    max-width: 1200px; /* La largeur maximale souhaitée */
    margin: 0 auto;    /* Centre tout le bloc */
    padding: 0 15px;   /* Marge de sécurité sur les côtés pour le mobile */
    width: 100%;
    box-sizing: border-box; /* Crucial : inclut le padding dans le calcul de la largeur */
overflow: visible; /* EMPECHE les éléments internes de dépasser */
}
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--text-light);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: 0.3s;
}

a:hover {
    text-decoration: underline;
}




/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */

/* Structure du Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    font-family: 'Salsa', cursive;
    font-size: 3rem; /* Ajusté de 4rem pour éviter les débordements */
    margin: 0;
}

.header-left .annee {
    color: var(--accent-color);
}

.cdm-logo {
    width: 60px;
    height: auto;
    border-radius: 5px;
}

/* Infos Utilisateur (Droite) */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.4;
    text-align: right;
}

.nom-joueur {
    font-weight: bold;
    font-size: 1.1em;
}

.connectes-info, .last-update {
    font-size: 0.85em;
    color: #eee;
}

.header-right a.link-blanc {
    color: var(--white);
}

.header-right a.link-blanc:hover {
    color: var(--accent-color);
}

.btn-deconnexion {
    padding: 8px 12px;
    background-color: var(--danger-color);
    color: var(--white);
    border-radius: 5px;
    white-space: nowrap;
}

.btn-deconnexion:hover {
    background-color: var(--danger-hover);
    text-decoration: none;
}

/* Menu Principal */
#menu {
display: flex;          /* Active le mode Flexbox */
    justify-content: center; /* CENTRE les éléments horizontalement */
    align-items: center;     /* Centre verticalement si besoin */
    list-style: none;
    padding: 0;
    margin: 0 auto;          /* 0 en haut/bas pour coller, auto sur les côtés */
    background-color: #003366; 
    width: 100%;             /* S'assure que le menu prend toute la largeur */
    border-radius: 0 0 10px 10px; /* Arrondis uniquement le bas pour le style */
	}

.liens_pc {
    width: 100%;
    margin: 0;
    padding: 0;
}

#menu li {
    position: relative;
}

#menu > li > a {
    display: block;
    padding: 10px 20px;
    color: var(--white);
    transition: 0.3s;
    text-decoration: none;
	}

#menu > li > a:hover, 
#menu li:hover > a {
    background-color: var(--secondary-color);
    text-decoration: none;
	}

/* Sous-menus */
#menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: var(--primary-color);
    border-radius: 0 0 10px 10px;
    min-width: 200px;
    z-index: 1000;
}

#menu li:hover > ul, 
#menu li.open > ul {
    display: block;
}

#menu li ul li a {
    display: block;
    padding: 10px;
    color: var(--white);
}

#menu li ul li a:hover {
    background-color: var(--secondary-color);
}

/* --- Styles pour le bouton Burger --- */
.menu-toggle {
    display: none; /* Caché sur PC */
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* --- ADAPTATION MOBILE (Écrans < 768px) --- */
@media screen and (max-width: 768px) {
    .header {
        flex-direction: column; /* Empile le logo et les infos user */
        text-align: center;
    }

    .header-right {
        margin-top: 10px;
    }

    .menu-toggle {
        display: flex; /* Affiche le burger sur mobile */
    }

    #menu {
        display: none; /* On cache le menu par défaut sur mobile */
        flex-direction: column;
        width: 100%;
        background: #003366; /* Ta couleur bleue */
        position: absolute;
        top: 60px; /* Ajuste selon la hauteur de ton header */
        left: 0;
        z-index: 1000;
        padding: 0;
    }

    #menu.active {
        display: flex; /* On l'affiche quand on clique sur le burger */
    }

    #menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #menu li ul {
        position: static; /* Sous-menus s'affichent en dessous sur mobile */
        display: block;
        background: #002244;
        padding-left: 20px;
    }
}

.match-grid {
    margin-bottom: 80px; /* Laisse de la place pour que le bouton ne cache rien */
}



/* ==========================================================================
  2.5 MESSAGES
   ========================================================================== */

/* --- Container Principal --- */
.forum-container {
    max-width: 850px;
    margin: 20px auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-forum);
    padding: 20px;
    border-radius: 20px;
}

/* --- La Carte Message --- */
.msg-card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease;
}

.msg-card:hover {
    transform: translateY(-2px);
}

/* --- En-tête du message --- */
.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.author-info strong {
    color: var(--primary-color);
    font-size: 1.1em;
}

.date-info {
    color: var(--text-light);
    font-size: 0.85em;
    margin-left: 10px;
}

/* --- Corps du message --- */
.msg-body {
    line-height: 1.6;
    color: var(--text-main);
    font-size: 1.05em;
    word-wrap: break-word;
}

/* --- Style des citations (Fonction citation) --- */
.msg-body blockquote {
    background: #fdfdfd;
    border-left: 4px solid var(--secondary-color);
    margin: 15px 0;
    padding: 12px 18px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-size: 0.95em;
    color: #555;
}

.msg-body q {
    display: block;
    margin-bottom: 8px;
    color: #777;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 5px;
}

/* --- Footer et Likes --- */
.msg-footer {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.like-section {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    background: #fff9f0;
    transition: background 0.3s;
}

.like-section:hover {
    background: #ffe0b2;
}

.like-count {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.9em;
}

/* --- Boutons d'action (Modifier/Répondre) --- */
.btn-action {
    opacity: 0.6;
    transition: all 0.3s;
    display: inline-block;
}

.btn-action:hover {
    opacity: 1;
    transform: scale(1.2);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.page-link {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: bold;
    transition: 0.3s;
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link:hover:not(.active) {
    background: var(--secondary-color);
    color: white;
}

.badge-notif {
    background-color: var(--danger-color); /* Le rouge défini dans tes variables */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 5px;
    display: inline-block;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: pulse-red 2s infinite; /* Optionnel : pour attirer l'oeil */
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 8px var(--danger-color); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   3. DISPOSITION & GRILLES (LAYOUT)
   ========================================================================== */
.container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gauche { flex: 1 1 300px; }
.droite { flex: 2 1 600px; }

.card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: var(--shadow);
}
.card-row {
    display: flex;
    gap: 20px;          /* espace entre les blocs */
    flex-wrap: wrap;    /* pour les écrans étroits, les blocs peuvent passer en dessous */
}

.card-row .card {
    flex: 1;            /* prend tout l’espace disponible équitablement */
    min-width: 300px;   /* largeur minimale pour que ce soit lisible */
}

.description-body {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* permet de passer en colonne si besoin */
}

.description-body > div {
    flex: 1 1 auto;  /* par défaut, texte et image se partagent l'espace */
}

@media (max-width: 768px) {
    .description-body {
        flex-direction: column; /* sur petit écran, image au-dessus du texte */
    }

    .description-body > div {
        flex: none;       /* chaque div prend sa largeur naturelle */
        width: 100%;      /* pour forcer le texte à 100% */
    }
}

.groups-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.group-box {
    flex: 1 1 300px;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.group-title {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
}

/* ==========================================================================
   4. MATCHS, SCORES & STATS
   ========================================================================== */
.match-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background: var(--white);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    font-size: 1.1em;
}

.score-cell, .score {
    font-weight: bold;
    text-align: center;
    min-width: 60px;
}

.live {
    color: red;
    font-weight: bold;
}

/* Équipes & Drapeaux */
.team {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.flag, .flag2, .flag-logo {
    object-fit: cover;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
}

.flag-logo { width: 32px; height: 20px; margin-right: 8px; }
.flag { width: 24px; height: 16px; margin-right: 5px; }

/* Stats Bar */
.stats-bar {
    display: flex;
    height: 20px;
    margin: 5px 0;
    border-radius: 5px;
    overflow: hidden;
    background: #f0f0f0;
}

.stats-bar .bar {
    height: 100%;
    color: var(--white);
    text-align: center;
    font-size: 0.8em;
    line-height: 20px;
}

.stats-bar .home { background: #007bff; }
.stats-bar .draw { background: #6c757d; }
.stats-bar .away { background: #dc3545; }

/* Maillots (Kits) */
.kits-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 0 20px;
}

.kit-img {
    max-width: 80px;
    height: auto;
    filter: drop-shadow(0px 3px 5px rgba(0,0,0,0.2));
}

/* ==========================================================================
   5. FORMULAIRES & TABLES
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: var(--primary-color);
    color: var(--white);
}

tr:nth-child(even) { background-color: #f2f2f2; }

input[type=text], input[type=number], select {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input.prono {
    width: 40px;
    text-align: center;
    display: inline-block;
}

input[type=submit], button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* ==========================================================================
   6. SIMULATION & ALERTES
   ========================================================================== */
.simulation-banner {
    background: var(--warning-color);
    color: #000;
    text-align: center;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-bottom: 2px solid #e67e22;
}

.sim-tag { color: var(--warning-color); font-weight: bold; }

.btn-reset-sim {
    background: #000;
    color: var(--white);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8em;
    margin-left: 10px;
}

.simulation-banner .icon {
    animation: blink-warning 1s infinite;
}

.match-footer {
    display: flex;
    flex-direction: column; /* Aligne la date et les badges l'un sous l'autre si besoin */
    align-items: center;    /* Centre horizontalement tous les enfants */
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 15px;
    padding: 10px 0;
    gap: 8px;              /* Espace entre la date et les badges */
}

/* On s'assure que la span de date ne bloque pas le centrage */
.match-date {
    display: block;
    width: 100%;
}

/* Style pour les badges pour qu'ils soient bien alignés */
.badge-paused, .live {
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
}

.impact-count {
    cursor: pointer;
    color: #3498db;
    font-weight: bold;
}

.impact-count:hover {
    text-decoration: underline;
}

/* --- COMPTOIR / MESSAGES --- */
.header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.message-item {
    border-left: 5px solid var(--primary-color);
    margin-bottom: 15px !important;
}

.message-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.author strong { color: var(--primary-color); }
.author small { color: #888; margin-left: 10px; }

.message-body {
    line-height: 1.6;
    color: var(--text-dark);
}

.citation {
    background: #f9f9f9;
    border-left: 3px solid #ccc;
    padding: 10px;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.like-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    font-weight: bold;
    color: var(--warning-color);
}

/* Pagination moderne */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.page-link {
    padding: 5px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Grille de matchs */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.match-card-saisie {
    padding: 15px;
    margin: 0 !important;
    transition: transform 0.2s;
}

.match-card-saisie:hover { transform: translateY(-3px); }

.match-card-saisie.locked {
    background-color: #f8f9fa;
    opacity: 0.8;
    border-left: 5px solid #ccc;
}

.match-time {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.match-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.team-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-name { font-weight: bold; font-size: 0.9em; margin-top: 5px; }

.score-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.score-inputs input {
    width: 45px;
    height: 40px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.final-pred {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Bouton flottant en bas pour mobile */
.sticky-footer {
    position: sticky;
    bottom: 20px;
    z-index: 1000;
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    /* On ajoute un fond légèrement transparent pour qu'il soit lisible par-dessus les cartes */
    background: rgba(245, 245, 245, 0.8); 
    border-radius: 50px;
}


.btn-save {
    background: var(--primary-color);
    color: white;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    pointer-events: auto; /* Mais le bouton doit rester cliquable */
}
.flag {
    width: 35px;
    height: 25px;
    object-fit: contain; /* Garde les proportions du logo/drapeau */
    margin: 0 5px;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.1));
}

.team-input {
    display: flex;
    flex-direction: row; /* Aligne les enfants horizontalement */
    align-items: center;  /* Centre le drapeau et le texte sur la même ligne imaginaire */
    gap: 10px;           /* Espace entre le drapeau et le nom */
    flex: 1;             /* Permet à chaque bloc équipe de prendre la place disponible */
}

/* Pour l'équipe locale (à gauche), on peut laisser l'ordre naturel */
.team-input.home {
    justify-content: flex-start;
}

/* Pour l'équipe visiteuse (à droite), on peut inverser pour mettre le drapeau à droite du texte */
.team-input.away {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: right;
}

.flag {
    width: 30px; 
    height: auto;
    flex-shrink: 0; /* Empêche le drapeau de s'écraser si le texte est long */
}
/* On inverse l'ordre pour l'équipe de droite (Away) pour que le drapeau soit à droite du texte */
.team-input:last-child {
    flex-direction: row-reverse;
    text-align: right;
}

/* Container de la grille (2 colonnes sur PC, 1 sur mobile) */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    padding-bottom: 50px;
}

@media (max-width: 500px) {
    .match-grid { grid-template-columns: 1fr; }
}

/* Style de la carte Match */
.match-card {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid #ddd;
}

.live-border {
    border-left-color: #e74c3c !important;
    background-color: #fffafa;
}

/* Header de la carte */
.match-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.live-badge {
    color: #e74c3c;
    font-weight: bold;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.finished-badge {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Zone centrale (Équipes + Score) */
.match-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.team-block.home { flex-direction: column; }
.team-block.away { flex-direction: column; }

.team-name {
    font-weight: bold;
    font-size: 0.95em;
}

/* Score */
.score-block {
    flex: 0.6;
    text-align: center;
}

.main-score {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.penos-score {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: -5px;
}

/* Footer de la carte */
.match-footer {
    margin-top: 10px;
    text-align: center;
    font-size: 0.75em;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flag {
    width: 40px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.principale { padding: 20px; max-width: 900px; margin: auto; }
.titre-page { color: #003366; border-bottom: 2px solid #003366; padding-bottom: 10px; margin-bottom: 20px; }

/* La liste et les cartes */
.liste-matchs { display: flex; flex-direction: column; gap: 15px; }

.carte-match {
    background: white;
    border-radius: 8px; /* Ton arrondi */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 6px solid #003366;
    overflow: hidden;   /* <--- AJOUTE CETTE LIGNE */
    padding: 0;         /* Assure-toi que le padding est à 0 pour que l'en-tête colle aux bords */
}

.match-info-haut {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.match-corps {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Alignement Equipes */
.equipe { display: flex; align-items: center; gap: 10px; flex: 1; }
.domicile { justify-content: flex-start; }
.exterieur { justify-content: flex-end; text-align: right; }

.logo-equipe { width: 35px; height: 25px; object-fit: contain; }
.nom-equipe { font-weight: bold; font-size: 1em; }

/* Score central */
.score-bloc { text-align: center; min-width: 80px; }
.score-chiffres { font-size: 1.5em; font-weight: 800; color: #003366; }
.penos { font-size: 0.8em; color: #e74c3c; font-weight: bold; }

/* Badge Live clignotant */
.badge-live {
    color: #e74c3c;
    font-weight: bold;
    animation: blinker 1.5s linear infinite;
}

/* Grille de groupes (2 colonnes sur PC, 1 sur mobile) */
.grille-groupes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.table-classement {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.table-classement th {
    padding: 10px 5px;
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.table-classement td {
    padding: 12px 5px;
    text-align: center;
    border-bottom: 1px solid #f2f2f2;
}

/* Style pour l'équipe */
.equipe-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left !important;
    min-width: 140px;
}

.logo-mini {
    width: 25px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.nom-equipe-mini {
    font-weight: 600;
    color: #333;
}

/* Mise en évidence des 2 premiers (qualifiés) */
.qualifie {
    background-color: #f0f7ff;
}

.rang {
    font-weight: bold;
    color: #999;
    width: 25px;
}

.carte-match {
    /* ... tes autres propriétés ... */
    height: auto;           /* Laisse la carte s'agrandir selon le contenu */
    min-height: 120px;      /* Sécurité minimale */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.score-chiffres {
    font-size: 1.3rem;      /* On réduit un peu si c'était trop gros */
    font-weight: 800;
}

.match-corps {
    padding-bottom: 5px;    /* Donne de l'air avant le footer */
}

/* Styles pour les highlights de classement */
.highlight-search { background-color: #ffffcc !important; }
.highlight-me { background-color: #fff3e0 !important; border-left: 4px solid #f39c12; }

.badge-pts {
    background: #003366;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* On réutilise les styles précédents pour .carte-match et .table-classement */
.table-classement tr:hover {
    background-color: #fcfcfc;
}

.rang {
    width: 50px;
    font-weight: bold;
    color: #bdc3c7;
}

/* Ajustement pour la structure de classement */
.principale {
    max-width: 1100px; /* Un peu plus large pour le classement complet */
}

/* Responsive */
@media (max-width: 600px) {
    .grille-groupes { grid-template-columns: 1fr; }
    .nom-equipe-mini { font-size: 0.85em; }
}
@keyframes blinker { 50% { opacity: 0; } }

@keyframes blink-warning {
    50% { opacity: 0; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeIn { to { opacity: 1; } }


/* Style pour la ligne du joueur favori dans le tableau */
.row-favori {
    background-color: #fff9c4 !important; /* Un jaune très léger pour la surbrillance */
    border-left: 4px solid var(--secondary-color); /* L'orange de ton thème */
}

/* L'étoile dans le classement */
.star-fav {
    width: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    vertical-align: middle;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    transition: transform 0.2s;
}

.star-fav:hover {
    transform: scale(1.2);
    transform: scale(1.3) rotate(15deg);
}

/* La ligne du favori dans le classement */
tr.is-favorite {
    background-color: #fff9c4 !important; /* Jaune très pâle */
    transition: background-color 0.3s ease;
}

tr.is-favorite td {
    border-bottom: 1px solid var(--secondary-color); /* Rappel de l'orange */
}

.btn-filter {
    text-decoration: none;
    font-size: 0.8em;
    padding: 5px 12px;
    border-radius: 15px;
    background: #fff;
    color: #003366;
    border: 1px solid #003366;
    margin-left: 5px;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: #eef;
}

.btn-filter.active {
    background: #003366;
    color: #fff;
    font-weight: bold;
}


/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* On force la grille de matchs sur une seule colonne */
    .match-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 5px; /* On réduit le padding extérieur */
    }

    .card {
        max-width: 100% !important;
        box-sizing: border-box; /* Indispensable pour que le padding ne dépasse pas */
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 10px !important;
    }

    /* On gère l'intérieur de la carte de match */
    .match-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
    }

    /* Réduire la taille des noms d'équipes pour qu'ils tiennent */
    .team-name {
        font-size: 0.85em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 80px; /* Ajuste selon tes besoins */
    }

    /* On réduit la taille des drapeaux/logos */
    .flag, .logo-equipe {
        width: 25px !important;
        height: auto;
    }

    /* On réduit la largeur des cases de score */
    .score-inputs input {
        width: 35px !important;
        padding: 5px 2px !important;
        font-size: 1em !important;
    }
}