:root {
  --shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

a {
  color: #000;
  text-decoration: none;
}

[x-cloak] {
  display: none !important;
}

html {
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
}

.left-sidebar {
  width: 170px;
  box-shadow: var(--shadow);
  border-radius: 6px;
  height: 100%;
}

.left-sidebar .title {
  height: 30px;
  line-height: 30px;
  background-color: #000;
  color: #FFF;
  border-radius: 6px 6px 0 0;
  padding: 0 0.5rem;
  font-weight: 500;
  font-size: 1rem;
}

.country-item {
  display: flex;
  align-items: center;
  height: 30px;
  line-height: 30px;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
  overflow: hidden;
  padding: 0 0.5rem;
}

.country-item img {
  margin-right: 0.5rem;
}

.country-item div {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.country-item:hover {
  color: #6b7280;
}

.right-sidebar {
  width: 310px;
  height: 600px;
  background-color: rgba(0, 0, 0, 0.06);
}

.content {
  width: 720px;
  padding: 0 1rem;
}

.container {
  margin: auto;
  padding: 0;
  width: 1200px;
  display: flex;
}

.container-header {
  margin: auto;
  padding: 0;
  width: 1200px;
}

.header {
  font-size: 1.3rem;
  padding: 0.8rem 0;
  font-weight: bold;
  background-color: #18181b;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.header svg {
  width: 1.5rem;
  color: #fff;
}

.header .tricolore span:first-child {
  color: #2563eb;
}

.header .tricolore span:nth-child(2) {
  color: #f8fafc;
}

.header .tricolore span:last-child {
  color: #dc2626;
}

.header .header-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.header .header-container a {
  color: #fff;
}

.menu-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.menu {
  margin-left: 2rem;
  display: flex;
  align-items: center;
}

.menu > div {
  margin-right: 1rem;
  position: relative;
}

.menu .main-menu {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.menu svg {
  width: 1rem;
}

.menu .sub-menu {
  width: 10rem;
  position: absolute;
  background-color: #fff;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  z-index: 20;
  border-radius: 6px;
  margin-top: 0.5rem;
  left: 50%;
  transform: translate(-50%);
}

.menu .sub-menu a {
  display: block;
  padding: 0.5rem;
  text-transform: none;
  color: #000;
  font-weight: normal;
  font-size: 0.9rem;
}

.menu .sub-menu a:hover {
  text-decoration: underline;
}

.footer {
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
  font-weight: bold;
  color: #fff;
  background-color: #18181b;
  margin-top: 1rem;
}

.footer a {
  color: #0ea5e9;
}

.default-msg {
  text-align: center;
  margin: 1rem 0;
}

.league-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.league-header .league-title {
  display: flex;
  align-items: center;
}

.league-header .league-title img {
  width: 2rem;
}

.league-header .league-title h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-left: 1rem;
}

.league-header .league-country {
  font-size: 1.1rem;
  font-weight: 500;
  margin-left: 3rem;
}

.league-tabs-container {
  width: 100%;
  overflow: scroll;
  white-space: nowrap;
}

.league-tabs-container .league-tabs {
  width: 1000px;
}

.league-tabs {
  display: flex;
  align-items: center;
}

.league-tabs > a {
  display: block;
  width: 25%;
  background-color: #f8fafc;
  text-align: center;
  padding: 0.8rem 0;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
}

.league-tabs.country-tabs {
  width: 100%;
}

.league-tabs.country-tabs > a {
  width: 50%;
}

.league-tabs.no-standings > a {
  width: 33.33333%;
}

.league-tabs > a.selected,
.league-tabs > a.selected:hover {
  background-color: #111827;
  color: #fff;
}

.league-tabs > a:hover {
  background-color: #f3f4f6;
}

.league-tabs > a:first-child {
  border-radius: 4px 0 0 4px;
}

.league-tabs > a:last-child {
  border-radius: 0 4px 4px 0;
}

table {
  margin-top: 1rem;
  font-size: 1rem;
  width: 100%;
  border-collapse: collapse;
  box-shadow: var(--shadow);
  border-radius: 5px;
}

table th {
  padding: 0.6rem;
  color: #000;
  background-color: #f8fafc;
  text-align: left;
}

table td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.6rem;
  border-top: 1px solid #e5e7eb!important;
  text-align: left;
}

.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

table .team-name-logo {
  display: flex;
  align-items: center;
}

table .team-name-logo img {
  margin-right: 0.5rem;
  width: 1.4rem;
}

.standings .form-container,
.standings thead .form {
  border-left: 1px solid #f4f4f5;
}

.standings .result td {
  border-top: 1px dashed #b2b3b4;
}

.standings .selected td {
  background-color: #bfdbfe;
}

.form {
  display: flex;
  align-items: center;
  justify-content: start;
}

.form div {
  color: #fff;
  font-size: 0.8rem;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
}
.form .win {
  background-color: #22c55e;
}

.form .lose {
  background-color: #ef4444;
}

.form .draw {
  background-color: #71717a;
}

.stage {
  font-size: 1.2rem;
  color: #111827;
  font-weight: bold;
  margin-top: 1rem;
}

.round {
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
}

.results {
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  width: 100%;
  border-collapse: collapse;
  box-shadow: var(--shadow);
  border-radius: 5px;
}

.results a {
  display: block;
}

.results .row {
  display: flex;
  align-items: center;
}

.results .row .td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.6rem;
  border-top: 1px solid #e5e7eb;
  text-align: left;
}

