/* ============================================================
   Roman.css — Page « Roman » + mode lecture chapitre
   Site Rébecca Lévy-Guillain · "Scènes de la vie étudiante"

   Deux modes :
   - .ro-page (entrée chorale)
   - .ro-page--chapter (mode lecture immersif)
   ============================================================ */

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

:root {
  --ro-encre: #0E2540;
  --ro-nuit: #16314F;
  --ro-marine: #1F3F5C;
  --ro-or: #C9A86C;
  --ro-or-deep: #A8884B;
  --ro-or-pale: #E8D7AA;
  --ro-ivoire: #F4ECDC;
  --ro-ivoire-soft: #FAF4E6;
  --ro-ivoire-deep: #EBDFC4;
  --ro-casse: #FBF8F1;
  --ro-papier: #F8F0DD;       /* fond mode lecture, ivoire chaud légèrement plus pale */
  --ro-text-dim: #6B6B6B;
  --ro-gris-1: #E8E5DD;

  --ro-f-display: 'DM Serif Display', Georgia, serif;
  --ro-f-sans: 'Manrope', system-ui, sans-serif;
  --ro-f-serif: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
.ro-page {
  margin: 0; padding: 0;
  font-family: var(--ro-f-sans);
  color: var(--ro-encre);
  background: var(--ro-ivoire);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}
.ro-page img { max-width: 100%; display: block; }
.ro-page a { color: inherit; }

/* ===================================================================
   PAGE D'ENTREE (Roman.html)
   =================================================================== */

/* Nav — reprend la nav globale .v7__nav (chargée via rlg-components) */

.ro__hero {
  position: relative;
  padding: 200px 48px 120px;
  background: var(--ro-ivoire);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(168,136,75,.18);
}
.ro__hero::before {
  content: "";
  position: absolute; right: -100px; top: 100px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(168,136,75,.15);
  pointer-events: none;
}
.ro__hero::after {
  content: "";
  position: absolute; left: -80px; bottom: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(217,168,95,.05);
  pointer-events: none;
}
.ro__hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  font-family: var(--ro-f-display);
  font-style: italic;
}
.ro__hero-bg .w {
  position: absolute;
  color: rgba(168,136,75,.07);
  line-height: 0.85;
  white-space: nowrap;
  letter-spacing: -.04em;
}
.ro__hero-bg .w1 { font-size: 240px; top: 80px; left: -40px; }
.ro__hero-bg .w2 { font-size: 180px; bottom: 60px; right: -20px; color: rgba(38,70,107,.07); }

.ro__hero-in {
  max-width: 1100px; margin: 0 auto;
  text-align: center;
  position: relative; z-index: 1;
}
.ro__hero-crumbs {
  font-family: var(--ro-f-sans); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; font-weight: 600; color: var(--ro-text-dim);
  display: inline-flex; gap: 14px; align-items: center;
  margin-bottom: 32px;
}
.ro__hero-crumbs a { color: var(--ro-text-dim); text-decoration: none; transition: color .25s; }
.ro__hero-crumbs a:hover { color: var(--ro-or-deep); }
.ro__hero-crumbs .cur { color: var(--ro-encre); font-weight: 700; }

.ro__hero-eb {
  font-family: var(--ro-f-sans); font-size: 12px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase; color: var(--ro-or-deep);
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.ro__hero-eb::before, .ro__hero-eb::after {
  content: ""; width: 36px; height: 1px; background: currentColor;
}

.ro__hero h1 {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: clamp(56px, 8vw, 124px);
  line-height: 0.95; letter-spacing: -0.03em;
  color: var(--ro-encre);
  margin: 0 auto;
  font-weight: 400;
  text-wrap: balance;
  max-width: 18ch;
}
.ro__hero h1 .dot { color: var(--ro-or); }

.ro__hero-sub {
  font-family: var(--ro-f-serif); font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.4;
  color: var(--ro-text-dim);
  margin: 36px auto 0;
  max-width: 56ch;
  font-weight: 400; text-wrap: balance;
}

.ro__hero-meta {
  display: flex; justify-content: center; gap: 56px;
  margin-top: 60px;
  flex-wrap: wrap;
}
.ro__hero-meta .item {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ro-text-dim);
  text-align: center;
}
.ro__hero-meta .item b {
  display: block;
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 40px; line-height: 1;
  color: var(--ro-encre);
  margin-bottom: 8px;
  letter-spacing: 0; text-transform: none; font-weight: 400;
}

