/* =====================================================================
   MARCEL STUDIO — identité de l'ebook « Crée ton personnage IA viral »
   Noir prune, crème et or. Titres : Archivo Black. Mobile d'abord.
   Couleurs relevées dans le PDF : modifiables ici, dans :root
   ===================================================================== */
@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Pages sombres de l'ebook */
  --bg: #160e13;          /* noir prune (fond principal) */
  --bg-2: #1c1218;        /* encadrés sombres */
  --line: #3d3037;
  --line-strong: #5a4a52;
  --cream: #efe7dc;       /* texte crème */
  --muted: #b9ada3;
  --gold: #d9a95b;        /* accent or / ocre */
  /* Pages claires de l'ebook */
  --light-bg: #f4ece1;    /* beige crème */
  --light-box: #e8ddcc;
  --light-line: #d9ccb8;
  --light-ink: #1c1218;
  --light-gold: #8a6a2e;
  --light-muted: #5a4a52;

  --wa: #25d366;
  --radius: 18px;
  --gutter: 16px;
  --max: 1080px;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Masque la page le temps de charger la langue (sécurité : réaffichée après 2,5 s) */
html:not(.i18n-ready) body { opacity: 0; animation: ms-reveal 0s linear 2.5s forwards; }
@keyframes ms-reveal { to { opacity: 1; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 16px/1.6 var(--body);
  overflow-x: clip;
  transition: opacity .25s ease;
}
body[data-page="home"] { padding-bottom: 112px; }
@media (min-width: 900px) { body[data-page="home"] { padding-bottom: 0; } }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 32px; } }

/* ---------- Typo ---------- */
h1, h2, .wordmark, .stat strong, .kicker, .eyebrow, .btn, .ch-num, .langs-title, .header-cta {
  font-family: var(--display);
  text-transform: uppercase;
}
h1 { font-size: clamp(38px, 11.4vw, 76px); line-height: .98; letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 9.2vw, 56px); line-height: 1; letter-spacing: -.01em; margin-bottom: 14px; }
h1 em, h2 em { font-style: normal; color: var(--gold); }
h3 { font-weight: 700; }
h1, h2, h3 { text-wrap: balance; }
.kicker, .eyebrow {
  display: block;
  font-size: 11px; line-height: 1.4; letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 12px;
}
.lead { color: var(--muted); font-size: 17px; max-width: 560px; }
.lead strong, p strong { color: var(--cream); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; opacity: .85; }
.fine a { color: inherit; }
.center { text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 24px;
  border-radius: 999px; border: 0;
  font-size: 14px; letter-spacing: .06em; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, filter .2s ease, background-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: var(--gold); color: var(--bg); box-shadow: 0 12px 30px -14px rgba(217, 169, 91, .8); }
.btn-gold:hover { filter: brightness(1.07); }
.btn-xl { min-height: 60px; font-size: 15px; }
.btn-outline { background: transparent; color: var(--cream); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--gold); }
.btn-clan { background: transparent; color: var(--cream); border: 1.5px solid var(--line-strong); }
.btn-clan svg { color: var(--wa); }
.btn-clan:hover { border-color: var(--wa); }
.btn-wa { background: var(--wa); color: #06210f; }
.btn-wa:hover { filter: brightness(1.06); }
.link-btn {
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  color: var(--gold); font-weight: 700; font-size: 14px;
  text-decoration: underline; text-underline-offset: 4px;
}

/* Bloc de boutons d'achat */
.cta-stack { display: flex; flex-direction: column; align-items: stretch; max-width: 420px; margin-top: 26px; }
.cta-stack .btn + .btn, .cta-stack .cgv-note + .btn { margin-top: 18px; }
.buy-meta { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.cgv-note { margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--muted); opacity: .75; text-align: center; }
.cgv-note a { color: inherit; text-underline-offset: 2px; }
.clan-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(22, 14, 19, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; }
.wordmark {
  display: inline-flex; flex-direction: column;
  font-size: 15px; line-height: .95; letter-spacing: .06em; text-decoration: none; color: var(--cream);
}
.wordmark span { color: var(--gold); font-size: 9.5px; letter-spacing: .42em; margin-top: 3px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex; padding: 3px; gap: 1px;
  border: 1px solid var(--line-strong); border-radius: 999px;
}
.lang-switch button {
  min-width: 32px; min-height: 32px; padding: 0 6px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted);
}
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--bg); }
.wa-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--wa); color: #06210f; text-decoration: none;
}
.wa-icon svg { width: 22px; height: 22px; }
.wa-icon:hover { filter: brightness(1.06); }
.header-cta {
  display: none;
  font-size: 12px; letter-spacing: .06em; text-decoration: none;
  color: var(--bg); background: var(--gold);
  padding: 11px 18px; border-radius: 999px;
}
@media (min-width: 900px) { .header-cta { display: inline-flex; } .header-right { gap: 12px; } }