.results .row:first-child .td {
  border: none;
}

.results .row:first-child .td:first-child {
  border-radius: 5px 0px 0 0;
}

.results .row:first-child .td:last-child {
  border-radius: 0px 5px 0 0;
}

.results .row:last-child .td:first-child {
  border-radius: 0px 0px 5px 0;
}

.results .row:last-child .td:last-child {
  border-radius: 0px 0px 0px 5px;
}

.results .row:nth-child(odd) {
  background-color: #f8fafc;
}

.results .td:first-child {
  width: 30.333333%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results .td:nth-child(3) {
  width: 8.333333%;
}

.results .td:nth-child(3) {
  font-weight: bold;
}

.results .td:nth-child(2) {
  width: 19.666667%;
}

.results .td:last-child {
  width: 41.666667%;
}

.season {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

select {
  display: block;
  width: 200px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-print-color-adjust: exact;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-adjust: exact;
  outline: none;
}

select:focus {
  border-color: #9ca3af;
}

.select-label {
  display: block;
  width: 100%;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.page-404 h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: bold;
}

.page-404 div {
  font-size: 1.1rem;
  line-height: 1.5rem;
  margin-top: 1rem;
  text-align: center;
}

.page-404 div a {
  color: #0ea5e9;
}

.squad .name {
  display: flex;
  justify-content: start;
  align-items: center;
}

.squad .name img {
  height: 0.8rem;
  margin-right: 0.5rem;
}

.squad .position {
  font-weight: bold;
  font-size: 1rem;
}

.squad .player {
  padding-top: 1.3rem;
}

.transfers-table {
  margin-top: 0;
}

.transfers h2:first-child {
  margin-top: 1rem;
}

.transfers h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  margin-top: 3rem;
}

.transfers .subtitle {
  font-size: 1.2rem;
  color: #374151;
}

.player h1 {
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: bold;
}

.player .player-info,
.player .player-info .value {
  display: flex;
  align-items: center;
  justify-content: start;
}

.player .player-info {
  margin-bottom: 0.5rem;
}

.player .player-info .label {
  font-size: 0.9rem;
  color: #71717a;
}

.player .player-info .value {
  margin-left: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}

.player .nationality img {
  height: 1rem;
  margin-right: 0.5rem;
}

.player .team img {
  height: 1.5rem;
  margin-right: 0.5rem;
}

.player-stats-table .img {
  display: flex;
  justify-content: center;
}

.player-stats-table img {
  width: 1.3rem;
}

.player-stats-table {
  font-size: 0.8rem;
}

.player-stats-table tfoot td {
  background-color: #f9fafb;
  font-weight: bold;
}

.player-stats-table .text-center {
  font-weight: bold;
}

.player .stats-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.dates {
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  width: 80%;
  margin: 1rem auto;
}

.dates ul {
  overflow-y: scroll;
  list-style-type: none;
}

.dates li {
  display: table-cell;
  border-left: 1px solid #e5e7eb;
}

.dates li:last-child {
  border-right: 1px solid #e5e7eb;
}

.dates .month {
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  font-size: 1rem;
}

.dates .year {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.dates a {
  padding: 0.6rem 1.2rem;
  display: block;
}

.dates a:focus {
  outline: none;
}

.dates .current-date {
  background-color: #111827;
}

.dates .current-date a {
  color: #fff;
}

.dates .current-date a .year {
  color: #d3d3d3;
}

.dates .arrow {
  height: 55px;
  display: flex;
  align-items: center;
  background-color: #f8fafc;
  cursor: pointer;
}

.dates .arrow.disabled {
  cursor: default;
}

.dates .arrow.disabled svg {
  color: #e5e7eb;
}

.dates .arrow:hover.disabled {
  background-color: #f3f4f6;
}

.dates .arrow:hover {
  background-color: #f3f4f6;
}

.dates .arrow-left {
  border-radius: 4px 0px 0px 4px;
}

.dates .arrow-right {
  border-radius: 0px 4px 4px 0px;
}

.dates .arrow svg {
  color: #000;
  width: 2rem;
  height: 2rem;
  margin: 0 0.4rem;
  display: block;
}

.team .season {
  margin: 1rem 0;
}

.team .second-title {
  margin-top: 2rem;
}

.team-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.team-name {
  display: flex;
  align-items: center;
}

.team-name img {
  width: 3rem;
}

.team-name h1 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-left: 0.7rem;
}

.team-container .label {
  font-size: 0.9rem;
  color: #71717a;
}

.team-container .value {
  font-size: 1rem;
  font-weight: 600;
}

.match {
  font-size: 1rem;
}

.standing-titles {
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  text-transform: uppercase;
  justify-content: space-between;
  align-items: center;
}

.standing-titles div {
  width: 33.33333%;
  text-align: center;
  background-color: #f8fafc;
  padding: 0.6rem 0;
  font-weight: bold;
  cursor: pointer;
}


#commentary {
  width: 44%;
}

