/* =====================================================================
   Désobéir à l'invisible — mise en scène
   Bleu nuit, or, pénombre et grain de la couverture.
   .rm = réduction des mouvements : présentation complète, sans animation.
   ===================================================================== */

@property --wcm { syntax: "<number>"; inherits: true; initial-value: 15.24; }
@property --hcm { syntax: "<number>"; inherits: true; initial-value: 22.86; }
@property --tcm { syntax: "<number>"; inherits: true; initial-value: 1.07; }

:root {
  --night-950: #04070d;
  --night-900: #070c16;
  --night-850: #0b1322;
  --night-800: #111d33;
  --night-700: #1b2b48;
  --gold-100: #fbf1d6;
  --gold-200: #f3e2b5;
  --gold-300: #e6c98a;
  --gold-400: #d4ad62;
  --gold-500: #b8904a;
  --gold-line: rgba(230, 201, 138, .3);
  --ink: #f1e9da;
  --ink-soft: #cfc8ba;
  --ink-mute: #9ba5b5;
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-900);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
}
/* Grain photographique */
/* Arrière-plan global : la photo, fixe derrière toutes les sections, sous un
   voile sombre et une vignette ; léger flou = profondeur de champ, et un
   léger décalage au défilement (--bg-y, fixé en JS) = profondeur. */
body::before {
  content: ""; position: fixed; inset: -4% -3%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(115% 85% at 50% 38%, rgba(5, 10, 14, .4) 0%, rgba(5, 10, 14, .75) 62%, rgba(3, 6, 10, .94) 100%),
    linear-gradient(180deg, rgba(6, 11, 15, .5) 0%, rgba(6, 11, 15, .62) 100%),
    url("../img/fond-portrait-flou.jpg") center 30% / cover no-repeat;  /* flou déjà intégré à l'image : rendu léger */
  transform: translate3d(0, calc(var(--bg-y, 0) * 1px), 0);
  will-change: transform;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60;
  opacity: .045; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, video, svg { display: block; max-width: 100%; }
a { color: var(--gold-300); }
a:hover { color: var(--gold-200); }
:focus-visible { outline: 2px solid var(--gold-200); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.defs { position: absolute; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .6rem 1rem; background: var(--gold-300); color: var(--night-900); font-family: var(--sans); text-decoration: none; }
.skip-link:focus { top: 12px; }

.eyebrow, .credit, .cd-label {
  margin: 0;
  font-family: var(--sans); font-size: .74rem; font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-400);
}
h2 { margin: 0; font-weight: 500; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1; letter-spacing: .01em; }

/* ------------------------------- En-tête ------------------------------ */
.site-header {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 20px var(--gutter);
  font-family: var(--sans);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1rem; letter-spacing: .46em; text-transform: uppercase; }
.site-header ul { display: flex; gap: clamp(.9rem, 3vw, 2.2rem); margin: 0; padding: 0; list-style: none; }
.site-header nav a { display: inline-block; padding: .5rem 0; color: var(--ink-soft); text-decoration: none; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--gold-200); }

/* =====================================================================
   SCÈNE : ouverture + formats (la couverture voyage de l'une à l'autre)
   ===================================================================== */
/* Fond bleu pétrole, proche du fond de la couverture : le détourage s'y fond */
.scene {
  /* même teinte que le fond de la photo (rgb 15, 26, 26) : aucun contour visible */
  --petrole: #0f1b1e;
  position: relative; overflow-x: clip;
  /* voile pétrole semi-transparent : la photo de fond transparaît, le portrait détouré reste fondu */
  background: linear-gradient(180deg, rgba(15, 27, 30, .7) 0%, rgba(14, 26, 30, .55) 60%, rgba(11, 22, 28, .35) 85%, rgba(7, 12, 22, 0) 100%);
}

/* --------------------- Le portrait (un seul élément) ------------------ */
/* La boîte du portrait a exactement les proportions de la couverture :
   le portrait détouré et la couverture partagent les mêmes coordonnées,
   donc le visage tombe au même endroit sur les deux calques. */
.hero { position: relative; }
.hero-stage { position: relative; }
/* emplacement du livre 3D de l'ouverture (largeur/hauteur fixées en JS selon le format) */
.hero-slot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.hero-unit { position: absolute; inset: 0; }
.hero-unit .book-rig { transform: rotateX(3deg) rotateY(16deg); }
/* le livre sort du noir à l'arrivée */
.js:not(.rm) .frame[data-phase="intro"] .hero-unit,
.js:not(.rm) .frame[data-phase="clip"] .hero-unit { opacity: 0; filter: brightness(0); transform: translateY(14px); }
.js:not(.rm) .frame[data-phase="intro"] .hero-unit { animation: livreFailsafe .01s 6s forwards; }
@keyframes livreFailsafe { to { opacity: 1; filter: brightness(1); transform: none; } }
.js:not(.rm) .frame[data-phase="reveal"] .hero-unit { animation: livreNoir 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes livreNoir {
  0%   { opacity: 0; filter: brightness(0); transform: translateY(14px); }
  45%  { opacity: 1; filter: brightness(.45); }
  100% { opacity: 1; filter: brightness(1); transform: none; }
}
.frame {
  --zoom: 1; --ox: 51%; --oy: 32%;
  position: absolute; inset: 0; margin: 0;
  overflow: visible; pointer-events: none; /* le livre 3D (tranche, ombre) déborde du cadre */
  z-index: 5;
}
.frame.is-flying { position: fixed; inset: auto; left: 0; top: 0; will-change: transform; }
.scene.is-traveling .shelf:not(.is-live) .book-link { pointer-events: none; }
.scene.is-traveling .shelf:not(.is-live) .book-slot::before { opacity: 0; }
.book-shadow { transition: opacity .6s ease; }
.scene.is-traveling .shelf:not(.is-live) .book-shadow { opacity: 0; }
.frame-cadre, .frame-zoom, .frame-art { position: absolute; inset: 0; }
.frame-cadre { transform-origin: var(--ox) var(--oy); }
.frame-zoom { transform: scale(var(--zoom)); transform-origin: var(--ox) var(--oy); }
.frame-img, .frame-clip, .frame-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.frame-img { z-index: 3; }   /* portrait détouré, toujours au-dessus */
.frame-clip { z-index: 4; }

/* La couverture entière (fond, bas du personnage, titre) sort du noir
   d'un seul fondu, dès que le portrait s'y pose : aucun délai entre les éléments. */
.frame-book {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0; filter: brightness(0);
}

/* Voile du titre imprimé (sur le calque couverture), ouvert au défilement */
.title-veil {
  display: none; position: absolute; left: 0; right: 0; top: 62%; bottom: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 26, 26, 0) 0%, rgba(15, 26, 26, .9) 17%, #0f1a1a 21%, #0f1a1a 100%);
}
.frame .title-veil {
  display: none; /* plus de voile sombre : la couverture reste intacte */
  /* ouverture au bord adouci, de gauche à droite (--w : 0 → 112) */
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--w) * 1% - 16%), #000 calc(var(--w) * 1%));
          mask-image: linear-gradient(90deg, transparent calc(var(--w) * 1% - 16%), #000 calc(var(--w) * 1%));
}
/* Lueur dorée qui accompagne le bord de l'ouverture */
.title-sheen {
  position: absolute; left: 0; right: 0; top: 66%; height: 28%; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse 13% 50% at calc(var(--w) * 1% - 7%) 46%, rgba(255, 226, 160, .42), rgba(255, 226, 160, .12) 45%, rgba(255, 226, 160, 0) 75%);
  mix-blend-mode: screen;
}
.frame-clip { opacity: 0; transition: opacity .7s ease; }
.frame[data-phase="clip"] .frame-clip { opacity: 1; transition-duration: .3s; }

