/* =========================================================================
   Les Trésors du Savoir — design system (rose poudré · violet prune · premium)
   Sans build : CSS pur, chargé directement.
   ========================================================================= */
:root {
  --plum: #5b2a86;
  --plum-dark: #43206a;
  --rose: #cf5d95;
  --rose-soft: #e7a2be;
  --gold: #b78a3d;
  --gold-soft: #e9d4a3;
  --gold-text: color-mix(in srgb, var(--gold) 66%, var(--ink)); /* variante LISIBLE (AA) du gold en texte */
  --gold-hi: color-mix(in srgb, var(--gold) 42%, var(--surface));
  --gold-lo: color-mix(in srgb, var(--gold) 72%, var(--ink));
  --paper-edge: color-mix(in srgb, var(--surface-2) 82%, var(--gold));
  --ink: #241a2b;
  --muted: #6b5f74;
  --bg: #fbf6f4;            /* ivoire chaud, moins clinique que le blanc rosé */
  --surface: #ffffff;
  --surface-2: #f7eff6;
  --surface-3: #fdf6f0;     /* champagne très pâle pour alterner les sections */
  --border: #eee2ea;
  --border-strong: #e3d2df;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(76, 29, 90, .05), 0 6px 16px -12px rgba(76, 29, 90, .22);
  --shadow: 0 2px 6px rgba(76, 29, 90, .05), 0 18px 40px -22px rgba(76, 29, 90, .28);
  --shadow-lg: 0 4px 10px rgba(76, 29, 90, .06), 0 34px 60px -26px rgba(76, 29, 90, .34);
  --shadow-glow: 0 20px 54px -16px rgba(207, 93, 149, .45);
  --shadow-book: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 4px color-mix(in srgb, var(--ink) 12%, transparent), 0 24px 48px -20px color-mix(in srgb, var(--plum-dark) 35%, transparent);
  --ring: color-mix(in srgb, var(--plum) 45%, transparent);
  --grad-brand: linear-gradient(120deg, var(--plum), var(--rose));
  --grad-warm: linear-gradient(120deg, var(--rose), var(--gold));
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", "Fraunces Fallback", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

/* Polices AUTO-HÉBERGÉES (WOFF2 subset latin, variables) → same-origin (CSP 'self'),
   zéro requête Google (RGPD). font-display:swap + fallbacks à métrique ajustée = CLS ~0. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fallbacks à métrique ajustée : réservent la place des polices auto-hébergées → CLS ~0 pendant le swap. */
@font-face { font-family: "Inter Fallback"; src: local("Segoe UI"), local("Arial"), local("Helvetica Neue");
  ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; size-adjust: 107%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"), local("Times New Roman");
  ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; size-adjust: 104%; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased;
}
/* Halo d'ambiance en couche FIXE composited (remplace background-attachment:fixed → 0 repaint au scroll). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 40% at 82% -4%, color-mix(in srgb, var(--rose) 16%, transparent), transparent 70%),
    radial-gradient(46% 38% at 4% 2%, color-mix(in srgb, var(--plum) 12%, transparent), transparent 70%);
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; font-optical-sizing: auto; letter-spacing: -.015em; line-height: 1.1; margin: 0 0 .4em; }
h1 { letter-spacing: -.028em; }
h2 { letter-spacing: -.02em; }
.display { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -.03em; font-size: clamp(2.4rem, 6.2vw, 4rem); }
.display em, .serif-em { font-style: italic; font-weight: 500; }
a { color: var(--plum); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
:where(a, button, [tabindex], input, select, textarea):focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
[id] { scroll-margin-top: 84px; }
::selection { background: var(--rose-soft); color: var(--ink); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.text-gradient { background: linear-gradient(100deg, var(--plum), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bg-aurora {
  background:
    radial-gradient(60% 55% at 15% 10%, rgba(207, 93, 149, .16), transparent 60%),
    radial-gradient(55% 50% at 90% 15%, rgba(91, 42, 134, .14), transparent 60%);
}

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 999px; padding: .7rem 1.5rem; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .22s ease, filter .18s ease, background .18s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(120deg, var(--plum), var(--plum-dark)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { color: #fff; box-shadow: var(--shadow-glow); filter: saturate(1.08); }
.btn-accent { background: linear-gradient(120deg, var(--rose), var(--plum)); color: #fff; box-shadow: var(--shadow-glow); }
.btn-accent:hover { color: #fff; filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: #c0392b; color: #fff; }
.btn-lg { padding: .95rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-p { padding: 1.5rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; font-weight: 600; }
.badge-primary { background: rgba(91, 42, 134, .1); color: var(--plum); }
.badge-accent { background: rgba(207, 93, 149, .14); color: var(--rose); }
.badge-gold { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-text); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-success { background: rgba(16, 145, 92, .12); color: #0d7a4e; }

/* Formulaires */
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .35rem; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; color: var(--ink);
}
.input:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--plum); outline-offset: 1px; }
.field { margin-bottom: 1rem; }
.error { color: #c0392b; font-size: .85rem; margin-top: .3rem; }
.help { color: var(--muted); font-size: .8rem; margin-top: .3rem; }

/* Header / footer */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--plum), var(--rose)); color: #fff; box-shadow: var(--shadow-sm); }
.brand-logo { height: 34px; width: auto; border-radius: 10px; display: block; }
.brand-name { font-family: var(--serif); }
.nav-wrap { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-weight: 500; position: relative; transition: color .18s ease; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--plum), var(--rose)); transition: right .22s ease; }
.nav-links a:hover::after { right: 0; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-wrap { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .35rem;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 20px 1.25rem; box-shadow: var(--shadow);
    transform: translateY(-10px); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
  .nav-wrap.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; gap: .1rem; }
  .nav-links a { padding: .6rem 0; }
  .nav-cta { margin-top: .6rem; }
}
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); margin-top: 3rem; }
.social-row { display: flex; gap: .5rem; margin-top: 1rem; }
.social-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--plum); background: var(--surface); border: 1px solid var(--border); transition: transform .18s ease, box-shadow .18s ease, color .18s ease; }
.social-ico:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); color: var(--rose); text-decoration: none; }