.h2h-stats-title {
  margin-top: 1rem;
  font-size: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.recent-form-title {
  text-align: center;
  font-size: 0.8rem;
  margin: 1rem 4rem;
  padding-bottom: 0.9rem;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}


.standing-titles div.selected,
.standing-titles div:hover.selected {
  background-color: #111827;
  color: #fff;
}

.standing-titles div:first-child {
  border-radius: 4px 0 0 4px;
}

.standing-titles div:last-child {
  border-radius: 0 4px 4px 0;
}


.standing-titles div:hover {
  background-color: #f1f5f9;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 1rem;
  font-family: sans-serif;
}

.stats-row div {
  z-index: 10;
  background-color: #fff;
}

.stats-row::before {
	content: "";
    position: absolute;
    top: 50%;         /* Centré verticalement */
    left: 0;
    background: #f1f5f9; /* Gris très très clair pour la ligne */
    width: 100%;
    height: 1px;
    z-index: 1;
}

.stats-row .team {
	font-weight: 600;    /* Semi-bold au lieu de Bold (trop gros) */
    font-size: 1rem;
    color: #475569;      /* Gris "Ardoise" (Slate 600) au lieu de Noir pur */
    background-color: #fff;
    z-index: 10;         /* Pour passer au dessus de la ligne */
    position: relative;
}

.stats-row .team:first-child {
  padding-right: 1rem;
}

.stats-row .team:last-child {
  padding-left: 1rem;
  text-align: right;
}

.stats-possession .label,
.stats-row .label {
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.75rem;   /* Un peu plus petit pour la hiérarchie */
    color: #94a3b8;       /* Gris clair (Slate 400) pour ne pas agresser l'oeil */
    background-color: #fff;
    z-index: 10;
    padding: 0 10px;      /* Un peu d'espace autour du texte */
    letter-spacing: 0.05em; /* Espacement des lettres pour la lisibilité */
}

.stats-possession {
    margin-bottom: 1.5rem;
}
/* 5. Barres de progression */
.stats-possession .bar {
    height: 6px;          /* Un tout petit peu plus épais */
    width: 100%;
    background-color: #f1f5f9; /* Gris très clair */
    border-radius: 10px;  /* Plus arrondi */
    overflow: hidden;     /* Pour couper les bords */
    margin: 0 15px;       /* Espace entre les chiffres et la barre */
}

.stats-possession .bar .chelsea {
    z-index: 10;
    height: 100%;
    background-color: #475569; /* Même gris que le texte pour la cohérence (ou ta couleur d'équipe) */
    border-radius: 10px;
}

.default-msg {
  text-align: center;
  color: #64748b;
}
/*
.line-ups .referee {
  text-align: center;
}

.line-ups .referee span,
.line-ups .formation span {
  font-weight: bold;
}

.line-ups .players {
  display: flex;
  align-items: start;
  justify-content: space-between;
  width: 100%;
}

.line-ups .players > div {
  width: 50%;
}

.line-ups .players > div:first-child {
  margin-right: 1rem;
}

.line-ups .players .visitorteam {
  text-align: right;
  margin-left: 1rem;
}

.line-ups .players .line-up-player .number,
.line-ups .players .line-up-player .position {
  color: #64748b;
  font-size: 0.8rem;
}

.line-ups .players .line-up-player .captain {
  font-size: 0.9rem;
  font-weight: bold;
  margin-left: 0.3rem;
}

.line-ups .players .line-up-player.reverse .captain {
  margin-left: 0;
  margin-right: 0.3rem;
}

.line-ups .players .line-up-player .name {
  margin: 0 0.3rem;
}

.line-ups .players .line-up-player {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
}

.line-ups .players .line-up-player.reverse {
  flex-direction: row-reverse;
}

.line-ups .players .sub-title {
  margin-top: 1.5rem;
  font-weight: bold;
  font-size: 1rem;
}
*/
.summary-container {
  display: flex;
  flex-direction: column-reverse;
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 4px;/* NOUVEAUX AJOUTS : */
  gap: 8px; 
  padding: 1rem 0; /* un peu de padding haut/bas */
  background-color: #fff;
}

/* ==========================================================================
   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;
}

/* 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 (Style Flashscore / L'Équipe)
   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: 48%; /* 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; /* Prend toute la place disponible dans la bulle */
}

