/* ============================================================
   AUTHORLIB — Feuille de style principale · V2 « Encre & rêverie »
   Palette héritée de l'app (non négociable) + Spectral/Inter
   Deux thèmes : papier (clair) et nuit d'encre (sombre)
   ============================================================ */

/* ---------- Variables · thème papier (clair) ---------- */
:root {
  /* Marque */
  --bleu-nuit: #0F1E33;
  --bleu-2: #1E3A5F;
  /* Fonds */
  --fond: #FAFAFA;
  --surface: #FFFFFF;
  /* Encres */
  --encre: #0F172A;
  --encre-2: #5B6678;
  --encre-3: #8B95A5;
  /* Sémantiques — identité bleu nuit · blanc · vert (aucun doré/orange) */
  --vert: #047857;
  --rouge: #DC2626;
  /* Accent italique des titres */
  --accent-it: #1E3A5F;
  /* Bordures */
  --bordure: #E5E7EB;
  /* Fil d'encre : bleu encre sur fond clair, blanc sur fond foncé */
  --fil: #33567F;
  --fil-inverse: #F2F7FD;
  --fil-opacite: .55;
  /* Boutons */
  --bouton-fond: #0F1E33;
  --bouton-fond-survol: #1E3A5F;
  --bouton-texte: #FAFAFA;
  /* En-tête */
  --entete-fond: rgba(250, 250, 250, .85);
  /* Typo */
  --police-titre: "Spectral", Georgia, "Times New Roman", serif;
  --police-corps: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Rythme */
  --rayon: 16px;
  --transition: 220ms cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Variables · thème nuit d'encre (sombre) ---------- */
html[data-theme="sombre"] {
  --fond: #0A1322;
  --surface: #111D31;
  --encre: #E8EDF5;
  --encre-2: #A9B6C9;
  --encre-3: #76859C;
  --vert: #34D399;
  --rouge: #F87171;
  --accent-it: #9DB8DC;
  --bordure: #22304A;
  --fil: #EAF1FA;
  --fil-inverse: #EAF1FA;
  --fil-opacite: .5;
  --bouton-fond: #E8EDF5;
  --bouton-fond-survol: #FFFFFF;
  --bouton-texte: #0F1E33;
  --entete-fond: rgba(10, 19, 34, .82);
  color-scheme: dark;
}

/* Transition douce lors du changement de thème (classe posée 500 ms par le JS) */
html.theme-en-transition body,
html.theme-en-transition .entete,
html.theme-en-transition .carte,
html.theme-en-transition .temoignage,
html.theme-en-transition .chaos-carte,
html.theme-en-transition .chiffres,
html.theme-en-transition .pied {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* compense l'en-tête sticky */
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--police-corps);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--fond);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
ul[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; } /* l'attribut hidden gagne toujours sur display:flex */

/* ---------- Accessibilité ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 3px solid var(--accent-it);
  outline-offset: 3px;
  border-radius: 4px;
}
.univers :focus-visible,
.cta-final :focus-visible {
  outline-color: #FAFAFA; /* focus lisible sur fond nuit d'encre */
}

/* ---------- Grain de papier (atmosphère) ---------- */
.grain-papier {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}
html[data-theme="sombre"] .grain-papier { opacity: .06; }

/* Sentinelle (1 px tout en haut, sert l'IntersectionObserver de l'en-tête) */
.sentinelle-haut { position: absolute; top: 0; height: 1px; width: 1px; }

/* ---------- Anti-flash au chargement ----------
   États initiaux (masqués) des éléments animés, posés AVANT le premier rendu :
   la classe .js-anim est ajoutée en <head> UNIQUEMENT si les animations vont
   jouer. Sans JS, sans GSAP ou en mouvement réduit, .js-anim n'est pas posée
   (ou est retirée) → tout reste visible. Le filet .anim-secours (ajouté au
   chargement) lève aussi le masque si le script ne prend pas la main. */
/* Sous la ligne de flottaison : masqués sur tous écrans, révélés au scroll. */
.js-anim:not(.anim-secours) [data-apparition],
.js-anim:not(.anim-secours) [data-page-tournee] { opacity: 0; }
/* HERO : masqué pour l'entrée animée UNIQUEMENT au-dessus de 700px. Sur mobile
   (≤700px), le hero est VISIBLE IMMÉDIATEMENT, sans masque ni dépendance au
   script (entrée animée désactivée en JS) → lisible en < 1 s. */
@media (min-width: 701px) {
  .js-anim:not(.anim-secours) .hero-anim,
  .js-anim:not(.anim-secours) .hero-telephone { opacity: 0; }
  .js-anim:not(.anim-secours) .hero-plume { clip-path: inset(-8% 100% -12% 0); }
}

/* ---------- Fil d'encre (signature) ---------- */
main { position: relative; }
/* Les blocs de texte que le fil traverse portent un fond opaque (invisible
   sur leur section) : le trait passe DERRIÈRE le bloc, jamais sous le texte nu */
.fonctionnalites .chapitre-tete,
.temoignages .chapitre-tete { background: var(--fond); }
.histoire .chapitre-tete { background: var(--surface); }
.vitrine figcaption { background: var(--fond); }
/* Pendant l'épinglage du chapitre 1, la scène (contenu) passe AU-DESSUS du
   fil — couche 2 — pendant que son fond est porté par un calque dédié à
   z-index 0, SOUS le fil (couche 1) : le trait et la plume restent visibles
   sur le fond blanc et passent derrière les cartes et textes uniquement.
   (Le fond ne peut PAS être porté par l'espaceur du pin : GSAP recopie sur
   lui les styles calculés de la section — z-index compris — au refresh.) */
.histoire.est-epinglee {
  background: transparent;
  border-block: 0;
  z-index: 2;
}
/* MOBILE (et tant que la section n'est pas épinglée) : le .conteneur du
   chapitre 1 est imbriqué dans .histoire-pin, donc la règle globale
   `main > section > .conteneur` ne l'atteint pas. On l'élève explicitement
   au-dessus du fil (z1) pour que trait et plume passent DERRIÈRE le contenu
   (chapitre-tête, bulles, panneau sombre) — le fond `surface` de la section
   reste sous le fil, qui demeure visible sur le fond entre les blocs. */
