/* Petite Lune — site public (landing, quiz, guide).
   Même palette et mêmes polices que l'application : brun-noir chaud + miel,
   Fredoka pour les titres, Nunito pour le texte.

   Les polices sont auto-hébergées, jamais chargées depuis Google Fonts : un
   appel au CDN de Google transfère l'adresse IP du visiteur hors de l'Union
   européenne, ce que la CNIL considère comme un traitement à part entière.
   Les fichiers viennent de node_modules/@fontsource*, copiés dans site/assets. */

@font-face {
  font-family: 'Fredoka Variable';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/assets/fredoka.woff2') format('woff2-variations');
}
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/nunito-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/nunito-800.woff2') format('woff2'); }

:root {
  --bg: #f3f1ec;
  --bg-deep: #e9e5dd;
  --surface: #ffffff;
  --surface-2: #ede9e2;
  --text: #23201c;
  --text-2: #5f574e;
  --text-3: #6f665c;
  --line: #ddd7ce;
  --line-2: #c2b9ad;
  --moon: #c88a2e;
  --moon-soft: #f6e6c8;
  --moon-text: #7d5209;
  --moon-ink: #2a1f0b;
  --sleep: #5a4e93;
  --sleep-soft: #e8e4f4;
  --ok: #2c6b4c;
  --ok-soft: #e0efe6;
  --danger: #a8203f;
  --danger-soft: #fbe0e6;
  --shadow: 0 1px 2px rgba(35, 32, 28, .06), 0 10px 30px -16px rgba(35, 32, 28, .28);
  --radius: 18px;
  --radius-sm: 11px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fredoka Variable', 'Fredoka', 'Nunito', system-ui, sans-serif;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110f; --bg-deep: #0d0b09; --surface: #1f1a16; --surface-2: #2a2420;
    --text: #f3ece2; --text-2: #b8ac9f; --text-3: #857a6f;
    --line: #3a322c; --line-2: #4a4038;
    --moon: #e9b872; --moon-soft: #3b2f18; --moon-text: #e9b872;
    --sleep: #a99cc9; --sleep-soft: #2c273d;
    --ok: #7fd3ae; --ok-soft: #17352a;
    --danger: #f2a0ae; --danger-soft: #3a1520;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -18px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14110f; --bg-deep: #0d0b09; --surface: #1f1a16; --surface-2: #2a2420;
  --text: #f3ece2; --text-2: #b8ac9f; --text-3: #857a6f;
  --line: #3a322c; --line-2: #4a4038;
  --moon: #e9b872; --moon-soft: #3b2f18; --moon-text: #e9b872;
  --sleep: #a99cc9; --sleep-soft: #2c273d;
  --ok: #7fd3ae; --ok-soft: #17352a;
  --danger: #f2a0ae; --danger-soft: #3a1520;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--moon-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; line-height: 1.18; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.3em; }
li { margin-bottom: .38em; }
strong { font-weight: 800; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.prose { max-width: min(var(--measure), 100%); min-width: 0; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; color: var(--text); text-decoration: none; white-space: nowrap; flex: none; }
.brand .m { width: 26px; height: 26px; flex: none; }
.site-head nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.site-head nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 11px; border-radius: 9px; white-space: nowrap; }
.site-head nav a .full { display: inline; }
.site-head nav a .short { display: none; }
@media (max-width: 520px) { .site-head nav a .full { display: none; } .site-head nav a .short { display: inline; } .site-head nav a { padding: 8px 8px; font-size: .88rem; } .site-head .in { gap: 8px; } }
.site-head nav a:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 640px) { .site-head nav a.hide-s { display: none; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 14px 26px; border-radius: 99px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  text-decoration: none; text-align: center; transition: transform .12s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--moon); color: var(--moon-ink); box-shadow: 0 8px 22px -10px rgba(200, 138, 46, .8); }
.btn-primary:hover { box-shadow: 0 12px 28px -10px rgba(200, 138, 46, .95); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--moon); }
.btn-sm { min-height: 42px; padding: 10px 18px; font-size: .93rem; }