.ro__hero-cta {
  margin-top: 64px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.ro__hero-cta a {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 36px;
  font-family: var(--ro-f-sans); font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}
.ro__hero-cta .primary {
  background: var(--ro-or);
  color: var(--ro-encre);
}
.ro__hero-cta .primary:hover {
  background: var(--ro-encre); color: var(--ro-or-pale);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(14,37,64,.25);
}
.ro__hero-cta .secondary {
  background: transparent;
  color: var(--ro-encre);
  border: 1.5px solid var(--ro-encre);
}
.ro__hero-cta .secondary:hover {
  background: var(--ro-encre); color: var(--ro-ivoire);
  transform: translateY(-2px);
}

/* Bridge bleu - intro */
.ro__intro {
  background: var(--ro-encre); color: var(--ro-ivoire);
  padding: 120px 48px;
}
.ro__intro-in {
  max-width: 760px; margin: 0 auto;
  text-align: center;
}
.ro__intro-eb {
  font-family: var(--ro-f-sans); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ro-or);
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.ro__intro-eb::before, .ro__intro-eb::after {
  content: ""; width: 36px; height: 1px; background: currentColor;
}
.ro__intro h2 {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1.1;
  color: var(--ro-ivoire);
  margin: 0 auto 28px;
  font-weight: 400; letter-spacing: -.02em;
  text-wrap: balance;
}
.ro__intro p {
  font-family: var(--ro-f-serif); font-style: italic;
  font-size: 22px; line-height: 1.5;
  color: var(--ro-or-pale);
  margin: 0 auto 22px;
  max-width: 60ch;
  text-wrap: pretty;
}

/* === SECTION : LES VOIX (chorale) === */
.ro__voix {
  background: var(--ro-ivoire-deep);
  padding: 144px 48px 120px;
  position: relative;
}
.ro__voix-in {
  max-width: 1320px; margin: 0 auto;
}
.ro__voix-h {
  text-align: center;
  max-width: 780px; margin: 0 auto 80px;
}
.ro__voix-h .eb {
  font-family: var(--ro-f-sans); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ro-or-deep); font-weight: 700;
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.ro__voix-h .eb::before, .ro__voix-h .eb::after {
  content: ""; width: 36px; height: 1px; background: currentColor;
}
.ro__voix-h h2 {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: clamp(36px, 5vw, 64px); line-height: 1;
  color: var(--ro-encre); font-weight: 400; letter-spacing: -.02em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.ro__voix-h p {
  font-family: var(--ro-f-serif); font-style: italic;
  font-size: 20px; color: var(--ro-text-dim); line-height: 1.45;
  margin: 0 auto; max-width: 56ch;
}

.ro__voix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.ro__voix-card {
  background: var(--ro-casse);
  border: 1px solid rgba(168,136,75,.22);
  border-top: 3px solid var(--ro-or);
  padding: 28px 22px 24px;
  text-decoration: none;
  color: var(--ro-encre);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  min-height: 200px;
}
.ro__voix-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(14,37,64,.12);
  border-top-color: var(--ro-or-deep);
}
.ro__voix-card .lead {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 56px; line-height: 0.85;
  color: var(--ro-or);
  margin-bottom: 4px;
}
.ro__voix-card .name {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 28px; line-height: 1.1;
  color: var(--ro-encre); margin: 0 0 6px;
  letter-spacing: -.015em;
  font-weight: 400;
}
.ro__voix-card .hint {
  font-family: var(--ro-f-serif); font-style: italic;
  font-size: 15px; color: var(--ro-text-dim);
  line-height: 1.4; flex-grow: 1;
}
.ro__voix-card .meta {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid rgba(168,136,75,.22);
  font-family: var(--ro-f-sans); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ro-or-deep); font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.ro__voix-card .meta .arrow {
  font-size: 14px; color: var(--ro-or);
  transition: transform .3s;
}
.ro__voix-card:hover .meta .arrow {
  transform: translateX(4px); color: var(--ro-or-deep);
}

/* === SECTION : SOMMAIRE COMPLET === */
.ro__toc {
  background: var(--ro-ivoire-soft);
  padding: 144px 48px 144px;
}
.ro__toc-in {
  max-width: 880px; margin: 0 auto;
}
.ro__toc-h {
  text-align: center;
  margin: 0 auto 80px;
}
.ro__toc-h .eb {
  font-family: var(--ro-f-sans); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ro-or-deep); font-weight: 700;
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.ro__toc-h .eb::before, .ro__toc-h .eb::after {
  content: ""; width: 36px; height: 1px; background: currentColor;
}
.ro__toc-h h2 {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: clamp(36px, 5vw, 60px); line-height: 1;
  color: var(--ro-encre); font-weight: 400; letter-spacing: -.02em;
  margin: 0;
}
.ro__toc-part {
  margin-bottom: 48px;
}
.ro__toc-part-h {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ro-or-deep); font-weight: 700;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(168,136,75,.3);
}
.ro__toc-part-h::before {
  content: ""; width: 40px; height: 1px; background: var(--ro-or);
}
.ro__toc-list {
  list-style: none; padding: 0; margin: 0;
}
.ro__toc-list li {
  border-bottom: 1px solid rgba(168,136,75,.12);
}
.ro__toc-list a {
  display: grid; grid-template-columns: 50px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 22px 4px;
  text-decoration: none;
  color: var(--ro-encre);
  transition: color .25s, padding-left .25s;
}
.ro__toc-list a:hover {
  color: var(--ro-or-deep);
  padding-left: 12px;
}
.ro__toc-list .n {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 22px; color: var(--ro-or-deep);
  letter-spacing: -.01em;
}
.ro__toc-list .ttl {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 22px; line-height: 1.25;
  letter-spacing: -.005em;
  font-weight: 400;
}
.ro__toc-list .min {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ro-text-dim); font-weight: 600;
  white-space: nowrap;
}