.histoire .conteneur { position: relative; z-index: 2; }
.fond-histoire {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  background: var(--surface);
  border-block: 1px solid var(--bordure);
  pointer-events: none;
}
/* Calque de fond de l'épilogue (z0, sous le fil) — porte le dégradé pendant
   que .cta-final passe en contexte z2 (au-dessus du fil). Posé en JS. */
.fond-cta {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  background: linear-gradient(160deg, var(--bleu-nuit), var(--bleu-2) 130%);
  pointer-events: none;
}
html[data-theme="sombre"] .fond-cta { background: linear-gradient(160deg, #0D1A2E, #1E3A5F 140%); }
.fil-encre-cadre {
  position: absolute;
  inset: 0;
  z-index: 1;          /* au-dessus des fonds de sections… */
  pointer-events: none;
  overflow: hidden;
}
main > section { position: relative; }
main > section > .conteneur,
main > section > .univers-glow,
main > section > .hero-fond { position: relative; z-index: 2; } /* …mais sous le contenu */
.hero-fond { z-index: 0; } /* la lumière du hero reste tout au fond */
#fil-encre {
  display: block;
  width: 100%;
}
#fil-chemin {
  stroke-width: 2.2;
  opacity: var(--fil-opacite);
}
/* La plume (image réaliste) : bleue sur fond clair, blanche sur fond sombre.
   La pointe du bec = coin bas-gauche de l'image, ancrée sur le bout du trait. */
#fil-plume { opacity: 0; will-change: transform; }
#fil-plume .plume-image-sombre { display: none; }
html[data-theme="sombre"] #fil-plume .plume-image-claire,
#fil-plume.sur-fond-sombre .plume-image-claire { display: none; }
html[data-theme="sombre"] #fil-plume .plume-image-sombre,
#fil-plume.sur-fond-sombre .plume-image-sombre { display: block; }
html[data-theme="sombre"] #fil-encre {
  filter: drop-shadow(0 0 7px rgba(196, 218, 245, .45)); /* le fil luit la nuit */
}
@media (max-width: 760px) {
  #fil-chemin { stroke-width: 1.5; opacity: calc(var(--fil-opacite) * .65); } /* plus discret au pouce */
}

/* ---------- Utilitaires ---------- */
.conteneur {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}
.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: .9rem;
}
.eyebrow-claire { color: #9DB8DC; }
.titre-2 {
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.16;
  letter-spacing: -.01em;
  color: var(--encre);
}
.titre-claire { color: #FAFAFA; }
.encre-it {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-it);
  padding-bottom: .06em; /* réserve pour les descendantes italiques */
}
.titre-claire .encre-it { color: #9DB8DC; }
.chapitre-tete { max-width: 46rem; margin-bottom: 3rem; }
.chapitre-intro { margin-top: 1rem; color: var(--encre-2); }
/* Perspective douce pour l'effet « page tournée » des têtes de chapitre */
.fonctionnalites .conteneur,
.bureau-texte,
.temoignages .conteneur { perspective: 1200px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block;
  padding: .85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  text-align: center;
  white-space: nowrap; /* un CTA tient toujours sur une seule ligne */
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}
.bouton:active { transform: scale(.97); }
.bouton:disabled { opacity: .6; cursor: progress; transform: none; }
.bouton-plein {
  background: var(--bouton-fond);
  color: var(--bouton-texte);
  box-shadow: 0 2px 10px rgba(15, 30, 51, .25);
}
.bouton-plein:hover { background: var(--bouton-fond-survol); }
.bouton-clair {
  background: #FAFAFA;
  color: var(--bleu-nuit);
}
.bouton-clair:hover { background: #FFFFFF; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); }

/* ---------- Capsule offre de lancement (valorisante, propre) ---------- */
.offre-lancement {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  max-width: 33rem;
  margin-top: .7rem;
  padding: .6rem 1rem;
  border-radius: 14px;
  /* Fond OPAQUE (composite du vert translucide sur --fond, même aspect) : le
     fil/la plume passent derrière sans transparaître au travers. */
  background: #E4EEEB;
  box-shadow: 0 0 0 1px rgba(4, 120, 87, .16) inset;
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--vert);
}
.offre-lancement span { flex: none; font-size: 1rem; line-height: 1.3; }
html[data-theme="sombre"] .offre-lancement {
  background: #0F2A30; /* composite du vert sur --fond sombre, opaque */
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .22) inset;
}
/* Variante sur fond sombre (CTA final) — fond OPAQUE : le fil/la plume
   passent derrière sans transparaître au travers (comme tous les blocs du site). */
.offre-claire {
  margin-inline: auto;
  background: #1C4354;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .26) inset;
  color: #6EE7B7;
}

/* ---------- Micro-mention de consentement (sous le formulaire) ---------- */
.form-consentement {
  margin-top: .5rem;
  max-width: 33rem;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--encre-3);
}
.form-consentement a {
  color: var(--encre-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.form-consentement a:hover { color: var(--encre); }
.form-consentement-claire { margin-inline: auto; color: #8FA1B8; }
.form-consentement-claire a { color: #B7C4D6; }
.form-consentement-claire a:hover { color: #FAFAFA; }
.cta-final .form-consentement-claire { text-align: center; }

/* ============================================================
   1. EN-TÊTE
   ============================================================ */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--entete-fond);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background-color var(--transition);
}
.entete-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
  transition: padding var(--transition);
}
/* État condensé au scroll (classe ajoutée en JS) */
.entete.est-reduite { border-bottom-color: var(--bordure); }
.entete.est-reduite .entete-inner { padding-block: .6rem; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--police-titre);
  font-style: italic;
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--encre);
  text-decoration: none;
  letter-spacing: -.01em;
}
.logo-point { color: var(--vert); }
/* Emblème du vrai logo (plume + livre), une variante par thème */
.logo-embleme { width: auto; height: 38px; flex: none; }
.logo-embleme-sombre { display: none; }
html[data-theme="sombre"] .logo-embleme-clair { display: none; }
html[data-theme="sombre"] .logo-embleme-sombre { display: block; }