/* Nom du joueur principal */
.event-player {
    font-weight: 700;
    font-size: 0.95rem;
    color: #000;
    line-height: 1.2;
}

/* 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;
}

/* --- 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;
}
.contact h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

.contact label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: #374151;
}

.contact input {
  margin-bottom: 2rem;
  width: 40%;
  height: 30px;
  padding: 1rem 0.3rem;
  border-radius: 6px;
  border: 1px solid rgb(206, 206, 206);
  outline-color: #000;
}

.contact button {
  padding: 0.5rem 5rem;
  cursor: pointer;
  background-color: #000;
  color: #fff;
  border-radius: 6px;
  border: 0;
  margin-bottom: 2rem;
}

.contact .error {
  color: red;
  margin-bottom: 2rem;
}

.contact .success {
  color: green;
}

.contact a {
  color: #0ea5e9;
}

.calendar {
  margin-top: 1rem;
}

.no-border-top > a:first-child > div {
  border-top: none!important;
}

.minute {
  text-align: center;
}

.start-at {
  font-size: 0.9rem;
}

.sub-detail {
  text-align: center;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #696969;
}

.calendar-match {
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 5px;
  margin-top: 0.2rem;
}

.calendar-match .table {
  font-size: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.calendar-match .table > div {
  display: flex;
  align-items: stretch;
}

.calendar-match .caption {
  text-align: left;
  font-size: 0.8rem;
  padding: 0.6rem;
  color: #000;
  background-color: #f9fafb;
  border-radius: 5px;
}

.calendar-match .table .td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.6rem;
  border-top: 1px solid #e5e7eb;
}

.calendar-match-date {
  width: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-match-date.hide-star {
  width: 15%;
}

.calendar-match-teams .score {
  font-weight: 500;
}

.calendar-match-teams {
  width: 80%;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.calendar-match-teams.hide-star {
  width: 85%;
}

.calendar-match-teams .team {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-match-teams .team:first-child {
  margin-bottom: 0.7rem;
}

.calendar-match-stars {
  padding: 0.6rem 0.6rem 0.6rem 0.2rem!important;
}

.calendar-match-h2h {
  padding: 0.6rem 0.2rem 0.6rem 0.6rem!important;
}

.calendar-match-stars, .calendar-match-h2h {
  width: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-match-score {
  width: 8.333333%;
}

.calendar-match-score .score {
  text-align: center;
  padding: 0.2rem 0.5rem;
  background-color: #f9fafb;
  border-radius: 100px;
  font-weight: bold;
}

.calendar-match-score .score .smaller {
  font-size: 0.75rem;
}

.calendar-match-score .score span {
  font-size: 0.9rem;
}

.calendar-match .fulltime {
  font-size: 0.6rem;
  margin-top: 0.5rem;
  text-align: center;
}

.calendar-match .penalty {
  color: #696969;
}

.calendar-match .localteam-logo {
  justify-content: end;
}

.calendar-match .visitorteam-logo {
  justify-content: start;
}

.calendar-match .visitorteam-logo,
.calendar-match .localteam-logo {
  display: flex;
  align-items: center;
}

.calendar-match .localteam-logo img {
  margin-right: 0.5rem;
}

.calendar-match .visitorteam-logo img {
  margin-left: 0.5rem;
}

.calendar-match img {
  width: 1.25rem;
}

.livescores h1 {
  font-weight: bold;
  font-size: 1.3rem;
}

.livescores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.livescores-header .expand-all {
  display: flex;
  align-items: center;
  color: #656565;
  background: #F4F4F4;
  border: 1px solid #E9E8E8;
  border-radius: 20px;
  padding: 4px 8px;
  cursor: pointer;
}

.livescores-header .expand-all.rotate-svg svg {
  transform: rotate(180deg) !important;
}

.livescores-header .expand-all svg {
  width: 1.1rem;
  margin-left: 0.5rem;
}

.match-live-minute {
  color: #ef4444;
  font-weight: 500;
}

.stars svg {
  width: 1.4rem;
  color: #737373;
}

.stars.full svg {
  color: #fde047;
}

.blink {
  animation: blinker 1s linear infinite;
}

.livescore-table-header {
  display: flex;
  justify-content: space-between;
}

.caption .right-side {
  display: flex;
  justify-content: space-between;
  text-transform: none;
  align-items: center;
}

.caption .right-side .link-standing {
  text-decoration: underline;
  color: #000;
}

.caption .right-side .link-display-matches {
  color: #7e7e7e;
}

.caption .expand.rotate-svg svg {
  transform: rotate(180deg) !important;
  color: #000 !important;
}

.caption .expand {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.rotate {
  transform: rotate(0deg);
}

.caption .expand svg {
  width: 1.1rem;
  margin-left: 0.3rem;
  color: #7e7e7e !important;
}

.livescores-table-header-league {
  display: flex;
  align-items: center;
}

.livescores-table-header-league img {
  margin-right: 0.5rem;
}

.livescores-table-header-league > div {
  display: flex;
  align-items: center;
}

.livescores-table-header-league > div > div {
  margin-right: 0.4rem;
}

.livescores-table-header-league .league-name {
  font-weight: bold;
}

@keyframes blinker {
  60% {
    opacity: 0;
  }
}

.apostrophe {
  font-weight: bold;
}

.league-breadcrumb {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.hide {
  display: none;
}

.form-update-leagues {
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.form-update-leagues .buttons {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  cursor: pointer;
}

.form-update-leagues .buttons input {
  background-color: #16a34a;
  border: none;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.8rem;
}

.update-leagues-button {
  cursor: pointer;
  margin-bottom: 1rem;
  display: inline-block;
  box-shadow: 0 0 transparent, 0 0 transparent, 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.update-leagues-button:hover {
  background-color: #f9fafb;
}

.form-update-leagues .buttons .check-all {
  margin: 0 2rem;
  background-color: #dcfce7;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
}

.form-update-leagues .buttons .check-all:hover {
  background-color: #bbf7d0;
}

.form-update-leagues .buttons .check-none {
  background-color: #fee2e2;
  font-size: 0.8rem;
  border-radius: 6px;
  padding: 0.5rem 1rem;
}

.form-update-leagues .buttons .check-none:hover {
  background-color: #fecaca;
}

.update-leagues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 1rem;
  justify-content: space-between;
}

.update-leagues label {
  font-weight: 500;
  font-size: 0.9rem;
}

.scroll-to-top-btn {
  position: fixed;
  z-index: 30;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: rgb(51, 51, 51);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  opacity: 1;
}

.scroll-to-top-btn:hover {
  background-color: rgba(51, 51, 51, 0.67);
}

.scroll-to-top-btn.hide {
  opacity: 0;
  cursor: default;
}

.scroll-to-top-btn svg {
  width: 2rem;
}

.all-star {
  width: 1.1rem;
  margin-right: 0.4rem;
  cursor: pointer;
}

.leagues h1 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

.leagues h1 img {
  margin-right: 0.5rem;
}

.h2h-stats-summary td,
.h2h-stats-summary th {
  text-align: center;
}

.h2h-table-title {
  margin-top: 1.5rem;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.h2h-table-container, .transfers-table-container {
  display: block;
  overflow-x: auto;
  box-shadow: var(--shadow);
  border-radius: 5px;
  margin-top: 1rem;
}

.h2h-table-container table {
  margin-top: 0;
}

.results-calendar-container {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.results-calendar {
  margin: 0 0.5rem;
}

.results-calendar-container a {
  color: #656565;
  background: #F4F4F4;
  border: 1px solid #E9E8E8;
  border-radius: 20px;
  padding: 4px 4px;
}

.results-calendar-container svg {
  width: 1.2rem;
}

.search {
  position: relative;
}

.search input {
  width: 200px;
  outline: none;
  padding: 0.3rem;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
}

.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.search-result-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 600px;
  height: 80vh;
  top: 2rem;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem;
  overflow: hidden;
}

.search-result-container input {
  margin-top: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  outline: none;
  padding: 0.5rem;
  font-size: 1.2rem;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.search-result-container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-container-header h2 {
  font-size: 2rem;
  font-weight: 600;
}

.search-result-container-header .close {
  cursor: pointer;
  width: 50px;
}

.search-result-container ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.search-result-container ul li {
  display: block;
  padding: 0.5rem 1rem;
  border: 2px solid #000;
  border-radius: 1000px;
  cursor: pointer;
}

.search-result-container ul li.active {
  background-color: #000;
  color: #fff;
}

.search-result-container-rows {
  overflow-y: scroll;
}

.search-result-container-rows h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 0;
}

.search-result-container-rows a {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.search-result-container-rows .item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-container-rows .item img {
  width: 1.5rem;
}

.header .search-result-container a {
  display: block;
  width: 200px;
  color: #000;
  font-weight: normal;
  font-size: 1rem;
  text-transform: capitalize;
  padding: 0.6rem;
}

.header .search-result-container a:hover {
  color: #696969;
}

.league-summary .stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.league-summary .stage a {
  text-decoration: underline;
  font-size: 1rem;
}

.footer-matches-container {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.footer-matches {
  width: 49%;
  padding: 1rem;
  box-shadow: var(--shadow);
  border-radius: 6px;
}

.footer-matches h3 {
  margin-bottom: 0.5rem;
}

.footer-matches a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  border-top: 1px solid #eee;
}

.footer-matches .team {
  width: 40%;
}

.footer-matches .visitorteam {
  text-align: right;
}

.footer-matches .versus {
  width: 10%;
}

.var {
  font-size: 0.85rem;
  font-weight: normal;
  margin-right: 1rem;
  color: red;
}

.only_desktop_inline {
  display: inline;
}

#menu-mobile, #menu-closer, .commentary, .stats, .line-ups, .tv-stations {
  display: none;
}

.form-admin {
  width: 100%;
}

.form-admin input {
  width: 100%;
}

.form-admin input[type="file"] {
  padding: 0;
}

.form-admin img {
  margin-bottom: 2rem;
}

.form-admin button {
  margin-top : 2rem;
  width: 100%;
}

.article h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.article img {
  width: 100%;
  margin-bottom: 0.5rem;
}

.article .info {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 1rem;
}

.article .text {
  font-size: 17px;
  line-height: 28px;
}

/* ==========================================================================
   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 (Style Moderne / Souligné)
   ========================================================================== */

