/* ==========================================================================
   Julien Jimenez, biographie narrative
   Feuille de style unique, sans dependance externe.
   Ambiance : papier creme, encre brune, accents terracotta et or pale.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables de theme
   -------------------------------------------------------------------------- */

:root {
  /* Palette imposee */
  --creme: #FBF7F0;
  --brun: #2E2018;
  --terracotta: #B45309;
  --or: #D4A574;
  --texte: #3B2F26;
  --secondaire: #7A6A5C;

  /* Derives */
  --papier: #FBF7F0;
  --papier-2: #F5EEE2;
  --papier-3: #EFE5D6;
  --filet: rgba(122, 106, 92, 0.28);
  --filet-fort: rgba(46, 32, 24, 0.42);
  --terracotta-clair: rgba(180, 83, 9, 0.12);
  --or-clair: rgba(212, 165, 116, 0.22);

  /* Typographie */
  --serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  /* Echelle fluide */
  --fs-micro: clamp(0.72rem, 0.68rem + 0.16vw, 0.8rem);
  --fs-petit: clamp(0.84rem, 0.8rem + 0.2vw, 0.94rem);
  --fs-corps: clamp(1.05rem, 0.99rem + 0.32vw, 1.2rem);
  --fs-lede: clamp(1.16rem, 1.06rem + 0.5vw, 1.38rem);
  --fs-h3: clamp(1.12rem, 1.02rem + 0.5vw, 1.32rem);
  --fs-h2: clamp(1.7rem, 1.36rem + 1.6vw, 2.68rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 3vw, 4rem);
  --fs-quote: clamp(1.24rem, 1.06rem + 0.9vw, 1.86rem);

  /* Rythme */
  --mesure: 34rem;           /* environ 68 caracteres par ligne */
  --mesure-large: 56rem;
  --gap: clamp(1rem, 0.7rem + 1.4vw, 1.8rem);
  --bloc: clamp(3rem, 2rem + 5vw, 6.5rem);

  /* Rayons et ombres */
  --r-s: 3px;
  --r-m: 6px;
  --r-l: 14px;
  --ombre-douce: 0 1px 2px rgba(46, 32, 24, 0.05), 0 8px 26px rgba(46, 32, 24, 0.08);
  --ombre-forte: 0 2px 6px rgba(46, 32, 24, 0.09), 0 22px 60px rgba(46, 32, 24, 0.16);

  /* Mouvement */
  --t-court: 180ms cubic-bezier(0.32, 0.72, 0.28, 1);
  --t-moyen: 420ms cubic-bezier(0.22, 0.68, 0.2, 1);
  --t-long: 780ms cubic-bezier(0.18, 0.72, 0.16, 1);
}

/* --------------------------------------------------------------------------
   2. Reinitialisation legere
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background-color: var(--papier);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(212, 165, 116, 0.16), transparent 45%),
    radial-gradient(circle at 88% 22%, rgba(180, 83, 9, 0.07), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(46, 32, 24, 0.05), transparent 55%);
  background-attachment: fixed;
  color: var(--texte);
  font-family: var(--serif);
  font-size: var(--fs-corps);
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--terracotta); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--brun);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.35em; }

ul, ol { margin: 0; padding: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--or-clair);
  color: var(--brun);
}

/* --------------------------------------------------------------------------
   3. Accessibilite : skip link et focus
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 999;
  background: var(--brun);
  color: var(--creme);
  padding: 0.75rem 1.15rem;
  border-radius: var(--r-m);
  font-family: var(--sans);
  font-size: var(--fs-petit);
  text-decoration: none;
  transition: top var(--t-court);
}

.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: var(--r-s);
}

/* --------------------------------------------------------------------------
   4. Barre de progression de lecture
   -------------------------------------------------------------------------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: rgba(46, 32, 24, 0.08);
  z-index: 90;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--or), var(--terracotta));
  transform-origin: left center;
  transition: width 120ms linear;
}

/* --------------------------------------------------------------------------
   5. Barre superieure
   -------------------------------------------------------------------------- */