/* Layout utilities */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap { gap: 1rem; }
.mt { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.section { padding: 3.5rem 0; }

/* Progress bar */
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--rose)); border-radius: 999px; transition: width .4s; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; color: var(--muted); padding: .7rem .9rem; background: var(--surface-2); }
.table td { padding: .7rem .9rem; border-top: 1px solid var(--border); vertical-align: top; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

/* Alerts */
.alert { border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.alert-success { background: rgba(16, 145, 92, .1); color: #0d7a4e; }
.alert-error { background: rgba(192, 57, 43, .1); color: #c0392b; }

/* Feedback formatif de quiz (« quoi revoir » par question) */
.qf-list { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .5rem; }
.qf-item { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.qf-item.qf-ko { border-color: color-mix(in srgb, #c0392b 35%, var(--border)); background: color-mix(in srgb, #c0392b 5%, var(--surface)); }
.qf-item.qf-ok { border-color: color-mix(in srgb, #0d7a4e 30%, var(--border)); }
.qf-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px; }
.qf-ok .qf-mark { background: #0d7a4e; }
.qf-ko .qf-mark { background: #c0392b; }
.qf-status { font-size: .78rem; font-weight: 600; color: var(--muted); }
.qf-exp { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }
.qf-exp.qf-muted { font-style: italic; }

/* Bandeau « confirmez votre email » (au-dessus du contenu, non bloquant). */
.verify-banner { background: color-mix(in srgb, var(--gold) 18%, var(--bg)); border-bottom: 1px solid var(--border); font-size: .92rem; }
.verify-banner .container { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; padding: .7rem 20px; }
.verify-banner span { font-weight: 500; }

/* Sidebar leçons */
.lesson-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 12px; color: var(--muted); }
.lesson-item.active { background: rgba(91, 42, 134, .1); color: var(--plum); font-weight: 600; }
.lesson-item.locked { opacity: .55; cursor: not-allowed; }
.lesson-item:hover:not(.locked):not(.active) { background: var(--surface-2); }

/* Animations & effets premium */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.card { transition: transform .22s ease, box-shadow .22s ease; }
.lift { transition: transform .22s ease, box-shadow .22s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.floaty { animation: floaty 6s ease-in-out infinite; }
/* Reveal au scroll — visible par défaut ; masqué uniquement si JS actif (anti-FOUC) */
/* Reveal robuste : contenu VISIBLE par défaut ; masqué seulement une fois que le JS a
   confirmé qu'il gère (classe reveal-ready posée APRÈS création de l'observer + watchdog).
   → si app.js échoue/tarde/est bloqué, rien ne reste invisible. */
html.reveal-ready .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
.reveal.in { animation: fadeUp .7s cubic-bezier(.2, .7, .2, 1) both; }
.spinner { width: 1.1em; height: 1.1em; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.is-loading { position: relative; pointer-events: none; opacity: .85; }

/* Shell back-office (admin / formateur) */
.admin-shell { display: flex; min-height: 100dvh; }
.admin-side { width: 264px; background: var(--surface); border-right: 1px solid var(--border); padding: 1.1rem .9rem; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.admin-side .brand { margin: .4rem .5rem 1.4rem; }
.admin-side nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-side .nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 1rem .7rem .3rem; }
.admin-main { flex: 1; padding: 2rem; min-width: 0; }
.admin-topbar { display: none; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 30; }
.admin-side .lesson-item { font-weight: 500; }
.admin-side .lesson-item.active { background: linear-gradient(120deg, color-mix(in srgb, var(--plum) 14%, transparent), color-mix(in srgb, var(--rose) 12%, transparent)); color: var(--plum); font-weight: 600; }
.admin-backdrop { display: none; }
@media (max-width: 900px) {
  .admin-topbar { display: flex; }
  .admin-side { position: fixed; top: 0; left: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .admin-side.open { transform: none; }
  .admin-main { padding: 1.2rem; }
  .admin-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
}

/* KPI / stat cards */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: .9rem; }
.stat-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: linear-gradient(135deg, color-mix(in srgb, var(--plum) 16%, transparent), color-mix(in srgb, var(--rose) 16%, transparent)); color: var(--plum); flex-shrink: 0; }
.stat-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: .2rem; }

/* Section titles */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--rose); }

/* Onglets */
.tabs { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { background: none; border: 0; padding: .7rem 1.05rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; transition: color .15s ease, background .15s ease; }
.tab-btn:hover { color: var(--ink); background: var(--surface-2); }
.tab-btn.active { color: var(--plum); border-bottom-color: var(--plum); }

/* Éditeur de couleurs */
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.color-field { display: flex; align-items: center; gap: .6rem; }
.color-field input[type=color] { width: 46px; height: 46px; padding: 0; border: 1px solid var(--border); border-radius: 11px; background: none; cursor: pointer; flex-shrink: 0; }
.color-field .cf-body { min-width: 0; }
.color-field .cf-label { font-size: .82rem; font-weight: 600; }
.color-field input[type=text] { font-family: ui-monospace, monospace; font-size: .82rem; padding: .35rem .5rem; }
.preset-card { text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: .85rem; background: var(--surface); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; width: 100%; }
.preset-card:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.preset-swatches { display: flex; gap: 4px; margin-top: .55rem; }
.preset-swatches span { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.06); }

/* Composition hero (landing) */
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-glow); padding: 1.1rem 1.2rem; position: relative; max-width: 420px; margin-left: auto; }
.hero-card-head { display: flex; align-items: center; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.hero-play { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--plum), var(--rose)); color: #fff; font-size: 1rem; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.hero-card-body { padding-top: .9rem; }
.hero-lesson { display: flex; align-items: center; gap: .6rem; padding: .48rem .1rem; font-size: .9rem; }
.hero-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 700; background: color-mix(in srgb, var(--plum) 12%, transparent); color: var(--plum); flex-shrink: 0; }
.hero-badge-float { position: absolute; bottom: -16px; right: 8px; display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .5rem 1rem; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow); }
.hero-badge-float svg { color: var(--gold); }
@media (max-width: 620px) { .hero-card { margin: 1.5rem auto 0; } .hero-badge-float { right: 8px; } }

/* Témoignages */
.testimonial { display: flex; flex-direction: column; }
.testimonial .stars { color: var(--gold); letter-spacing: 2px; font-size: 1rem; }
.testimonial blockquote { margin: .7rem 0 1.1rem; font-size: 1.02rem; line-height: 1.55; flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: .6rem; }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--plum), var(--rose)); flex-shrink: 0; }