.match-titles {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligné à gauche, plus naturel */
    gap: 20px; /* Espace entre les onglets */
    
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0; /* Ligne de séparation fine en bas */
    margin-bottom: 20px; /* Espace avant le contenu */
    padding: 0 10px;
    
    /* Gestion du scroll sur mobile */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    
    /* Enlève les anciennes ombres/radius */
    box-shadow: none;
    border-radius: 0;
}

/* Cache la barre de scroll disgracieuse sur Chrome/Safari */
.match-titles::-webkit-scrollbar {
    display: none;
}

/* Styles des liens (Onglets) */
.match-titles div,
.match-titles a {
    width: auto; /* On laisse la largeur s'adapter au texte */
    text-align: center;
    background-color: transparent !important; /* Force la transparence */
    padding: 15px 5px !important; /* Espacement vertical confortable */
    
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b; /* Gris pour inactif */
    cursor: pointer;
    
    border-bottom: 3px solid transparent; /* Prépare la bordure active */
    border-radius: 0 !important; /* Carré */
    transition: all 0.2s ease;
    
    flex-shrink: 0; /* Empêche l'écrasement sur mobile */
}

/* État Survol */
.match-titles div:hover,
.match-titles a:hover {
    color: #1e293b; /* Devient plus foncé */
    background-color: transparent !important;
}