/* ---------- Emplacements d'images (remplis par /js/site.js) ---------- */
.ph {
  position: relative; overflow: hidden;
  aspect-ratio: var(--ratio, 1 / 1);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.ph > img, .ph > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease;
}
.ph.has-media > img, .ph.has-media > video { opacity: 1; }
.ph-label { display: none; }
.ph.is-missing { border: 1.5px dashed var(--line-strong); }
.ph.is-missing .ph-label {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px; text-align: center;
  font-size: 12px; color: var(--muted); line-height: 1.3; word-break: break-word;
}
.ph-label b { color: var(--gold); letter-spacing: .14em; font-size: 11px; }
.ph-label span { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- Sections ---------- */
main > section { padding-block: 64px; }
@media (min-width: 900px) { main > section { padding-block: 104px; } }
.light { background: var(--light-bg); color: var(--light-ink); }
.light .eyebrow { color: var(--light-gold); }
.light .lead, .light p { color: var(--light-muted); }
.light h2 em { color: var(--light-gold); }
.light .buy-meta, .light .cgv-note { color: var(--light-muted); }

/* 1. Hero ------------------------------------------------------------ */
main > section.hero { padding: 0 0 56px; }
.hero-media { position: relative; height: clamp(250px, 46svh, 430px); overflow: hidden; background: #8f8f8f; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,14,19,0) 45%, rgba(22,14,19,.75) 78%, var(--bg) 100%);
}
.hero-copy { position: relative; z-index: 1; margin-top: -86px; padding-inline: var(--gutter); }
.hero h1 { margin-bottom: 16px; }
.hero-hook { font-size: 17px; line-height: 1.5; color: var(--cream); max-width: 520px; }
.hero-specs { margin-top: 10px; font-size: 14px; color: var(--muted); max-width: 520px; }
.hero .cta-stack { margin-top: 22px; }
@media (min-width: 900px) {
  main > section.hero { padding: 56px 0 96px; }
  .hero-inner {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
    max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  }
  .hero-media { order: 2; height: auto; aspect-ratio: 4 / 5; border-radius: 24px; }
  .hero-media::after { background: linear-gradient(180deg, rgba(22,14,19,0) 70%, rgba(22,14,19,.6) 100%); }
  .hero-copy { order: 1; margin-top: 0; padding: 0; }
}

/* 2. Preuves ---------------------------------------------------------- */
.proof { border-top: 1px solid var(--line); }
.stats { margin: 28px 0 0; border-top: 1px solid var(--line); }
.stat { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stat strong {
  flex: 0 0 44%; font-size: clamp(32px, 9.4vw, 56px); line-height: 1; color: var(--gold); white-space: nowrap;
}
.stat span { display: flex; flex-direction: column; }
.stat b { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--cream); }
.stat small { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (min-width: 760px) {
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-top: 0; }
  .stat { flex-direction: column; gap: 8px; border-bottom: 0; border-top: 2px solid var(--gold); }
}
.proof-extra { margin-top: 20px; color: var(--muted); }

.bag {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; align-items: start;
  margin-top: 32px; padding: 14px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
}
.bag-media { border-radius: 12px; }
.ai-tag {
  position: absolute; z-index: 1; left: 6px; right: 6px; bottom: 6px;
  padding: 3px 6px; border-radius: 6px; background: rgba(22,14,19,.78);
  font-size: 9.5px; line-height: 1.25; color: var(--cream); text-align: center;
}
.bag-copy .eyebrow { margin-bottom: 6px; }
.bag-copy h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 19px; line-height: 1.1; margin-bottom: 6px; }
.bag-text { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.bag-stats { margin-top: 10px; }
.bag-stats .stat { padding: 3px 0; border: 0; gap: 0 8px; flex-direction: row; flex-wrap: wrap; }
.bag-stats .stat strong { flex: none; font-size: 21px; }
.bag-stats .stat b { font-size: 13px; color: var(--muted); font-weight: 600; }
@media (min-width: 760px) {
  .bag { grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 20px; max-width: 640px; }
  .bag-copy h3 { font-size: 26px; }
  .bag-text { font-size: 15px; }
}
.proof-note { margin-top: 22px; max-width: 640px; }

/* 3. Contenu de l'ebook ------------------------------------------------ */
.chapters { margin-top: 28px; border-top: 1px solid var(--light-line); }
.chapter { display: grid; grid-template-columns: 40px 1fr; gap: 6px; padding: 13px 0; border-bottom: 1px solid var(--light-line); }
.ch-num { color: var(--light-gold); font-size: 14px; line-height: 1.6; }
.chapter h3 { font-size: 16px; line-height: 1.35; color: var(--light-ink); }
.chapter p { font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
@media (min-width: 760px) { .chapters { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.langs-box {
  margin-top: 24px; padding: 18px; border-radius: var(--radius);
  background: var(--light-box); border-left: 3px solid var(--gold);
}
.langs-title { font-size: 14px; letter-spacing: .08em; color: var(--light-ink); }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.lang-chips li {
  padding: 4px 10px; border-radius: 999px; background: var(--light-bg); border: 1px solid var(--light-line);
  font-size: 13px; font-weight: 600; color: var(--light-ink);
}
.lang-chips b { color: var(--light-gold); margin-right: 3px; }
.langs-text { font-size: 14px; }
.contents .cta-stack { margin-top: 30px; }

/* 4. Pour qui ---------------------------------------------------------- */
.ticks { margin-top: 22px; max-width: 640px; }
.ticks li { position: relative; padding: 14px 0 14px 38px; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.45; }
.ticks li:first-child { border-top: 1px solid var(--line); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 14px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: var(--bg); background: var(--gold);
}

/* 5. FAQ --------------------------------------------------------------- */
.faq-list { margin-top: 22px; border-top: 1px solid var(--light-line); max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--light-line); }
.faq-item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 44px 18px 0; font-weight: 700; font-size: 16px; line-height: 1.4; color: var(--light-ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--light-line); color: var(--light-gold); font-size: 18px; transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { padding: 0 0 18px; font-size: 15px; color: var(--light-muted); }
.faq-a a, .faq-help a { color: var(--light-ink); font-weight: 700; }
.faq-help { margin-top: 18px; font-size: 14px; }

/* 6. Appel final -------------------------------------------------------- */
.final .lead { margin-top: 4px; }
.clan-card {
  margin-top: 40px; padding: 22px 18px; max-width: 520px;
  border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line-strong);
}
.clan-card h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 21px; line-height: 1.1; margin-bottom: 8px; }
.clan-card p:not(.eyebrow) { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.clan-card .btn { width: 100%; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 32px; background: var(--bg); }
.site-footer .wrap > * + * { margin-top: 14px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-flex; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--cream);
}
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.legal-links a { color: var(--muted); }

/* ---------- Barre fixe mobile : achat + WhatsApp ---------- */
.mobile-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  background: rgba(22, 14, 19, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-strong);
  transform: translateY(110%); visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
}
.mobile-buy.show { transform: none; visibility: visible; transition: transform .3s ease; }
.mobile-buy-row { display: flex; align-items: center; gap: 10px; }
.mobile-buy-row .btn { flex: 1; min-height: 52px; font-size: 15px; }
.wa-icon-lg { width: 52px; height: 52px; }
.wa-icon-lg svg { width: 26px; height: 26px; }
.mobile-buy .cgv-note { margin-top: 5px; font-size: 10.5px; }
@media (min-width: 900px) { .mobile-buy { display: none; } }

