@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

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

:root {
  --bg: #0a0a0a;
  --card: #111111;
  --card-alt: #141414;
  --border: #1e1e1e;
  --border-hover: #2e2e2e;
  --orange: #f07800;
  --orange-dark: #c86200;
  --orange-light: #ff9020;
  --orange-glow: rgba(240,120,0,0.15);
  --text: #ffffff;
  --text-2: #aaaaaa;
  --text-3: #666666;
  --success: #22c55e;
  --success-bg: rgba(34,197,94,0.1);
  --error: #ef4444;
  --error-bg: rgba(239,68,68,0.1);
  --warning: #f59e0b;
  --r: 12px;
  --r-sm: 8px;
  --r-xs: 6px;
  --shadow: 0 4px 32px rgba(0,0,0,0.5);
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ── LAYOUT ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── LOGO ── */
.logo { display: inline-flex; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.logo > img { margin-right: 8px; flex-shrink: 0; mix-blend-mode: screen; }

.lang-selector { display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,0.06); border-radius: 8px; padding: 2px; }
.lang-btn { background: transparent; border: none; cursor: pointer; font-size: 15px; padding: 3px 7px; border-radius: 6px; opacity: 0.45; transition: opacity .15s, background .15s; line-height: 1; }
.lang-btn.active { background: rgba(255,255,255,0.12); opacity: 1; }
.lang-btn:hover { opacity: 0.8; }
.ig-link { display: flex; align-items: center; justify-content: center; color: var(--text-2); transition: color .15s; padding: 4px; border-radius: 6px; }
.ig-link:hover { color: var(--text-1); }
.logo-stro { color: #fff; }
.logo-dict { color: var(--orange); }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-email { font-size: 13px; color: var(--text-2); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; border: none;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary {
  background: var(--orange); color: #fff;
}
.btn-primary:hover { background: var(--orange-light); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: var(--r); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-icon { padding: 8px; border-radius: var(--r-xs); }

/* ── HERO ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(240,120,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(240,120,0,0.12);
  color: var(--orange);
  border: 1px solid rgba(240,120,0,0.25);
  padding: 5px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 500; margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -1.5px; margin-bottom: 20px;
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.text-orange { color: var(--orange); }
.hero-sub {
  font-size: 18px; color: var(--text-2); max-width: 560px;
  margin: 0 auto 40px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--orange); }
.stat-label { font-size: 13px; color: var(--text-3); }

/* ── FEATURES ── */
.features { padding: 80px 0; }
.features h2, .pricing h2 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 700;
  text-align: center; margin-bottom: 12px; letter-spacing: -0.8px;
}
.pricing-sub { text-align: center; color: var(--text-2); margin-bottom: 48px; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* ── PRICING ── */
.pricing { padding: 80px 0; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; align-items: start;
}
.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px;
  position: relative; transition: var(--transition);
}
.pricing-card:hover { border-color: var(--border-hover); }
.pricing-card-popular {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange), 0 0 40px rgba(240,120,0,0.12);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff;
  padding: 3px 14px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.plan-name { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 28px; }
.price-amount { font-size: 40px; font-weight: 700; }
.price-period { color: var(--text-2); font-size: 15px; }
.plan-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.feature-ok::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }
.feature-no { color: var(--text-3); }
.feature-no::before { content: '✗'; color: var(--text-3); flex-shrink: 0; }

/* ── CALCULATOR PAGE ── */
.calc-page { min-height: calc(100vh - 64px); padding: 32px 0 80px; }
.calc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: gap; gap: 16px; }
.calc-title { font-size: 24px; font-weight: 700; }
.calc-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.calc-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.calc-main { display: flex; flex-direction: column; gap: 16px; }

/* Plan badge */
.plan-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.plan-tag.free { background: rgba(255,255,255,0.06); color: var(--text-2); }
.plan-tag.basic { background: rgba(240,120,0,0.12); color: var(--orange); }
.plan-tag.pro { background: linear-gradient(135deg, rgba(240,120,0,0.2), rgba(255,200,0,0.15)); color: #ffc400; border: 1px solid rgba(255,196,0,0.2); }

/* Odds format toggle (Pro) */
.odds-toggle { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xs); overflow: hidden; }
.odds-toggle button {
  padding: 6px 14px; font-size: 13px; font-weight: 500; border: none;
  background: transparent; color: var(--text-2); transition: var(--transition);
}
.odds-toggle button.active { background: var(--orange); color: #fff; }

/* Match row */
.matches-list { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  display: grid; grid-template-columns: 1fr 130px auto;
  gap: 10px; align-items: center;
  transition: border-color var(--transition);
}
.match-row:hover { border-color: var(--border-hover); }
.match-row.has-odds { border-left: 3px solid var(--orange); }
.match-num { font-size: 12px; color: var(--text-3); font-weight: 600; }
.match-input {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 8px 12px;
  color: var(--text); font-size: 14px; width: 100%;
  transition: var(--transition);
}
.match-input::placeholder { color: var(--text-3); }
.match-input:focus { outline: none; border-color: var(--orange); background: rgba(240,120,0,0.04); }
.match-odds-wrap { position: relative; }
.match-odds-wrap .match-input { padding-right: 52px; }
.match-prob-inline {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--orange); font-weight: 600; pointer-events: none;
}
.match-remove {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); border-radius: var(--r-xs);
  padding: 8px 10px; font-size: 16px; line-height: 1;
  transition: var(--transition); flex-shrink: 0;
}
.match-remove:hover { background: var(--error-bg); border-color: var(--error); color: var(--error); }

