/* La logique du débutant en musculation — page de vente
   Identité reprise du livre : bleu nuit #17365D, or #D9A300, Noto Serif pour les titres. */

@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #0b1626;
  --night-2: #10213a;
  --navy: #17365d;
  --ink: #0f172a;
  --text: #1f2937;
  --muted: #5b6474;
  --on-dark: #e6ebf2;
  --on-dark-muted: #a3b1c6;
  --gold: #d9a300;
  --gold-bright: #f2b630;
  --gold-text: #8a6200;
  --paper: #ffffff;
  --panel: #f6f7f9;
  --border: #dde2ea;
  --radius-lg: 28px;
  --radius: 16px;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 18px 40px rgba(11, 22, 38, 0.12);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--gold-bright); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.eyebrow {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-text); margin: 0 0 10px;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--gold-bright); }

/* ---------- En-tête ---------- */
.site-header { background: var(--night); color: var(--on-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.brand span { color: var(--gold-bright); }
.header-cta {
  color: var(--ink); background: var(--gold-bright); text-decoration: none; font-weight: 800; font-size: 0.9rem;
  padding: 9px 14px; border-radius: 12px; white-space: nowrap;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 22px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold-bright); color: var(--ink); box-shadow: 0 8px 22px rgba(242, 182, 48, 0.25); }
.btn-primary:hover { background: #f6c451; }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-dark { background: var(--navy); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.65; cursor: progress; transform: none; }
.btn .spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite; display: none;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bandeau d'annulation ---------- */
.notice {
  margin: 0 0 24px; padding: 14px 16px; border-radius: 14px;
  background: #fff8e6; border: 1px solid #f2d27a; color: #5a4300; font-weight: 600;
}
.notice[hidden] { display: none; }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--night);
  background-image:
    radial-gradient(800px 400px at 85% 10%, rgba(242, 182, 48, 0.10), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  color: var(--on-dark);
  padding: 40px 0 56px;
  overflow: hidden;
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07);
  border-radius: 999px; padding: 7px 12px; font-size: 0.8rem; font-weight: 700; color: var(--on-dark);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright); }
.hero h1 {
  color: #fff; font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1.02; letter-spacing: -0.01em; margin: 22px 0 18px;
}
.hero h1 .accent { color: var(--gold-bright); display: block; }
.hero .lead { color: #cbd5e1; font-size: 1.125rem; max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.actions .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .actions .btn { flex: 0 0 auto; } }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--on-dark-muted); font-size: 0.95rem; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { color: var(--gold-bright); flex: none; }

/* ---------- Couverture du livre ---------- */
.book-stage { display: flex; justify-content: center; perspective: 1200px; }
.book {
  position: relative; width: min(300px, 78vw); aspect-ratio: 612 / 792;
  background: #fff; color: var(--navy);
  border-radius: 4px 14px 14px 4px;
  padding: 11% 9% 9%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: -14px 0 0 -6px #e9edf3 inset, 0 30px 70px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.25);
  transform: rotateY(-14deg) rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(.2, .7, .2, 1);
}
.book::before { /* tranche */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0)); border-radius: 4px 0 0 4px;
}
.book:hover { transform: rotateY(-5deg) rotateX(1deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .book, .book:hover { transform: none; transition: none; } }
.book-kicker { font-family: var(--serif); font-weight: 700; font-size: clamp(0.5rem, 1.6vw, 0.62rem); letter-spacing: 0.06em; color: var(--gold); margin-bottom: 9%; }
.book-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.15rem, 4.4vw, 1.55rem); line-height: 1.18; letter-spacing: 0.01em; }
.book-slogan { font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: clamp(0.75rem, 2.6vw, 0.95rem); margin-top: 8%; }
.book-sub { font-family: var(--serif); font-style: italic; color: #666; font-size: clamp(0.55rem, 1.8vw, 0.68rem); line-height: 1.4; margin-top: 4%; }
.book-band {
  margin-top: auto; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--navy); color: #fff; font-family: var(--serif); font-weight: 700;
  font-size: clamp(0.42rem, 1.4vw, 0.55rem); letter-spacing: 0.04em;
}
.book-band span { padding: 9px 2px; border-left: 1px solid rgba(255,255,255,.18); }
.book-band span:first-child { border-left: 0; }
.book-format { margin-top: 18px; text-align: center; color: var(--on-dark-muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
@media (min-width: 880px) { .section { padding: 80px 0; } }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); }
.panel { background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card { border: 1px solid var(--border); border-radius: 20px; padding: 24px; background: #fff; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #fff3d6; color: #8a6200; margin-bottom: 14px;
}
.card p { color: var(--muted); margin: 0; }

/* Aperçus */
.previews {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 72%); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 880px) {
  .previews { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
}
.preview { scroll-snap-align: start; margin: 0; }
.preview a, .preview button.zoom {
  display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow); cursor: zoom-in; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.preview a:hover, .preview button.zoom:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(11, 22, 38, 0.16); }
