/* ===================================================================
   MONDIAL 2026 — Calendrier interactif
   Three visual directions via [data-theme]: diffusion · tricolore · nuit
   =================================================================== */

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

:root {
  /* ---- DIFFUSION (default: broadcast premium, navy + gold) ---- */
  --bg: #060B1C;
  --bg-grad: radial-gradient(1100px 700px at 50% -8%, #122a5e 0%, #0a1733 38%, #060B1C 78%);
  --pitch: rgba(255,255,255,.022);
  --surface: rgba(255,255,255,.045);
  --surface-2: rgba(255,255,255,.07);
  --surface-solid: #0d1a38;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(232,184,75,.42);
  --text: #F3F6FF;
  --muted: #9AA8CC;
  --faint: #5e6e96;
  --accent: #4d86ff;
  --accent-2: #7fb0ff;
  --accent-soft: rgba(77,134,255,.16);
  --gold: #E8B84B;
  --gold-2: #FFD86B;
  --gold-soft: rgba(232,184,75,.14);
  --live: #ff4d5e;
  --done: #5e6e96;

  --fr-blue: #2a5bd7;
  --fr-red: #ef3e46;
  --fr-glow: rgba(42,91,215,.5);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0,0,0,.7);
  --maxw: 1120px;

  --display: 'Anton', sans-serif;
  --ui: 'Hanken Grotesk', system-ui, sans-serif;
}

[data-theme="tricolore"] {
  /* ---- TRICOLORE (light editorial, French supporter) ---- */
  --bg: #F1EEE6;
  --bg-grad: linear-gradient(180deg, #F6F3EC 0%, #ECE7DB 100%);
  --pitch: rgba(20,33,58,.03);
  --surface: #ffffff;
  --surface-2: #faf8f2;
  --surface-solid: #ffffff;
  --border: rgba(20,33,58,.12);
  --border-strong: rgba(20,33,58,.22);
  --text: #15233f;
  --muted: #5c6a86;
  --faint: #8a96ad;
  --accent: #1438a8;
  --accent-2: #1438a8;
  --accent-soft: rgba(20,56,168,.09);
  --gold: #b8862a;
  --gold-2: #caa040;
  --gold-soft: rgba(184,134,42,.12);
  --live: #e1262e;
  --done: #9aa3b5;

  --fr-blue: #0b3aa3;
  --fr-red: #e1262e;
  --fr-glow: rgba(11,58,163,.28);

  --shadow: 0 18px 44px -22px rgba(20,33,58,.4);
}

[data-theme="nuit"] {
  /* ---- STADE NUIT (neon night / fan-zone energy) ---- */
  --bg: #04050B;
  --bg-grad: radial-gradient(900px 620px at 50% -6%, #16143a 0%, #0a0a1f 42%, #04050B 80%);
  --pitch: rgba(45,226,230,.03);
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.075);
  --surface-solid: #0c0c22;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(45,226,230,.4);
  --text: #F6F8FF;
  --muted: #97a0c4;
  --faint: #5b628a;
  --accent: #2de2e6;
  --accent-2: #75f0f2;
  --accent-soft: rgba(45,226,230,.13);
  --gold: #FFD15C;
  --gold-2: #FFE08A;
  --gold-soft: rgba(255,209,92,.13);
  --live: #ff2e9a;
  --done: #5b628a;

  --fr-blue: #4f7cff;
  --fr-red: #ff3d8a;
  --fr-glow: rgba(79,124,255,.5);

  --shadow: 0 24px 60px -20px rgba(0,0,0,.85);
}

/* ============ BASE ============ */
html { scroll-behavior: smooth; }
body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.45;
}
#root { min-height: 100vh; }
.app {
  position: relative;
  background: var(--bg-grad);
  background-attachment: fixed;
  min-height: 100vh;
}
.app::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--pitch) 1px, transparent 1px),
    linear-gradient(90deg, var(--pitch) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

::selection { background: var(--gold); color: #1a1407; }

.display { font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.gold-text {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ============ HERO ============ */
.hero { position: relative; z-index: 1; padding: 26px 0 18px; overflow: hidden; }
.hero-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1a1407; font-family: var(--display); font-size: 19px; box-shadow: 0 6px 18px -6px var(--gold-soft);
}
.brand-txt { font-weight: 800; letter-spacing: .5px; font-size: 14px; }
.brand-txt .gline {
  display: block;
  height: 2.5px;
  width: 100%;
  margin: 3px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #0E4028, #3DA060 50%, #0E4028);
}
.brand-txt .brand-sub { display: block; color: var(--muted); font-weight: 600; margin-top: 3px; }
@keyframes trophySway {
  0%, 100% { transform: perspective(800px) rotateY(-16deg); }
  50%      { transform: perspective(800px) rotateY(16deg); }
}
.trophy-fallback { animation: trophySway 7s ease-in-out infinite; transform-origin: center center; }
.hero-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--muted); padding: 7px 13px; border: 1px solid var(--border); border-radius: 100px;
}

.hero-main {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: center;
  padding: 8px 0 6px;
}
.hero-left { padding: 8px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero-title {
  font-family: var(--display); font-size: clamp(54px, 9vw, 116px); line-height: .82;
  letter-spacing: 1px; text-transform: uppercase;
}
.hero-title .l2 { display: block; }
.hero-title .yr { -webkit-text-stroke: 1.5px var(--gold); -webkit-text-fill-color: transparent; color: transparent; }
[data-theme="tricolore"] .hero-title .yr { -webkit-text-stroke-color: var(--gold); }
.hero-sub {
  margin-top: 16px; font-size: 15px; color: var(--muted); max-width: 30ch; line-height: 1.5;
}
.hero-dates {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 14px;
  font-weight: 700; letter-spacing: 1px; font-size: 14px;
}
.hero-dates .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.hero-flags { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.host-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700;
  color: var(--text); transition: .18s; white-space: nowrap;
}
.host-pill .fl { font-size: 17px; }
.host-pill b { color: var(--gold); }

/* Trophy */
.hero-right { position: relative; display: grid; place-items: center; min-height: 360px; }
.trophy-stage {
  position: relative; display: grid; place-items: center;
  animation: floaty 6s ease-in-out infinite;
}
.trophy-glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 65%);
  filter: blur(8px);
}
.trophy-img, .trophy-canvas {
  position: relative; display: block;
}
.trophy-canvas-wrap {
  position: relative; width: 100%; max-width: 340px; height: 480px;
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
}
@media (max-width: 860px) { .trophy-canvas-wrap { height: 400px; max-width: 320px; } }
@media (max-width: 560px) { .trophy-canvas-wrap { height: 340px; max-width: 300px; } }
@media (max-width: 400px) { .trophy-canvas-wrap { height: 300px; max-width: 270px; } }
/* (3D rotation handled by Three.js) */
@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
.trophy-ped {
  position: absolute; bottom: 6px; width: 220px; height: 34px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.5), transparent 70%); filter: blur(6px);
}
[data-theme="tricolore"] .trophy-ped { background: radial-gradient(ellipse, rgba(20,33,58,.22), transparent 70%); }

