﻿/* ============================================================
   clairelit.fr — CSS principal
   Base: lekturyfrfr design system (navy · terracotta · sand · paper)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --navy:            #1F3A4F;
  --navy-deep:       #14283A;
  --terracotta:      #C9522E;
  --terracotta-deep: #A8401F;
  --sand:            #D4B582;
  --sand-soft:       #E8D9BA;
  --paper:           #FBF9F4;
  --paper-tint:      #F4EFE6;
  --white:           #FFFFFF;
  --ink:             #1A1A1A;
  --ink-soft:        #3A3A3A;
  --muted:           #6B6B6B;
  --line:            #E6E1D6;
  --line-soft:       #EFEAE0;

  /* Aliases legacy utilisées dans les templates PHP */
  --hl-ink:          #1A1A1A;
  --hl-ink-soft:     #3A3A3A;
  --hl-muted:        #6B6B6B;
  --hl-rose:         #D4B582;
  --hl-rose-deep:    #C9522E;
  --hl-sage:         #5a6a52;
  --hl-cream:        #FBF9F4;
  --hl-line:         #E6E1D6;
  --hl-line-soft:    #EFEAE0;
  --coral:           #C9522E;
  --fun-bg:          #fffbea;
  --fun-border:      #f0d060;

  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-sans:  "Inter", system-ui, -apple-system, sans-serif;

  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;
  --container: 1240px;
  --nav-w: 264px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 500;
  color: var(--navy-deep);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ══════════════════════════════════════════════════════════
   HEADER (home page)
   ══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px; gap: 40px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; text-decoration: none;
}
.brand__mark { width: 44px; height: 44px; object-fit: contain; }
.brand__name {
  font-family: var(--f-serif);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--navy-deep); line-height: 1;
}
.brand__name em { font-style: italic; color: var(--terracotta); font-weight: 500; }
.nav {
  display: flex; gap: 36px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
}
.nav a {
  position: relative; padding: 6px 0;
  color: var(--ink-soft); transition: color .15s;
}
.nav a:hover { color: var(--navy-deep); }
.nav a.is-active { color: var(--navy-deep); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--terracotta);
}
.header__cta { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; transition: all .15s ease;
  white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--navy-deep); color: var(--white); }
.btn--primary:hover { background: var(--navy); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy-deep); }
.btn--terra { background: var(--terracotta); color: white; }
.btn--terra:hover { background: var(--terracotta-deep); }
.btn--big { padding: 14px 26px; font-size: 15px; }

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px; align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600; margin-bottom: 28px;
}
.hero__eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--terracotta); }
.hero h1 {
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.98; letter-spacing: -0.025em; margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.hero__lead {
  font-size: 19px; line-height: 1.55; color: var(--ink-soft);
  max-width: 520px; margin-bottom: 36px;
}
.hero__search {
  display: flex; align-items: center;
  background: var(--white); border: 1.5px solid var(--navy-deep);
  border-radius: 999px; padding: 6px 6px 6px 22px;
  max-width: 520px;
  box-shadow: 0 1px 0 var(--paper-tint), 0 8px 20px -16px rgba(31,58,79,0.3);
}
.hero__search svg { color: var(--navy); flex-shrink: 0; }
.hero__search input {
  flex: 1; border: 0; outline: 0;
  padding: 12px 14px; font-family: inherit;
  font-size: 15px; background: transparent; color: var(--ink);
}
.hero__search input::placeholder { color: var(--muted); }
.hero__stats { display: flex; gap: 40px; margin-top: 36px; }
.hero__stat strong {
  display: block; font-family: var(--f-serif);
  font-size: 36px; font-weight: 500; color: var(--navy-deep); line-height: 1;
}
.hero__stat span {
  font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
}

/* Hero art card */
.hero__art {
  position: relative; aspect-ratio: 4/5;
  border-radius: var(--radius-l); overflow: hidden;
  background: var(--paper-tint);
  box-shadow: 0 30px 60px -40px rgba(31,58,79,0.4);
}
.hero__art-inner {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 40px;
}
.hero__art-quote {
  font-family: var(--f-serif); font-style: italic;
  font-size: 30px; line-height: 1.2; color: var(--navy-deep);
}
.hero__art-quote::before {
  content: "\201C"; display: block; font-size: 90px; line-height: 0.6;
  color: var(--terracotta); margin-bottom: 12px;
}
.hero__art-attrib {
  font-family: var(--f-sans); font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 18px;
}
.hero__art-decor {
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--terracotta); opacity: 0.85; z-index: 0;
}
.hero__art-decor-2 {
  position: absolute; right: 30px; bottom: -50px;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--navy-deep); z-index: 0;
}
.hero__art-decor-3 {
  position: absolute; left: -30px; bottom: 60px;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--sand); z-index: 0;
}

/* ══════════════════════════════════════════════════════════
   TAPE MARQUEE
   ══════════════════════════════════════════════════════════ */