.nav-principale { display: flex; gap: 1.8rem; }
.nav-principale a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--encre-2);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-principale a:hover { color: var(--encre); }

.entete-actions { display: flex; align-items: center; gap: .8rem; }

/* Bascule clair/sombre */
.bascule-theme {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--bordure);
  border-radius: 50%;
  background: var(--surface);
  color: var(--encre-2);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.bascule-theme:hover { color: var(--encre); border-color: var(--encre-3); transform: rotate(12deg); }
.bascule-theme svg { width: 21px; height: 21px; grid-area: 1 / 1; transition: opacity .35s ease, transform .35s ease; }
/* Clair : on propose la lune ; sombre : on propose le soleil */
.icone-soleil { opacity: 0; transform: scale(.5) rotate(-90deg); }
.icone-lune { opacity: 1; transform: none; }
html[data-theme="sombre"] .icone-soleil { opacity: 1; transform: none; }
html[data-theme="sombre"] .icone-lune { opacity: 0; transform: scale(.5) rotate(90deg); }

/* Libellé du CTA d'en-tête : version courte sur petit écran */
.entete-cta .cta-court { display: none; }
@media (max-width: 920px) {
  .nav-principale { display: none; } /* écran étroit : logo + bascule + CTA suffisent */
}
@media (max-width: 540px) {
  .entete-inner { gap: .8rem; }
  .logo { font-size: 1.2rem; gap: .45rem; }
  .logo-embleme { height: 30px; }
  .entete-cta { padding: .65rem 1.1rem; font-size: .85rem; }
  .entete-cta .cta-long { display: none; }
  .entete-cta .cta-court { display: inline; }
  .bascule-theme { width: 42px; height: 42px; flex: none; }
}

/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  position: relative;
  /* Resserré pour que le hero complet (jusqu'aux badges stores) tienne au
     chargement sur une fenêtre ~900px de haut, sans scroll. */
  padding-block: clamp(1.5rem, 3vw, 3rem) clamp(2.5rem, 5vw, 4.5rem);
  overflow: clip;
}
/* Lumière douce et vivante */
.hero-fond { position: absolute; inset: 0; pointer-events: none; }
.hero-lueur {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}
.hero-lueur-1 {
  width: 46rem; height: 30rem;
  right: -8rem; top: -4rem;
  background: radial-gradient(closest-side, rgba(30, 58, 95, .14), transparent);
}
.hero-lueur-2 {
  width: 34rem; height: 26rem;
  left: -10rem; bottom: -6rem;
  background: radial-gradient(closest-side, rgba(4, 120, 87, .09), transparent);
}
html[data-theme="sombre"] .hero-lueur-1 { background: radial-gradient(closest-side, rgba(157, 184, 220, .14), transparent); }
html[data-theme="sombre"] .hero-lueur-2 { background: radial-gradient(closest-side, rgba(52, 211, 153, .08), transparent); }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero-titre {
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--encre);
}
.hero-ligne { display: block; }
.hero-plume { display: inline-block; padding-bottom: .08em; } /* cible du « tracé à la plume » (clip-path en JS) */
.hero-titre .encre {
  position: relative;
  font-style: italic;
  color: var(--accent-it);
  white-space: nowrap;
}
/* Trait d'encre dessiné sous « AuthorLib » */
.trait-encre {
  position: absolute;
  left: -2%;
  bottom: -.08em;
  width: 104%;
  height: .18em;
  color: var(--vert);
  overflow: visible;
}
.trait-encre path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0; /* visible par défaut ; le JS anime le tracé */
}
.hero-sous {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.12rem;
  color: var(--encre-2);
}
.hero-sous strong { color: var(--encre); }

/* --- Mockups réalistes du hero : accueil de face, vue 3/4 en retrait --- */
.hero-telephone { position: relative; justify-self: center; }
.hero-mockups { position: relative; width: min(400px, 84vw); }
.hero-mockup { height: auto; }
.hero-mockup-face {
  position: relative;
  width: 76%;
  margin-top: 17%;
  z-index: 2;
  filter: drop-shadow(0 30px 44px rgba(15, 23, 42, .35));
}
.hero-mockup-34 {
  position: absolute;
  top: 0;
  right: 0;
  width: 74%;
  filter: drop-shadow(0 22px 36px rgba(15, 23, 42, .26));
}
html[data-theme="sombre"] .hero-mockup-face { filter: drop-shadow(0 30px 44px rgba(0, 0, 0, .65)); }
html[data-theme="sombre"] .hero-mockup-34 { filter: drop-shadow(0 22px 36px rgba(0, 0, 0, .5)); }

/* Pile de livres posée au pied du téléphone (clin d'œil bibliothèque) */
.pile-livres {
  position: absolute;
  left: -78px;
  bottom: 6px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
.livre-pose {
  position: relative;
  width: var(--long, 140px);
  height: 17px;
  margin-left: var(--dec, 0px);
  rotate: var(--rot, 0deg);
  border-radius: 3px 5px 5px 3px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .22), transparent 40%, rgba(0, 0, 0, .22)),
    var(--teinte, var(--bleu-2));
  box-shadow: 0 7px 12px -6px rgba(15, 23, 42, .5);
}
/* la tranche de pages qui dépasse de chaque livre */
.livre-pose::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  bottom: 3px;
  width: 7px;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, #F4EFE3 0 1.6px, #DCD4C2 1.6px 2.6px);
}
/* un simple filet clair sur le dos, en guise de titre */
.livre-pose::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 38%;
  height: 1.5px;
  translate: 0 -50%;
  border-radius: 1px;
  background: rgba(250, 250, 250, .55);
}
@media (max-width: 880px) {
  .pile-livres { left: -14px; bottom: 2px; transform: scale(.85); transform-origin: bottom left; }
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-telephone { order: 2; margin-top: 1rem; }
  .hero-mockups { width: min(360px, 86vw); margin-inline: auto; }
  .hero-titre .encre { white-space: normal; }
}

