/* ============================================================
   LE PASSEUR DE RÊVES — Rubrique Contes (hub + fiches tomes)
   Chargé par page-passeur-contes.php et passeur-part-conte-fiche.php
   Design : Claude Design « Fiches Contes » (4a/4b, 1b/3a, 2a/3b)
============================================================ */

:root {
  /* Design system du site (header, footer, menu mobile) */
  --night:       #0D1B2A;
  --cream:       #FAF6EF;
  --text:        #1C1C1C;
  --orange:      #F4732A;
  --orange-dark: #D95F1A;
  --gold:        #C9A84C;
  --gold-light:  #E2C97E;
  --white-warm:  #F5F0E8;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Source Sans 3', sans-serif;
  --font-ui:     'Montserrat', sans-serif;
  --radius:      4px;

  /* Rubrique Contes — communs */
  --paper:       #F3EADB;
  --paper-dark:  #EADFCB;
  --page:        #FBF7F0;
  --ink-text:    #3B302B;
  --ink-muted:   #6B5E55;
  --rule-light:  #C9BBA4;
  --rule-soon:   #B9A98F;
  --amber:       #E6B565;
  --copper:      #C2683B;
  --ivory:       #F3E8D2;
  --authors-dk:  #D6CCBC;
  --buy:         #F07A2B;
  --buy-hover:   #D2601A;

  --f-garamond:  'EB Garamond', Garamond, Georgia, serif;
  --f-lora:      'Lora', Georgia, serif;
  --f-mont:      'Montserrat', sans-serif;

  --gutter:      clamp(24px, 8.6vw, 110px);
  --header-h:    88px;
}

/* Palettes par tome (s'appliquent au body ou à une section) */
.theme-t1 {
  --nav: #0B1E36; --nav-line: #1C3558;
  --dark: #102948; --ink: #2A4A6B;
  --on-dark-2: #B9C3D2; --on-dark-rule: #3C5575; --on-dark-text: #D6DDE8;
}
.theme-t2 {
  --nav: #1E0C22; --nav-line: #3A1C3E;
  --dark: #321536; --ink: #6E3355;
  --on-dark-2: #D8C6D6; --on-dark-rule: #5E3A63; --on-dark-text: #E4D6E2;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-lora);
  color: var(--ink-text);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
p { text-wrap: pretty; }
h2 { text-wrap: balance; }

/* ============================================================
   HEADER / MENU MOBILE (repris des pages du site, fond au ton du tome)
============================================================ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav, #0B1E36);
  border-bottom: 1px solid var(--nav-line, #1C3558);
  padding: 0 2rem; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 1.1rem; text-decoration: none; }
.logo-icon { height: 80px; display: flex; align-items: center; flex-shrink: 0; padding: 5px 0; }
.logo-icon img { height: 100%; width: auto; object-fit: contain; display: block; border-radius: 8px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text .top { font-family: var(--font-ui); font-size: .6rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.logo-text .main { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; color: var(--white-warm); letter-spacing: .01em; }
nav { display: flex; align-items: center; gap: 2.5rem; }
nav a {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--white-warm); text-decoration: none; opacity: .85;
  transition: opacity .2s, color .2s;
}
nav a:hover { opacity: 1; color: var(--gold-light); }
nav a.active { color: var(--amber); opacity: 1; }
.nav-cta {
  background: var(--orange) !important; color: #fff !important; opacity: 1 !important;
  padding: .45rem 1.1rem; border-radius: var(--radius); font-size: .75rem !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--orange-dark) !important; }

.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: .4rem; flex-direction: column; gap: 5px; flex-shrink: 0; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--amber); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--nav, var(--night)); z-index: 98;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-ui); font-size: 1.1rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--white-warm); text-decoration: none; transition: color .2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--gold-light); }
.btn-primary {
  display: inline-flex; align-items: center; gap: .6rem; background: var(--orange); color: #fff !important;
  font-family: var(--font-ui); font-size: .88rem; font-weight: 600; letter-spacing: .04em;
  padding: .9rem 2.2rem; border-radius: var(--radius); text-decoration: none;
}
.mobile-menu .btn-primary { margin-top: 1rem; font-size: .95rem; padding: .9rem 2.4rem; }

/* ============================================================
   FOOTER (repris des pages du site)
============================================================ */
footer { background: var(--night); border-top: 1px solid rgba(201,168,76,.15); padding: 3.5rem 2rem 2.5rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 3rem; flex-wrap: wrap;
  margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(245,240,232,.08);
}
.footer-brand .tagline { font-family: var(--font-sans); font-size: .88rem; font-style: italic; color: rgba(245,240,232,.45); margin-top: .8rem; max-width: 240px; line-height: 1.5; }
.footer-links { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-ui); font-size: .65rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { font-family: var(--font-sans); font-size: .88rem; color: rgba(245,240,232,.55); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--white-warm); }
.footer-social-item { display: flex; flex-direction: column; gap: .5rem; }
.footer-social-label { font-family: var(--font-sans); font-size: .88rem; color: rgba(255,255,255,.55); }
.footer-social-icons { display: flex; gap: .6rem; }
.footer-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); transition: background .2s, color .2s; text-decoration: none; }
.footer-social-btn:hover { background: var(--gold); color: var(--night); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-legal { font-family: var(--font-ui); font-size: .7rem; color: rgba(245,240,232,.25); letter-spacing: .05em; }

/* ============================================================
   ÉLÉMENTS COMMUNS CONTES
============================================================ */
main.contes { padding-top: var(--header-h); }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.inner { max-width: 1060px; margin: 0 auto; }

.label {
  font-family: var(--f-garamond); font-size: 16px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink);
}
.on-dark .label, .label.amber { color: var(--amber); }