/* Stats strip */
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 22px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.stat { padding: 16px 12px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-n { font-family: var(--display); font-size: 34px; line-height: 1; }
.stat-l { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 6px; font-weight: 700; }

/* ============ COUNTDOWN CARDS ============ */
.cd-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-top: 22px; }
.cd-card {
  position: relative; border-radius: var(--radius); padding: 18px 20px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
}
.cd-card.fr {
  border-color: var(--fr-blue);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--fr-blue) 22%, transparent), transparent 60%),
    var(--surface);
  box-shadow: 0 0 0 1px var(--fr-blue) inset, 0 18px 40px -24px var(--fr-glow);
}
.cd-card.fr::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(var(--fr-blue), #fff, var(--fr-red));
}
.cd-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.cd-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.cd-card.fr .cd-eyebrow { color: var(--accent-2); }
.cd-match { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-match .fl { font-size: 20px; }
.cd-meta { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.cd-timer { display: flex; gap: 8px; margin-top: 14px; }
.cd-unit {
  flex: 1; text-align: center; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 4px;
}
.cd-unit b { font-family: var(--display); font-size: 26px; line-height: 1; display: block; }
.cd-unit span { font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cd-live {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--live);
  font-size: 14px; letter-spacing: .5px;
}
.cd-live .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 70%, transparent) } 70% { box-shadow: 0 0 0 8px transparent } 100% { box-shadow: 0 0 0 0 transparent } }