/* --- Hero ÉPURÉ sur mobile (≤700px) : kicker + titre + mockup, puis un
       résumé court et un CTA sous le mockup. Desktop/tablette inchangés. --- */
.hero-suite-mobile { display: none; }
@media (max-width: 700px) {
  /* On masque tout ce qui se trouve entre le titre et le mockup */
  .hero-sous,
  .hero-texte .form-attente,
  .hero-texte .badges-stores { display: none; }

  /* Centrage : kicker + titre… */
  .hero-texte { text-align: center; }

  /* …espace resserré titre → mockup : plus de gap de grille, et le mockup est
     légèrement tiré vers le haut (les marges transparentes des images
     l'absorbent) pour qu'il suive de près le titre. */
  .hero-inner { gap: 0; }
  .hero-telephone { margin-top: -.5rem; }

  /* Résumé + CTA + badge offre, centrés, après le mockup (order 2) */
  .hero-suite-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    order: 3;
    margin-top: 1.4rem;
  }
  .hero-suite-sous {
    max-width: 34rem;
    text-align: center;
    color: var(--encre-2);
    font-size: 1.05rem;
    line-height: 1.55;
  }
}

/* --- Formulaire liste d'attente --- */
.form-attente { margin-top: 1.4rem; max-width: 33rem; }
.form-rangee { display: flex; gap: .6rem; }
.form-attente input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: .85rem 1.2rem;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  color: var(--encre);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-attente input[type="email"]::placeholder { color: var(--encre-3); }
.form-attente input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-it);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, .15);
}
html[data-theme="sombre"] .form-attente input[type="email"]:focus { box-shadow: 0 0 0 4px rgba(157, 184, 220, .18); }
.form-attente input[type="email"].est-invalide { border-color: var(--rouge); }
.form-erreur { margin-top: .6rem; font-size: .88rem; color: var(--rouge); }
.form-succes {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
  padding: .85rem 1.2rem;
  border-radius: var(--rayon);
  background: rgba(4, 120, 87, .09);
  color: var(--vert);
  font-weight: 500;
}
html[data-theme="sombre"] .form-succes { background: rgba(52, 211, 153, .12); }
.form-succes svg { width: 20px; height: 20px; flex: none; }
.form-note { margin-top: .5rem; font-size: .82rem; color: var(--encre-3); }

@media (max-width: 540px) {
  .form-rangee { flex-direction: column; }
  .form-rangee .bouton { width: 100%; }
}

/* --- Badges stores --- */
.badges-stores { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }
.badges-centres { justify-content: center; }
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.1rem;
  border-radius: 12px;
  background: #0F172A;
  color: #FAFAFA;
  text-decoration: none;
  opacity: .82; /* état « bientôt » : volontairement atténué */
  cursor: default;
  transition: opacity var(--transition);
}
html[data-theme="sombre"] .badge-store { background: #1B2A45; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset; }
.badge-store:hover { opacity: 1; }
.badge-store svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.badge-store span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: .95rem; }
.badge-store small { font-size: .68rem; font-weight: 500; opacity: .75; }
.badge-store-clair { background: #334560; box-shadow: 0 0 0 1px rgba(250, 250, 250, .22) inset; }

@media (max-width: 540px) {
  .badges-stores { justify-content: center; } /* boutons stores centrés au pouce */
}

/* ============================================================
   3. PROBLÈME → SOLUTION (épinglée sur desktop)
   ============================================================ */
.histoire { background: var(--surface); border-block: 1px solid var(--bordure); }
.histoire-pin { padding-block: clamp(4rem, 8vw, 6rem); }
.histoire-scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

/* Le chaos : notes éparpillées */
.chaos { position: relative; display: grid; gap: 1rem; }
.chaos-carte {
  padding: 1.1rem 1.3rem;
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--encre-2);
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, .18);
}
.chaos-carte strong { color: var(--vert); font-weight: 600; }
/* Légère désorganisation visuelle (le JS l'accentue au scroll) */
.chaos-carte:nth-child(1) { rotate: -2deg; }
.chaos-carte:nth-child(2) { rotate: 1.6deg; margin-left: 8%; }
.chaos-carte:nth-child(3) { rotate: -1.2deg; }
.chaos-carte:nth-child(4) { rotate: 2.2deg; margin-left: 5%; }