.topbar {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(251, 247, 240, 0.86);
  backdrop-filter: saturate(140%) blur(9px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-moyen), background-color var(--t-moyen), box-shadow var(--t-moyen);
}

.topbar.is-stuck {
  border-bottom-color: var(--filet);
  box-shadow: 0 10px 30px -22px rgba(46, 32, 24, 0.6);
}

.topbar__inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.6rem clamp(1rem, 4vw, 2.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--brun);
}

.brand__mark {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brun);
  color: var(--creme);
  font-family: var(--serif);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 1px var(--or) inset;
  transition: transform var(--t-moyen), background-color var(--t-moyen);
}

.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); background: var(--terracotta); }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 0.98rem; font-weight: 600; letter-spacing: 0.01em; }
.brand__text em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondaire);
}

.topbar__meta {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondaire);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. Structure generale
   -------------------------------------------------------------------------- */

.shell {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(5rem, 8vw, 7rem) clamp(1.1rem, 4vw, 2.4rem) 0;
  display: block;
  position: relative;
}

.paper {
  position: relative;
  margin: 0 auto;
  max-width: var(--mesure-large);
}

/* Colonne de lecture etroite, environ 68 caracteres */
.paper > section > p,
.paper > article > p,
.paper > section > .section__intro,
.paper > article > .lede {
  max-width: var(--mesure);
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   7. Sommaire lateral
   -------------------------------------------------------------------------- */

.toc {
  display: none;
}

.toc__title {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondaire);
}

.toc__list { list-style: none; }

.toc__list li + li { margin-top: 0.15rem; }

.toc__list a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem 0.3rem 0.4rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--secondaire);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  transition: color var(--t-court), border-color var(--t-court), background-color var(--t-court), padding-left var(--t-court);
}

.toc__list a:hover {
  color: var(--brun);
  background: var(--or-clair);
  padding-left: 0.7rem;
}

.toc__num {
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--or);
  min-width: 1.6rem;
  text-align: right;
  transition: color var(--t-court);
}

.toc__list a.is-active {
  color: var(--brun);
  border-left-color: var(--terracotta);
  background: var(--terracotta-clair);
  font-weight: 600;
}

.toc__list a.is-active .toc__num { color: var(--terracotta); }

.toc__foot {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--filet);
  font-family: var(--sans);
  font-size: var(--fs-micro);
  color: var(--secondaire);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   8. Ouverture
   -------------------------------------------------------------------------- */

.opening {
  padding: clamp(1rem, 3vw, 2.5rem) 0 var(--bloc);
  text-align: center;
}

.kicker {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 1.4rem;
}

.kicker::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 1px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--or), transparent);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 400;
  max-width: 20ch;
  margin: 0 auto 1.6rem;
  letter-spacing: -0.022em;
}

.standfirst {
  font-size: var(--fs-lede);
  color: var(--secondaire);
  max-width: var(--mesure) !important;
  text-align: left;
  margin: 0 auto 2.8rem !important;
  line-height: 1.72;
}

/* Portrait avec cadre a bord irregulier */
.portrait {
  margin: 0 auto 2.6rem;
  max-width: 24rem;
  position: relative;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: -1.1rem -1.1rem 2.6rem -1.1rem;
  border: 1px solid var(--or);
  transform: rotate(-1.6deg);
  pointer-events: none;
  transition: transform var(--t-long);
}

.portrait:hover::before { transform: rotate(1.4deg); }

.portrait__frame {
  position: relative;
  background: var(--papier-3);
  padding: 0.55rem;
  box-shadow: var(--ombre-forte);
  clip-path: polygon(
    1.5% 0.8%, 22% 0%, 47% 1.4%, 71% 0.2%, 98.6% 1.2%,
    99.6% 26%, 98.4% 52%, 99.4% 76%, 98.8% 99%,
    74% 99.8%, 49% 98.6%, 26% 99.6%, 1.2% 98.8%,
    0.4% 74%, 1.4% 50%, 0.2% 25%
  );
}