.tape {
  background: var(--navy-deep); color: var(--paper);
  padding: 18px 0; overflow: hidden; white-space: nowrap;
}
.tape__track {
  display: inline-flex; gap: 56px;
  animation: marquee 60s linear infinite;
  font-family: var(--f-serif); font-style: italic;
  font-size: 22px; letter-spacing: 0.02em;
}
.tape__track span { display: inline-flex; align-items: center; gap: 56px; }
.tape__dot { width: 6px; height: 6px; background: var(--terracotta); border-radius: 50%; display: inline-block; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════ */
.section { padding: 96px 0; }
.section--alt { background: var(--paper); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px; gap: 40px;
}
.section__head h2 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -0.02em; max-width: 720px; }
.section__head h2 em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.section__sub { font-size: 16px; color: var(--ink-soft); max-width: 360px; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600; margin-bottom: 18px;
}
.section__eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--terracotta); }

/* ══════════════════════════════════════════════════════════
   CARDS (grille 4 colonnes)
   ══════════════════════════════════════════════════════════ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.card { cursor: pointer; transition: transform .2s ease; text-decoration: none; display: block; }
.card:hover { transform: translateY(-4px); }
.card__cover {
  position: relative; aspect-ratio: 3/4;
  border-radius: var(--radius-m); overflow: hidden;
  margin-bottom: 16px; background: var(--paper-tint);
  box-shadow: 0 16px 30px -24px rgba(31,58,79,0.35);
}
.card__title {
  font-family: var(--f-serif); font-size: 21px; font-weight: 500;
  color: var(--navy-deep); letter-spacing: -0.01em; margin-bottom: 4px; line-height: 1.15;
}
.card__author { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.card__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
}
.card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--sand); display: inline-block; }

/* ══════════════════════════════════════════════════════════
   ÉPOQUE GRID
   ══════════════════════════════════════════════════════════ */
.epoki {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.epoka {
  padding: 36px 28px; border-right: 1px solid var(--line);
  cursor: pointer; transition: background .15s;
  text-decoration: none; color: inherit; display: block;
}
.epoka:nth-child(4n) { border-right: 0; }
.epoka:nth-child(n+5) { border-top: 1px solid var(--line); }
.epoka:hover { background: var(--paper); }
.epoka__num { font-family: var(--f-serif); font-size: 13px; letter-spacing: 0.06em; color: var(--terracotta); margin-bottom: 18px; }
.epoka__name { font-family: var(--f-serif); font-size: 26px; font-weight: 500; color: var(--navy-deep); letter-spacing: -0.01em; margin-bottom: 6px; }
.epoka__count { font-size: 13px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.epoka__count::after { content: "→"; transition: transform .15s; }
.epoka:hover .epoka__count::after { transform: translateX(4px); }

/* ══════════════════════════════════════════════════════════
   FEATURES STRIP
   ══════════════════════════════════════════════════════════ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.feature { padding: 40px 36px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature__icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--paper-tint); margin-bottom: 22px; color: var(--terracotta);
}
.feature h3 { font-size: 22px; margin-bottom: 8px; font-weight: 500; }
.feature p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ══════════════════════════════════════════════════════════
   BOOK DETAIL — hero + body
   ══════════════════════════════════════════════════════════ */
.detail-hero {
  position: relative; padding: 56px 0 64px;
  background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden;
}
.detail-hero__grid {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 56px; align-items: flex-start;
}
.detail-cover {
  position: relative; aspect-ratio: 3/4;
  border-radius: var(--radius-m); overflow: hidden;
  box-shadow: 0 30px 50px -30px rgba(31,58,79,0.5);
}
.crumbs {
  font-size: 13px; color: var(--muted); margin-bottom: 18px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy-deep); }
.crumbs .sep { color: var(--sand); }
.detail-meta { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tag {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 600; display: inline-block;
}
.tag--terra { background: var(--terracotta); color: white; border-color: var(--terracotta); }
.tag--navy  { background: var(--navy-deep); color: white; border-color: var(--navy-deep); }
.detail-title {
  font-family: var(--f-serif);
  font-size: clamp(36px, 5vw, 64px);
  margin-bottom: 12px; letter-spacing: -0.02em; line-height: 1.05;
}
.detail-title em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.detail-author {
  font-family: var(--f-serif); font-size: 22px; font-style: italic;
  color: var(--ink-soft); margin-bottom: 28px;
}
.detail-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 24px; padding: 24px 28px;
  background: var(--white); border-radius: var(--radius-m);
  border: 1px solid var(--line); margin-bottom: 26px;
}
.fact__label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
.fact__value { font-family: var(--f-serif); font-size: 18px; color: var(--navy-deep); font-weight: 500; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tabs */
.tabs {
  position: sticky; top: 84px; z-index: 20;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs__inner { display: flex; gap: 4px; overflow-x: auto; }
.tab {
  background: transparent; border: 0;
  padding: 18px 4px; margin-right: 28px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  white-space: nowrap; border-bottom: 2px solid transparent;
  transition: all .15s; font-family: inherit;
}
.tab:hover { color: var(--navy-deep); }
.tab.is-active { color: var(--navy-deep); border-bottom-color: var(--terracotta); }
.tab__num { font-family: var(--f-serif); color: var(--sand); margin-right: 6px; font-size: 12px; }
.tab.is-active .tab__num { color: var(--terracotta); }

/* Detail body */
.detail-body { padding: 64px 0 96px; }
.detail-body__grid {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 80px; align-items: flex-start;
}

/* Prose */
.prose { font-size: 18px; line-height: 1.8; color: var(--ink-soft); min-width: 0; }
.prose h2 { font-family: var(--f-serif); font-size: 38px; font-weight: 500; margin: 0 0 8px; color: var(--navy-deep); }
.prose h2 em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.prose .lead {
  font-family: var(--f-serif); font-style: italic;
  font-size: 21px; line-height: 1.5; color: var(--navy-deep);
  margin: 24px 0 32px; padding-left: 20px; border-left: 2px solid var(--terracotta);
}
.prose h3 { font-family: var(--f-serif); font-size: 26px; margin: 40px 0 14px; color: var(--navy-deep); }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--navy-deep); font-weight: 600; }
.prose ul { padding-left: 20px; margin-bottom: 18px; }
.prose li { margin-bottom: 8px; font-size: 18px; line-height: 1.8; }
.prose blockquote {
  border-left: 2px solid var(--terracotta); padding-left: 20px; margin: 1.2em 0;
  font-family: var(--f-serif); font-style: italic; font-size: 20px; line-height: 1.45; color: var(--navy-deep);
}

/* Aside */
.aside { position: sticky; top: 92px; }
.aside__card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 24px; margin-bottom: 20px;
}
.aside__card h4 {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 14px;
}
.aside__list { list-style: none; padding: 0; margin: 0; }
.aside__list li {
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  color: var(--ink-soft);
}
.aside__list li:last-child { border-bottom: 0; }
.aside__list li.is-active { color: var(--navy-deep); font-weight: 600; }
.aside__list a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; width: 100%; }
.aside__list a:hover { color: var(--navy-deep); }
.aside__list .num { font-family: var(--f-serif); color: var(--terracotta); font-style: italic; font-size: 16px; width: 22px; flex-shrink: 0; }