/* L'ordre : le panneau AuthorLib */
.ordre {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--bleu-nuit);
  border-radius: calc(var(--rayon) + 6px);
  color: #FAFAFA;
  box-shadow: 0 24px 50px -24px rgba(15, 30, 51, .55);
}
html[data-theme="sombre"] .ordre { box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(157, 184, 220, .18) inset; }
.ordre-titre {
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 1.2rem;
}
.ordre ul { display: grid; gap: .9rem; }
.ordre-ligne {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .98rem;
  color: rgba(250, 250, 250, .88);
}
.ordre-ligne svg { width: 19px; height: 19px; flex: none; margin-top: .2rem; color: #34D399; }

@media (max-width: 880px) {
  .histoire-scene { grid-template-columns: 1fr; }
  .chaos-carte { margin-left: 0 !important; }
}

/* ============================================================
   4. FONCTIONNALITÉS
   ============================================================ */
.fonctionnalites { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.cartes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.carte {
  position: relative;
  padding: 1.7rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
/* Relief subtil au survol : la carte se soulève, une lumière la frôle */
.carte::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(30, 58, 95, .06), transparent 45%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
html[data-theme="sombre"] .carte::after { background: linear-gradient(150deg, rgba(157, 184, 220, .09), transparent 45%); }
.carte:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow:
    0 22px 44px -20px rgba(15, 30, 51, .32),
    0 4px 12px -6px rgba(15, 30, 51, .12);
}
html[data-theme="sombre"] .carte:hover {
  box-shadow:
    0 22px 44px -18px rgba(0, 0, 0, .7),
    0 0 0 1px rgba(157, 184, 220, .22) inset;
}
.carte:hover::after { opacity: 1; }
.carte-icone {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(30, 58, 95, .08);
  color: var(--accent-it);
  margin-bottom: 1.1rem;
  transition: transform var(--transition);
}
html[data-theme="sombre"] .carte-icone { background: rgba(157, 184, 220, .12); }
.carte:hover .carte-icone { transform: translateY(-2px) rotate(-3deg); }
.carte-icone svg { width: 24px; height: 24px; }
.carte h3 {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .45rem;
}
.carte p { font-size: .94rem; color: var(--encre-2); }

@media (max-width: 980px) { .cartes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cartes { grid-template-columns: 1fr; } }

/* --- Vitrines : trois vraies vues de l'app (univers Sobre) --- */
.vitrines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  align-items: end;
}
.vitrine { position: relative; text-align: center; }
.vitrine-mockup {
  width: min(300px, 88%);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 26px 38px rgba(15, 23, 42, .28));
}
html[data-theme="sombre"] .vitrine-mockup { filter: drop-shadow(0 26px 38px rgba(0, 0, 0, .6)); }
/* Conteneur du 3e téléphone : c'est à LUI que le module flottant est ancré */
.vitrine-telephone {
  position: relative;
  display: block;
  width: min(300px, 88%);
  margin-inline: auto;
}
.vitrine-telephone .vitrine-mockup { width: 100%; }
.vitrine figcaption {
  max-width: 21rem;
  margin: 1.2rem auto 0;
  font-size: .92rem;
  color: var(--encre-2);
}
.vitrine figcaption strong {
  display: block;
  margin-bottom: .25rem;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  color: var(--encre);
}
/* Le module « Ajouter un lieu » est ancré au conteneur du 3e téléphone :
   il le suit et rétrécit avec lui, proportionnellement, à toutes les
   tailles d'écran — comme une notification posée sur le téléphone. Il est
   DESCENDU sur l'écran (top positif) pour s'éloigner des cartes situées
   au-dessus de la section ; il déborde vers la gauche et recouvre un peu
   l'écran du device (contrainte du quart assouplie). */
.module-flottant {
  position: absolute;
  top: 8%;
  left: -15%;
  width: min(62%, 340px);
  height: auto;
  aspect-ratio: 1290 / 888;
  rotate: -5deg;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, .28));
}
html[data-theme="sombre"] .module-flottant { filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55)); }
@media (max-width: 880px) {
  .vitrines { grid-template-columns: 1fr; gap: 3rem; }
  .vitrine-mockup, .vitrine-telephone { width: min(280px, 78%); }
  .vitrine-telephone .vitrine-mockup { width: 100%; }
  /* Sur tablette et mobile : même logique de carte posée sur le téléphone,
     simplement plus petite. Descendue (top positif), elle ne déborde plus
     vers le haut — donc plus besoin de réserver d'espace au-dessus, et elle
     ne touche jamais la légende de la vitrine précédente. */
  .module-flottant {
    top: 8%;
    left: -12%;
    width: min(58%, 270px);
    rotate: -4deg;
  }
}

/* --- Chiffres animés --- */
.chiffres {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: calc(var(--rayon) + 6px);
}
.chiffre { text-align: center; display: flex; flex-direction: column-reverse; }
.chiffre dd {
  font-family: var(--police-titre);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  color: var(--vert);
  line-height: 1;
}
.chiffre dt {
  margin-top: .45rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--encre-2);
}

@media (max-width: 700px) { .chiffres { grid-template-columns: repeat(2, 1fr); row-gap: 1.8rem; } }

/* ============================================================
   5. UNIVERS (section vedette — nuit d'encre dans les deux thèmes)
   ============================================================ */
.univers {
  position: relative;
  --univers-fond: var(--bleu-nuit); /* repris par les fondus de l'étagère */
  background: var(--univers-fond);
  padding-block: clamp(4.5rem, 9vw, 8rem);
  overflow: clip;
}
html[data-theme="sombre"] .univers {
  --univers-fond: #0D1A2E;
  border-block: 1px solid var(--bordure);
}
/* Halo ambiant teinté par l'univers actif (variable mise à jour en JS) */
.univers-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(42rem 32rem at 72% 50%, var(--glow, rgba(30, 58, 95, .55)), transparent 70%);
  transition: opacity 600ms ease;
  pointer-events: none;
}
.chapitre-centre { margin-inline: auto; text-align: center; }
.univers-intro {
  margin-inline: auto;
  max-width: 36rem;
  color: #B7C4D6;
  font-size: 1.08rem;
}
.univers-note { margin-top: 2rem; text-align: center; font-size: .85rem; color: #8FA1B8; font-style: italic; }

/* --- Le grand livre ouvert : rendu réaliste, jour ou nuit selon le thème.
       L'image ne porte AUCUN transform : elle est parfaitement immobile.
       Seule la page-overlay (.page-flip) pivote autour de la reliure. --- */
.grand-livre { margin-top: 1rem; }
.livre-scene {
  position: relative;
  perspective: 1400px;
  max-width: 760px;
  margin-inline: auto;
}
.livre { position: relative; }
.livre-image {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 38px 46px rgba(0, 0, 0, .55));
}
/* Page tournante : un MORCEAU DE LA VRAIE IMAGE, recadré sur la page droite
   (mesuré au pixel sur les rendus 800×600 : reliure à 50,3 %, page droite
   de 50,3 % à 91,3 %, de 9,3 % à 88,9 %). Au repos, l'overlay affiche
   exactement ce qu'il recouvre : il est invisible. */
