.commentary, .stats, .line-ups, .tv-stations {
    display: none;
}
/* ==========================================================================
   NOUVEAU DESIGN HEADER (Score centrÃ© + Statut en dessous)
   ========================================================================== */

/* 1. Le conteneur qui entoure Score + Statut */
.match-center-column {
    display: flex;
    flex-direction: column; /* Empile le score et le texte l'un sur l'autre */
    align-items: center;    /* Centre horizontalement */
    justify-content: center;
    margin: 0 15px;         /* Espace avec les Ã©quipes */
    min-width: 120px;       /* Largeur minimum pour ne pas bouger */
    z-index: 5;
}


/* 3. Le conteneur des infos (TerminÃ©, MT, etc) */
.match-status-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    text-align: center;
}

/* 4. Style pour "TerminÃ©" */
.status-text {
    font-weight: bold;
    font-size: 0.85rem;
    color: #111827;
    text-transform: uppercase;
}

/* 5. Style pour (MT 1-0) ou penalties */
.status-detail {
    font-size: 0.8rem;
    color: #6b7280; /* Gris */
    margin-top: 2px;
}

/* 6. Animation Live (Force l'affichage flex pour aligner le point rouge et le texte) */
.match-live {
    display: flex !important; /* Important pour Ã©craser le style inline JS parfois */
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ef4444; /* Rouge */
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   HEADER STYLE SOFASCORE (Score Haut / Infos Bas)
   ========================================================================== */

.match-header {
    background-color: #ffffff;
    border-radius: 12px; /* Arrondi plus moderne */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e5e7eb; /* LÃ©gÃ¨re bordure */
}

/* 1. BLOC PRINCIPAL (Score + Equipes) - EN HAUT */
.match-scoreboard {
    padding: 25px 15px 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Equipes */
.team-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 30%;
    text-decoration: none; 
    color: inherit;
}

.team-block img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 12px;
}

.team-block .team-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
    line-height: 1.3;
}

/* Score Central */
.score-block {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    padding: 0 10px;
}

