/* ===========================================================
   GOALZ · thème sombre sportif, mobile d'abord
   =========================================================== */
:root {
  --bg: #0a0e13;
  --bg-2: #0e131a;
  --surface: #121821;
  --surface-2: #19212c;
  --surface-3: #212b39;
  --line: #243041;
  --text: #eef3f8;
  --muted: #8593a6;
  --accent: #3dff8a;
  --accent-2: #19d46a;
  --accent-ink: #03200e;
  --accent-soft: rgba(61, 255, 138, 0.12);
  --orange: #ff8a1f;
  --orange-soft: rgba(255, 138, 31, 0.14);
  --red: #ff5468;
  --red-soft: rgba(255, 84, 104, 0.12);
  --gold: #ffc83d;
  --radius: 16px;
  --radius-sm: 10px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 400px at 110% -10%, rgba(61, 255, 138, 0.07), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(255, 138, 31, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.01em; margin: 0; line-height: 1.1; }
p { margin: 0; }
svg { flex-shrink: 0; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gain { color: var(--accent); }
.loss { color: var(--red); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.coin { width: 22px; height: 22px; display: inline-block; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }
.coin-sm { width: 16px; height: 16px; }
.coin-xs { width: 13px; height: 13px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 18px;
  font-weight: 700; font-size: 15px; transition: transform 0.12s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.5), 0 6px 20px -6px rgba(61, 255, 138, 0.6); }
.btn-primary:hover:not(:disabled) { background: #6bffa6; }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 8px;
  color: var(--accent); font-weight: 600; font-size: 13px; border-radius: 8px;
}
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { background: var(--accent-soft); }
.link-btn.danger { color: var(--red); }
.link-btn.danger:hover { background: var(--red-soft); }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: #5b6778; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(10, 14, 19, 0.92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(10px)) { .topbar { background: rgba(10, 14, 19, 0.75); backdrop-filter: blur(14px) saturate(1.4); } }
.topbar-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 6px; font: 800 26px/1 var(--display); letter-spacing: 0.04em; }
.logo svg { width: 26px; height: 26px; color: var(--accent); }
.logo b { color: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance {
  position: relative; display: flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 7px; font: 700 20px/1 var(--display); letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.balance.up { animation: pulse-up 0.9s ease; }
.balance.down { animation: pulse-down 0.6s ease; }
@keyframes pulse-up {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7); border-color: var(--accent); }
  40% { transform: scale(1.08); }
  100% { box-shadow: 0 0 0 14px rgba(61, 255, 138, 0); transform: scale(1); }
}
@keyframes pulse-down { 30% { transform: scale(0.95); border-color: var(--line); } }
.float-delta {
  position: absolute; right: 12px; top: 100%; font: 800 18px/1 var(--display); pointer-events: none;
  animation: float-up 1.4s ease forwards;
}
.float-delta.pos { color: var(--accent); text-shadow: 0 0 12px rgba(61, 255, 138, 0.6); }
.float-delta.neg { color: var(--muted); }
@keyframes float-up { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px); } }

.bonus-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.bonus-btn svg { width: 20px; height: 20px; }
.bonus-btn .bonus-dot { display: none; }
.bonus-btn.available { color: var(--gold); border-color: rgba(255, 200, 61, 0.45); animation: wiggle 2.6s ease-in-out infinite; }
.bonus-btn.available .bonus-dot {
  display: block; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 2px var(--surface-2);
}
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } 97% { transform: rotate(-6deg); } }

.freebar {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--gold);
  background: rgba(255, 200, 61, 0.07); border-top: 1px solid rgba(255, 200, 61, 0.12); padding: 5px 12px;
}

/* ---------- Navigation ---------- */
.nav-top { display: none; }
.nav-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(12, 16, 22, 0.96); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); height: calc(var(--nav-h) + var(--safe-b));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--muted); transition: color 0.2s;
}
.nav-item.active { color: var(--accent); }
.nav-icon { position: relative; display: grid; place-items: center; }
.nav-icon svg { width: 22px; height: 22px; }
.nav-item.active .nav-icon::after {
  content: ''; position: absolute; inset: -6px -12px; border-radius: 12px; background: var(--accent-soft); z-index: -1;
}
.nav-badge {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--orange); color: #1e0f00; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes pop { from { transform: scale(0.3); } to { transform: scale(1); } }

