/* ==========================================================================
   Pronos Ligue 1 & 2 — Design System (structure reprise de Bar-sur-Aube FC)
   Identité : BLEU ESTAC TROYES (#1A53C0) + blanc/anthracite · Oswald + Inter
   NB : les variables --orange* portent désormais les bleus ESTAC (noms conservés).
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --orange: #1A53C0; --orange-600: #1546A3; --orange-700: #103A86; --orange-soft: #E9EFFB;
  --ink: #16191F; --ink-700: #2A2F38; --ink-500: #5A6470;
  --bg: #FFFFFF; --bg-soft: #F6F7F9; --bg-dark: #14181F; --surface: #FFFFFF; --line: #E7E9ED;
  --win: #1F9D55; --draw: #C99A06; --loss: #D2342B;
  /* Zones de classement */
  --z-cl: #1F9D55; --z-el: #2f7fe0; --z-co: #8b5cf6; --z-relp: #C99A06; --z-rel: #D2342B;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 100%; --radius: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,25,31,.06), 0 2px 8px rgba(16,25,31,.05);
  --shadow-md: 0 6px 24px rgba(16,25,31,.10);
  --shadow-lg: 0 18px 50px rgba(16,25,31,.18);
  --header-h: 60px; --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  --l1: #1666e0; --l2: #16a35a;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #EEF2F7; --ink-700: #C7CCD4; --ink-500: #97A1AD;
  --bg: #0F1318; --bg-soft: #161B22; --surface: #1B212B; --line: #2A313C;
  --orange-soft: #11233f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); color: var(--ink); background: var(--bg);
  line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased;
  min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: .2px; margin: 0; }

/* ----- En-tête ----- */
.app-header { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.app-header__row { display: flex; align-items: center; gap: 10px; padding: 11px 18px; max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .cup { font-size: 26px; }
.brand b { font-family: var(--font-display); font-size: 1.18rem; letter-spacing: .3px; display: block; }
.brand small { display: block; font-size: .64rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.tz-btn { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; max-width: 56vw; }
.tz-btn img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.tz-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-btn .chev { color: var(--ink-500); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
@media (max-width: 430px) { .tz-btn span { display: none; } .tz-btn { padding: 8px; max-width: none; } .brand small { display: none; } }

/* ----- Sélecteur de compétition ----- */
.comp-bar { position: sticky; top: var(--header-h); z-index: 25; background: var(--surface); border-bottom: 1px solid var(--line); }
.comp-switch { display: flex; gap: 8px; max-width: var(--container); margin: 0 auto; padding: 10px 18px; }
.comp-switch button {
  flex: 1; max-width: 240px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-700); font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; font-size: .92rem; transition: .15s;
}
.comp-switch button:hover { border-color: var(--ink-500); }
.comp-switch button.active { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 6px 16px rgba(26,83,192,.32); }
.comp-switch .pin { width: 8px; height: 8px; border-radius: 50%; }
.comp-switch .pin.l1 { background: var(--l1); } .comp-switch .pin.l2 { background: var(--l2); }
.comp-switch button.active .pin { background: rgba(255,255,255,.9); }

/* ----- Conteneur & titres ----- */
.container { max-width: var(--container); margin: 0 auto; padding: 20px 18px; }
.view-title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); text-transform: uppercase; margin: 2px 0 4px; }
.view-sub { color: var(--ink-500); font-size: 13.5px; margin: 0 0 18px; }
.section-label { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: 1px; margin: 22px 2px 10px; }
.home-section-title { font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; margin: 24px 2px 14px; display: flex; align-items: center; gap: 10px; }
.home-section-title .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.muted { color: var(--ink-500); }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--orange); font-size: .85rem; }

