/* ==========================================================================
   2M Digital — Ebooks : bibliothèque (/ebooks) et landings des guides (/ebooks/<slug>)
   S'appuie sur style.css (titres, chiffres, étapes, FAQ, portrait, encart d'appel)
   et contact.css (champs de formulaire .field).
   ========================================================================== */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Formulaires de demande (traités par js/ebooks.js) ---------- */

.eb-form__note { font-size: 13px; line-height: 1.5; color: var(--label-3); }
button[type="submit"][disabled] { opacity: .6; cursor: progress; }

.book__form .eb-consent { gap: 10px; margin-top: 2px; }
.book__form .eb-consent input { width: 18px; height: 18px; min-height: 0; padding: 0; border: 1.5px solid var(--label-3); border-radius: 6px; background-color: var(--surface-2); }
.book__form .eb-consent input:checked { border-color: var(--yellow); background-color: var(--yellow); }
.book__form .eb-consent input[aria-invalid="true"] { border-color: var(--red); }
.book__form .eb-consent span { font-size: 10.5px; line-height: 1.4; }

/* Formulaire en ligne (encart final des landings) */
.eb-row { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.eb-row__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
.eb-row .field > label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.eb-row .field input { border-radius: 999px; padding-inline: 20px; }
.eb-row .btn { min-height: 56px; }

/* ---------- En-tête réduit des landings ---------- */

.nav--landing { justify-content: space-between; }
.nav__note { margin-left: auto; font-size: 16px; color: var(--label-2); white-space: nowrap; }

/* ==========================================================================
   Bibliothèque
   ========================================================================== */

.eb-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 482px);
  gap: 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 72px;
}
.eb-hero .glow { top: -40px; left: -320px; }
.eb-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0; }
.eb-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.eb-hero__how { color: var(--label); font-size: 17px; }
.eb-hero__how:hover { color: var(--yellow); }

/* Couvertures en éventail */
.eb-fan { display: flex; flex-direction: column; gap: 20px; padding: 28px; }
.eb-fan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eb-fan__count { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.eb-fan__stack { position: relative; display: flex; justify-content: center; align-items: center; height: 300px; border-radius: var(--r-md); background: radial-gradient(circle at 50% 60%, rgba(255, 229, 0, .14), transparent 65%), var(--surface-2); }
.eb-fan__cover { position: absolute; width: 168px; height: auto; aspect-ratio: 919 / 1300; object-fit: cover; border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); transition: transform .3s ease; }
.eb-fan__stack[style*="--n:2"] .eb-fan__cover:nth-child(1) { transform: translateX(-62px) rotate(-7deg); }
.eb-fan__stack[style*="--n:2"] .eb-fan__cover:nth-child(2) { transform: translateX(62px) rotate(6deg); }
.eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(1) { z-index: 2; }
.eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(2) { transform: translateX(-110px) rotate(-9deg) scale(.9); }
.eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(3) { transform: translateX(110px) rotate(9deg) scale(.9); }
.eb-fan:hover [style*="--n:2"] .eb-fan__cover:nth-child(1) { transform: translateX(-70px) rotate(-9deg); }
.eb-fan:hover [style*="--n:2"] .eb-fan__cover:nth-child(2) { transform: translateX(70px) rotate(8deg); }
.eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(1) { transform: translateY(-6px); }
.eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(2) { transform: translateX(-122px) rotate(-11deg) scale(.9); }
.eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(3) { transform: translateX(122px) rotate(11deg) scale(.9); }
.eb-fan__foot { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--label-2); }
.eb-fan__foot .icon { width: 18px; height: 18px; color: var(--green); stroke-width: 2.5; }

