/* ═══════════════════════════════════════════════════════════════
   FOOTPOTES.COM — Pronos Coupe du Monde 2026
   Palette fidèle au logo : vert #83cf00 · navy #002a61
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Surfaces — navy sombre */
  --bg:           #07111e;
  --bg-2:         #0b1927;
  --surface:      #0f2035;
  --surface-2:    #132644;
  --elev:         #1a3358;
  --line:         #1c3862;
  --line-2:       #254d85;

  /* Pelouse / terrain */
  --pelouse-dark:  #091a0f;
  --pelouse:       #1a6e3a;
  --pelouse-light: #2ba65a;

  /* Brand FOOTPOTES */
  --green:    #83cf00;   /* Vert logo — CTA principal */
  --green-2:  #6aab00;   /* Hover vert */
  --navy:     #002a61;   /* Navy logo — accent secondaire */

  /* Alias compatibilité avec le code existant */
  --lime:    #83cf00;
  --lime-2:  #6aab00;

  /* Neons secondaires */
  --magenta: #ff3d7f;
  --cyan:    #38d0f0;
  --amber:   #ffb429;

  /* Texte */
  --ink:    #edf4ff;
  --ink-2:  #b8cce0;
  --muted:  #6888a8;
  --muted-2:#3a5a7a;

  /* Typography */
  --f-display: 'Anton', 'Arial Narrow', sans-serif;
  --f-ui:      'Space Grotesk', system-ui, sans-serif;
  --f-num:     'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing */
  --px: 18px;

  /* Glow brand */
  --glow-green: 0 0 0 1px rgba(131,207,0,0.4), 0 12px 32px -8px rgba(131,207,0,0.35);
  --glow-text:  0 0 28px rgba(131,207,0,0.45);
}

/* ── Reset + Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }

input, button, select, textarea { font-family: var(--f-ui); font-size: 16px; }

/* ── Layout app ─────────────────────────────────────────────── */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px;
  -webkit-overflow-scrolling: touch;
}

.statusbar-spacer { height: 12px; }

/* ── Typography ─────────────────────────────────────────────── */
.h-display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 0.92;
}
.h-num { font-family: var(--f-display); letter-spacing: 0.02em; }

.label-eyebrow {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* ── Chip ────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-live    { background: rgba(255,61,127,0.12); color: var(--magenta); border-color: rgba(255,61,127,0.35); }
.chip-lime,
.chip-green   { background: rgba(131,207,0,0.12); color: var(--green); border-color: rgba(131,207,0,0.35); }
.chip-solid-lime,
.chip-solid-green { background: var(--green); color: #051800; border-color: var(--green); }
.chip-amber   { background: rgba(255,180,41,0.12); color: var(--amber); border-color: rgba(255,180,41,0.3); }
.chip-navy    { background: rgba(0,42,97,0.5); color: #b8cce0; border-color: rgba(37,77,133,0.6); }

.live-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 14px;
  padding: 0 22px;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--green);
  color: #051800;
  box-shadow: var(--glow-green);
}
.btn-primary:hover { background: var(--green-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--surface); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.35);
}

.btn-block { width: 100%; }
.btn-sm { height: 40px; font-size: 14px; padding: 0 16px; border-radius: 10px; }
.btn-xs { height: 32px; font-size: 12px; padding: 0 12px; border-radius: 8px; }

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.card-hero {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #091828 0%, #0f2035 65%, #132644 100%);
  border: 1px solid var(--line-2);
  position: relative;
}

/* Pitch texture (pelouse + navy) */
.pelouse-bg {
  background-image:
    linear-gradient(180deg, transparent 0%, rgba(26,110,58,0) 60%, rgba(26,110,58,0.1) 100%),
    repeating-linear-gradient(90deg, #091828 0 28px, #0b1e30 28px 56px);
}

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--px) 14px;
  flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
}
.iconbtn-green {
  background: rgba(131,207,0,0.1);
  border-color: rgba(131,207,0,0.3);
  color: var(--green);
}
/* alias legacy */
.iconbtn-lime { background: rgba(131,207,0,0.1); border-color: rgba(131,207,0,0.3); color: var(--green); }