.portrait__img {
  width: 100%;
  height: auto;
  clip-path: polygon(
    2% 1.2%, 24% 0.4%, 50% 1.8%, 76% 0.6%, 98% 1.6%,
    99.2% 27%, 98.2% 53%, 99.4% 77%, 98% 98.4%,
    72% 99.4%, 48% 98.2%, 25% 99.2%, 2% 98.4%,
    0.8% 75%, 1.8% 49%, 0.6% 24%
  );
  filter: sepia(0.1) contrast(1.02) saturate(0.96);
  transition: filter var(--t-long), transform var(--t-long);
}

.portrait:hover .portrait__img {
  filter: sepia(0) contrast(1.04) saturate(1);
  transform: scale(1.012);
}

.portrait__caption {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: var(--fs-petit);
  color: var(--secondaire);
  line-height: 1.6;
  max-width: 26rem;
  margin-inline: auto;
}

.opening__meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.4rem;
  max-width: 32rem;
  margin: 2.6rem auto 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--filet);
}

.opening__meta li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.opening__label {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondaire);
}

.opening__value {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--brun);
}

/* --------------------------------------------------------------------------
   9. Filets decoratifs
   -------------------------------------------------------------------------- */

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: var(--bloc) auto;
  max-width: 22rem;
}

.rule span:not(.rule__dot) {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--filet), transparent);
}

.rule__dot {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--or);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.16);
  flex: none;
}

/* --------------------------------------------------------------------------
   10. Chapitres
   -------------------------------------------------------------------------- */

.chapter,
.section {
  position: relative;
  padding: var(--bloc) 0;
  border-top: 1px solid var(--filet);
}

.chapter:first-of-type { border-top: 0; }

.chapter__ghost {
  position: absolute;
  top: clamp(0.5rem, 2vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(9rem, 22vw, 20rem);
  line-height: 0.82;
  color: rgba(46, 32, 24, 0.045);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.chapter > *,
.section > * { position: relative; z-index: 1; }

.chapter__label {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-align: center;
  margin: 0 0 0.9rem;
}

.chapter h2,
.section h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  text-align: center;
  max-width: 18ch;
  margin: 0 auto 2.2rem;
}

.chapter h2::after,
.section h2::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 2px;
  margin: 1.4rem auto 0;
  background: var(--or);
  border-radius: 2px;
}

/* Lettrine sur le premier paragraphe de chapitre */
.lede::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.9em;
  line-height: 0.78;
  padding: 0.06em 0.12em 0 0;
  margin: 0.06em 0.06em 0 0;
  color: var(--terracotta);
  font-weight: 400;
}

.lede {
  font-size: 1.06em;
}

/* Apparition au scroll.
   L'etat masque n'est applique que si le JavaScript est actif, afin que le
   texte reste integralement lisible en cas d'echec du script. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-long), transform var(--t-long);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   11. Citations en exergue
   -------------------------------------------------------------------------- */

.pull {
  margin: clamp(2.4rem, 5vw, 4rem) 0;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3rem);
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 238, 226, 0.9), rgba(239, 229, 214, 0.55));
  border-top: 1px solid var(--filet);
  border-bottom: 1px solid var(--filet);
  position: relative;
}

.pull::before {
  content: "\201C";
  position: absolute;
  top: -0.15em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 7rem);
  color: var(--or);
  line-height: 1;
  opacity: 0.55;
}

.pull blockquote {
  margin: 0;
  max-width: 30rem;
  margin-inline: auto;
}

.pull blockquote p {
  margin: 0;
  font-size: var(--fs-quote);
  line-height: 1.4;
  font-style: italic;
  color: var(--brun);
  letter-spacing: -0.01em;
}