/* Odds value in orange when filled */
.match-row.has-odds .match-input[data-field="odds"] {
  color: var(--orange);
  font-weight: 700;
}

/* Probability text colored by risk */
.prob-value-high { color: var(--success); }
.prob-value-medium { color: var(--warning); }
.prob-value-low { color: var(--error); }

/* Match row label */
.match-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

/* Add match button */
.add-match-btn {
  background: transparent; border: 2px dashed var(--border);
  color: var(--text-2); border-radius: var(--r);
  padding: 14px; font-size: 14px; font-weight: 500;
  width: 100%; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.add-match-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-glow); }

/* Limit badge */
.limit-bar {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 16px;
  font-size: 13px; display: flex; align-items: center; justify-content: space-between;
}
.limit-dots { display: flex; gap: 6px; }
.limit-dot { width: 10px; height: 10px; border-radius: 50%; }
.limit-dot.used { background: var(--orange); }
.limit-dot.free { background: var(--border-hover); }

/* Results panel */
.results-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px;
  position: sticky; top: 80px;
}
.results-panel h3 { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.result-block { margin-bottom: 20px; }
.result-label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.result-value { font-size: 28px; font-weight: 700; }
.result-value.orange { color: var(--orange); }
.result-value.sm { font-size: 20px; }

/* Big probability — main hero element */
.prob-main { text-align: center; padding: 20px 0 10px; }
.prob-big {
  font-size: 72px; font-weight: 700; line-height: 1;
  letter-spacing: -3px; transition: color 0.3s ease;
}
.prob-sublabel { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 6px; }
.prob-green  { color: #22c55e; }
.prob-orange { color: #f07800; }
.prob-yellow { color: #f59e0b; }
.prob-red    { color: #ef4444; }

/* Probability bar */
.prob-bar-wrap { margin: 12px 0 20px; }
.prob-bar-bg { background: var(--border); border-radius: 100px; height: 6px; overflow: hidden; }
.prob-bar-fill { height: 100%; border-radius: 100px; background: var(--orange); transition: width 0.4s cubic-bezier(0.4,0,0.2,1), background 0.3s; }
.prob-bar-fill.low    { background: var(--error); }
.prob-bar-fill.medium { background: var(--warning); }
.prob-bar-fill.high   { background: var(--success); }

/* Match counter badge */
.match-counter {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--card-alt); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 100px;
}
.match-counter.at-limit { color: var(--error); border-color: rgba(239,68,68,0.3); }

/* Per 100 */
.per100 {
  background: var(--card-alt); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px;
  text-align: center; margin: 12px 0;
}
.per100-num { font-size: 36px; font-weight: 700; color: var(--orange); }
.per100-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.result-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.results-ctas { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-2);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; color: var(--text-3); }

/* Kelly section (legacy, kept for billing/upgrade cards) */
.kelly-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px; margin-top: 24px;
}
.kelly-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.kelly-section p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.kelly-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kelly-item { background: var(--card-alt); border-radius: var(--r-sm); padding: 14px; }
.kelly-item-label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.kelly-item-value { font-size: 22px; font-weight: 700; }
.kelly-locked {
  filter: blur(4px); pointer-events: none; user-select: none;
  position: relative;
}
.kelly-lock-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(10,10,10,0.7); border-radius: var(--r);
  filter: none;
}

/* ── HISTORY PAGE ── */
.history-page { padding: 32px 0 80px; }
.history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.history-grid { display: grid; gap: 16px; }
.history-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 24px;
  transition: var(--transition);
}
.history-card:hover { border-color: var(--border-hover); }
.history-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.history-card-name { font-size: 16px; font-weight: 600; }
.history-card-date { font-size: 12px; color: var(--text-3); }
.history-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.history-stat { }
.history-stat-label { font-size: 11px; color: var(--text-3); }
.history-stat-value { font-size: 18px; font-weight: 700; }
.history-stat-value.orange { color: var(--orange); }
.history-matches { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.history-matches-list { display: flex; flex-wrap: wrap; gap: 8px; }
.history-match-chip {
  background: var(--card-alt); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 4px 10px; font-size: 12px;
}
.history-actions { display: flex; gap: 8px; }

/* Upgrade notice */
.upgrade-notice {
  background: rgba(240,120,0,0.08); border: 1px solid rgba(240,120,0,0.2);
  border-radius: var(--r); padding: 24px; text-align: center;
  margin: 40px auto; max-width: 480px;
}
.upgrade-notice h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.upgrade-notice p { color: var(--text-2); font-size: 14px; margin-bottom: 16px; }

/* ── AUTH FORMS ── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 40px; width: 100%; max-width: 420px;
}
.auth-card h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-card p { color: var(--text-2); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-2); }
.form-input {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 11px 14px; color: var(--text); font-size: 15px;
  transition: var(--transition);
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus { outline: none; border-color: var(--orange); background: rgba(240,120,0,0.04); }
.form-input.error { border-color: var(--error); }
.form-error { color: var(--error); font-size: 12px; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.auth-footer a { color: var(--orange); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-submit { width: 100%; margin-top: 8px; padding: 13px; font-size: 15px; }

/* ── SAVE BANNER ── */
.save-banner {
  background: var(--orange);
  color: #fff;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  gap: 12px;
}
.save-banner strong { font-weight: 700; }
.save-banner.exhausted { background: #c86200; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card-alt); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 18px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); max-width: 320px;
  animation: slideIn 0.25s ease, fadeOut 0.3s ease 2.7s forwards;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { border-color: rgba(34,197,94,0.3); color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.3); color: var(--error); }
.toast.info { border-color: rgba(240,120,0,0.3); color: var(--orange); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity:0; transform: translateX(20px); } }