.topbar-group-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.topbar-group-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--magenta); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

/* ── Logo FOOTPOTES dans la top bar ─────────────────────────── */
.topbar-logo {
  height: 32px;
  width: 32px;
  display: block;
  object-fit: contain;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  padding: 4px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo-container img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

/* ── Pronostics des autres ───────────────────────────────────── */
.pronos-accordion {
  border-top: 1px solid var(--line);
}
.pronos-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pronos-toggle:active { opacity: .7; }
.pronos-toggle .chevron { transition: transform .2s; flex-shrink: 0; }
.pronos-toggle.open .chevron { transform: rotate(180deg); }
.pronos-body {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
  padding: 8px 14px 10px;
}
.pronos-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prono-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.prono-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Tab bar ─────────────────────────────────────────────────── */
.tabbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: center;
  padding: 8px 12px 24px;
  background: linear-gradient(180deg, rgba(7,17,30,0) 0%, var(--bg) 40%);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.active { color: var(--green); }

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #051800;
  border: 2px solid var(--surface);
  flex-shrink: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-md { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-xl { width: 64px; height: 64px; font-size: 24px; }

/* ── Flag ────────────────────────────────────────────────────── */
.flag {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.flag-sm { width: 32px; height: 32px; font-size: 18px; }
.flag-lg { width: 64px; height: 64px; font-size: 38px; }

/* ── Match row ───────────────────────────────────────────────── */
.match-row {
  display: grid;
  grid-template-columns: 64px 1fr 90px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.match-row:first-child { border-top: none; }
.match-team-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-team-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.match-score-display { font-family: var(--f-display); font-size: 18px; line-height: 1; }

/* ── Bet pill ────────────────────────────────────────────────── */
.bet-pill {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 6px 10px; border-radius: 10px;
  text-align: center;
}
.bet-pill-label { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bet-pill-score { font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--ink); }

.result-exact   { background: rgba(131,207,0,0.14); border: 1px solid rgba(131,207,0,0.4); }
.result-exact   .bet-pill-label { color: var(--green); }
.result-diff    { background: rgba(255,170,0,0.13); border: 1px solid rgba(255,170,0,0.38); }
.result-diff    .bet-pill-label { color: #f0a800; }
.result-winner  { background: rgba(56,208,240,0.12); border: 1px solid rgba(56,208,240,0.3); }
.result-winner  .bet-pill-label { color: var(--cyan); }
.result-miss    { background: rgba(255,61,127,0.08);  border: 1px solid rgba(255,61,127,0.25); }
.result-miss    .bet-pill-label { color: var(--magenta); }
.result-pending { background: var(--surface-2); border: 1px solid var(--line); }
.result-pending .bet-pill-label { color: var(--muted); }

.bet-btn-inline {
  border: 1px solid rgba(131,207,0,0.4);
  background: rgba(131,207,0,0.08);
  color: var(--green);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600; font-size: 12px;
  font-family: var(--f-ui);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Stat tile ───────────────────────────────────────────────── */
.stat-tile {
  flex: 1; padding: 14px 12px 12px;
  border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-tile-value { font-family: var(--f-display); font-size: 32px; line-height: .95; }
.stat-tile-label { font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.stat-tile-sub   { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* ── Formulaires ─────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12px; font-weight: 600;
  color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase;
}
.form-input {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  color: var(--ink); font-size: 16px; font-family: var(--f-ui);
  outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: rgba(131,207,0,0.5); }
.form-input::placeholder { color: var(--muted); }

/* ── Flash ───────────────────────────────────────────────────── */
.flash { margin: 0 var(--px) 12px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.flash-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.flash-success { background: rgba(131,207,0,0.08); border: 1px solid rgba(131,207,0,0.25); color: var(--green); }

/* ── Podium ──────────────────────────────────────────────────── */
.podium-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; }
.podium-col  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium-bar  {
  width: 100%;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 8px; position: relative;
}
.podium-medal {
  position: absolute; top: -14px;
  width: 30px; height: 30px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 16px;
  border: 3px solid var(--bg);
}

/* ── Ranking row ─────────────────────────────────────────────── */
.ranking-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.ranking-row:first-child { border-top: none; }
.ranking-row.is-me { background: rgba(131,207,0,0.04); }
.ranking-rank { font-family: var(--f-display); font-size: 18px; min-width: 28px; text-align: center; color: var(--muted); }
.ranking-pts  { font-family: var(--f-display); font-size: 28px; color: var(--ink); margin-left: 8px; display: flex; flex-direction: column; align-items: flex-end; min-width: 52px; flex-shrink: 0; }
.ranking-pts .rk-lbl { font-size: 11px; color: var(--muted); font-family: var(--f-ui); font-weight: 400; line-height: 1; }

/* ── Admin table ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 8px 12px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-bar  { width: 100%; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .3s ease; }

/* ── Section header ──────────────────────────────────────────── */
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--px) 10px; }

/* ── Stepper ─────────────────────────────────────────────────── */
.stepper-wrap { display: flex; gap: 10px; padding: 0 var(--px); }
.stepper-box {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px; border-radius: 18px;
  background: var(--surface); border: 1.5px solid var(--line);
  transition: all .2s;
}
.stepper-box.active { background: rgba(131,207,0,0.06); border-color: rgba(131,207,0,0.6); }
.stepper-btn {
  width: 44px; height: 44px; border-radius: 14px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: var(--surface-2); color: var(--ink);
}
.stepper-btn-plus { background: var(--green); color: #051800; }
.stepper-value {
  font-family: var(--f-display); font-size: 56px; line-height: 1;
  font-variant-numeric: tabular-nums; min-width: 38px; text-align: center;
  color: var(--ink); transition: color .2s, text-shadow .2s;
}
.stepper-box.active .stepper-value { color: var(--green); text-shadow: var(--glow-text); }

/* ── Hero card SVG pelouse ───────────────────────────────────── */
.pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.14; pointer-events: none; }

/* ── Couleur avatar ──────────────────────────────────────────── */
.color-picker  { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch  { width: 36px; height: 36px; border-radius: 999px; border: 3px solid transparent; cursor: pointer; transition: transform .1s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }

/* ── Segmented control ───────────────────────────────────────── */
.segmented { display: flex; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); gap: 4px; }
.seg-btn   { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; color: var(--muted); background: transparent; transition: all .15s; text-decoration: none; display: block; }
.seg-btn.active { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }

/* ── Auth page ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px var(--px) 40px;
  background: var(--bg);
}
.auth-hero { text-align: center; margin-bottom: 36px; }

.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 18px;
}

/* ── Countdown ───────────────────────────────────────────────── */
.countdown { font-family: var(--f-num); font-size: 14px; font-weight: 700; color: var(--green); }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--line); margin: 0; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(131,207,0,0.2); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utils ───────────────────────────────────────────────────── */
.px  { padding-left: var(--px); padding-right: var(--px); }
.mb-s { margin-bottom: 10px; }
.mb-m { margin-bottom: 16px; }
.mb-l { margin-bottom: 24px; }
.mt-s { margin-top: 10px; }

/* ── Hero login — illustration pelouse ──────────────────────── */
.login-hero-bg {
  width: 100%; max-width: 400px;
  height: 200px;
  border-radius: 22px;
  margin-bottom: 28px;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(131,207,0,0.18) 0%, transparent 70%),
    linear-gradient(180deg, #091828 0%, #0f2035 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line-2);
}
.login-hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(131,207,0,0.04) 0 1px, transparent 1px 56px),
                    repeating-linear-gradient(0deg,   rgba(131,207,0,0.04) 0 1px, transparent 1px 56px);
}
.login-logo-wrap {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.login-logo-wrap img { height: 120px; width: auto; display: block; }

@media (min-width: 481px) {
  .auth-page { justify-content: flex-start; padding-top: 60px; }
}