.score-display {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

/* Status (Live/TerminÃ©/ReportÃ©) */
.match-status {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    background-color: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Status LIVE */
.match-status.is-live {
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-dot {
    width: 6px;
    height: 6px;
    background-color: #dc2626;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
/* Temps additionnel dans le header */
.added-time {
    color: #ef4444; /* Rouge pour bien le distinguer (ou jaune #FCD34D) */
    font-size: 1em; /* Un peu plus petit que les minutes */
    font-weight: normal;
    margin-left: 2px;
}

/* Status TERMINÃ‰ */
.match-status.is-finished {
    color: #ffffff;
    background-color: #64748b;
}

/* 2. BUTEURS (Milieu) */
.match-scorers-footer {
    display: flex;
    padding: 5px 15px 20px 15px;
    font-size: 0.85rem;
    color: #475569;
    justify-content: center;
    align-items: flex-start; /* Aligne tout en haut */
}

/* Colonnes Gauche / Droite */
.scorers-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* Note : J'ai enlevÃ© la border-right ici car le ballon fait office de sÃ©paration */
.scorers-column.home { text-align: right; }
.scorers-column.away { text-align: left; }

/* L'IcÃ´ne Centrale */
.scorer-icon {
    flex: 0 0 40px; /* Largeur fixe au centre */
    display: flex;
    justify-content: center;
    padding-top: 3px; /* Petit alignement optique avec le texte */
    color: #94a3b8; /* Couleur gris discret pour le ballon */
}

.scorer-item {
    font-weight: 500;
}
.scorer-item span.minute {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0 4px;
}

/* 3. FOOTER INFOS (Tout en bas - Fond Gris) */
.match-info-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
}

.info-left, .info-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.league-link {
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    text-decoration: none;
}

.divider { color: #cbd5e1; }

/* Animation Pulse */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ==========================================================================
   NOUVEAU DESIGN Ã‰VÃ‰NEMENTS
   Utilise les classes : .event-row et .event-box
   ========================================================================== */

/* 1. Le conteneur principal des Ã©vÃ©nements */
#event-container.summary-container {
    display: flex;
    /* "column" met le 1er Ã©vÃ©nement (0') en haut. 
       Si tes Ã©vÃ©nements sont triÃ©s du plus rÃ©cent au plus ancien, mets "column-reverse" */
    flex-direction: column; 
    gap: 8px; /* Espace vertical entre les bulles */
    padding: 10px 0;
    background-color: #fff;
    border-radius: 4px;
}

/* 2. La ligne de l'Ã©vÃ©nement (prend toute la largeur) */
.event-row {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 0 10px; /* Petit espacement sur les cÃ´tÃ©s */
    box-sizing: border-box;
}

/* 3. Alignement : Domicile Ã  GAUCHE, Visiteur Ã  DROITE */
.event-row.is-local {
    justify-content: flex-start;
}

.event-row.is-visitor {
    justify-content: flex-end;
}

/* 4. La "Bulle" (Carte) contenant l'info */
.event-box {
    display: flex;
    align-items: center;
    gap: 12px; /* Espace entre Minute / Icone / Texte */
    padding: 8px 12px;
    background-color: #ffffff;
    
    /* Style carte : ombre lÃ©gÃ¨re et bordure fine */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    
    /* Largeur : ni trop petit, ni trop large */
    min-width: 220px;
    max-width: 100%; /* 40% S'arrÃªte avant le milieu de l'Ã©cran */
}

/* 5. Styles spÃ©cifiques DOMICILE (Gauche) */
.event-row.is-local .event-box {
    flex-direction: row;       /* Ordre : Minute -> Icone -> Texte */
    text-align: left;
    
    /* La couleur de la bordure est gÃ©rÃ©e dynamiquement par le PHP/JS */
    border-left-width: 4px;
    border-left-style: solid;
}

/* 6. Styles spÃ©cifiques VISITEUR (Droite) */
.event-row.is-visitor .event-box {
    flex-direction: row-reverse; /* Ordre : Texte <- Icone <- Minute */
    text-align: right;
    
    /* La couleur de la bordure est gÃ©rÃ©e dynamiquement par le PHP/JS */
    border-right-width: 4px;
    border-right-style: solid;
}

/* --- Ã‰lÃ©ments internes de la bulle --- */

/* La Minute */
.event-minute {
    font-weight: bold;
    font-size: 0.9rem;
    color: #1f2937;
    min-width: 30px; /* Largeur fixe pour bien aligner verticalement */
    display: flex;
    justify-content: center;
}

/* L'IcÃ´ne (Ballon, Carton...) */
.event-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.event-icon svg {
    width: 100%;
    height: 100%;
}

/* Le bloc Texte (Nom du joueur, type d'action) */
.event-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1; 
    
    /* --- AJOUT ESSENTIEL POUR FLEXBOX --- */
    /* Cela permet au conteneur de rÃ©trÃ©cir en dessous de la taille de son contenu */
    /* Sans Ã§a, la boite s'Ã©largit Ã  l'infini et l'ellipsis ne s'active pas */
    min-width: 0; 
}

/* Nom du joueur principal */
.event-player {
    font-weight: 700;
    font-size: 0.95rem;
    color: #000;
    line-height: 1.2;
    
    /* --- CORRECTION FORCÃ‰E --- */
    white-space: nowrap !important;      /* Force REELLEMENT une seule ligne */
    overflow: hidden !important;         /* Coupe ce qui dÃ©passe */
    text-overflow: ellipsis !important;  /* Ajoute les "..." */
    
    display: block !important;           /* NÃ©cessaire pour que le width fonctionne */
    max-width: 100%;                     /* S'assure que Ã§a prend la largeur du parent */
}

/* Type d'action (ex: "But", "Carton jaune") */
.event-type-text {
    font-size: 0.8rem;
    color: #6b7280; /* Gris clair */
    margin-top: 2px;
}

/* Score (ex: 1 - 0) */
.event-score {
    margin-top: 4px;
}
.event-score span {
    font-weight: bold;
    background-color: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #111827;
    border: 1px solid #e5e7eb;
}

/* --- SÃ‰PARATEURS DE PÃ‰RIODES (FIXE ET ALIGNÃ‰) --- */
.event-row.is-period {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8fafc; /* Gris clair */
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 10px 0;
    width: 100%;
    
    /* On force une hauteur fixe pour Ã©viter que Ã§a bouge */
    height: 45px; 
    padding: 0; /* On gÃ¨re l'espacement via flexbox, pas de padding inutile */
}

.event-row.is-period .event-box {
    border: none !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* On cache les Ã©lÃ©ments inutiles sur ces lignes */
.event-row.is-period .event-minute,
.event-row.is-period .event-player {
    display: none !important; 
}

/* LE CONTENEUR TEXTE + ICONE */
.period-label {
    display: flex;
    align-items: center;     /* Centre verticalement l'icone et le texte */
    justify-content: center; /* Centre horizontalement */
    gap: 10px;               /* Espace propre entre le sifflet et le texte */
    
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.85rem;
    
    /* LA CLÃ‰ DU SUCCÃˆS : EmpÃªche le retour Ã  la ligne */
    white-space: nowrap; 
}

/* ON MAITRISE LA TAILLE DE L'ICONE */
.period-label svg {
    width: 18px !important;  /* Force une taille identique partout */
    height: 18px !important;
    display: block;          /* Ã‰vite les dÃ©calages fantÃ´mes */
    margin-top: -1px;        /* Petit ajustement optique pour Ãªtre parfaitement centrÃ© avec le texte */
}

/* --- Gestion des Remplacements (Substitutions) --- */
.sub-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.sub-row:last-child {
    margin-bottom: 0;
}
.sub-row svg {
    width: 14px;
    height: 14px;
}

/* Pour le visiteur, on inverse aussi le sens des flÃ¨ches de remplacement */
.event-row.is-visitor .sub-row {
    flex-direction: row-reverse;
}

.summary .icon svg {
  width: 1.2rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
	STATS
========================================================================== */
/* GRILLE RESPONSIVE */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2 colonnes sur desktop, 1 sur mobile */
    gap: 16px;
    padding: 10px;
    background-color: #f3f4f6; /* Fond gris clair */
}

/* CARTE BLANCHE */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* LIGNE DE STAT */
.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    height: 36px;
}

.stat-val {
    width: 40px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f2937;
}
.stat-val.home { text-align: right; margin-right: 8px; }
.stat-val.away { text-align: left; margin-left: 8px; }

/* CONTENEUR BARRES */
.stat-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.stat-label-center {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-bar-bg {
    height: 8px;
    background-color: #e5e7eb; /* Gris fond de barre */
    border-radius: 4px;
    display: flex;
    overflow: hidden; /* Important pour les bords ronds */
    position: relative;
}

/* BARRES COLORÃ‰ES */
/* Par dÃ©faut : Style "Face Ã  face" avec un gap au milieu */
.stat-bar-bg .bar-home {
    background-color: #3b82f6; /* BLEU (Ou couleur dynamique PHP) */
    height: 100%;
    margin-left: auto; /* Pousse la barre vers la droite (vers le centre) */
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

.stat-bar-bg .bar-away {
    background-color: #ef4444; /* ROUGE (Ou couleur dynamique PHP) */
    height: 100%;
    margin-right: auto; /* Pousse la barre vers la gauche (vers le centre) */
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

/* Cas SpÃ©cial Possession (Barre pleine) */
/* Il faudra adapter le CSS si isSplit est activÃ©, mais le standard marche bien */

/* ==========================================================================
   DESIGN COMMENTAIRES : STYLE TIMELINE MODERNE
   ========================================================================== */

#comment-container.summary-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px; /* Plus arrondi */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 10px 0;
    overflow: hidden;
}

.comment-row {
    display: flex;
    position: relative; /* Pour la ligne verticale */
    padding: 15px 20px;
    transition: all 0.2s ease;
}

/* --- LA LIGNE VERTICALE (Timeline) --- */
.comment-row::before {
    content: '';
    position: absolute;
    left: 44px; /* Position horizontale de la ligne */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e5e7eb;
    z-index: 0;
}

/* Enlever la ligne sur le premier Ã©lÃ©ment pour faire propre (optionnel) */
.comment-row:first-child::before {
    top: 50%;
}
.comment-row:last-child::before {
    bottom: 50%;
}

/* --- COLONNE 1 : LA MINUTE (Le point d'ancrage) --- */
.comment-minute {
    position: relative;
    z-index: 1; /* Au dessus de la ligne */
    width: 50px;
    flex-shrink: 0;
    margin-right: 20px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 0.85rem;
    font-weight: 800;
    color: #6b7280;
    background-color: #fff; /* Cache la ligne derriÃ¨re */
    
    /* Style de la "bulle" minute */
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    height: 24px;
    padding: 0 8px;
}

/* --- COLONNE 2 : LE CONTENU --- */
.comment-content {
    flex: 1;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6; /* Plus aÃ©rÃ© pour la lecture */
    padding-top: 0; /* Alignement avec la minute */
    display: flex;
    align-items: flex-start;
}

/* L'icÃ´ne dans le texte */
.comment-row .comment-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    transform: translateY(2px);
}

/* --- MISE EN AVANT (HIGHLIGHTS) --- */

/* 1. C'est un BUT : Fond Vert pÃ¢le + Minute verte */
.comment-row.is-goal-row {
    background-color: #f0fdf4; /* Vert trÃ¨s clair */
    border-left: 4px solid #16a34a; /* Marqueur visuel fort Ã  gauche */
    padding-left: 16px; /* Ajustement car on a ajoutÃ© une bordure */
}

.comment-row.is-goal-row .comment-minute {
    color: #16a34a;
    border-color: #16a34a;
    background-color: #f0fdf4;
}

.comment-row .comment-icon-goal { 
    color: #16a34a; 
}

/* 2. C'est IMPORTANT : Fond Orange pÃ¢le */
.comment-row.is-important-row {
    background-color: #fff7ed; /* Orange trÃ¨s clair */
}

.comment-row.is-important-row .comment-minute {
    color: #ea580c;
    border-color: #fdba74;
    background-color: #fff7ed;
}

.comment-row .comment-icon-important { 
    color: #ea580c; 
}

/* ==========================================================================
   ALIGNEMENT BUTEURS ET PASSEURS (Desktop & Mobile)
   ========================================================================== */

/* 1. Le conteneur principal */
.match-scorers,
.match-assists {
    display: flex;           /* Active l'alignement horizontal */
    justify-content: center; /* Centre le bloc globalement */
    align-items: flex-start; /* Aligne tout en haut (utile si une liste est plus longue) */
    width: 100%;             /* Prend toute la largeur */
    margin-top: 10px;        /* Espacement du haut */
    position: relative;
}

/* 2. Les colonnes des joueurs (Gauche et Droite) */
.match-goals {
    flex: 1;                 /* Force les deux colonnes Ã  prendre la mÃªme largeur (50% - icone) */
    display: flex;
    flex-direction: column;  /* Empile les noms des joueurs verticalement */
    font-size: 0.9rem;
    line-height: 1.4;
    overflow: hidden;        /* Ã‰vite que Ã§a dÃ©borde */
}

/* SpÃ©cificitÃ© pour l'Ã©quipe Ã  Domicile (Ã  Gauche du ballon) */
#localteam-goals,
#localteam-assists {
    text-align: right;       /* Texte alignÃ© Ã  droite */
    align-items: flex-end;   /* Bloque les Ã©lÃ©ments flex Ã  droite */
    padding-right: 10px;     /* Espace entre le texte et le ballon */
}

/* SpÃ©cificitÃ© pour l'Ã©quipe ExtÃ©rieure (Ã  Droite du ballon) */
#visitorteam-goals,
#visitorteam-assists {
    text-align: left;        /* Texte alignÃ© Ã  gauche */
    align-items: flex-start; /* Bloque les Ã©lÃ©ments flex Ã  gauche */
    padding-left: 10px;      /* Espace entre le texte et le ballon */
}

/* 3. L'icÃ´ne centrale (Ballon ou Titre "Passes dÃ©cisives") */
.scorer-icon,
.assist {
    flex: 0 0 auto;          /* Ne grandit pas, ne rÃ©trÃ©cit pas */
    width: 30px;             /* Largeur fixe pour stabiliser le centre */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2px;         /* Petit ajustement optique pour s'aligner avec la premiÃ¨re ligne de texte */
}

/* Le titre "Passes dÃ©cisives" doit Ãªtre plus large que le ballon */
.match-assists .assist {
    width: auto;             /* Largeur auto pour le texte */
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #6b7280;
    text-transform: uppercase;
}



/* ==========================================================================
   DESIGN COMPOS & TERRAIN
   ========================================================================== */

/* --- 1. Le Conteneur Principal --- */
.line-ups {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- 2. Le Terrain (Gazon RÃ©aliste) --- */
.field-container {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.field {
    width: 600px;
    height: 400px;
    /* Vert plus naturel et profond */
    background-color: #3a7c44; 
    /* Motif bandes plus subtil et fondu */
    background-image: repeating-linear-gradient(
        90deg,
        rgba(0,0,0,0) 0,
        rgba(0,0,0,0) 10%,
        rgba(0,0,0,0.1) 10%,
        rgba(0,0,0,0.1) 20%
    );
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 4px;
    position: relative;
    display: flex;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2); /* Ombre interne pour la profondeur */
}

/* Ligne mÃ©diane */
.field::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: rgba(255,255,255,0.6);
    transform: translateX(-50%);
}

/* Rond central */
.field::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* --- 3. Positionnement (inchangÃ©) --- */
.field-team {
    display: flex;
    width: 50%;
    height: 100%;
    z-index: 10;
    position: relative;
}
.field-team.local { flex-direction: row; }
.field-team.visitor { flex-direction: row-reverse; }

.field-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    flex: 1;
    height: 100%;
}