/* ── Article page layout ─────────────────────────────── */
.site-header--article .site-header__inner { justify-content: space-between; gap: 16px; }
.header-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: color .15s;
}
.header-back:hover { color: var(--navy-deep); }
.article-container { padding-top: 40px; padding-bottom: 80px; }

/* ── Aside TOC ───────────────────────────────────────── */
.aside__toc { list-style: none; padding: 0; margin: 0; }

.aside__item {
  display: flex; position: relative;
  border-bottom: 1px solid var(--line-soft);
}
.aside__item:last-child { border-bottom: 0; }
.aside__item a {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 0; font-size: 13px; color: var(--ink-soft);
  text-decoration: none; transition: color .15s;
}
.aside__item a:hover { color: var(--navy-deep); }
.aside__item .num {
  font-family: var(--f-serif); font-style: italic;
  color: var(--terracotta); font-size: 15px;
  width: 20px; flex-shrink: 0; text-align: right;
}
.aside__item--sub a { padding-left: 4px; font-size: 12.5px; color: var(--muted); }
.aside__item--sub a:hover { color: var(--navy-deep); }

.aside__item.is-active { background: none; }
.aside__item.is-active a { color: var(--navy-deep); font-weight: 600; }
.aside__item.is-active::before {
  content: ''; position: absolute; left: -24px; top: 0; bottom: 0;
  width: 3px; background: var(--terracotta); border-radius: 0 2px 2px 0;
}

/* Check indicator — hidden until .done */
.aside__check { margin-left: auto; flex-shrink: 0; color: transparent; transition: color .2s; }
.aside__item.done .aside__check { color: #4caf50; }
.aside__item.done a { color: var(--muted); }
.aside__item.done.is-active a { color: var(--navy-deep); }

/* Quiz item */
.aside__item--quiz a {
  background: var(--fun-bg); border: 1px solid var(--fun-border);
  border-radius: var(--radius-s); padding: 9px 10px; font-weight: 600;
  margin-top: 4px; color: #7a5c00;
}
.aside__item--quiz a:hover { background: #fff8d6; }
.aside__item--quiz .num { color: #c49a00; }
.aside__item--quiz { border-bottom: 0; }

/* Section label (header for multi-chapter primary sections) */
.aside__section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); padding: 10px 0 4px;
  border-bottom: 0;
}

/* Collapse wrapper */
.aside__collapse { list-style: none; border-bottom: 1px solid var(--line-soft); }
.aside__collapse:last-child { border-bottom: 0; }

.aside__collapse-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 9px 0; background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  font-family: inherit; text-align: left; transition: color .15s;
}
.aside__collapse-toggle:hover { color: var(--navy-deep); }
.aside__collapse-toggle span:first-child { flex: 1; }
.aside__collapse-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--line-soft); border-radius: 999px;
  padding: 1px 7px; line-height: 18px;
}
.aside__chevron { transition: transform .2s; flex-shrink: 0; }
.aside__collapse--open .aside__chevron { transform: rotate(180deg); }

.aside__sub { list-style: none; padding: 0 0 4px 0; margin: 0; }