.pull--gold {
  background: linear-gradient(180deg, rgba(212, 165, 116, 0.16), rgba(180, 83, 9, 0.06));
}

.pull--gold::before { color: var(--terracotta); opacity: 0.4; }

/* Revelation des citations avec un leger decalage supplementaire */
.js .pull[data-reveal] { transition-delay: 160ms; }

/* --------------------------------------------------------------------------
   12. Visuels pleine largeur
   -------------------------------------------------------------------------- */

.figure {
  margin: clamp(2.2rem, 4vw, 3.4rem) auto;
  max-width: var(--mesure-large);
}

.figure img {
  width: 100%;
  border-radius: var(--r-m);
  box-shadow: var(--ombre-douce);
  filter: sepia(0.14) saturate(0.94) contrast(1.02);
  transition: filter var(--t-long), transform var(--t-long), box-shadow var(--t-long);
}

.figure:hover img {
  filter: sepia(0.04) saturate(1) contrast(1.03);
  box-shadow: var(--ombre-forte);
}

.figure figcaption {
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: var(--fs-petit);
  color: var(--secondaire);
  text-align: center;
  line-height: 1.6;
  max-width: 34rem;
  margin-inline: auto;
}

.figure--wide { max-width: 100%; }

/* --------------------------------------------------------------------------
   13. Section intro
   -------------------------------------------------------------------------- */

.section__intro {
  font-size: var(--fs-lede);
  color: var(--secondaire);
  text-align: center;
  max-width: 32rem !important;
  margin: -0.6rem auto 2.8rem !important;
  line-height: 1.66;
}

/* --------------------------------------------------------------------------
   14. Reperes biographiques (frise)
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  max-width: 42rem;
  margin: 0 auto;
  position: relative;
  padding-left: clamp(1rem, 4vw, 2.2rem);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--filet) 8%, var(--filet) 92%, transparent);
}

.timeline__item {
  position: relative;
  padding: 0 0 2rem 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1rem, 4vw, 2.2rem) - 4px);
  top: 0.85rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--papier);
  border: 1.5px solid var(--or);
  transition: background-color var(--t-moyen), border-color var(--t-moyen), transform var(--t-moyen);
}

.timeline__item:hover::before {
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: scale(1.25);
}

.timeline__date {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.35rem;
}

.timeline__body h3 {
  font-size: var(--fs-h3);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.timeline__body p {
  margin: 0;
  color: var(--secondaire);
  font-size: 1rem;
  line-height: 1.72;
}

/* --------------------------------------------------------------------------
   15. Principes
   -------------------------------------------------------------------------- */

.creed {
  list-style: none;
  max-width: 42rem;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}

.creed__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  align-items: start;
  padding: clamp(1.1rem, 3vw, 1.7rem);
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--filet);
  border-radius: var(--r-m);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: transform var(--t-moyen), box-shadow var(--t-moyen), border-color var(--t-moyen), background-color var(--t-moyen);
}

.creed__item:hover {
  transform: translateY(-3px);
  border-color: var(--or);
  background: rgba(255, 254, 251, 0.95);
  box-shadow: var(--ombre-douce);
}

.creed__num {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  line-height: 1;
  color: var(--or);
  letter-spacing: -0.02em;
  transition: color var(--t-moyen);
}

.creed__item:hover .creed__num { color: var(--terracotta); }

.creed__item h3 {
  font-size: var(--fs-h3);
  font-weight: 400;
  margin: 0 0 0.45rem;
}

.creed__item p {
  margin: 0;
  font-size: 1rem;
  color: var(--secondaire);
  line-height: 1.74;
}

/* --------------------------------------------------------------------------
   16. Accordeon des questions
   -------------------------------------------------------------------------- */

.faq {
  max-width: 42rem;
  margin: 0 auto;
  border-top: 1px solid var(--filet);
}

.faq__item { border-bottom: 1px solid var(--filet); }

