/* PZ — Point Zéro · grammaire commune « constellation », déclinaison sable/or.
   Zéro JavaScript requis : routes de lecture par boutons radio + :has(), fil de progression par scroll-timeline.
   Sombre via prefers-color-scheme. Fontes : piles système. */
:root {
  --papier: #e9e4d6;
  --papier2: #f3efe4;
  --encre: #172126;
  --encre2: #4d5450;
  --etoile: #a2753d;
  --second: #456675;
  --filet: rgba(23, 33, 38, .18);
  --filet-fort: rgba(23, 33, 38, .34);
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --mono: 'Cascadia Mono', Consolas, 'Courier New', monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #14130e;
    --papier2: #1c1a13;
    --encre: #e2ddd0;
    --encre2: #ada695;
    --etoile: #c19256;
    --second: #7fa0b5;
    --filet: rgba(226, 221, 208, .16);
    --filet-fort: rgba(226, 221, 208, .32);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 17px/1.78 var(--serif);
}
a { color: var(--encre); text-decoration-color: var(--filet-fort); text-underline-offset: .2em; }
a:hover { color: var(--etoile); }
a:focus-visible, input:focus-visible + span { outline: 2px solid var(--etoile); outline-offset: 3px; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 10;
  padding: .55rem .9rem; background: var(--encre); color: var(--papier);
  font: 600 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.etiquette, .eyebrow, .folio, .statut-strip, .toc-group, .voix-label, .routes-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .64rem;
  font-weight: 600;
}

/* ——— fil de progression (CSS pur) ——— */
@keyframes fil-grandit { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.fil {
  position: fixed; right: 0; top: 0; z-index: 5;
  width: 3px; height: 100vh;
  background: var(--etoile);
  transform-origin: top; transform: scaleY(0);
  animation: fil-grandit linear both;
  animation-timeline: scroll(root);
}
@supports not (animation-timeline: scroll(root)) { .fil { display: none; } }

/* ——— masthead ——— */
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 2rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem) 0;
}
.brand { text-decoration: none; font: 600 .72rem/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.topnav { display: flex; gap: 1.6rem; font: 400 .68rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.topnav a { text-decoration: none; border-bottom: 1px solid var(--filet-fort); padding-bottom: .15em; }
.statut-strip {
  display: flex; flex-wrap: wrap; gap: .3rem 1.6rem;
  width: 100%;
  margin-top: .9rem; padding: .7rem 0;
  border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet);
  color: var(--encre2); font-weight: 400; letter-spacing: .12em;
}
.statut-strip span::before { content: "◇"; margin-right: .5rem; color: var(--etoile); }

/* ——— couverture : le point et ses orbites ——— */
.cover {
  position: relative;
  max-width: 72rem; margin-inline: auto;
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 7vh, 5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 3rem; align-items: center;
}
.eyebrow { color: var(--etoile); margin: 0 0 1.2rem; }
.cover h1 {
  margin: 0 0 1.4rem;
  font: 400 clamp(3.4rem, 9vw, 5.6rem)/.95 var(--serif);
  letter-spacing: -.02em;
}
.cover__thesis {
  margin: 0 0 1.8rem; max-width: 26rem;
  font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45;
  color: var(--second);
}
.cover__author { margin: 0 0 2.4rem; font: 600 .72rem/1.5 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--encre2); }
.cover__enter { font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--filet-fort); }
.figure-point { position: relative; aspect-ratio: 1; }
.figure-point span { position: absolute; border-radius: 50%; }
.figure-point .o1 { inset: 0; border: 1px solid var(--filet-fort); }
.figure-point .o2 { inset: 18%; border: 1px dotted var(--filet-fort); }
.figure-point .o3 { inset: 36%; border: 1px solid var(--filet); }
.figure-point .pt { left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; background: var(--etoile); }

/* ——— note de lecture + routes ——— */
.orientation {
  max-width: 72rem; margin-inline: auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 6vh, 4rem);
}
.orientation__inner {
  border-top: 1px solid var(--filet);
  padding-top: 2rem;
  max-width: 46rem;
}
.orientation h2 {
  margin: 0 0 1rem;
  font: 400 clamp(1.5rem, 3.4vw, 2rem)/1.15 var(--serif); letter-spacing: -.01em;
}
.orientation p { margin: 0 0 1rem; max-width: 34rem; font-size: 1rem; color: var(--encre2); }

