/* ============================================================
   PrépaVolt / CCQ — Shared design system
   Palette: 233D4D charcoal · FE7F2D pumpkin · FCCA46 gold
            A1C181 olive · 619B8A seagrass
   ============================================================ */

/* ── Google Fonts imported in each HTML <head> ─────────────────────────────── */

:root {
  --ink:        #233D4D;
  --ink-2:      #3A5568;
  --ink-3:      #6E8294;
  --pumpkin:    #FE7F2D;
  --pumpkin-d:  #EA6A16;
  --gold:       #FCCA46;
  --olive:      #A1C181;
  --seagrass:   #619B8A;

  --paper:      #FFFFFF;
  --paper-2:    #F8F6F1;
  --paper-3:    #F2EFE8;
  --line:       #E9E5DC;
  --line-2:     #DED9CD;

  --success:    #A1C181;
  --error:      #E07A63;

  --shadow-sm:      0 1px 2px rgba(35,61,77,.06), 0 2px 8px rgba(35,61,77,.05);
  --shadow-md:      0 4px 12px rgba(35,61,77,.07), 0 12px 32px rgba(35,61,77,.08);
  --shadow-lg:      0 8px 24px rgba(35,61,77,.10), 0 30px 60px rgba(35,61,77,.12);
  --shadow-pumpkin: 0 8px 22px rgba(254,127,45,.30);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --maxw:   1180px;
  --pad:    clamp(20px, 5vw, 64px);
  --header-h: 70px;

  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  /* overridden by applyTheme() */
  --color-primary: var(--pumpkin);
  --color-accent:  var(--gold);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  line-height: 1.55; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--pumpkin); color: #fff; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.wrap     { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section  { padding-block: clamp(64px, 9vw, 120px); }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: #fff; }
.center   { text-align: center; }
.container { max-width: 720px; margin: 0 auto; padding-inline: var(--pad); }
.page-wrap { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 3rem; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1,h2,h3 { line-height: 1.04; letter-spacing: -.02em; font-weight: 700; }
.display  { font-size: clamp(2.5rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.h2       { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
.h3       { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; }
.lead     { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); line-height: 1.6; }
.muted    { color: var(--ink-3); }
.eyebrow  { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--seagrass); font-weight: 700; }
.section--ink .eyebrow { color: var(--gold); }
.text-pumpkin { color: var(--pumpkin); }
.mark {
  background: linear-gradient(180deg, transparent 8%, rgba(252,202,70,.55) 8%, rgba(252,202,70,.55) 88%, transparent 88%);
  padding: 0 .12em; border-radius: 2px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-weight: 600; font-size: 15.5px;
  padding: 13px 22px; border-radius: 999px; border: none;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translate(3px,-3px); }

.btn-primary, .btn--primary { background: var(--pumpkin); color: #fff; box-shadow: var(--shadow-pumpkin); }
.btn-primary:hover, .btn--primary:hover { background: var(--pumpkin-d); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(254,127,45,.38); }
.btn-ink, .btn--ink { background: var(--ink); color: #fff; }
.btn-ink:hover, .btn--ink:hover { background: #18303e; transform: translateY(-2px); }
.btn-ghost, .btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover, .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); transform: translateY(-2px); }
.btn-lg, .btn--lg { padding: 16px 30px; font-size: 16.5px; }
.btn-sm, .btn--sm { padding: 9px 18px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Chip / pill ────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pumpkin); }

/* ── Header / nav ───────────────────────────────────────────────────────────── */
.site-header, .nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
  height: var(--header-h);
  display: flex; align-items: center; width: 100%;
}
.site-header.scrolled, .nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; width: 100%; }
.brand, .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink);
}
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--gold);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.brand__mark svg { width: 18px; height: 18px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 12px; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer, .footer {
  background: var(--ink); color: #fff;
  padding: clamp(48px, 7vw, 80px) var(--pad) 32px;
}
.footer__bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(32px, 5vw, 56px); padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px; color: #7E94A4;
}
.footer__bar a { color: #9FB3C2; }

/* ── Card ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--paper); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  padding: 1.5rem;
}
.card + .card { margin-top: 1rem; }

/* ── Form inputs ────────────────────────────────────────────────────────────── */
.input {
  width: 100%; height: 50px; border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  padding: 0 16px; font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; transition: box-shadow .15s; border: none; outline: none;
}
.input::placeholder { color: #A9B6BF; }
.input:focus { box-shadow: inset 0 0 0 2px var(--pumpkin); }
.input.invalid { box-shadow: inset 0 0 0 2px var(--error); }
textarea.input { height: auto; padding: 12px 16px; resize: vertical; border-radius: 12px; }

.field       { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field-error, .err-msg { font-size: 12.5px; color: var(--error); margin-top: 4px; }

/* ── Progress bar (quiz) ────────────────────────────────────────────────────── */
.progress-bar-wrap { height: 4px; background: var(--paper-3); border-radius: 999px; overflow: hidden; margin-bottom: 1.25rem; }
.progress-bar { height: 100%; background: var(--pumpkin); border-radius: 0 999px 999px 0; transition: width .4s cubic-bezier(.3,.8,.3,1); }

/* ── Quiz ───────────────────────────────────────────────────────────────────── */
.quiz-counter { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--seagrass); font-weight: 700; margin-bottom: .75rem; }
.quiz-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); padding: clamp(1.25rem, 4vw, 2rem); }
.quiz-statement { font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; color: var(--ink); margin-bottom: 1.5rem; line-height: 1.5; letter-spacing: -.01em; }
.quiz-statement p { color: var(--ink); }
.quiz-statement mark { background: rgba(252,202,70,.45); border-radius: 3px; padding: 0 2px; }