.page-flip {
  position: absolute;
  /* pivot au MILIEU du pli (50,0 %) et largeur 41,3 % : la page retournée
     atterrit exactement sur la page gauche réelle (8,7 % → 50,0 %) —
     aucun décalage à la dépose */
  left: 50%;
  top: 9.3%;
  width: 41.3%;
  height: 79.6%;
  overflow: hidden;
  border-radius: 4px;
  transform-origin: left center;
  transform: rotateY(0deg);
  pointer-events: none;
  will-change: transform;
  z-index: 3;
}
.page-flip.est-tournee {
  transform: rotateY(-180deg);
  transition: transform .9s cubic-bezier(.45, .05, .25, 1);
}
/* Recto : l'image courante, recadrée pour montrer exactement la page droite */
.page-flip-avant,
.page-flip-arriere,
.page-cache img {
  position: absolute;
  width: 242.14%;         /* 100 % / 0.413 */
  height: 125.63%;        /* 100 % / 0.796 */
  max-width: none;
}
.page-flip-avant,
.page-cache img {
  left: -121.07%;         /* -50.0 % / 0.413 */
  top: -11.68%;           /* -9.3 % / 0.796 */
}
.page-flip-avant { z-index: 2; }
/* Verso : l'image SUIVANTE recadrée sur sa page gauche (8,7 % → 50,0 %),
   pré-miroitée autour du centre de l'overlay : vue de dos pendant la
   rotation, elle apparaît à l'endroit, comme un vrai verso de page */
.page-flip-arriere {
  left: -21.07%;          /* -8.7 % / 0.413 */
  top: -11.68%;
  transform: scaleX(-1);
  transform-origin: 29.35% 50%; /* (8,7 + 41,3/2) % de l'image = centre de l'overlay */
}
.page-flip.au-verso .page-flip-avant { visibility: hidden; }
/* Cache de la page droite : montre le NOUVEL univers sous la page qui se
   soulève, pendant que le fond (page gauche) reste l'ancien univers */
.page-cache {
  position: absolute;
  left: 50%;
  top: 9.3%;
  width: 41.3%;
  height: 79.6%;
  overflow: hidden;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}
/* Ombre douce qui balaye la page de gauche pendant la rotation */
.ombre-balayage {
  position: absolute;
  left: 8.7%;
  top: 9.3%;
  width: 41.3%;
  height: 79.6%;
  border-radius: 4px;
  background: linear-gradient(to right, transparent 28%, rgba(15, 23, 42, .12) 74%, rgba(15, 23, 42, .22));
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.ombre-balayage.est-active { animation: balayage-ombre .9s cubic-bezier(.45, .05, .25, 1) forwards; }
@keyframes balayage-ombre {
  0% { opacity: 0; }
  45% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- L'étagère de couvertures --- */
.etagere {
  position: relative;
  max-width: 980px;
  /* La marge haute est réduite de 14px : compense la réserve interne ajoutée
     au conteneur de défilement (padding-top ci-dessous), pour que la carte
     soulevée soit visible SANS décaler la section. */
  margin: calc(2.6rem - 14px) auto 0;
  padding-bottom: 16px; /* place de la planche */
}
.etagere-livres {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: .55rem;
  /* padding-top : réserve pour la carte sélectionnée qui se soulève (-9px) et
     son anneau — sinon le clip vertical du conteneur (induit par overflow-x)
     la rogne en haut. */
  padding: 14px .6rem .35rem;
}
.couverture {
  position: relative;
  flex: 0 1 64px;
  min-width: 44px; /* cible tactile */
  padding: 0;
  border: 0;
  border-radius: 3px 6px 6px 3px;
  background: var(--bleu-2);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    -3px 0 0 0 rgba(0, 0, 0, .28) inset,  /* dos du livre */
    0 10px 18px -8px rgba(0, 0, 0, .55);
  transition: transform var(--transition), box-shadow var(--transition);
}
.couverture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
/* Voile + nom sur chaque couverture (lisible même sur fond clair, ex. Sobre) */
.couverture-nom {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem .2rem .35rem;
  background: linear-gradient(to bottom, transparent, rgba(10, 16, 28, .82));
  color: #FFFFFF;
  font-size: .56rem;
  font-weight: 600;
  line-height: 1.18;
  text-align: center;
  letter-spacing: 0;
  hyphens: auto;
}
.couverture:hover { transform: translateY(-6px); }
.couverture[aria-selected="true"] {
  transform: translateY(-9px);
  box-shadow:
    -3px 0 0 0 rgba(0, 0, 0, .28) inset,
    0 0 0 2px var(--vert),
    0 14px 22px -8px rgba(0, 0, 0, .6);
}
.couverture[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1.5px rgba(250, 250, 250, .35) inset;
}
/* La planche de l'étagère, légèrement 3D */
.etagere-planche {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(to bottom, #20334F, #16263E 55%, #0D1A2E);
  box-shadow:
    0 -2px 0 rgba(250, 250, 250, .09),
    0 14px 24px -8px rgba(0, 0, 0, .65);
}
.etagere-planche::after {
  content: "";
  position: absolute;
  inset: auto 6% -7px 6%;
  height: 7px;
  border-radius: 3px;
  background: rgba(5, 11, 20, .9);
  filter: blur(4px);
}

/* --- Affordance de défilement de l'étagère (activée en JS quand ça déborde) ---
   Fondu : le dernier visuel partiellement coupé « fond » vers le bord.
   Chevron : pulsation horizontale discrète, disparition définitive au
   premier défilement. */
.etagere-fondu {
  position: absolute;
  top: 0;
  bottom: 16px; /* s'arrête au-dessus de la planche */
  width: 52px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.etagere-fondu-droite { right: 0; background: linear-gradient(to right, transparent, var(--univers-fond)); }
.etagere-fondu-gauche { left: 0; background: linear-gradient(to left, transparent, var(--univers-fond)); }
.etagere.a-fondu-droite .etagere-fondu-droite,
.etagere.a-fondu-gauche .etagere-fondu-gauche { opacity: 1; }
.etagere-chevron {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: -8px; /* centré sur les couvertures, planche déduite */
  z-index: 3;
  font-family: var(--police-corps);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(242, 247, 253, .8);
  text-shadow: 0 1px 8px rgba(5, 11, 20, .6);
  translate: 0 -50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
}
.etagere.a-chevron .etagere-chevron {
  opacity: 1;
  animation: chevron-pulsation 1.7s ease-in-out infinite;
}
.etagere.chevron-efface .etagere-chevron { opacity: 0; animation: none; }
@keyframes chevron-pulsation {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@media (max-width: 880px) {
  /* Le grand livre garde sa double page, simplement plus compacte */
  .livre-scene { max-width: min(94vw, 520px); }
  .livre-image { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .5)); }
  /* L'étagère devient feuilletable au doigt */
  .etagere { max-width: none; }
  .etagere-livres {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .35rem;
  }
  .etagere-livres::-webkit-scrollbar { display: none; }
  .couverture { flex: 0 0 60px; scroll-snap-align: center; }
}

/* ============================================================
   6. AUSSI À VOTRE BUREAU (mobile + espace web)
   ============================================================ */
.bureau { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.bureau-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.bureau-visuel { position: relative; }

/* Cadre navigateur */
.navigateur {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  box-shadow: 0 30px 60px -28px rgba(15, 30, 51, .4);
  overflow: hidden;
}
html[data-theme="sombre"] .navigateur { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75); }
.navigateur-barre {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .6rem .9rem;
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
}
.navigateur-pastilles { display: flex; gap: .4rem; }
.navigateur-pastilles i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bordure);
}
.navigateur-url {
  flex: 1;
  max-width: 16rem;
  padding: .25rem .9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  font-size: .76rem;
  color: var(--encre-3);
  text-align: center;
}
.navigateur img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

/* Petit téléphone qui chevauche le cadre (mockup réaliste, univers Sobre) */
.telephone-mini {
  position: absolute;
  right: -7%;
  bottom: -14%;
  width: min(210px, 46%);
  pointer-events: none;
}
.telephone-mini img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, .38));
}
html[data-theme="sombre"] .telephone-mini img { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6)); }