/* Apparition (cadrage fixe) : le portrait se confond presque avec le fond ;
   un voile sombre, limité à la silhouette, se retire en ~1,5 s en partant de
   l'œil et de la joue, puis libère cheveux et buste. Pixels d'origine intacts. */
@property --lit { syntax: "<percentage>"; inherits: false; initial-value: 170%; }
.frame-shade {
  --lit: 170%;
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: #0d181b;
  -webkit-mask-image: radial-gradient(ellipse 48% 44% at 46% 31%, transparent var(--lit), #000 calc(var(--lit) + 40%)), url("../img/portrait-detoure.png");
  -webkit-mask-size: 100% 100%, 100% 100%; -webkit-mask-composite: source-in;
          mask-image: radial-gradient(ellipse 48% 44% at 46% 31%, transparent var(--lit), #000 calc(var(--lit) + 40%)), url("../img/portrait-detoure.png");
          mask-size: 100% 100%, 100% 100%; mask-composite: intersect;
}
.js:not(.rm) .frame[data-phase="intro"] .frame-shade,
.js:not(.rm) .frame[data-phase="clip"] .frame-shade { opacity: .9; --lit: -40%; }
.js:not(.rm) .frame[data-phase="intro"] .frame-shade { animation: failsafe .01s 6s forwards; }
@keyframes failsafe { to { opacity: 0; --lit: 170%; } }
.js:not(.rm) .frame[data-phase="reveal"] .frame-shade { animation: unveil 1.6s cubic-bezier(.45, .05, .25, 1) forwards; }
@keyframes unveil { 0% { opacity: .9; --lit: -40%; } 85% { opacity: .9; } 100% { opacity: 0; --lit: 170%; } }

/* Lumière d'ouverture et reflet du curseur : limités à la silhouette
   (masque = le portrait détouré), donc aucune coupure verticale. */
.frame-light, .frame-glint {
  -webkit-mask-image: url("../img/portrait-detoure.png"); -webkit-mask-size: 100% 100%;
          mask-image: url("../img/portrait-detoure.png");         mask-size: 100% 100%;
}
.frame-light {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(30% 26% at 46% 31%, rgba(255, 214, 140, .7), rgba(212, 160, 80, .2) 55%, transparent 85%);
  mix-blend-mode: soft-light;
}
/* lumière dorée : d'abord l'œil et la joue, puis elle s'élargit et s'efface */
.js:not(.rm) .frame[data-phase="reveal"] .frame-light { animation: light 2.2s ease-in-out forwards; }
@keyframes light { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8); } }
.frame-light { transform-origin: 46% 31%; }

.frame-glint {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 40%), rgba(255, 222, 160, .28), rgba(255, 210, 140, .08) 22%, transparent 42%);
  mix-blend-mode: screen; transition: opacity .6s ease;
}
.frame.is-glinting .frame-glint { opacity: 1; }

/* Section des formats : reste à l'écran le temps que le portrait se fonde dans le livre */
.scene.is-traveling .formats { position: sticky; top: 0; }

.replay {
  position: absolute; z-index: 7; left: var(--gutter); top: calc(56svh - 54px);
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .4rem .2rem;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
  font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
}
.replay svg { width: 16px; height: 16px; }
.replay:hover, .replay:focus-visible { color: var(--gold-200); }

/* ------------------------------- Titre -------------------------------- */
.hero-copy { position: relative; z-index: 6; }
.mask { display: block; overflow: hidden; padding: .14em .1em .04em; margin: -.14em -.1em -.04em; }
.mask > span { display: block; }
.js:not(.rm) .mask > span { animation: rise 1.05s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { transform: translateY(108%); } to { transform: none; } }

