

:root {
  --ink: #1a1410;
  --ink-light: #3d3028;
  --paper: #f5f0e8;
  --paper-dark: #ede5d4;
  --paper-darker: #e0d5c0;
  --red: #8b1a1a;
  --red-muted: #c0392b;
  --gold: #b8922a;
  --gold-light: #d4a843;
  --grey: #7a6e62;
  --grey-light: #b0a090;
  --shadow: rgba(26,20,16,0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── PROGRESS BAR ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--red); width: 0%; z-index: 9999;
  transition: width 0.1s linear;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245,240,232,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-darker);
  padding: 0 2rem;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
}
.nav-chapters {
  display: flex; gap: 1.5rem;
}
.nav-chapters a {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-chapters a:hover { color: var(--red); }
@media (max-width: 640px) { .nav-chapters { display: none; } }

/* ── COVER ── */
.cover {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 6rem 2rem 4rem;
}
.cover-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(139,26,26,0.06) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(26,20,16,0.04) 59px,
      rgba(26,20,16,0.04) 60px
    );
}
.cover-ornament {
  width: 60px; height: 2px;
  background: var(--red);
  margin: 0 auto 2rem;
}
.cover-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
}
.cover-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  color: var(--ink);
  max-width: 700px;
  margin-bottom: 1rem;
}
.cover-title em {
  display: block;
  font-style: italic;
  color: var(--red);
  font-size: 0.75em;
}
.cover-divider {
  width: 80px; height: 1px;
  background: linear-gradient(to right, transparent, var(--grey-light), transparent);
  margin: 2rem auto;
}
.cover-epigraph {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--grey);
  text-align: center;
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 3rem;
}
.cover-scroll {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--grey-light);
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
}
.cover-scroll svg { opacity: 0.4; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── ILLUSTRATIONS ── */
.illustration {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
}
.illustration-full {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  max-height: 480px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.illustration-full svg { width: 100%; height: 480px; }

.illus-inline {
  float: right;
  width: 260px;
  margin: 0 0 1.5rem 2.5rem;
  shape-outside: circle(50%);
}
@media (max-width: 600px) {
  .illus-inline {
    float: none; width: 100%; margin: 0 0 1.5rem 0;
    shape-outside: none;
  }
}

/* ── CHAPTER STRUCTURE ── */
.chapter-break {
  page-break-before: always;
  margin-top: 5rem;
}

.chapter-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  text-align: center;
  position: relative;
}
.chapter-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.chapter-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.chapter-rule {
  width: 40px; height: 2px;
  background: var(--red);
  margin: 1.5rem auto 0;
}

/* ── SECTION HEADERS ── */
.section-header {
  max-width: 760px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}
.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-light);
  border-left: 2px solid var(--red);
  padding-left: 0.75rem;
  line-height: 1.4;
}

/* ── TEXT BODY ── */
.text-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
}
.text-body p {
  margin-bottom: 1.2em;
  text-align: justify;
  hyphens: auto;
  font-weight: 300;
  font-size: 1.05rem;
}
.text-body p:first-child::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4.2em;
  font-weight: 900;
  float: left;
  line-height: 0.75;
  margin: 0.08em 0.08em 0 0;
  color: var(--red);
  padding-right: 4px;
}
.text-body p.no-drop::first-letter { all: unset; }
.text-body p.no-drop { }

/* ── DIALOGUE ── */
.dialogue-block {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.2rem 2rem 0;
}
.speaker {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 1rem;
  margin-bottom: 0.15rem;
}
.line {
  font-family: 'Crimson Pro', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-light);
  padding-left: 1.2rem;
  border-left: 2px solid var(--paper-darker);
  line-height: 1.65;
  margin-bottom: 0.3rem;
}
.action {
  font-size: 1rem;
  color: var(--grey);
  font-style: italic;
  padding: 0.2rem 2rem 0;
  max-width: 680px;
  margin: 0 auto;
  display: block;
}

/* ── SECTION BREAK ── */
.dots {
  text-align: center;
  color: var(--grey-light);
  font-size: 1.4rem;
  letter-spacing: 0.5rem;
  margin: 2.5rem auto;
  max-width: 680px;
  padding: 0 2rem;
}

/* ── PULL QUOTES ── */
.pull-quote {
  max-width: 580px;
  margin: 3rem auto;
  padding: 2rem 2.5rem;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--paper-darker);
  text-align: center;
}
.pull-quote p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--ink-light);
  line-height: 1.4;
}

/* ── POV INTERLUDE ── */
.pov-block {
  background: var(--paper-dark);
  border-left: 4px solid var(--red);
  padding: 2rem 2.5rem;
  margin: 2.5rem auto;
  max-width: 680px;
  margin-left: auto; margin-right: auto;
  position: relative;
}
.pov-block::before {
  content: attr(data-label);
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
}
.pov-block p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: 0.8em;
  font-style: italic;
}

/* ── CRIME SCENE NOTES ── */
.evidence-card {
  background: #fffef5;
  border: 1px solid var(--paper-darker);
  box-shadow: 3px 3px 0 var(--paper-darker);
  padding: 1.5rem 2rem;
  max-width: 560px;
  margin: 2.5rem auto;
  position: relative;
  transform: rotate(-0.5deg);
}
.evidence-card::before {
  content: "NOTE D'ENQUÊTE";
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--red);
  display: block;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--paper-darker);
}
.evidence-card ul {
  list-style: none;
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: #2a211b;
  /*color: var(--ink-light);*/
}
.evidence-card ul li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}
.evidence-card ul li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--red);
}