/* ---------- Bandeau d'accueil ---------- */
.hero { padding-block: clamp(40px, 8vw, 84px) clamp(30px, 6vw, 60px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(26px, 5vw, 60px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.5rem); letter-spacing: -.03em; }
.hero .sub { font-size: clamp(1.06rem, 2.2vw, 1.28rem); color: var(--text-2); margin-top: 18px; max-width: 34ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .reassure { margin-top: 16px; font-size: .87rem; color: var(--text-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--moon-text);
  background: var(--moon-soft); padding: 6px 13px; border-radius: 99px;
}

/* Maquette de téléphone */
.phone {
  /* Le rapport suit exactement celui des captures (300 × 649) : la barre
     d'onglets du bas ne doit pas être coupée en deux, ça se lit comme un bug. */
  width: min(300px, 78vw); margin-inline: auto; aspect-ratio: 300 / 649;
  border-radius: 40px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Sections ---------- */
section { padding-block: clamp(34px, 6vw, 66px); }
.sec-head { max-width: 46ch; margin-bottom: 26px; }
.sec-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
.sec-head p { color: var(--text-2); margin-top: 12px; margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.1rem; margin-bottom: 9px; }
.card p { color: var(--text-2); font-size: .96rem; margin-bottom: 0; }
.card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--moon-soft); color: var(--moon-text); margin-bottom: 14px; }

.band { background: var(--surface-2); border-block: 1px solid var(--line); }

/* ---------- Tarifs ---------- */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.price.best { border-color: var(--moon); border-width: 2px; }
.price .tagbest { position: absolute; top: -11px; left: 22px; background: var(--moon); color: var(--moon-ink); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 11px; border-radius: 99px; }
.price .amt { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; }
.price .per { color: var(--text-3); font-size: .92rem; }
.price ul { list-style: none; padding: 0; margin: 16px 0 0; }
.price li { display: flex; gap: 9px; font-size: .95rem; color: var(--text-2); margin-bottom: .5em; }
.price li svg { flex: none; margin-top: 4px; color: var(--ok); }

/* ---------- Pied ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 36px 44px; margin-top: 40px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 26px; }
.site-foot .foot-title { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 11px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .42em; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.legal-note { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .84rem; max-width: 78ch; }

/* ---------- Article ---------- */
.crumbs { font-size: .85rem; color: var(--text-3); padding-block: 18px 0; }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--moon-text); text-decoration: underline; }
.art-head { padding-block: 14px 24px; border-bottom: 1px solid var(--line); }
.art-head h1 { font-size: clamp(1.75rem, 4.2vw, 2.7rem); letter-spacing: -.028em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .85rem; color: var(--text-3); }
.art-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 46px; align-items: start; padding-block: 26px; }
@media (max-width: 940px) { .art-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.toc { position: sticky; top: 78px; font-size: .9rem; }
@media (max-width: 940px) { .toc { position: static; margin-bottom: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; } }
.toc .toc-title { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: t; }
.toc li { margin-bottom: .4em; }
.toc a { color: var(--text-2); text-decoration: none; display: block; padding: 3px 0 3px 11px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--moon-text); border-left-color: var(--moon); }

.prose h2 { font-size: clamp(1.32rem, 2.8vw, 1.72rem); margin: 2em 0 .65em; scroll-margin-top: 78px; }
.prose h3 { font-size: 1.14rem; margin: 1.6em 0 .5em; scroll-margin-top: 78px; }
.prose h2:first-child, .prose > p:first-child { margin-top: 0; }
.prose > p:first-of-type { font-size: 1.12rem; color: var(--text); }
.tablewrap { overflow-x: auto; margin: 1.3em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .02em; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
blockquote { margin: 1.3em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--moon); color: var(--text-2); font-style: normal; }

