/* ===========================================================================
   Coupe du Monde 2026 — design system (mobile-first, thème sombre sportif)
   =========================================================================== */
:root {
  --bg: #070b18;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #14224a 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 10%, #1a3a2e 0%, transparent 55%),
             #070b18;
  --surface: #111729;
  --surface-2: #18203a;
  --surface-3: #1f2945;
  --line: rgba(255,255,255,.08);
  --text: #eef2ff;
  --muted: #8b96b8;
  --muted-2: #677299;
  --primary: #00d6a8;
  --primary-ink: #00231c;
  --accent: #ff5d73;
  --gold: #ffce4d;
  --blue: #4d9bff;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;

  /* Couleurs par groupe (codage visuel comme sur l'affiche) */
  --g-A:#3b82f6; --g-B:#ef4444; --g-C:#14b8a6; --g-D:#f97316; --g-E:#8b5cf6; --g-F:#ec4899;
  --g-G:#22c55e; --g-H:#06b6d4; --g-I:#eab308; --g-J:#f43f5e; --g-K:#a855f7; --g-L:#10b981;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-grad); background-attachment: fixed;
  color: var(--text); -webkit-font-smoothing: antialiased;
  min-height: 100dvh; line-height: 1.45;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7,11,24,.92), rgba(7,11,24,.72));
  border-bottom: 1px solid var(--line);
}
.app-header__row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand .cup { font-size: 22px; }
.brand b { font-size: 15px; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.spacer { flex: 1; }

.tz-btn {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); 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(--muted); }

/* ---------- Conteneur ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.view-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 4px 2px 2px; }
.view-sub { color: var(--muted); font-size: 13.5px; margin: 0 2px 16px; }

/* ---------- Bandeau France ---------- */
.france-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: linear-gradient(110deg, rgba(0,35,236,.22), rgba(255,255,255,.04) 40%, rgba(236,0,0,.22));
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px;
}
.france-banner .flag { width: 38px; height: 26px; border-radius: 4px; }
.france-banner .next { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.france-banner .match { font-weight: 800; font-size: 15px; }
.france-banner .when { font-size: 13px; color: var(--primary); font-weight: 700; }
.countdown { margin-left: auto; text-align: right; }
.countdown b { font-variant-numeric: tabular-nums; font-size: 17px; }
.countdown small { display: block; font-size: 10.5px; color: var(--muted); }

/* ---------- Chips / filtres ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip.active { background: var(--primary); color: var(--primary-ink); border-color: transparent; }

/* ---------- Grille de groupes ---------- */
.groups-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .groups-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .groups-grid { grid-template-columns: 1fr 1fr 1fr; } }