/* Progress bar */
.aside__progress { margin-top: 16px; display: flex; align-items: center; gap: 10px; }
.aside__progress-bar {
  flex: 1; height: 4px; background: var(--line);
  border-radius: 999px; overflow: hidden;
}
.aside__progress-fill {
  height: 100%; width: 0%; background: var(--terracotta);
  border-radius: 999px; transition: width .4s ease;
}
.aside__progress-label { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* ── Aside mobile header (close button row) ─────────────── */
.aside__mobile-header {
  display: none; align-items: center; justify-content: space-between;
  padding: 16px 0 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.aside__mobile-title { font-size: 15px; font-weight: 700; color: var(--navy-deep); }
.aside__close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--paper-tint);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  cursor: pointer; color: var(--ink-soft);
}
.aside__close-btn:hover { color: var(--navy-deep); background: var(--line-soft); }

/* ── Mobile progress strip (below fixed header) ─────────── */
.mobile-progress-strip {
  display: none; position: fixed; top: 60px; left: 0; right: 0;
  z-index: 199; height: 3px; background: var(--line);
}
.mobile-progress-strip__fill {
  height: 100%; width: 0%; background: var(--terracotta);
  border-radius: 0 999px 999px 0; transition: width .4s ease;
}

/* ── Mobile TOC bottom bar ───────────────────────────────── */
.mobile-toc-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 285; background: var(--white); border-top: 1px solid var(--line);
  padding: 10px 20px 10px; align-items: center; justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0,0,0,.07);
}
.mobile-toc-bar__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy-deep); color: var(--white); border: 0;
  border-radius: var(--radius-m); padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.mobile-toc-bar__progress { font-size: 13px; color: var(--muted); }

/* ── Mobile TOC backdrop ─────────────────────────────────── */
.mobile-toc-backdrop {
  display: none; position: fixed; inset: 0; z-index: 290;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
}
.mobile-toc-backdrop.visible { display: block; }

/* ══════════════════════════════════════════════════════════
   COVER — classes CSS pour les couvertures procédurales
   ══════════════════════════════════════════════════════════ */
.cv { position: absolute; inset: 0; }
.cv-shape { position: absolute; border-radius: 50%; }
.cv-text { position: absolute; bottom: 22px; left: 22px; right: 22px; z-index: 3; }
.cv-text .t {
  font-family: var(--f-serif); font-style: italic;
  font-size: 24px; line-height: 1.05; color: var(--white);
  letter-spacing: -0.01em; text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.cv-text .t.dark { color: var(--navy-deep); text-shadow: none; }
.cv-text .a {
  font-family: var(--f-sans); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); margin-top: 8px;
}
.cv-text .a.dark { color: var(--ink-soft); }
.cv-tag {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--f-serif); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255,255,255,0.65); z-index: 3;
}
.cv-tag.dark { color: var(--ink-soft); }
.cv-num {
  position: absolute; top: 18px; left: 22px;
  font-family: var(--f-serif); font-size: 11px; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.55); z-index: 3;
}
.cv-num.dark { color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   FOOTER (dark, 4 colonnes)
   ══════════════════════════════════════════════════════════ */
.footer {
  background: var(--navy-deep); color: var(--paper);
  padding: 80px 0 36px; margin-top: 0;
}
.footer .container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
.footer__brand .brand__name { color: var(--white); }
.footer__brand .brand__name em { color: var(--sand); }
.footer__about { font-size: 14px; line-height: 1.6; color: rgba(251,249,244,0.6); max-width: 320px; margin-top: 20px; }
.footer h5 {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--sand); font-weight: 600; margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 5px 0; }
.footer ul a { font-size: 14px; color: rgba(251,249,244,0.7); transition: color .15s; }
.footer ul a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(251,249,244,0.5); flex-wrap: wrap; gap: 16px;
}

/* Legacy simple footer (page.php, 404.php) */
.site-footer {
  background: var(--navy-deep); color: rgba(251,249,244,.6);
  padding: 40px 32px; display: flex; align-items: center; gap: 32px; font-size: 13px;
}
.site-footer__links { display: flex; gap: 24px; margin-left: auto; }
.site-footer__links a { color: rgba(251,249,244,.6); transition: color .15s; }
.site-footer__links a:hover { color: var(--white); }
.site-logo { display: inline-flex; align-items: center; }

/* ══════════════════════════════════════════════════════════
   PHP — HEADER (variante livre avec sidebar)
   ══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft); transition: transform 0.25s ease;
}
.site-header.header--hidden { transform: translateY(-100%); }
.site-nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; font-weight: 500; }
.site-nav a { color: var(--ink-soft); transition: color .15s; }
.site-nav a:hover { color: var(--navy-deep); }
.site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  height: 72px; display: flex; align-items: center; gap: 40px;
}
.site-header--book .site-header__inner {
  max-width: 1280px; padding: 0 32px 0 0; gap: 0;
}
.site-header--book .brand {
  width: var(--nav-w); flex-shrink: 0; padding: 14px 0;
  display: flex; align-items: center;
}
.header-progress {
  flex: 1; display: flex; align-items: center; gap: 14px;
  padding: 0 24px; transition: opacity .3s ease;
}
.header-progress__title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.header-progress__track { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 80px; }
.header-progress__fill  { height: 100%; background: var(--terracotta); border-radius: 3px; width: 0; transition: width .5s ease; }
.header-progress__count { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; min-width: 40px; }

/* ══════════════════════════════════════════════════════════
   PHP — BOOK LAYOUT (sidebar + content)
   ══════════════════════════════════════════════════════════ */