/* Appel à l'action inséré dans l'article */
.cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between;
  background: var(--moon-soft); border: 1px solid color-mix(in srgb, var(--moon) 45%, transparent);
  border-radius: var(--radius); padding: 20px 22px; margin: 1.9em 0;
}
.cta-inline p { margin: 0; font-weight: 700; font-family: var(--font-display); color: var(--moon-ink); font-size: 1.04rem; max-width: 42ch; }
:root[data-theme="dark"] .cta-inline p, :root:not([data-theme="light"]) .cta-inline p { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-inline p { color: var(--text); } }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--moon); border-radius: var(--radius-sm); padding: 16px 18px; margin: 1.5em 0; font-size: .95rem; }
.callout.warn { border-left-color: var(--danger); background: var(--danger-soft); }
.callout p:last-child { margin-bottom: 0; }

.related { border-top: 1px solid var(--line); margin-top: 42px; padding-top: 30px; }
.related h2 { font-size: 1.3rem; margin-bottom: 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.rel {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; text-decoration: none; color: var(--text);
}
.rel:hover { border-color: var(--moon); }
.rel .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 800; }
.rel .t { font-family: var(--font-display); font-weight: 700; font-size: .98rem; margin-top: 5px; line-height: 1.35; }

.sources { font-size: .88rem; color: var(--text-2); }
.sources ul { padding-left: 1.1em; }
.disclaimer { background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 18px; font-size: .88rem; color: var(--text-2); margin-top: 24px; }

/* ---------- Quiz ---------- */
.quiz { max-width: 620px; margin-inline: auto; padding-block: 30px 60px; }
.qbar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 26px; }
.qbar > i { display: block; height: 100%; background: var(--moon); border-radius: 99px; width: 0; transition: width .35s cubic-bezier(.2,.7,.3,1); }
.qstep { display: none; }
.qstep.on { display: block; animation: qin .32s cubic-bezier(.2,.7,.3,1); }
@keyframes qin { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.qstep .kicker { font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.qstep h2 { font-size: clamp(1.4rem, 3.6vw, 1.95rem); margin: 8px 0 6px; }
.qstep .hint { color: var(--text-2); font-size: .96rem; margin-bottom: 22px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; min-height: 58px; transition: border-color .14s, background-color .14s;
}
.opt:hover { border-color: var(--moon); }
.opt[aria-pressed="true"] { border-color: var(--moon); background: var(--moon-soft); }
.opt .b { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.opt .s { display: block; font-size: .86rem; color: var(--text-2); font-weight: 400; margin-top: 2px; }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.opt[aria-pressed="true"] .dot { border-color: var(--moon); background: var(--moon); box-shadow: inset 0 0 0 3px var(--surface); }
.qnav { display: flex; gap: 12px; margin-top: 24px; align-items: center; }
.qback { color: var(--text-3); font-weight: 600; font-size: .92rem; padding: 10px 4px; min-height: 44px; }
.qback:hover { color: var(--text); }
.field { display: block; margin-top: 6px; }
.field input {
  width: 100%; min-height: 54px; padding: 14px 16px; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.field input:focus { border-color: var(--moon); outline: none; }

/* Résultat du quiz */
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px; }
.big-win { text-align: center; padding: 26px 20px; background: linear-gradient(180deg, var(--moon-soft), var(--surface)); border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--moon) 40%, transparent); }
.big-win .lbl { font-size: .8rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--moon-text); }
.big-win .val { font-family: var(--font-display); font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-top: 6px; }
.big-win .sub { color: var(--text-2); margin-top: 8px; font-size: .97rem; }
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tl li:last-child { border-bottom: 0; }
.tl .h { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .96rem; }
.tl .w { font-size: .87rem; color: var(--text-3); }
.tl .n { font-weight: 700; }

/* Champ juridique non renseigné : visible, et bloquant à la construction. */
mark.todo {
  background: var(--danger-soft); color: var(--danger); font-weight: 800;
  padding: 1px 7px; border-radius: 4px; font-size: .84em; letter-spacing: .01em;
  text-transform: uppercase; overflow-wrap: anywhere;
}