/* ----- Boutons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; font-size: .95rem;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent; background: var(--orange); color: #fff;
  box-shadow: 0 6px 18px rgba(26,83,192,.32); transition: transform .15s, background .2s, box-shadow .2s; }
.btn:hover { background: var(--orange-600); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.secondary:hover { border-color: var(--ink); background: var(--orange-soft); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }
.btn.danger { background: transparent; color: var(--loss); border-color: var(--line); box-shadow: none; }
.btn.danger:hover { background: var(--loss); color: #fff; border-color: var(--loss); }
.link-btn { background: none; border: none; color: var(--orange-700); font-weight: 700; padding: 0; font-size: 13px; }

/* ----- Hero ----- */
.hero { position: relative; color: #fff; overflow: hidden; border-radius: 18px; padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(115deg, #0B1A3A 0%, #10306E 55%, #1A53C0 100%); margin-bottom: 18px; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 380px at 85% -10%, rgba(26,83,192,.55), transparent 60%); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; }
.hero .accent { color: var(--orange); }
.hero-hosts { color: #D8DCE3; font-weight: 600; margin: 6px 0 18px; font-size: 1.02rem; }
.hero-gauge { max-width: 560px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(6px); margin-bottom: 18px; }
.hero-gauge__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-gauge__top span { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #cdd4de; }
.hero-gauge__top b { font-family: var(--font-display); font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.hero-gauge__top b small { font-size: .85rem; color: #aab3c0; font-weight: 600; }
.gauge-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.gauge-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange), #6f9bf0); box-shadow: 0 0 14px rgba(26,83,192,.5); transition: width .7s ease; }
.hero .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; }
.hero .stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px; }
.hero .stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; }
.hero .stat span { font-size: 10.5px; color: #c0c8d3; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.hero .cta { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.hero .cta .btn { width: auto; }
@media (max-width: 560px) { .hero .stats { grid-template-columns: repeat(2, 1fr); } }

/* ----- Cartes génériques / formulaires ----- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.card h3 { color: var(--ink); margin: 0 0 4px; font-size: 1.15rem; }
.card p.help { color: var(--ink-500); font-size: 13.5px; margin: 0 0 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.input, select.input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(26,83,192,.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; font-family: var(--font-display); font-weight: 500; text-transform: uppercase; font-size: .82rem; letter-spacing: .5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); }
.chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; padding: 10px; border-radius: 9px; border: none; background: transparent; color: var(--ink-500); font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 13px; }
.auth-tabs button.active { background: var(--surface); color: var(--orange); box-shadow: var(--shadow-sm); }
.avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--orange); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; border: none; }

/* ----- Navigateur de journées ----- */
.md-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.md-nav .arrow { width: 42px; height: 42px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 20px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto; }
.md-nav .arrow:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.md-nav .arrow:disabled { opacity: .35; }
.md-nav .md-pick { flex: 1; text-align: center; }
.md-nav .md-pick b { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; display: block; }
.md-nav .md-pick small { font-size: 11.5px; color: var(--ink-500); font-weight: 600; }

/* ----- Cartes de match (équipes empilées, façon BFC) ----- */
.mcard-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .mcard-grid { grid-template-columns: 1fr 1fr; } }
.mcard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.mcard-grid > .mcard { margin-bottom: 0; }
.mcard.clickable { cursor: pointer; }
.mcard.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mcard-meta { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: .78rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: .6px;
  font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 10px; flex-wrap: wrap; }
.mcard-meta .st { padding: 3px 10px; border-radius: 999px; }
.mcard-meta .st.up { background: var(--orange-soft); color: var(--orange-700); }
.mcard-meta .st.live { background: #fdecea; color: var(--loss); }
.mcard-meta .st.done { background: var(--bg-soft); color: var(--ink-500); }
.mcard-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.mcard-team b { font-family: var(--font-display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mcard-center { text-align: center; min-width: 66px; }
.mcard-score { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mcard-time { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--orange); }
.mcard-when { font-size: 10.5px; color: var(--ink-500); font-weight: 600; margin-top: 2px; }
.mcard-vs { font-size: .8rem; color: var(--ink-500); text-transform: uppercase; font-weight: 600; }
.mcard-foot { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 10px; }
.mcard-foot .link { font-family: var(--font-display); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--orange-700); display: inline-flex; align-items: center; gap: 6px; }

/* ----- Disclosure (résultats repliables) ----- */
.disclosure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--surface); }
.disclosure > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .chev { margin-left: auto; transition: transform .2s; color: var(--ink-500); }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure .inner { padding: 0 14px 14px; }
.disclosure .count { font-size: 11px; font-weight: 700; background: var(--bg-soft); color: var(--ink-500); padding: 2px 9px; border-radius: 999px; }

/* ----- Grille de pronostics ----- */
.pg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.pg-card h3 { margin: 0; padding: 14px 16px; font-family: var(--font-display); font-size: 1.1rem; text-transform: uppercase; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.pg-card h3 .badge { width: 32px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: var(--orange); }
.pg-match { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pg-match:last-child { border-bottom: 0; }
.pg-when { font-size: 11.5px; color: var(--ink-500); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.pg-row { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 8px; }
.pg-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.pg-team.r { flex-direction: row-reverse; text-align: right; }
.pg-team .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-in { width: 42px; height: 44px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--ink); -moz-appearance: textfield; }
.pg-in::-webkit-outer-spin-button, .pg-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-in:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(26,83,192,.15); }
.pg-in.played { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-700); }
.pg-sep { color: var(--ink-500); font-weight: 700; }
.pg-pts { text-align: center; font-size: 11.5px; font-weight: 600; margin-top: 8px; }
.pg-pts.win { color: var(--win); } .pg-pts.miss { color: var(--ink-500); }

/* ----- Classement (format BFC) ----- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
table.full { width: 100%; border-collapse: collapse; min-width: 560px; }
table.full th, table.full td { padding: 12px 12px; border-bottom: 1px solid var(--line); font-size: .95rem; text-align: center; white-space: nowrap; }
table.full th { font-family: var(--font-display); text-transform: uppercase; font-size: .78rem; letter-spacing: .6px; color: var(--ink-500); background: var(--bg-soft); }
table.full tr:last-child td { border-bottom: 0; }
table.full td.team { text-align: left; white-space: normal; min-width: 160px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
table.full td.rank, table.full th.rank { font-family: var(--font-display); font-weight: 700; color: var(--ink-500); }
table.full td.pts { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
table.full td.gnp { font-variant-numeric: tabular-nums; color: var(--ink-500); letter-spacing: 1px; }
/* Zones (liseré gauche coloré) */
table.full tr.eu-cl td:first-child { box-shadow: inset 4px 0 0 var(--z-cl); }
table.full tr.eu-el td:first-child { box-shadow: inset 4px 0 0 var(--z-el); }
table.full tr.eu-co td:first-child { box-shadow: inset 4px 0 0 var(--z-co); }
table.full tr.relp td:first-child { box-shadow: inset 4px 0 0 var(--z-relp); }
table.full tr.rel td:first-child { box-shadow: inset 4px 0 0 var(--z-rel); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-500); margin: 0 2px 16px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* ----- Forme (5 derniers résultats) ----- */
.forme { display: inline-flex; gap: 4px; }
.fdot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #fff; font-weight: 700; }
.fdot.f-w { background: var(--win); } .fdot.f-l { background: var(--loss); } .fdot.f-n { background: #9aa3af; }
.forme-cell { padding-left: 10px !important; padding-right: 12px !important; }
.badge-result { width: 22px; height: 22px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--font-display); }
.badge-result.r-win { background: var(--win); } .badge-result.r-draw { background: var(--draw); } .badge-result.r-loss { background: var(--loss); }

/* ----- Classement des pronostiqueurs ----- */
.lb-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.lb-row .rk { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--bg-soft); color: var(--ink-700); flex: 0 0 auto; }
.lb-row.top1 .rk { background: var(--orange); color: #fff; }
.lb-row.top2 .rk { background: #cdd6e6; color: #1a2030; }
.lb-row.top3 .rk { background: #e0a878; color: #2a1500; }
.lb-row .who { font-weight: 600; }
.lb-row .sub { font-size: 11.5px; color: var(--ink-500); }
.lb-row .pts { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.lb-row .pts small { color: var(--ink-500); font-weight: 600; }

/* ----- Badge club (logo officiel, repli monogramme) ----- */
.club { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 12px; flex: 0 0 auto; box-shadow: 0 1px 2px rgba(0,0,0,.2); position: relative; overflow: hidden; }
.club.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10.5px; }
.club.lg { width: 46px; height: 46px; border-radius: 12px; font-size: 15px; }
.club .crest { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; border-radius: inherit; }
.club.sm .crest { padding: 2px; } .club.lg .crest { padding: 4px; }

/* ----- Navigation basse ----- */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(16,25,31,.06); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-500); font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; background: none; border: none; padding: 6px 2px; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--orange); }