/* ============================ Premium landing ============================ */
.section-lg { padding: 5rem 0; }
.alt-bg { background: var(--surface-3); border-block: 1px solid var(--border); }
.alt-bg-2 { background: var(--surface-2); }

/* En-tête de section (eyebrow décoré + titre serif + intro) */
.section-head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: .5rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: .4rem 0 0; }
.eyebrow-line { display: inline-flex; align-items: center; gap: .55rem; color: var(--rose); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }
.eyebrow-line::before, .eyebrow-line.center::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--rose)); }
.eyebrow-line.center::before { background: linear-gradient(90deg, var(--rose), transparent); }

/* Décor : formes floues d'arrière-plan */
.deco { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; z-index: 0; }
.deco-rose { background: radial-gradient(circle, var(--rose), transparent 70%); }
.deco-plum { background: radial-gradient(circle, var(--plum), transparent 70%); }
.deco-gold { background: radial-gradient(circle, var(--gold-soft), transparent 70%); }

/* HERO */
.hero { position: relative; overflow: hidden; }
.hero .section { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 999px; padding: .4rem .9rem; font-size: .8rem; font-weight: 600; color: var(--plum); box-shadow: var(--shadow-sm); }
.hero-eyebrow svg { color: var(--rose); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4rem); line-height: 1.02; margin: 1.1rem 0 .2rem; }