.bureau-intro { color: var(--encre-2); font-size: 1.08rem; max-width: 32rem; }
.bureau-intro strong { color: var(--encre); }
.bureau-points { display: grid; gap: .9rem; margin-top: 1.6rem; }
.bureau-points li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  color: var(--encre-2);
  font-size: .98rem;
}
.bureau-points svg { width: 19px; height: 19px; flex: none; margin-top: .2rem; color: var(--vert); }

@media (max-width: 880px) {
  .bureau-inner { grid-template-columns: 1fr; }
  .bureau-visuel { order: 2; margin-top: 1.5rem; padding-bottom: 3rem; }
  .telephone-mini { right: 2%; bottom: -8%; }
}

/* ============================================================
   6bis. PENSÉE SUR LE TERRAIN (rubrique crédibilité)
   ============================================================ */
.terrain { padding-block: clamp(2rem, 5vw, 3.5rem); }
.terrain-carte {
  position: relative;
  z-index: 2; /* au-dessus du fil d'encre, qui passe derrière la carte */
  max-width: 52rem;
  margin-inline: auto;
  padding: clamp(2.4rem, 5vw, 3.6rem) clamp(1.6rem, 5vw, 4rem);
  text-align: center;
  background: linear-gradient(158deg, var(--bleu-nuit), var(--bleu-2));
  border-radius: calc(var(--rayon) + 8px);
  color: #FAFAFA;
  box-shadow: 0 30px 60px -28px rgba(15, 30, 51, .5);
  overflow: hidden;
}
html[data-theme="sombre"] .terrain-carte {
  background: linear-gradient(158deg, #0D1A2E, #1E3A5F 150%);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(157, 184, 220, .18) inset;
}
/* Sceau : la plume dans un cercle, façon cachet */
.terrain-sceau {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  color: #34D399;
  background: rgba(52, 211, 153, .1);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .3) inset;
}
.terrain-sceau svg { width: 46px; height: 46px; }
.terrain-surtitre {
  margin-bottom: .9rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9DB8DC;
}
.terrain-titre {
  margin-bottom: 1.1rem;
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #FAFAFA;
}
.terrain-texte {
  max-width: 40rem;
  margin-inline: auto;
  color: #B7C4D6;
  font-size: 1.06rem;
}

/* ============================================================
   7. MUR VIVANT DE TÉMOIGNAGES
   ============================================================ */
.temoignages { padding-block: clamp(4.5rem, 10vw, 8.5rem); }

/* Mur « fantôme » : masonry en colonnes responsive (3 → 2 → 1) */
.mur-fantome { columns: 3; column-gap: 1.2rem; }

/* Carte de base (réutilisée par le témoignage réel) */
.temoignage {
  position: relative;
  break-inside: avoid;
  margin: 0 0 1.2rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  transition: transform var(--transition), box-shadow var(--transition);
}
/* Seul le vrai témoignage se soulève au survol */
.temoignage:not(.temoignage-fantome):not(.temoignage-cta):hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -18px rgba(15, 30, 51, .3);
}
html[data-theme="sombre"] .temoignage:not(.temoignage-fantome):not(.temoignage-cta):hover {
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .7);
}
.temoignage blockquote {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.5;
  color: var(--encre);
}
.temoignage figcaption {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.1rem;
  font-size: .85rem;
  color: var(--encre-2);
}
.temoignage figcaption strong { color: var(--encre); }
/* Liens discrets sur les titres de livres : couleur d'encre (jamais de bleu
   criard), souligné fin PERMANENT (identifiables sans survol) ; le survol
   renforce légèrement la couleur et le trait — clair et sombre. */
.temoignage figcaption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--encre-3);
  text-underline-offset: 2px;
  transition: color var(--transition), text-decoration-color var(--transition);
}
.temoignage figcaption a:hover,
.temoignage figcaption a:focus-visible {
  color: var(--encre);
  text-decoration-color: currentColor;
}
.temoignage-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--bleu-2);
  color: #FAFAFA;
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1.05rem;
}