.filet { display: flex; align-items: center; gap: 14px; color: var(--copper); }
.filet::before, .filet::after { content: ''; width: 60px; height: 1px; background: currentColor; }
.filet span { font-size: 14px; line-height: 1; }
.on-dark .filet { color: var(--amber); }
.etoile { color: var(--copper); font-size: 20px; line-height: 1; }

.btn-buy {
  display: inline-block; background: var(--buy); color: #fff; text-decoration: none;
  font-family: var(--f-mont); font-size: 14px; font-weight: 700;
  padding: 16px 28px; border-radius: 2px; transition: background .2s; text-align: center;
}
.btn-buy:hover { background: var(--buy-hover); color: #fff; }
.btn-line {
  display: inline-block; border: 1px solid var(--amber); color: var(--amber); text-decoration: none;
  font-family: var(--f-garamond); font-size: 19px; padding: 12px 22px; border-radius: 2px;
  transition: color .2s, border-color .2s; text-align: center;
}
.btn-line:hover { color: var(--ivory); border-color: var(--ivory); }
.link-text {
  align-self: flex-start; font-family: var(--f-garamond); font-size: 20px;
  color: var(--amber); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px;
  transition: color .2s;
}
.link-text:hover { color: var(--ivory); }

.m-only { display: none; }
.nw { white-space: nowrap; }

/* ============================================================
   FICHE — HERO
============================================================ */
.f-hero { background: var(--dark); padding-top: 90px; padding-bottom: 100px; }
.f-hero-grid {
  max-width: 1060px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,500px); gap: 70px; align-items: center;
}
.f-hero-text { display: flex; flex-direction: column; gap: 22px; }
.f-hero .label { font-size: 17px; }
.f-hero h1 {
  font-family: var(--f-garamond); font-weight: 500; font-size: 72px; line-height: 1;
  letter-spacing: .02em; color: var(--ivory); font-variant: small-caps;
}
.f-authors { font-family: var(--f-garamond); font-size: 19px; letter-spacing: .14em; color: var(--authors-dk); font-variant: small-caps; }
.f-accroche { font-family: var(--f-garamond); font-style: italic; font-size: 27px; line-height: 1.4; color: var(--ivory); max-width: 520px; text-wrap: pretty; }
.f-ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.f-meta { font-family: var(--f-garamond); font-size: 16px; color: var(--on-dark-2); letter-spacing: .04em; }
.f-cover { width: 100%; aspect-ratio: 1; display: block; box-shadow: 0 40px 80px rgba(0,0,0,.6), 14px 0 0 -4px var(--nav); }
.f-filet-m { display: none; }