/* ---------- Fenêtre captures ---------- */
.proof-modal {
  width: min(760px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 24px 16px 18px; border: 1px solid var(--line-strong); border-radius: 22px;
  background: var(--bg); color: var(--cream);
}
.proof-modal::backdrop { background: rgba(0, 0, 0, .82); }
.proof-modal h2 { font-size: clamp(22px, 6.4vw, 34px); margin: 0 44px 16px 0; }
.proof-modal .close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--bg-2); cursor: pointer; font-size: 22px; line-height: 1;
}
.proof-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-bottom: 12px;
}
.proof-grid .ph { scroll-snap-align: start; border-radius: 14px; }
@media (min-width: 640px) { .proof-grid { grid-auto-flow: row; grid-template-columns: 1fr 1fr; overflow: visible; } }

/* ---------- Page merci ---------- */
.merci-main { padding-block: 40px 72px; }
.merci-hero { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.ph-merci { width: 140px; margin: 0 auto 24px; border-radius: 50%; }
.ph-merci > img { object-position: 50% 8%; }
.merci-hero h1 { font-size: clamp(36px, 10.5vw, 68px); margin-bottom: 16px; }
.merci-hero .lead { margin-inline: auto; }
.merci-block { max-width: 720px; margin: 0 auto 44px; }
.merci-block h2 { font-size: clamp(26px, 7.4vw, 40px); margin-bottom: 10px; }
.merci-block > p { color: var(--muted); margin-bottom: 20px; }
.dl-grid { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 600px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
.dl-btn {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px;
  align-items: center; padding: 18px; border-radius: 18px; text-decoration: none;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  transition: border-color .2s ease, transform .15s ease;
}
.dl-btn:hover { border-color: var(--gold); }
.dl-btn:active { transform: scale(.98); }
.dl-btn.is-mine { border: 1.5px solid var(--gold); }
.dl-code {
  grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--bg); font-family: var(--display); font-size: 16px;
}
.dl-name { font-weight: 800; font-size: 17px; }
.dl-cta { color: var(--gold); font-size: 13.5px; font-weight: 700; }
.dl-badge {
  position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 4px;
  background: var(--gold); color: var(--bg); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.next-steps { counter-reset: n; margin-bottom: 24px; }
.next-steps li { counter-increment: n; position: relative; padding-left: 44px; margin: 14px 0; min-height: 30px; }
.next-steps li::before {
  content: counter(n); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--gold); font-weight: 800;
}
.merci-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.merci-state { max-width: 640px; margin: 0 auto; padding: 48px 0; text-align: center; }
.merci-state h1 { font-size: clamp(36px, 10.5vw, 68px); margin-bottom: 18px; }
.merci-state .lead { margin-inline: auto; }
.merci-state .lead + .lead { margin-top: 12px; }
.merci-error .lead a { color: var(--gold); }
.merci-actions-center { justify-content: center; margin: 28px 0 22px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--gold);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.merci-legal { margin-top: 8px; }
.merci-legal a, .merci-block .fine a { color: var(--muted); }
.socials-spaced { margin-top: 18px; }
.merci-main > section { padding-block: 0; }

/* ---------- Pages légales ---------- */
.legal-main { padding-block: 40px 80px; max-width: 820px; }
.legal-main > section { padding-block: 0; }
.legal-main h1 { font-size: clamp(32px, 9vw, 56px); margin-bottom: 14px; }
.legal-main h3 { font-size: 17px; font-weight: 800; margin: 24px 0 8px; }
.legal-main p, .legal-main li { color: var(--muted); margin-bottom: 10px; }
.legal-main ul { padding-left: 18px; list-style: disc; }
.legal-main a { color: var(--gold); }
.legal-section h2 { font-size: clamp(20px, 5.4vw, 28px); margin: 40px 0 12px; color: var(--gold); }
.legal-section ul { margin: 0 0 10px; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 700; color: var(--gold); text-decoration: none; }
.legal-note { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); font-size: 14px; }
.legal-note:empty { display: none; }
.todo { background: rgba(224, 87, 74, .18); color: #ffb3aa; padding: 1px 6px; border-radius: 4px; font-weight: 700; }

.noscript { padding: 20px; text-align: center; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .spinner { animation-duration: 2s; }
}