/* Rangée d'avatars (preuve sociale) */
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .av { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-sm); }
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av:nth-child(3n+1) { background: linear-gradient(135deg, var(--plum), var(--rose)); }
.avatar-stack .av:nth-child(3n+2) { background: linear-gradient(135deg, var(--rose), var(--gold)); }
.avatar-stack .av:nth-child(3n) { background: linear-gradient(135deg, var(--plum-dark), var(--plum)); }
.proof-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.proof-row .stars { color: var(--gold); letter-spacing: 1px; }

/* Icône SVG dans une tuile dégradée */
.icon-badge { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--plum);
  background: linear-gradient(140deg, color-mix(in srgb, var(--plum) 14%, var(--surface)), color-mix(in srgb, var(--rose) 16%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--rose) 22%, var(--border)); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.icon-badge.lg { width: 62px; height: 62px; border-radius: 18px; }

/* Tuile bénéfice premium */
.feature-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.feature-tile::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-brand); opacity: 0; transition: opacity .25s ease; }
.feature-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.feature-tile:hover::after { opacity: 1; }
.feature-tile h3 { font-size: 1.15rem; margin: 1rem 0 .35rem; }
.feature-tile p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Comment ça marche — étapes */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.2rem 1.5rem 1.6rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -20px; left: 1.5rem;
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  color: #fff; background: var(--grad-brand); box-shadow: var(--shadow); }
.step h3 { font-size: 1.15rem; margin: .3rem 0 .35rem; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Bandeau de statistiques (confiance) */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem 1.5rem; box-shadow: var(--shadow); }
@media (max-width: 720px) { .stat-band { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; } }
.stat-band .n { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-band .l { color: var(--muted); font-size: .86rem; margin-top: .4rem; }
.stat-band > div + div { border-left: 1px solid var(--border); }
@media (max-width: 720px) { .stat-band > div + div { border-left: 0; } }

/* Programme — module raffiné */
.module-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; transition: box-shadow .22s ease, transform .22s ease; }
.module-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.module-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--plum); background: color-mix(in srgb, var(--plum) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--plum) 16%, var(--border)); flex-shrink: 0; }
.lesson-chip { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .88rem; }
.lesson-chip svg { color: var(--rose); flex-shrink: 0; }

/* Liste d'arguments (offre) */
.arg-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .55rem; }
.arg-list li { display: flex; align-items: flex-start; gap: .6rem; }
.arg-list .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad-brand); flex-shrink: 0; margin-top: 1px; }
.arg-list .tick svg { width: 14px; height: 14px; }

/* FAQ raffinée */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0; overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--border-strong); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 1.1rem 1.3rem; list-style: none; display: flex; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; font-weight: 400; color: var(--rose); transition: transform .22s ease; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* Bandeau CTA de clôture */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(2.5rem, 5vw, 4rem); text-align: center;
  background: linear-gradient(130deg, var(--plum-dark), var(--plum) 45%, var(--rose)); color: #fff; box-shadow: var(--shadow-lg); }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); opacity: .35; }