.quiz-options { display: grid; gap: 12px; margin-bottom: 1.5rem; }

.quiz-option {
  display: flex; align-items: center; justify-content: flex-start; gap: .85rem;
  height: 54px; padding: 0 18px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line-2); background: #fff;
  cursor: pointer; transition: all .18s; font-size: 15.5px; font-weight: 500;
  color: var(--ink); user-select: none; position: relative;
}
.quiz-option:hover { box-shadow: inset 0 0 0 2px var(--ink-2); transform: translateY(-1px); }

/* ── Radio indicator dot ─────────────────────────────────────────────────────
   A small circle on the left shows unselected / selected / correct / wrong.   */
.quiz-option input[type="radio"] { display: none; }

.quiz-option::before {
  content: '';
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px var(--line-2);
  transition: all .18s;
  display: block;
}

/* Selected (radio checked, before Vérifier) */
.quiz-option:has(input[type="radio"]:checked) {
  box-shadow: inset 0 0 0 2.5px var(--ink);
  background: rgba(35,61,77,.05);
  font-weight: 700;
}
.quiz-option:has(input[type="radio"]:checked)::before {
  background: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* After correction */
.quiz-option.correct   { box-shadow: inset 0 0 0 2px var(--olive); background: rgba(161,193,129,.12); color: #3d6624; font-weight: 700; }
.quiz-option.correct::before   { background: var(--olive); box-shadow: none; content: '✓'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.quiz-option.incorrect { box-shadow: inset 0 0 0 2px var(--error); background: rgba(224,122,99,.09); color: #9f3a28; font-weight: 700; }
.quiz-option.incorrect::before { background: var(--error); box-shadow: none; content: '✗'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* Revision page options — no radio dot needed (read-only display) */
.revision-q .quiz-option::before { display: none; }

/* ── Quiz stats screen (after last question, before paywall) ─────────────────*/
.quiz-stats { animation: fadeUp .4s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }

.stat-q-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .75rem 1rem; border-radius: var(--r-sm);
  font-size: 14.5px; margin-bottom: .4rem;
}
.stat-q-row.ok  { background: rgba(161,193,129,.10); }
.stat-q-row.ko  { background: rgba(224,122,99,.08); }
.stat-q-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0; color: #fff;
}
.stat-q-row.ok  .stat-q-icon { background: var(--olive); }
.stat-q-row.ko  .stat-q-icon { background: var(--error); }
.stat-q-num  { font-family: var(--mono); font-size: 12px; color: var(--ink-3); flex-shrink: 0; }
.stat-q-text { flex: 1; color: var(--ink-2); line-height: 1.35; }
.stat-q-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
}
.stat-q-row.ok  .stat-q-badge { color: #3d6624; background: rgba(161,193,129,.2); }
.stat-q-row.ko  .stat-q-badge { color: #9f3a28; background: rgba(224,122,99,.15); }

.quiz-result {
  padding: .9rem 1.1rem; border-radius: var(--r-sm); margin-bottom: 1rem;
  font-weight: 700; font-size: 14.5px;
}
.quiz-result--ok { background: rgba(161,193,129,.16); color: #5a7d3c; }
.quiz-result--ko { background: rgba(224,122,99,.14); color: #c0533a; }
.quiz-explanation { font-size: .9rem; font-weight: 400; margin-top: .5rem; color: inherit; line-height: 1.6; }
.quiz-explanation p { color: inherit; }
.quiz-ref { font-size: .78rem; color: var(--ink-3); margin-top: .4rem; font-weight: 400; font-family: var(--mono); }

/* ── Score / Results ────────────────────────────────────────────────────────── */
.score-circle {
  width: 130px; height: 130px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; box-shadow: var(--shadow-md);
}
.score-inner {
  width: 92px; height: 92px; border-radius: 50%; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-num  { font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.score-den  { font-size: .75rem; color: var(--ink-3); }

/* ── Paywall CTA ────────────────────────────────────────────────────────────── */
.paywall-card {
  background: var(--ink); color: #fff;
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center; box-shadow: var(--shadow-lg);
}
.paywall-card h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.paywall-card p  { color: rgba(255,255,255,.75); }
.price-tag { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; margin: .6rem 0; letter-spacing: -.03em; }
.price-tag small { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.7); }

/* ── Revision page ──────────────────────────────────────────────────────────── */
.revision-q { border-left: 4px solid var(--pumpkin); }
.revision-q .badge {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 999px; background: rgba(254,127,45,.1); color: var(--pumpkin-d);
  font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: .5rem;
}
.revision-answer { background: rgba(161,193,129,.15); border-radius: var(--r-sm); padding: .75rem 1rem; margin-top: .75rem; color: #3d6624; font-weight: 600; box-shadow: inset 3px 0 0 var(--olive); }
.revision-explanation { margin-top: .5rem; font-size: .9rem; color: var(--ink-3); line-height: 1.6; }
.revision-explanation p { color: var(--ink-3); }

/* ── Category filter tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tab-btn {
  padding: .45rem 1rem; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--paper);
  cursor: pointer; transition: all .15s; color: var(--ink-2); border: none; font-family: var(--sans);
}
.tab-btn.active, .tab-btn:hover { background: var(--pumpkin); color: #fff; box-shadow: none; }

/* ── Auth page (two-column) ─────────────────────────────────────────────────── */
.auth-wrap  { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--paper-2); }
.auth-card  { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 2.25rem; width: 100%; max-width: 420px; border: 1px solid var(--line); }
.auth-card h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; text-align: center; margin-bottom: 1.5rem; }
.auth-tabs  { display: flex; border-bottom: 1.5px solid var(--line); margin-bottom: 1.5rem; }
.auth-tab   {
  flex: 1; padding: .65rem; text-align: center; font-weight: 600; font-size: .9rem;
  cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
  transition: all .15s; color: var(--ink-3);
}
.auth-tab.active { border-bottom-color: var(--pumpkin); color: var(--pumpkin); }

.submit {
  width: 100%; height: 52px; border-radius: 999px;
  background: var(--pumpkin); color: #fff;
  font-weight: 700; font-size: 16px; font-family: var(--sans);
  box-shadow: var(--shadow-pumpkin);
  transition: background .2s, transform .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: none;
}
.submit:hover { background: var(--pumpkin-d); transform: translateY(-2px); }
.submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Checkout overlay ───────────────────────────────────────────────────────── */
#checkout-overlay {
  position: fixed; inset: 0; background: rgba(35,61,77,.6); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(4px);
}
.checkout-modal {
  background: var(--paper); border-radius: var(--r-lg); padding: 2.25rem;
  max-width: 400px; width: 100%; text-align: center; position: relative;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.checkout-modal h2 { color: var(--ink); margin-bottom: .5rem; }
.checkout-close { position: absolute; top: .75rem; right: .75rem; background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-3); padding: .25rem; }
.checkout-icon  { font-size: 3rem; margin-bottom: 1rem; }

/* ── Paywall modal (guest quiz finish) ──────────────────────────────────────── */
#paywall-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 600px) { #paywall-overlay { align-items: center; } }

.pw-backdrop { position: absolute; inset: 0; background: rgba(35,61,77,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s ease; }
.pw-backdrop.in { opacity: 1; }

.pw-drawer {
  position: relative; z-index: 1; width: 100%; max-width: 520px;
  background: var(--paper); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 2rem 1.75rem 2.5rem; box-shadow: var(--shadow-lg);
  transform: translateY(40px); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
  max-height: 92vh; overflow-y: auto;
}
@media (min-width: 600px) {
  .pw-drawer { border-radius: var(--r-xl); transform: translateY(20px) scale(.97); }
}
.pw-drawer.in { transform: none; opacity: 1; }

/* Score strip */
.pw-score { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.pw-score-circle {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
}
.pw-score-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: var(--paper); }
.pw-score-num { font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1; }
.pw-score-msg { font-size: .65rem; color: var(--ink-3); font-family: var(--mono); }
.pw-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--seagrass); margin-bottom: .3rem; }
.pw-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: .3rem; }
.pw-sub   { font-size: .9rem; color: var(--ink-3); line-height: 1.5; }

/* Offer */
.pw-offer { background: var(--paper-2); border-radius: var(--r-sm); padding: .9rem 1rem; margin-bottom: 1.25rem; border: 1px solid var(--line); }
.pw-offer-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-2); }
.pw-offer-divider { height: 1px; background: var(--line); margin: .6rem 0; }
.pw-offer-total { font-size: 15px; font-weight: 700; color: var(--ink); }

/* Tabs */
.pw-tabs { display: flex; border-bottom: 1.5px solid var(--line); margin-bottom: 1.25rem; }
.pw-tab  { flex: 1; padding: .6rem; text-align: center; font-weight: 600; font-size: .875rem; cursor: pointer; border: none; background: none; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; transition: all .15s; color: var(--ink-3); font-family: var(--sans); }
.pw-tab.active { border-bottom-color: var(--pumpkin); color: var(--pumpkin); }

/* Form */
.pw-form { display: flex; flex-direction: column; gap: .75rem; }
.pw-submit {
  width: 100%; height: 52px; border-radius: 999px;
  background: var(--pumpkin); color: #fff; font-weight: 700; font-size: 15.5px;
  font-family: var(--sans); box-shadow: var(--shadow-pumpkin);
  transition: background .2s, transform .15s; cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center; margin-top: .25rem;
}
.pw-submit:hover { background: var(--pumpkin-d); transform: translateY(-1px); }
.pw-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.pw-legal { font-size: .75rem; color: var(--ink-3); text-align: center; margin-top: .75rem; }

/* ── Toast ──────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; padding: .75rem 1.25rem;
  border-radius: var(--r-sm); font-size: .9rem; font-weight: 600; z-index: 2000;
  box-shadow: var(--shadow-lg); animation: slideUp .25s ease;
}
.toast--info    { background: var(--ink); color: #fff; }
.toast--error   { background: var(--error); color: #fff; }
.toast--success { background: var(--olive); color: #fff; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Spinner ────────────────────────────────────────────────────────────────── */
.spinner { display: flex; justify-content: center; padding: 3rem; }
.spinner::after {
  content: ''; width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--pumpkin);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert { padding: .85rem 1rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: rgba(224,122,99,.12); color: #9f3a28; box-shadow: inset 3px 0 0 var(--error); }
.alert-success { background: rgba(161,193,129,.15); color: #3d6624; box-shadow: inset 3px 0 0 var(--olive); }
.alert-info    { background: rgba(97,155,138,.1); color: #2d6057; box-shadow: inset 3px 0 0 var(--seagrass); }

/* ── Mode rows (3-col grid → stack on mobile) ───────────────────────────────── */
@media (max-width: 680px) {
  .section--ink [style*="grid-template-columns:auto 1fr auto"] {
    grid-template-columns: 1fr !important;
  }
  .section--ink [style*="grid-template-columns:auto 1fr auto"] > div:last-child {
    display: none;
  }
  .section--ink [style*="grid-template-columns:auto 1fr auto"] > div:first-child {
    width: 52px !important; height: 52px !important; font-size: 1.4rem !important;
  }
}

/* ── Hero (index.html) ──────────────────────────────────────────────────────── */
.hero { position: relative; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.hero__bg::before {
  content:""; position:absolute; top:-180px; left:50%; transform:translateX(-50%);
  width:900px; height:700px;
  background: radial-gradient(circle at 50% 30%, rgba(254,127,45,.10), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px,5vw,72px); align-items: center; }
.hero__copy { max-width: 560px; }
.hero h1 { margin: 18px 0 16px; }
.hero .lead { max-width: 480px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__proof { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.avatars { display: flex; }
.avatars .av {
  width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid #fff;
  margin-left: -12px; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm);
}
.avatars .av:first-child { margin-left: 0; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.proof__text { font-size: 14px; color: var(--ink-3); line-height: 1.35; }
.proof__text b { color: var(--ink); }

/* mock quiz card in hero */
.mock { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.mock__bar { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); }
.mock__search { flex:1; height:34px; border-radius:999px; background:var(--paper-2); display:flex; align-items:center; gap:8px; padding:0 14px; color:var(--ink-3); font-size:13px; }
.mock__body { padding:22px 22px 24px; }
.mock__qmeta { font-family:var(--mono); font-size:11px; color:var(--seagrass); font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.mock__q { font-size:18px; font-weight:700; margin:8px 0 18px; letter-spacing:-.01em; }
.mock__opts { display:grid; gap:9px; }
.mock .opt { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; box-shadow:inset 0 0 0 1.5px var(--line); font-size:15px; font-weight:500; }
.mock .opt .key { width:26px; height:26px; border-radius:7px; background:var(--paper-2); display:grid; place-items:center; font-weight:700; font-size:13px; color:var(--ink-2); flex-shrink:0; }
.mock .opt.correct { box-shadow:inset 0 0 0 2px var(--olive); background:rgba(161,193,129,.12); }
.mock .opt.correct .key { background:var(--olive); color:#fff; }
.mock__expl { margin-top:16px; padding:14px 16px; border-radius:12px; background:var(--ink); color:#fff; font-size:13.5px; }
.mock__expl b { color:var(--gold); }

/* features grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.feature-card { background: var(--paper); border-radius: var(--r-md); padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.feature-icon { font-size: 1.75rem; margin-bottom: .75rem; width: 48px; height: 48px; border-radius: var(--r-sm); background: rgba(254,127,45,.1); display: flex; align-items: center; justify-content: center; }
.feature-card h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .3rem; }
.feature-card p { font-size: .9rem; color: var(--ink-3); line-height: 1.5; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat { text-align: center; position: relative; }
.stat__num { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.stat__lbl { font-size: 14px; color: var(--ink-3); margin-top: 6px; font-weight: 500; }
.stat + .stat { border-left: 1px solid var(--line); }

/* steps */
.steps { display: flex; flex-direction: column; gap: 1.5rem; max-width: 500px; margin: 0 auto; }
.step  { display: flex; gap: 1rem; align-items: flex-start; }
.step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--pumpkin); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-pumpkin); }
.step h3  { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .2rem; }
.step p   { font-size: .9rem; color: var(--ink-3); line-height: 1.5; }

/* merci page */
.merci-icon { font-size: 4rem; margin-bottom: 1rem; }

/* ── scroll reveal ──────────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity:1!important; transform:none!important; } }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__mock-wrap { max-width: 460px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2,1fr); gap: 28px 16px; }
  .stat:nth-child(3) { border-left: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .card, .quiz-card { padding: 1.25rem; }
  .paywall-card { padding: 1.5rem; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); padding-top: 20px; }
  .nav__links { display: none; }
}