/* === SECTION FINALE : DISCLAIMER / AUTRICE === */
.ro__credits {
  background: var(--ro-encre); color: var(--ro-or-pale);
  padding: 96px 48px;
  text-align: center;
}
.ro__credits-in {
  max-width: 640px; margin: 0 auto;
}
.ro__credits p {
  font-family: var(--ro-f-serif); font-style: italic;
  font-size: 18px; line-height: 1.55;
  margin: 0 auto 16px;
}
.ro__credits .author {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 28px; color: var(--ro-ivoire);
  margin-top: 28px;
}

/* ===================================================================
   MODE LECTURE (.ro-page--chapter)
   =================================================================== */

.ro-page--chapter {
  background: var(--ro-papier);
  color: var(--ro-encre);
  min-height: 100vh;
}

/* Topbar minimaliste */
.ro__topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px 32px;
  background: rgba(248,240,221,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(168,136,75,.2);
}
.ro__topbar-home {
  font-family: var(--ro-f-display);
  font-size: 22px;
  color: var(--ro-encre);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color .25s, color .25s;
}
.ro__topbar-home:hover { border-color: var(--ro-or); color: var(--ro-or-deep); }

.ro__topbar-toc {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
  color: var(--ro-encre); text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--ro-or-deep);
  border-radius: 99px;
  transition: background .25s, color .25s;
}
.ro__topbar-toc:hover { background: var(--ro-or); color: var(--ro-encre); }
.ro__topbar-toc .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ro-or);
}

.ro__topbar-title {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 18px;
  color: var(--ro-encre);
  text-align: center;
  letter-spacing: -.005em;
}

.ro__topbar-progress {
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: transparent;
}
.ro__topbar-progress-bar {
  display: block; height: 100%;
  background: var(--ro-or);
  transition: width .15s linear;
  width: 0%;
}

.ro__topbar-meta {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ro-text-dim); font-weight: 600;
}

/* Article chapitre */
.ro__chapter {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}