.faq__q { margin: 0; font-size: 1rem; font-weight: 400; }

.faq__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.15rem 0.4rem 1.15rem 0.2rem;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.14rem);
  line-height: 1.45;
  color: var(--brun);
  transition: color var(--t-court), padding-left var(--t-court);
}

.faq__btn:hover { color: var(--terracotta); padding-left: 0.6rem; }

.faq__icon {
  position: relative;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1px solid var(--or);
  transition: background-color var(--t-moyen), border-color var(--t-moyen), transform var(--t-moyen);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--terracotta);
  transition: transform var(--t-moyen), background-color var(--t-moyen);
}

.faq__icon::before {
  width: 9px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq__icon::after {
  width: 1px;
  height: 9px;
  transform: translate(-50%, -50%);
}

.faq__btn[aria-expanded="true"] .faq__icon {
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: rotate(90deg);
}

.faq__btn[aria-expanded="true"] .faq__icon::before,
.faq__btn[aria-expanded="true"] .faq__icon::after { background: var(--creme); }

.faq__btn[aria-expanded="true"] .faq__icon::after { transform: translate(-50%, -50%) scaleY(0); }

.faq__a {
  overflow: hidden;
  padding: 0 0.2rem 1.35rem;
}

.faq__a p {
  margin: 0;
  color: var(--secondaire);
  font-size: 1rem;
  line-height: 1.76;
  max-width: 36rem;
}

.faq__a[hidden] { display: none; }

.faq__a.is-animating { transition: height var(--t-moyen); }

/* --------------------------------------------------------------------------
   17. Contact
   -------------------------------------------------------------------------- */

.contact__card {
  max-width: 44rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.4rem, 4vw, 2.4rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--filet);
  border-radius: var(--r-l);
  box-shadow: var(--ombre-douce);
  text-align: center;
}

.contact__photo {
  width: 8.5rem;
  height: 8.5rem;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--papier);
  box-shadow: 0 0 0 1px var(--or), var(--ombre-douce);
  transition: transform var(--t-long), box-shadow var(--t-long);
}

.contact__photo:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 0 0 1px var(--terracotta), var(--ombre-forte);
}

.contact__lead {
  font-size: 1.04rem;
  color: var(--secondaire);
  line-height: 1.74;
  margin-bottom: 1.4rem;
}

.contact__mail {
  margin: 0 0 1.4rem;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
}

.contact__mail a {
  color: var(--brun);
  text-decoration: none;
  border-bottom: 1px solid var(--or);
  padding-bottom: 2px;
  transition: color var(--t-court), border-color var(--t-court), background-color var(--t-court);
}

.contact__mail a:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
  background: var(--or-clair);
}

.contact__facts {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-family: var(--sans);
  font-size: var(--fs-petit);
  color: var(--secondaire);
  padding-top: 1.2rem;
  border-top: 1px solid var(--filet);
}

.contact__facts strong { color: var(--brun); font-weight: 600; }

.colophon {
  max-width: 34rem;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: var(--fs-petit);
  color: var(--secondaire);
  text-align: center;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   18. Pied de page
   -------------------------------------------------------------------------- */

.footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  background: var(--brun);
  color: rgba(251, 247, 240, 0.78);
  padding: clamp(2.6rem, 6vw, 4.2rem) clamp(1.1rem, 4vw, 2.4rem);
}

.footer__inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 1.24rem;
  color: var(--creme);
  margin: 0 0 0.7rem;
  letter-spacing: 0.01em;
}

.footer__brand span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 50%;
  border: 1px solid var(--or);
  color: var(--or);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.footer__text {
  margin: 0 0 1.1rem;
  font-family: var(--sans);
  font-size: var(--fs-petit);
  line-height: 1.7;
}

.footer__mail { margin: 0 0 1.6rem; }

.footer__mail a {
  color: var(--or);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 165, 116, 0.4);
  transition: color var(--t-court), border-color var(--t-court);
}