.preview img { width: 100%; aspect-ratio: 612 / 792; object-fit: cover; }
.preview figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 10px; }
.preview figcaption b { color: var(--ink); display: block; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(860px, 94vw); max-height: 94vh; }
.lightbox::backdrop { background: rgba(5, 10, 20, 0.82); }
.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; border-radius: 8px; background: #fff; }
.lightbox .close {
  display: block; margin: 0 0 10px auto; background: #fff; color: var(--ink); border: 0; border-radius: 10px;
  padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer;
}

/* Méthode */
.method { display: grid; gap: 28px; margin-top: 48px; align-items: start; }
@media (min-width: 880px) { .method { grid-template-columns: 0.9fr 1.1fr; gap: 48px; } }
.callout { background: var(--night); color: var(--on-dark); border-radius: var(--radius-lg); padding: 28px; }
.callout h3 { color: #fff; }
.callout p { color: var(--on-dark-muted); margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; background: #fff3d6; color: #5a4300;
  display: grid; place-items: center; font-weight: 900;
}
.steps b { display: block; color: var(--ink); }
.steps span { color: var(--muted); }

/* Chapitres */
.chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: chap; }
@media (min-width: 760px) { .chapters { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.chapters li {
  display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: baseline;
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: #fff;
}
.chapters li::before {
  counter-increment: chap; content: counter(chap, decimal-leading-zero) ".";
  font-family: var(--serif); font-weight: 700; color: var(--gold-text);
}
.contents { display: grid; gap: 10px; margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.contents div { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.contents b { display: block; font-family: var(--serif); color: var(--navy); font-size: 1.35rem; }
.contents span { color: var(--muted); font-size: 0.95rem; }

/* Achat */
.buy {
  background: var(--night); color: var(--on-dark); border-radius: var(--radius-lg);
  padding: 28px 20px; display: grid; gap: 28px;
  background-image: radial-gradient(600px 300px at 100% 0%, rgba(242, 182, 48, 0.12), transparent 60%);
}
@media (min-width: 880px) { .buy { grid-template-columns: 1.1fr 0.9fr; padding: 44px; gap: 44px; align-items: center; } }
.buy h2 { color: #fff; }
.price { font-family: var(--serif); font-weight: 700; color: #fff; font-size: clamp(2.4rem, 7vw, 3.2rem); line-height: 1; margin: 6px 0 4px; }
.price-note { color: var(--on-dark-muted); font-size: 0.92rem; margin: 0 0 18px; }
.includes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.includes li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--on-dark); }
.includes svg { color: var(--gold-bright); margin-top: 3px; }
.buy-form { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; padding: 20px; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 0.95rem; color: var(--on-dark); cursor: pointer; }
.consent a, .buy a { color: var(--gold-bright); font-weight: 700; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold-bright); cursor: pointer; }
.buy-form .btn { width: 100%; margin-top: 18px; }
.form-status { min-height: 1.6em; margin: 12px 0 0; color: #fde68a; font-weight: 600; }
.secure { margin: 14px 0 0; color: var(--on-dark-muted); font-size: 0.88rem; display: flex; gap: 8px; align-items: flex-start; }
.secure svg { flex: none; margin-top: 3px; }

/* FAQ */
.faq { border-top: 1px solid var(--border); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-weight: 800; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--gold-text); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* Pied de page */
.site-footer { background: var(--night); color: var(--on-dark-muted); padding: 36px 0; font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--on-dark); }
.site-footer p { margin: 0; }

/* Pages simples (merci, 404, légal) */
.simple { padding: 48px 0 72px; }
.simple .wrap { max-width: 760px; }
.status-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 22px; box-shadow: var(--shadow); background: #fff; }
@media (min-width: 640px) { .status-card { padding: 40px; } }
.status-card[hidden] { display: none; }
.status-card .btn { margin-top: 8px; }
.status-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.status-icon.ok { background: #e3f5ec; color: #1f6b4a; }
.status-icon.wait { background: #fff3d6; color: #8a6200; }
.status-icon.err { background: #fde8e8; color: #9b1c1c; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.tips { background: var(--panel); border-radius: 14px; padding: 16px 18px; margin-top: 22px; }
.tips ul { margin: 6px 0 0; padding-left: 20px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal .todo { background: #fff3d6; color: #5a4300; padding: 0 4px; border-radius: 4px; font-weight: 700; }

/* Apparition douce au défilement (activée uniquement si JS + mouvement autorisé) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