.ro__chapter-head {
  text-align: center;
  margin-bottom: 72px;
}
.ro__chapter-part {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ro-or-deep); font-weight: 700;
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 14px;
}
.ro__chapter-part::before, .ro__chapter-part::after {
  content: ""; width: 32px; height: 1px; background: currentColor;
}
.ro__chapter-title {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.0; letter-spacing: -.02em;
  color: var(--ro-encre);
  margin: 0 0 32px;
  font-weight: 400;
  text-wrap: balance;
}
.ro__chapter-meta {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ro-text-dim);
  display: inline-flex; align-items: center; gap: 12px;
}
.ro__chapter-meta .sep { color: var(--ro-or); }
.ro__chapter-rule {
  width: 80px; height: 1px;
  background: var(--ro-or);
  margin: 56px auto 0;
}

/* Corps du chapitre — typographie de lecture */
.ro__chapter-body {
  font-family: var(--ro-f-serif);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.65;
  color: var(--ro-encre);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.ro__chapter-body p {
  margin: 0 0 18px;
  text-indent: 1.4em;
}
/* Premier paragraphe sans indent */
.ro__chapter-body > p:first-child {
  text-indent: 0;
}
.ro__chapter-body > p:first-child::first-letter {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 4.2em; line-height: 0.85;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--ro-or-deep);
}
.ro__chapter-body em {
  font-style: italic;
  /* Cormorant italic deja, on l'accentue un peu */
}
.ro__chapter-body strong {
  font-weight: 600;
  color: var(--ro-encre);
}

/* Paragraphe de dialogue (commence par -) - on conserve l'indent mais retire la first-letter */
.ro__chapter-body p:has(em:only-child) {
  font-style: italic;
}

/* Footer chapitre — nav prev/next */
.ro__chapter-foot {
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid rgba(168,136,75,.3);
}
.ro__chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 48px;
}
.ro__btn {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 24px 28px;
  background: var(--ro-casse);
  border: 1px solid rgba(168,136,75,.3);
  border-radius: 4px;
  text-decoration: none; color: var(--ro-encre);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  min-height: 80px;
}
.ro__btn:hover {
  transform: translateY(-2px);
  border-color: var(--ro-or);
  box-shadow: 0 12px 24px rgba(14,37,64,.08);
}
.ro__btn .dir {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 20px; color: var(--ro-or);
}
.ro__btn .lbl {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700;
  color: var(--ro-or-deep);
}
.ro__btn .sub {
  font-family: var(--ro-f-display); font-style: italic;
  font-size: 17px; color: var(--ro-encre);
  line-height: 1.2; letter-spacing: -.005em;
}
.ro__btn--prev { text-align: left; }
.ro__btn--next { text-align: right; align-items: flex-end; }
.ro__btn--toc {
  align-items: center; justify-content: center;
  background: var(--ro-encre); color: var(--ro-ivoire);
  border-color: var(--ro-encre);
  text-align: center;
}
.ro__btn--toc:hover {
  background: var(--ro-or-deep); border-color: var(--ro-or-deep);
}
.ro__btn--toc .dir { color: var(--ro-or-pale); font-size: 18px; }
.ro__btn--toc .lbl { color: var(--ro-or-pale); }
.ro__btn--ghost {
  background: transparent;
  border: 1px dashed rgba(168,136,75,.3);
  pointer-events: none;
}

.ro__chapter-credit {
  font-family: var(--ro-f-sans); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ro-text-dim); text-align: center;
  margin: 32px 0 0;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 1100px) {
  .ro__hero { padding: 140px 28px 80px; }
  .ro__voix { padding: 100px 28px 80px; }
  .ro__voix-grid { grid-template-columns: repeat(2, 1fr); }
  .ro__toc { padding: 100px 28px; }
  .ro__intro { padding: 80px 28px; }
  .ro__credits { padding: 64px 28px; }
}

@media (max-width: 700px) {
  .ro__hero-meta { gap: 32px; }
  .ro__voix-grid { grid-template-columns: 1fr; }
  .ro__chapter { padding: 110px 22px 60px; }
  .ro__chapter-body { text-align: left; hyphens: none; }
  .ro__chapter-nav { grid-template-columns: 1fr; }
  .ro__btn--next { text-align: left; align-items: flex-start; }
  .ro__topbar { grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 16px; }
  .ro__topbar-title { display: none; }
  .ro__topbar-meta { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ro__voix-card { transition: none; }
  .ro__btn { transition: none; }
}