/* Filtres par thème */
.eb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.eb-chip { border: 0; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.eb-chip:hover { background: var(--surface-3); }
.eb-chip[aria-pressed="true"] { background: var(--label); color: var(--bg); }

/* Cartes des guides */
.eb-expired { max-width: 760px; margin: 0 auto 32px; padding: 18px 24px; border-radius: var(--r-md); background: rgba(255, 159, 10, .14); color: var(--orange); font-size: 16px; text-align: center; }
.eb-list { display: flex; flex-direction: column; gap: 40px; margin-top: 48px; }
.eb-card { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 40px; align-items: center; padding: 32px; scroll-margin-top: 110px; }
.eb-card[hidden] { display: none; }
.eb-card__cover { display: block; line-height: 0; }
.eb-card__cover img { width: 100%; height: auto; border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: transform .25s ease; }
.eb-card__cover:hover img { transform: translateY(-4px); }
.eb-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
.eb-card__title { font-size: clamp(28px, 3vw, 42px); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
.eb-card__title a:hover { color: var(--yellow); }
.eb-card__text { font-size: 18px; line-height: 1.55; color: var(--label-2); }
.eb-card__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 4px; }
.eb-checks { display: flex; flex-direction: column; gap: 10px; }
.eb-checks li { display: flex; align-items: flex-start; gap: 14px; font-size: 17px; line-height: 1.4; }
.eb-checks .icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; color: var(--green); stroke-width: 2.5; }

/* Trois gestes */
.eb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; }
.eb-steps .step__top { margin-bottom: 4px; }
.eb-step--last { box-shadow: inset 0 0 0 1.5px var(--yellow); }
.eb-steps__cta, .eb-more { display: flex; justify-content: center; margin-top: 40px; }

/* ==========================================================================
   Landings
   ========================================================================== */

/* Hero : texte et bouton à gauche, livre feuilletable à droite (le formulaire est dans le livre) */
.lp-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}
.lp-hero .glow { top: 180px; left: -300px; }
.lp-hero__main { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0; }
.lp-hero__main .btn { margin-top: 4px; }
.lp-hero .lead { max-width: 620px; }
.lp-hero__book { min-width: 0; }
.lp-hero__book .livre { max-width: none; margin-top: 0; scroll-margin-top: 104px; }

/* Double page du sommaire */
.spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 700px; margin-top: 16px; background: #fff; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.spread img { width: 100%; height: auto; }
.spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 40px); width: 80px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .14) 42%, rgba(0, 0, 0, .3) 50%, rgba(0, 0, 0, .1) 58%, transparent); pointer-events: none; }

/* ---------- Livre feuilletable (js/livre.js) : remplace la double page statique ---------- */

.livre { width: 100%; max-width: 720px; margin-top: 16px; }
.livre .spread { margin-top: 0; }
.book__stage { padding-block: 8px 0; }
.book {
  --page-ratio: 595 / 842;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  perspective: 2400px;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.book:active { cursor: grabbing; }
.book:focus-visible { outline: 2px solid var(--yellow); outline-offset: 10px; border-radius: 4px; }
.book--first { transform: translateX(-25%); }
.book--last { transform: translateX(25%); }
.book--single { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
.book--single .book__page--right { display: none; }
.book__page { position: relative; aspect-ratio: var(--page-ratio); }
.book__blank { position: absolute; inset: 0; }
.book__sheet { position: absolute; inset: 0; overflow: hidden; background: #fff; box-shadow: 0 26px 50px rgba(0, 0, 0, .45); }
.book__sheet img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* Creux de la reliure */
.book__sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.book__page--left .book__sheet::after, .book__leaf--left .book__face--front .book__sheet::after, .book__face--back .book__sheet::after {
  background: linear-gradient(90deg, transparent 82%, rgba(0, 0, 0, .1) 94%, rgba(0, 0, 0, .24));
}
.book__page--right .book__sheet::after, .book__leaf--right .book__face--front .book__sheet::after, .book__leaf--left .book__face--back .book__sheet::after {
  background: linear-gradient(270deg, transparent 82%, rgba(0, 0, 0, .1) 94%, rgba(0, 0, 0, .22));
}
.book--single .book__sheet::after, .book__leaf--full .book__sheet::after { background: none; }

/* La feuille qui tourne : recto / verso, ombrée au milieu du mouvement */
.book__leaf { position: absolute; top: 0; bottom: 0; z-index: 3; width: 50%; transform-style: preserve-3d; will-change: transform; }
.book__leaf[hidden] { display: none; }
.book__leaf--right { left: 50%; transform-origin: left center; }
.book__leaf--left { left: 0; transform-origin: right center; }
.book__leaf--full { left: 0; width: 100%; transform-origin: left center; }
.book__face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.book__face--back { transform: rotateY(180deg); }
.book__face::after { content: ""; position: absolute; inset: 0; z-index: 1; opacity: var(--shade, 0); pointer-events: none; }
.book__face--front::after { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08)); }
.book__face--back::after { background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08)); }
.book__leaf--left .book__face--front::after { background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08)); }
.book__leaf--left .book__face--back::after { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08)); }

