/* ================= GoalSwipe ================= */
:root {
  --bg: #0a0f14;
  --bg-soft: #101820;
  --card: #152029;
  --card-2: #1a2633;
  --line: #2a3a4a;
  --line-soft: #ffffff12;

  --text: #eef4f8;
  --muted: #8ba0b0;
  --text-on-accent: #06130b;

  --accent: #2fd47a;
  --accent-dark: #17a556;
  --accent-glow: #2fd47a33;
  --points: #ffc93c;
  --points-soft: #ffc93c44;
  --away: #4aa3ff;
  --danger: #ff6b6b;        /* v25 : token erreur (spec Designer) */
  --danger-text: #ff9a9a;   /* v25 : texte d'erreur sur fond sombre */
  --danger-soft: #ff6b6b44;

  --green: var(--accent);
  --green-dark: var(--accent-dark);
  --gold: var(--points);
  --red: var(--danger);
  --blue: var(--away);

  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --nav-h: 64px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;

  --shadow-card: 0 10px 30px #0006;
  --shadow-cta: 0 6px 20px var(--accent-glow);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #05080b;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name, .odd-val, .points-pill { font-family: 'Sora', 'Inter', sans-serif; }

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 50% -200px, #12312255, transparent),
    var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px #000a;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(#0b1014f2, #0b1014e6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ffffff0a;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { font-size: 22px; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-name em { font-style: normal; color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #3a2f11, #2a2410);
  border: 1.5px solid #ffc93c88;
  color: var(--points); font-weight: 800; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; cursor: default;
  box-shadow: 0 0 18px #ffc93c33, inset 0 1px 0 #ffc93c22;
}
.points-pill {
  color: #ffe08a;
  border-color: #ffc93caa;
}
.pill-ico { font-size: 14px; }
.points-pill.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.18); } }

.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--line);
  font-size: 19px; cursor: pointer; display: grid; place-items: center;
}

.gift-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: var(--card-2); border: 1px solid #ffc93c55;
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
  animation: bounce 2.2s ease infinite;
}
.gift-dot {
  position: absolute; top: 1px; right: 1px; width: 9px; height: 9px;
  background: var(--red); border-radius: 50%; border: 2px solid var(--bg);
}