/* ── TIMELINE / CHAPTER NAV ── */
.toc {
  max-width: 680px;
  margin: 2rem auto 4rem;
  padding: 0 2rem;
}
.toc-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--paper-darker);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.toc-item:hover { color: var(--red); }
.toc-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: var(--grey-light);
  letter-spacing: 0.1em;
  min-width: 60px;
}
.toc-name {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.1rem;
}
.toc-dots {
  flex: 1;
  border-bottom: 1px dotted var(--paper-darker);
  margin-bottom: 3px;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 4rem 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--grey-light);
  border-top: 1px solid var(--paper-darker);
}

/* ── FADE IN ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ADJUSTMENTS ── */
@media (max-width: 640px) {
  .text-body, .dialogue-block { padding-left: 1.25rem; padding-right: 1.25rem; }
  .chapter-header { padding: 3rem 1.25rem 1.5rem; }
  .section-header { padding: 0 1.25rem; }
  .pull-quote { margin: 2rem 1.25rem; padding: 1.5rem; }
  .pov-block { margin: 2rem 1.25rem; }
  .evidence-card { margin: 2rem 1.25rem; }
  .action { padding: 0 1.25rem; }
  .dots { padding: 0 1.25rem; }
  nav { padding: 0 1.25rem; }
}


/* ==========================================================
   Version découpée blog/mobile - mode nuit par défaut
   ========================================================== */
:root {
  --ink: #f3eadc;
  --ink-light: #d7c8b5;
  --paper: #11100f;
  --paper-dark: #191614;
  --paper-darker: #2c2520;
  --red: #d34a3f;
  --red-muted: #e15b50;
  --gold: #d2a94a;
  --gold-light: #efc86a;
  --grey: #bba996;
  --grey-light: #837466;
  --shadow: rgba(0,0,0,0.45);
}
html { scroll-padding-top: 78px; }
body { background: radial-gradient(circle at top, #1b1714 0, var(--paper) 38rem); color: var(--ink); padding-top: 58px; }
body.light-mode {
  --ink: #1a1410;
  --ink-light: #3d3028;
  --paper: #f5f0e8;
  --paper-dark: #ede5d4;
  --paper-darker: #e0d5c0;
  --red: #8b1a1a;
  --red-muted: #c0392b;
  --gold: #b8922a;
  --gold-light: #d4a843;
  --grey: #7a6e62;
  --grey-light: #b0a090;
  --shadow: rgba(26,20,16,0.18);
  background: var(--paper);
}
nav.reader-nav {
  height: 58px;
  padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-left));
  background: rgba(17,16,15,0.92);
  border-bottom: 1px solid var(--paper-darker);
}
body.light-mode nav.reader-nav { background: rgba(245,240,232,0.94); }
.reader-actions { display:flex; align-items:center; gap:.45rem; }
.icon-btn, .chapter-select {
  border: 1px solid var(--paper-darker);
  background: var(--paper-dark);
  color: var(--ink);
  border-radius: 999px;
  min-height: 38px;
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
}
.icon-btn { min-width: 38px; padding: 0 .75rem; cursor:pointer; }
.chapter-select { max-width: 42vw; padding: 0 .75rem; }
.home-link { color: inherit; text-decoration:none; }
.reader-shell { min-height: 100vh; }
.chapter-break { margin-top: 0; padding-bottom: 2rem; }
.chapter-header { padding-top: 5rem; }
.text-body p { text-wrap: pretty; }
.reader-bottom-nav {
  max-width: 680px;
  margin: 4rem auto 2rem;
  padding: 0 1.25rem;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap:.75rem;
  align-items:center;
}
.reader-bottom-nav a {
  display:flex;
  min-height:44px;
  align-items:center;
  justify-content:center;
  padding:.65rem .8rem;
  border:1px solid var(--paper-darker);
  border-radius:999px;
  color:var(--ink);
  text-decoration:none;
  background:var(--paper-dark);
  font-family:'Space Mono', monospace;
  font-size:.68rem;
  letter-spacing:.05em;
}
.reader-bottom-nav a:hover { color:var(--red); }
.reader-bottom-nav .prev { justify-content:flex-start; }
.reader-bottom-nav .next { justify-content:flex-end; }
.resume-card {
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--paper-darker);
  background: rgba(25,22,20,.78);
  border-radius: 18px;
  text-align: center;
}
body.light-mode .resume-card { background: rgba(237,229,212,.78); }
.resume-card a { color: var(--ink); text-decoration:none; font-family:'Space Mono', monospace; font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; }
.reading-settings {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 90;
  display:flex;
  gap:.4rem;
  background: rgba(17,16,15,.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--paper-darker);
  border-radius: 999px;
  padding: .35rem;
}
body.light-mode .reading-settings { background: rgba(245,240,232,.75); }
.reading-settings button { border:0; background:transparent; color:var(--ink); min-width:34px; min-height:34px; border-radius:50%; font-size:1rem; cursor:pointer; }
.cover { padding-top: 3rem; }
.cover .toc-item { min-height: 44px; }
.skip-link { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:1rem; top:1rem; width:auto; height:auto; z-index:10000; background:var(--red); color:white; padding:.5rem .75rem; border-radius:.5rem; }
@media (max-width: 640px) {
  body { font-size: 18px; line-height: 1.72; padding-bottom: 4.2rem; }
  .nav-title { max-width: 42vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .chapter-select { display:block; }
  .reader-bottom-nav { grid-template-columns: 1fr; }
  .reader-bottom-nav .prev, .reader-bottom-nav .next { justify-content:center; }
  .text-body p { text-align:left; hyphens:auto; font-size:1.08rem; }
  .text-body p:first-child::first-letter { font-size:3.3em; }
  .illustration, svg { max-width:100%; height:auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity:1 !important; transform:none !important; transition:none !important; }
  .cover-scroll { animation:none; }
}