/* --- 4. Le Joueur (Pastille) --- */
.field-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    text-align: center;
    z-index: 20;
    cursor: pointer;
    transition: transform 0.2s;
}
.field-player:hover { transform: scale(1.1); z-index: 30; }

.field-player .jersey {
    width: 28px; /* Un peu plus petit pour l'Ã©lÃ©gance */
    height: 28px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid rgba(0,0,0,0.1);
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 2px;
}

.field-player .name {
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: none;
}

/* --- 5. Listes des Compos (MÃªme taille & CÃ´te Ã  cÃ´te) --- */
.line-ups .players {
    display: flex;
    flex-direction: row; /* Force la ligne mÃªme sur mobile */
    align-items: stretch; /* Force la mÃªme hauteur */
    justify-content: space-between;
    width: 100%;
    gap: 20px; /* Espace entre les deux blocs */
    margin-top: 2rem;
}

.team-list {
    flex: 1; /* Chaque Ã©quipe prend 50% */
    display: flex;
    flex-direction: column;
    min-width: 0; /* CRUCIAL pour que l'ellipsis fonctionne dans un flex child */
}

/* Titre Ã©quipe */
.team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 10px;
    height: 40px; /* Hauteur fixe pour alignement parfait */
}

.team-header .team-name {
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-header .formation-badge {
    background-color: #111827;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
    flex-shrink: 0; /* EmpÃªche le badge de s'Ã©craser */
}

.sub-title {
    background-color: #f1f5f9;
    padding: 6px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #64748b;
    margin: 10px 0 5px 0;
    border-radius: 4px;
}

/* Ligne Joueur Liste */
.line-up-player {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    height: 36px; /* Hauteur fixe pour alignement parfait gauche/droite */
    box-sizing: border-box;
}

.line-up-player.reverse {
    flex-direction: row-reverse; /* Inversion pour l'Ã©quipe visiteuse */
    text-align: right;
}

.line-up-player .number {
    font-weight: 700;
    width: 24px;
    height: 24px;
    line-height: 24px; /* Centrage vertical */
    text-align: center;
    color: #475569;
    background-color: #f1f5f9;
    border-radius: 4px;
    font-size: 0.75rem;
    flex-shrink: 0; /* Le numÃ©ro ne rÃ©trÃ©cit pas */
}

/* Espacement NumÃ©ro / Nom */
.line-up-player:not(.reverse) .number { margin-right: 10px; }
.line-up-player.reverse .number { margin-left: 10px; }

.line-up-player .info {
    flex: 1; /* Prend toute la place restante */
    min-width: 0; /* CRUCIAL pour l'ellipsis */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.line-up-player .name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Les trois petits points si trop long */
    display: block;
}

.line-up-player .position {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1;
}
/* ==========================================================================
   NAVIGATION ONGLETS (Correction Scroll Mobile)
   ========================================================================== */

.match-titles {
    display: flex;
    flex-wrap: nowrap;           /* INTERDIT le passage à la ligne */
    overflow-x: auto;            /* Active le scroll horizontal */
	-webkit-overflow-scrolling: touch; /* Pour un scroll fluide sur mobile */
    white-space: nowrap;
	
    align-items: center;
    justify-content: flex-start; /* Toujours aligné à gauche pour le scroll */
 
    width: 100%;

    
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    
    /* Padding gauche pour décoller le premier élément */
    padding-left: 15px;
    box-sizing: border-box;
    
    /* Cache la scrollbar */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE/Edge */
}

/* Cache la scrollbar (Chrome/Safari) */
.match-titles::-webkit-scrollbar {
    display: none;
}

/* LES ONGLETS (Enfants) */
.match-titles div, 
.match-titles a {
    /* LA LIGNE MAGIQUE : */
    flex: 0 0 auto; /* 0 grow, 0 shrink, auto width */
    /* Cela oblige l'élément à garder sa largeur réelle et force le conteneur à scroller */

    text-align: center;
    padding: 15px 15px; /* Espace confortable autour du texte */
    margin-right: 5px;  /* Petit espace entre les onglets */
    
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

/* ÉLÉMENT FANTÔME (Pour créer l'espace à la fin du scroll) */
/* C'est la méthode la plus fiable sur mobile */
.match-titles::after {
    content: '';
    display: block;
    flex: 0 0 20px; /* Force un espace vide de 20px à la toute fin */
    height: 1px;
}

/* États Actifs / Survol */
.match-titles div.selected,
.match-titles a.selected {
    color: #2563eb;
    border-bottom-color: #2563eb;
}



/* ==========================================================================
   STYLE H2H (Head to Head)
   ========================================================================== */
.h2h-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.h2h-row {
    display: flex;
    flex-direction: column; /* Mobile first : Date au dessus, Match en dessous */
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.h2h-row:hover {
    background-color: #f9fafb;
}

.h2h-date {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 5px;
}

.h2h-date .league-label {
    font-weight: 600;
    color: #374151;
}

.h2h-match {
    display: flex;
    align-items: center;
    justify-content: center;
}

.h2h-match .team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.h2h-match .team.text-right {
    justify-content: flex-end;
}

.h2h-match .team.text-left {
    justify-content: flex-start;
}

.h2h-match .team img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.h2h-match .score-badge {
    background-color: #111827;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0 15px;
    white-space: nowrap;
}

/* ==========================================================================
   match-intro-text
   ========================================================================== */
/* Conteneur principal style "Carte" */
.match-intro-text {
    background-color: #ffffff; /* Fond blanc */
    border-radius: 12px;       /* Coins arrondis */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Ombre douce */
    border: 1px solid #f1f5f9; /* Bordure trÃ¨s lÃ©gÃ¨re */
    padding: 25px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #475569; /* Gris foncÃ© lisible (pas noir pur) */
    line-height: 1.6; /* Espacement entre les lignes */
    font-size: 0.95rem;
}

/* Espacement entre les paragraphes */
.match-intro-text p {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9; /* Ligne de sÃ©paration subtile */
}

/* Enlever la bordure du dernier paragraphe */
.match-intro-text p:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Mise en valeur du texte en gras (Ã‰quipes, Heures, TV) */
.match-intro-text strong {
    color: #1e293b; /* Noir presque pur pour le contraste */
    font-weight: 700;
}

/* Mise en valeur spÃ©cifique pour "Footlive" (Optionnel) */
.match-intro-text strong:first-child {
    color: #2563eb; /* Bleu sport */
}

/* Liens en bas de page */
.match-intro-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px dotted #2563eb;
}

.match-intro-text a:hover {
    color: #1d4ed8;
    border-bottom: 1px solid #1d4ed8;
}

/* ================================================================
		error-modal
==================================================================*/
.custom-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fond sombre transparent */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); /* Petit effet de flou moderne */
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

.modal-icon { font-size: 40px; margin-bottom: 10px; }
.modal-title { margin: 0 0 10px; color: #1e293b; font-size: 1.25rem; font-weight: bold; }
.modal-text { color: #64748b; margin-bottom: 20px; line-height: 1.5; }

.modal-btn {
    background: #2563eb; color: white; border: none;
    padding: 10px 20px; border-radius: 6px;
    font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.modal-btn:hover { background: #1d4ed8; }

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive : Ajustement pour mobile */
@media (max-width: 600px) {
    .match-intro-text {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   NAVIGATION ONGLETS (Correction Scroll Mobile)
   ========================================================================== */
/* Uniquement pour les écrans Desktop / Tablettes (plus de 768px de large) */

@media (min-width: 768px) {
    .match-titles {
       /* flex-wrap: wrap;         Autorise les menus à passer à la 2ème ligne */
      /* overflow-x: visible;     Désactive la barre de défilement horizontale */
      /*  justify-content: center;  Centre les onglets pour faire plus propre (Optionnel) */
    }
    
    .match-titles::after {
     /*   display: none;  Enlève l'espace vide à la fin quand ça passe à la ligne */
    }
}
/* Détecte si l'utilisateur utilise une souris ou un trackpad (ordinateur) */
@media (pointer: fine) {
    .match-titles {
        /* On réactive la barre de scroll, mais en format "fin" (pour Firefox) */
        scrollbar-width: thin; 
        scrollbar-color: #cbd5e1 transparent;
        padding-bottom: 6px; /* Petit espace pour que la barre ne touche pas le texte */
    }

    /* On recrée une jolie barre de scroll fine pour Chrome, Safari et Edge */
    .match-titles::-webkit-scrollbar {
        display: block !important; /* Force l'affichage */
        height: 6px; 
    }
    
    .match-titles::-webkit-scrollbar-track {
        background: transparent; 
    }
    
    .match-titles::-webkit-scrollbar-thumb {
        background-color: #cbd5e1; 
        border-radius: 10px;
    }
    
    .match-titles::-webkit-scrollbar-thumb:hover {
        background-color: #94a3b8; 
    }
}