/* ============================================================
   v6 — Design system du tunnel de vente Test-de-QI.fr
   ============================================================ */
:root {
  --ink: #131629;
  --ink-2: #3d4160;
  --muted: #6e7391;
  --bg: #f6f7fc;
  --card: #ffffff;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
  --accent: #f59e0b;
  --good: #10b981;
  --danger: #e11d48;
  --ring: rgba(79, 70, 229, .18);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(19, 22, 41, .08);
  --shadow-lg: 0 24px 60px rgba(19, 22, 41, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.logo .dot { color: var(--accent); }
.topbar .mini { color: rgba(255,255,255,.85); font-size: .85rem; display: flex; gap: 14px; align-items: center; }
.topbar.on-light .logo { color: var(--ink); }
.topbar.on-light .mini { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 600px at 75% -10%, rgba(168, 85, 247, .55), transparent 60%),
              radial-gradient(900px 500px at 10% 110%, rgba(79, 70, 229, .5), transparent 60%),
              #171a33;
  color: #fff; overflow: hidden; position: relative;
}
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 850; }
.hero h1 .hl { background: linear-gradient(90deg, #fbbf24, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { margin: 18px 0 26px; font-size: 1.13rem; color: rgba(255,255,255,.86); max-width: 34em; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.badge {
  font-size: .82rem; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff;
}
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.note-under { font-size: .82rem; color: rgba(255,255,255,.65); margin-top: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 750; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 14px; padding: 16px 30px; transition: transform .15s ease, box-shadow .15s ease, filter .15s;
}
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #1a1206;
  box-shadow: 0 12px 30px rgba(249, 115, 22, .35);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-brand { background: var(--brand-grad); color: #fff; box-shadow: 0 12px 30px var(--ring); }
.btn-brand:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-xl { padding: 19px 40px; font-size: 1.12rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.pulse { animation: pulse 2.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(249,115,22,.35); }
  50% { box-shadow: 0 12px 44px rgba(249,115,22,.62); }
}

/* ---------- Carte gauss hero ---------- */
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; padding: 26px; backdrop-filter: blur(8px);
}
.hero-card h3 { font-size: .95rem; font-weight: 700; color: rgba(255,255,255,.9); margin-bottom: 4px; }
.hero-card .tiny { font-size: .78rem; color: rgba(255,255,255,.55); }

/* ---------- Barre de stats ---------- */
.statbar { background: #fff; box-shadow: var(--shadow); position: relative; z-index: 2; border-radius: var(--radius); margin-top: -34px; }
.statbar-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 22px 10px; }
.stat b { display: block; font-size: 1.45rem; letter-spacing: -.02em; color: var(--brand); }
.stat span { font-size: .82rem; color: var(--muted); }
.stat + .stat { border-left: 1px solid #eef0f7; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.kicker { color: var(--brand); font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
h2.title { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.02em; margin: 8px 0 14px; }
.lead { color: var(--ink-2); max-width: 46em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid #eef0f7;
}
.card .ico { font-size: 1.7rem; margin-bottom: 12px; display: block; }
.card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card p { font-size: .93rem; color: var(--muted); }
.step-n {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 800; margin-bottom: 12px;
}

/* ---------- Témoignages ---------- */
.testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.testi .card { position: relative; }
.stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: 8px; }
.testi .who { margin-top: 14px; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.testi .who span { color: var(--muted); font-weight: 500; }

/* ---------- Pricing ---------- */
.price-card {
  max-width: 520px; margin: 36px auto 0; text-align: center; position: relative;
  border: 2px solid var(--brand); box-shadow: var(--shadow-lg);
}
.price-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--danger); color: #fff; font-size: .78rem; font-weight: 800;
  padding: 6px 16px; border-radius: 999px; white-space: nowrap;
}
.price-old { color: var(--muted); text-decoration: line-through; font-size: 1.1rem; }
.price-now { font-size: 3rem; font-weight: 850; letter-spacing: -.03em; color: var(--ink); }
.price-now small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.check-list { text-align: left; margin: 22px auto; max-width: 380px; list-style: none; }
.check-list li { padding: 7px 0 7px 30px; position: relative; font-size: .95rem; }
.check-list li::before { content: "✔"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.guarantee { display: flex; gap: 12px; align-items: center; justify-content: center; font-size: .85rem; color: var(--muted); margin-top: 16px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 30px auto 0; }
.faq details { background: #fff; border: 1px solid #eef0f7; border-radius: 12px; padding: 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-top: 10px; color: var(--ink-2); font-size: .95rem; }

/* ---------- Footer ---------- */
footer { background: #171a33; color: rgba(255,255,255,.6); padding: 40px 0; font-size: .82rem; }
footer a { color: rgba(255,255,255,.8); }
.disclaimer { margin-top: 12px; font-size: .75rem; color: rgba(255,255,255,.4); max-width: 60em; }

/* ---------- Test ---------- */
.test-shell { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; }
.test-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); background: #fff; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.timer.low { color: var(--danger); }
.progress { height: 10px; background: #e6e8f4; border-radius: 999px; overflow: hidden; margin-bottom: 30px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand-grad); border-radius: 999px; transition: width .35s ease; }
.q-card { min-height: 340px; }
.q-num { color: var(--brand); font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.q-text { font-size: 1.25rem; font-weight: 700; margin: 10px 0 24px; line-height: 1.45; }
.answers { display: grid; gap: 12px; }
.ans {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: #fff; border: 2px solid #e6e8f4; border-radius: 14px; padding: 15px 18px;
  font-size: 1rem; cursor: pointer; transition: border-color .12s, transform .12s, background .12s;
}
.ans:hover { border-color: var(--brand); transform: translateY(-1px); }
.ans.sel { border-color: var(--brand); background: #eef0ff; }
.ans .key {
  flex: 0 0 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #eef0f7; font-weight: 800; font-size: .85rem; color: var(--ink-2);
}
.ans.sel .key { background: var(--brand); color: #fff; }
.test-nav { display: flex; justify-content: space-between; margin-top: 26px; }

/* ---------- Résultat teaser ---------- */
.result-hero { background: var(--brand-grad); color: #fff; padding: 54px 0 140px; text-align: center; }
.result-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -.02em; }
.result-hero p { color: rgba(255,255,255,.85); margin-top: 8px; }
.reveal-card { max-width: 640px; margin: -100px auto 0; position: relative; z-index: 2; text-align: center; padding: 40px 30px; }
.qi-blur {
  font-size: 5rem; font-weight: 900; letter-spacing: -.04em; color: var(--brand);
  filter: blur(14px); user-select: none; line-height: 1;
}
.qi-clear { font-size: 5rem; font-weight: 900; letter-spacing: -.04em; color: var(--brand); line-height: 1; }
.lock-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .9rem; margin: 10px 0 24px; }
.mini-bars { display: grid; gap: 10px; max-width: 420px; margin: 0 auto 26px; text-align: left; }
.mini-bars .row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; font-size: .85rem; color: var(--ink-2); }
.mini-bars .bar { height: 9px; border-radius: 999px; background: #e6e8f4; overflow: hidden; }
.mini-bars .bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); filter: blur(3px); }
.unlocked .mini-bars .bar > i { filter: none; }
.countdown-box {
  background: #fff7ed; border: 1.5px dashed var(--accent); border-radius: 12px;
  padding: 12px 18px; margin: 0 auto 22px; max-width: 420px; font-size: .92rem; color: #92400e;
}
.countdown-box b { font-variant-numeric: tabular-nums; }
.form-line { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.form-line input[type=email] {
  flex: 1; border: 2px solid #e6e8f4; border-radius: 12px; padding: 14px 16px; font-size: 1rem;
}
.form-line input[type=email]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* ---------- Paiement ---------- */
.pay-shell { max-width: 480px; margin: 40px auto 80px; }
.order-recap { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid #eef0f7; margin-bottom: 8px; }
.order-recap .p-old { color: var(--muted); text-decoration: line-through; margin-right: 8px; font-size: .9rem; }
.order-recap .p-now { font-weight: 850; font-size: 1.3rem; }
#payment-element { margin: 20px 0; }
.pay-secure { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 14px; }
.pay-error { color: var(--danger); font-size: .9rem; margin-top: 10px; min-height: 1.2em; }

/* ---------- Rapport complet ---------- */
.report-qi { text-align: center; padding: 10px 0 0; }
.domain-bars { display: grid; gap: 18px; margin: 26px 0; }
.domain-bars .row { display: grid; grid-template-columns: 130px 1fr 52px; gap: 14px; align-items: center; }
.domain-bars .lbl { font-weight: 700; font-size: .92rem; }
.domain-bars .bar { height: 14px; border-radius: 999px; background: #e6e8f4; overflow: hidden; }
.domain-bars .bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); transition: width 1s ease; }
.domain-bars .pct { font-weight: 800; font-size: .9rem; color: var(--brand); text-align: right; font-variant-numeric: tabular-nums; }
.analysis h3 { margin: 22px 0 6px; font-size: 1.02rem; }
.analysis p { color: var(--ink-2); font-size: .95rem; }
.certificate {
  border: 3px double #c7cbe8; border-radius: 14px; padding: 34px; text-align: center;
  background: linear-gradient(180deg, #fff, #fafbff); margin-top: 34px;
}
.certificate .c-title { font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.certificate .c-qi { font-size: 3.4rem; font-weight: 900; color: var(--brand); letter-spacing: -.03em; }
.certificate .c-line { font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.print-btn { margin-top: 18px; }

/* ---------- Toast preuve sociale ---------- */
.toast {
  position: fixed; left: 18px; bottom: 18px; z-index: 50;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 12px 16px; font-size: .84rem; color: var(--ink-2); display: flex; gap: 10px; align-items: center;
  transform: translateY(140%); transition: transform .45s ease;
  max-width: 320px;
}
.toast.show { transform: translateY(0); }
.toast .t-ico { font-size: 1.2rem; }

/* ---------- Sticky CTA mobile ---------- */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: none;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); box-shadow: 0 -8px 30px rgba(19,22,41,.12);
}

/* ---------- Print ----------
   L'impression rend TOUJOURS la page entière, proprement. Aucun mode caché,
   aucune classe à poser : la règle historique « visibility:hidden sauf le
   certificat » produisait des PDF de N pages vides. Le certificat seul
   s'imprime depuis sa page dédiée merci.php?certificat=1. */
@media print {
  .print-btn, .sticky-cta, .toast, .topbar .mini { display: none !important; }
  body { background: #fff; }
  .result-hero { background: #fff !important; color: #000; padding: 10px 0 20px; }
  .result-hero p, .result-hero h1 { color: #000; }
  .logo { color: #000 !important; }
  /* break-inside auto : une carte plus haute qu'une page A4 serait rognée
     par Chrome si on lui interdisait de se couper */
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: auto; }
  .certificate { break-inside: avoid; }
  .reveal-card { margin-top: 0; }
  .analysis h2, .analysis h3 { break-after: avoid; }
  details { display: block; }
  details > *:not(summary) { display: block !important; } /* corrigé déplié à l'impression */
  details > summary { display: none !important; }
  .qi-clear, .domain-bars .bar > i, .mini-bars .bar > i {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 0 60px; }
  .hero-card { display: none; }
  .statbar-in { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid #eef0f7; }
  .grid-3, .testi { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .sticky-cta { display: block; }
  .form-line { flex-direction: column; }
}