/* État Sélectionné (Active) */
.match-titles div.selected,
.match-titles a.selected {
    color: #2563eb; /* Bleu dynamique (ou #1e293b pour noir) */
    background-color: transparent !important;
    border-bottom-color: #2563eb; /* La ligne de couleur en dessous */
}


/* ==========================================================================
   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;
}
/* Responsive design */

/* sm */
@media (max-width: 890px) {
  .only_mobile {
    display: block;
  }

  .only_desktop,
  .only_desktop_table,
  .only_desktop_flex,
  .only_desktop_inline {
    display: none;
  }

  .header .header-container {
    justify-content: space-between;
  }

  .league-header > div > h1 {
    font-size: 1.2rem;
    margin-left: 0.5rem;
  }

  .league-header > div > img {
    width: 1.4rem;
  }

  select {
    width: 150px;
  }

  .season {
    margin-left: 1rem;
  }

  .league-tabs {
    overflow: scroll;
  }

  .league-tabs > a, .standing-titles div {
    font-size: 0.75rem;
  }

  .team .league-tabs > a {
    display: block;
    min-width: 90px;
  }

  .stage {
    font-size: 1rem;
  }

  table {
    font-size: 0.8rem;
    width: 100%;
    overflow: hidden;
  }

  .table {
    width: 100%;
    overflow-x: scroll;
  }

  .content, .container, .container-header {
    width: 100%;
  }

  .header {
    padding: 0.8rem;
  }

  table .team-name-logo img {
    width: 1.2rem;
  }

  .results .td:nth-child(3) {
    width: 16.666667%;
  }

  .round {
    font-size: 0.9rem;
  }

  .results .td:first-child {
    font-size: 0.6rem;
  }

  .menu {
    margin: 0;
  }

  .menu .main-menu {
    display: flex;
    justify-content: space-between;
    background-color: #1e293b;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
  }

  .menu .sub-menu {
    width: 100%;
  }

  .menu > div {
    margin-top: 1rem;
    margin-right: 0;
  }

  .menu > div:last-child {
    margin-bottom: 0.3rem;
  }

  .footer {
    font-size: 0.7rem;
  }

  .calendar-match-date {
    width: 20%;
  }

  .calendar-match-teams {
    width: 60%;
  }

  .calendar-match-h2h, .calendar-match-stars {
    width: 10%;
  }

  .calendar-match-date.hide-star {
    width: 20%;
  }

  .calendar-match-score {
    width: 16.666667%;
    padding: 0.6rem 0!important;
    font-size: 0.9rem;
  }

  .calendar-match-team .smaller {
    font-size: 0.9rem;
  }

  .match-live-minute {
    margin-top: 0.2rem;
  }

  .results .td:nth-child(2),
  .results .td:last-child {
    width: 41.666667%;
  }

  .livescores-table-header-league > div {
    flex-direction: column;
    align-items: flex-start;
  }

  .sub-detail {
    font-size: 0.7rem;
  }

  .team-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .search input {
    width: 100%;
    padding: 0.6rem 0.4rem;
  }

  .header .search-result-container {
    top: 2.5rem;
    z-index: 10;
    width: 100%;
  }

  .header .search-result-container a {
    width: 100%;
  }
}