/* ── MISC ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 18px; font-weight: 600; }
.stake-row { display: flex; align-items: center; gap: 12px; }
.stake-row label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.stake-input {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 7px 12px; color: var(--text);
  font-size: 15px; font-weight: 600; width: 120px; transition: var(--transition);
}
.stake-input:focus { outline: none; border-color: var(--orange); }

/* ── FOOTER ── */
.footer { border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--text-3); max-width: 300px; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-3); transition: var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-responsible {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r); padding: 20px 24px;
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 32px;
}
.responsible-icon { font-size: 24px; flex-shrink: 0; }
.responsible-text strong { font-size: 14px; color: var(--warning); }
.responsible-text p { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom p { font-size: 12px; color: var(--text-3); }

/* ── RESPONSIVE ── */

/* Tablette large — 900px */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* Tablette — 768px */
@media (max-width: 768px) {
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .prob-big { font-size: 60px; }
  .calc-header { flex-wrap: wrap; gap: 12px; }
  .calc-actions { flex-wrap: wrap; gap: 10px; }
  .features-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* Mobile — 640px */
@media (max-width: 640px) {
  /* Match rows : label ligne 1, cote ligne 2 */
  .match-row { grid-template-columns: 1fr auto; gap: 8px; padding: 12px 14px; }
  .match-row > .match-input { grid-column: 1; grid-row: 1; }
  .match-row .match-odds-wrap { grid-column: 1; grid-row: 2; }
  .match-row .match-remove { grid-column: 2; grid-row: 1; align-self: start; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { flex-wrap: wrap; gap: 20px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero h1 { font-size: 30px; }
  .history-stats { flex-wrap: wrap; gap: 12px; }
  .kelly-grid { grid-template-columns: 1fr; }
}

/* Mobile — 480px (iPhone standard) */
@media (max-width: 480px) {
  /* Conteneur */
  .container { padding: 0 16px; }

  /* Tous les boutons : touch target ≥ 44px */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; font-size: 12px; padding: 6px 10px; }
  .btn-lg { min-height: 50px; }

  /* Navbar */
  .nav .container { gap: 0; }
  .nav-links { gap: 6px; }
  .nav-links .btn { padding: 8px 12px; font-size: 13px; min-height: 40px; }
  .logo { font-size: 19px; }
  .logo > img { height: 26px !important; width: auto !important; margin-right: 6px; }

  /* Bannière quota */
  .save-banner { flex-wrap: wrap; gap: 8px; padding: 10px 16px; font-size: 13px; }

  /* Hero */
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; width: 100%; }
  .hero-badge { font-size: 12px; padding: 4px 12px; }

  /* Grand pourcentage */
  .prob-big { font-size: 52px; letter-spacing: -2px; }

  /* Calculateur header */
  .calc-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .calc-actions { width: 100%; justify-content: space-between; }
  .stake-row { flex: 1; justify-content: flex-end; }
  .stake-input { width: 70px; }
  .calc-title { font-size: 20px; }

  /* Résultats en 1 colonne */
  .results-panel { padding: 18px 16px; }
  .results-ctas { flex-direction: column; gap: 8px; }
  .results-ctas .btn { width: 100%; justify-content: center; }

  /* Formulaires auth */
  .auth-card { padding: 24px 16px; }
  .auth-submit { min-height: 48px; font-size: 16px; }

  /* Footer */
  .footer { padding: 36px 0 24px; }
  .footer-responsible { flex-direction: column; gap: 10px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }

  /* Plans tarifaires */
  .pricing-card { padding: 24px 20px; }
  .plan-badge { font-size: 11px; }
  .price-amount { font-size: 32px; }

  /* Historique */
  .history-card { padding: 16px; }
  .history-card-header { flex-direction: column; gap: 8px; }
  .history-actions { align-self: flex-end; }
  .history-stats { gap: 10px; }
  .history-stat-value { font-size: 15px; }
}

/* ── UTILS ── */
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-3); }
.hidden { display: none !important; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: #181818; border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
  font-size: 13px; color: var(--text-2);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
.cookie-banner .cookie-msg { margin: 0; flex: 1; line-height: 1.55; }
.cookie-banner a { color: var(--orange); text-decoration: none; }
.cookie-banner a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; text-align: center; gap: 12px; }
  .cookie-actions { width: 100%; justify-content: center; }
}