/* Page du formulaire : on a atteint la limite des pages libres */
.book__sheet--gate { display: flex; align-items: center; padding: clamp(18px, 8%, 36px); background: var(--surface); color: var(--label); cursor: auto; box-shadow: 0 26px 50px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.book__sheet--gate::after { display: none; }
.book__form { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.book__lock { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--yellow); color: var(--on-yellow); }
.book__lock .icon { width: 22px; height: 22px; }
.book__form .book__lock { width: 36px; height: 36px; margin-bottom: 2px; border-radius: 9px; }
.book__form .book__lock .icon { width: 19px; height: 19px; }
.book__gate-title { font-size: clamp(16px, 2.6vw, 20px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.book__gate-text { margin-bottom: 2px; font-size: 14px; line-height: 1.4; color: var(--label-2); }
.book__form input {
  min-height: 39px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--label);
  font: inherit;
  font-size: 16px;
}
.book__form input::placeholder { color: var(--label-3); }
.book__form input:focus { outline: none; border-color: var(--yellow); }
.book__form input[aria-invalid="true"] { border-color: var(--red); }
.book__form .btn { min-height: 44px; margin-top: 4px; padding: 0 16px; font-size: 16px; }
.book__form .form__error { font-size: 13px; line-height: 1.35; }
.book__form .eb-done__title { font-size: 19px; }
.book__form .eb-done p { font-size: 15px; }

/* Pages suivantes : verrouillées */
.book__sheet--locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.book__lines { position: absolute; inset: 14% 12% auto; display: flex; flex-direction: column; gap: 16px; opacity: .7; filter: blur(1.5px); }
.book__lines span { height: 8px; border-radius: 4px; background: #dcdce0; }
.book__lines span:nth-child(3n) { width: 64%; }
.book__lines span:nth-child(4n + 1) { width: 86%; }
.book__sheet--locked .book__lock { position: relative; background: #000; color: var(--yellow); }
.book__locked-text { position: relative; padding: 0 16px; font-size: 14px; font-weight: 600; color: #3a3a3c; text-align: center; }

/* Commandes sous le livre */
.book__bar { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.book__nav { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--label); cursor: pointer; transition: background-color .15s ease, opacity .15s ease; }
.book__nav:hover:not(:disabled) { background: var(--surface-3); }
.book__nav:disabled { opacity: .35; cursor: default; }
.book__nav .icon { width: 20px; height: 20px; stroke-width: 2.25; }
.book__status { min-width: 180px; font-size: 15px; font-weight: 500; color: var(--label-2); text-align: center; font-variant-numeric: tabular-nums; }
.book__hint { margin-top: 8px; font-size: 13px; color: var(--label-3); text-align: center; }
.book__full { margin-left: 8px; }
.book__close { display: none; }

/* Plein écran : le livre occupe tout l'écran, fond noir (API Fullscreen, ou couverture de l'écran sur iPhone) */
.livre.livre--plein {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: #000;
  overflow: hidden;
}
.livre--plein .book__stage { width: 100%; padding: 0; }
.livre--plein .book { width: min(calc(100vw - 64px), calc((100vh - 120px) * 1.413)); max-width: none; margin-inline: auto; }
.livre--plein .book--single { width: min(calc(100vw - 32px), calc((100vh - 120px) * .7067)); }
@supports (height: 100dvh) {
  .livre--plein .book { width: min(calc(100vw - 64px), calc((100dvh - 120px) * 1.413)); }
  .livre--plein .book--single { width: min(calc(100vw - 32px), calc((100dvh - 120px) * .7067)); }
}
.livre--plein .book__bar { margin-top: 20px; }
.livre--plein .book__hint { display: none; }
.livre--plein .book__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--label);
  cursor: pointer;
}
.livre--plein .book__close .icon { width: 20px; height: 20px; }
.livre--plein .book__close:hover { background: var(--surface-3); }
html.livre-ouvert, html.livre-ouvert body { overflow: hidden; }
html.livre-ouvert .site-header, html.livre-ouvert .mbar { visibility: hidden; }

.lp-head { margin-bottom: 40px; }
.lp-head__lead { font-size: 18px; }
.section-head.lp-head .title { margin-bottom: 0; }

.lp-problem { display: flex; flex-direction: column; gap: 40px; }
.lp-problem__text { max-width: 1020px; font-size: clamp(22px, 2.3vw, 31px); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.lp-problem__text .muted { color: var(--label-2); }

/* Sommaire en listes groupées */
.lp-group { padding: 0 20px 10px; }
.lp-toc + .lp-group { margin-top: 36px; }
.lp-toc .list__row { padding: 18px 24px; --sep-left: 84px; }
.lp-toc .list__title { font-size: 19px; font-weight: 500; }
.lp-toc .list__desc { font-size: 16px; }
.lp-toc > .list__row > .pill { flex-shrink: 0; }
.lp-num { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-err__of { font-size: 13px; color: var(--label-3); }
.lp-errs .list__row { gap: 16px; }

/* Cartes « ce que contient le guide » */
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-feature { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px; }
.lp-feature .tile { margin-bottom: 8px; }
.lp-feature__name { font-size: 24px; font-weight: 600; line-height: 1.25; }
.lp-feature p { font-size: 16px; line-height: 1.5; color: var(--label-2); }

/* Test des 5 secondes */
.lp-tests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-test { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.lp-test__num { font-size: 32px; font-weight: 700; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.lp-test p { font-size: 17px; line-height: 1.6; }
.lp-note { position: relative; margin-top: 24px; padding: 22px 28px 22px 46px; font-size: 17px; font-weight: 600; line-height: 1.45; }
.lp-note::before { content: ""; position: absolute; left: 28px; top: 24px; bottom: 24px; width: 4px; border-radius: 2px; background: var(--yellow); }

/* Aperçus de l'intérieur */
.peeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.peek { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; }
.peek__title { font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.peek__title q { quotes: "« " " »"; }
.peek__item { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); }
.peek__item .eyebrow { font-size: 12px; }
.peek__item-title { font-size: 17px; font-weight: 600; line-height: 1.35; }
.peek__small { font-size: 15px; line-height: 1.5; color: var(--label-2); }
.peek__dl { display: flex; flex-direction: column; gap: 8px; }
.peek__dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
.peek__dl dt { padding-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--label-3); }
.peek__dl dd { font-size: 15px; line-height: 1.45; }
.peek .ok { color: var(--green); }
.peek__list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.peek__num { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); }
.peek__num > span { flex-shrink: 0; min-width: 18px; font-size: 32px; font-weight: 700; line-height: 1; color: var(--yellow); }
.peek__num > p { padding-top: 4px; font-size: 16px; line-height: 1.45; }
.peek__foot { font-size: 14px; color: var(--label-3); }
.peek__by { position: relative; padding-left: 16px; font-size: 16px; font-weight: 600; }
.peek__by::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 2px; background: var(--yellow); }
.peek__checks { display: flex; flex-direction: column; gap: 14px; }
.peek__checks li { display: flex; align-items: flex-start; gap: 14px; font-size: 16px; line-height: 1.45; }
.peek__box { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--label-2); border-radius: 6px; }

/* Auteur */
.lp-quote { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 28px; }
.lp-quote__text { font-size: 22px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }

/* Encart final avec formulaire en ligne */
.lp-final { gap: 28px; }
.lp-final .lead { max-width: 660px; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .lp-hero { gap: 40px; }
  .eb-row__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eb-row__fields .btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 1024px) {
  .eb-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .eb-fan { max-width: 482px; }
  .eb-card { grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
  .lp-hero { grid-template-columns: minmax(0, 1fr); padding-top: 56px; padding-bottom: 72px; }
  .lp-hero__book .livre { max-width: 720px; }
  .lp-features, .lp-tests, .peeks, .eb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .eb-card { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .eb-card__cover { max-width: 240px; }
  .eb-row__fields { grid-template-columns: minmax(0, 1fr); }
  .eb-row__fields .btn { justify-self: stretch; }
  .lp-features, .lp-tests, .peeks, .eb-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-toc .list__row > .pill { margin-left: 60px; }
  .lp-group { padding-inline: 4px; }
}

@media (max-width: 640px) {
  .nav__note { display: none; }
  .nav--landing .nav__cta { margin-left: auto; }
  .eb-hero { padding-top: 32px; padding-bottom: 48px; }
  .eb-fan { padding: 20px; }
  .eb-fan__stack { height: 240px; }
  .eb-fan__cover { width: 130px; }
  .eb-fan__stack[style*="--n:2"] .eb-fan__cover:nth-child(1), .eb-fan:hover [style*="--n:2"] .eb-fan__cover:nth-child(1) { transform: translateX(-48px) rotate(-7deg); }
  .eb-fan__stack[style*="--n:2"] .eb-fan__cover:nth-child(2), .eb-fan:hover [style*="--n:2"] .eb-fan__cover:nth-child(2) { transform: translateX(48px) rotate(6deg); }
  .eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(1), .eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(1) { transform: none; }
  .eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(2), .eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(2) { transform: translateX(-74px) rotate(-9deg) scale(.88); }
  .eb-fan__stack[style*="--n:3"] .eb-fan__cover:nth-child(3), .eb-fan:hover [style*="--n:3"] .eb-fan__cover:nth-child(3) { transform: translateX(74px) rotate(9deg) scale(.88); }
  .eb-chips { justify-content: flex-start; }
  .eb-chip { font-size: 15px; }
  .eb-list { gap: 24px; margin-top: 32px; }
  .lp-hero { padding-top: 32px; padding-bottom: 48px; gap: 32px; }
  .lp-feature, .lp-test, .peek, .lp-quote { padding: 22px; }
  .lp-toc .list__row { padding: 16px 18px; }
  .lp-note { padding: 20px 20px 20px 36px; }
  .lp-note::before { left: 20px; top: 20px; bottom: 20px; }
  .peek__dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .book__bar { gap: 8px; }
  .book__status { min-width: 0; flex: 1; font-size: 14px; }
  .book__full { margin-left: 0; }
}

/* ==========================================================================
   Lecture privée (/ebooks/lire, lien de l'email) : le guide entier en grand
   ========================================================================== */

[data-lire-pdf][hidden], [data-lire-livre][hidden], [data-lire-erreur][hidden] { display: none; }
.lire-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 28px; padding-bottom: 28px; text-align: center; }
.lire-head .glow { top: -300px; right: max(-160px, (100% - 1440px) / 2); }
/* Le livre occupe la largeur disponible sans dépasser la hauteur de l'écran (double page A4 : 2 × 595 / 842) */
.livre--lecture { max-width: min(1200px, max(560px, calc((100vh - 330px) * 1.413))); margin: 0 auto; }
.livre--lecture .book__stage { padding-top: 0; }
.livre--lecture .book__bar { margin-top: 20px; }
.livre--lecture .book--single { max-width: min(100%, 520px); }
.lire-loading { padding: 120px 0; color: var(--label-2); text-align: center; }
.lire-error { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 640px; margin: 0 auto; padding: 48px 32px; text-align: center; }
.lire-error__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); color: var(--label-2); }
.lire-error__icon .icon { width: 28px; height: 28px; }
.lire-error__title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.lire-error p { font-size: 17px; line-height: 1.55; color: var(--label-2); }

@media (max-width: 640px) {
  .lire-head { padding-top: 20px; padding-bottom: 20px; }
}

/* Très petits écrans : la page du formulaire du livre garde la place pour la case de consentement */
@media (max-width: 370px) {
  .book__gate-text { display: none; }
}