.book-layout {
  display: grid; grid-template-columns: var(--nav-w) 1fr;
  min-height: calc(100vh - 72px); max-width: 1280px; margin: 0 auto;
}
.book-content { padding: 40px 56px 80px; min-width: 0; }

/* ── Chapter nav ─────────────────────────────────────────── */
.chapter-nav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 24px 0 40px; border-right: 1px solid var(--line);
  background: var(--paper-tint);
  display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.chapter-nav::-webkit-scrollbar { width: 4px; }
.chapter-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.chapter-nav__book-title {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.chapter-nav__book-title a { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; text-decoration: none; }
.chapter-nav__book-title a:hover { color: var(--terracotta); }
.chapter-nav__book-author { font-size: 11px; color: var(--muted); }
.chapter-nav__section-head {
  font-size: 10px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 16px 4px;
}
.chapter-nav__group { display: flex; flex-direction: column; }
.chapter-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 16px; text-decoration: none; color: var(--ink-soft);
  font-size: 13.5px; line-height: 1.35; transition: background .12s, color .12s;
  border-left: 2px solid transparent; margin: 0 0 1px;
}
.chapter-nav__item:hover { background: var(--line-soft); color: var(--ink); }
.chapter-nav__item.active { background: var(--white); color: var(--ink); border-left-color: var(--terracotta); font-weight: 600; }
.chapter-nav__item.done .chapter-nav__check { opacity: 1; color: var(--hl-sage); }
.chapter-nav__item.done .chapter-nav__title { color: var(--muted); }
.chapter-nav__num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--line); color: var(--muted); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s;
}
.chapter-nav__item.active .chapter-nav__num { background: var(--terracotta); color: var(--white); }
.chapter-nav__item.done .chapter-nav__num   { background: var(--hl-sage); color: var(--white); }
.chapter-nav__num--q    { font-size: 10px; background: #f0eaff; color: #7a4acc; }
.chapter-nav__num--star { font-size: 11px; background: var(--fun-bg); color: #9a7d00; }
.chapter-nav__title { flex: 1; min-width: 0; }
.chapter-nav__check { flex-shrink: 0; opacity: 0; transition: opacity .2s; }
.chapter-nav__badge { flex-shrink: 0; font-size: 11px; color: var(--muted); background: var(--line); border-radius: 10px; padding: 1px 7px; }
.chapter-nav__sep { height: 1px; background: var(--line); margin: 12px 16px; }

/* ── Mobile chapter bar ──────────────────────────────────── */
.mobile-chapter-bar {
  display: none; position: sticky; top: 0; z-index: 90;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 10px 16px; align-items: center; gap: 10px;
}
.mobile-chapter-bar__toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.mobile-chapter-bar__title { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-chapter-bar__progress { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.mobile-chapter-bar__arrows { display: flex; gap: 4px; flex-shrink: 0; }
.mobile-chapter-bar__arrow {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); transition: border-color .15s;
}
.mobile-chapter-bar__arrow:hover { border-color: var(--terracotta); }
.mobile-progress-strip { display: none; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px; background: var(--line-soft); z-index: 1; }
.mobile-progress-strip__fill { height: 100%; background: var(--terracotta); width: 0; transition: width .4s ease; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 28px;
}
.breadcrumb a { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--navy-deep); }
.breadcrumb__sep { color: var(--sand); }

/* ── Article tags ────────────────────────────────────────── */
.art-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.art-tag {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; letter-spacing: 0.04em; border: 1px solid var(--line);
}
.art-tag--default { background: var(--paper-tint); color: var(--ink-soft); }
.art-tag--rose    { background: #fbeee8; color: var(--terracotta-deep); border-color: #f5d4c8; }
.art-tag--sage    { background: #e8ede4; color: var(--hl-sage); border-color: #d0dac8; }
.art-tag--chapter { background: #eef1ff; color: #4a5acc; border-color: #d8dcf5; }

/* ── Article typography ──────────────────────────────────── */
article h1 {
  font-family: var(--f-serif);
  font-size: clamp(36px,4.5vw,56px); font-weight: 500; color: var(--navy-deep);
  line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 6px;
}
.art-subtitle {
  font-family: var(--f-serif); font-size: 18px; color: var(--muted);
  font-style: italic; margin-bottom: 22px;
}
.art-author-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.art-author-photo {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--paper-tint); box-shadow: 0 1px 6px rgba(0,0,0,0.08); flex-shrink: 0;
}
.art-author-name { font-size: 14px; color: var(--ink); font-weight: 600; }
.art-author-name a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--terracotta); text-underline-offset: 3px; }
.art-author-time { font-size: 13px; color: var(--muted); margin-top: 2px; }
.art-author-actions { margin-left: auto; display: flex; gap: 8px; }
.art-icon-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.art-icon-btn:hover { background: var(--paper-tint); }
.art-lead {
  background: var(--paper-tint); border: 1px solid var(--line);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius-m); padding: 22px 26px; margin-bottom: 40px;
}
.art-lead__label {
  font-size: 11px; font-weight: 600; color: var(--terracotta);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px;
}
.art-lead__text { font-size: 17px; color: var(--ink); line-height: 1.65; margin: 0; }

/* article content from DB */
.article-content h2 {
  font-family: var(--f-serif); font-size: 32px; font-weight: 500; color: var(--navy-deep);
  letter-spacing: -0.01em; margin: 52px 0 14px; line-height: 1.15;
}
.article-content h2 em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.article-content h3 { font-size: 20px; font-weight: 600; color: var(--ink); margin: 34px 0 12px; }
.article-content p { margin-bottom: 1.6em; font-size: 19px; line-height: 1.9; color: var(--ink-soft); }
.article-content ul { padding-left: 22px; margin-bottom: 1.6em; }
.article-content li { margin-bottom: 12px; font-size: 19px; line-height: 1.9; color: var(--ink-soft); }
.article-content blockquote {
  border-left: 3px solid var(--terracotta); padding-left: 24px; margin: 1.4em 0;
  font-family: var(--f-serif); font-style: italic; font-size: 22px; line-height: 1.5; color: var(--navy-deep);
}
.article-content blockquote footer { font-size: 13px; color: var(--muted); margin-top: 10px; font-style: normal; font-family: var(--f-sans); }

/* ── Claire bio ──────────────────────────────────────────── */
.claire-bio {
  display: flex; gap: 28px; align-items: flex-start;
  margin-top: 64px; padding: 32px 36px;
  background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-l);
}
.claire-bio__photo {
  width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; object-position: center top;
  border: 3px solid var(--white); box-shadow: 0 4px 16px rgba(20,40,58,.12);
}
.claire-bio__content { flex: 1; min-width: 0; }
.claire-bio__eyebrow { font-size: 11px; font-weight: 600; color: var(--terracotta); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.claire-bio__name { font-family: var(--f-serif); font-size: 26px; font-weight: 500; color: var(--navy-deep); margin-bottom: 10px; letter-spacing: -0.01em; }
.claire-bio__text { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 14px; }
.claire-bio__link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--terracotta); transition: color .15s; }
.claire-bio__link:hover { color: var(--terracotta-deep); }