/* ── PRIVACY PAGE ── */
.privacy-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.privacy-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.privacy-page .privacy-date { font-size: 13px; color: var(--text-3); margin-bottom: 40px; }
.privacy-page h2 { font-size: 17px; font-weight: 600; margin: 32px 0 10px; color: var(--orange); }
.privacy-page p, .privacy-page li { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.privacy-page ul { padding-left: 20px; margin: 8px 0; }
.privacy-page li { margin-bottom: 4px; }
.privacy-page a { color: var(--orange); }
.privacy-page strong { color: var(--text-1); }

/* ── PROBABILITY HIDDEN STATE ── */
.prob-big.prob-hidden {
  filter: blur(6px);
  user-select: none;
  letter-spacing: 2px;
  color: var(--text-3) !important;
}

/* ── VALIDATE AREA ── */
.validate-area {
  margin-top: 12px;
}

.validate-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.validate-remaining-text {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.validate-remaining-text strong { color: var(--text-2); }

.validate-main-btn {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r);
  letter-spacing: 0.01em;
}

.validate-revealed {
  text-align: center;
  padding: 8px 0;
}

.validate-exhausted {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.validate-exhausted p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ── KELLY CALCULATOR ── */
.kc-card {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-top: 16px;
}
.kc-locked { position: relative; overflow: hidden; }
.kc-blur-content { filter: blur(3px); pointer-events: none; user-select: none; }
.kc-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(10,10,10,0.8);
  border-radius: var(--r);
}

.kc-header { margin-bottom: 20px; }
.kc-title {
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.04em; color: #fff;
}
.kc-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }

.kc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.kc-field { display: flex; flex-direction: column; gap: 6px; }
.kc-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em;
  color: #666660;
  text-transform: uppercase;
}
.kc-input {
  background: #0a0a0a;
  border: 1px solid #1e1e1e;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.kc-input::-webkit-outer-spin-button,
.kc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kc-input:focus { outline: none; border-color: var(--orange); }
.kc-input::placeholder { color: #444; }
.kc-input:disabled { opacity: 0.5; }

.kc-no-edge {
  font-size: 12px;
  color: var(--error);
  text-align: center;
  padding: 10px 16px;
  background: rgba(239,68,68,0.06);
  border-top: 1px solid rgba(239,68,68,0.1);
}

.kc-result {
  border: 1px solid #1e1e1e;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.kc-result-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0f0f0f;
}
.kc-result-featured { background: rgba(240,120,0,0.06); }
.kc-result-divider { height: 1px; background: #1e1e1e; }
.kc-result-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em;
  color: #666660;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kc-result-pct { font-size: 13px; color: var(--text-2); }
.kc-result-amount {
  font-size: 20px; font-weight: 700;
  color: var(--text-2);
}
.kc-amount-featured {
  font-size: 24px;
  color: var(--orange);
}

.kc-how {
  border-top: 1px solid #1a1a1a;
  padding-top: 16px;
  margin-top: 4px;
}
.kc-how-title {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.15em;
  color: #444440;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kc-formula {
  font-size: 16px;
  font-style: italic;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.kc-how-desc {
  font-size: 12px;
  color: #555550;
  line-height: 1.6;
}
.kc-how-desc strong { color: #888882; }

@media (max-width: 640px) {
  .kc-grid { grid-template-columns: 1fr; }
}