/* ============================================================
   FICHE — RÉSUMÉ
============================================================ */
.f-resume { padding-top: 100px; padding-bottom: 100px; display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.f-resume h2 { font-family: var(--f-garamond); font-weight: 500; font-size: 42px; line-height: 1.2; color: var(--ink); max-width: 760px; }
.f-resume-txt { display: flex; flex-direction: column; gap: 18px; max-width: 680px; text-align: left; }
.f-resume-txt p { font-size: 19px; line-height: 1.8; }

/* ============================================================
   FICHE — FEUILLETER
============================================================ */
.f-feuilleter { background: var(--paper-dark); padding-top: 90px; padding-bottom: 90px; display: flex; flex-direction: column; align-items: center; gap: 44px; scroll-margin-top: var(--header-h); }
.f-feuilleter-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.f-feuilleter-head h2 { font-family: var(--f-garamond); font-weight: 500; font-size: 40px; line-height: 1.2; color: var(--ink); }
.f-legende { font-size: 17px; font-style: italic; color: var(--ink-muted); }
.f-double {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 920px; box-shadow: 0 30px 60px rgba(40,30,20,.35);
}
.f-double img { width: 100%; aspect-ratio: 1; display: block; }
.f-double::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: calc(50% - 20px); width: 40px;
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.22) 50%, rgba(0,0,0,0));
}
.f-page-row { display: flex; gap: 40px; align-items: flex-start; max-width: 920px; width: 100%; }
.f-page {
  flex: 0 0 460px; min-height: 460px; background: var(--page);
  box-shadow: 0 18px 40px rgba(40,30,20,.22); padding: 44px 48px;
}
.f-page p { font-size: 14px; line-height: 1.6; text-align: justify; hyphens: auto; }
.f-page p + p { text-indent: 1.5em; margin-top: .4em; }
.f-page-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-family: var(--f-garamond); font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--copper);
}
.f-page-label::after { content: ''; flex: 1; height: 1px; background: var(--rule-light); }
.lettrine { float: left; font-family: var(--f-garamond); font-size: 70px; line-height: .8; color: var(--copper); padding: 5px 8px 0 0; }
.f-encart { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-top: 24px; }
.f-encart h3 { font-family: var(--f-garamond); font-weight: 400; font-size: 30px; line-height: 1.25; color: var(--ink); margin-bottom: 4px; }
.f-lecture { list-style: none; display: flex; flex-direction: column; }
.f-lecture li { position: relative; padding: 11px 0 11px 26px; border-bottom: 1px dotted var(--rule-light); font-size: 16px; line-height: 1.6; }
.f-lecture li:first-child { border-top: 1px dotted var(--rule-light); }
.f-lecture li::before { content: '✦'; position: absolute; left: 0; top: 13px; font-size: 13px; color: var(--copper); }
.f-lecture-note { font-size: 15px; font-style: italic; line-height: 1.6; color: var(--ink-muted); margin-top: 6px; }

/* ============================================================
   FICHE — SOMMAIRE / PRÉFACE / LE LIVRE
============================================================ */
.f-sommaire-sec { padding-top: 100px; }
.f-sommaire-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 80px; align-items: center; }
.f-montage img { width: 100%; height: auto; display: block; }
.f-montage figcaption { font-size: 14px; font-style: italic; color: var(--ink-muted); text-align: center; margin-top: 10px; }
/* Montage : apparition douce, une seule fois, à l'entrée dans l'écran (classe .anim posée par passeur-contes.js) */
.anim .f-montage img { opacity: 0; transform: scale(1.04); filter: blur(10px); transition: opacity 1.5s ease, transform 2s ease, filter 1.5s ease; }
.anim .f-montage.is-vu img { opacity: 1; transform: none; filter: none; }
/* édition brochée : montage en niveaux de gris (approximation des illustrations noir et blanc) */
body[data-edition="brochee"] .f-montage img, body[data-edition="brochee"] .f-montage.is-vu img { filter: grayscale(1) contrast(1.05); }
.anim body[data-edition="brochee"] .f-montage:not(.is-vu) img { filter: grayscale(1) blur(10px); }
@media (prefers-reduced-motion: reduce) { .anim .f-montage img { opacity: 1; transform: none; transition: none; } }
.f-contenu { padding-top: 90px; padding-bottom: 100px; }
.f-contenu-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 90px; align-items: start; }
.f-col { display: flex; flex-direction: column; gap: 26px; }
/* ordinaux (103e) : exposant qui ne décale pas l'interligne */
.contes sup { font-size: .62em; line-height: 0; vertical-align: super; font-variant: normal; text-transform: none; }
.f-sommaire { list-style: none; display: flex; flex-direction: column; }
.f-sommaire li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px dotted var(--rule-light); font-size: 17px; }
.f-sommaire .rom { flex: none; font-family: var(--f-garamond); font-size: 18px; color: var(--copper); width: 34px; }
.f-preface { border-left: 2px solid var(--ink); padding: 4px 0 4px 26px; display: flex; flex-direction: column; gap: 18px; }
.f-preface blockquote { font-family: var(--f-garamond); font-style: italic; font-size: 22px; line-height: 1.5; text-wrap: pretty; display: flex; flex-direction: column; gap: 14px; }
.f-preface .a-vous { font-family: var(--f-garamond); font-style: italic; font-size: 26px; color: var(--copper); }
.f-preface cite { font-style: italic; font-size: 15px; color: var(--ink-muted); }
.f-livre { display: flex; flex-direction: column; }
.f-livre .label { margin-bottom: 10px; }
.f-livre dl { display: flex; flex-direction: column; }
.f-livre .row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dotted var(--rule-light); font-size: 15px; }
.f-livre dt { color: var(--ink-muted); }
.f-livre dd { text-align: right; }