.credit { color: var(--ink-soft); letter-spacing: .4em; }
h1 { margin: 14px 0 0; font-weight: 500; line-height: .86; }
.t-main {
  font-size: clamp(2.7rem, 12.6vw, 4.6rem);
  letter-spacing: .07em; margin-right: -.07em;
  text-transform: uppercase; white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
.t-sub {
  margin-top: .12em;
  font-style: italic; font-weight: 400;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  color: var(--gold-300);
  line-height: 1;
}

.t-kicker {
  margin: 14px 0 0;
  font-family: var(--serif); font-size: clamp(.78rem, 1.1vw, .95rem); font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase; color: var(--ink-soft);
}
.t-kicker .mask > span::before { content: ""; display: inline-block; width: 34px; height: 1px; margin-right: 14px; vertical-align: middle; background: var(--gold-400); }

/* ------------------------------ Compte à rebours ---------------------- */
.countdown { position: relative; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--gold-line); }
.countdown .cd-label { color: var(--ink-mute); letter-spacing: .3em; font-size: .68rem; }
.cd-msg { margin: 6px 0 0; color: var(--gold-300); font-size: clamp(1.6rem, 5.6vw, 2.2rem); font-style: italic; line-height: 1.1; }
.cd-timer { display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 30px); margin-top: 4px; }
.countdown[data-state="pending"] .cd-timer,
.countdown[data-state="pending"] .cd-msg--released,
.countdown[data-state="running"] .cd-msg,
.countdown[data-state="released"] .cd-timer,
.countdown[data-state="released"] .cd-msg--pending { display: none; }
.cd-days { display: flex; align-items: baseline; gap: 10px; }
.cd-small { display: flex; gap: clamp(14px, 2.6vw, 24px); padding-bottom: .5em; }
.cd-cell { display: flex; align-items: baseline; gap: 6px; }
.cd-num { display: block; line-height: .9; white-space: nowrap; color: var(--gold-300); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.cd-days .cd-num { font-size: clamp(3.4rem, 15vw, 5.4rem); }
.cd-small .cd-num { font-size: clamp(1.7rem, 6.4vw, 2.3rem); color: var(--gold-200); }
.cd-num .d { display: inline-block; }
.cd-unit { font-family: var(--sans); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-mute); }
.cd-date { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--ink-soft); font-size: 1.05rem; }
.cd-date:empty { display: none; }
.cd-cal { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; color: var(--gold-200); text-decoration: none; font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--gold-line); }
.cd-cal svg { width: 15px; height: 15px; }
.cd-cal:hover { border-bottom-color: var(--gold-300); }

.js:not(.rm) .cd-num .d.tick { animation: tick .55s var(--ease-out); }
@keyframes tick { from { transform: translateY(-.16em); opacity: .25; } to { transform: none; opacity: 1; } }
.js:not(.rm) .countdown.shine .cd-num,
.js:not(.rm) .countdown.shine .cd-msg {
  background-image: linear-gradient(100deg, var(--gold-300) 0 40%, #fff8e2 49%, #ffe7ad 52%, var(--gold-300) 61% 100%);
  background-size: 280% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 1.5s ease-in-out both;
}
.js:not(.rm) .countdown.shine .cd-small .cd-cell:first-child .cd-num { animation-delay: .2s; }
.js:not(.rm) .countdown.shine .cd-small .cd-cell:last-child .cd-num { animation-delay: .32s; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ------------------------------- Commandes ---------------------------- */
.orders { display: grid; gap: 14px; margin-top: 22px; }
.order { min-width: 0; }
.sign { position: relative; margin-top: 30px; }
.paraphe { position: absolute; overflow: visible; pointer-events: none; z-index: 2; }
.paraphe path { fill: none; stroke: url(#or); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.regard .paraphe path { animation: draw 1.9s cubic-bezier(.6, .05, .3, 1) forwards; }
.rm.regard .paraphe path { animation: none; stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.btn {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; padding: .7rem 1.2rem;
  border: 1px solid transparent; border-radius: 1px;
  font-family: var(--sans); font-size: .98rem; font-weight: 500; letter-spacing: .05em; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: transform .25s ease, background-color .3s ease, border-color .3s ease, color .3s ease;
}
.btn-sub { display: block; margin-top: 3px; font-size: .68rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; opacity: .8; }
.btn--gold { color: var(--night-900); background: linear-gradient(180deg, #efd59e 0%, #d6af65 55%, #c39a50 100%); box-shadow: 0 16px 36px -18px rgba(212, 173, 98, .8), inset 0 1px 0 rgba(255, 248, 226, .6); }
.btn--gold:hover { color: var(--night-950); }
.btn--line { color: var(--gold-200); background: rgba(7, 12, 22, .55); border-color: rgba(230, 201, 138, .6); }
.btn--line:hover { color: var(--gold-100); border-color: var(--gold-300); background: rgba(212, 173, 98, .1); }
.btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 247, 222, .45) 48%, transparent 66%); transform: translateX(-120%); }
.js:not(.rm) .btn:hover::after, .js:not(.rm) .btn:focus-visible::after { transform: translateX(120%); transition: transform .9s ease; }

.soon { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin: 0; padding: .5rem .9rem; border: 1px dashed rgba(230, 201, 138, .4); color: var(--gold-300); font-size: 1.12rem; font-style: italic; line-height: 1.15; text-align: center; background: rgba(7, 12, 22, .45); }

.via { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem .7rem; margin: 9px 0 0; font-family: var(--sans); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); }
.logo { color: var(--gold-400); height: 20px; width: auto; text-transform: none; letter-spacing: normal; }
.logo--amazon { height: 24px; }
.via-link { color: var(--ink-mute); text-decoration: underline; text-decoration-color: rgba(230, 201, 138, .4); text-underline-offset: 4px; }
.via-link:hover, .via-link:focus-visible { color: var(--gold-200); }

.scroll-cue { display: none; }

/* =============================== FORMATS ============================== */
.formats { position: relative; padding: 64px var(--gutter) 72px; display: grid; gap: 28px; }
.formats-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; }

/* Étagère : les deux éditions à la même échelle. --u = 1 cm (fixé en JS). */
.shelf { --u: 12px; position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.shelf-books { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: var(--shelf-gap, 56px); padding-top: 34px; }
.book-unit { position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: center; }
.book-unit.is-selected { z-index: 2; } /* la seconde édition sort de derrière la première */
.book-slot {
  --w: calc(var(--wcm) * var(--u));
  --h: calc(var(--hcm) * var(--u));
  --t: calc(var(--tcm) * var(--u));
  --ov: calc(var(--ovcm, .05) * var(--u));   /* débord des plats */
  --bt: calc(var(--btcm, .03) * var(--u));   /* épaisseur d'un plat */
  position: relative; width: var(--w); height: var(--h);
  perspective: 1300px;
}
.book-unit.is-selected .book-slot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; z-index: -1; transition: opacity .8s ease;
  background: radial-gradient(closest-side, rgba(212, 173, 98, .16), rgba(212, 173, 98, .04) 60%, transparent);
}
.book-cap > span { display: block; white-space: nowrap; }
.book-cap { height: 4.6em; margin-top: 30px; text-align: center; font-family: var(--sans); font-size: .68rem; line-height: 1.5; letter-spacing: .1em; color: var(--ink-mute); transition: color .4s ease; }
.book-cap b { display: block; margin-bottom: 2px; font-weight: 500; font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.book-unit.is-selected .book-cap b { color: var(--gold-300); }
.book-unit.is-selected .book-cap { color: var(--ink-soft); }
.book-unit .face { transition: filter .5s ease; }
.book-unit:not(.is-selected) .face { filter: brightness(.5) saturate(.7); }
.rm .book-unit .face { transition: none; }

.height-guide { position: absolute; left: -8px; right: -8px; top: 0; height: 0; border-top: 1px dashed rgba(230, 201, 138, .6); pointer-events: none; z-index: 3; }
.height-guide span { position: absolute; right: 0; bottom: 4px; font-family: var(--sans); font-size: .64rem; letter-spacing: .1em; color: var(--gold-300); white-space: nowrap; }
.scale-bar { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-family: var(--sans); font-size: .64rem; letter-spacing: .14em; color: var(--ink-mute); }
.scale-bar i { display: block; width: calc(5 * var(--u)); height: 7px; border: 1px solid rgba(230, 201, 138, .6); border-top: 0; }
.book-link, .book-rig, .book-tilt, .book { position: absolute; inset: 0; transform-style: preserve-3d; }
.book-link { display: block; -webkit-tap-highlight-color: transparent; }
.shelf .book-link { cursor: zoom-in; }
.hero-unit .book-link, .apercu-unit .book-link { cursor: inherit; }
.book-link:focus-visible { outline-offset: 14px; }
.book-rig { transform: rotateX(4deg) rotateY(30deg); }
/* En mode transition, GSAP pilote seul la rotation (évite une inclinaison parasite) */
.scene.is-traveling .book-rig { transform: none; }
.book-tilt { transition: transform .55s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .shelf .book-link:hover .book-tilt { transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--tilt-y, 0deg) + 16deg)); } }
.shelf .book-link:focus-visible .book-tilt { transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--tilt-y, 0deg) + 16deg)); }
.rm .book-tilt { transition: none; }
.face { position: absolute; }
.front { inset: 0; overflow: hidden; transform: translateZ(calc(var(--t) / 2)); background: #0f1a1a; border-radius: 0 2px 2px 0; }
.front::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 4px 0 8px -2px rgba(0, 0, 0, .65); }
/* Dorure : reflet doré unique sur « DÉSOBÉIR » au moment où le livre pivote
   (mode overlay : il accroche les lettres claires, presque pas le fond sombre) */