/* ── Chapter pagination ──────────────────────────────────── */
.chapter-pagination {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 32px;
}
.chapter-pagination__btn {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s;
}
.chapter-pagination__btn:hover { border-color: var(--terracotta); background: var(--paper-tint); }
.chapter-pagination__btn--next { justify-content: flex-end; text-align: right; }
.chapter-pagination__btn svg { flex-shrink: 0; color: var(--terracotta); }
.chapter-pagination__label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px; }
.chapter-pagination__title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.chapter-pagination__swipe { display: none; font-size: 11px; color: var(--muted); margin-top: 3px; font-style: italic; }

/* ── Test / Quiz CTA ─────────────────────────────────────── */
.test-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px; background: var(--fun-bg);
  border: 1px solid var(--fun-border); border-radius: var(--radius-l);
  text-decoration: none; margin-top: 32px; flex-wrap: wrap;
}
.test-cta__label { font-size: 11px; font-weight: 600; color: #9a7d00; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px; }
.test-cta__title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.test-cta__sub { font-size: 13px; color: var(--muted); }
.test-cta__btn {
  flex-shrink: 0; padding: 11px 20px; background: var(--navy-deep); color: var(--paper);
  border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s;
}
.test-cta__btn:hover { background: var(--navy); }

/* ── Fragen (Q&R) list ───────────────────────────────────── */
.fragen-list { display: flex; flex-direction: column; gap: 8px; }
.fragen-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  text-decoration: none; color: var(--ink); transition: border-color .15s;
}
.fragen-item:hover { border-color: var(--terracotta); }
.fragen-item__num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper-tint); color: var(--muted); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.fragen-item__body { flex: 1; min-width: 0; }
.fragen-item__title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.fragen-item__summary { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fragen-item__time { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── Next section CTA ────────────────────────────────────── */
.next-section {
  margin-top: 56px; padding: 28px 32px;
  background: var(--navy-deep); border-radius: var(--radius-l);
  color: var(--paper); display: flex; gap: 20px; align-items: center;
}
.next-section__label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); margin-bottom: 6px; }
.next-section__title { font-family: var(--f-serif); font-size: 22px; font-weight: 500; line-height: 1.3; }
.next-section__btn {
  flex-shrink: 0; padding: 12px 22px; background: var(--terracotta); color: var(--white);
  border: none; border-radius: 999px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; display: flex; align-items: center;
  gap: 8px; font-family: inherit; text-decoration: none; transition: background .15s;
}
.next-section__btn:hover { background: var(--terracotta-deep); }