/* ============ CONTROL BAR ============ */
.controls {
  position: sticky; top: 0; z-index: 40; margin-top: 26px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.controls-inner { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.ctrl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctrl-row.scroll { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
.ctrl-row.scroll::-webkit-scrollbar { display: none; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 3px; }
.seg button {
  border: none; background: none; color: var(--muted); font-family: var(--ui); font-weight: 700;
  font-size: 13px; padding: 8px 16px; border-radius: 100px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.seg button.on { background: var(--gold); color: #1a1407; }
[data-theme="nuit"] .seg button.on { background: var(--accent); color: #04121a; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--ui); font-weight: 700; font-size: 12.5px; padding: 8px 13px; border-radius: 100px;
  cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.chip .ic { font-size: 14px; opacity: .9; }
.chip.fr.on { background: color-mix(in srgb, var(--fr-blue) 20%, transparent); border-color: var(--fr-blue); color: var(--text); }
.chip .ct { font-size: 10.5px; opacity: .65; font-weight: 800; }
.chip .x { font-size: 13px; opacity: .6; }

.ctrl-label { font-size: 10.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
.spacer { flex: 1 1 auto; }

.tz-select { position: relative; }
.tz-btn { display: inline-flex; align-items: center; gap: 8px; }
.tz-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; overflow: hidden;
}
.tz-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  border: none; background: none; color: var(--text); font-family: var(--ui); font-weight: 600;
  font-size: 13px; padding: 9px 10px; border-radius: 8px;
}
.tz-opt:hover { background: var(--surface-2); }
.tz-opt.on { color: var(--gold); }
.tz-opt .fl { font-size: 16px; }
.tz-opt .ab { margin-left: auto; font-size: 10.5px; color: var(--muted); font-weight: 700; }

/* follow drawer */
.drawer-back { position: fixed; inset: 0; z-index: 80; background: rgba(2,5,14,.6); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; }
.drawer {
  width: min(440px, 92vw); height: 100%; background: var(--surface-solid);
  border-left: 1px solid var(--border-strong); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slidein .26s cubic-bezier(.2,.8,.2,1);
}
@keyframes slidein { from { transform: translateX(40px); opacity: .4 } to { transform: none; opacity: 1 } }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 17px; font-weight: 800; }
.drawer-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--border-strong); }
.drawer-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-search input {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-family: var(--ui); font-size: 14px; outline: none;
}
.drawer-search input:focus { border-color: var(--accent); }
.drawer-body { overflow-y: auto; padding: 8px 12px 24px; flex: 1; }
.grp-block { margin-top: 12px; }
.grp-cap { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; padding: 6px 6px; }
.team-opt {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--text); font-family: var(--ui);
  font-weight: 600; font-size: 14px; padding: 9px 10px; border-radius: 10px;
}
.team-opt:hover { background: var(--surface); }
.team-opt .fl { font-size: 20px; }
.team-opt.on { background: var(--accent-soft); border-color: var(--accent); }
.team-opt .check { margin-left: auto; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; color: transparent; }
.team-opt.on .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.team-opt.fr-opt .fl { filter: drop-shadow(0 0 6px var(--fr-glow)); }

/* ============ DAY + MATCH LIST ============ */
.main-area { padding: 22px 0 40px; min-height: 50vh; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

.day-group { margin-bottom: 26px; }
.day-head {
  position: sticky; top: 104px; z-index: 20; display: flex; align-items: baseline; gap: 12px;
  padding: 8px 2px; margin-bottom: 8px;
}
.day-head .dnum { font-family: var(--display); font-size: 26px; color: var(--gold); line-height: 1; }
.day-head .dtxt { font-weight: 800; font-size: 14px; text-transform: capitalize; }
.day-head .dmonth { color: var(--muted); font-weight: 600; }
.day-head .dcount { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.day-line { flex: 1; height: 1px; background: var(--border); align-self: center; }

.matches { display: flex; flex-direction: column; gap: 8px; }
.match {
  position: relative; display: grid; grid-template-columns: 78px 1fr auto; align-items: stretch;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); transition: .16s; cursor: default;
}
.match:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.stadium-bg {
  position: absolute; right: -28px; top: 50%;
  transform: translateY(-50%) perspective(200px) rotateX(30deg) rotateY(-8deg) scale(.82);
  width: 220px; height: 140px; opacity: .055; pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.match:hover .stadium-bg { opacity: .11; transform: translateY(-50%) perspective(200px) rotateX(24deg) rotateY(-14deg) scale(.88); }
.match.live { border-color: var(--live); }
.match.done { opacity: .62; }
.match.fr-match { border-color: var(--fr-blue); background: linear-gradient(90deg, color-mix(in srgb, var(--fr-blue) 12%, transparent), var(--surface) 55%); }
.match.followed { box-shadow: inset 3px 0 0 var(--accent); }
.match.fr-match.followed { box-shadow: none; }

.m-time { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 6px; border-right: 1px solid var(--border); background: rgba(0,0,0,.12); }
[data-theme="tricolore"] .m-time { background: rgba(20,33,58,.035); }
.m-time .hh { font-family: var(--display); font-size: 19px; line-height: 1; color: var(--text); }
.m-time .zz { font-size: 9px; letter-spacing: 1px; color: var(--faint); font-weight: 700; }
.m-time .st { font-size: 9px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 5px; }
.m-time .st.live { background: var(--live); color: #fff; }
.m-time .st.done { color: var(--done); }

.m-body { padding: 11px 14px; display: flex; flex-direction: column; justify-content: center; gap: 7px; min-width: 0; }
.m-teams { display: flex; flex-direction: column; gap: 5px; }
.m-team { display: flex; align-items: center; gap: 9px; }
.m-team .fl { font-size: 21px; line-height: 1; width: 26px; text-align: center; }
.m-team .nm { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.m-team.is-fr .nm { color: var(--accent-2); font-weight: 800; }
[data-theme="tricolore"] .m-team.is-fr .nm { color: var(--fr-blue); }
.m-vs { font-size: 10px; font-weight: 800; color: var(--faint); letter-spacing: 1px; padding-left: 35px; margin: -2px 0; }
.m-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.grp-tag { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
.venue { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; font-weight: 600; }
.venue .fl { font-size: 13px; }

.m-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; padding: 11px 14px; }
.tv { font-size: 10.5px; font-weight: 800; padding: 5px 9px; border-radius: 6px; white-space: nowrap; letter-spacing: .3px; }
.tv.m6 { background: #e8731e; color: #fff; }
.tv.bein { background: #6a2fb8; color: #fff; }
[data-theme="nuit"] .tv.bein { background: var(--accent); color: #04121a; }
.tv.both { background: linear-gradient(90deg, #e8731e 50%, #6a2fb8 50%); color: #fff; }
.free-tag { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #5fd08a; }
.follow-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; font-size: 14px; display: grid; place-items: center; transition: .15s; }
.follow-btn:hover { border-color: var(--accent); color: var(--accent); }
.follow-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* phase divider in list */
.phase-divider { display: flex; align-items: center; gap: 14px; margin: 34px 0 16px; }
.phase-divider .pd-ic { font-size: 22px; }
.phase-divider .pd-name { font-family: var(--display); font-size: 30px; letter-spacing: 1px; text-transform: uppercase; }
.phase-divider .pd-sub { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.phase-divider .pd-line { flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold-soft), transparent); }

/* ============ BRACKET ============ */
.bracket-wrap { padding: 8px 0 50px; }
.bracket-intro { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.bracket-intro .bi-note { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bracket-scroll { overflow-x: auto; padding-bottom: 14px; scrollbar-width: thin; }
.bracket {
  display: grid; grid-auto-flow: column; grid-auto-columns: 224px; gap: 26px; align-items: stretch;
  min-width: 1180px; padding: 4px;
}
.bcol { display: flex; flex-direction: column; }
.bcol-head { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.bcol-body { display: flex; flex-direction: column; justify-content: flex-start; flex: 1; gap: 14px; }
.btie { position: relative; }
.bmatch {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
  cursor: pointer; transition: .15s; min-width: 190px;
}
.bmatch:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bmatch.fr-path { border-color: var(--fr-blue); box-shadow: 0 0 0 1px var(--fr-blue) inset, 0 0 24px -8px var(--fr-glow); }
.bmatch.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.bm-code { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; color: var(--faint); margin-bottom: 5px; display: flex; justify-content: space-between; }
.bm-code .bm-time { color: var(--muted); }
.bm-slot { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text); padding: 4px 0; line-height: 1.25; }
.bm-slot + .bm-slot { border-top: 1px dashed var(--border); }
.bm-slot .seed { font-size: 11.5px; color: var(--text); font-weight: 600; }
.bmatch.finale { background: linear-gradient(135deg, var(--gold-soft), transparent); border-color: var(--gold); padding: 14px; min-width: 220px; }
.bmatch.finale .fin-cup { font-size: 28px; text-align: center; }
.bmatch.finale .fin-t { text-align: center; font-family: var(--display); font-size: 18px; letter-spacing: 1px; color: var(--gold); margin-top: 4px; }
.bcol.col-FIN { justify-content: center; }
.bcol.col-F3 .bmatch { opacity: .9; }

/* match detail popover (shared) */
.sheet-back { position: fixed; inset: 0; z-index: 300; background: rgba(2,5,14,.62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.sheet { width: min(440px, 94vw); max-height: 90vh; overflow-y: auto; overflow-x: hidden; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow); animation: pop .22s cubic-bezier(.2,.8,.2,1); -webkit-overflow-scrolling: touch; }
@keyframes pop { from { transform: scale(.94); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet-top { padding: 18px 20px; border-bottom: 1px solid var(--border); position: relative; }
.sheet-top .code { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--gold); }
.sheet-mt { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 22px 18px; }
.sheet-mt .side { flex: 1; text-align: center; }
.sheet-mt .side .fl { font-size: 42px; }
.sheet-mt .side .nm { font-weight: 800; font-size: 15px; margin-top: 6px; }
.sheet-mt .mid { font-family: var(--display); font-size: 22px; color: var(--muted); }
.sheet-rows { padding: 4px 20px 20px; }
.sheet-rows .r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.sheet-rows .r .k { color: var(--muted); font-weight: 600; width: 92px; }
.sheet-rows .r .v { font-weight: 700; }

/* ============ FOOTER ============ */
.footer { padding: 30px 0 50px; border-top: 1px solid var(--border); margin-top: 10px; }
.footer .f-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer .f-leg { display: flex; gap: 14px; flex-wrap: wrap; }
.f-leg .li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.footer .f-note { font-size: 11px; color: var(--faint); margin-top: 14px; line-height: 1.6; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero-main { grid-template-columns: 1fr; }
  .hero-right { min-height: 280px; order: -1; }
  .trophy-img { height: 270px; }
  .cd-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: none; }
  .stat:nth-child(4), .stat:nth-child(5) { border-top: 1px solid var(--border); }
  .day-head { top: 96px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .hero-title { font-size: clamp(46px, 15vw, 70px); }
  .match { grid-template-columns: 64px 1fr; }
  .m-right { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; border-top: 1px solid var(--border); padding: 8px 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .m-vs { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .trophy-img { animation: none; }
  * { scroll-behavior: auto; }
}

/* ============ SCORES ============ */
.score-blk { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 2px 0; }
.sc { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--text); }
.sc-sep { font-size: 13px; color: var(--faint); font-weight: 800; }
.match.done .score-blk .sc { color: var(--gold); }
[data-theme="tricolore"] .match.done .score-blk .sc { color: var(--accent); }

/* ============ GUIDE MOBILE ============ */
.guide-back { position: fixed; inset: 0; z-index: 100; background: rgba(2,5,14,.72); backdrop-filter: blur(5px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 600px) { .guide-back { align-items: center; padding: 20px; } }
.guide-card {
  width: min(520px, 100%); background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: 24px 24px 0 0; padding: 24px 22px 32px; box-shadow: var(--shadow);
  animation: slideup .3s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 600px) { .guide-card { border-radius: 20px; } }
@keyframes slideup { from { transform: translateY(60px); opacity: .3 } to { transform: none; opacity: 1 } }
.guide-pill { width: 44px; height: 5px; border-radius: 100px; background: var(--border-strong); margin: 0 auto 20px; }
.guide-title { font-family: var(--display); font-size: 26px; color: var(--text); margin-bottom: 4px; }
.guide-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; font-weight: 600; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.guide-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 13px; display: flex; flex-direction: column; gap: 7px;
}
.guide-item .gi-ic { font-size: 22px; }
.guide-item .gi-t { font-weight: 800; font-size: 13.5px; }
.guide-item .gi-d { font-size: 11.5px; color: var(--muted); line-height: 1.4; font-weight: 600; }
.guide-item.fr { border-color: var(--fr-blue); background: color-mix(in srgb, var(--fr-blue) 12%, var(--surface)); }
.guide-cta {
  width: 100%; padding: 15px; background: var(--gold); color: #1a1407;
  font-family: var(--ui); font-weight: 800; font-size: 15px; border: none; border-radius: 12px;
  cursor: pointer; transition: .15s;
}
.guide-cta:hover { filter: brightness(1.08); }
[data-theme="nuit"] .guide-cta { background: var(--accent); color: #04121a; }
.guide-note { text-align: center; font-size: 11px; color: var(--faint); margin-top: 10px; font-weight: 600; }

/* ============ DENSITY ============ */
.app.compact .matches { gap: 5px; }
.app.compact .m-body { padding: 8px 12px; gap: 4px; }
.app.compact .m-time { padding: 8px 6px; }
.app.compact .m-team .nm { font-size: 13.5px; }
.app.compact .day-group { margin-bottom: 18px; }
.app.compact .cd-row { margin-top: 16px; }

/* ============ BRACKET CONNECTORS ============ */
.bcol:not(.col-FIN) .btie { position: relative; }
.bcol:not(.col-FIN) .bmatch::after {
  content: ''; position: absolute; right: -14px; top: 50%; width: 14px; height: 1px;
  background: var(--border); pointer-events: none;
}
.bcol:not(.col-R32):not(.col-FIN) .bmatch::before {
  content: ''; position: absolute; left: -13px; top: 50%; width: 13px; height: 1px;
  background: var(--border); pointer-events: none;
}
.bmatch.fr-path::after { background: var(--fr-blue); }


/* ============================================================
   THÈME OR — accent gold dominant
   ============================================================ */
:root {
  --accent:      #E8B84B;
  --accent-2:    #FFD86B;
  --accent-soft: rgba(232,184,75,.16);
}
[data-theme="tricolore"] {
  --accent:      #b8862a;
  --accent-2:    #d4a040;
  --accent-soft: rgba(184,134,42,.12);
}
[data-theme="nuit"] {
  --accent:      #E8B84B;
  --accent-2:    #FFD86B;
  --accent-soft: rgba(232,184,75,.18);
}
/* Seg + chips use gold by default */
.seg button.on { background: var(--gold); color: #1a1407; }
[data-theme="nuit"] .seg button.on { background: var(--gold); color: #1a1407; }
.chip.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.chip.fr.on { background: rgba(42,91,215,.18); border-color: var(--fr-blue); color: var(--fr-blue); }

/* ============================================================
   STADES — galerie des 16 stades
   ============================================================ */
.stadiums-section { padding: 32px 0 48px; }
.std-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 24px;
}
.std-title { font-size: clamp(28px,5vw,44px); color: var(--text); line-height: 1; }
.std-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 5px; }

.stadiums-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 960px) { .stadiums-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .stadiums-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.std-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  cursor: default;
}
.std-card:hover { border-color: rgba(232,184,75,.5); transform: translateY(-2px); }

.std-svg-wrap {
  position: relative;
  background: linear-gradient(160deg, #0a1428 0%, #060e1e 100%);
  padding: 10px;
  aspect-ratio: 200 / 132;
}
.std-svg-wrap svg { width: 100%; height: 100%; display: block; }

.std-badge {
  position: absolute; top: 7px; left: 7px;
  background: rgba(232,184,75,.92); color: #1a1407;
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 100px; white-space: nowrap;
  text-transform: uppercase;
}

.std-body { padding: 11px 13px 13px; }
.std-name {
  font-size: 12.5px; font-weight: 800; color: var(--text);
  line-height: 1.25; margin-bottom: 4px; text-wrap: balance;
}
.std-city {
  font-size: 11.5px; color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 5px; margin-bottom: 7px;
}
.std-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--faint);
}
.std-meta .sep { opacity: .5; }
.std-meta .gold-text { -webkit-text-fill-color: var(--gold); font-weight: 800; }

/* ============================================================
   MOBILE OVERHAUL
   ============================================================ */

/* --- Bottom nav (hidden on desktop) --- */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--surface-solid);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 9px 0 7px;
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-family: var(--ui); font-size: 9.5px; font-weight: 800;
  letter-spacing: .8px; text-transform: uppercase; transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav button .nav-ic { font-size: 22px; line-height: 1; }
.mobile-nav button.on { color: var(--gold); }
.mobile-nav button.on .nav-ic { filter: drop-shadow(0 0 6px rgba(232,184,75,.6)); }

@media (max-width: 700px) {
  /* Show bottom nav */
  .mobile-nav { display: flex; }

  /* Body clearance for bottom nav + safe area */
  .app { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Hero — stack trophy above text, compact */
  .hero { padding: 16px 0 10px; }
  .hero-main { grid-template-columns: 1fr; gap: 0; }
  .hero-right { min-height: 220px; order: -1; }
  .hero-left { padding: 4px 0 10px; }
  .hero-title { font-size: clamp(44px, 14vw, 68px); }
  .hero-sub { font-size: 13.5px; }
  .hero-dates { font-size: 12px; }
  .hero-flags { gap: 6px; }
  .host-pill { font-size: 12px; padding: 5px 10px; }

  /* Trophy canvas — sizing handled by .trophy-canvas-wrap */

  /* Countdown cards — stack */
  .cd-row { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
  .cd-unit b { font-size: 22px; }

  /* Stats strip — 3 col */
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4), .stat:nth-child(5) { border-top: 1px solid var(--border); }

  /* Controls — compact */
  .controls { position: sticky; top: 0; }
  .controls-inner { gap: 8px; padding: 10px 0; }
  .ctrl-row { gap: 7px; }

  /* Hide desktop seg tabs (replaced by mobile nav) */
  .seg-desktop { display: none; }

  /* Seg + chips — bigger touch targets */
  .seg button { font-size: 12px; padding: 8px 13px; min-height: 38px; }
  .chip { font-size: 12px; padding: 7px 12px; min-height: 38px; }

  /* Match rows — better touch */
  .match { min-height: 64px; }
  .m-team .nm { font-size: 13.5px; }
  .m-time { padding: 10px 8px; }
  .m-body { padding: 10px 10px; }

  /* Day head */
  .day-head { top: 84px; }

  /* Bracket — horizontal scroll */
  .bracket-scroll { overflow-x: auto; }
  .bracket { min-width: 680px; }

  /* Stadiums grid */
  .stadiums-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .std-name { font-size: 11.5px; }
  .std-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 12px; }
  .hero-title { font-size: clamp(40px, 13vw, 56px); }
  .stadiums-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .seg button { padding: 7px 10px; font-size: 11.5px; }
}

/* Tap ripple effect for match rows on mobile */
@media (hover: none) {
  .match:active { background: var(--surface-2); }
  .std-card:active { background: var(--surface-2); }
  .seg button:active { opacity: .7; }
}

/* ── Stadium card photo layout ── */
.std-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #07091a;
}
.std-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.std-card:hover .std-photo { transform: scale(1.04); }
.std-img-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(5,8,20,.85) 100%);
  pointer-events: none;
}
.std-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 10px 9px;
}
.std-overlay .std-name {
  font-size: 12px; font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: 2px;
}
.std-overlay .std-city {
  font-size: 11px; color: rgba(255,255,255,.65); font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.std-badge {
  position: absolute; top: 7px; left: 7px;
  background: rgba(232,184,75,.95); color: #1a1407;
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 100px; white-space: nowrap;
  text-transform: uppercase; z-index: 2;
}
/* Keep old svg-wrap for fallback */
.std-svg-wrap {
  background: linear-gradient(160deg, #0a1428 0%, #060e1e 100%);
  padding: 10px; width: 100%; height: 100%;
}
.std-svg-wrap svg { width: 100%; height: 100%; display: block; }


/* ══════════════════════════════════════════════
   BLEUS — Section équipe de France
   ══════════════════════════════════════════════ */
.bleus-section { padding: 28px 0 56px; }

.bleus-header { margin-bottom: 22px; }

.bleus-title-row {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.bleus-title { font-size: clamp(28px,5vw,42px); color: var(--text); line-height: 1; }
.bleus-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.bleus-badge {
  margin-left: auto; background: rgba(232,184,75,.12);
  border: 1px solid rgba(232,184,75,.3); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; font-weight: 800; color: var(--gold);
  white-space: nowrap;
}

.bleus-kpi {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; margin-bottom: 20px;
}
.bkpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.bkpi-v { font-size: 28px; color: var(--gold); line-height: 1; }
.bkpi-l { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 2px; }

.bleus-filters { margin-bottom: 18px; flex-wrap: wrap; }

/* Player grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 1100px) { .players-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .players-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px)  {
  .players-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .bleus-kpi { grid-template-columns: repeat(2, 1fr); }
  .bleus-badge { margin-left: 0; }
}

/* Player card */
.player-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 14px 12px;
  cursor: pointer; transition: border-color .18s, transform .18s;
  display: flex; flex-direction: column; gap: 10px;
}
.player-card:hover { border-color: rgba(42,91,215,.5); transform: translateY(-2px); }
.player-card:active { transform: none; }

.pc-jersey { width: 56px; height: 56px; flex-shrink: 0; }

.pc-body { flex: 1; min-width: 0; }
.pc-name {
  font-size: 13.5px; font-weight: 900; color: var(--text);
  line-height: 1.2; margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; flex-wrap: wrap; }
.pc-pos {
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  border: 1px solid; flex-shrink: 0;
}
.pc-club { font-size: 11px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pc-stats { display: flex; gap: 8px; align-items: center; }
.pc-stat { font-size: 11px; color: var(--faint); font-weight: 700; }
.pc-stat b { color: var(--text); font-weight: 900; margin-right: 2px; }
.pc-rating {
  margin-left: auto; font-size: 11px; font-weight: 900;
  padding: 2px 7px; border-radius: 8px; background: var(--surface-2);
}

.pc-note {
  margin-top: 6px; font-size: 10.5px; color: var(--gold);
  font-weight: 700; line-height: 1.3;
}


/* ── FIFA UT card style override ── */
.player-card {
  border-radius: 10px !important;
  padding: 0 !important;
  gap: 0 !important;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.player-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.players-grid {
  grid-template-columns: repeat(5, 1fr) !important;
}
@media (max-width: 1200px) { .players-grid { grid-template-columns: repeat(4, 1fr) !important; } }
@media (max-width: 900px)  { .players-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 600px)  { .players-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 7px !important; } }

/* Point "live" du pied de page (mise à jour des données) */
@keyframes wcpulse{0%{box-shadow:0 0 0 0 rgba(31,157,85,.6)}70%{box-shadow:0 0 0 7px rgba(31,157,85,0)}100%{box-shadow:0 0 0 0 rgba(31,157,85,0)}}

/* Trophée hero — image animée légère (remplace l'ancien 3D STL) */
.trophy-canvas-wrap{perspective:1100px;display:flex;align-items:center;justify-content:center;height:100%;width:100%}
@keyframes trophyFloat{
  0%,100% {transform:translateY(0)    rotateY(-11deg)}
  50%     {transform:translateY(-12px) rotateY(11deg)}
}
.trophy-float{animation:trophyFloat 6.5s ease-in-out infinite;transform-style:preserve-3d;will-change:transform}
/* Carte joueur — entrée 720° (2 tours rapides qui décélèrent face caméra + pop d'échelle easeOutBack),
   reprise de l'effet « pop Mbappé » de la vidéo. */
@keyframes cardSpin720{
  0%   {transform:perspective(1400px) rotateY(0deg)   scale(.5); opacity:0}
  12%  {opacity:1}
  100% {transform:perspective(1400px) rotateY(720deg) scale(1)}
}
/* easeOutCubic (= 1-(1-t)^3, l'easing exact de la vidéo) : 2 tours rapides qui décélèrent,
   un seul segment continu donc parfaitement fluide. */
.card-spin720{animation:cardSpin720 .85s cubic-bezier(.215,.61,.355,1) both;transform-style:preserve-3d;will-change:transform;backface-visibility:visible;transform-origin:center center}
@media (prefers-reduced-motion: reduce){ .card-spin720{animation:pop .25s ease both} }

/* ===== Carte Bleus « effet whaou » : pop 3D vers le centre + flip vers les stats ===== */
@keyframes wcFadeIn{from{opacity:0}to{opacity:1}}
@keyframes cardPopCenter{
  0%   {transform:translate(var(--dx),var(--dy)) scale(var(--s0)) rotateY(0deg)}
  100% {transform:translate(0,0) scale(1) rotateY(720deg)}
}
.popcard-back{position:fixed;inset:0;z-index:600;background:rgba(2,5,14,.92);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:18px;animation:wcFadeIn .22s ease both}
.popcard-persp{perspective:1500px}
.popcard{width:min(460px,94vw);aspect-ratio:250/360;max-height:90vh;cursor:pointer;transform-style:preserve-3d;will-change:transform;animation:cardPopCenter .95s cubic-bezier(.215,.61,.355,1) backwards}
.popcard-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.45,.05,.2,1)}
.popcard-inner.flipped{transform:rotateY(180deg)}
.popface{position:absolute;inset:0;border-radius:18px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 26px 64px rgba(0,0,0,.6)}
/* Pendant le spin : on ne montre QUE la photo (miroir en demi-tour, comme la vidéo) ; stats masquées */
.popcard-inner:not(.flipped) .popface.front{-webkit-backface-visibility:visible;backface-visibility:visible}
.popcard-inner:not(.flipped) .popface.back{display:none}
.popcard-inner.flipped .popface{-webkit-backface-visibility:hidden;backface-visibility:hidden}
/* Verso : masquer complètement le recto (photo + fond flou en position:absolute+filter transperçaient par-dessus les stats et affichaient le texte en miroir) */
.popcard-inner.flipped .popface.front{display:none}
/* Retournée : masquer la note/pos et drapeau/numéro (z-index -> couches 3D qui transperçaient en miroir) */
.popcard-inner.flipped .pc-rt,.popcard-inner.flipped .pc-fl{display:none}
.popface.back{transform:rotateY(180deg)}
/* Face recto (photo) */
.pc-rt{position:absolute;top:9px;left:11px;text-align:center;z-index:2;font-family:Anton,sans-serif;line-height:1}
.pc-rt-n{font-size:clamp(20px,6.4vw,26px)}
.pc-rt>div:last-child{font-size:9px;font-weight:900;letter-spacing:1px}
.pc-fl{position:absolute;top:9px;right:11px;z-index:3;font-size:15px;color:#fff;font-family:Anton,sans-serif}
.pc-photo{flex:1;position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;min-height:0}
@keyframes pcPhotoZoom{from{transform:scale(1)}to{transform:scale(1.1)}}
.pc-photo img{width:100%;height:100%;object-fit:cover;object-position:center top;animation:pcPhotoZoom 8s ease-in-out infinite alternate;will-change:transform}
.pc-nm{text-align:center;font-size:clamp(13px,4.4vw,16px);font-weight:900;color:#fff;text-transform:uppercase;letter-spacing:.5px;padding:6px 8px 0;background:linear-gradient(transparent,rgba(0,0,0,.72))}
.pc-cl{text-align:center;font-size:11px;color:rgba(255,255,255,.6);font-weight:700;padding-bottom:5px;background:rgba(0,0,0,.72)}
.pc-hint{text-align:center;font-size:9.5px;color:rgba(255,255,255,.5);padding:3px 0 8px;background:rgba(0,0,0,.72)}
/* Face verso (stats live) */
.popface.back{padding:clamp(11px,3vw,15px) clamp(11px,3vw,15px) clamp(10px,2.5vw,13px);justify-content:flex-start;gap:6px}
.ps-head{text-align:center}
.ps-num{font-size:10px;font-weight:900;letter-spacing:1px}
.ps-name{font-family:Anton,sans-serif;font-size:clamp(16px,5.2vw,22px);color:#fff;margin-top:2px;line-height:1.05}
.ps-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:2px}
.ps-cell{background:rgba(255,255,255,.07);border-radius:8px;padding:clamp(5px,1.6vw,7px) 4px;text-align:center}
.ps-v{font-family:Anton,sans-serif;font-size:clamp(17px,5.6vw,24px);color:#fff;line-height:1}
.ps-l{font-size:8.5px;font-weight:800;letter-spacing:1px;color:rgba(255,255,255,.5);margin-top:3px}
.ps-sub{font-size:8px;color:rgba(255,255,255,.4);margin-top:2px}
.ps-cards{display:flex;justify-content:center;gap:14px;font-size:13px;font-weight:800;color:#fff;margin-top:auto;padding-top:4px}
.ps-rating{font-family:Anton,sans-serif}
@media (prefers-reduced-motion: reduce){ .popcard{animation:pop .3s ease both} }
/* ===== Bloc Soutien + Suggestions (footer) ===== */
#support-box{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin:0 auto 24px;padding:20px 22px;border:1px solid #2a3a60;border-radius:16px;background:linear-gradient(135deg,#0c1530,#0a1024)}
#support-box h2{color:#E8B84B;font-size:18px;margin:0 0 7px}
#support-box h3{color:#e8edf7;font-size:15px;margin:0 0 7px}
#support-box p{margin:0 0 13px;color:#9fb0d6;font-size:13px;line-height:1.6}
.kofi-btn{display:inline-block;background:linear-gradient(135deg,#F2C75C,#caa036);color:#1a1206;font-weight:800;font-size:14.5px;padding:12px 22px;border-radius:11px;text-decoration:none;box-shadow:0 8px 22px rgba(232,184,75,.28);transition:filter .15s,transform .15s}
.kofi-btn:hover{filter:brightness(1.07);transform:translateY(-1px)}
#suggest-form{display:flex;flex-direction:column;gap:9px}
#suggest-form textarea,#suggest-form input[type=email]{padding:10px 12px;border-radius:10px;border:1px solid #2a3a60;background:#0a1024;color:#e8edf7;font:inherit;font-size:13px;width:100%;box-sizing:border-box}
#suggest-form textarea{min-height:72px;resize:vertical}
#suggest-form textarea:focus,#suggest-form input[type=email]:focus{outline:none;border-color:#2a5bd7}
#suggest-form button{align-self:flex-start;background:#2a5bd7;color:#fff;font-weight:800;font-size:13px;padding:10px 20px;border:none;border-radius:10px;cursor:pointer;transition:filter .15s}
#suggest-form button:hover{filter:brightness(1.1)}
#suggest-form button:disabled{opacity:.6;cursor:default}
#suggest-msg{color:#5fd38a;font-weight:700;font-size:14px;padding:10px 0}
@media (max-width:680px){ #support-box{grid-template-columns:1fr;gap:20px;padding:18px} #support-box h2{font-size:17px} .kofi-btn{display:block;text-align:center} #suggest-form button{align-self:stretch;text-align:center} }
/* Footer SEO discret (maillage) */
#seo-nav details{margin:4px 0}#seo-nav summary{cursor:pointer;color:#cdd9f0;font-weight:700}

/* tableau 2 côtés (façon FIFA) */
.bracket.bracket-2s { grid-auto-columns: 198px; gap: 18px; min-width: 1880px; }
.bracket-2s .col-FIN { grid-auto-columns: 220px; }
.bmir .bm-slot { flex-direction: row-reverse; }
.bmir .bm-code { flex-direction: row-reverse; }
.bmir .bcol-head { /* titre centré ok */ }
.bmir .bmatch::after { display: none; }
.bmir .bmatch::before { content: ''; position: absolute; left: -14px; top: 50%; width: 14px; height: 1px; background: var(--border); }

/* Popup champion (Espagne 2026) */
@keyframes champFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes champPop { 0% { transform: scale(.82); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes champGlow { 0%, 100% { box-shadow: 0 0 40px 6px rgba(232,184,75,.35), 0 0 0 1px rgba(232,184,75,.4); } 50% { box-shadow: 0 0 70px 14px rgba(232,184,75,.55), 0 0 0 1px rgba(232,184,75,.6); } }
@keyframes champFlagWave { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

.champion-back {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(1200px 800px at 50% 10%, #122a5e 0%, #0a1733 45%, #030712 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: champFadeIn .3s ease both;
  overflow-y: auto;
}
.champion-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.champion-card {
  position: relative; z-index: 1; max-width: 480px; width: 100%;
  background: linear-gradient(180deg, #0e1730 0%, #0a1226 100%);
  border: 1px solid rgba(232,184,75,.4); border-radius: 22px;
  padding: 38px 26px 30px; text-align: center;
  animation: champPop .5s cubic-bezier(.2,.9,.3,1.3) both;
  margin: auto;
}
.champion-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06);
  color: #fff; font-size: 15px; cursor: pointer; line-height: 1;
}
.champion-close:hover { background: rgba(255,255,255,.14); }
.champion-flag {
  display: flex; flex-direction: column; width: 190px; height: 127px; margin: 0 auto 18px;
  border-radius: 6px; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 2px rgba(0,0,0,.25);
  animation: champFlagWave 3.2s ease-in-out infinite;
  transform-origin: center;
}
.champion-flag-band { display: block; width: 100%; }
.champion-flag-band.top, .champion-flag-band.bot { flex: 1; background: #AA151B; }
.champion-flag-band.mid { flex: 2; background: #F1BF00; }
.champion-trophy {
  width: 220px; height: 220px; object-fit: cover; border-radius: 50%;
  margin: 0 auto 20px; display: block; background: #0a1733;
  animation: champGlow 2.4s ease-in-out infinite;
}
.champion-title {
  font-family: var(--display); font-size: 26px; line-height: 1.15; color: #fff;
  margin: 0 0 10px; text-wrap: balance;
}
.champion-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 24px; }
.champion-cta {
  border: none; border-radius: 100px; padding: 13px 28px; font-weight: 800; font-size: 14.5px;
  background: linear-gradient(135deg, #FFE566, #E8B84B); color: #1a1204; cursor: pointer;
}
.champion-cta:hover { filter: brightness(1.06); }
@media (max-width: 480px) {
  .champion-trophy { width: 170px; height: 170px; }
  .champion-flag { width: 150px; height: 100px; }
  .champion-title { font-size: 21px; }
  .champion-card { padding: 30px 18px 24px; }
}