/* ---------- Pages ---------- */
.pages { flex: 1; padding: 14px 14px calc(var(--nav-h) + 24px); }
.page { display: none; animation: fadein .25s ease; }
.page.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.section-title {
  font-size: 21px; font-weight: 800; letter-spacing: -.02em;
  margin: 6px 2px 4px;
}
.section-sub { color: var(--muted); font-size: 13px; margin: 0 2px 14px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip img { width: 16px; height: 16px; }
.chip.active { background: #133024; border-color: var(--green-dark); color: var(--green); }

/* ---------- Match cards ---------- */
.day-group { margin-bottom: 18px; }
.day-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0 2px 8px;
}
.match-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; margin-bottom: 10px;
  cursor: pointer; transition: border-color .15s, transform .1s;
}
.match-card:active { transform: scale(.985); }
.match-card:hover { border-color: #3a4f63; }
.match-card.done { opacity: .85; cursor: default; }

.mc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mc-league { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mc-league img { width: 14px; height: 14px; }
.mc-time { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mc-time.live { color: var(--green); }

.mc-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
/* Crest illustré v2 — SVG maison dans img/crests/ (docs/design-crests-maison.md) */
.crest {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  overflow: visible;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--crest, var(--text));
}
.crest::after { display: none; } /* plus de barre initiales */
.crest-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px #0008);
}
.crest.has-img .crest-ini { display: none !important; }
.crest:not(.has-img):not(.crest-fallback) .crest-ini { display: none; }
.crest-ini {
  font-size: 15px; line-height: 1;
  text-shadow: 0 2px 4px #000a;
}
.match-card .crest { width: 42px; height: 42px; }
.league-chip {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line-soft);
  color: var(--muted); font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.chip .league-chip { margin-right: 4px; padding: 2px 6px; font-size: 9.5px; }

.team-name { font-size: 12.5px; font-weight: 600; text-align: center; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-vs { text-align: center; }
.mc-vs .vs { font-size: 12px; color: var(--muted); font-weight: 700; }
.mc-vs .score { font-size: 22px; font-weight: 800; font-family: 'Sora'; }

.mc-odds { display: flex; gap: 8px; margin-top: 12px; }
.odd {
  flex: 1; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 7px 4px; text-align: center;
}
.odd-lbl { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.odd-val { display: block; font-size: 15px; font-weight: 700; color: var(--green); }
.mc-betted {
  margin-top: 12px; font-size: 12.5px; font-weight: 600;
  background: #13302433; color: var(--green); border: 1px dashed var(--green-dark);
  padding: 8px 10px; border-radius: 10px; text-align: center;
}

/* ---------- Deck (mode swipe) ---------- */
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-toggle { display: flex; gap: 6px; }
.mode-toggle .chip { padding: 7px 11px; font-size: 12px; }

/* Page matchs en mode swipe : plein écran, minimum d'UI */
#page-matches.swipe-mode.active {
  display: flex; flex-direction: column;
  min-height: calc(100dvh - var(--nav-h) - 101px);
}
.deck { position: relative; height: 330px; margin-bottom: 16px; }
.deck-fs { flex: 1; height: auto; min-height: 340px; margin-bottom: 14px; }
.deck-empty { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.swipe-card {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #1e2c3a, #121c26);
  border: 1.5px solid #3d556c;
  border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between;
  touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab; will-change: transform;
  box-shadow: 0 14px 40px #000a, 0 0 0 1px #ffffff10, inset 0 1px 0 #ffffff14;
}
.swipe-card:active { cursor: grabbing; }
.swipe-card.behind-1 { transform: translateY(14px) scale(.955); z-index: 2; pointer-events: none; }
.swipe-card.behind-2 { transform: translateY(27px) scale(.91); z-index: 1; opacity: .65; pointer-events: none; }
.swipe-card.top-card { z-index: 3; }

.sc-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; flex: 1; }
.sc-teams .crest { width: 72px; height: 72px; }
.sc-teams .team-name { font-size: 14px; font-weight: 700; white-space: normal; }
.sc-teams .vs { font-size: 15px; }

.sc-odds { display: flex; gap: 8px; }
.sc-odds .odd { padding: 8px 4px; }
.sc-odds .odd-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.sc-stake {
  margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted);
  background: #0d141b88; border-radius: 10px; padding: 7px;
}
.sc-stake b { color: var(--gold); }

.ov {
  position: absolute; z-index: 5; padding: 9px 14px; border: 3px solid; border-radius: 14px;
  font-family: 'Sora'; font-weight: 800; font-size: 17px; letter-spacing: .02em;
  background: #0b1014cc; opacity: 0; pointer-events: none; max-width: 70%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Le tampon s'affiche du côté opposé au mouvement pour rester visible */
/* Stamps placés sous l'en-tête (.sc-head) pour ne plus masquer l'heure / la ligue au drag */
.ov-home { top: 52px; right: 14px; color: var(--green); border-color: var(--green); transform: rotate(8deg); }
.ov-away { top: 52px; left: 14px; color: var(--blue); border-color: var(--blue); transform: rotate(-8deg); }
.ov-draw { top: 52px; left: 50%; transform: translateX(-50%) rotate(-4deg); color: var(--gold); border-color: var(--gold); }
.ov-skip { bottom: 56px; left: 50%; transform: translateX(-50%) rotate(4deg); color: var(--muted); border-color: var(--muted); }

/* Boutons discrets façon Tinder */
.tinder-actions { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 2px 0 4px; }
.ta-btn {
  width: 52px; height: 52px; border-radius: 50%; font-size: 19px; cursor: pointer;
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: 0 4px 14px #0006;
  transition: transform .1s, border-color .15s;
}
.ta-btn:active { transform: scale(.88); }
.ta-skip { color: var(--red); border-color: #ff5d5d44; }
.ta-stake {
  width: auto; min-width: 86px; padding: 0 18px; border-radius: 999px;
  color: var(--gold); border-color: #ffc93c55;
  font-family: 'Sora'; font-weight: 800; font-size: 16px;
}

/* ---------- Décor stade : tribunes aux couleurs des deux clubs + pelouse ---------- */
.sc-bg {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; overflow: hidden;
  background: linear-gradient(180deg, #0c1219, #0a1016);
}
.swipe-card > :not(.sc-bg):not(.ov) { position: relative; z-index: 1; }

/* Tribunes : moitié gauche = supporters domicile, moitié droite = extérieur */
.sc-stands {
  position: absolute; inset: 0 0 30% 0;
  background:
    radial-gradient(240px 170px at 10% -6%, var(--h2), transparent 72%),
    radial-gradient(240px 170px at 90% -6%, var(--a2), transparent 72%),
    linear-gradient(100deg, var(--h1) 0% 41%, transparent 54%),
    linear-gradient(100deg, transparent 46%, var(--a1) 59% 100%);
}
/* Foule : trame de points aux couleurs du club, qui s'estompe vers la pelouse */
.sc-stands::before, .sc-stands::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  background-image:
    radial-gradient(var(--hd) 1.4px, transparent 1.9px),
    radial-gradient(var(--hd) 1.1px, transparent 1.6px);
  background-size: 17px 14px, 17px 14px;
  background-position: 0 0, 8px 7px;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 92%);
  opacity: .3;
}
.sc-stands::before { left: 0; right: 55%; }
.sc-stands::after {
  left: 55%; right: 0;
  background-image:
    radial-gradient(var(--ad) 1.4px, transparent 1.9px),
    radial-gradient(var(--ad) 1.1px, transparent 1.6px);
}

/* Pelouse : bandes tondues, ligne médiane et rond central */
.sc-pitch {
  position: absolute; left: 0; right: 0; bottom: 0; height: 31%;
  background:
    repeating-linear-gradient(90deg, #ffffff06 0 30px, transparent 30px 60px),
    linear-gradient(180deg, #123723, #0e2b1b 60%, #0b2115);
  border-top: 1px solid #ffffff1c;
}
.sc-pitch::before {
  content: ''; position: absolute; left: 50%; top: -38px;
  width: 116px; height: 116px; border-radius: 50%;
  border: 2px solid #ffffff17; transform: translateX(-50%);
}
.sc-pitch::after {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: #ffffff10; transform: translateX(-50%);
}

/* Projecteurs du stade */
.sc-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(150px 90px at 6% -4%, #ffffff14, transparent 70%),
    radial-gradient(150px 90px at 94% -4%, #ffffff14, transparent 70%);
}

.sc-head { display: flex; align-items: center; justify-content: space-between; }
.deck-fs .sc-teams .crest { width: 96px; height: 96px; }
/* Correctif : l'ancien sélecteur « .deck-fs .deck-fs … » ne matchait jamais (doublon .deck-fs).
   Sélecteur corrigé ; la carte du dessus est de toute façon surchargée par le bloc C+ en fin de fichier. */
.deck-fs .sc-teams .team-name { font-size: 16px; text-shadow: 0 2px 10px #000c; }
.deck-fs .sc-teams .vs {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: #0b1014f0; border: 1.5px solid #2fd47a66;
  font-size: 14px; color: var(--text);
  box-shadow: 0 4px 18px #0009, 0 0 16px #2fd47a33;
}
.deck-fs .sc-odds .odd {
  background: #0b1014dd;
  border-color: #ffffff2a;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 #ffffff12;
}
.deck-fs .sc-odds .odd-val { color: #3dff9a; font-size: 16px; }
.deck-fs .sc-head .mc-league, .deck-fs .sc-head .mc-time {
  color: #c6d4e0; text-shadow: 0 1px 6px #000c;
}

/* Aide gestuelle (premier lancement) */
.gesture-hint {
  position: absolute; inset: 0; z-index: 6; border-radius: 22px;
  background: #0b1014c9; backdrop-filter: blur(3px);
  display: grid; place-items: center;
  pointer-events: none; transition: opacity .3s;
}
.gh-inner { display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; font-weight: 600; }
.gh-row { display: flex; align-items: center; gap: 12px; }
.gh-arrow {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid;
  display: grid; place-items: center; font-size: 18px;
}
.gh-left { color: var(--green); border-color: var(--green); }
.gh-right { color: var(--blue); border-color: var(--blue); }
.gh-down { color: var(--gold); border-color: var(--gold); }
.gh-up { color: var(--muted); border-color: var(--muted); }
.gh-cta { margin-top: 6px; text-align: center; color: var(--muted); font-size: 12.5px; animation: bounce 2s ease infinite; }

/* ---------- Sheet (bet modal) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: #000a; z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; transform: translate(-50%, 105%);
  bottom: 0; width: 100%; max-width: 440px; z-index: 41;
  background: var(--bg-soft); border-radius: 22px 22px 0 0;
  border: 1px solid var(--line); border-bottom: none;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transition: transform .28s cubic-bezier(.2,.8,.25,1);
  max-height: 88dvh; overflow-y: auto;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grab { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-size: 17px; margin-bottom: 2px; }
.sheet .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

.pick-row { display: flex; gap: 8px; margin-bottom: 16px; }
.pick {
  flex: 1; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 12px 6px; text-align: center; cursor: pointer;
  transition: all .12s;
}
.pick .p-lbl { font-size: 12px; color: var(--muted); font-weight: 600; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .p-odd { font-size: 17px; font-weight: 800; font-family: 'Sora'; color: var(--green); }
.pick.sel { border-color: var(--green); background: #12302366; box-shadow: 0 0 0 3px #2fd47a22; }

.stake-lbl { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; }
.stake-lbl span { color: var(--muted); font-weight: 500; }
.stake-row { display: flex; gap: 8px; margin-bottom: 14px; }
.stake {
  flex: 1; padding: 10px 0; border-radius: 12px; text-align: center;
  background: var(--card); border: 1.5px solid var(--line); cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--text); font-family: 'Sora';
}
.stake.sel { border-color: var(--gold); color: var(--gold); background: #3a2f1133; }
.stake:disabled { opacity: .35; cursor: not-allowed; }

.exact-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.exact-row .hint { font-size: 12px; color: var(--muted); }
.score-inputs { display: flex; align-items: center; gap: 8px; margin: 10px 0 16px; }
.score-inputs input {
  width: 58px; text-align: center; font-size: 20px; font-weight: 800;
  background: var(--card); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 10px 0; font-family: 'Sora';
}
.score-inputs .dash { color: var(--muted); font-weight: 800; }

.switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; transition: background .15s;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: var(--muted); border-radius: 50%; transition: all .15s;
}
.switch input:checked + .track { background: var(--green-dark); }
.switch input:checked + .track::after { left: 20px; background: #fff; }

.potential {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px;
}
.potential strong { color: var(--gold); font-size: 17px; font-family: 'Sora'; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Inter'; font-weight: 700; font-size: 15px;
  padding: 13px 18px; color: #06130b; width: 100%;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--green), #1fb864); box-shadow: var(--shadow-cta); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-gold { background: linear-gradient(135deg, #ffd95e, #f4a814); }
.btn-big { padding: 15px 18px; font-size: 16px; }
.btn-small { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 11px; }

/* ---------- Bets page ---------- */
.bet-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.simulate-bar {
  background: linear-gradient(135deg, #1b2b3a, #14222e);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.simulate-bar .txt { flex: 1; font-size: 12.5px; color: var(--muted); }
.simulate-bar .txt strong { color: var(--text); display: block; font-size: 14px; margin-bottom: 2px; }

.bet-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px;
}
.bet-card.won { border-color: #2fd47a66; background: linear-gradient(#16202a, #12281c33); }
.bet-card.lost { opacity: .75; }
.bc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bc-match { font-weight: 700; font-size: 14px; }
.bc-status { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; letter-spacing: .04em; }
.bc-status.pending { background: #2a3a4a; color: var(--blue); }
.bc-status.won { background: #143523; color: var(--green); }
.bc-status.lost { background: #3a1c22; color: var(--red); }
.bc-detail { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.bc-detail b { color: var(--text); }
.bc-gain { font-weight: 800; font-family: 'Sora'; }
.bc-gain.plus { color: var(--green); }
.bc-gain.minus { color: var(--red); }

.empty {
  text-align: center; color: var(--muted); padding: 46px 20px; font-size: 14px;
}
.empty .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* ---------- Ranking ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 18px 0 22px; }
.pod {
  flex: 1; max-width: 110px; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px 14px 0 0; padding: 12px 6px 10px;
  position: relative;
}
.pod .p-av { font-size: 30px; }
.pod .p-name { font-size: 12px; font-weight: 700; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .p-pts { font-size: 12px; color: var(--gold); font-weight: 700; font-family: 'Sora'; }
.pod .p-medal { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 20px; }
.pod-1 {
  height: 138px;
  border-color: #ffc93ccc;
  background: linear-gradient(180deg, #3a2f18, var(--card));
  box-shadow: 0 0 36px #ffc93c55, 0 8px 24px #0008, inset 0 1px 0 #ffc93c44;
}
.pod-2 { height: 108px; }
.pod-3 { height: 96px; }

.rank-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 14px; margin-bottom: 8px;
}
.rank-row.me { border-color: var(--accent-dark); background: #12281c55; }
.rr-pos { width: 26px; font-weight: 800; font-family: 'Sora'; color: var(--muted); font-size: 14px; }
.rr-av { font-size: 22px; }
.rr-name { flex: 1; font-weight: 600; font-size: 14px; }
.rr-name .you { font-size: 10.5px; color: var(--green); font-weight: 800; margin-left: 6px; }
.rr-pts { font-weight: 800; font-family: 'Sora'; color: var(--gold); font-size: 14px; }
.rr-delta { font-size: 11px; width: 44px; text-align: right; font-weight: 700; }
.rr-delta.up { color: var(--green); }
.rr-delta.down { color: var(--red); }

/* ---------- Shop ---------- */
.shop-balance {
  background: linear-gradient(135deg, #2a2410, #1c1a10);
  border: 1px solid #ffc93c44; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.shop-balance .lbl { font-size: 12.5px; color: var(--muted); }
.shop-balance .val { font-size: 22px; font-weight: 800; font-family: 'Sora'; color: var(--gold); }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 12px; text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.shop-item .s-emoji { font-size: 34px; }
.shop-item .s-name { font-weight: 700; font-size: 13.5px; }
.shop-item .s-desc { font-size: 11.5px; color: var(--muted); flex: 1; }
.shop-item .s-price { font-weight: 800; font-family: 'Sora'; color: var(--gold); font-size: 14px; }
.shop-item button { margin-top: 4px; }
.shop-item.owned { border-color: #2fd47a55; }
.owned-tag { font-size: 11px; color: var(--green); font-weight: 800; padding: 8px 0 2px; }

.inv-title { margin: 20px 2px 10px; font-size: 15px; font-weight: 800; }
.inv-row { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; font-size: 13px; display: flex; align-items: center; gap: 7px;
}

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: #0d141be8; backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  flex: 1; background: none; border: none; color: var(--muted);
  font-family: 'Inter'; font-size: 10.5px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  position: relative;
}
.nav-btn .nav-ico {
  font-size: 20px;
  filter: grayscale(0.55) opacity(0.55);
  transition: filter .15s, transform .15s;
}
.nav-btn.active {
  color: #3dff9a;
  text-shadow: 0 0 12px #2fd47a66;
}
.nav-btn.active .nav-ico {
  filter: none;
  transform: scale(1.08);
}
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}


.nav-badge {
  position: absolute; top: 8px; right: calc(50% - 22px);
  background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 999px;
  display: none; place-items: center; padding: 0 4px;
}
.nav-badge.show { display: grid; }

/* ---------- Onboarding ---------- */
.onboarding {
  position: fixed; inset: 0; z-index: 60;
  background-color: #05080b;
  background-image:
    radial-gradient(700px 380px at 50% -40px, #1a5c38cc, transparent 65%),
    radial-gradient(500px 280px at 15% 110%, #0d3a24aa, transparent 60%),
    radial-gradient(500px 280px at 85% 110%, #0d3a24aa, transparent 60%),
    linear-gradient(180deg, #0a1410 0%, #05080b 55%);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.onboarding.show { display: flex; }
.ob-card { width: 100%; max-width: 380px; text-align: center; }
.ob-hero { font-size: 64px; filter: drop-shadow(0 8px 24px #2fd47a44); animation: bounce 2.4s ease infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.ob-card h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 8px; text-shadow: 0 0 28px #2fd47a33; }
.ob-card h1 em { font-style: normal; color: var(--green); }
.ob-tag { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 26px; }
.ob-tag strong { color: var(--text); }
.ob-label { display: block; text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 14px 0 7px; }
.ob-card input[type=text] {
  width: 100%; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; color: var(--text); font-size: 16px; font-weight: 600;
  padding: 13px 16px; outline: none; font-family: 'Inter';
}
.ob-card input[type=text]:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 3px var(--accent-glow); }
.ob-avatars { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ob-av {
  width: 46px; height: 46px; border-radius: 50%; font-size: 22px;
  background: var(--card); border: 2px solid var(--line); cursor: pointer;
  display: grid; place-items: center;
}
.ob-av.sel { border-color: var(--accent); background: #12302366; }

/* ---------- Profile modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: #000a;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 360px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  animation: fadein .2s ease;
}
.pf-head { text-align: center; margin-bottom: 16px; }
.pf-head .pf-av { font-size: 46px; }
.pf-head .pf-name { font-size: 19px; font-weight: 800; margin-top: 4px; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pf-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.pf-stat .v { font-size: 17px; font-weight: 800; font-family: 'Sora'; color: var(--green); }
.pf-stat .l { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.pf-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #ff5d5d44; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px);
  transform: translate(-50%, 20px); z-index: 70;
  background: #1c2835f2; border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; max-width: 90%;
  text-align: center; backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Confetti ---------- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti-bit {
  position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .6; }
}

.daily-banner {
  background: linear-gradient(135deg, #143523, #0f2a1c);
  border: 1px solid #2fd47a44; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
  display: flex; align-items: center; gap: 10px;
}
.daily-banner b { color: var(--green); }
/* Stadium BG behind swipe deck (docs/front-stadium-bg-hook.md) */
#page-matches {
  position: relative;
  isolation: isolate;
}
.stadium-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg, #0a0f14);
  background-image: var(--stadium-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity .35s ease;
}
.stadium-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, #0009 100%),
    linear-gradient(180deg, #0005 0%, #0003 45%, #0008 100%);
}
.stadium-bg.stadium-fallback-css {
  background-image:
    radial-gradient(ellipse at 50% 30%, #1a3a2a 0%, transparent 55%),
    linear-gradient(180deg, #0b1520 0%, #0a1a12 55%, #071008 100%);
}
.stadium-bg.stadium-fallback-css::after {
  background:
    radial-gradient(ellipse at center, transparent 40%, #0009 100%),
    linear-gradient(180deg, #0006 0%, transparent 45%, #000a 100%);
}
#page-matches > *:not(.stadium-bg) {
  position: relative;
  z-index: 1;
}

/* Stadium visibility: stade sur la top-card + pas de ghosting */
#page-matches.swipe-mode.active {
  position: relative;
  overflow: hidden;
  background: transparent;
  /* plein cadre sous le padding .pages */
  margin: -14px -14px 0;
  padding: 10px 12px 0;
  width: auto;
  min-height: calc(100dvh - var(--nav-h) - 72px);
}
#page-matches .stadium-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* Soften page-level stadium vignette so edge ring still reads */
#page-matches .stadium-bg::after {
  background:
    radial-gradient(ellipse at center, transparent 50%, #0005 100%),
    linear-gradient(180deg, #0003 0%, #0001 45%, #0005 100%);
}
#page-matches.swipe-mode .deck-fs,
#page-matches.swipe-mode .tinder-actions,
#page-matches.swipe-mode .deck-empty {
  position: relative;
  z-index: 1;
}
/* Cards inset so a thin page stadium ring frames the deck */
#page-matches.swipe-mode .swipe-card {
  inset: 20px 16px 32px;
  background: linear-gradient(160deg, #1e2c3a, #121c26);
  backdrop-filter: none;
  opacity: 1;
  filter: none;
}
/* Ghosting kill: behind cards always fully opaque solid stack */
#page-matches.swipe-mode .swipe-card.behind-1,
#page-matches.swipe-mode .swipe-card.behind-2,
.swipe-card.behind-1,
.swipe-card.behind-2 {
  opacity: 1;
  filter: none;
  background: #121c26;
}
/* Hide behind-card content so names never show through the top card */
#page-matches.swipe-mode .swipe-card.behind-1 > :not(.sc-bg),
#page-matches.swipe-mode .swipe-card.behind-2 > :not(.sc-bg),
.swipe-card.behind-1 > :not(.sc-bg),
.swipe-card.behind-2 > :not(.sc-bg) {
  visibility: hidden;
}
#page-matches.swipe-mode .swipe-card.behind-1 .sc-bg,
#page-matches.swipe-mode .swipe-card.behind-2 .sc-bg {
  opacity: 1;
  background: #121c26;
  background-image: none;
}
/* Real venue photo on top card (class set by venues.js) */
.swipe-card.top-card .sc-bg.sc-bg--venue,
.swipe-card.next-card .sc-bg.sc-bg--venue {
  background-color: #0a1016;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
}
.swipe-card.top-card .sc-bg.sc-bg--venue .sc-stands,
.swipe-card.top-card .sc-bg.sc-bg--venue .sc-pitch,
.swipe-card.next-card .sc-bg.sc-bg--venue .sc-stands,
.swipe-card.next-card .sc-bg.sc-bg--venue .sc-pitch {
  display: none !important;
}
/* Light readability veil — stadium must stay readable (tribunes + pitch) */
.swipe-card.top-card .sc-bg.sc-bg--venue::before,
.swipe-card.next-card .sc-bg.sc-bg--venue::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.42) 0%,
    rgba(0,0,0,.18) 40%,
    rgba(0,0,0,.10) 65%,
    rgba(0,0,0,.38) 100%
  );
}
/* Kill procedural spotlights washing the photo */
.swipe-card.top-card .sc-bg.sc-bg--venue::after,
.swipe-card.next-card .sc-bg.sc-bg--venue::after {
  opacity: 0.35;
}
#page-matches.swipe-mode .tinder-actions {
  z-index: 2;
}

/* =====================================================================
   Blasons sur la carte swipe — Variante C+ FINE (GO Romain, 2026-09-26)
   Réf. : goalswipe-crest-integration/note-css.md (C+ « fin ») + ajout Romain : gros blasons.
   - contour bicolore 2px (1.25px bande club + 0.75px liseré), ligne centrale 1px derrière le VS
   - blason ≈42 % de la largeur de carte (47cqi ≈ 140px sur 390px), halo couleur club, nom blanc gras dessous
   - drag : .is-drag-home / .is-drag-away posées par attachSwipe()
   Variables alimentées dans renderDeck() : --home-color/--away-color (+ --home-edge/--away-edge)
   ===================================================================== */
@property --home-mix { syntax: '<percentage>'; inherits: true; initial-value: 85%; }
@property --away-mix { syntax: '<percentage>'; inherits: true; initial-value: 85%; }
@property --home-glow { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
@property --away-glow { syntax: '<percentage>'; inherits: true; initial-value: 0%; }

.swipe-card.top-card,
.swipe-card.next-card {
  container-type: inline-size;              /* pour les unités cqi */
  --ring-w: 1.25px;                         /* bande couleur club */
  --edge-w: .75px;                          /* liseré intérieur → total ≈ 2px */
  --home-color: #3d556c; --away-color: #3d556c;
  --home-edge: var(--home-color);
  --away-edge: var(--away-color);
  --home-mix: 85%; --away-mix: 85%;
  --home-glow: 0%; --away-glow: 0%;
  --glow-blur: 0px;
  --home-c: color-mix(in srgb, var(--home-color) var(--home-mix), transparent);
  --away-c: color-mix(in srgb, var(--away-color) var(--away-mix), transparent);
  --home-e: color-mix(in srgb, var(--home-edge) var(--home-mix), transparent);
  --away-e: color-mix(in srgb, var(--away-edge) var(--away-mix), transparent);
  transition: --home-mix .18s ease, --away-mix .18s ease, --home-glow .18s ease, --away-glow .18s ease;
}

/* 1) Contour bicolore : anneau masqué, au-dessus du contenu (z 4), sous les stamps (z 5) */
.swipe-card.top-card::after,
.swipe-card.next-card::after {
  content: ""; position: absolute; z-index: 4; pointer-events: none;
  inset: -1.5px;                            /* recouvre la bordure 1.5px existante */
  border-radius: inherit;
  border: var(--ring-w) solid transparent;
  padding: var(--edge-w);
  background:
    linear-gradient(90deg, var(--home-e) 0 48%, var(--away-e) 52% 100%) padding-box,
    linear-gradient(90deg, var(--home-c) 0 48%, var(--away-c) 52% 100%) border-box;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Glow extérieur (visible seulement pendant le drag en variante fine) */
.swipe-card.top-card::before,
.swipe-card.next-card::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -2px; border-radius: inherit;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--home-color) var(--home-glow), transparent) 0 46%,
    color-mix(in srgb, var(--away-color) var(--away-glow), transparent) 54% 100%);
  filter: blur(var(--glow-blur));
}

/* 2) Zone équipes : gros blasons, marges resserrées */
.deck-fs .top-card .sc-teams,
.deck-fs .next-card .sc-teams {
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  column-gap: 0;
  margin-inline: -10px;                     /* récupère 10px de padding de carte de chaque côté */
  padding-block: 6px;
  /* le halo flou est rogné juste à l'intérieur du contour (pas de débord hors carte) */
  clip-path: inset(-80px -6px);
}
/* Ligne centrale 1px derrière le VS, fondu haut/bas */
.deck-fs .top-card .sc-teams::before,
.deck-fs .next-card .sc-teams::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: -4%; bottom: 0; width: 1px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.7) 22%,
                                      rgba(255,255,255,.7) 78%, transparent 100%);
  filter: drop-shadow(0 0 3px rgba(255,255,255,.45));
}
.deck-fs .top-card .sc-teams .mc-vs,
.deck-fs .next-card .sc-teams .mc-vs { position: relative; z-index: 2; display: grid; place-items: center; }
.deck-fs .top-card .sc-teams .vs,
.deck-fs .next-card .sc-teams .vs {
  position: relative; z-index: 2;
  width: 36px; height: 36px; font-size: 12px;
}
.deck-fs .top-card .sc-teams .team,
.deck-fs .next-card .sc-teams .team { position: relative; z-index: 1; gap: 6px; min-width: 0; }

.deck-fs .top-card .sc-teams .crest,
.deck-fs .next-card .sc-teams .crest {
  /* ~47 % de la zone de contenu (≈42 % de la carte), plafonné par la hauteur d'écran (petits écrans) */
  --crest-size: clamp(96px, min(47cqi, 24svh), 170px);
  --club-color: var(--crest, #fff);
  width: var(--crest-size); height: var(--crest-size);
  aspect-ratio: 1;
  isolation: isolate;                       /* le halo z-index:-1 reste derrière le blason */
  transform-origin: 0% 60%;                 /* domicile : grossit vers le centre, jamais vers le bord */
  transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .18s ease, filter .18s ease;
}
.deck-fs .top-card .sc-teams > .team:last-child .crest,
.deck-fs .next-card .sc-teams > .team:last-child .crest { transform-origin: 100% 60%; }
.deck-fs .top-card .sc-teams .crest-img,
.deck-fs .next-card .sc-teams .crest-img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)) drop-shadow(0 1px 1px rgba(0,0,0,.6));
}
/* Halo couleur club (pas de pastille : bord flou) */
.deck-fs .top-card .sc-teams .crest::before,
.deck-fs .next-card .sc-teams .crest::before {
  content: ""; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, color-mix(in srgb, var(--club-color) 75%, #fff) 90%, transparent) 0%,
    color-mix(in srgb, var(--club-color) 50%, transparent) 45%,
    transparent 100%);
  filter: blur(10px);
  transition: opacity .18s ease, transform .18s ease;
}
/* Plus de code 3 lettres sur la carte swipe (le nom complet est affiché dessous) */
.deck-fs .top-card .sc-teams .crest-ini,
.deck-fs .next-card .sc-teams .crest-ini { display: none !important; }
/* v25 : club SANS blason (png/svg absents) → repli initiales sur la grande carte, à l'échelle des blasons (--crest-size) :
   disque aux couleurs du club, initiales blanches centrées (accents conservés : « SÉ »). */
.deck-fs .top-card .sc-teams .crest.crest-fallback .crest-ini,
.deck-fs .next-card .sc-teams .crest.crest-fallback .crest-ini {
  display: flex !important; align-items: center; justify-content: center;
  width: 82%; height: 82%; margin: 9%; box-sizing: border-box; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--crest, #2a3a48) 70%, #fff), var(--crest, #2a3a48) 58%, color-mix(in srgb, var(--crest, #2a3a48) 60%, #000));
  border: max(3px, calc(var(--crest-size) * .03)) solid var(--crest-2, #fff);
  box-shadow: 0 6px 14px rgba(0,0,0,.55), inset 0 -4px 10px rgba(0,0,0,.25);
  color: #fff; font-family: 'Sora', 'Inter', sans-serif; font-weight: 800;
  font-size: calc(var(--crest-size) * .30); line-height: 1; letter-spacing: .02em;
  padding-top: .06em;   /* compense la hauteur de l'accent (É) : centrage optique */
  text-shadow: 0 2px 6px rgba(0,0,0,.6); white-space: nowrap; overflow: visible;
}
/* Nom blanc gras sous le blason */
.deck-fs .top-card .sc-teams .team-name,
.deck-fs .next-card .sc-teams .team-name {
  color: #fff; font-family: 'Sora', 'Inter', sans-serif; font-weight: 800;
  font-size: clamp(14px, 4.6cqi, 18px); line-height: 1.15; letter-spacing: .01em;
  white-space: normal; max-width: 100%;
  text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 2px 14px rgba(0,0,0,.85);
}

/* 3) Drag : le côté tiré renforce contour + glow, son blason grossit et s'illumine */
.top-card.is-drag-home { --home-mix: 100%; --away-mix: 45%; --home-glow: 85%; --away-glow: 0%; --glow-blur: 8px; }
.top-card.is-drag-away { --away-mix: 100%; --home-mix: 45%; --away-glow: 85%; --home-glow: 0%; --glow-blur: 8px; }
.top-card.is-drag-home .sc-teams > .team:first-child .crest,
.top-card.is-drag-away .sc-teams > .team:last-child .crest { transform: scale(1.1); }
.top-card.is-drag-home .sc-teams > .team:first-child .crest::before,
.top-card.is-drag-away .sc-teams > .team:last-child .crest::before { opacity: 1; transform: scale(1.15); }
.top-card.is-drag-home .sc-teams > .team:first-child .crest-img,
.top-card.is-drag-away .sc-teams > .team:last-child .crest-img {
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.55))
          drop-shadow(0 0 14px color-mix(in srgb, var(--club-color) 85%, transparent));
}
.deck-fs .top-card .sc-teams > .team,
.deck-fs .next-card .sc-teams > .team { transition: opacity .18s ease, filter .18s ease; }
.top-card.is-drag-home .sc-teams > .team:last-child,
.top-card.is-drag-away .sc-teams > .team:first-child { opacity: .6; filter: saturate(.6); }

/* Écrans très bas (paysage / petits téléphones) : on garde de la place pour les cotes */
@media (max-height: 600px) {
  .deck-fs .top-card .sc-teams,
.deck-fs .next-card .sc-teams { padding-block: 2px; }
  .deck-fs .top-card .sc-teams .team,
.deck-fs .next-card .sc-teams .team { gap: 4px; }
  .deck-fs .top-card .sc-teams .team-name,
.deck-fs .next-card .sc-teams .team-name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .swipe-card.top-card,
  .deck-fs .top-card .sc-teams .crest,
  .deck-fs .top-card .sc-teams .crest::before,
  .deck-fs .top-card .sc-teams .team,
.swipe-card.next-card,
.deck-fs .next-card .sc-teams .crest,
.deck-fs .next-card .sc-teams .crest::before,
.deck-fs .next-card .sc-teams .team { transition: none; }
  .top-card.is-drag-home .sc-teams > .team:first-child .crest,
  .top-card.is-drag-away .sc-teams > .team:last-child .crest { transform: none; }
}

/* =====================================================================
   Cotes XL + mise/gain + page Stats (GO Romain, 2026-09-26, SW v15)
   Ne modifie pas le bloc C+ ci-dessus (blasons, contour, drag).
   ===================================================================== */

/* 1) Cotes XXL sur la carte swipe (v16 : bloc pleine largeur, prend la place libre sous les noms) */
.deck-fs .top-card .sc-odds,
.deck-fs .next-card .sc-odds {
  gap: 6px;
  margin-inline: -8px;                      /* quasi pleine largeur : 9.5px du bord de carte */
  margin-bottom: -6px;
}
.deck-fs .top-card .sc-odds .odd,
.deck-fs .next-card .sc-odds .odd {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: clamp(76px, 11svh, 92px); padding: 8px 4px 10px; border-radius: 16px;
  background: #0b1014eb; border-color: #ffffff33;
  box-shadow: 0 6px 18px #0007, inset 0 1px 0 #ffffff14;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.deck-fs .top-card .sc-odds .odd-lbl,
.deck-fs .next-card .sc-odds .odd-lbl {
  font-size: 12.5px; font-weight: 600; line-height: 1.2; color: #b9c8d4; max-width: 100%;
}
.deck-fs .top-card .sc-odds .odd-val,
.deck-fs .next-card .sc-odds .odd-val {
  font-family: 'Sora', 'Inter', sans-serif; font-weight: 800;
  font-size: clamp(30px, 11.6cqi, 36px); line-height: 1; letter-spacing: -.02em;
  color: #3dff9a; text-shadow: 0 1px 2px #000c, 0 0 16px #2fd47a45;
  font-variant-numeric: tabular-nums;
}
/* Cote visée pendant le drag */
.deck-fs .top-card .sc-odds .odd.is-target,
.deck-fs .next-card .sc-odds .odd.is-target {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 20px #ffc93c55;
  transform: translateY(-2px);
}
.deck-fs .top-card .sc-odds .odd.is-target .odd-val,
.deck-fs .next-card .sc-odds .odd.is-target .odd-val { color: #ffe08a; }
/* Bloc équipes décalé vers le bas : moins de vide photo entre les noms et les cotes */
.deck-fs .top-card .sc-teams,
.deck-fs .next-card .sc-teams { padding-top: clamp(0px, 5.2svh, 48px); } /* v19 : blasons remontés (≈-20px à 844, ≈-16px à 667 ; le bloc est centré → décalage = moitié de la baisse du padding) */
@media (max-height: 700px) {
  .deck-fs .top-card .sc-odds .odd-lbl,
.deck-fs .next-card .sc-odds .odd-lbl { font-size: 12px; }
}

/* 2) Barre d'actions : mise dorée au centre, gain potentiel dessous */
.tinder-actions.ta-with-stake {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  gap: 8px; padding: 2px 4px 6px;              /* colonnes égales → la mise reste au centre */
}
.ta-side { display: flex; align-items: center; gap: 6px; }
.ta-side-l { justify-content: flex-end; }
.ta-side-r { justify-content: flex-start; }
.ta-with-stake .ta-btn:not(.ta-stake) { width: 44px; height: 44px; font-size: 17px; }
.ta-with-stake .ta-stake {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: auto; min-width: 136px; height: 60px; padding: 0 20px; border-radius: 999px;
  background: linear-gradient(180deg, #ffd964 0%, #f5b82a 55%, #d9960f 100%);
  border: 1px solid #ffe7a0; color: #1d1404;
  box-shadow: 0 6px 20px #0008, 0 0 22px #ffc93c55, inset 0 1px 0 #fff8;
}
.ta-stake-amt { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 20px; line-height: 1.05; }
.ta-stake-gain {
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 11.5px; line-height: 1.1;
  color: #3b2a05; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ta-with-stake .ta-stake.is-pick .ta-stake-gain { color: #0f5a2c; }
.ta-with-stake .ta-stake.is-pick { box-shadow: 0 6px 20px #0008, 0 0 30px #ffc93c99, inset 0 1px 0 #fff8; }
.ta-stats { color: var(--text); }

/* 3) Page Stats du match */
#page-stats { padding-bottom: 12px; }
.st-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-back {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font: 600 13px 'Inter', sans-serif;
}
.st-back:active { transform: scale(.96); }
.st-title { margin: 0; font: 800 18px 'Sora', sans-serif; }
.st-banner {
  margin-bottom: 12px; padding: 9px 12px; border-radius: 12px;
  background: #ffc93c14; border: 1px dashed #ffc93c66; color: #ffdf8a;
  font-size: 12.5px; font-weight: 600; text-align: center;
}
.st-match {
  position: relative; overflow: hidden; margin-bottom: 12px; padding: 12px 12px 14px;
  border-radius: var(--radius-lg); border: 1px solid #3d556c;
  background: radial-gradient(120% 90% at 50% 0%, #1f3346 0%, #121c26 70%);
  box-shadow: 0 10px 30px #0008;
}
.st-match-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.st-match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.st-match-teams .crest { width: 76px; height: 76px; }
.st-match-teams .team-name { font: 800 15px 'Sora', sans-serif; color: #fff; white-space: normal; }
.st-match-teams .vs {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #0b1014f0; border: 1.5px solid #2fd47a66; font-size: 11px; font-weight: 800; color: var(--text);
}
.st-card {
  margin-bottom: 12px; padding: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.st-head h3 { margin: 0; font: 700 14px 'Sora', sans-serif; }
.st-badge {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 999px;
  background: #ffc93c1f; border: 1px solid #ffc93c66; color: #ffd66b;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.st-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.st-team-mini { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 13px; }
.st-team-mini .crest { width: 26px; height: 26px; }
.st-team-mini > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-form-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.st-form-row + .st-form-row { border-top: 1px solid var(--line-soft); }
.st-pills { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.st-pill {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 800 11.5px 'Sora', sans-serif; color: #0b1014;
}
.st-pill-w { background: var(--green); }
.st-pill-d { background: #8ba0b0; }
.st-pill-l { background: var(--red); color: #fff; }
.st-h2h-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--card-2); gap: 2px; }
.st-h2h-bar .h { background: var(--home-bar, #4aa3ff); }
.st-h2h-bar .d { background: #8ba0b0; }
.st-h2h-bar .a { background: var(--away-bar, #ff8a5d); }
.st-h2h-legend { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.st-h2h-legend b { color: var(--text); }
.st-h2h { list-style: none; margin: 10px 0 0; padding: 0; }
.st-h2h-row {
  display: grid; grid-template-columns: 74px 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px;
}
.st-h2h-date { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.st-h2h-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-h2h-l { text-align: right; }
.st-h2h-score {
  padding: 2px 8px; border-radius: 8px; background: var(--card-2);
  font: 800 12.5px 'Sora', sans-serif; font-variant-numeric: tabular-nums;
}
.st-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.st-table th { color: var(--muted); font-weight: 600; font-size: 11px; padding: 0 4px 6px; text-align: center; }
.st-table td { padding: 7px 4px; text-align: center; border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.st-table .l { text-align: left; }
.st-table .rk { font: 800 13px 'Sora', sans-serif; color: var(--gold); }
.st-table .pts { font-weight: 800; color: var(--green); }
.st-goals { display: grid; gap: 14px; }
.st-goals-team .st-team-mini { margin-bottom: 8px; }
.st-gbar { display: grid; grid-template-columns: 74px 1fr 26px; align-items: center; gap: 8px; margin: 4px 0; font-size: 12px; }
.st-gbar-lbl { color: var(--muted); }
.st-gbar-track { height: 8px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.st-gbar-fill { display: block; height: 100%; border-radius: inherit; }
.st-gbar-fill.for { background: var(--green); }
.st-gbar-fill.against { background: var(--red); }
.st-gbar-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-goals-avg { margin-top: 4px; font-size: 11px; color: var(--muted); }

/* Page Stats — données réelles (contrat Data stats-by-match v1, SW v16) */
.st-source {
  margin-bottom: 12px; padding: 7px 12px; border-radius: 12px; text-align: center;
  background: #2fd47a12; border: 1px solid #2fd47a40; color: #9fe8c0; font-size: 11.5px; font-weight: 600;
}
.st-loading { padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; }
.st-empty {
  padding: 8px 10px; border-radius: 10px; background: var(--card-2); border: 1px dashed var(--line);
  color: var(--muted); font-size: 12px; font-style: italic;
}
.st-side { padding: 8px 0; }
.st-side + .st-side { border-top: 1px solid var(--line-soft); }
.st-side > .st-team-mini { margin-bottom: 6px; }
.st-side .st-form-row { padding: 0 0 6px; }
.st-last5 { list-style: none; margin: 0; padding: 0; }
.st-last5 li {
  display: grid; grid-template-columns: 22px 70px 34px 1fr auto; align-items: center; gap: 6px;
  padding: 4px 0; font-size: 12px;
}
.st-pill.st-pill-sm { width: 20px; height: 20px; font-size: 10px; }
.st-l5-date { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.st-l5-venue { color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.st-l5-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-l5-score { font: 800 12px 'Sora', sans-serif; font-variant-numeric: tabular-nums; padding: 1px 7px; border-radius: 7px; background: var(--card-2); }
.st-split-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12.5px; color: var(--muted); }
.st-split-row .st-empty { flex: 1; }
.st-split-row.is-strong { color: var(--text); font-weight: 700; }
.st-split-val { font-variant-numeric: tabular-nums; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-chip {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line-soft); font-size: 11px; color: var(--muted);
}
.st-chip b { color: var(--text); font-size: 12px; }
.st-h2h-count { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.st-h2h-t.is-win { color: var(--text); font-weight: 800; }
.st-h2h-t:not(.is-win) { color: #c6d4e0; }
.st-table .st-na-cell { text-align: left; }
.st-table .st-row-na .st-empty { padding: 5px 8px; }

/* Noms d'équipes XL sous les blasons (top-card, v17) — jamais tronqués, 2 lignes max */
.deck-fs .top-card .sc-teams .team,
.deck-fs .next-card .sc-teams .team { gap: 5px; }
.deck-fs .top-card .sc-teams .team-name,
.deck-fs .next-card .sc-teams .team-name {
  font-size: clamp(17px, 6.4cqi, 20px);     /* ≈19px sur 390, ≈18px sur 375 */
  font-weight: 800; color: #fff; line-height: 1.08; letter-spacing: 0;
  white-space: normal; overflow: visible; text-overflow: clip;
  text-wrap: balance; overflow-wrap: normal; hyphens: manual;
  max-width: 100%; padding-inline: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 2px 10px rgba(0,0,0,.85), 0 0 22px rgba(0,0,0,.6);
}
@media (max-height: 600px) {
  .deck-fs .top-card .sc-teams .team-name,
.deck-fs .next-card .sc-teams .team-name { font-size: 16px; }
}
/* Un des noms passe sur 2 lignes (classe posée par fitTeamNames) → blasons alignés */
.deck-fs .top-card.names-2l .sc-teams .team-name,
.deck-fs .next-card.names-2l .sc-teams .team-name { min-height: 2.16em; }

/* v19 : bouton de mise élargi (libellé « Mise » : voir v20) */
.ta-with-stake .ta-stake { min-width: 148px; padding: 0 16px; }
/* v19 petits écrans : blasons remontés → stamps de drag plus compacts pour ne pas les recouvrir */
@media (max-height: 700px) {
  .ov-home, .ov-away { top: 46px; padding: 6px 11px; font-size: 15px; border-width: 2.5px; }
}

/* v20 : libellé « MISE » blanc au-dessus du bouton doré, montant en gros dans le bouton.
   Le libellé est en position absolue → la ligne ✕ / 📊 / 📋 reste alignée sur le bouton doré. */
.ta-stake-wrap { position: relative; display: flex; justify-content: center; }
.ta-stake-wrap .ta-stake-lbl {
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 12px; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; color: #fff; white-space: nowrap;
  text-shadow: 0 1px 3px #000c, 0 0 8px #0008; pointer-events: none;
}
.ta-with-stake .ta-stake { gap: 0; }
.ta-with-stake .ta-stake .ta-stake-amt { font-size: 28px; line-height: 1; color: #1d1404; letter-spacing: -.01em; }

/* v21 : − / + de part et d'autre du montant, dans une pilule dorée.
   Rangée en flex : ✕ | [− 🪙 50 +] | 📊 📋 ; la pilule prend la place restante (cibles −/+ 44×44). */
.tinder-actions.ta-with-stake { display: flex; justify-content: center; align-items: center; gap: 6px; }
.ta-with-stake .ta-side { flex: none; }
.ta-with-stake .ta-btn:not(.ta-stake) { flex: none; min-width: 44px; }
.ta-with-stake .ta-stake-wrap { flex: 1 1 auto; min-width: 0; max-width: 232px; }
.ta-stake-pill {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px;
  height: 60px; padding: 0 8px; border-radius: 999px;
  background: linear-gradient(180deg, #ffd964 0%, #f5b82a 55%, #d9960f 100%);
  border: 1px solid #ffe7a0; color: #1d1404;
  box-shadow: 0 6px 20px #0008, 0 0 22px #ffc93c55, inset 0 1px 0 #fff8;
}
.ta-stake-pill:has(.ta-stake.is-pick) { box-shadow: 0 6px 20px #0008, 0 0 30px #ffc93c99, inset 0 1px 0 #fff8; }
/* le montant central : simple affichage (plus de clic) */
.ta-with-stake .ta-stake-pill .ta-stake,
.ta-with-stake .ta-stake-pill .ta-stake.is-pick {
  flex: 1 1 auto; min-width: 0; width: auto; height: 100%; padding: 0; gap: 0;
  background: none; border: 0; box-shadow: none; border-radius: 0; cursor: default; overflow: hidden;
}
.ta-stake-pill .ta-stake:active { transform: none; }
.ta-with-stake .ta-stake-pill .ta-stake-amt { font-size: 26px; white-space: nowrap; }
.ta-stake-pill .ta-stake-gain { max-width: 100%; overflow: hidden; }
.ta-step {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0 0 2px;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 26px; line-height: 1;
  color: #2a1c02; background: #fff5; border: 1px solid #7a520a40;
  box-shadow: inset 0 1px 0 #fff9, 0 1px 2px #0003;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .1s, opacity .15s, background .15s;
}
.ta-step:active:not(:disabled) { transform: scale(.88); background: #fff8; }
.ta-step:focus-visible { outline: 2px solid #1d1404; outline-offset: 2px; }
.ta-step:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; background: #fff2; }
/* Cible −/+ = 44×44, pastille visible = 36 px : le texte central peut passer sous la marge transparente */
.ta-step { background: none; border: 0; box-shadow: none; position: relative; z-index: 1; }
.ta-step::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%; z-index: -1;
  background: #fff5; border: 1px solid #7a520a40; box-shadow: inset 0 1px 0 #fff9, 0 1px 2px #0003;
  transition: background .15s;
}
.ta-step:active:not(:disabled) { background: none; }
.ta-step:active:not(:disabled)::before { background: #fff8; }
.ta-step:disabled { background: none; }
.ta-step:disabled::before { background: #fff2; box-shadow: none; }
.ta-stake-pill { padding: 0 3px; gap: 0; }
.ta-with-stake .ta-stake-pill .ta-stake { margin: 0 -6px; }
@media (max-width: 370px) {
  .ta-with-stake .ta-stake-pill .ta-stake-amt { font-size: 24px; }
}

/* v22 : la carte suivante (.next-card = behind-1) est rendue complète (son stade, blasons, noms, cotes)
   et se révèle au drag de la top-card. Les styles de rendu .top-card s'appliquent aussi à .next-card
   (sélecteurs doublés ci-dessus) ; les effets de drag C+ (is-drag-*) restent réservés à la top-card.
   La top-card est 100 % opaque : rien de la next-card ne transparaît au repos ni en drag. */
#page-matches.swipe-mode .swipe-card.behind-1.next-card,
.swipe-card.behind-1.next-card {
  background: linear-gradient(160deg, #1e2c3a, #121c26);
  pointer-events: none; cursor: default;
  transform: translateY(14px) scale(.955);
}
#page-matches.swipe-mode .swipe-card.behind-1.next-card > :not(.sc-bg),
.swipe-card.behind-1.next-card > :not(.sc-bg) { visibility: visible; }
#page-matches.swipe-mode .swipe-card.behind-1.next-card .sc-bg { background: linear-gradient(180deg, #0c1219, #0a1016); }
#page-matches.swipe-mode .swipe-card.behind-1.next-card .sc-bg.sc-bg--venue { background: #0a1016; }
#page-matches.swipe-mode .swipe-card.behind-1.next-card .ov { visibility: hidden; }
#page-matches.swipe-mode .swipe-card.top-card { opacity: 1; }

/* v23 : écran compte (mode supabase) — mêmes codes visuels que l'onboarding */
.auth-screen { z-index: 60; }
.auth-card { padding-bottom: 12px; }
.auth-card .ob-hero { font-size: 52px; }
.auth-tabs { display: flex; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.ob-card input[type=email], .ob-card input[type=password] {
  width: 100%; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; color: var(--text); font-size: 16px; font-weight: 600;
  padding: 13px 16px; outline: none; font-family: 'Inter';
}
.ob-card input[type=email]:focus, .ob-card input[type=password]:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 3px var(--accent-glow); }
.auth-hint { text-align: left; font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.auth-err { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; text-align: left;
  color: #ffd2d2; background: #ff5d5d1f; border: 1px solid #ff5d5d55; }
.auth-card .btn-big { margin-top: 18px; }
.auth-signup-only .ob-avatars { margin-bottom: 4px; }
.auth-screen.show { overflow-y: auto; align-items: flex-start; }
.auth-screen .ob-card { margin: auto; }
/* v23 : erreurs sous le champ — style Designer (13px / 500 / #ff6b6b, 6px sous le champ, contour même couleur, secousse 4px 250ms) */
.field-err { text-align: left; font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--danger); margin: 6px 2px 0; text-transform: none; }
.field-err a, .auth-link { color: var(--danger); font-weight: 600; text-decoration: underline; }
.ob-card input[aria-invalid="true"], .ob-card input[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px #ff6b6b22; }
@keyframes gs-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.ob-card input.shake { animation: gs-shake 250ms ease-in-out; }
@media (prefers-reduced-motion: reduce) { .ob-card input.shake { animation: none; } }
.auth-captcha { margin-top: 12px; min-height: 0; }

/* v23 : toast d'erreur de jeu — style Designer ; le toast historique (sans variante) est inchangé */
.toast.toast--error, .toast.toast--warn {
  background: rgba(20,20,28,.92); border: 0; border-left: 4px solid #ff6b6b; border-radius: 12px;
  color: #fff; font-size: 14px; font-weight: 500; text-align: left; text-transform: none;
}
.toast.toast--warn { border-left-color: #ffb020; }
.toast.has-link.show { pointer-events: auto; }
.toast a { color: inherit; font-weight: 700; text-decoration: underline; }

/* v23b : retouches Designer */
/* left:50% limite la largeur « shrink-to-fit » à la moitié de l'écran → width:max-content, borné par max-width */
.toast { width: max-content; max-width: calc(100% - 32px); hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal; box-sizing: border-box; }
.toast .nowrap { white-space: nowrap; }   /* « Modifie-le » : pas de coupure après le trait d'union */
#authSubmit { white-space: nowrap; }
@media (max-width: 399px) { #authSubmit .auth-emoji { display: none; } }   /* déborde de 3 px à 375 sinon */

/* v23c : l'erreur de champ remplace l'aide permanente (pseudo, mot de passe) */
.field-err:not([hidden]) + .auth-hint { display: none; }


/* =====================================================================
   v25 — mise libre, écran bloquant, toast série, classement vide (spec goalswipe-ux-sat, proposal.css)
   ===================================================================== */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ---- Classement vide (m1a / m1b) ---- */
.rank-row.me.is-leader {
  padding: 14px 16px; border-radius: var(--radius); gap: 12px;
  border: 1.5px solid #ffc93ccc;
  background: linear-gradient(135deg, #3a2f18, var(--card) 70%);
  box-shadow: 0 0 28px #ffc93c33, 0 8px 24px #0008, inset 0 1px 0 #ffc93c44;
}
.rank-row.is-leader .rr-pos { width: auto; font-size: 22px; line-height: 1; }
.rank-row.is-leader .rr-av { font-size: 28px; }
.rank-row.is-leader .rr-name { font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row.is-leader .rr-pts { font-size: 18px; }
.rank-row.is-leader .rr-pts small { font: 700 11px 'Inter', sans-serif; color: var(--muted); margin-left: 3px; }
.rank-empty {
  margin-top: 16px; padding: 28px 20px 22px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, #133024 0%, var(--card) 65%);
  border: 1px solid #2fd47a44; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.rank-empty .re-ico { font-size: 44px; line-height: 1; display: block; margin-bottom: 12px; filter: drop-shadow(0 6px 18px #2fd47a55); }
.rank-empty h3 { font: 800 20px/1.2 'Sora', 'Inter', sans-serif; letter-spacing: -.02em; margin-bottom: 8px; }
.rank-empty p { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 auto 20px; max-width: 280px; }
.rank-empty .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; }
.rank-empty .btn svg { width: 20px; height: 20px; flex: none; }
.rank-empty .re-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.rank-empty .re-note-ico { margin-right: 4px; }
.rank-empty .btn-ghost { margin-top: 10px; min-height: 48px; color: var(--text); width: 100%; }
.rank-empty .re-link { display: block; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text); font: 600 13px 'Inter', sans-serif; }

/* ---- Mise libre (m2a–m2e) ---- */
.ta-stake-center { display:flex; align-items:center; justify-content:center; gap: 4px; line-height: 1; cursor: text; }
.ta-stake-coin { font-size: 20px; }
.ta-stake-input {
  width: 3.4ch; min-width: 56px; height: 34px; padding: 0 4px;
  font: 800 24px/1 'Sora', sans-serif; letter-spacing: -.01em; color: #1d1404; text-align: center;
  background: #fff4; border: 1px solid #7a520a55; border-radius: 10px;
  box-shadow: inset 0 1px 2px #7a520a33; outline: none;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; caret-color: #1d1404;
}
.ta-stake-input:focus, .ta-stake-input.is-focus { background: #fffc; border-color: #1d1404; box-shadow: 0 0 0 2px #1d140455; }
.ta-with-stake .ta-stake-pill .ta-stake { gap: 3px; }
.ta-stake-pill.is-invalid { border: 2px solid var(--danger); box-shadow: 0 6px 20px #0008, 0 0 0 3px #ff6b6b33; }
.ta-stake-pill.is-invalid .ta-stake-input { border-color: #b3261e; color: #7a0f0a; }

.stake-zone { position: relative; z-index: 2; padding: 0 4px 6px; }
.stake-zone .tinder-actions.ta-with-stake { padding-bottom: 4px; }
.stake-err {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  width: max-content; max-width: calc(100% - 8px); margin: 2px auto 6px;
  padding: 5px 12px; border-radius: 999px;
  background: #1a0d10e6; border: 1px solid #ff6b6b66;
  color: var(--danger-text); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center;
}
.stake-err[hidden], .stake-chips[hidden], .bonus-row[hidden], .bonus-cta[hidden], .stake-hint[hidden], .ta-lock[hidden] { display: none; }
.stake-chips { display: flex; justify-content: center; gap: 8px; }
.stake-chip {
  position: relative; flex: 1 1 0; max-width: 78px; height: 36px; margin: 4px 0; padding: 0 8px;
  border-radius: 999px; background: #0b1014e0; border: 1px solid var(--line);
  color: var(--text); font: 700 14px 'Sora', sans-serif; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
  box-shadow: 0 4px 12px #0006; cursor: pointer;
}
.stake-chip::before { content: ''; position: absolute; inset: -4px 0; } /* cible 44 px de haut */
.stake-chip.sel { border-color: var(--gold); color: var(--gold); background: #2a2410f0; }
.stake-chip:disabled { opacity: .35; cursor: not-allowed; }
.stake-chip-max { max-width: 96px; color: var(--gold); border-color: #ffc93c55; }
.stake-chip-max small { font: 600 11px 'Inter', sans-serif; color: #e8c872; }
.bonus-cta {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 auto 4px; padding: 0 16px;
  border-radius: 999px; border: 1px solid #ffc93c88; background: linear-gradient(135deg,#3a2f11,#2a2410);
  color: #ffe08a; font: 700 13.5px 'Inter', sans-serif; cursor: pointer;
}
.bonus-row { display: flex; justify-content: center; }

/* Carte grisée tant que la mise est invalide (✕ 📊 📋 restent actifs) */
#page-matches .deck.is-stake-invalid .swipe-card.top-card { filter: saturate(.25) brightness(.6); cursor: not-allowed; }
#page-matches .deck.is-stake-invalid .swipe-card.top-card .odd-val { color: #9fb3a8; text-shadow: none; }
.deck .ta-lock { display: none; }
.deck.is-stake-invalid .ta-lock:not([hidden]) {
  display: block; position: absolute; z-index: 9; left: 50%; top: 52px; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: #0b1014ee; border: 1px solid var(--line);
  color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 20px #000a; pointer-events: none;
}
.ta-with-stake .ta-btn:disabled { opacity: .4; }

/* Clavier ouvert : la zone de mise remonte au-dessus du clavier (visualViewport), voile sur la carte, nav cachée */
.kb-mode .bottomnav { display: none; }
.kb-dim { position: absolute; inset: 0; z-index: 40; background: #05080bb3; pointer-events: none; }
.stake-zone.is-kb {
  position: fixed; left: 0; right: 0; z-index: 45; padding: 22px 8px 8px; max-width: 520px; margin: 0 auto;
  background: linear-gradient(180deg, transparent, #0a0f14f2 22px);
}
.stake-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Feuille de pari (vue liste) : champ de mise libre + raccourcis */
.sheet-stake { margin-bottom: 14px; }
.sheet-stake .stake-row { margin-bottom: 6px; }
.sheet-stake-field { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 12px; min-height: 48px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; cursor: text; }
.sheet-stake-field.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px #ff6b6b22; }
.sheet-stake-input { flex: 1; min-width: 0; height: 44px; background: transparent; border: 0; outline: none;
  color: var(--text); font: 800 20px 'Sora', sans-serif; font-variant-numeric: tabular-nums; }
.stake.stake-max { color: var(--gold); white-space: nowrap; }
.stake.stake-max small { font: 600 11px 'Inter', sans-serif; color: #e8c872; }
.sheet-stake .stake-err { margin: 4px 0 6px; max-width: 100%; width: auto; flex-wrap: nowrap; justify-content: flex-start; text-align: left; border-radius: 14px; padding: 8px 12px; }
.sheet-stake .stake-err > span[aria-hidden] { flex: none; }
.sheet-stake .bonus-row { margin-top: 4px; }
.stake-jump { min-height: 44px; }

/* Mes paris : bouton « Modifier » */
.bc-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.bc-edit { min-height: 36px; padding: 0 14px; }

/* Vue liste : match sans cotes */
.match-card.is-soon { cursor: default; opacity: .85; }
.mc-soon { margin-left: 8px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--gold); background: #2a2410; border: 1px solid #ffc93c55; white-space: nowrap; }

/* Repli STAKE_MODE 'tiers' : le bouton doré se touche pour faire défiler 25 → 50 → 100 → 250 */
button.ta-stake { cursor: pointer; border: 0; font: inherit; }

/* ---- Toast bonus du jour + série (m3a–m3d), en haut sous la topbar ---- */
.toast-bonus {
  position: fixed; left: 50%; top: 76px; transform: translate(-50%, -8px);
  z-index: 70; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px;
  border-radius: 16px; background: #1c2835f2; border: 1px solid var(--line);
  box-shadow: 0 12px 32px #000b; backdrop-filter: blur(8px); color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; cursor: pointer;
}
.toast-bonus.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tb-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 21px;
  background: var(--card-2); border: 1px solid #ffc93c55; }
.tb-txt { min-width: 0; }
.tb-main { font: 700 15px/1.25 'Inter', sans-serif; white-space: nowrap; }
.tb-main b { font: 800 18px 'Sora', sans-serif; color: var(--points); margin-left: 2px; }
.tb-dots { display: flex; gap: 5px; margin-top: 6px; align-items: center; }
.tb-dots i { width: 16px; height: 5px; border-radius: 3px; background: #ffffff1f; }
.tb-dots i.on { background: var(--accent); }
.tb-dots i.j7 { width: 22px; background: #ffc93c40; }
.tb-dots i.j7.on { background: var(--points); box-shadow: 0 0 8px #ffc93c99; }
.toast-bonus.is-j7 {
  background: linear-gradient(135deg, #3a2f11f5, #1f1a0cf5); border: 1.5px solid #ffc93ccc;
  box-shadow: 0 12px 32px #000b, 0 0 26px #ffc93c55, inset 0 1px 0 #ffc93c33;
}
.toast-bonus.is-j7 .tb-ico { background: radial-gradient(circle at 50% 60%, #ff9d2e55, #2a2410); border-color: #ffc93c; font-size: 22px; }
.toast-bonus.is-j7 .tb-main b { font-size: 21px; color: #ffe08a; text-shadow: 0 0 14px #ffc93c88; }
.toast-bonus.is-j7 .tb-dots i.on { background: var(--points); }
.points-pill.is-bumped { box-shadow: 0 0 26px #ffc93c88, inset 0 1px 0 #ffc93c22; border-color: #ffe08a; transition: box-shadow .3s, border-color .3s; }

/* ---- Écran bloquant « Connexion au serveur impossible » (fail-closed) ---- */
.block-screen { z-index: 90; }
.block-card .block-title { font: 800 20px/1.25 'Sora', 'Inter', sans-serif; margin: 14px 0 8px; }
.block-card .block-desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 auto 24px; max-width: 300px; }
.block-card .btn { min-height: 52px; }
body.is-blocked .pages, body.is-blocked .bottomnav { visibility: hidden; }

/* Hauteurs réduites (≤ 700 px) : on reprend la place prise par les chips */
@media (max-height: 700px) {
  .deck-fs .top-card .sc-teams, .deck-fs .next-card .sc-teams { padding-top: clamp(0px, 2.4svh, 20px); }
  .deck-fs .top-card .sc-teams .crest, .deck-fs .next-card .sc-teams .crest { --crest-size: clamp(88px, min(40cqi, 18svh), 150px); }
  .deck-fs .top-card .sc-odds .odd, .deck-fs .next-card .sc-odds .odd { min-height: 68px; padding: 6px 4px 8px; }
  .deck-fs .top-card .sc-odds .odd-val { font-size: 30px; }
  #page-matches.swipe-mode .swipe-card { inset: 16px 14px 26px; }
  .ta-with-stake .ta-stake-pill, .ta-with-stake .ta-stake-pill .ta-stake { height: 56px; }
  .stake-chip { height: 34px; margin: 5px 0; }
  .stake-chip::before { inset: -5px 0; }
}

/* ---- v25 : classement long — pseudos longs, ex-aequo, ma ligne toujours visible ---- */
.rank-row { min-width: 0; }
.rr-name { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.rr-name-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-name .you { flex: none; }
.rr-pos, .rr-av, .rr-pts { flex: none; }
.pod { min-width: 0; }
.rank-row.me { border-color: #ffc93ccc; background: linear-gradient(135deg, #3a2f18cc, var(--card) 75%); box-shadow: 0 0 0 1px #ffc93c55; }
.rank-me-sticky {
  display: none; position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 24px), 416px); margin: 0;
  pointer-events: none;
}
/* v25 fix Designer : fond OPAQUE (la liste ne doit pas transparaître) ; sélecteur plus spécifique que .rank-row.me.
   #332c1b = #3a2f18cc composé sur --card (#152029). */
.rank-row.me.rank-me-sticky, .rank-row.rank-me-sticky {
  background: linear-gradient(135deg, #332c1b, #152029 75%); background-color: #152029;
  border: 1px solid #ffc93c; opacity: 1;
  box-shadow: 0 -6px 14px rgba(0,0,0,.45), 0 0 0 1.5px #ffc93ccc;
}
.rank-me-sticky.show { display: flex; }
#page-ranking:not(.active) .rank-me-sticky { display: none; }
#page-ranking { padding-bottom: 72px; }
.rank-row .rr-delta:empty { display: none; }