/* ── Karta box (fiche récap) ─────────────────────────────── */
.karta-box { background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 26px; margin-bottom: 40px; }
.karta-box__label { font-size: 11px; font-weight: 600; color: var(--terracotta); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.karta-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.karta-table tr { border-bottom: 1px solid var(--line-soft); }
.karta-table tr:last-child { border-bottom: none; }
.karta-table td { padding: 7px 0; vertical-align: top; }
.karta-table td:first-child { width: 120px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.karta-table__meta { color: var(--muted); font-size: 13px; margin-left: 4px; }

.karta-img { display: block; width: 100%; max-width: 640px; border-radius: var(--radius-m); margin: 0 0 28px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid var(--line); }

/* ── Author catalog (home page — by-author section) ─────── */
.epoch-btn {
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.epoch-btn:hover  { border-color: var(--terracotta); color: var(--terracotta); }
.epoch-btn.active { background: var(--terracotta); color: var(--white); border-color: var(--terracotta); }

.hl-author-block { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 20px; }
.hl-author-head  { display: flex; align-items: center; gap: 14px; padding: 18px 0 12px; }
.hl-author-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-deep); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-serif); font-size: 16px; font-weight: 500;
}
.hl-author-info { flex: 1; min-width: 0; }
.hl-author-name { font-family: var(--f-serif); font-size: 22px; font-weight: 500; color: var(--navy-deep); letter-spacing: -0.01em; margin: 0; line-height: 1.2; }
.hl-author-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hl-author-meta .sep { margin: 0 4px; }

.hl-work-rows { display: flex; flex-direction: column; }
.hl-work-row {
  display: grid; grid-template-columns: 1fr auto auto 20px;
  align-items: center; gap: 16px; padding: 11px 12px;
  border-radius: var(--radius-m); text-decoration: none; color: inherit;
  transition: background .12s;
}
.hl-work-row:hover { background: var(--paper-tint); }
.hl-work-row__main  { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
.hl-work-row__title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-work-row__year  { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.hl-work-row__type  { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.hl-work-row__tags  { display: flex; gap: 4px; flex-wrap: nowrap; flex-shrink: 0; }
.hl-work-row__arrow { color: var(--muted); flex-shrink: 0; transition: color .12s; }
.hl-work-row:hover .hl-work-row__arrow { color: var(--terracotta); }
.hl-tag-abitur {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--terracotta); color: var(--white); letter-spacing: 0.04em;
}

/* ── Swipe hint toast ────────────────────────────────────── */
.swipe-hint-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px);
  z-index: 300; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 16px 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; opacity: 0; transition: opacity .4s ease, transform .4s ease;
  white-space: nowrap; min-width: 220px; text-align: center;
}
.swipe-hint-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.swipe-hint-toast__icon { display: flex; align-items: center; gap: 4px; color: var(--terracotta); }
.swipe-hint-toast__text { font-size: 14px; font-weight: 600; color: var(--ink); }
.swipe-hint-toast__sub  { font-size: 12px; color: var(--muted); }