/* ============================================================
   FICHE — PRIX
============================================================ */
.f-prix { background: var(--dark); padding-top: 80px; padding-bottom: 80px; }
.f-prix-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; }
.f-prix-grid.solo { grid-template-columns: minmax(0,1fr); }
.prix-box { border: 1px solid var(--on-dark-rule); padding: 34px; display: flex; flex-direction: column; gap: 16px; }
.prix-box .label { font-size: 15px; }
.prix-box .prix { font-family: var(--f-garamond); font-size: 44px; line-height: 1.1; color: var(--ivory); }
.prix-box p { font-size: 15px; color: var(--on-dark-2); }
.prix-box .btn-buy { align-self: flex-start; padding: 15px 28px; }

/* Pack (masqué tant que PASSEUR_CONTES_PACK_ID = 0) */
.pack-covers { position: relative; flex: none; width: 150px; height: 150px; }
.pack-covers img { position: absolute; width: 116px; height: 116px; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.pack-covers img:first-child { left: 34px; top: 0; }
.pack-covers img:last-child  { left: 0; top: 34px; }
.pack-box { border: 1px solid var(--amber); padding: 34px; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 28px; align-items: center; }
.pack-box > div:last-child { display: flex; flex-direction: column; gap: 12px; }
.pack-box .label { font-size: 15px; }
.pack-box .prix { font-family: var(--f-garamond); font-size: 40px; line-height: 1.1; color: var(--ivory); }
.pack-box .btn-buy { align-self: flex-start; padding: 13px 22px; }

/* ============================================================
   FICHE — AUTEURS
============================================================ */
.f-auteurs { padding-top: 90px; padding-bottom: 90px; }
.f-auteurs-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 60px; }
.f-auteurs .label.m-only { margin-bottom: 0; }
.auteur { display: flex; gap: 24px; align-items: center; }
.auteur img {
  flex: none; width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--rule-light), 0 0 0 6px var(--paper), 0 0 0 7px var(--amber);
}
.auteur img.jm { object-position: 50% 20%; }
.auteur div { display: flex; flex-direction: column; gap: 6px; }
.auteur a { font-family: var(--f-garamond); font-size: 26px; color: var(--ink); text-decoration: none; }
.auteur a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auteur p { font-size: 16px; line-height: 1.6; }

/* ============================================================
   FICHE — RENVOI VERS L'AUTRE TOME
============================================================ */
.f-renvoi { background: var(--dark); padding-top: 80px; padding-bottom: 80px; }
.f-renvoi-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 70px; align-items: center; }
.f-renvoi-txt { display: flex; flex-direction: column; gap: 16px; }
.f-renvoi-titre { font-family: var(--f-garamond); font-size: 52px; line-height: 1.05; color: var(--ivory); font-variant: small-caps; }
.f-renvoi-txt p { font-size: 18px; line-height: 1.7; color: var(--on-dark-text); max-width: 520px; }
.f-renvoi img { width: 300px; aspect-ratio: 1; display: block; box-shadow: 0 30px 60px rgba(0,0,0,.5); }