/* ---------- Mise en page ---------- */
.layout {
  max-width: 1160px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + var(--safe-b) + 90px);
  display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr);
}
.aside { display: none; }
.content > * + * { margin-top: 16px; }

.greeting h1 { font-size: 30px; }
.greeting p { margin-top: 4px; }
.page-title { font-size: 32px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 22px; margin-top: 26px !important; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin-top: 26px !important; }
.section-row .section-title { margin-top: 0 !important; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 var(--orange); animation: live 1.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(255, 138, 31, 0); } }

/* ---------- Bonus ---------- */
.bonus-card {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(255, 200, 61, 0.35);
  background: linear-gradient(120deg, rgba(255, 200, 61, 0.16), rgba(255, 138, 31, 0.08) 60%, var(--surface));
  position: relative; overflow: hidden;
}
.bonus-card::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.bonus-card strong { display: block; font-size: 15px; }
.bonus-card .muted { font-size: 13px; }
.bonus-gift { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 200, 61, 0.18); color: var(--gold); }
.bonus-amount { font: 800 22px/1 var(--display); color: var(--gold); display: flex; align-items: center; gap: 5px; }

/* ---------- Filtres ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: #33435a; }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-count { font-size: 12px; opacity: 0.65; }

/* ---------- Cartes de match ---------- */
.match-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.match {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;

}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.enter .match, .enter .bet, .enter .slip-item, .enter .rank-row, .enter .badge { animation: rise 0.35s ease both; }
.match-live { border-color: rgba(255, 138, 31, 0.4); background: linear-gradient(180deg, var(--orange-soft), var(--surface) 55%); }
.match-finished { opacity: 0.85; }
.match-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 10px; }
.comp { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kick { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-pill, .done-pill, .status-pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.live-pill { background: var(--orange); color: #1e0f00; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.55; } }
.done-pill { background: var(--surface-3); color: var(--muted); }
.match-body { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.teams { flex: 1; min-width: 0; display: grid; gap: 7px; }
.team { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06); }
.match-finished .team { color: var(--muted); }
.match-finished .team.is-winner { color: var(--text); }
.score { display: grid; gap: 7px; font: 800 20px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.score-tennis { font: 700 15px/1.2 var(--display); color: var(--text); max-width: 45%; white-space: pre-wrap; text-align: right; }
.live-clock { font-size: 12px; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; white-space: nowrap; }

.odds { display: grid; gap: 8px; }
.odds.cols-2 { grid-template-columns: 1fr 1fr; }
.odds.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.odd {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
  transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.2s;
}
.odd:hover:not(:disabled) { border-color: rgba(61, 255, 138, 0.5); background: var(--surface-3); }
.odd:active:not(:disabled) { transform: scale(0.96); }
.odd:disabled { cursor: default; opacity: 0.55; }
.odd-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.03em; }
.odd-val { font: 700 18px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.odd.selected { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 18px -6px rgba(61, 255, 138, 0.7); animation: pop 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.odd.selected .odd-label, .odd.selected .odd-val { color: var(--accent-ink); }
.odd.won:disabled { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.odd.won .odd-val { color: var(--accent); }

/* ---------- Barre panier (mobile) ---------- */
.slipbar {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
  box-shadow: 0 10px 30px -8px rgba(61, 255, 138, 0.55), 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: slide-up 0.3s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.slipbar.bump { animation: bump 0.3s ease; }
@keyframes slide-up { from { transform: translateY(120%); } to { transform: none; } }
@keyframes bump { 50% { transform: scale(1.03); } }
.slipbar-count { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.slipbar-gain { display: flex; align-items: center; gap: 5px; font: 800 18px/1 var(--display); }
.slipbar svg:last-child { width: 18px; height: 18px; }

/* ---------- Panier ---------- */
.slip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.slip-head h2 { font-size: 26px; display: flex; align-items: center; gap: 8px; }
.count { font: 800 14px/1 var(--body); background: var(--orange); color: #1e0f00; border-radius: 999px; padding: 3px 9px; }
.slip-items { display: grid; gap: 10px; }
.slip-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.slip-item.expired { opacity: 0.6; border-style: dashed; }
.slip-top { display: flex; align-items: flex-start; gap: 10px; }
.slip-match { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip-pick { font-weight: 700; margin-top: 2px; }
.slip-odd { font: 800 20px/1 var(--display); color: var(--accent); padding-top: 4px; }
.stake-row { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; flex-wrap: wrap; }
.stake-input { position: relative; flex: 1 1 110px; }
.stake-input input { padding: 10px 36px 10px 12px; font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.stake-input .coin { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.quick { display: flex; gap: 6px; flex: 1 1 200px; }
.quick button {
  flex: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; font-weight: 700; padding: 8px 4px;
}
.quick button:hover { border-color: rgba(61, 255, 138, 0.5); color: var(--accent); }
.gain-line { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }
.gain-line .gain { font: 800 18px/1 var(--display); }
.warn { color: var(--orange); font-size: 13px; margin-top: 8px; }
.slip-foot { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.slip-sum { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.slip-sum strong { display: flex; align-items: center; gap: 5px; font: 700 18px/1 var(--display); }
.slip-sum.big strong { font-size: 26px; }
.slip-modes { margin-bottom: 12px; }
.combo-box { display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.combo-odds { color: var(--accent); font-size: 24px !important; }
.combo-rule { margin: 0; font-size: 12px; }
.combo-legs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.leg { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.leg-lost { background: var(--red-soft); }
.leg-won { background: var(--accent-soft); }
.leg-void { opacity: 0.7; }
.leg-icon { font-size: 14px; }
.leg .grow { display: grid; gap: 2px; min-width: 0; }
.leg-match { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-pick { font-weight: 600; }
.leg .at, .bet-combo .bet-pick .at { color: var(--accent); font: 700 16px/1 var(--display); }
.bet-combo .bet-pick { margin-top: 10px; }
.slip-error { color: var(--red); font-size: 13px; font-weight: 600; }
.slip-foot .btn { margin-top: 4px; }
.slip-page { max-width: 620px; }

/* ---------- Vide ---------- */
.empty { text-align: center; padding: 32px 16px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 8px; justify-items: center; }
.empty .btn { margin-top: 8px; }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin-bottom: 4px; }
.empty-icon svg { width: 28px; height: 28px; }

/* ---------- Mes paris ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-row-4 { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 4px; }
.stat .muted { font-size: 12px; }
.stat strong { font: 800 24px/1 var(--display); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.tab.active { background: var(--surface-3); color: var(--text); }
.tab-count { font-size: 12px; background: var(--bg-2); border-radius: 999px; padding: 1px 7px; }
.tab.active .tab-count { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.ff-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--orange-soft); border: 1px solid rgba(255, 138, 31, 0.3); }
.ff-card strong { display: block; font-size: 14px; }
.ff-card .muted { font-size: 13px; }
.ff-card .btn { padding: 9px 12px; white-space: nowrap; }
.bet-list { display: grid; gap: 10px; }
.bet { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.bet-pending { border-left-color: var(--orange); }
.bet-won { border-left-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 45%); }
.bet-lost { border-left-color: var(--red); }
.bet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.bet-right { display: flex; gap: 8px; align-items: center; }
.bet-pending .status-pill { background: var(--orange-soft); color: var(--orange); }
.bet-won .status-pill { background: var(--accent); color: var(--accent-ink); }
.bet-lost .status-pill { background: var(--red-soft); color: var(--red); }
.bet-match { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bet-score { font: 700 15px/1.2 var(--display); color: var(--text); white-space: nowrap; }
.bet-pick { font-weight: 700; margin-top: 3px; }
.bet-pick .at { color: var(--accent); font-family: var(--display); font-size: 17px; }
.bet-nums { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bet-nums > div { display: grid; gap: 2px; }
.bet-nums .right { text-align: right; justify-items: end; }
.bet-nums .muted { font-size: 12px; }
.bet-nums strong { font: 800 19px/1 var(--display); display: flex; align-items: center; gap: 4px; }

/* ---------- Classement ---------- */
.my-rank-card {
  display: flex; align-items: center; gap: 16px;
  background: radial-gradient(260px 160px at 0% 50%, color-mix(in srgb, var(--rank-color) 22%, transparent), transparent 70%), var(--surface);
  border-color: color-mix(in srgb, var(--rank-color) 45%, var(--line));
}
.my-rank-name { margin: 2px 0 8px; font: 800 30px/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--rank-color); }
.rr-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rr-bar span { display: block; height: 100%; border-radius: inherit; background: var(--rank-color); box-shadow: 0 0 12px var(--rank-color); }
.rr-text { display: block; margin-top: 6px; font-size: 13px; }
.rank-emblem { width: 34px; height: 38px; flex-shrink: 0; filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 45%, transparent)); }
.rank-emblem-lg { width: 76px; height: 86px; }
.rank-help summary { cursor: pointer; font-weight: 600; }
.rank-help p { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 12px; }
.ladder-step { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.rank-row { background: linear-gradient(90deg, color-mix(in srgb, var(--rank-color) 10%, transparent), var(--surface) 55%); }
.rank-who { display: grid; gap: 3px; min-width: 0; }
.rank-tier { font: 700 13px/1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--rank-color); }
.rank-score { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.rank-score strong { font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.rank-score small { font-size: 12px; color: var(--muted); }
.rank-score .muted { display: flex; align-items: center; gap: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.rank-row.me { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 24px -10px rgba(61, 255, 138, 0.6); }
.rank-pos { width: 24px; text-align: center; font: 800 18px/1 var(--display); color: var(--muted); }
.rank-name { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amount { display: flex; align-items: center; gap: 5px; font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #00b8a0); color: var(--accent-ink); font: 800 17px/1 var(--display);
}
.avatar.bot { background: var(--surface-3); font-size: 16px; }
.avatar-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 30px; }
.tag { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); }
.tag-muted { background: var(--surface-3); color: var(--muted); }

.league-forms { display: grid; gap: 10px; }
.form-inline { display: grid; gap: 8px; }
.form-inline label { font-weight: 700; font-size: 14px; }
.input-row { display: flex; gap: 8px; }
.input-row .btn { flex-shrink: 0; }
.code-input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; }
.league { display: grid; gap: 12px; }
.league-head { display: flex; align-items: center; gap: 12px; }
.league-head h3 { font-size: 22px; }
.league-head .muted { font-size: 13px; }
.code-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px dashed rgba(61, 255, 138, 0.5);
  background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 7px 10px;
  font: 800 17px/1 var(--display); letter-spacing: 0.14em;
}
.code-chip svg { width: 15px; height: 15px; }
.league .link-btn { justify-self: start; }

/* ---------- Profil ---------- */
.profile-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-hero h1 { font-size: 28px; }
.profile-hero .muted { font-size: 13px; }
.profile-balance { display: flex; align-items: center; gap: 7px; font: 800 30px/1 var(--display); color: var(--gold); }
.profile-balance .coin { width: 28px; height: 28px; }
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge {
  display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
}
.badge strong { font-size: 14px; }
.badge .muted { font-size: 12px; line-height: 1.35; }
.badge-icon { font-size: 34px; line-height: 1.1; }
.badge.locked .badge-icon { filter: grayscale(1) brightness(0.5); opacity: 0.6; }
.badge.locked strong { color: var(--muted); }
.badge.unlocked { border-color: rgba(255, 200, 61, 0.4); background: radial-gradient(circle at 50% 0%, rgba(255, 200, 61, 0.14), var(--surface) 70%); }
.disclaimer h2 { font-size: 20px; margin-bottom: 6px; color: var(--gold); }
.disclaimer p { font-size: 14px; }
.profile-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- Onboarding ---------- */
.onboarding { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(circle at 30% 25%, rgba(61, 255, 138, 0.18), transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(255, 138, 31, 0.14), transparent 40%);
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(3%, -3%) scale(1.05); } }
.onboarding-card { position: relative; width: 100%; max-width: 420px; display: grid; gap: 18px; text-align: center; }
.brand-big { display: flex; align-items: center; justify-content: center; gap: 10px; font: 800 64px/1 var(--display); letter-spacing: 0.04em; }
.brand-big svg { width: 58px; height: 58px; color: var(--accent); animation: spin-in 0.9s cubic-bezier(0.2, 1.3, 0.4, 1); }
.brand-big b { color: var(--accent); text-shadow: 0 0 30px rgba(61, 255, 138, 0.5); }
@keyframes spin-in { from { transform: rotate(-200deg) scale(0.4); opacity: 0; } }
.tagline { color: var(--muted); font-size: 16px; }
.free-pill { justify-self: center; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--gold); background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.3); }
.register { display: grid; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.register label { font-weight: 700; }
.register input { font-size: 17px; padding: 14px; }
.profiles { display: grid; gap: 8px; text-align: left; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-weight: 600; }
.profile-row:hover { border-color: rgba(61, 255, 138, 0.5); }
.fineprint { font-size: 12px; color: var(--muted); }

/* ---------- Toasts ---------- */
#toasts {
  position: fixed; z-index: 60; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px)); display: grid; gap: 8px; pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--surface-3); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.toast.out { animation: toast-out 0.3s ease forwards; }
.toast-win { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.toast-success { border-color: rgba(61, 255, 138, 0.5); }
.toast-error { border-color: var(--red); color: #ffd6db; }
.toast-loss { color: #d8dee7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Confettis & badge ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }
.badge-overlay {
  position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 7, 10, 0.75); backdrop-filter: blur(6px); animation: fade 0.25s ease;
}
.badge-overlay.out { animation: fade 0.25s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.badge-pop {
  position: relative; overflow: hidden; width: min(360px, 100%); padding: 30px 24px 24px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, #1d2633, var(--surface)); border: 1px solid rgba(255, 200, 61, 0.45);
  box-shadow: 0 0 60px -10px rgba(255, 200, 61, 0.45); display: grid; gap: 8px; justify-items: center;
  animation: badge-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes badge-in { from { transform: scale(0.5) rotate(-6deg); opacity: 0; } }
.badge-rays {
  position: absolute; top: -120px; left: 50%; width: 360px; height: 360px; margin-left: -180px; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 200, 61, 0.12) 0 10deg, transparent 10deg 20deg);
  mask-image: radial-gradient(circle, #000 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%);
  animation: rays 12s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
.badge-pop-icon { position: relative; font-size: 76px; line-height: 1; animation: badge-bounce 1s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both; filter: drop-shadow(0 6px 20px rgba(255, 200, 61, 0.5)); }
@keyframes badge-bounce { from { transform: scale(0) rotate(-30deg); } }
.badge-pop .eyebrow { color: var(--gold); position: relative; }
.badge-pop h2 { font-size: 32px; position: relative; }
.badge-pop p.muted { position: relative; }
.badge-pop .btn { margin-top: 12px; min-width: 60%; position: relative; }


/* ---------- Vrais matchs ---------- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s, background 0.2s;
}
.mode strong { display: block; font-size: 14px; }
.mode small { display: block; font-size: 12px; color: var(--muted); }
.mode-icon { font-size: 22px; }
.mode:hover { border-color: #33435a; }
.mode.active { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); box-shadow: 0 0 0 1px var(--accent) inset; }
.day-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin-top: 22px !important; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  font-weight: 600; font-size: 14px; color: var(--muted); text-transform: capitalize;
}
.day-chip.active { background: var(--surface-3); color: var(--text); border-color: #3a4a60; }
.comp-group { margin-top: 18px !important; }
.comp-title { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 10px; }
.comp-logo { width: 24px; height: 24px; object-fit: contain; }
.comp-emoji { font-size: 18px; }
.comp-count { font: 600 12px/1 var(--body); color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 8px; }
.logo-img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.logo-sm { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Match à la une ---------- */
.featured {
  position: relative; overflow: hidden; padding: 16px; border-radius: 20px;
  border: 1px solid rgba(61, 255, 138, 0.35);
  background:
    radial-gradient(420px 200px at 50% -40%, rgba(61, 255, 138, 0.22), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface) 70%);
  box-shadow: 0 18px 40px -24px rgba(61, 255, 138, 0.55);
}
.featured-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.featured-tag { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.ft-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 16px 0 6px; }
.ft-team { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; }
.ft-team strong { font: 800 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.logo-xl { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }
.ft-team .dot { width: 56px; height: 56px; border-radius: 16px; }
.ft-vs { font: 800 16px/1 var(--display); color: var(--muted); padding: 8px; border-radius: 50%; background: var(--surface-3); }
.ft-comp { margin: 0 0 14px; text-align: center; font-size: 12px; color: var(--muted); }
.featured .odd { padding-block: 12px; }

/* ---------- Comment jouer ---------- */
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.howto li {
  display: grid; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.howto span {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 800 15px/1 var(--display);
}
.section-note { font: 600 12px/1 var(--body); text-transform: none; }
.slip-match .dot, .bet-teams .dot, .leg-match .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; vertical-align: middle; background: var(--muted); }
.team .record { color: var(--muted); font-size: 11px; font-weight: 500; flex-shrink: 0; }
.soon-pill { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; background: var(--surface-3); color: var(--orange); white-space: nowrap; }
.est { color: var(--muted); font-style: italic; font-weight: 500; }
.score-text { font: 700 15px/1.25 var(--display); max-width: 45%; text-align: right; }
.skeletons { display: grid; gap: 12px; margin-top: 18px !important; }
.skeleton {
  height: 132px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.feed-credit { font-size: 12px; color: var(--muted); margin-top: 28px !important; }
.feed-credit .link-btn { font-size: 12px; padding: 2px 6px; }
.feed-error { border-color: rgba(255, 84, 104, 0.4); }

@media (max-width: 639px) { .hide-sm { display: none; } }

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-row-4 { grid-template-columns: repeat(4, 1fr); }
  .league-forms { grid-template-columns: 1fr 1fr; }
}

/* ---------- Ordinateur ---------- */
@media (min-width: 1000px) {
  .nav-bottom, #slipbar { display: none; }
  .nav-top { display: flex; gap: 4px; margin-left: 24px; }
  .nav-top .nav-item { flex-direction: row; gap: 8px; font-size: 14px; padding: 9px 14px; border-radius: 10px; }
  .nav-top .nav-item:hover { color: var(--text); background: var(--surface-2); }
  .nav-top .nav-item.active { background: var(--accent-soft); }
  .nav-top .nav-item.active .nav-icon::after { display: none; }
  .nav-top .nav-icon svg { width: 18px; height: 18px; }
  .nav-top .nav-icon { display: flex; align-items: center; gap: 5px; }
  .nav-top .nav-badge { position: static; }
  .layout { grid-template-columns: minmax(0, 1fr) 360px; padding-bottom: 60px; }
  .layout.no-aside { grid-template-columns: minmax(0, 1fr); }
  .aside { display: block; position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 124px); overflow-y: auto; }
  .aside .slip { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
  .aside .slip-empty { border: 0; padding: 20px 8px; }
  .aside .stake-row { flex-direction: column; }
  .aside .stake-input, .aside .quick { flex: none; }
  .slip-page { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Fenêtre de confirmation ---------- */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 66; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 7, 10, 0.72); animation: fade 0.2s ease;
}
.dialog {
  width: min(380px, 100%); display: grid; gap: 10px; padding: 22px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: badge-in 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.dialog h2 { font-size: 24px; text-wrap: balance; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.btn-danger { background: var(--red); color: #2a0006; }
.btn-danger:hover { background: #ff7384; }

/* Compte en ligne */
.account-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; text-align: left; }
.account-card > .grow { display: grid; gap: 2px; min-width: 0; }
.account-card .muted { overflow-wrap: anywhere; }
.account-form, .account-sent { display: grid; gap: 8px; }
.account-form input { width: 100%; min-width: 0; box-sizing: border-box; }
.account-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.onboarding-card .account-card { margin: 16px 0 0; }