.reading-routes { margin-top: 2rem; }
.routes-label { display: block; color: var(--second); margin: 0 0 .8rem; }
.routes-controls { display: flex; flex-wrap: wrap; gap: .8rem; }
.route-radio { position: relative; cursor: pointer; }
.route-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.route-radio span {
  display: inline-block;
  padding: .55rem 1rem;
  border: 1px solid var(--filet-fort);
  font: 600 .68rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--encre2);
}
.route-radio input:checked + span { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.routes-note { margin: 1rem 0 0 !important; font-size: .9rem !important; font-style: italic; }
body:has(#route-essai:checked) .only-livret { display: none; }
body:has(#route-livret:checked) .only-essai { display: none; }

/* ——— coque de lecture : rail + texte ——— */
.reader-shell {
  max-width: 72rem; margin-inline: auto;
  display: grid; grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}
.reader-nav {
  position: sticky; top: 0;
  align-self: start;
  max-height: 100vh; overflow-y: auto;
  padding: 1.6rem 1.4rem 1.6rem 0;
  border-right: 1px solid var(--filet);
}
.reader-nav__brand { display: block; margin: 0 0 1.4rem; text-decoration: none; font: 600 .72rem/1.5 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.reader-nav__brand em { font-style: normal; color: var(--etoile); }
.toc-group { display: block; color: var(--etoile); margin: 1.4rem 0 .4rem; font-weight: 400; letter-spacing: .18em; font-size: .56rem; }
.toc-item {
  display: flex; gap: .7rem; align-items: baseline;
  padding: .3rem 0;
  text-decoration: none; font-size: .82rem; line-height: 1.35;
}
.toc-item span:first-child { font: 400 .6rem/1.6 var(--mono); color: var(--encre2); flex: 0 0 1.5rem; }
.reader-nav__top { display: inline-block; margin-top: 1.8rem; font: 400 .68rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--filet-fort); }

/* ——— chapitres ——— */
.book { padding-bottom: 2rem; max-width: 40rem; }
.chapter { scroll-margin-top: 2rem; }
.chapter::before {
  content: "◇\2002\2002◇\2002\2002◇";
  display: block; text-align: center;
  margin: clamp(4rem, 9vh, 6rem) 0;
  color: var(--etoile); font: 400 .7rem/1 var(--mono);
}
.chapter__meta { margin: 0 0 .6rem; font: 600 .64rem/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--etoile); }
.chapter h2 {
  margin: 0 0 1.8rem;
  font: 400 clamp(1.9rem, 4.5vw, 2.4rem)/1.08 var(--serif);
  letter-spacing: -.015em;
}
.chapter h3 {
  margin: 2.4rem 0 1rem;
  font: 400 1.35rem/1.25 var(--serif); letter-spacing: -.01em;
}
.chapter h4 { margin: 2rem 0 .8rem; font: 600 .78rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--encre2); }
.chapter p { margin: 0 0 1.1rem; max-width: 34rem; text-wrap: pretty; }
.chapter ul { margin: 0 0 1.1rem; padding-left: 1.1rem; max-width: 33rem; }
.chapter li { margin: 0 0 .4rem; }
.chapter code { font: 400 .85em var(--mono); }
.chapter--movement { border-top: 1px solid var(--filet); }
.chapter--movement::before { content: none; }
.chapter--movement .chapter__meta { margin-top: clamp(3rem, 7vh, 4.5rem); }

/* voix source */
.voix-label { display: block; margin: 0 0 1.2rem; color: var(--second); }
.chapter blockquote {
  margin: 2rem 0 1.6rem; padding: 0; border: 0;
  max-width: 36rem;
  font-size: 1.16rem; line-height: 1.64;
}
.chapter blockquote::before {
  content: "◆";
  display: block; margin: 0 0 .7rem;
  color: var(--etoile); font: 400 .85rem/1 var(--mono);
}
.chapter blockquote p { margin: 0; }

/* figures de substitution */
.chapter figure { margin: 2.6rem 0; max-width: 34rem; }
.comp { position: relative; height: 250px; border: 1px solid var(--filet); background: var(--papier2); overflow: hidden; }
.comp span { position: absolute; }
.comp--field .c1 { left: 50%; top: 50%; width: 190px; height: 190px; margin: -95px; border: 1px solid var(--filet-fort); border-radius: 50%; }
.comp--field .c2 { left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px; border: 1px dotted var(--filet-fort); border-radius: 50%; }
.comp--field .c3 { left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border: 1px solid var(--filet); border-radius: 50%; }
.comp--field .pt { left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; background: var(--etoile); border-radius: 50%; }
.comp--field .fig { left: 18%; bottom: 20%; width: 1px; height: 64px; background: var(--encre); }
.comp--geometry .ring { left: 50%; top: 50%; width: 160px; height: 160px; margin: -80px; border: 1px solid var(--filet-fort); border-radius: 50%; }
.comp--geometry .pt { width: 8px; height: 8px; margin: -4px; border: 1px solid var(--encre); border-radius: 50%; background: var(--papier2); }
.comp--geometry .pt.actif { background: var(--etoile); border-color: var(--etoile); }
.comp--geometry .centre { left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; background: var(--second); border-radius: 50%; }
.comp--infinity .l, .comp--infinity .r { top: 50%; width: 110px; height: 110px; margin-top: -55px; border: 1px solid var(--encre); border-radius: 50%; }
.comp--infinity .l { left: 50%; margin-left: -104px; }
.comp--infinity .r { left: 50%; margin-left: -6px; border-color: var(--etoile); }
.comp--drawing .corps { left: 50%; top: 50%; width: 90px; height: 170px; margin: -85px 0 0 -45px; border: 1px solid var(--encre); border-radius: 50px; }
.comp--drawing .orbite { left: 50%; top: 50%; width: 170px; height: 90px; margin: -45px 0 0 -85px; border: 1px dotted var(--filet-fort); border-radius: 50%; }
.comp--drawing .axe { left: 50%; top: 14%; bottom: 14%; width: 1px; background: var(--etoile); }
.chapter figcaption { margin-top: .8rem; font-size: .8rem; font-style: italic; color: var(--encre2); line-height: 1.55; }
.chapter figcaption small { display: block; font: 400 .62rem/1.6 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; margin-top: .3rem; }

/* ——— pied ——— */
footer {
  margin-top: clamp(4rem, 9vh, 6.5rem);
  border-top: 1px solid var(--filet-fort);
  padding: 1.6rem clamp(1.25rem, 5vw, 3rem) 2.2rem;
  font-size: .85rem; color: var(--encre2);
}
footer p { margin: 0 0 .5rem; max-width: 46rem; }
footer strong { color: var(--encre); }
footer code { font: 400 .8em var(--mono); }
footer .sig { margin-top: 1.2rem; font: 600 .64rem/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; }

@media (max-width: 60rem) {
  .cover { grid-template-columns: 1fr; }
  .figure-point { max-width: 240px; }
  .reader-shell { grid-template-columns: 1fr; }
  .reader-nav { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--filet); padding: 1.4rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fil { animation: none; display: none; }
}
@media print {
  .skip-link, .topnav, .fil, .reader-nav, .reading-routes { display: none; }
  body { font-size: 12pt; }
  .only-essai { display: block; }
}

/* blocs-source importés (V2 garnissage) */
.chapter blockquote.source-importee {
  border-left: 2px solid var(--etoile);
  padding-left: 1.2rem;
  font-size: 1.05rem;
}
.chapter blockquote.source-importee::before { content: none; }
.chapter blockquote.source-importee .voix-label { margin-bottom: .8rem; color: var(--etoile); }
.voix-label--liaison { margin-top: 1.6rem; }
.chapter .provenance {
  font-size: .8rem; font-style: italic; color: var(--encre2);
  max-width: 34rem; margin: -.4rem 0 1.6rem;
}

/* --- figures de chapitre — restituées le 2026-07-23 depuis la source Claude Design.
   Les images existaient dans assets/ mais n'étaient plus appelées : elles étaient
   rendues par app.js, orphelin depuis la conversion statique. --- */
.chapter__image {
  margin: 4rem -10vw 4rem auto;
  width: min(64rem, 120%);
}
.chapter__image img { display: block; max-width: 100%; }
.chapter__image--field { width: min(53rem, 110%); border-radius: 50% 50% 0 0; overflow: hidden; }
.chapter__image--field img { aspect-ratio: 16/8; width: 100%; object-fit: cover; object-position: center 54%; filter: saturate(.7) contrast(1.04); }
.chapter__image--drawing { width: min(25rem, 66%); margin-left: auto; margin-right: auto; }
.chapter__image--infinity { width: min(44rem, 100%); padding: 2rem; background: var(--ink); }
.chapter__image--geometry { width: min(45rem, 100%); margin-left: auto; margin-right: auto; }
.chapter__image figcaption {
  margin-top: .8rem;
  color: var(--water);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
}
@media (max-width: 900px) {
  .chapter__image { width: 100%; margin: 3rem 0; }
}
