:root {
  --bg: #0a0a0b;
  --panel: #131315;
  --panel-2: #1a1a1d;
  --line: #2a2a2f;
  --gold: #d9ae4a;
  --gold-2: #f1d27a;
  --ivory: #f4efe4;
  --muted: #a8a294;
  --ok: #72c493;
  --bad: #e5776a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.gold { color: var(--gold); }
.eyebrow { font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1405; box-shadow: 0 8px 30px rgba(217,174,74,.25); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(217,174,74,.35); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 14.5px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Barre du haut */
.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); background: rgba(10,10,11,.82); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ivory); text-decoration: none; white-space: nowrap; }
.btn { white-space: nowrap; }
.brand span { color: var(--gold); }

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(900px 480px at 78% 10%, rgba(217,174,74,.12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); }
.hero h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: 19px; color: #d6d0c2; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.pay-note { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.pay-note span::before { content: "✓ "; color: var(--ok); }
.cover { justify-self: center; width: min(340px, 82%); border-radius: 8px; box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(217,174,74,.25); transform: rotate(1.8deg); }

/* Sections */
section { padding: 72px 0; }
section h2 { font-size: clamp(30px, 4vw, 44px); }
.section-lead { color: #cfc9ba; max-width: 40em; font-size: 18px; }
.alt { background: var(--panel); border-block: 1px solid var(--line); }

.rules { display: grid; gap: 12px; margin-top: 32px; padding: 0; list-style: none; counter-reset: r; }
.rules li { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.rules li::before { counter-increment: r; content: counter(r); font-family: var(--serif); font-size: 28px; color: var(--gold); text-align: center; }
.rules strong { display: block; font-size: 18px; }
.rules small { color: var(--muted); font-size: 14.5px; }
.tag { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.free { color: var(--ok); border-color: rgba(114,196,147,.4); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 21px; }
.card p { color: #cfc9ba; margin: 0; font-size: 16px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.proof { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius); padding: 28px; }

.price-card { max-width: 520px; margin: 32px auto 0; text-align: center; background: linear-gradient(180deg, #17171a, #111113); border: 1px solid rgba(217,174,74,.45); border-radius: 22px; padding: 40px 32px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.price { font-family: var(--serif); font-size: 64px; color: var(--gold-2); line-height: 1; margin: 10px 0 6px; }
.price-card ul { text-align: left; list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; }
.price-card li::before { content: "✓"; color: var(--ok); margin-right: 10px; }

details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--gold); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: #cfc9ba; margin: 12px 0 0; }

.optin { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
input[type=text], input[type=email], input[type=number], textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; background: #0e0e10; color: var(--ivory);
  border: 1px solid var(--line); border-radius: 12px; font: 16px var(--sans);
}
input::placeholder, textarea::placeholder { color: #6f6b60; }
.optin input { flex: 1 1 240px; width: auto; }

footer { padding: 36px 0 60px; color: var(--muted); font-size: 14px; text-align: center; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #222226; border: 1px solid var(--gold); color: var(--ivory); padding: 14px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: min(92vw, 520px); font-size: 15px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Lecteur ===== */
.reader { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - 64px); }
.side { border-right: 1px solid var(--line); background: var(--panel); padding: 22px 16px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto; }
.side h4 { margin: 0 8px 14px; font: 600 12px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.toc button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 11px 12px; border-radius: 10px; cursor: pointer; color: #d6d0c2; font-size: 15px; line-height: 1.35; }
.toc button:hover { background: var(--panel-2); }
.toc button.on { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--gold); color: var(--ivory); }
.toc .ico { text-align: center; opacity: .9; }
.toc small { display: block; color: var(--muted); font-size: 12px; }
.badge-done { color: var(--ok); }

.stage { padding: 44px clamp(20px, 5vw, 64px) 90px; }
.page { max-width: 700px; margin: 0 auto; }
.page .num { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: 13px; font-weight: 600; }
.page h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 8px 0 10px; }
.page .sub { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 20px; margin: 0 0 30px; }
.prose { font-family: var(--serif); font-size: 19.5px; line-height: 1.75; color: #e7e1d3; font-weight: 400; }
.prose p { margin: 0 0 1.1em; }
.prose h3 { font-size: 25px; color: var(--gold-2); margin: 1.7em 0 .5em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .7em; }
.prose blockquote { margin: 1.4em 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--gold); font-style: italic; font-size: 22px; color: var(--gold-2); }
.prose .signature { font-family: var(--serif); font-size: 24px; color: var(--gold-2); text-align: right; }
.figure { margin: 34px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; flex-wrap: wrap; }

.product-bar { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 30px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.product-bar label { color: var(--muted); }
.product-bar input { flex: 1 1 220px; width: auto; min-height: 42px; }

/* Ateliers */
.workshop { margin: 42px 0 10px; padding: 28px; border-radius: 18px; background: linear-gradient(180deg, #17171a, #111113); border: 1px solid rgba(217,174,74,.4); font-family: var(--sans); }
.workshop h3 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; color: var(--ivory); }
.workshop .ws-kicker { color: var(--gold); font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.workshop p.ws-intro { color: #cfc9ba; font-size: 16px; margin: 0 0 22px; }
.q { margin: 0 0 22px; }
.q > .qt { font-weight: 600; font-size: 16.5px; margin-bottom: 10px; line-height: 1.45; }
.yn { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.yn button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: #0e0e10; color: var(--ivory); font: 600 15px var(--sans); cursor: pointer; }
.yn button:hover { border-color: var(--gold); }
.yn button.sel-yes { background: rgba(114,196,147,.16); border-color: var(--ok); color: var(--ok); }
.yn button.sel-no { background: rgba(229,119,106,.14); border-color: var(--bad); color: var(--bad); }
.rowline { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.result { margin-top: 18px; padding: 18px 20px; border-radius: 12px; background: #0e0e10; border: 1px solid var(--line); font-size: 16px; }
.result.good { border-color: rgba(114,196,147,.55); background: rgba(114,196,147,.07); }
.result.warn { border-color: rgba(229,119,106,.55); background: rgba(229,119,106,.07); }
.result .big { font-family: var(--serif); font-size: 40px; color: var(--gold-2); line-height: 1.1; }
.result.empty { color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--gold); height: 40px; }
.range-val { font-family: var(--serif); font-size: 44px; color: var(--gold-2); }

.score { display: grid; gap: 10px; margin: 16px 0 0; }
.score-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: #0e0e10; border: 1px solid var(--line); }
.score-row.pass { border-color: rgba(114,196,147,.5); }
.score-row.fail { border-color: rgba(229,119,106,.5); }
.score-row .st { font-size: 13px; color: var(--muted); }
.score-row button { all: unset; cursor: pointer; color: var(--gold-2); font-size: 14px; text-decoration: underline; }
.meter { height: 10px; border-radius: 99px; background: #0e0e10; border: 1px solid var(--line); overflow: hidden; margin: 12px 0 6px; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .4s; }

/* Paywall */
.paywall { margin-top: 28px; padding: 32px; border-radius: 20px; border: 1px solid rgba(217,174,74,.5); background: linear-gradient(180deg, #17171a, #111113); text-align: center; font-family: var(--sans); }
.paywall h3 { font-size: 28px; }
.paywall p { color: #cfc9ba; }
.keybox { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); text-align: left; }
.keybox label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.keybox .optin { margin-top: 0; }
.msg { margin-top: 10px; font-size: 14.5px; min-height: 1.3em; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.thanks { margin-bottom: 26px; padding: 16px 18px; border-radius: 12px; background: rgba(114,196,147,.1); border: 1px solid rgba(114,196,147,.5); font-family: var(--sans); font-size: 16px; }

.menu-btn { display: none; }

@media (max-width: 900px) {
  .topbar .btn-ghost.hide-sm { display: none; }
  .topbar .btn { padding: 0 16px; }
  .hero-grid, .two { grid-template-columns: 1fr; }
  .cover { order: -1; width: min(240px, 60%); }
  .cards { grid-template-columns: 1fr; }
  .rules li { grid-template-columns: 40px 1fr; }
  .rules .tag { display: none; }
  .reader { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 64px 0 0 0; z-index: 25; height: auto; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .grid2 { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero { padding-top: 36px; }
}
@media (max-width: 400px) {
  .topbar .wrap { gap: 10px; }
  .topbar .btn { padding: 0 12px; font-size: 13.5px; }
  .brand { font-size: 17px; }
  .two .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media print {
  body { background: #fff; color: #000; }
  .topbar, .side, .pager, .product-bar, .btn, .score-row button, .no-print { display: none !important; }
  .reader { display: block; }
  .workshop, .result, .score-row { background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .prose, .page h1, .workshop h3 { color: #000 !important; }
}

/* Mobile : les boutons « précédent / suivant » peuvent passer à la ligne (titres longs) */
.pager > * { max-width: 100%; }
.pager .btn { white-space: normal; text-align: left; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 380px) {
  .topbar .wrap { gap: 8px; }
  .topbar .btn-sm { padding: 0 12px; }
  .brand { font-size: 17px; }
}
@media (max-width: 340px) {
  .topbar .wrap { gap: 6px; }
  .topbar .btn-sm { padding: 0 8px; font-size: 13px; }
  .brand { font-size: 15px; }
}
@media (max-width: 420px) {
  main .btn { white-space: normal; text-align: center; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
}
