/* HB Metrics — pages de statistiques publiques
   En-tete aux couleurs de la charte, contenu sur fond clair pour la lecture des tables. */

:root {
  --petrol: #044E69;
  --petrol-dark: #002C40;
  --petrol-700: #013A53;
  --petrol-500: #006B96;
  --gold: #EFB702;
  --gold-ink: #8A6A00;
  --silver: #A8A7AC;
  --bronze: #C86A2A;
  --red: #C01818;

  --bg: #F3F6F8;
  --surface: #FFFFFF;
  --ink: #0C2733;
  --muted: #5B7380;
  --line: #E1E8EC;
  --row-hover: #F1F7FA;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 12px;
  --max: 1600px;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/assets/fonts/barlow-semicondensed-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/assets/fonts/barlow-semicondensed-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

/* Place de la barre de defilement toujours reservee : la largeur utile (et donc les marges)
   ne change pas entre une page courte (accueil) et une page longue */
html { scrollbar-gutter: stable; }
html:has(.hero-home) { background: #011E2C; }   /* accueil : la bande reservee prend le fond sombre */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

a { color: var(--petrol-500); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 2.5vw, 40px); }


/* En-tete */

.top { background: var(--petrol-dark); color: #E2E8F0; position: sticky; top: 0; z-index: 20; }

.top-row { display: flex; align-items: center; gap: 28px; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; font-family: "Barlow Semi Condensed", var(--font); }
.wm-name { color: var(--gold); font-weight: 700; font-size: 28px; letter-spacing: .04em; }
.wm-tag { margin-top: 4px; color: #FFF; font-weight: 500; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; }

.search { position: relative; flex: 1; min-width: 0; max-width: 520px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: #9FB8C4; stroke-width: 2; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 38px;
  border: 1px solid #0F4E6B; border-radius: 999px;
  background: var(--petrol-700); color: #FFF; font: inherit;
}
.search input::placeholder { color: #9FB8C4; }
.search input:focus { outline: none; border-color: var(--gold); }

.results {
  position: absolute; left: 0; right: 0; top: 44px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); color: var(--ink); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 20, 30, .25); max-height: 360px; overflow-y: auto;
}
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; color: var(--ink); }
.results a:hover, .results a.on { background: var(--row-hover); text-decoration: none; }
.results small { color: var(--muted); }

.pro-link {
  margin-left: auto; padding: 7px 14px; border: 1.5px solid var(--gold); border-radius: 8px;
  color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.pro-link:hover { background: rgba(239, 183, 2, .12); text-decoration: none; }

.leagues { background: var(--petrol); font-size: 13px; }
.leagues-row { display: flex; align-items: center; gap: 14px; height: 36px; overflow-x: auto; scrollbar-width: none; }
.leagues-label { color: #CBDDE6; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
/* Bouton Index a la place du mot Ligues (Cyp, 22/10) : renvoie aux pages d'index (Ligue en premier) */
.idx-btn {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid #2B6A86; border-radius: 6px;
  color: #FFF; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.idx-btn:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.league {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px 0 4px;
  border-radius: 999px; color: #E2E8F0; font-weight: 600; white-space: nowrap;
}
.league img { width: 22px; height: 22px; }
.league:hover { background: var(--petrol-dark); text-decoration: none; }
.league[aria-current] { background: var(--gold); color: var(--petrol-dark); }
.leagues-soon { color: #A9C4D0; font-style: italic; white-space: nowrap; }
/* Choix de la langue (Cyp, 04/11) : les deux drapeaux au bout du bandeau des ligues, la langue affichee entouree d'or */
.lang-pick { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
.lang-pick a, .lang-pick span { display: flex; padding: 2px; border-radius: 4px; border: 2px solid transparent; }
.lang-pick img { display: block; width: 24px; height: 18px; border-radius: 2px; object-fit: cover; }
.lang-pick a { opacity: .7; }
.lang-pick a:hover { opacity: 1; border-color: rgba(239, 183, 2, .5); }
.lang-pick .lang-on { border-color: var(--gold); }
.season { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #CBDDE6; white-space: nowrap; }
.season select {
  height: 26px; padding: 0 28px 0 10px; border: 1px solid #0B3F55; border-radius: 6px;
  background: var(--petrol-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23EFB702' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #FFF; font: inherit; font-weight: 600; appearance: none; cursor: pointer;
}
.season select:hover, .season select:focus { border-color: var(--gold); outline: none; }

.tabs { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 12px; color: #CBDDE6; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: #FFF; text-decoration: none; }
.tabs a[aria-current="page"] { color: #FFF; border-bottom-color: var(--gold); }
.comp {
  display: flex; align-items: center; gap: 8px; margin-right: 10px; padding: 4px 12px 4px 6px;
  background: var(--petrol-700); border-radius: 999px; color: #FFF; font-weight: 700; font-size: 13px; white-space: nowrap;
}
.comp img { background: #FFF; border-radius: 50%; padding: 2px; }


/* Titres de page */

.intro, .page-h { padding: 32px 0 20px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; color: var(--petrol-500); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 6px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.01em; }
h1 sup, h2 sup { font-size: .55em; }
.lede { margin: 0; color: var(--muted); }

.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick a {
  padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-weight: 600; font-size: 14px;
}
.quick a:hover { border-color: var(--petrol-500); text-decoration: none; }


/* Panneaux */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.panel-h h2 { margin: 0; font-size: 18px; }
.panel-h a { font-size: 14px; font-weight: 600; }

.home-grid { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; gap: 20px; align-items: start; }
.home-grid .panel { margin-bottom: 0; min-width: 0; }
.home-grid + .panel { margin-top: 20px; }

.legend { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: -8px; }
.lg.z-top { background: var(--gold); }
.lg.z-po { background: #B9BCC2; }
.lg.z-low { background: var(--red); }


/* Tables */

.tbl-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: collapse; white-space: nowrap; }
.tbl th {
  position: sticky; top: 0; background: var(--surface); text-align: left; padding: 8px 10px;
  border-bottom: 2px solid var(--ink); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.tbl th.abr { text-transform: none; }  /* AExt, TCExt, FaS : casse de l'abreviation conservee */
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl .num { text-align: right; }
/* En-tetes des colonnes de chiffres a droite, alignes sur les valeurs (Cyp, 21/10 ; centres depuis le 16/10) ;
   la fleche de tri, en position absolue, ne decale pas l'en-tete */
.tbl th.num { text-align: right; }
.tbl .strong { font-weight: 800; }
.tbl .rk { width: 36px; text-align: center; color: var(--muted); font-weight: 700; }
.tbl.compact td { padding: 6px 8px; }

.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[data-sort]:hover { color: var(--ink); }
.sortable th[aria-sort] { color: var(--ink); }
.sortable th[aria-sort="descending"]::after { content: "↓"; position: absolute; margin-left: 3px; }
.sortable th[aria-sort="ascending"]::after { content: "↑"; position: absolute; margin-left: 3px; }
.sortable td.sorted { font-weight: 700; background: #FAFCFD; }

.tbl tr.z-top td.rk { box-shadow: inset 4px 0 var(--gold); color: var(--ink); }
.tbl tr.z-po td.rk { box-shadow: inset 4px 0 #B9BCC2; color: var(--ink); }
.tbl tr.z-low td.rk { box-shadow: inset 4px 0 var(--red); }
/* Classement : numero de place en noir sur toutes les lignes, zone ou non (Cyp, 15/10) */
.tbl:not(.ranked) td.rk { color: var(--ink); }

/* Trois premiers de la colonne triee, comme l'app (16/10) : fond du rang ; nom, poste et club en couleur.
   Teintes de texte assombries pour le fond blanc (or et argent de l'app illisibles sur blanc). */
.ranked tr.m1 td.rk { background: var(--gold); color: var(--petrol-dark); }
.ranked tr.m2 td.rk { background: #D9D9DC; color: var(--petrol-dark); }
.ranked tr.m3 td.rk { background: var(--bronze); color: #FFF; }
.ranked tr.m1 .pn, .ranked tr.m1 td.id, .ranked tr.m1 td.id a span { color: var(--gold-ink); font-weight: 700; }
.ranked tr.m2 .pn, .ranked tr.m2 td.id, .ranked tr.m2 td.id a span { color: #6E6E76; font-weight: 700; }
.ranked tr.m3 .pn, .ranked tr.m3 td.id, .ranked tr.m3 td.id a span { color: #A8521C; font-weight: 700; }
/* Colonnes communes des classements de saison a largeur fixe : seules les colonnes de stats changent d'une vue a l'autre */
.tbl-wrap.tall th.rk { width: 52px; min-width: 52px; }
.tbl-wrap.tall th[data-key="player"] { width: 240px; min-width: 240px; }
.tbl-wrap.tall th[data-key="team"] { width: 200px; min-width: 200px; }
.tbl-wrap.tall th[data-key="position"] { width: 64px; min-width: 64px; }
.tbl-wrap.tall th[data-key="matches_played"] { width: 52px; min-width: 52px; }
/* Fiches joueurs (21/10) : meme principe pour Saison par saison et Match par match ; sous 600 px, largeurs libres */
@media (min-width: 600px) {
  .fiche th.c-saison { width: 80px; min-width: 80px; }
  .fiche th.c-ligue { width: 90px; min-width: 90px; }
  .fiche th.c-equipe { width: 190px; min-width: 190px; }
  .fiche th.c-mj, .fiche th.c-j { width: 44px; min-width: 44px; }
  .fiche th.c-date { width: 112px; min-width: 112px; }
  .fiche th.c-ha { width: 48px; min-width: 48px; }
  .fiche th.c-opp { width: 190px; min-width: 190px; }
  .fiche th.c-score { width: 96px; min-width: 96px; }
  .fiche th.c-res { width: 56px; min-width: 56px; }
}

.team { display: inline-flex; align-items: center; gap: 8px; }
.club-logo { object-fit: contain; flex: none; }
.pn { font-weight: 600; }

@media (max-width: 760px) {
  .tbl .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 var(--line); }
  .tbl th.sticky { z-index: 2; }
}

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.filters input, .filters select {
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit;
}
.filters input { min-width: 220px; }
.count { color: var(--muted); font-size: 13px; margin-left: auto; }
.flt-minbox { display: inline-flex; align-items: center; }
.flt-minadd { padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.flt-minadd:hover { border-color: var(--gold, #EFB702); color: var(--ink); }
.flt-min { display: inline-flex; border: 1px solid var(--gold, #EFB702); border-radius: 999px; background: #FFF8E1; overflow: hidden; }
.flt-min[hidden], .flt-minform[hidden], .flt-minadd[hidden] { display: none; }
.flt-min button { padding: 6px 8px 6px 12px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.flt-min .flt-min-x { padding: 6px 12px 6px 6px; }
.flt-min button:hover { background: #FDEBB0; }
.flt-minform { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filters .flt-minform select { max-width: 220px; }
.filters .flt-minform input { width: 80px; min-width: 0; flex: none; }
.flt-minform button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.flt-minform button[type=submit] { border-color: var(--petrol-500, #013A53); background: var(--petrol-500, #013A53); color: #fff; }
/* Classements de saison : vues de colonnes (16/10), glossaire */
.tbl .grp { display: none; }
.tbl[data-view="gen"] .g-gen, .tbl[data-view="tot"] .g-tot, .tbl[data-view="pm"] .g-pm, .tbl[data-view="jeu"] .g-jeu,
.tbl[data-view="disc"] .g-disc, .tbl[data-view="typ"] .g-typ { display: table-cell; }
.views { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.views button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border: 0; background: var(--surface); color: var(--petrol); cursor: pointer; }
.views button + button { border-left: 1px solid var(--line); }
.views button[aria-pressed="true"] { background: var(--petrol); color: #FFF; }
/* Table longue : defilement dans son cadre, la barre horizontale reste a l'ecran */
.tbl-wrap.tall { max-height: calc(100vh - 150px); overflow: auto; }
.tbl-wrap.tall th { z-index: 3; }
.tbl-wrap.tall th.sticky { z-index: 4; }
.abrev-btn { font: inherit; font-size: 13px; font-weight: 600; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--petrol); cursor: pointer; }
.abrev-btn:hover { border-color: var(--petrol); }
.gloss { width: min(460px, calc(100vw - 32px)); max-height: 75vh; overflow: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.25); font-size: 13.5px; }
.gloss::backdrop { background: rgba(10, 30, 40, .35); }
.gloss-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gloss-h strong { font-size: 15px; }
.gloss-h button { font: inherit; font-size: 22px; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.gloss dl { margin: 0; }
.gloss dl > div { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); }
.gloss dt { font-weight: 700; }
.gloss dd { margin: 0; color: var(--muted); }
.gloss .grp { display: none; }
.panel:has(.tbl[data-view="gen"]) .gloss .g-gen, .panel:has(.tbl[data-view="jeu"]) .gloss .g-jeu,
.panel:has(.tbl[data-view="disc"]) .gloss .g-disc, .panel:has(.tbl[data-view="typ"]) .gloss .g-typ { display: grid; }
.views { flex-wrap: wrap; }
@media (max-width: 600px) {
  .views { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); width: 100%; }
  .views button + button { border-left: 0; }
}
/* Accueil de la ligue */
.league-h { display: flex; align-items: center; gap: 18px; }
.league-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 860px) { .league-grid { grid-template-columns: 1fr; } }
.league-grid .panel { margin: 0; }
.season-cards { display: grid; gap: 14px; }
.season-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.season-card.current { border-color: var(--petrol); }
.season-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.season-card h3 { margin: 0; font-size: 18px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--petrol); color: #FFF; }
.sc-line { margin: 6px 0; display: block; }
.sc-line .team { display: inline-flex; vertical-align: middle; }
.sc-line.muted { color: var(--muted); font-size: 14px; }
.sc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sc-links a { font-size: 13px; font-weight: 600; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--petrol); text-decoration: none; }
.sc-links a:hover { border-color: var(--petrol); }
.lg-format { list-style: none; margin: 0; padding: 0; }
.lg-format li { padding: 10px 0; border-top: 1px solid var(--line); }
.lg-format li:first-child { border-top: 0; }


/* Leaders */

/* Leaders : 3 x 3 (tir, 7 m, gardien et defense), une colonne quand le panneau est etroit */
.leaders-panel { container-type: inline-size; display: flex; flex-direction: column; }
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; flex: 1; }
/* Deux colonnes : le bloc leaders prend la hauteur du classement, les trois rangees se la partagent a parts egales
   et les lignes de chaque carte se repartissent dans leur encadre (15/10) */
@media (min-width: 1400px) { .home-grid { align-items: stretch; } }
.leaders .leader ol { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
@container (max-width: 680px) { .leaders { grid-template-columns: 1fr; } }
.leaders .leader header { flex-wrap: wrap; gap: 2px 8px; }
.leaders .leader li { gap: 8px; }
.leaders .who .pn { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.leaders .leader li:first-child .pn { font-size: 14px; }
.card.leader { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; }
.leader header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.leader h3 { margin: 0; font-size: 15px; }
.leader .sub { color: var(--muted); font-size: 12px; }
.leader ol { list-style: none; margin: 0 0 8px; padding: 0; }
.leader li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.leader li:last-child { border-bottom: 0; }
.leader li:first-child .pn { font-size: 15px; }
.pos {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--muted); background: var(--bg);
}
.pos.m-gold { background: var(--gold); color: var(--petrol-dark); }
.pos.m-silver { background: #D9D9DC; color: var(--petrol-dark); }
.pos.m-bronze { background: var(--bronze); color: #FFF; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.who .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.who .pt { color: var(--muted); font-size: 12px; }
.val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.val b { font-size: 17px; }
.val small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.more { margin-top: auto; font-size: 13px; font-weight: 600; }


/* Equipe type */

.equipe-type { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.equipe-type li {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: 14px 8px 12px; border-radius: 10px;
  background: linear-gradient(180deg, var(--petrol) 0%, var(--petrol-dark) 100%); color: #FFF;
}
.equipe-type .club-logo { background: #FFF; border-radius: 50%; padding: 4px; margin-bottom: 6px; }
.et-pos { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.et-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.et-team { color: #9FB8C4; font-size: 12px; }
.et-stat { margin-top: 6px; font-size: 12px; color: #E2E8F0; }
.badge {
  margin-top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--petrol-dark);
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
}


/* Pied */

.foot { margin-top: 28px; padding: 22px 0 30px; background: var(--petrol-dark); color: #9FB8C4; font-size: 13px; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.foot a { color: #CBDDE6; }
.foot a:hover { color: var(--gold); }
.hero-home ~ .foot { margin-top: 0; }


/* Ecrans moyens et telephone */

@media (max-width: 1020px) {
  .home-grid { grid-template-columns: 1fr; }
  .equipe-type { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .top-row { gap: 12px; }
  .wordmark { display: none; }
  .brand img { width: 40px; height: 40px; }
  .top-row { height: 60px; }
  .leagues-soon { display: none; }
  .pro-link { padding: 6px 10px; font-size: 13px; }
  .equipe-type { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 14px; border-radius: 10px; }
  .tbl-wrap { margin: 0 -14px; padding: 0 14px; }
  .filters input { min-width: 0; flex: 1; }
  .count { width: 100%; margin-left: 0; }
}

@media (max-width: 640px) {
  .tbl .team span { display: none; }
  .tbl .club-logo { width: 26px; height: 26px; }
}


/* Liens equipe / joueur */

a.team, a.pn { color: inherit; }
a.team:hover span, a.pn:hover { color: var(--petrol-500); text-decoration: underline; }
.et-name { color: #FFF; }
.et-name:hover { color: var(--gold); }


/* Fiches equipe et joueur */

.profile { display: flex; align-items: center; gap: 22px; padding: 30px 0 22px; }
/* Numero (27/10) : hauteur des chiffres = hauteur du logo (96 px, 64 px sur telephone) */
.profile-num { margin-left: auto; flex: none; align-self: center; font-family: "Barlow Semi Condensed", var(--font); font-weight: 700;
  font-size: 136px; line-height: 96px; height: 96px; position: relative; top: -6px; color: var(--petrol-500); letter-spacing: -.02em; }
.profile-logo { width: 96px; height: 96px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; flex: none; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); }
.facts li { display: flex; align-items: center; }
.facts a.team { color: var(--ink); font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--petrol); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.tile:first-child { border-top-color: var(--gold); }
.tl { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tile b { font-size: 26px; line-height: 1.2; margin-top: 4px; }
.tile b sup { font-size: .5em; }
.tile small { color: var(--muted); font-size: 12px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack .panel { margin-bottom: 0; }
.two-col .panel { min-width: 0; margin-bottom: 0; }
.two-col + .panel { margin-top: 20px; }

.ha { color: var(--muted); font-size: 12px; }
.score { font-weight: 700; }
.score small { color: var(--muted); font-weight: 500; }
/* Score domicile - exterieur en pastilles, detail des tirs au but dessous */
.score-c { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.score-c small { font-size: 11px; font-weight: 600; margin-top: 2px; }
tr.upcoming td { color: var(--muted); }
tr.upcoming .score { font-weight: 500; font-style: italic; }
.res { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.res sup { font-size: 8px; margin-left: 1px; }
/* Resultat aux couleurs des scores (Cyp, 21/10) : or = victoire, platine = nul, bronze = defaite */
.res-w { background: var(--gold); color: var(--petrol-dark); }
.res-l { background: var(--bronze); color: #FFF; }
.res-d { background: #D9D9DC; color: var(--petrol-dark); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
/* Accueil de la ligue : 16 clubs en rangees de 4 */
.team-grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .team-grid.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.team-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
}
.team-card:hover { border-color: var(--petrol-500); text-decoration: none; box-shadow: 0 6px 18px rgba(0, 44, 64, .08); }
.tc-name { font-weight: 700; font-size: 16px; }
.tc-meta { color: var(--muted); font-size: 13px; }

@media (max-width: 1020px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col .panel + .panel { margin-top: 20px; }
}

@media (max-width: 640px) {
  .profile { gap: 14px; padding: 22px 0 16px; }
  .profile-logo { width: 64px; height: 64px; padding: 6px; }
  /* telephone : logo et numero sur la premiere ligne, nom et faits dessous */
  .profile { flex-wrap: wrap; }
  .profile > div { order: 2; flex-basis: 100%; }
  .profile-num { font-size: 91px; line-height: 64px; height: 64px; top: -4px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile b { font-size: 22px; }
  .hide-sm { display: none; }
}


/* Barre de la ligue : nom + saison, puis sections */

.season-pick {
  display: flex; align-items: center; gap: 8px; margin-right: 14px; padding-right: 16px;
  border-right: 1px solid #0F4E6B; color: #FFF; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.season-pick img { width: 22px; height: 22px; }
.sp-league { display: inline-flex; align-items: center; gap: 8px; color: #FFF; text-decoration: none; }
.season-pick .sp-league { padding-left: 0; }   /* premier element de la barre aligne sur la marge commune */
.sp-league:hover span { color: var(--gold); }
.season-pick select {
  height: 28px; padding: 0 28px 0 10px; border: 1px solid #0F4E6B; border-radius: 6px;
  background: var(--petrol-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23EFB702' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #FFF; font: inherit; font-weight: 600; appearance: none; cursor: pointer;
}
.season-pick select:hover, .season-pick select:focus { border-color: var(--gold); outline: none; }


/* Accueil : trois portes d'entree */

.gates-h { padding: 48px 0 24px; text-align: center; }
.gates-h h1 { font-size: clamp(28px, 4vw, 42px); }

.gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 40px; }
.gate {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 280px;
  padding: 28px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  border-top: 4px solid var(--gold);
}
.gate.g-gold { border-top-color: var(--gold); }
.gate.g-silver { border-top-color: #B9BCC2; }
.gate.g-bronze { border-top-color: var(--bronze); }
.gate-n { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.gate h2 { margin: 0 0 6px; font-size: 26px; font-family: "Barlow Semi Condensed", var(--font); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.field select {
  width: 100%; min-width: 0; height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFF
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23044E69' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink); font: inherit; font-size: 15px; appearance: none; cursor: pointer;
}
.field select:focus { outline: none; border-color: var(--petrol-500); }

.go {
  margin-top: auto; height: 44px; border: 0; border-radius: 10px; background: var(--petrol-dark); color: #FFF;
  font: inherit; font-weight: 700; cursor: pointer;
}
.go:hover { background: var(--petrol); }

.search-light { max-width: none; flex: 0; }
.search-light input {
  height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #FFF; color: var(--ink); font-size: 15px;
}
.search-light input::placeholder { color: var(--muted); }
.search-light input:focus { border-color: var(--petrol-500); }
.search-light svg { stroke: var(--muted); }
.search-light .results { top: 50px; }
/* Porte Joueur : champ de recherche a la hauteur des selecteurs Ligue et Pays (libelle 18 px + ecart 5 px) */
@media (min-width: 861px) { .gate > .search-light { margin-top: 23px; } }

@media (max-width: 860px) {
  .gates { grid-template-columns: minmax(0, 1fr); }
  .gate { min-height: 0; }
}

.tiles-h { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }


/* Accueil : hauteur = fenetre moins en-tete et pied de page ; titre + portes centres puis remontes de 40 px (padding bas 136 = 56 + 2 x 40),
   sur toute la largeur de l'ecran (pas de largeur maximale), titre proportionnel a la largeur.
   Le joueur est cale par site.js (--mx-top) pour que HB METRICS reste juste au-dessus de la porte Joueur. */
/* Accueil : fond petrole, joueur de dos (maillot HB Metrics) en camaieu teal a droite derriere les portes.
   Joueur mystere : les portes s'effacent, le joueur vient au centre en couleurs, nom et numero tires au sort.
   Image 2:3, reperes du dos en % de l'image : nom 21-23 % de la hauteur, numero 24-37 %, largeur utile 37-63 %. */

.hero-home { position: relative; overflow: hidden; color: #FFF; background: radial-gradient(1100px 600px at 75% 20%, #0B5E7D, transparent 70%), linear-gradient(180deg, #023147, #011E2C); }
.hero-home .bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(1, 30, 44, .92) 0%, rgba(1, 30, 44, .55) 45%, rgba(1, 30, 44, .15) 100%); transition: opacity .6s ease; }
.hero-home::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMjAiIGhlaWdodD0iMjIwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjg1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgIDAgMCAwIDAgMSAgMCAwIDAgMCAxICAwIDAgMCAuNTUgMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIvPjwvc3ZnPg=="); opacity: .08; pointer-events: none; z-index: 1; mix-blend-mode: overlay; }
.hero-in {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  min-height: max(560px, calc(100vh - 184px)); padding: 56px clamp(16px, 2.5vw, 40px) 136px; text-align: center;
}
.hero-home h1 { margin: 0 0 16px; color: #FFF; font-family: "Barlow Semi Condensed", var(--font); font-weight: 700; font-size: clamp(32px, 4.03vw, 96px); letter-spacing: .01em; text-transform: uppercase; line-height: 1.05; white-space: nowrap; text-shadow: 0 2px 14px rgba(0, 30, 45, .5); }
.hero-home h1 em { font-style: normal; color: var(--gold); }
.hero-figures { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 36px; padding: 0; list-style: none; color: #E2EEF3; font-size: 15px; text-shadow: 0 1px 8px rgba(0, 30, 45, .6); }
.hero-figures b { color: #FFF; font-size: 20px; margin-right: 4px; }
.hero-in .gates { padding-bottom: 0; text-align: left; }
.hero-in .gate { color: var(--ink); }
.gate { box-shadow: 0 18px 40px rgba(0, 20, 30, .45), 0 2px 6px rgba(0, 20, 30, .2); }
.hero-home + main { display: none; }
.hero-in, .hero-head, .gate { transition: opacity .4s ease, transform .45s ease; }
.gate:nth-child(2) { transition-delay: .05s; }
.gate:nth-child(3) { transition-delay: .1s; }

.mx-btn { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border: 0; border-radius: 10px; background: var(--petrol-dark); color: #FFF; font: inherit; font-weight: 700; cursor: pointer; }
.mx-btn span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bronze); color: #FFF; font-size: 13px; }
.mx-btn:hover { background: var(--petrol); }

.mx-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; transition: z-index 0s 1.1s; }
.mx-area { position: relative; height: 100%; container-type: size; }
.mx-fig {
  position: absolute; top: var(--mx-top, calc(-1.1cqh - 40px)); right: var(--mx-right, calc(8px - 152cqh * 2 / 3 * .29)); height: 152cqh; aspect-ratio: 2 / 3; opacity: .55; filter: blur(1.2px);
  transition: top .9s cubic-bezier(.2, .7, .2, 1) .35s, right .9s cubic-bezier(.2, .7, .2, 1) .35s, height .9s cubic-bezier(.2, .7, .2, 1) .35s, opacity .7s ease .35s, filter .7s ease .35s;
}
.mx-fig svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mx-duo { transition: opacity .8s ease .45s; }
.mx-print { mix-blend-mode: multiply; }
.mx-name, .mx-num { font-family: "Barlow Semi Condensed", sans-serif; font-weight: 700; text-anchor: middle; fill: #002C40; stroke: #EFB702; paint-order: stroke; stroke-linejoin: round; }
.mx-name { font-size: 92px; stroke-width: 7px; letter-spacing: 4px; }
.mx-num { font-size: 520px; stroke-width: 16px; }

.mx-card {
  position: absolute; right: calc(max(0px, (100cqw - var(--max)) / 2) + clamp(16px, 2.5vw, 40px)); top: 50%;   /* bord droit = marge commune (.wrap) */ width: min(340px, 28%); transform: translate(16px, -50%); opacity: 0; visibility: hidden;
  padding: 26px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(1, 27, 40, .78); backdrop-filter: blur(6px);
  color: #FFF; transition: opacity .45s ease, transform .45s ease, visibility 0s .45s; pointer-events: auto;
}
.mx-kicker { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mx-full { margin: 6px 0 10px; font-family: "Barlow Semi Condensed", var(--font); font-weight: 700; font-size: 30px; line-height: 1.05; text-transform: uppercase; }
.mx-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 20px; color: #CFE2EA; font-size: 15px; }
.mx-logo { width: 28px; height: 28px; border-radius: 50%; background: #FFF; }
.mx-pos::before { content: "·"; margin-right: 10px; }
.mx-go { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 10px; background: var(--gold); color: #02202F; font-weight: 800; text-decoration: none; }
.mx-go:hover { background: #FFD23F; }
.mx-row { display: flex; gap: 10px; margin-top: 10px; }
.mx-row button { flex: 1; height: 40px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: transparent; color: #FFF; font: inherit; font-weight: 700; cursor: pointer; }
.mx-row button:hover { background: rgba(255, 255, 255, .08); }

.is-mx .bg { opacity: 0; }
.is-mx .hero-head, .is-mx .gate { opacity: 0; transform: translateY(18px); }
.is-mx .hero-in { pointer-events: none; }
.is-mx .mx-stage { z-index: 3; transition: z-index 0s .4s; }
.is-mx .mx-fig { top: 3cqh; height: 150cqh; right: calc(50cqw - 50cqh); opacity: 1; filter: blur(0) drop-shadow(0 30px 50px rgba(0, 10, 16, .6)); }
.is-mx .mx-duo { opacity: 0; }
.is-done .mx-card { opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: 0s; }

/* Telephone : portes empilees, joueur cache ; au clic, joueur en grand puis carte en dessous */
@media (max-width: 860px) {
  .hero-home h1 { white-space: normal; font-size: clamp(32px, 5vw, 58px); }
  .hero-in { min-height: 0; padding: 32px 16px 40px; }
  .mx-fig { display: none; }
  .mx-stage { display: none; position: relative; inset: auto; padding: 16px 16px 36px; }
  .mx-area { height: auto; container-type: normal; display: flex; flex-direction: column; align-items: center; }
  .is-mx-on .hero-in { display: none; }
  .is-mx-on .mx-stage { display: block; }
  .is-mx-on .mx-fig { display: block; position: relative; top: 0; right: auto; height: auto; width: min(100%, 460px); aspect-ratio: 2 / 3.1; overflow: hidden; opacity: 1; filter: none; transition: none; }
  .is-mx-on .mx-fig svg { width: 160%; height: auto; margin-left: -30%; }
  .is-mx-on .mx-duo { opacity: 0; }
  .mx-card { position: relative; right: auto; top: auto; width: min(100%, 460px); margin-top: -48px; transform: translateY(16px); }
  .is-done .mx-card { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in, .hero-head, .gate, .mx-fig, .mx-card, .mx-duo, .hero-home .bg { transition: none !important; }
}

/* Journees (18/10) : resultats, MVP, equipes types */
/* Journees (20/10) : une journee a la fois, equipes types du mois derriere un bouton */
.jr-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 18px; }
.jr-nav[hidden] { display: none; }
.jr-step { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.jr-days { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: thin; }
.jr-days button { min-width: 36px; padding: 7px 4px; }
.jr-prev, .jr-next { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--petrol); font: inherit; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.jr-prev:disabled, .jr-next:disabled { opacity: .35; cursor: default; }
.jr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.jr-mbtn[hidden] { display: none; }
.jr-mbtn { font: inherit; font-size: 13px; font-weight: 700; height: 36px; padding: 0 14px; border: 1px solid var(--gold); border-radius: 8px; background: var(--surface); color: var(--petrol-dark); cursor: pointer; }
.jr-mbtn[aria-pressed="true"] { background: var(--gold); }
.jr-months-h { margin: 0 0 12px; font-size: 20px; }
.round, .month-team { scroll-margin-top: 16px; }
.jr-list { list-style: none; margin: 0 0 6px; padding: 0; }
.jr-match { padding: 10px 0; border-top: 1px solid var(--line); }
.jr-match:first-child { border-top: 0; }
.jr-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.jr-team.home { justify-self: end; }
.jr-team.home .team { flex-direction: row-reverse; }
.jr-team.jr-win { font-weight: 700; }
.jr-score { min-width: 92px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.jr-score small { font-size: 11px; font-weight: 600; color: var(--muted); }
.jr-score .muted { font-size: 13px; font-weight: 600; }
.jr-mvp { margin: 6px 0 0; text-align: center; font-size: 13px; }
.jr-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: var(--petrol-dark); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.jr-mvp a { font-weight: 700; color: var(--ink); }
.jr-why { color: var(--muted); }
.jr-why::before { content: "— "; }
.sub-h { margin: 16px 0 10px; font-size: 15px; }
.et-wait { margin: 12px 0 0; font-size: 13px; }
.month-team { border-top: 3px solid var(--gold); }
.muted { color: var(--muted); }
@media (max-width: 600px) {
  .jr-days { display: flex; width: auto; background: none; gap: 0; }
  .jr-mbtn { width: 100%; }
  .jr-line { gap: 8px; }
  .jr-score { min-width: 64px; font-size: 15px; }
  .jr-team .team span { font-size: 13px; }
}

/* Scores en or / platine / bronze (20/10) : vainqueur, nul, perdant */
.sc { display: inline-flex; gap: 6px; }
.sc span { min-width: 34px; padding: 2px 6px; border-radius: 6px; text-align: center; }
.sc .sc-win { background: var(--gold); color: var(--petrol-dark); }
.sc .sc-eq { background: #D9D9DC; color: var(--petrol-dark); }
.sc .sc-lose { background: var(--bronze); color: #FFF; }
a.jr-score { color: inherit; text-decoration: none; border-radius: 8px; padding: 2px 6px; }
a.jr-score:hover { background: var(--row-hover); text-decoration: none; }
.score-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.score-link:hover { text-decoration-color: var(--petrol); }
.mvp-titre { margin-right: 6px; padding: 1px 7px; font-size: 10px; letter-spacing: .05em; background: var(--petrol-dark); color: var(--gold); }

/* Bouton Statistiques (20/10) : Journees, calendrier des equipes, match par match des joueurs */
.btn-stats { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--petrol); color: #FFF; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-stats:hover { background: var(--petrol-dark); color: #FFF; text-decoration: none; }
.btn-stats.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.jr-line { grid-template-columns: 112px minmax(0, 1fr) auto minmax(0, 1fr) 112px; }
.jr-line::before { content: ""; }
.jr-line .btn-stats, .btn-stats-off { justify-self: end; }
@media (max-width: 600px) {
  .jr-line { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .jr-line::before { display: none; }
  .jr-line .btn-stats { grid-column: 1 / -1; justify-self: center; margin-top: 4px; }
  .btn-stats-off { display: none; }
}

/* Pages de match (20/10) : le rapport de l'app ; seuls les blocs de stats prennent la charte sombre */
.mh-back { margin: 0 0 8px; font-size: 14px; }
.mr-head, .mr h2, .mr-sub, .sb-l, .mt, .mr-score { font-family: "Barlow Semi Condensed", system-ui, sans-serif; }
.mr-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 6px 0 14px; border-bottom: 2px solid #EFB702; }
.mr-team { display: flex; align-items: center; gap: 12px; justify-self: end; color: var(--ink); font-weight: 700; font-size: 24px; letter-spacing: .02em; text-decoration: none; }
.mr-team:hover { text-decoration: none; }
.mr-team.mr-away { justify-self: start; }
.mr-team span { border-bottom: 4px solid var(--tc); padding-bottom: 2px; }
.mr-team img { width: 64px; height: 64px; object-fit: contain; }
.mr-score { text-align: center; background: #002C40; border: 1.5px solid #044E69; border-radius: 10px; padding: 8px 22px; }
.mr-score div { font-size: 42px; font-weight: 700; line-height: 1.05; color: #ECECEC; }
.mr-score small { display: block; font-size: 12px; font-weight: 500; color: #9FB8C4; letter-spacing: .03em; white-space: pre; }
.mr-score .sc-win { color: #EFB702; }
.mr-score .sc-eq { color: #ECECEC; }
.mr-score .sc-lose { color: #C86A2A; }
.mr-meta { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 13px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.mr-mvp { margin: 12px 0 0; text-align: center; font-size: 14px; }
.mr-mvp a { font-weight: 700; color: var(--ink); }
.mr-why { color: var(--muted); }
.mr-why::before { content: "— "; }
.mr-panel { background: #013A53; border: 1px solid #0F4E6B; border-radius: 10px; padding: 10px 14px 14px; margin-top: 16px; color: #E2E8F0; }
.mr-panel a { color: inherit; }
.mr-panel h2 { margin: 0 0 10px; text-align: center; color: #EFB702; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mr-sub { margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: #9FB8C4; letter-spacing: .04em; }
.mr-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.sb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; }
.sb { list-style: none; margin: 0; padding: 0; }
.sb li { display: grid; grid-template-columns: minmax(78px, 1fr) 92px minmax(70px, 1.3fr) 92px; align-items: center; gap: 6px; height: 24px; font-size: 13px; }
.sb-l { color: #9FB8C4; font-weight: 500; white-space: nowrap; }
.sb-v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-va { text-align: left; }
.v-best { color: #EFB702; }
.v-low { color: #C86A2A; }
.v-eq { color: #ECECEC; }
.sb-bar { position: relative; display: flex; height: 14px; background: #0C415C; border-radius: 2px; }
.sb-bar i { display: block; height: 100%; background: var(--hc); border-radius: 2px 0 0 2px; }
.sb-bar b { flex: 1; height: 100%; background: var(--ac); border-radius: 0 2px 2px 0; }
.sb-bar.sb-empty { background: #0C415C; }
.sb-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #013A53; }
.sb-rep { display: grid; grid-template-columns: minmax(78px, 1fr) auto auto; align-items: center; gap: 10px; margin-top: 4px; }
.sb-pies { display: flex; gap: 8px; }
.sb-pies img { width: 72px; height: 72px; }
.sb-leg { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.sb-leg li { display: flex; align-items: center; gap: 6px; height: 20px; }
.sb-leg i { width: 10px; height: 10px; display: inline-block; }
.mr-crono { display: block; width: 100%; height: auto; }
.mh-abrev { display: flex; justify-content: flex-end; margin: 12px 0 -4px; }
.gloss-t { margin: 10px 0 4px; font-weight: 700; }
.mt-wrap { overflow-x: auto; }
.mt { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; color: #CBDDE6; }
.mt th { background: var(--th); color: var(--thc); font-weight: 700; padding: 5px 6px; text-align: left; white-space: nowrap; }
.mt th.num, .mt td.num { text-align: center; }
.mt td { padding: 4px 6px; white-space: nowrap; }
.mt tbody tr:nth-child(odd) td { background: #0C415C; }
.mt tbody tr:nth-child(even) td { background: #04283A; }
.mt td.mt-n, .mt td.mt-name { color: #E2E8F0; font-weight: 700; }
.mt td.mt-mvp { background: #EFB702 !important; color: #1A1A1A; }
@media (max-width: 1100px) {
  .sb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mr-head { gap: 8px; }
  .mr-team { flex-direction: column-reverse; gap: 6px; font-size: 14px; justify-self: center; }
  .mr-team.mr-away { flex-direction: column; justify-self: center; }
  .mr-team img { width: 44px; height: 44px; }
  .mr-score { padding: 6px 10px; }
  .mr-score div { font-size: 30px; }
  .mr-score small { white-space: normal; }
  .mr-panel { padding: 10px 10px 12px; }
  .sb li { grid-template-columns: 86px minmax(0, 1fr) 86px; grid-template-areas: "l l l" "vh bar va"; height: auto; row-gap: 3px; padding: 3px 0; }
  .sb-l { grid-area: l; }
  .sb li .sb-v:not(.sb-va) { grid-area: vh; }
  .sb-va { grid-area: va; }
  .sb-bar { grid-area: bar; }
  .sb-v { font-size: 12px; }
  .sb-rep { grid-template-columns: 1fr; justify-items: center; }
}

/* Action par action (27/10) : axe vertical des 60 minutes au centre, domicile a gauche, exterieur a droite */
.ap { margin: 10px 4px 0; font-size: 13px; }
.ap summary { cursor: pointer; color: #9FB8C4; font-weight: 700; }
.ap-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 12px; color: #9FB8C4; font-size: 12px; }
.ap-leg span { display: inline-flex; align-items: center; gap: 5px; }
.ap-pk { display: inline-block; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 11px; font-weight: 800;
  line-height: 18px; text-align: center; text-decoration: none; color: #fff; font-family: "Barlow Semi Condensed", system-ui, sans-serif; }
.ap-vert { background: #2E9E5B; } .ap-bronze { background: #C86A2A; } .ap-rouge { background: #D64545; }
.ap-or { background: #EFB702; color: #002C40; } .ap-jaune { background: #F5D90A; color: #002C40; }
.ap-argent { background: #D9D9DC; color: #002C40; } .ap-neutre { background: #8FB8CC; color: #002C40; }
.ap-leg-sec { flex-basis: 100%; }
.ap-teams { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; margin-bottom: 4px; }
.ap-team { display: flex; justify-content: center; align-items: center; min-height: 64px; }
.ap-team img { width: 64px; height: 64px; object-fit: contain; }
.ap-l { position: relative; list-style: none; margin: 0; padding: 0; }
.ap-l::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #4C7A90; }
.ap-r { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; min-height: 24px; }
.ap-h, .ap-a { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ap-h { flex-direction: row-reverse; text-align: right; }
.ap-pks { display: inline-flex; flex: none; gap: 3px; }
.ap-nm { min-width: 0; overflow-wrap: anywhere; }
.ap-sec { color: #9FB8C4; }
.ap-t { position: relative; justify-self: center; padding: 0 3px; background: #013A53; color: #9FB8C4; font-size: 11px; font-variant-numeric: tabular-nums; }
.ap-tick { position: relative; height: 0; margin: 10px 0; border-top: 1px solid #4C7A90; text-align: center; }
.ap-tick span { position: relative; top: -9px; padding: 1px 7px; border-radius: 8px; background: #EFB702; color: #002C40; font-size: 11px; font-weight: 800; }
.ap-s { margin: 16px 0 8px; text-align: center; color: #EFB702; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 599px) { .ap { font-size: 12px; } .ap-r, .ap-teams { grid-template-columns: 1fr 40px 1fr; } .ap-team img { width: 48px; height: 48px; } .ap-team { min-height: 48px; } }

/* Index des equipes par pays (22/10) : drapeau devant le nom du pays, liste pour n'ouvrir qu'un pays */
.pays-h { display: flex; align-items: center; gap: 10px; }
.flag { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.pays-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pays-pick select { height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.pays-pick[hidden], [data-pays][hidden] { display: none; }

/* Page d'accueil du club (22/10) : identite, saisons, carte du pays avec la region et la ville */
.club-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 900px) { .club-grid { grid-template-columns: 1fr; } }
.club-infos { margin: 0; }
.club-infos > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.club-infos > div:first-child { border-top: 0; }
.club-infos dt { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.club-infos dd { margin: 0; font-weight: 600; }
.club-map { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.club-map .rg { fill: #DCE6EB; stroke: #FFF; stroke-width: 1.5; stroke-linejoin: round; }
.club-map .rg-on { fill: var(--petrol-500); }
.club-map .cm-pt { fill: var(--gold); stroke: var(--petrol-dark); stroke-width: 3; }
.club-map .cm-lbl { font-size: 26px; font-weight: 800; fill: var(--petrol-dark); paint-order: stroke; stroke: #FFF; stroke-width: 6px; stroke-linejoin: round; }
.cm-src { margin: 8px 0 0; color: var(--muted); font-size: 11px; text-align: right; }

/* Page de saison d'une equipe (22/10) : logo et nom menent a la fiche du club */
.h1-link { color: inherit; }
.h1-link:hover { color: var(--petrol-500); text-decoration: none; }
.profile a:hover .profile-logo { border-color: var(--petrol-500); }

/* Page Index (22/10) : trois blocs Ligue, Equipe, Joueurs */
.idx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
@media (max-width: 860px) { .idx-grid { grid-template-columns: 1fr; } }
.idx-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 22px 30px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--petrol); border-radius: 14px; color: var(--ink);
}
.idx-card:hover { border-color: var(--petrol-500); border-top-color: var(--gold); box-shadow: 0 8px 24px rgba(0, 44, 64, .10); text-decoration: none; }
.idx-card svg { width: 54px; height: 54px; fill: var(--petrol); margin-bottom: 6px; }
.idx-card:hover svg { fill: var(--petrol-500); }
.idx-t { font-size: 24px; font-weight: 800; }
.idx-n { color: var(--petrol-500); font-weight: 700; }
.idx-d { color: var(--muted); font-size: 14px; max-width: 30ch; }

/* Fiche joueur (23/10) : total de carriere, saison choisie, drapeau de la nationalite */
.fiche .tot-row td { font-weight: 700; background: #F6F9FA; }
.fiche-saisons tr.season-row { cursor: pointer; }
.fiche-saisons tr.season-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.fiche-saisons tr.season-row[aria-selected="true"] td { background: #E8F2F6; }
.fiche-saisons tr.season-row[aria-selected="true"] td:first-child { box-shadow: inset 4px 0 var(--gold); font-weight: 700; }
.glog[hidden] { display: none; }
.sub-h small { font-weight: 500; font-size: 12px; }
.nat-flag { width: 21px; height: 16px; margin-right: 7px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); object-fit: cover; }
.nat-flag:has(+ .nat-flag) { margin-right: 4px; }