.footer__mail a:hover { color: var(--creme); border-color: var(--creme); }

.footer__legal {
  margin: 0;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(251, 247, 240, 0.14);
  font-family: var(--sans);
  font-size: var(--fs-micro);
  color: rgba(251, 247, 240, 0.55);
}

/* --------------------------------------------------------------------------
   19. Bouton retour en haut
   -------------------------------------------------------------------------- */

.totop {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.8rem);
  bottom: clamp(0.9rem, 3vw, 1.8rem);
  z-index: 85;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brun);
  color: var(--creme);
  font-size: 1rem;
  line-height: 1;
  box-shadow: var(--ombre-douce);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity var(--t-moyen), transform var(--t-moyen), visibility var(--t-moyen), background-color var(--t-court);
}

.totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.totop:hover { background: var(--terracotta); }

/* --------------------------------------------------------------------------
   20. Page 404
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vw, 6rem) clamp(1.1rem, 4vw, 2.4rem);
  text-align: center;
}

.error-card {
  max-width: 38rem;
}

.error-code {
  font-family: var(--serif);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 0.9;
  color: rgba(46, 32, 24, 0.1);
  letter-spacing: -0.04em;
  margin: 0 0 -0.3em;
}

.error-card h1 {
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.7rem);
  margin-bottom: 1.2rem;
}

.error-card p {
  color: var(--secondaire);
  max-width: 30rem;
  margin-inline: auto;
}

.btn {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.85rem 1.7rem;
  background: var(--brun);
  color: var(--creme);
  font-family: var(--sans);
  font-size: var(--fs-petit);
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--r-m);
  box-shadow: var(--ombre-douce);
  transition: background-color var(--t-court), transform var(--t-court), box-shadow var(--t-court);
}

.btn:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: var(--ombre-forte);
}

.error-portrait {
  width: 7rem;
  height: 7rem;
  margin: 0 auto 1.8rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--or), var(--ombre-douce);
}

/* --------------------------------------------------------------------------
   21. Points de rupture
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .opening__meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .contact__card {
    grid-template-columns: auto 1fr;
    text-align: left;
  }

  .contact__photo { margin: 0; }

  .contact__facts { justify-items: start; }

  .pull {
    border-radius: var(--r-m);
  }
}

@media (min-width: 900px) {
  .chapter h2,
  .section h2 { max-width: 20ch; }

  .figure--wide {
    width: calc(100% + 4rem);
    margin-left: -2rem;
  }

  .timeline { padding-left: 3rem; }

  .timeline__item::before { left: -3.25rem; }
}

@media (min-width: 1200px) {
  .shell {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }

  .toc {
    display: block;
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding-right: 0.4rem;
  }

  .paper { max-width: none; }

  .chapter__ghost {
    left: auto;
    right: -1rem;
    transform: none;
    font-size: clamp(10rem, 14vw, 16rem);
  }

  .figure--wide {
    width: calc(100% + 6rem);
    margin-left: -3rem;
  }
}

@media (min-width: 1440px) {
  .shell { grid-template-columns: 16rem minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   22. Impression
   -------------------------------------------------------------------------- */

@media print {
  .topbar,
  .toc,
  .totop,
  .progress,
  .footer { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }

  .chapter, .section { break-inside: avoid-page; border-top: 1px solid #ccc; }
}

/* --------------------------------------------------------------------------
   23. Mouvement reduit
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .portrait::before { transform: rotate(-1.6deg) !important; }

  .totop.is-visible { transform: none; }
}

/* --------------------------------------------------------------------------
   24. Contraste renforce
   -------------------------------------------------------------------------- */

@media (prefers-contrast: more) {
  :root {
    --secondaire: #5C4E42;
    --filet: rgba(46, 32, 24, 0.45);
  }

  .chapter__ghost { color: rgba(46, 32, 24, 0.08); }
}