/* ============================================================
   HUB — PAGE CONTES
============================================================ */
.h-hero { position: relative; overflow: hidden; background: var(--dark); padding-top: 90px; padding-bottom: 100px; }
.h-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 75% 50%, rgba(230,181,101,.10) 0%, transparent 60%); }
.h-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.h-hero-grid { position: relative; z-index: 1; max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,480px); gap: 60px; align-items: center; }
.h-hero-text { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.h-hero .label { font-size: 17px; }
.h-hero h1 { font-family: var(--f-garamond); font-weight: 500; font-size: 72px; line-height: 1; letter-spacing: .02em; color: var(--ivory); font-variant: small-caps; }
.h-hero p { font-family: var(--f-garamond); font-style: italic; font-size: 25px; line-height: 1.45; color: var(--ivory); }
.h-hero .btn-line { margin-top: 8px; }
.h-hero-covers { position: relative; height: 480px; }
.h-hero-cover { position: absolute; width: 300px; display: block; transition: transform .35s ease; }
.h-hero-cover img { width: 100%; aspect-ratio: 1; display: block; box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.h-hero-cover.c1 { left: 0; top: 170px; transform: rotate(-5deg); z-index: 2; }
.h-hero-cover.c2 { right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.h-hero-cover.c1:hover { transform: rotate(-3deg) translateY(-8px); }
.h-hero-cover.c2:hover { transform: rotate(3deg) translateY(-8px); z-index: 3; }

.h-intro { padding-top: 100px; padding-bottom: 80px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.h-intro .label { font-size: 17px; }
.h-intro h1 { font-family: var(--f-garamond); font-weight: 500; font-size: 64px; line-height: 1.05; color: var(--ink); font-variant: small-caps; }
.h-intro p { font-family: var(--f-garamond); font-style: italic; font-size: 25px; line-height: 1.45; max-width: 720px; text-wrap: balance; }

.h-collection { padding-top: 90px; padding-bottom: 100px; scroll-margin-top: var(--header-h); }
.h-collection .inner, .h-soon .inner { display: flex; flex-direction: column; gap: 40px; }
.h-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 40px; border-bottom: 1px solid var(--rule-light); padding-bottom: 18px; }
.h-col-head > div { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.h-col-head h2 { font-family: var(--f-garamond); font-weight: 500; font-size: 44px; line-height: 1.1; color: var(--ink); font-variant: small-caps; }
.h-col-head .sous { font-size: 17px; font-style: italic; color: var(--ink-muted); }
.h-col-head h2.h-col-titre { font-variant: normal; font-size: 42px; line-height: 1.15; }
.h-col-head .etat { font-family: var(--f-garamond); font-size: 16px; letter-spacing: .18em; text-transform: uppercase; color: var(--copper); white-space: nowrap; }
.h-col-intro { font-size: 18px; line-height: 1.7; color: var(--ink-text); max-width: 780px; margin-top: -12px; }

.h-cards { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 80px; }
.h-card { background: var(--dark); padding: 44px; display: flex; flex-direction: column; gap: 22px; }
.h-card > a:first-child { display: block; }
.h-card img { width: 100%; aspect-ratio: 1; display: block; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.h-card .label { font-size: 15px; margin-top: 8px; }
.h-card-titre { font-family: var(--f-garamond); font-size: 42px; line-height: 1.05; color: var(--ivory); font-variant: small-caps; }
.h-card-titre a { color: inherit; text-decoration: none; }
.h-card p { font-size: 17px; line-height: 1.7; color: var(--on-dark-text); }
.h-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--on-dark-rule); }
.h-card-prix { display: flex; flex-direction: column; gap: 2px; }
.h-card-prix strong { font-family: var(--f-garamond); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--ivory); }
.h-card-prix span { font-size: 14px; color: var(--on-dark-2); }

.h-pack { border: 1px solid var(--amber); background: var(--paper-dark); padding: 30px 40px; display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 36px; align-items: center; }
.h-pack .pack-covers { width: 150px; height: 120px; }
.h-pack .pack-covers img { width: 92px; height: 92px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.h-pack .pack-covers img:first-child { left: 40px; }
.h-pack .pack-covers img:last-child { top: 28px; }
.h-pack-txt { display: flex; flex-direction: column; gap: 6px; }
.h-pack-txt .label { font-size: 15px; }
.h-pack-txt p { font-size: 17px; line-height: 1.6; }
.h-pack-achat { display: flex; align-items: center; gap: 26px; }
.h-pack-achat .prix { font-family: var(--f-garamond); font-size: 40px; color: var(--ink); }
.h-pack-achat .btn-buy { padding: 15px 26px; }

.h-soon { background: var(--paper-dark); padding-top: 90px; padding-bottom: 100px; scroll-margin-top: var(--header-h); }
.h-soon .h-col-head h2 { font-size: 40px; }
.h-soon-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; }
.h-soon-box { border: 1px solid var(--rule-soon); padding: 56px 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.h-soon-texte { font-size: 17px; line-height: 1.7; max-width: 360px; }
.h-soon-lien { font-family: var(--f-garamond); font-size: 19px; color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.h-soon-lien:hover { color: var(--copper); }
.h-soon-box .etoile { font-size: 18px; }
.h-soon-box h3 { font-family: var(--f-garamond); font-weight: 400; font-size: 40px; line-height: 1.1; color: var(--ink); font-variant: small-caps; }
.h-soon-box span { font-family: var(--f-garamond); font-size: 15px; letter-spacing: .22em; color: var(--ink-muted); }

/* ============================================================
   RESPONSIVE — bascule mobile à 900px
============================================================ */
@media (max-width: 1100px) {
  .f-hero-grid { grid-template-columns: minmax(0,1fr) minmax(0,420px); gap: 50px; }
  .f-hero h1 { font-size: 60px; }
  .f-page { flex-basis: 420px; min-height: 420px; padding: 38px 40px; }
  .f-contenu-grid { gap: 60px; }
}

@media (max-width: 900px) {
  nav { display: none; }
  .menu-btn { display: flex; }
  header { padding: 0 1.25rem; }

  .d-only { display: none; }
  .m-only { display: revert; }
  .label { font-size: 14px; }
  .filet::before, .filet::after { width: 44px; }
  .filet { gap: 12px; }
  .filet span { font-size: 12px; }
  .etoile { font-size: 18px; }
  .btn-line { font-size: 19px; padding: 12px; }
  .btn-buy { font-size: 15px; padding: 16px; }

  /* Hero : colonne centrée, couverture sous le label */
  .f-hero { padding-top: 40px; padding-bottom: 48px; }
  .f-hero-grid { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
  .f-hero-text { display: contents; }
  .f-hero .label { order: 1; font-size: 14px; }
  .f-cover-wrap { order: 2; width: min(290px, 100%); margin: 8px 0 12px; }
  .f-cover { box-shadow: 0 26px 50px rgba(0,0,0,.6), 10px 0 0 -3px var(--nav); }
  .f-hero h1 { order: 3; font-size: 46px; }
  .f-authors { order: 4; font-size: 17px; letter-spacing: .12em; }
  .f-filet-d { display: none; }
  .f-filet-m { display: flex; order: 5; }
  .f-accroche { order: 6; font-size: 23px; }
  .f-ctas { order: 7; flex-direction: column; align-items: stretch; align-self: stretch; gap: 12px; }
  .f-ctas .btn-buy { padding: 17px; }
  .f-meta { order: 8; font-size: 15px; line-height: 1.5; letter-spacing: .03em; }

  .f-resume { padding-top: 56px; padding-bottom: 56px; gap: 22px; }
  .f-resume h2 { font-size: 31px; }
  .f-resume-txt { gap: 16px; }
  .f-resume-txt p { font-size: 17px; line-height: 1.75; }

  .f-feuilleter { padding-top: 52px; padding-bottom: 52px; gap: 28px; }
  .f-feuilleter-head { gap: 8px; }
  .f-feuilleter-head h2 { font-size: 28px; }
  .f-legende { font-size: 15px; }
  .f-double { max-width: 342px; box-shadow: 0 20px 40px rgba(40,30,20,.35); }
  .f-double::after { left: calc(50% - 12px); width: 24px; }
  .f-page-row { flex-direction: column; align-items: center; gap: 28px; }
  .f-page { flex: none; width: 100%; max-width: 342px; min-height: 0; padding: 28px 26px; box-shadow: 0 14px 30px rgba(40,30,20,.22); }
  .f-page p { font-size: 15px; line-height: 1.65; }
  .lettrine { font-size: 64px; padding: 5px 7px 0 0; }
  .f-encart { padding-top: 0; gap: 12px; align-self: stretch; }
  .f-encart h3 { font-size: 24px; }
  .f-lecture li { font-size: 15px; padding: 10px 0 10px 24px; }
  .f-lecture li::before { top: 12px; }
  .f-lecture-note { font-size: 14px; }

  /* Ordre mobile : Montage → Sommaire → Préface → Le livre */
  .f-sommaire-sec { padding-top: 56px; }
  .f-sommaire-grid { display: flex; flex-direction: column; gap: 30px; }
  .f-montage { width: 100%; max-width: 400px; margin: 0 auto; }
  .f-contenu { padding-top: 48px; padding-bottom: 56px; }
  .f-contenu-grid { display: flex; flex-direction: column; gap: 48px; }
  .f-col-preface { gap: 18px; }
  .f-col-sommaire { gap: 14px; }
  .f-sommaire li { gap: 12px; padding: 10px 0; font-size: 16px; line-height: 1.4; }
  .f-sommaire .rom { font-size: 17px; }
  .f-preface { padding: 2px 0 2px 20px; gap: 14px; }
  .f-preface blockquote { font-size: 19px; }
  .f-preface .a-vous { font-size: 22px; }
  .f-preface cite { font-size: 14px; }
  .f-livre .row { flex-direction: column; gap: 2px; padding: 9px 0; }
  .f-livre dt { font-size: 13px; }
  .f-livre dd { text-align: left; font-size: 15px; }

  .f-prix { padding-top: 48px; padding-bottom: 48px; }
  .f-prix-grid, .f-prix-grid.solo { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .prix-box { padding: 26px 22px; gap: 12px; }
  .prix-box .label { font-size: 14px; letter-spacing: .2em; }
  .prix-box .prix { font-size: 40px; }
  .prix-box p { line-height: 1.5; }
  .prix-box .btn-buy { align-self: stretch; margin-top: 4px; }
  .pack-box { padding: 26px 22px; grid-template-columns: 110px minmax(0,1fr); gap: 16px 20px; }
  .pack-covers { width: 110px; height: 110px; }
  .pack-covers img { width: 84px; height: 84px; }
  .pack-covers img:first-child { left: 26px; }
  .pack-covers img:last-child { top: 26px; }
  .pack-box .prix { font-size: 36px; }
  .pack-box .btn-buy { grid-column: 1 / -1; align-self: stretch; }
  .pack-box > div:last-child { display: contents; }

  .f-auteurs { padding-top: 52px; padding-bottom: 52px; }
  .f-auteurs-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .auteur { gap: 18px; }
  .auteur img { width: 84px; height: 84px; box-shadow: 0 0 0 1px var(--rule-light), 0 0 0 5px var(--paper), 0 0 0 6px var(--amber); }
  .auteur div { gap: 4px; }
  .auteur a { font-size: 23px; }
  .auteur p { font-size: 15px; line-height: 1.55; }

  .f-renvoi { padding-top: 52px; padding-bottom: 60px; }
  .f-renvoi-grid { display: flex; flex-direction: column-reverse; align-items: center; gap: 26px; text-align: center; }
  .f-renvoi-txt { align-items: center; }
  .f-renvoi-titre { font-size: 36px; }
  .f-renvoi-txt p { font-size: 16px; line-height: 1.65; }
  .f-renvoi img { width: 200px; }
  .link-text { align-self: center; font-size: 19px; }

  /* Hub */
  .h-hero { padding-top: 48px; padding-bottom: 56px; }
  .h-hero-grid { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .h-hero-text { align-items: center; text-align: center; gap: 16px; }
  .h-hero .label { font-size: 14px; }
  .h-hero h1 { font-size: 46px; }
  .h-hero p { font-size: 21px; }
  .h-hero .btn-line { align-self: stretch; }
  .h-hero-covers { height: auto; aspect-ratio: 1.1; width: min(100%, 360px); margin: 0 auto; }
  .h-hero-cover { width: 64%; }
  .h-hero-cover.c1 { top: 27%; }
  .h-hero-cover:hover { transform: none; }
  .h-collection { padding-top: 52px; }
  .h-intro { padding-top: 56px; padding-bottom: 44px; gap: 16px; }
  .h-intro h1 { font-size: 44px; }
  .h-intro p { font-size: 21px; }
  .h-collection { padding-bottom: 52px; }
  .h-collection .inner, .h-soon .inner { gap: 24px; }
  .h-col-head { flex-direction: column; gap: 4px; padding-bottom: 14px; }
  .h-col-head > div { flex-direction: column; gap: 4px; }
  .h-col-head h2 { font-size: 34px; }
  .h-col-head .sous { font-size: 15px; }
  .h-col-head h2.h-col-titre { font-size: 31px; }
  .h-col-head .etat { display: none; }
  .h-col-intro { font-size: 16px; line-height: 1.65; margin-top: -4px; }
  .h-cards { grid-template-columns: minmax(0,1fr); gap: 40px; }
  .h-card { padding: 26px 22px; gap: 14px; }
  .h-card img { box-shadow: 0 20px 40px rgba(0,0,0,.55); }
  .h-card .label { font-size: 14px; margin-top: 6px; }
  .h-card-titre { font-size: 32px; }
  .h-card p { font-size: 16px; line-height: 1.65; }
  .h-card-foot { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 14px; }
  .h-card-prix { flex-direction: row; align-items: baseline; gap: 10px; }
  .h-card-prix strong { font-size: 28px; }
  .h-card-prix span { font-size: 13px; }
  .h-pack { grid-template-columns: 110px minmax(0,1fr); padding: 24px 22px; gap: 16px 20px; }
  .h-pack .pack-covers { width: 110px; height: 110px; }
  .h-pack .pack-covers img { width: 84px; height: 84px; }
  .h-pack .pack-covers img:first-child { left: 26px; }
  .h-pack .pack-covers img:last-child { top: 26px; }
  .h-pack-achat { grid-column: 1 / -1; justify-content: space-between; gap: 16px; }
  .h-pack-achat .prix { font-size: 36px; }
  .h-soon { padding-top: 48px; padding-bottom: 56px; }
  .h-soon .h-col-head h2 { font-size: 32px; }
  .h-soon-grid { grid-template-columns: minmax(0,1fr); grid-auto-rows: 1fr; gap: 20px; }
  .h-soon-box { padding: 34px 22px; gap: 12px; }
  .h-soon-box h3 { font-size: 30px; }
  .h-soon-texte { font-size: 16px; }
  .h-soon-box span { font-size: 14px; }

  .footer-top { flex-direction: column; }
}

/* ============================================================
   ÉDITIONS — sélecteur « Choisir votre édition »
============================================================ */
.f-editions { padding-top: 70px; padding-bottom: 80px; background: var(--paper); scroll-margin-top: var(--header-h); }
.f-editions-inner { max-width: 1060px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.prix-editions { display: flex; flex-direction: column; gap: 24px; }

.ed-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.ed-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 26px 24px 24px; background: var(--page); border: 1px solid var(--rule-light);
  cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ed-card:hover { border-color: var(--copper); }
.ed-card[aria-checked="true"] { border: 2px solid var(--copper); padding: 25px 23px 23px; box-shadow: 0 14px 30px rgba(40,30,20,.14); }
.ed-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ed-radio {
  position: absolute; top: 22px; right: 22px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--rule-light); background: transparent;
}
.ed-card[aria-checked="true"] .ed-radio { border-color: var(--copper); }
.ed-card[aria-checked="true"] .ed-radio::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--copper);
}
.ed-nom { font-family: var(--f-garamond); font-size: 26px; line-height: 1.15; color: var(--ink); padding-right: 30px; }
.ed-illus { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-text); }
.ed-illus::before {
  content: ''; flex: none; width: 13px; height: 13px; border-radius: 50%;
  background: conic-gradient(#C2683B, #E6B565, #6E9A5B, #2A4A6B, #6E3355, #C2683B);
}
.ed-illus.is-nb::before { background: linear-gradient(90deg, #2B2B2B 50%, #E8E8E8 50%); border: 1px solid #8a8a8a; }
.ed-detail { font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.ed-prix { margin-top: auto; padding-top: 8px; font-family: var(--f-garamond); font-size: 32px; line-height: 1.1; color: var(--ink); }
.ed-livraison { font-size: 13px; color: var(--ink-muted); }
.ed-accroche { font-family: var(--f-garamond); font-size: 17px; color: var(--copper); }
.ed-accroche.is-vide { visibility: hidden; }
@media (max-width: 900px) { .ed-accroche.is-vide { display: none; } }
.ed-card.is-off { cursor: not-allowed; opacity: .55; }
.ed-card.is-off:hover { border-color: var(--rule-light); }
.ed-card.is-off .ed-prix { font-style: italic; font-size: 24px; }

.ed-action { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ed-recap { display: none; }
.ed-buy { padding: 16px 30px; }

/* Variante fond sombre (bloc d'achat du bas) */
.ed-selector--bas .ed-card { background: transparent; border-color: var(--on-dark-rule); }
.ed-selector--bas .ed-card:hover { border-color: var(--amber); }
.ed-selector--bas .ed-card[aria-checked="true"] { border-color: var(--amber); box-shadow: none; }
.ed-selector--bas .ed-card[aria-checked="true"] .ed-radio { border-color: var(--amber); }
.ed-selector--bas .ed-card[aria-checked="true"] .ed-radio::after { background: var(--amber); }
.ed-selector--bas .ed-radio { border-color: var(--on-dark-rule); }
.ed-selector--bas .ed-card:focus-visible { outline-color: var(--ivory); }
.ed-selector--bas .ed-nom, .ed-selector--bas .ed-prix { color: var(--ivory); }
.ed-selector--bas .ed-illus { color: var(--on-dark-text); }
.ed-selector--bas .ed-detail, .ed-selector--bas .ed-livraison { color: var(--on-dark-2); }
.ed-selector--bas .ed-accroche { color: var(--amber); }
.ed-selector--bas .ed-recap { color: var(--on-dark-text); }

/* Tableau « Le livre » : lignes propres à l'édition sélectionnée */
body[data-edition="reliee"]  .ed-only:not(.ed-reliee),
body[data-edition="brochee"] .ed-only:not(.ed-brochee),
body[data-edition="ebook"]   .ed-only:not(.ed-ebook) { display: none; }

/* Aperçu couleur / noir et blanc */
.f-nb-toggle {
  margin-top: -20px; background: none; border: none; border-bottom: 1px solid currentColor;
  padding: 2px 0; cursor: pointer; font-family: var(--f-garamond); font-size: 18px; color: var(--ink);
}
.f-nb-toggle:hover { color: var(--copper); }
.f-nb-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (max-width: 900px) {
  .f-editions { padding-top: 44px; padding-bottom: 52px; }
  .ed-cards { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .ed-card { padding: 20px 18px 18px; }
  .ed-card[aria-checked="true"] { padding: 19px 17px 17px; }
  .ed-nom { font-size: 23px; }
  .ed-prix { font-size: 28px; }
  .ed-action { flex-direction: column; align-items: stretch; gap: 12px; }
  .ed-buy { text-align: center; padding: 17px; }
  /* Bas de fiche : simple rappel de l'édition choisie + bouton */
  .ed-selector--bas .ed-cards { display: none; }
  .ed-selector--bas .ed-recap { display: block; font-size: 17px; line-height: 1.5; }
  .ed-selector--bas .ed-recap strong { font-family: var(--f-garamond); font-weight: 400; font-size: 24px; color: var(--ivory); }
  .f-nb-toggle { margin-top: -12px; }
}