.foil {
  position: absolute; left: 14%; right: 14%; top: 69%; height: 8%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 0 34%, rgba(255, 210, 130, .95) 50%, transparent 66% 100%);
  background-size: 300% 100%; background-position: 120% 0;
  mix-blend-mode: overlay;
}
/* « fill » : même correspondance pixel → face que le portrait volant (raccord exact du visage) */
.front img { width: 100%; height: 100%; object-fit: fill; }
.front-glint { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse 42% 34% at var(--glint-x, 50%) var(--glint-y, 38%), rgba(255, 229, 178, .34), rgba(255, 222, 158, .12) 42%, transparent 78%), linear-gradient(115deg, transparent 38%, rgba(255, 236, 190, .34) 50%, transparent 62%); background-size: auto, 260% 100%; background-position: center, 110% 0; mix-blend-mode: screen; opacity: .28; transition: opacity .35s ease, background-position 1.1s ease; }
.shelf .book-link:hover .front-glint, .shelf .book-link:focus-visible .front-glint { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .js:not(.rm) .shelf .book-link:hover .front-glint { background-position: center, -10% 0; } }
.js:not(.rm) .shelf .book-link:focus-visible .front-glint { background-position: center, -10% 0; }
.back { inset: 0; overflow: hidden; transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); background: #0f1a1a; border-radius: 2px 0 0 2px; }
.back img { width: 100%; height: 100%; object-fit: cover; }
.back::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset -4px 0 8px -2px rgba(0, 0, 0, .65); }
/* Tranche réelle : l'image garde ses proportions, le fond prolonge sa couleur */
.spine {
  top: 0; left: calc(50% - var(--t) / 2); width: var(--t); height: 100%;
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: url("../img/couverture-tranche.jpg") center / auto 100% no-repeat, #0f1a1a;
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, .6), inset -2px 0 3px rgba(0, 0, 0, .6);
}
/* Bloc des pages : en retrait des plats (--ov) sur le relié, affleurant sur le broché */
.edge {
  top: var(--ov); height: calc(100% - 2 * var(--ov));
  left: calc(50% - (var(--t) - 2 * var(--bt)) / 2); width: calc(var(--t) - 2 * var(--bt));
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - var(--ov)));
  background: repeating-linear-gradient(90deg, #efe6d2 0 1px, #d9cdb3 1px 2px);
}
.top, .bottom {
  left: 0; width: calc(100% - var(--ov));
  top: calc(50% - (var(--t) - 2 * var(--bt)) / 2); height: calc(var(--t) - 2 * var(--bt));
  background: repeating-linear-gradient(0deg, #efe6d2 0 1px, #d9cdb3 1px 2px);
}
.top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - var(--ov))); }
.bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - var(--ov))); }
/* Épaisseur des plats rigides (relié) */
.bedge { display: none; background: linear-gradient(90deg, #1f2e2d, #0f1a1a); }
.book-unit.is-rigid .bedge { display: block; }
.bedge--fe-front, .bedge--fe-back { top: 0; height: 100%; left: calc(50% - var(--bt) / 2); width: var(--bt); }
.bedge--fe-front { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)) translateX(calc((var(--t) - var(--bt)) / -2)); }
.bedge--fe-back { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)) translateX(calc((var(--t) - var(--bt)) / 2)); }
.bedge--top-front, .bedge--top-back { left: 0; width: 100%; top: calc(50% - var(--bt) / 2); height: var(--bt); }
.bedge--top-front { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)) translateY(calc((var(--t) - var(--bt)) / 2)); }
.bedge--top-back { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)) translateY(calc((var(--t) - var(--bt)) / -2)); }
.book-unit.is-rigid .front { border-radius: 0 3px 3px 0; }
.book-shadow { position: absolute; left: 50%; bottom: -22px; width: 96%; height: 26px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .8), transparent 70%); filter: blur(6px); z-index: -1; }