/* ----- Modal ----- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(16,25,31,.55); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 600px) { .modal-back { align-items: center; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 520px; max-height: 84dvh; overflow: auto; box-shadow: var(--shadow-lg); }
@media (min-width: 600px) { .modal { border-radius: 18px; } }
.modal__head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.modal__head h3 { margin: 0; font-family: var(--font-display); text-transform: uppercase; font-size: 1.1rem; flex: 1; }
.modal__head .x { background: var(--bg-soft); border: none; color: var(--ink); width: 32px; height: 32px; border-radius: 50%; font-size: 16px; }
.modal__body { padding: 16px; }
.country-search { position: sticky; top: 64px; background: var(--surface); padding: 0 16px 12px; }
.country-list .ci { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-radius: 10px; border: 1px solid transparent; }
.country-list .ci:active, .country-list .ci.sel { background: var(--bg-soft); border-color: var(--line); }
.country-list .ci img { width: 26px; height: 18px; border-radius: 3px; }
.country-list .ci .off { margin-left: auto; font-size: 11px; color: var(--ink-500); }

/* ----- Divers ----- */
.empty { text-align: center; color: var(--ink-500); padding: 36px 16px; }
.empty .ic { font-size: 40px; margin-bottom: 8px; }
.empty b { color: var(--ink); font-family: var(--font-display); text-transform: uppercase; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 13px; z-index: 80; box-shadow: var(--shadow-lg); animation: toast .25s ease; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 25%, var(--line) 37%, var(--bg-soft) 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (max-width: 560px) {
  .fdot { width: 19px; height: 19px; font-size: 10.5px; }
  .view-title { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Desktop large : 3 colonnes de cartes match (évite des cartes trop étirées) */
@media (min-width: 1280px) { .mcard-grid { grid-template-columns: repeat(3, 1fr); } }

/* 4 compétitions : pastilles + sélecteur défilable */
.comp-switch { overflow-x: auto; scrollbar-width: none; }
.comp-switch::-webkit-scrollbar { display: none; }
.comp-switch button { flex: 0 0 auto; max-width: none; }
.comp-switch .pin.cdf { background: #D2342B; }
.comp-switch .pin.ldc { background: #6d28d9; }

/* ===========================================================================
   Coupes : sous-onglets (phase de ligue / phases finales) + bracket
   =========================================================================== */
.subtabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.subtab { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: .82rem; letter-spacing: .5px; }
.subtab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.bracket-scroll { overflow-x: auto; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.bracket-scroll::-webkit-scrollbar { height: 8px; }
.bracket-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.bracket { display: flex; gap: clamp(10px, 1.4vw, 22px); min-width: max-content; align-items: stretch; padding: 2px; }
@media (min-width: 1100px) { .bracket { min-width: 0; } .bracket .bk-col { flex: 1; min-width: 0; } }
.bk-col { display: flex; flex-direction: column; min-width: 210px; }
.bk-col-title { text-align: center; font-family: var(--font-display); text-transform: uppercase; font-size: .8rem; letter-spacing: .6px; color: #fff; background: var(--orange); border-radius: 999px; padding: 6px 12px; margin-bottom: 12px; white-space: nowrap; }
.bk-col-title.final { background: #caa23a; color: #2a1c00; }
.bk-col-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.bk-tie { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.bk-tie.clickable { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.bk-tie.clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.bk-side { display: flex; align-items: center; gap: 9px; padding: 9px 11px; min-height: 42px; }
.bk-side + .bk-side { border-top: 1px solid var(--line); }
.bk-side .nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.bk-side .sc { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-500); min-width: 14px; text-align: center; }
.bk-side.win .nm { color: var(--orange-700); }
.bk-side.win .sc { color: var(--ink); }
.bk-side.out { opacity: .5; }
.bk-when { font-size: 10px; text-align: center; color: var(--ink-500); padding: 5px; background: var(--bg-soft); font-weight: 600; }

/* Phases finales : confrontations du tour sélectionné (navigation par flèches) */
.tie-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .tie-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .tie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .tie-grid { grid-template-columns: repeat(4, 1fr); } }
.tie-grid .bk-tie { margin: 0; }