.cta-band::before { width: 240px; height: 240px; background: var(--rose-soft); top: -80px; right: -40px; }
.cta-band::after { width: 200px; height: 200px; background: var(--gold-soft); bottom: -70px; left: -30px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.cta-band p { color: rgba(255,255,255,.9); max-width: 44ch; margin: .6rem auto 1.6rem; }
.cta-band .btn-light { background: #fff; color: var(--plum); box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); }
.cta-band .btn-light:hover { color: var(--plum-dark); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }

/* ===================== Preuve de confiance FACTUELLE =====================
   Remplace toute preuve sociale fabriquée : uniquement des faits produit vrais
   (jamais d'avis/compteurs inventés — trompeur et illégal en FR/UE). */
.trust-row { display: flex; flex-wrap: wrap; gap: .5rem .6rem; margin-top: 1.6rem; }
.trust-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--border); border-radius: 999px; padding: .4rem .8rem; box-shadow: var(--shadow-sm); }
.trust-chip svg { color: var(--gold-text); flex-shrink: 0; }

/* ======================= Peau « Manuscrit vivant » =======================
   Éditorial : lettrines, grain de vélin, filets dorés STATIQUES, et UN composant
   couverture-livre 3D + ruban de reprise. Entièrement dérivé des 12 tokens CMS →
   re-skinnable (mode enfant/universel futur), aucun univers en dur. 3D coupée en
   reduced-motion. */

/* Grain de vélin : bruit SVG en data-URI (CSP images data: autorisé), très faible opacité. */
:root { --vellum: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E"); }
.vellum { position: relative; }
.vellum::after { content: ""; position: absolute; inset: 0; background-image: var(--vellum); background-size: 120px; opacity: .06; mix-blend-mode: multiply; pointer-events: none; border-radius: inherit; }

/* Lettrine éditoriale (décorative : n'altère pas le texte lu). */
.lettrine::first-letter { float: left; font-family: var(--serif); font-weight: 600; font-size: 3.2em; line-height: .72; padding: .06em .12em 0 0; color: var(--plum); }

/* Filet doré statique (séparateur éditorial). */
.gilt-rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; margin: 1.6rem 0; }

/* Couverture-livre 3D réutilisable + ruban de reprise. */
.book { perspective: 1000px; display: inline-block; }
.book-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 5px 9px 9px 5px; overflow: hidden;
  background: linear-gradient(135deg, var(--plum-dark), var(--plum) 55%, var(--rose)); box-shadow: var(--shadow-book);
  display: grid; place-items: center; padding: 1.1rem; transform-origin: left center;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.book-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 45%, transparent), transparent); }
.book:hover .book-cover, .book:focus-within .book-cover { transform: rotateY(-14deg); box-shadow: var(--shadow-lg); }
.book-gilt { position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent); border-radius: 3px; pointer-events: none; }
.book-title { font-family: var(--serif); color: #fff; font-weight: 600; text-align: center; font-size: 1.02rem; line-height: 1.22; text-shadow: 0 1px 3px rgba(0,0,0,.35); z-index: 1; }
.book-ribbon { position: absolute; top: -2px; right: 16px; padding: .35rem .5rem .55rem; font-size: .72rem; font-weight: 700; color: #fff;
  background: var(--gold-lo); box-shadow: 0 4px 8px -3px rgba(0,0,0,.4); z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.book-done .book-ribbon { background: #0d7a4e; }

/* Bloc « reprendre » (héros du tableau de bord) : couverture + reprise exacte. */
.resume-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1.6rem; box-shadow: var(--shadow); }
.resume-hero .book { width: 148px; flex-shrink: 0; }
@media (max-width: 620px) { .resume-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--plum); color: #fff; padding: .6rem 1.2rem; border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto !important; }
  /* Aucun mouvement décoratif, et surtout : le contenu reste pleinement visible. */
  .reveal, .reveal:not(.in) { opacity: 1 !important; transform: none !important; animation: none !important; }
  .floaty { animation: none !important; }
  /* Pas de bascule 3D de la couverture-livre. */
  .book:hover .book-cover, .book:focus-within .book-cover { transform: none !important; }
}