/* ── Pages statiques ─────────────────────────────────────── */
.static-page { min-height: 60vh; padding: 60px 20px 80px; }
.static-page__inner { max-width: 720px; margin: 0 auto; }
.static-page__inner h1 { font-family: var(--f-serif); font-size: clamp(2rem,5vw,2.8rem); font-weight: 600; color: var(--navy-deep); margin-bottom: 36px; padding-bottom: 16px; border-bottom: 2px solid var(--line); }
.static-page__inner h2 { font-size: 1.15rem; font-weight: 600; color: var(--navy-deep); margin: 36px 0 10px; }
.static-page__inner p  { color: var(--ink-soft); line-height: 1.8; margin-bottom: 14px; }
.static-page__inner ul { padding-left: 22px; margin-bottom: 14px; color: var(--ink-soft); line-height: 1.8; }
.static-page__inner a  { color: var(--terracotta); text-decoration: underline; }
.static-page__inner a:hover { color: var(--navy-deep); }
.sp-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.75; margin-bottom: 32px !important; }
.sp-form__group { margin-bottom: 20px; }
.sp-form__group label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy-deep); margin-bottom: 6px; }
.sp-form__group input,
.sp-form__group textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-m); font-family: inherit; font-size: .95rem; color: var(--ink); background: var(--white); transition: border-color .15s; outline: none; }
.sp-form__group input:focus, .sp-form__group textarea:focus { border-color: var(--navy-deep); }
.sp-form__group textarea { resize: vertical; min-height: 120px; }
.sp-btn-primary { background: var(--navy-deep); color: var(--white); border: none; border-radius: var(--radius-m); padding: 12px 28px; font-size: .95rem; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.sp-btn-primary:hover { opacity: .85; }
.sp-btn-secondary { background: transparent; border: 1.5px solid var(--line); color: var(--ink-soft); border-radius: var(--radius-m); padding: 10px 20px; font-size: .9rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: border-color .15s; }
.sp-btn-secondary:hover { border-color: var(--navy); color: var(--navy-deep); }
.sp-alert { padding: 16px 20px; border-radius: var(--radius-m); margin-bottom: 24px; font-size: .95rem; line-height: 1.6; }
.sp-alert--success { background: #ecf9f1; border: 1px solid #6fcf97; color: #1a5c36; }
.sp-alert--error   { background: #fdf0ef; border: 1px solid #e57373; color: #7b1a1a; }
.sp-about { display: flex; gap: 40px; align-items: flex-start; margin-top: 8px; }
.sp-about__portrait img { width: 160px; border-radius: var(--radius-m); display: block; }
.sp-about__text { flex: 1; min-width: 0; }
.sp-contact-alt { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* ── Cookie consent ──────────────────────────────────────── */
#sl-cc {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10); padding: 20px 24px;
  transform: translateY(110%); opacity: 0;
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .4s ease;
}
.sl-cc__inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.sl-cc__text { flex: 1; min-width: 200px; }
.sl-cc__text strong { font-size: .95rem; color: var(--navy-deep); }
.sl-cc__text p { font-size: .88rem; color: var(--muted); line-height: 1.5; margin: 4px 0 0; }
.sl-cc__text p a { color: var(--terracotta); }
.sl-cc__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sl-cc-btn { display: inline-flex; align-items: center; padding: 9px 20px; border-radius: 999px; font-size: .88rem; font-weight: 600; cursor: pointer; border: none; transition: opacity .15s, background .15s; white-space: nowrap; }
.sl-cc-btn--primary { background: var(--navy-deep); color: var(--white); }
.sl-cc-btn--primary:hover { opacity: .85; }
.sl-cc-btn--ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.sl-cc-btn--ghost:hover { border-color: var(--navy-deep); color: var(--navy-deep); }
#sl-cc-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sl-cc-modal__box { background: var(--white); border-radius: var(--radius-l); max-width: 520px; width: 100%; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 90vh; overflow-y: auto; }
.sl-cc-modal__title { font-size: 1.3rem; font-weight: 700; color: var(--navy-deep); margin-bottom: 20px; }
.sl-cc-modal__section { border-top: 1px solid var(--line); padding: 16px 0; }
.sl-cc-toggle { display: flex; gap: 16px; align-items: flex-start; cursor: pointer; }
.sl-cc-toggle input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; accent-color: var(--navy-deep); cursor: pointer; }
.sl-cc-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.sl-cc-toggle div strong { font-size: .92rem; color: var(--navy-deep); display: block; margin-bottom: 2px; }
.sl-cc-toggle div p { font-size: .83rem; color: var(--muted); line-height: 1.5; margin: 0; }
.sl-cc-modal__footer { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__art { max-width: 360px; margin: 0 auto; }
  .detail-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-body__grid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .cards, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .epoki, .features { grid-template-columns: repeat(2, 1fr); }
  .epoka:nth-child(2n) { border-right: 0; }
  .epoka:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --nav-w: 220px; }
  .book-content { padding: 32px 32px 80px; }
}
@media (max-width: 768px) {
  .site-header__inner { padding: 0 20px; height: 60px; }
  .site-header { position: fixed; width: 100%; left: 0; top: 0; }
  .site-header + * { margin-top: 60px; }
  .mobile-chapter-bar { top: 60px; }
  .brand__name { font-size: 22px; }
  .nav, .header__cta .btn:not(.btn--terra) { display: none; }
  .book-layout { grid-template-columns: 1fr; }
  .chapter-nav {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(85vw, 300px); z-index: 200;
    transform: translateX(-110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.08); padding-top: 56px;
  }
  .chapter-nav.chapter-nav--open { transform: translateX(0); }
  .mobile-chapter-bar { display: flex; }
  .mobile-progress-strip { display: block; }
  .book-content { padding: 24px 20px 80px; }
  .chapter-pagination { grid-template-columns: 1fr; }
  .chapter-pagination__btn--next { justify-content: flex-start; text-align: left; }
  .chapter-pagination__swipe { display: block; }
  .test-cta { flex-direction: column; align-items: flex-start; }
  .header-progress { display: none !important; }
  .site-header--book .site-header__inner { justify-content: center; padding: 0; }
  .site-header--book .brand { width: auto; padding: 12px 20px; }
  .claire-bio { flex-direction: column; padding: 24px; }
  .claire-bio__photo { width: 80px; height: 80px; }
  .next-section { flex-direction: column; padding: 24px; }
  .detail-cover { max-width: 200px; margin: 0 auto 24px; }
  .detail-facts { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 72px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer .container { padding: 0 20px; }
  .sp-about { flex-direction: column; }
  #sl-cc { padding: 16px; }
  .sl-cc__actions { width: 100%; }
  .sl-cc-btn { flex: 1; justify-content: center; }
  .book-content .detail-hero { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .article-container { padding-top: 24px; padding-bottom: 80px; }
  .mobile-progress-strip + .container { margin-top: 63px; }
  .header-back { display: none; }
  .aside__item.is-active::before { display: none; }
  .aside__item a, .aside__collapse-toggle { padding: 11px 0; }

  /* Aside → drawer on mobile */
  .aside {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(85vw, 340px); z-index: 300;
    background: var(--paper); overflow-y: auto;
    transform: translateX(110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    padding: 0 20px 100px; box-shadow: -4px 0 32px rgba(0,0,0,.12);
  }
  .aside.aside--open { transform: translateX(0); }
  .aside__card { border: 0; padding: 0; margin-bottom: 0; background: none; border-radius: 0; }
  .aside__mobile-header { display: flex; }
  .mobile-progress-strip { display: block; }
  .mobile-toc-bar { display: flex; }
  .mobile-toc-backdrop { display: none; } /* shown by JS via .visible class */
}