.flip-btn {
  position: relative; z-index: 2; margin-top: 46px;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .9rem;
  background: none; border: 0; border-bottom: 1px solid var(--gold-line); cursor: pointer;
  color: var(--ink-soft); font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
}
.flip-btn svg { width: 16px; height: 16px; color: var(--gold-400); }
.flip-btn:hover, .flip-btn:focus-visible { color: var(--gold-200); border-bottom-color: var(--gold-300); }

.formats-info { max-width: 520px; width: 100%; margin: 0 auto; text-align: center; }
.formats-info h2 { margin: 12px 0 24px; }

.switch { position: relative; isolation: isolate; display: inline-flex; margin: 0 0 24px; padding: 4px; border: 1px solid var(--gold-line); border-radius: 999px; background: rgba(7, 12, 22, .7); }
.switch label { position: relative; border-radius: 999px; }
.switch label > span { position: relative; z-index: 1; }
.switch input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch label > span { display: inline-flex; align-items: center; justify-content: center; min-width: 118px; min-height: 48px; padding: .4rem 1.3rem; border-radius: 999px; font-family: var(--sans); font-size: .86rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); transition: color .35s ease; }
.switch input:checked + span { color: var(--night-900); }
.switch input:focus-visible + span { outline: 2px solid var(--gold-200); outline-offset: 3px; }
.switch input:not(:checked):hover + span { color: var(--gold-200); }
.switch-thumb { position: absolute; inset: 0; z-index: 0; border-radius: 999px; background: linear-gradient(180deg, #efd59e, #cfa75b); box-shadow: 0 8px 20px -10px rgba(212, 173, 98, .8); }

.specs { display: grid; grid-template-columns: 1fr auto auto; margin: 0 0 10px; border-top: 1px solid rgba(230, 201, 138, .18); border-bottom: 1px solid rgba(230, 201, 138, .18); text-align: left; }
.specs > div { padding: 14px 4px; }
.specs > div + div { border-left: 1px solid rgba(230, 201, 138, .18); padding-left: 20px; }
.specs dt { margin-bottom: 4px; font-family: var(--sans); font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-mute); }
.specs dd { margin: 0; font-size: 1.4rem; color: var(--ink); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.specs small { display: block; font-family: var(--sans); font-size: .7rem; letter-spacing: .08em; color: var(--ink-mute); }
.spec-note { margin: 0 0 22px; min-height: 1.6em; color: var(--ink-soft); font-style: italic; }
.amazon-block { max-width: 400px; margin: 0 auto; }

/* ======================= QUATRIÈME DE COUVERTURE ====================== */
.back-cover {
  max-width: 880px; margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  border-top: 1px solid rgba(230, 201, 138, .12);
}
/* lisibilité sur la photo de fond : ombre douce derrière les blocs de texte */
.back-cover, .excerpt, .social, .site-footer {
  background: radial-gradient(75% 70% at 40% 50%, rgba(4, 8, 12, .62), rgba(4, 8, 12, .25) 60%, rgba(4, 8, 12, 0) 85%);
}
.quote p, .blurb, .social h2, .site-footer { text-shadow: 0 1px 14px rgba(3, 6, 10, .9); }
.quote { margin: 18px 0 0; }
.quote p {
  margin: 0;
  font-style: italic; font-weight: 400;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.22;
  color: var(--ink);
  text-wrap: balance;
}
.quote p::before { content: "« "; color: var(--gold-400); }
.quote p::after { content: " »"; color: var(--gold-400); }
.rule { display: block; width: 56px; height: 1px; margin: 34px 0; background: var(--gold-400); }
.blurb { max-width: 60ch; color: var(--ink-soft); font-size: clamp(1.12rem, 2vw, 1.28rem); line-height: 1.7; }
.blurb p { margin: 0 0 1.1em; }
.blurb em { color: var(--ink); }
.signature { margin: 26px 0 0; font-family: var(--serif); font-size: .9rem; letter-spacing: .42em; text-transform: uppercase; color: var(--gold-300); }

/* =============================== EXTRAIT ============================== */
.excerpt { max-width: 860px; margin: 0 auto; padding: clamp(56px, 8vw, 100px) var(--gutter); text-align: center; border-top: 1px solid rgba(230, 201, 138, .12); }
.excerpt h2 { margin: 12px 0 26px; }
.excerpt-toggle { display: inline-flex; width: auto; min-width: 280px; }
.excerpt-scene { perspective: 2000px; margin-top: 30px; }
.page {
  position: relative; margin: 0 auto; max-width: 66ch; text-align: left;
  padding: clamp(28px, 6vw, 60px) clamp(22px, 6vw, 66px);
  background: linear-gradient(90deg, rgba(60, 40, 10, .16), transparent 6%), linear-gradient(180deg, #f6efe0, #efe5cf);
  color: #1c1914;
  font-size: clamp(1.18rem, 2.6vw, 1.32rem); line-height: 1.78;
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(230, 201, 138, .25);
  transform-origin: left center;
}
.page p { margin: 0 0 1em; }
.page p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .06em .08em 0 0; color: #8b6a2f; }
.page::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 40%); opacity: 0; }
.js:not(.rm) .page.turning { animation: pageturn 1.1s var(--ease-out); }
.js:not(.rm) .page.turning::after { animation: pageshade 1.1s ease-out; }
@keyframes pageturn { 0% { transform: rotateY(-92deg) skewY(-2deg); opacity: 0; } 30% { opacity: 1; } 70% { transform: rotateY(6deg); } 100% { transform: none; opacity: 1; } }
@keyframes pageshade { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ===================== INDICATIONS SOUS LES LIVRES ==================== */
.book-actions { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; font-family: var(--sans); }
.book-hint { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-400); }
.hint-touch { display: none; }
@media (hover: none) { .hint-click { display: none; } .hint-touch { display: inline; } }
.link-btn {
  min-height: 40px; padding: .4rem .2rem; background: none; border: 0; border-bottom: 1px solid var(--gold-line); cursor: pointer;
  color: var(--gold-200); font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
}
.link-btn:hover, .link-btn:focus-visible { color: var(--gold-100); border-bottom-color: var(--gold-300); }
.link-btn:disabled { opacity: .3; cursor: default; }
.formats-outils { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin: -8px 0 20px; }

/* ========================= FENÊTRE D'APERÇU =========================== */
html { scrollbar-gutter: stable; }
html.modal-ouvert { overflow: hidden; }
.modal { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); }
.modal[open] { display: flex; align-items: center; justify-content: center; }
.modal::backdrop { background: rgba(3, 6, 10, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-inner { position: relative; width: min(1120px, 100%); max-height: 100%; overflow: auto; padding: 60px var(--gutter) 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.modal-close { position: fixed; top: 14px; right: 14px; z-index: 3; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-line); background: rgba(7, 12, 22, .75); color: var(--gold-200); cursor: pointer; }
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover, .modal-close:focus-visible { border-color: var(--gold-300); }
.modal-titre { margin: 0 0 14px; font-size: clamp(1.05rem, 2.4vw, 1.45rem); font-weight: 400; font-style: italic; color: var(--ink-soft); }
.vue { width: 100%; display: flex; flex-direction: column; align-items: center; }
.vue-aide { margin: 10px 0 0; font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; color: var(--ink-mute); }
.vue-choix { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 14px; padding: 4px; border: 1px solid var(--gold-line); border-radius: 999px; }
.vue-choix button { min-height: 40px; padding: .35rem 1rem; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--ink-mute); font-family: var(--sans); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.vue-choix button:hover, .vue-choix button:focus-visible { color: var(--gold-200); }
.vue-choix button[aria-pressed="true"] { color: var(--night-900); background: linear-gradient(180deg, #efd59e, #cfa75b); }
.vue-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; width: min(520px, 100%); }
.vue-actions .btn { flex: 1 1 200px; width: auto; }
.apercu-unit .book-rig.anime { transition: transform .9s var(--ease-out); }
.rm .apercu-unit .book-rig.anime { transition: none; }

/* 1. livre agrandi */
.zoom-stage { position: relative; isolation: isolate; width: 100%; min-height: 56vh; display: grid; place-items: center; touch-action: none; cursor: grab; outline-offset: 6px; user-select: none; }
.zoom-stage::after { content: ""; position: absolute; inset: 0; z-index: 5; background: transparent; cursor: grab; touch-action: none; }
.zoom-stage.is-dragging { cursor: grabbing; }
.zoom-stage.is-dragging::after { cursor: grabbing; }
.vue[data-vue="zoom"] button, .vue[data-vue="zoom"] a { cursor: pointer; }

/* 2. comparaison, même échelle, posés sur la même ligne */
.compare-stage { width: 100%; min-height: 50vh; display: flex; align-items: flex-end; justify-content: center; gap: clamp(28px, 6vw, 84px); padding-top: 24px; }
.cmp-item { margin: 0; display: flex; flex-direction: column; align-items: center; }
.cmp-item .book-unit { padding-bottom: 6px; border-bottom: 1px solid rgba(230, 201, 138, .45); }
.cmp-item figcaption { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; font-family: var(--sans); font-size: .72rem; letter-spacing: .06em; color: var(--ink-soft); }
.cmp-item figcaption b { font-weight: 500; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-300); }
#compare-note { max-width: 48ch; font-family: var(--serif); font-size: 1.05rem; font-style: italic; letter-spacing: 0; color: var(--ink-soft); }

/* 3. feuilletage */
.flip-scene { width: 100%; display: grid; place-items: center; padding: 8px 0 18px; perspective: 2600px; overflow: hidden; }
.flip-book { position: relative; transform-style: preserve-3d; transition: transform .9s var(--ease-out); cursor: pointer; touch-action: pan-y; }
.flip-book.is-double[data-etat="ferme"] { transform: translateX(-25%); }
.flip-book.is-double[data-etat="fin"] { transform: translateX(25%); }
.rm .flip-book { transition: none; }
.leaf { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.45, .05, .25, 1); }
.flip-book.is-double .leaf { left: 50%; width: 50%; }
.leaf.is-turned { transform: rotateY(-180deg); }
.flip-book:not(.is-double) .leaf.is-turned { opacity: 0; transition: transform .95s cubic-bezier(.45, .05, .25, 1), opacity .25s .7s; }
.leaf.no-anim { transition: none; }
.leaf-face { position: absolute; inset: 0; overflow: hidden; container-type: size; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.leaf-face.verso { transform: rotateY(180deg); }
.pg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14cqh 12cqw; text-align: center; background: #f4ecdb; color: #1d1a15; }
.pg p { margin: 0; }
.pg-couverture { padding: 0; background: #0f1a1a; }
.pg-image { padding: 0; background: #fff; }
.pg-teaser .pg-suite { top: 50%; bottom: auto; transform: translateY(-50%); margin: 0; padding: 1.1em 0; font-size: 5.2cqw;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.9) 22%, rgba(255,255,255,.9) 78%, rgba(255,255,255,0)); }
.pg-couverture img, .pg-image img { width: 100%; height: 100%; object-fit: cover; }
.pg-garde { background: linear-gradient(135deg, #16211f, #0f1a1a); }
.pg-blanc { background: #efe6d2; }
.pg-auteur { font-size: 3.4cqw; letter-spacing: .45em; text-transform: uppercase; margin-bottom: 18cqh !important; }
.pg-t1 { font-size: 12cqw; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.pg-t2 { font-size: 7.5cqw; font-style: italic; margin-top: 1.5cqh !important; }
.pg-sous { font-size: 2.8cqw; letter-spacing: .32em; text-transform: uppercase; margin-top: 8cqh !important; color: #6b5a3a; }
.pg-mentions { justify-content: flex-end; align-items: flex-start; text-align: left; gap: .9em; font-size: 3.1cqw; line-height: 1.5; color: #4a4336; }
.pg-dedicace { font-size: 4.6cqw; font-style: italic; }
.pg-note { justify-content: flex-start; padding-top: 18cqh; gap: 6cqh; }
.pg-surtitre { font-size: 3.2cqw; letter-spacing: .32em; text-transform: uppercase; color: #8b6a2f; }
.pg-provisoire { font-size: 3.6cqw; font-style: italic; color: #8e8370; }
.pg-floue { justify-content: flex-start; padding-top: 12cqh; text-align: left; }
.pg-floue-texte { font-size: 3.9cqw; line-height: 1.7; filter: blur(2.8px); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 96%); mask-image: linear-gradient(180deg, #000 55%, transparent 96%); }
.pg-floue-texte p { margin-bottom: 1em; text-indent: 1.4em; }
.pg-suite { position: absolute; left: 0; right: 0; bottom: 9cqh; text-align: center; font-size: 4.2cqw; font-style: italic; color: #8b6a2f; }
/* --- Feuilletage réaliste : feuille 3D en bandes qui se courbe --- */
/* le livre est « plat » (ordre des pages par z-index) mais donne la perspective
   à la feuille qui tourne, elle-même en vraie 3D */
.flip-book.is-courbe { transform-style: flat; perspective: 1900px; cursor: grab; user-select: none; -webkit-user-select: none; }
.flip-book.is-courbe:active { cursor: grabbing; }
.is-courbe .leaf { transition: none; }
.is-courbe:not(.is-double) .leaf.is-turned { opacity: 0; transition: none; }
.leaf-face.feuille { position: absolute; }
.bande { position: absolute; top: 0; left: 0; transform-origin: 0 50%; transform-style: preserve-3d; }
.bande-racine { z-index: 60; will-change: transform; }
.bande-face { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.bande-face.verso { transform: rotateY(180deg); }
.bande-page { position: absolute; top: 0; }
.bande-teinte { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ombre-portee { position: absolute; top: 0; height: 100%; width: 50%; z-index: 40; pointer-events: none; opacity: 0; }
.ombre-d { right: 0; }
.ombre-g { left: 0; }
.flip-book:not(.is-double) .ombre-d { width: 100%; }
.feuille { container-type: size; overflow: hidden; background: #fff; }
.feuille > .pg { position: absolute; inset: 0; }
.feuille::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
/* papier : léger ton crème + ombre du pli vers la reliure, lumière sur le bord */
/* (voiles translucides, sans mode de fusion : fiable dans les contextes 3D) */
.feuille-souple.cote-d::after {
  background:
    linear-gradient(90deg, rgba(58, 44, 24, .3) 0%, rgba(58, 44, 24, .12) 2.6%, rgba(58, 44, 24, .035) 7%, rgba(58, 44, 24, 0) 13%, rgba(58, 44, 24, 0) 95%, rgba(58, 44, 24, .06) 100%),
    linear-gradient(180deg, rgba(236, 214, 170, .1), rgba(214, 190, 140, .16)); }
.feuille-souple.cote-g::after {
  background:
    linear-gradient(270deg, rgba(58, 44, 24, .3) 0%, rgba(58, 44, 24, .12) 2.6%, rgba(58, 44, 24, .035) 7%, rgba(58, 44, 24, 0) 13%, rgba(58, 44, 24, 0) 95%, rgba(58, 44, 24, .06) 100%),
    linear-gradient(180deg, rgba(236, 214, 170, .1), rgba(214, 190, 140, .16)); }
/* couverture rigide : charnière près du dos, léger reflet pelliculé */
.feuille-dure.cote-d::after { background: linear-gradient(90deg, rgba(0, 0, 0, .45) 0%, rgba(255, 255, 255, .1) 1.6%, rgba(0, 0, 0, .12) 3.2%, rgba(0, 0, 0, 0) 7%), linear-gradient(120deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 38%); }
.feuille-dure.cote-g::after { background: linear-gradient(270deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 9%); }
/* tranches du bloc de pages + ombre du livre posé */
.flip-bloc { position: absolute; inset: 0; pointer-events: none; transition: opacity .4s; }
.pile { position: absolute; top: 0; bottom: 0; width: 50%; background: #efe8da; border-radius: 1px; transition: opacity .5s; }
.pile-g { left: 0; box-shadow: -1px 1px 0 #d8cfbb, -2px 2px 0 #f2ecdf, -3px 3px 0 #d3c9b3, 0 22px 46px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .35); }
.flip-book.is-opening-cover .pile-g { opacity: 0; }
.pile-d { right: 0; box-shadow: 1px 1px 0 #d8cfbb, 2px 2px 0 #f2ecdf, 3px 3px 0 #d3c9b3, 4px 4px 0 #efe8da, 5px 5px 0 #d0c5ae, 6px 6px 0 #ebe3d2, 7px 7px 0 #cbbfa6, 0 22px 46px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .35); }
.flip-book[data-etat="ferme"] .pile-g { opacity: 0; }
.flip-book:not(.is-double) .pile-g { display: none; }
.flip-book:not(.is-double) .pile-d { width: 100%; }
.flip-nav { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.flip-pos { min-width: 14ch; font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }

/* =============================== RÉSEAUX ============================== */
.social { max-width: 1080px; margin: 0 auto; text-align: center; padding: clamp(64px, 9vw, 112px) var(--gutter); border-top: 1px solid rgba(230, 201, 138, .12); }
.social h2 { margin-bottom: 12px; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.social-intro { max-width: 48ch; margin: 0 auto 32px; color: var(--ink-soft); font-size: 1.08rem; }
.social-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.social-choice { position: relative; width: 100%; min-height: 76px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; grid-template-rows: auto auto; align-items: center; gap: 2px 12px; padding: 12px 14px; color: var(--ink-soft); text-align: left; font: inherit; text-decoration: none; background: linear-gradient(135deg, rgba(14, 22, 31, .78), rgba(8, 13, 21, .58)); border: 1px solid rgba(230, 201, 138, .18); border-radius: 3px; transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.social-choice:hover, .social-choice:focus-visible { color: var(--gold-100); border-color: rgba(230, 201, 138, .62); background: linear-gradient(135deg, rgba(35, 31, 24, .82), rgba(10, 17, 25, .82)); }
.social-choice:hover { transform: translateY(-2px); }
.social-choice-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; color: var(--gold-300); border: 1px solid var(--gold-line); border-radius: 50%; }
.social-choice-icon svg { width: 16px; height: 16px; }
.social-choice-name { align-self: end; font-family: var(--sans); font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.social-choice-handle { align-self: start; color: var(--ink-mute); font-family: var(--sans); font-size: .73rem; letter-spacing: .04em; }
.social-choice-arrow { grid-column: 3; grid-row: 1 / 3; color: var(--gold-400); font-family: var(--sans); font-size: 1rem; transition: transform .25s ease; }
.social-choice:hover .social-choice-arrow { transform: translate(2px, -2px); }
.rm .social-choice, .rm .social-choice-arrow { transition: none; }
@media (max-width: 700px) { .social-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .social-choice { grid-template-columns: 30px minmax(0, 1fr) 16px; gap: 2px 9px; padding: 10px; }
  .social-choice-icon { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .social-choice, .social-choice-arrow { transition: none; } }

/* ============================= PIED DE PAGE =========================== */
.site-footer { max-width: 1240px; margin: 0 auto; padding: 44px var(--gutter) calc(40px + env(safe-area-inset-bottom)); display: grid; gap: 30px; border-top: 1px solid rgba(230, 201, 138, .18); font-family: var(--sans); }
.site-footer h2 { margin: 0 0 12px; font-family: var(--sans); font-size: .76rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-400); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.footer-links a, .mail { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ink-soft); text-decoration: none; font-size: 1rem; }
.footer-links a:hover, .mail:hover, .footer-links a:focus-visible, .mail:focus-visible { color: var(--gold-200); }
.footer-links svg, .mail svg { width: 18px; height: 18px; color: var(--gold-400); flex: none; }
.site-footer p { margin: 0; }
.mail { word-break: break-all; }
.footer-legal { color: var(--ink-mute); font-size: .8rem; letter-spacing: .06em; }

/* =============================== MOBILE =============================== */
.dock { display: none; }
@media (max-width: 719px) {
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(4, 7, 13, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid rgba(230, 201, 138, .25); transform: translateY(110%); transition: transform .35s var(--ease-out); }
  .rm .dock { transition: none; }
  .dock.is-visible { transform: none; }
  .dock[hidden] { display: none !important; }
  .dock-btn { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: .4rem .6rem; border: 1px solid rgba(230, 201, 138, .6); color: var(--gold-200); font-family: var(--sans); font-size: .82rem; letter-spacing: .06em; text-decoration: none; }
  .dock-btn--gold { color: var(--night-900); background: linear-gradient(180deg, #efd59e, #cfa75b); border-color: transparent; }
  body.has-dock .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) { .site-header .nav-sec { display: none; } }

/* Plan mobile : visage, titre, deux accès de commande */
@media (max-width: 959px) {
  /* Plan mobile : titre, décompte et boutons d'abord, puis le portrait.
     Au défilement, le portrait remonte vers le livre sans croiser le texte. */
  .hero { display: flex; flex-direction: column; }
  .hero-copy { order: 1; padding: 58px var(--gutter) 0; text-align: center; }
  .hero-stage { order: 2; height: 50svh; min-height: 300px; }
  .replay { order: 3; position: relative; top: auto; left: auto; align-self: center; margin-top: -40px; }
  .credit { display: none; }
  .t-kicker { margin-top: 10px; }
  h1 { margin-top: 8px; }
  .countdown { margin: 12px auto 0; padding-top: 8px; max-width: 420px; }
  .cd-timer { justify-content: center; }
  .cd-days .cd-num { font-size: clamp(3rem, 13vw, 4.2rem); }
  .cd-date { justify-content: center; font-size: .95rem; margin-top: 4px; }
  .cd-cal { min-height: 36px; }
  .orders { max-width: 420px; margin: 10px auto 0; gap: 8px; }
  .sign { margin-top: 28px; }
  .order--amazon .via { margin-top: 6px; }
}
@media (min-width: 720px) and (max-width: 959px) {
  .hero-stage { height: 56svh; }
  .orders { grid-template-columns: 1fr 1fr; max-width: 640px; align-items: end; }
  .formats-stage { min-height: 480px; }
}

/* ============================== ORDINATEUR ============================ */
@media (min-width: 960px) {
  .site-header { padding-top: 26px; }
  .hero { height: 100svh; min-height: 680px; }
  /* Plan d'ouverture : buste dézoomé, yeux à ~38 % de la hauteur, à gauche */
  .hero-stage { position: absolute; inset: 0; }
  /* livre 3D centré dans la moitié gauche */
  .hero-slot { left: 24vw; top: 53svh; }
  .replay { top: auto; bottom: 24px; }
  .hero-copy {
    position: absolute; left: 47vw; right: var(--gutter); top: 0; bottom: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: 96px 0 72px;
  }
  .t-main { font-size: clamp(4rem, 8.6vw, 9.6rem); letter-spacing: .06em; margin-right: -.06em; }
  .t-sub { font-size: clamp(2rem, 3.6vw, 3.9rem); padding-left: 2.1em; }
  .countdown { max-width: 520px; margin-left: 3vw; margin-top: 30px; }
  .orders { grid-template-columns: 1.25fr 1fr; align-items: end; max-width: 580px; margin-left: 3vw; margin-top: 26px; }
  .orders .btn { font-size: .92rem; padding: .7rem .8rem; letter-spacing: .03em; }
  .orders .soon { font-size: 1.04rem; }
  .order .via { justify-content: flex-start; }
  .scroll-cue {
    position: absolute; z-index: 6; right: var(--gutter); bottom: 26px;
    display: flex; align-items: center; gap: 14px;
    color: var(--ink-mute); text-decoration: none;
    font-family: var(--sans); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  }
  .scroll-cue i { position: relative; display: block; width: 1px; height: 46px; background: rgba(230, 201, 138, .25); overflow: hidden; }
  .scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-300); }
  .js:not(.rm) .scroll-cue i::after { animation: cue 2.4s ease-in-out infinite; }
  .scroll-cue:hover { color: var(--gold-200); }

  .formats { min-height: 100svh; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; column-gap: 40px; padding: 10vh var(--gutter); max-width: 1440px; margin: 0 auto; }
  .formats { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .formats-stage { min-height: 620px; }
  .formats-info { text-align: left; margin: 0; }
  .formats-info .via { justify-content: flex-start; }
  .amazon-block { margin: 0; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .hero-copy { left: 44vw; }
  .hero-slot { left: 22vw; }
  .countdown, .orders { margin-left: 2vw; }
  .t-sub { padding-left: 1.4em; }
}
@media (min-width: 960px) and (max-height: 760px) {
  .formats-stage { min-height: 520px; }
}
@keyframes cue { 0% { top: -40%; } 60%, 100% { top: 100%; } }
