/* Route /livre-de-vie.html • Fichier dist/styles/livre.css */
.reader {
  --reader-ink: #23364d;
  --reader-paper: #f8f2e1;
  --reader-gold: #806a42;
  --reader-serif: var(--serif, Georgia, serif);
  background: #fbf8f1;
  color: var(--reader-ink);
  padding: clamp(26px, 4vw, 56px) clamp(16px, 5vw, 78px) clamp(42px, 6vw, 86px);
}
.reader [hidden] { display: none !important; }
.reader-introduction, .reader-shell { max-width: 1056px; margin: 0 auto; }
.reader-introduction { margin-bottom: 26px; }
.reader-back {
  color: #4f5a61;
  font-size: .875rem;
  text-decoration-line: underline;
  text-underline-offset: .25em;
  text-decoration-color: #bcb19b;
}
.reader-introduction h1 {
  margin: 18px 0 12px;
  color: #1a2e4b;
  font: 400 clamp(3.15rem, 6vw, 5.8rem)/.99 var(--reader-serif);
  letter-spacing: -.048em;
}
.reader-introduction h1 em, .reader-prose h2 em {
  color: var(--reader-gold);
  font-weight: inherit;
}
.reader-introduction > p {
  max-width: 650px;
  line-height: 1.55;
  font-size: 1rem;
  color: #4d575e;
}
.reader button { font: inherit; cursor: pointer; }
.reader button:focus-visible, .reader a:focus-visible {
  outline: 3px solid #8e6420;
  outline-offset: 3px;
}
.reader .reader-chapters {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #d1c6af;
}
.reader-chapters button {
  color: #465660;
  background: transparent;
  padding: 10px 20px;
  min-height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-size: .95rem;
}
.reader-chapters button:first-child { padding-left: 1px; padding-right: 20px; }
.reader-chapters button[aria-current="page"] { border-color: #927443; color: #162b48; font-weight: 600; }
.reader-desk {
  margin-top: 18px;
  padding: clamp(17px, 3.6vw, 45px);
  background: radial-gradient(ellipse at 20% 15%, #657787, #354859 65%, #29384b);
  border-radius: 3px;
}
.reader-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  color: var(--reader-ink);
  border: 4px solid #3a4446;
  border-top-width: 3px;
  border-bottom-color: #9c8d72;
  border-radius: 4px;
  box-shadow: 1px 4px #d8cdb2, 2px 6px #8d826d, 5px 13px 19px #14233465;
}
.reader-spread + .reader-spread { margin-top: 28px; }
.reader[data-enhanced] .reader-spread { margin-top: 0; }
.reader-page {
  min-width: 0;
  min-height: 340px;
  padding: clamp(18px, 3vw, 44px);
  display: grid;
  align-content: center;
}
.reader-left { background: linear-gradient(95deg, #eee5ce, #fcf6e8 12%, #f6efdc 90%, #d3c4a8); }
.reader-right { background: linear-gradient(90deg, #ded1b6, #f8f1df 9%, #fbf5e6 78%, #eee5d0); }
.reader-photo {
  padding: 9px 9px 14px;
  margin: 0 auto;
  max-width: 348px;
  background: #fffaf0;
  border: 1px solid #e6dcca;
  box-shadow: 0 3px 7px #57492d28;
  transform: rotate(-2deg);
}
.reader-photo img { width: 100%; height: auto; display: block; }
.reader-photo figcaption {
  font: italic 1.25rem/1.2 var(--reader-serif);
  color: #665b43;
  padding: 10px 4px 0;
  text-align: center;
}
.reader-prose { max-width: 370px; }
.reader-kicker {
  font-size: .8125rem;
  color: #775e31;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.reader-prose h2 {
  margin: 12px 0 20px;
  font: 400 clamp(2rem, 3.4vw, 3.75rem)/.98 var(--reader-serif);
  letter-spacing: -.035em;
}
.reader-prose > p:not(.reader-kicker) { margin: 0 0 12px; color: #3a464b; line-height: 1.6; font-size: 1rem; }
.reader-prose > p:last-child { margin-bottom: 0; }
.reader-paper-note, .reader-letter {
  margin: auto;
  width: min(100%, 280px);
  padding: clamp(20px, 3vw, 35px);
  background: #fffbee;
  border: 1px solid #dcd3ba;
  box-shadow: 0 3px 7px #51442d25;
  transform: rotate(-2deg);
}
.reader-letter { transform: rotate(1deg); }
.reader-paper-note p, .reader-letter p {
  margin: 16px 0;
  font: italic clamp(1.4rem, 2.1vw, 2.1rem)/1.25 var(--reader-serif);
  color: #5e5947;
}
.reader-note-rule { display: block; width: 32px; height: 1px; background: #a08d62; }
.reader-note-lines {
  display: block;
  height: 28px;
  background: repeating-linear-gradient(to bottom, transparent 0 12px, #cfbf9e 13px, transparent 14px);
}
.reader-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
}
.reader-position { text-align: center; font-size: .875rem; color: #4e5a65; }
.reader-turn {
  color: #1d334f;
  background: #f5ecd9;
  border: 1px solid #bca77b;
  border-radius: 3px;
  min-height: 44px;
  padding: 8px 17px;
}
.reader-turn:disabled { color: #666b6f; background: #f5f2eb; border-color: #cec9bb; cursor: default; }
.reader-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; }
#reader-print {
  color: #304965;
  border: 0;
  background: none;
  font-size: .875rem;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 700px) {
  .reader { padding-left: 16px; padding-right: 16px; }
  .reader-introduction { margin-bottom: 18px; }
  .reader-chapters button { flex: 1; padding: 8px 6px; }
  .reader-chapters button:first-child { padding: 8px 6px; }
  .reader-desk { padding: 8px; }
  .reader-spread { grid-template-columns: 1fr; border-width: 1px; }
  .reader-page { min-height: 0; padding: 20px; }
  .reader-left { background: #efe7d4; padding: 16px; }
  .reader-right { background: #faf4e4; }
  .reader-photo { width: min(100%, 235px); padding: 5px 5px 7px; transform: none; }
  .reader-photo figcaption { font-size: 1rem; padding-top: 5px; }
  .reader-paper-note, .reader-letter { padding: 16px 19px; transform: none; }
  .reader-paper-note p, .reader-letter p { margin: 10px 0; }
  .reader-prose { max-width: none; }
  .reader-prose h2 { margin: 7px 0 12px; }
  .reader-turn { font-size: .875rem; padding: 7px 10px; }
  .reader-controls { gap: 5px; }
  .reader-position { font-size: .8125rem; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body > :not(.reader), .reader-introduction, .reader .reader-chapters, .reader .reader-controls, .reader-bottom { display: none !important; }
  body, .reader, .reader-shell, .reader-desk { margin: 0 !important; padding: 0 !important; max-width: none; background: #fff !important; }
  .reader .reader-spread, .reader .reader-spread[hidden] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    min-height: 169mm;
    border: 1px solid #b9ab91;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0;
  }
  .reader .reader-spread:last-child { break-after: auto; page-break-after: auto; }
  .reader-page { padding: 9mm; min-height: auto; }
  .reader-page, .reader-paper-note, .reader-letter { background: white; }
  .reader-photo, .reader-paper-note, .reader-letter { transform: none; box-shadow: none; }
  .reader-prose p { color: #222; }
}