/* (b) Emplacements en attente : bordure pointillée, fond atténué, sans ombre */
.temoignage-fantome {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  border: 1.5px dashed var(--bordure);
  box-shadow: none;
}
.temoignage-fantome-haut { padding-block: 2.8rem; } /* variation de hauteur, rythme du mur */
.fantome-citation {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1rem;
  color: var(--encre-3);
}
.fantome-pied { display: flex; align-items: center; gap: .75rem; margin-top: 1.6rem; }
.fantome-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1.5px dashed var(--encre-3);
  opacity: .55;
}
.fantome-lignes { display: grid; gap: .5rem; flex: 1; }
.fantome-barre { height: 8px; width: 70%; border-radius: 999px; background: var(--bordure); }
.fantome-barre-courte { width: 45%; }

/* (c) Carte CTA au cœur du mur — même famille que « Pensée sur le terrain » */
.temoignage-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  border: 0;
  background: linear-gradient(158deg, var(--bleu-nuit), var(--bleu-2));
  color: #FAFAFA;
  box-shadow: 0 24px 50px -28px rgba(15, 30, 51, .5);
}
html[data-theme="sombre"] .temoignage-cta {
  background: linear-gradient(158deg, #0D1A2E, #1E3A5F 150%);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(157, 184, 220, .18) inset;
}
.temoignage-cta-texte {
  font-family: var(--police-titre);
  font-size: 1.18rem;
  line-height: 1.3;
  color: #FAFAFA;
}
.temoignage-cta .bouton-clair { align-self: stretch; }

@media (max-width: 980px) { .mur-fantome { columns: 2; } }
@media (max-width: 560px) { .mur-fantome { columns: 1; } }

/* ============================================================
   8. CTA FINAL
   ============================================================ */
.cta-final {
  background: linear-gradient(160deg, var(--bleu-nuit), var(--bleu-2) 130%);
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
html[data-theme="sombre"] .cta-final { background: linear-gradient(160deg, #0D1A2E, #1E3A5F 140%); border-top: 1px solid var(--bordure); }
/* Quand le JS déporte le fond sur le calque .fond-cta (z0), la section devient
   un contexte d'empilement z2, AU-DESSUS du fil (z1) : tout son contenu passe
   donc devant le fil et la plume, qui restent visibles sur le calque de fond. */
.cta-final.fond-deporte { background: transparent; z-index: 2; }
/* Contenu de l'épilogue explicitement au-dessus du fil d'encre (z1), sans
   fond opaque : le trait reste visible derrière le texte, les cartes et le
   bouton (fond de section z0 < fil z1 < contenu z2). */
.cta-inner { max-width: 44rem; text-align: center; position: relative; z-index: 2; }
.cta-inner .eyebrow { margin-bottom: 1rem; }
.cta-sous { margin-top: 1.1rem; color: #B7C4D6; font-size: 1.08rem; }
.cta-final .form-attente { margin-inline: auto; margin-top: 2.2rem; }
.form-claire input[type="email"] {
  background: #2A3C57; /* opaque : le fil ne transparaît pas à travers le champ */
  border-color: rgba(250, 250, 250, .25);
  color: #FAFAFA;
}
.form-claire input[type="email"]::placeholder { color: #8FA1B8; }
.form-claire input[type="email"]:focus {
  border-color: #FAFAFA;
  box-shadow: 0 0 0 4px rgba(250, 250, 250, .15);
}
.form-claire .form-succes { background: #1C4354; color: #34D399; }
.form-claire .form-erreur { color: #FCA5A5; }
.cta-final .badges-stores { margin-top: 2.2rem; }

/* Souligné d'encre à main levée sous « commence ici. » — même trait que sous
   « AuthorLib » dans le hero (.trait-encre), en vert vif lisible sur le fond
   sombre de l'épilogue. */
.souligne-mot { position: relative; display: inline-block; }
.trait-epilogue { color: #34D399; }

/* ============================================================
   9. PIED DE PAGE
   ============================================================ */
.pied { background: var(--surface); border-top: 1px solid var(--bordure); }
.pied-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.logo-pied { font-size: 1.3rem; }
.pied-pitch { margin-top: .7rem; font-size: .9rem; color: var(--encre-2); }
/* Sous-pied légal : copyright + liens Unikoweb, séparateurs « · » */
.pied-bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.4rem;
  padding-block: 1.2rem;
  border-top: 1px solid var(--bordure);
  font-size: .82rem;
  color: var(--encre-3);
}
.pied-copyright { margin: 0; }
.pied-legal { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; }
.pied-legal a {
  position: relative;
  color: var(--encre-3);
  text-decoration: none;
  transition: color var(--transition);
}
.pied-legal a:hover { color: var(--encre); text-decoration: underline; }
/* Séparateur « · » centré dans l'espace entre deux liens */
.pied-legal a:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -.62rem;
  color: var(--encre-3);
  pointer-events: none;
}

/* ============================================================
   PAGES LÉGALES (mentions légales · politique de confidentialité)
   Réutilisent l'en-tête, le pied et la typographie du site.
   ============================================================ */
.page-legale { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.legale-corps {
  width: min(100% - 3rem, 760px); /* padding latéral 24px */
  margin-inline: auto;
}
.legale-corps .titre-2 { margin-bottom: .45rem; }
.legale-maj {
  margin-bottom: 2.5rem;
  font-size: .9rem;
  color: var(--encre-3);
}
.legale-corps h2 {
  margin-top: 2.8rem;
  margin-bottom: .9rem;
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--encre);
}
.legale-corps p { margin-bottom: 1rem; color: var(--encre-2); }
.legale-corps p:last-child { margin-bottom: 0; }
.legale-corps strong { color: var(--encre); font-weight: 600; }
.legale-corps a {
  color: var(--accent-it);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.legale-corps a:hover { color: var(--encre); }

/* ============================================================
   MOUVEMENT RÉDUIT : tout est visible et immobile
   (les animations GSAP sont elles-mêmes désactivées en JS)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  /* Le fil d'encre est entièrement tracé, sans plume ni animation */
  #fil-plume { opacity: 0 !important; }
}