/* md */
@media (min-width: 891px) {
  .only_mobile {
    display: none;
  }

  .only_desktop {
    display: block;
  }

  .only_desktop_table {
    display: table-cell;
  }

  .only_desktop_flex {
    display: flex;
  }
}


/* ==========================================================================
   AJUSTEMENTS MOBILE (A ajouter à la fin pour écraser les précédents)
   ========================================================================== */
@media (max-width: 890px) {
    .match-center-column {
        margin: 0 5px;
        min-width: 90px;
    }
    
    .status-text {
        font-size: 0.75rem;
    }

    /* Ajustement Events Mobile (Sécurité supplémentaire) */
    .event-box {
        max-width: 90%; /* Un peu plus large sur mobile */
    }
    
    /* On réduit un peu la taille de la police des joueurs sur mobile */
    .event-player {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   RESPONSIVE (Mobile)
   ========================================================================== */
@media (max-width: 600px) {
    /* Sur mobile, on laisse les bulles prendre plus de place (85% de la largeur) */
    .event-box {
        max-width: 85%;
        min-width: auto; /* On enlève la limite mini */
        padding: 6px 10px;
    }
    
    .event-player {
        font-size: 0.9rem;
    }
    
    .event-minute {
        font-size: 0.8rem;
        min-width: 25px;
    }
}
/* ==========================================================================
   DESIGN COMMENTAIRES (Timeline 2 colonnes)
   ========================================================================== */
/* --- RESPONSIVE MOBILE --- */
@media (max-width: 600px) {
    .comment-row {
        padding: 12px 10px;
    }
    
    .comment-row::before {
        left: 35px; /* Ajustement ligne mobile */
    }

    .comment-minute {
        width: 40px;
        margin-right: 15px;
        font-size: 0.75rem;
        padding: 0;
    }
    
    .comment-content {
        font-size: 0.9rem;
    }
}
/* ==========================================================================
   ALIGNEMENT BUTEURS ET PASSEURS (Desktop & Mobile)
   ========================================================================== */
/* 4. Ajustement Mobile pour éviter que les longs noms se chevauchent */
@media (max-width: 450px) {
    .match-goals {
        font-size: 0.8rem; /* Un peu plus petit sur mobile */
    }
    
    #localteam-goals, #localteam-assists {
        padding-right: 5px;
    }
    
    #visitorteam-goals, #visitorteam-assists {
        padding-left: 5px;
    }
}