.group-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.group-card__head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 800;
  background: linear-gradient(180deg, var(--gc, #333) 0%, transparent 160%);
  border-bottom: 1px solid var(--line);
}
.group-card__head .badge {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--gc); color: #fff; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.group-card__head .ttl { font-size: 15px; }
.group-card__head .cnt { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 700; }

.standings { width: 100%; border-collapse: collapse; }
.standings th { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 6px 6px; text-align: center; }
.standings td { padding: 8px 6px; font-size: 13px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.standings td.team { text-align: left; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.standings td.team img { width: 22px; height: 15px; border-radius: 2px; }
.standings tr.qual td { background: rgba(0,214,168,.06); }
.standings .pos { color: var(--muted); font-weight: 800; width: 18px; }
.standings .pos.q { color: var(--primary); }
.standings .pos.q3 { color: var(--gold); }

.group-card__foot { padding: 10px 14px; }
.btn-ghost { width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 10px; border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; }

/* ---------- Liste de matchs ---------- */
.day-group { margin-bottom: 18px; }
.day-head { position: sticky; top: 60px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 4px; margin-bottom: 6px; }
.day-head h3 { margin: 0; font-size: 13px; font-weight: 800; text-transform: capitalize; }
.day-head .line { flex: 1; height: 1px; background: var(--line); }

.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 8px;
}
.match.is-france { border-color: rgba(77,155,255,.5); box-shadow: 0 0 0 1px rgba(77,155,255,.25) inset; }
.match .team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match .team.away { flex-direction: row-reverse; text-align: right; }
.match .team img { width: 26px; height: 18px; border-radius: 3px; flex: 0 0 auto; }
.match .team .nm { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .mid { text-align: center; min-width: 64px; }
.match .mid .time { font-weight: 800; font-size: 14px; }
.match .mid .date { font-size: 10.5px; color: var(--muted); }
.match .mid .score { font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.match .mid .vs { font-size: 11px; color: var(--muted-2); font-weight: 800; }
.match .grp-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; color:#fff; }
.match .meta-row { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 2px; }
.tag-live { color: var(--accent); font-weight: 800; font-size: 10.5px; }
.tag-final { color: var(--muted); font-weight: 700; font-size: 10.5px; }

/* ---------- Saisie de pronostic ---------- */
.pred-row { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 38px; background: transparent; border: none; color: var(--text); font-size: 18px; font-weight: 800; }
.stepper button:active { background: var(--surface-3); }
.stepper .val { width: 30px; text-align: center; font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; }
.pred-row .sep { color: var(--muted); font-weight: 800; }
.pred-pts { font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 999px; }
.pred-pts.win { background: rgba(0,214,168,.16); color: var(--primary); }
.pred-pts.miss { background: rgba(255,93,115,.14); color: var(--accent); }
.pred-pts.pending { background: var(--surface-2); color: var(--muted); }

/* ---------- Bracket (phases finales) ---------- */
.ko-rounds { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.ko-rounds::-webkit-scrollbar { display: none; }
.ko-match {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
}
.ko-match .rnd { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ko-side { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.ko-side img { width: 22px; height: 15px; border-radius: 2px; }
.ko-side .nm { font-weight: 700; font-size: 13.5px; }
.ko-side .slot { font-weight: 700; font-size: 12.5px; color: var(--muted); font-style: italic; }
.ko-side .sc { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }
.ko-side.win .nm { color: var(--primary); }
.ko-when { font-size: 11px; color: var(--blue); font-weight: 700; margin-top: 4px; }

/* Vue arbre large (desktop) */
.bracket { display: none; }
@media (min-width: 1000px) {
  .bracket { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: stretch; }
  .bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
  .bracket .col h4 { font-size: 11px; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 4px; }
  .ko-rounds.mobile-only { display: none; }
}
@media (min-width: 1000px) { .ko-mobile { display: none; } }

/* ---------- Cartes génériques / formulaires ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.card p.help { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, select.input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px; border-radius: var(--radius-sm); font-size: 15px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: var(--primary-ink); border: none; padding: 13px 18px;
  border-radius: var(--radius-sm); font-weight: 800; font-size: 14.5px; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: rgba(255,93,115,.16); color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.switch input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ---------- Stat / classement ---------- */
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.lb-row .rk { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; background: var(--surface-2); }
.lb-row.top1 .rk { background: var(--gold); color: #2a2200; }
.lb-row.top2 .rk { background: #cdd6e6; color: #1a2030; }
.lb-row.top3 .rk { background: #d98a4a; color: #251200; }
.lb-row .who { font-weight: 700; }
.lb-row .sub { font-size: 11.5px; color: var(--muted); }
.lb-row .pts { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }
.lb-row .pts small { color: var(--muted); font-weight: 700; }

/* ---------- Barème ---------- */
.rule { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); }
.rule .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.rule .pts { margin-left: auto; font-weight: 900; }
.dot.gold{background:var(--gold)} .dot.green{background:var(--primary)} .dot.teal{background:#14b8a6}
.dot.blue{background:var(--blue)} .dot.mute{background:var(--muted-2)}

/* ---------- Navigation basse ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: linear-gradient(180deg, rgba(17,23,41,.85), rgba(10,14,26,.98));
  backdrop-filter: blur(18px); border-top: 1px solid var(--line);
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; background: none; border: none; padding: 6px 2px; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { filter: drop-shadow(0 0 8px rgba(0,214,168,.5)); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(3,6,14,.6); 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: 20px 20px 0 0; width: 100%; max-width: 520px; max-height: 84dvh; overflow: auto; box-shadow: var(--shadow); }
@media (min-width: 600px) { .modal { border-radius: 20px; } }
.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-size: 16px; font-weight: 800; flex: 1; }
.modal__head .x { background: var(--surface-2); border: none; color: var(--text); 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(--surface-2); 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(--muted); }

/* ---------- Divers ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .ic { font-size: 40px; margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translateX(-50%); background: var(--surface-3); color: var(--text); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 13px; z-index: 80; box-shadow: var(--shadow); border: 1px solid var(--line); animation: toast .25s ease; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pill.tz { background: var(--surface-2); color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 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%} }
.section-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 18px 2px 8px; }
.scope-grid { display:flex; flex-wrap:wrap; gap:6px; }
.scope-grid .chip { cursor:pointer; }
.hr { height:1px; background:var(--line); margin:16px 0; border:0; }
.link-btn { background:none;border:none;color:var(--primary);font-weight:700;padding:0;font-size:13px; }
.copy-code { font-family: ui-monospace, monospace; font-size: 24px; font-weight: 900; letter-spacing: 4px; text-align:center; padding:14px; background:var(--surface-2); border-radius:var(--radius-sm); border:1px dashed var(--line); }

/* ===========================================================================
   v2 — thème clair, hero, bracket symétrique, grille de pronos, classements
   =========================================================================== */

/* ---------- Thème clair ---------- */
:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-grad: radial-gradient(1100px 520px at 85% -12%, #dbe6ff 0%, transparent 60%),
             radial-gradient(800px 420px at -8% 8%, #d7f3ea 0%, transparent 55%),
             #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --surface-3: #e3e8f3;
  --line: rgba(13,22,48,.10);
  --text: #131a2e;
  --muted: #64718f;
  --muted-2: #8a96b2;
  --primary: #00b491;
  --primary-ink: #ffffff;
  --shadow: 0 8px 24px rgba(20,30,60,.08);
}
:root[data-theme="light"] .app-header { background: linear-gradient(180deg, rgba(244,246,251,.94), rgba(244,246,251,.7)); }
:root[data-theme="light"] .bottom-nav { background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(244,246,251,.98)); }
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Boutons d'en-tête ---------- */
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 420px) { .tz-btn span { display: none; } .tz-btn { max-width: none; padding: 8px; } }

/* ---------- Hero (homepage desktop) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, #0b1b3f 0%, #10324a 55%, #0e3b2f 100%); border: 1px solid var(--line); }
:root[data-theme="light"] .hero { background: linear-gradient(135deg, #122a5e 0%, #154a6b 55%, #14593f 100%); }
.hero::after { content: "🏆"; position: absolute; right: -10px; bottom: -30px; font-size: 200px; opacity: .08; transform: rotate(-12deg); }
.hero h1 { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -.03em; color: #fff; line-height: 1.05; }
.hero p { margin: 0 0 18px; color: #c8d6f5; font-weight: 600; font-size: 14px; }
.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: 14px; padding: 12px; backdrop-filter: blur(6px); }
.hero .stat b { display: block; font-size: 22px; font-weight: 900; color: #fff; }
.hero .stat span { font-size: 10.5px; color: #b9c8ea; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hero .cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero .cta .btn { width: auto; }
.hero .cta .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
@media (max-width: 560px) { .hero h1 { font-size: 24px; } .hero .stats { grid-template-columns: repeat(2,1fr); } }

/* Disposition desktop homepage en 2 colonnes */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.upcoming-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.upcoming-card .vs { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.upcoming-card img { width: 26px; height: 18px; border-radius: 3px; }
.upcoming-card .nm { font-weight: 700; font-size: 13.5px; }
.upcoming-card .tm { text-align: right; }
.upcoming-card .tm b { font-size: 14px; }
.upcoming-card .tm span { display: block; font-size: 10.5px; color: var(--muted); }

/* Section repliable (résultats masqués au premier regard) */
.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-weight: 800; 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(--muted); }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure .inner { padding: 0 14px 14px; }
.disclosure .count { font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 999px; }

/* ---------- Grille de pronostics (style cdm2026) ---------- */
.pg-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .pg-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .pg-grid { grid-template-columns: 1fr 1fr 1fr; } }
.pg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pg-card h3 { margin: 0; padding: 12px 16px; font-size: 15px; font-weight: 800; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.pg-card h3 .badge { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 12px; }
.pg-match { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.pg-match:last-child { border-bottom: 0; }
.pg-when { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 7px; }
.pg-row { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 7px; }
.pg-team { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 700; font-size: 13px; }
.pg-team.r { flex-direction: row-reverse; text-align: right; }
.pg-team img { width: 22px; height: 15px; border-radius: 2px; flex: 0 0 auto; }
.pg-team .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-in { width: 38px; height: 40px; text-align: center; font-weight: 900; font-size: 17px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); -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(--primary); outline: none; }
.pg-in.played { background: rgba(0,182,145,.12); border-color: var(--primary); color: var(--primary); }
.pg-sep { color: var(--muted-2); font-weight: 900; }
.pg-played-badge { font-size: 9.5px; font-weight: 900; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.pg-pts { text-align: center; font-size: 11px; font-weight: 800; margin-top: 6px; }
.pg-pts.win { color: var(--primary); } .pg-pts.miss { color: var(--accent); }

/* ---------- Classements détaillés ---------- */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.tbl-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.tbl-head .badge { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 900; }
table.full { width: 100%; border-collapse: collapse; font-size: 13px; }
table.full th { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 800; padding: 8px 4px; }
table.full td { padding: 9px 4px; text-align: center; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.full td.team { text-align: left; display: flex; align-items: center; gap: 8px; font-weight: 700; padding-left: 12px; }
table.full td.team img { width: 22px; height: 15px; border-radius: 2px; }
table.full tr.q1 td { box-shadow: inset 3px 0 0 var(--primary); }
table.full tr.q2 td { box-shadow: inset 3px 0 0 var(--blue); }
table.full tr.q3 td { box-shadow: inset 3px 0 0 var(--gold); }
table.full .pts { font-weight: 900; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin: 4px 2px 16px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: middle; }

/* ---------- Bracket symétrique ---------- */
.bracket-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 120px; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--blue)); border-radius: 999px; transition: width .3s; }
.progress-label { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn-reset { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 12.5px; }
.round-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.round-tabs::-webkit-scrollbar { display: none; }
.round-tabs .rt { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

.bracket-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 12px; scroll-snap-type: x proximity; }
.bracket-scroll::-webkit-scrollbar { height: 8px; }
.bracket-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
.bracket2 { display: grid; grid-auto-flow: column; gap: clamp(10px, 2vw, 26px); min-width: max-content; align-items: stretch; padding: 4px; }
.bk-col { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; width: clamp(140px, 19vw, 184px); scroll-snap-align: center; }
.bk-col.final-col { justify-content: center; }
.bk-col > .col-title { position: sticky; top: 0; }
.col-title { text-align: center; margin-bottom: 4px; }
.col-title span { font-size: 10.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #142850; padding: 5px 12px; border-radius: 999px; display: inline-block; }
.col-title.gold span { background: var(--gold); color: #2a2200; }
:root[data-theme="light"] .col-title span { background: #142850; }

.bk-match { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.bk-match.final { border: 2px solid var(--gold); }
.bk-side { display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: pointer; transition: background .15s; min-height: 38px; }
.bk-side + .bk-side { border-top: 1px solid var(--line); }
.bk-side:hover { background: var(--surface-2); }
.bk-side img { width: 20px; height: 14px; border-radius: 2px; flex: 0 0 auto; }
.bk-side .nm { font-weight: 700; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-side .slot { font-style: italic; color: var(--muted-2); font-weight: 600; font-size: 11.5px; }
.bk-side .sc { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--muted); }
.bk-side.picked { background: linear-gradient(90deg, rgba(0,182,145,.16), transparent); }
.bk-side.picked .nm { color: var(--primary); }
.bk-side.actual-win .nm { color: var(--blue); }
.bk-side.actual-win::after { content: "✓"; margin-left: 4px; color: var(--blue); font-weight: 900; }
.bk-when { font-size: 9.5px; color: var(--muted); text-align: center; padding: 4px; background: var(--surface-2); font-weight: 700; }
.bracket-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------- Comptes ---------- */
.auth-tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 9px; border: none; background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--blue)); color: #fff; font-weight: 900; font-size: 14px; border: none; }

/* ===========================================================================
   v3 — cartes calendrier (style bfc), stades + carte, 1N2, nav 6 onglets
   =========================================================================== */

/* Nav 6 onglets : plus compact */
.bottom-nav { padding-left: 2px; padding-right: 2px; }
.nav-item { font-size: 9px; gap: 2px; padding: 6px 0; }
.nav-item svg { width: 21px; height: 21px; }

/* Carte calendrier (groupe · date · stade · 2 équipes + score) */
.cal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, border-color .12s; }
.cal-card:active { transform: scale(.99); }
.cal-card.is-france { border-color: rgba(77,155,255,.55); }
.cal-card.past { opacity: .96; }
.cal-card__top { display: flex; align-items: center; gap: 8px; padding: 11px 14px 0; flex-wrap: wrap; }
.cal-tag { font-size: 10.5px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: #fff; padding: 3px 9px; border-radius: 999px; }
.cal-comp { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.cal-status { margin-left: auto; font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 8px; }
.cal-status.up { background: var(--surface-2); color: var(--primary); }
.cal-status.live { background: rgba(255,93,115,.16); color: var(--accent); }
.cal-status.done { background: var(--surface-2); color: var(--muted); }
.cal-meta { display: flex; align-items: center; gap: 6px; padding: 8px 14px 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-meta .venue { color: var(--text); font-weight: 700; }
.cal-meta .venue:hover { color: var(--primary); text-decoration: underline; }
.cal-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 14px 14px; }
.cal-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cal-team.away { flex-direction: row-reverse; text-align: right; }
.cal-team img { width: 34px; height: 23px; border-radius: 4px; flex: 0 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cal-team .nm { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.cal-team .slot { font-style: italic; color: var(--muted); font-weight: 600; font-size: 13px; }
.cal-score { text-align: center; min-width: 70px; }
.cal-score .sc { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.cal-score .sc.win-h { } 
.cal-score .time { font-size: 17px; font-weight: 900; }
.cal-score .dt { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.cal-foot { border-top: 1px solid var(--line); padding: 9px 14px; display: flex; align-items: center; }
.cal-foot .link { font-size: 12px; font-weight: 800; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.win-name { color: var(--text); } .lose-name { color: var(--muted); }

.home-section-title { font-size: 17px; font-weight: 900; letter-spacing: -.01em; margin: 22px 2px 12px; display: flex; align-items: center; gap: 8px; }
.home-section-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
@media (min-width: 760px) { .cal-list-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } }

/* Stades + carte */
.map-wrap { height: 60vh; min-height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; box-shadow: var(--shadow); }
#stadium-map { height: 100%; width: 100%; background: var(--surface-2); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--text); border-radius: 12px; }
.leaflet-popup-tip { background: var(--surface); }
.stad-pop b { font-size: 14px; } .stad-pop span { color: var(--muted); font-size: 12px; }
.stad-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .stad-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .stad-grid { grid-template-columns: 1fr 1fr 1fr; } }
.stad-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow); cursor: pointer; }
.stad-card:active { transform: scale(.99); }
.stad-card h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.stad-card .city { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stad-card .cap { margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--primary); }
.stad-card .cap small { color: var(--muted); font-weight: 600; }
.stad-flag { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* 1N2 (pronostic vainqueur/nul) */
.pred-mode { display: flex; gap: 6px; margin-top: 8px; justify-content: center; }
.pred-mode button { flex: 1; max-width: 80px; padding: 8px 4px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 12px; }
.pred-mode button.sel { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.pg-toggle { display: flex; gap: 6px; margin-top: 8px; }
.pg-toggle button { flex: 1; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 800; font-size: 11px; }
.pg-toggle button.active { background: var(--surface-3); color: var(--text); }