/* ==========================================================================
   DESIGN COMPOS & TERRAIN
   ========================================================================== */
   /* Responsive Mobile */
@media (max-width: 768px) {
    .field {
        transform: scale(0.65); /* Terrain plus petit */
        transform-origin: top center;
        margin-bottom: -130px; /* Compenser le vide créé par le scale */
    }
    
    .line-ups .players {
        gap: 10px; /* Espace réduit entre les colonnes */
        margin-top: 1rem;
    }
    
    .team-header .team-name {
        font-size: 0.85rem; /* Nom équipe plus petit */
    }
    
    .line-up-player .name {
        font-size: 0.8rem; /* Nom joueur plus petit */
    }
    
    .line-up-player .number {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 0.7rem;
    }
    
    /* Sur mobile, on garde le sens normal pour la lecture visiteur aussi, 
       ou on garde l'effet miroir. L'utilisateur a demandé "Même taille", 
       donc l'effet miroir (row-reverse) est souvent plus joli visuellement 
       pour séparer les deux blocs. Je le garde tel quel. */
}

/* ==========================================================================
   NAVIGATION ONGLETS (Style Moderne / Souligné)
   ========================================================================== */

/* Ajustement spécifique pour les écrans larges si tu veux centrer */
@media (min-width: 768px) {
    .match-titles {
        justify-content: center; /* Centre les onglets sur PC */
    }
}
/* ==========================================================================
   STYLE H2H (Head to Head)
   ========================================================================== */

@media (min-width: 768px) {
    .h2h-row {
        flex-direction: row; /* Tout sur une ligne */
        align-items: center;
    }

    .h2h-date {
        flex-direction: column;
        justify-content: center;
        width: 120px;
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 0;
        border-right: 1px solid #f3f4f6;
        margin-right: 15px;
        text-align: center;
    }

    .h2h-match {
        flex: 1;
    }
}




/* ==========================================================================
   HEADER STYLE SOFASCORE (Score Haut / Infos Bas)
   ========================================================================== */
   
@media (max-width: 640px) {
    .team-block img { width: 50px; height: 50px; }
    .team-block .team-name { font-size: 0.85rem; }
    .score-display { font-size: 2rem; }
    
    .match-info-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 10px;
    }
    
    .scorers-column.home { padding-right: 10px; }
    .scorers-column.away { padding-left: 10px; }
}