/* Mise en page du livret (HTML issu du Markdown) */
.livret { font-family: Georgia, "Times New Roman", serif; font-size: 1.075rem; line-height: 1.75; }
.livret h1 { font-size: 1.9rem; line-height: 1.25; font-weight: 700; margin-bottom: 1rem; }
.livret h2 { font-size: 1.45rem; line-height: 1.3; font-weight: 700; margin: 2.5rem 0 1rem; }
.livret h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 .5rem; }
.livret p { margin: 0 0 1rem; }
.livret ul, .livret ol { margin: 0 0 1rem 1.5rem; }
.livret ul { list-style: disc; }
.livret ol { list-style: decimal; }
.livret li { margin-bottom: .35rem; }
.livret a { text-decoration: underline; word-break: break-all; }
.livret blockquote {
  margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid #b45309;
  background: #fffbeb; font-family: system-ui, sans-serif; font-size: .95rem;
}
.livret blockquote p:last-child, .livret blockquote ul:last-child { margin-bottom: 0; }
.livret h1 + blockquote { border-left-color: #a8a29e; background: #fafaf9; color: #57534e; }
.livret hr { margin: 2rem 0; border-color: #e7e5e4; }

/* Sommaire (inséré avant la première partie) */
.livret .toc {
  margin: 2rem 0; padding: 1rem 1.25rem; border: 1px solid #e7e5e4; border-radius: .5rem;
  font-family: system-ui, sans-serif; font-size: .95rem;
}
.livret .toctitle { display: block; font-weight: 700; margin-bottom: .5rem; }
.livret .toc ul { list-style: none; margin: 0; }
.livret .toc li { margin: .25rem 0; }
.livret .toc a { text-decoration: none; word-break: normal; color: #92400e; }
.livret .toc a:hover { text-decoration: underline; }
.livret h2 { scroll-margin-top: 1rem; padding-bottom: .35rem; border-bottom: 1px solid #e7e5e4; }

/* Impression / enregistrement en PDF : seulement le livret, une partie par page */
@media print {
  @page { margin: 2cm; }
  body { background: #fff; }
  header, main > *:not(.livret) { display: none !important; }
  main { max-width: none; padding: 0; }
  .livret { border: 0; box-shadow: none; padding: 0; font-size: 11.5pt; }
  .livret h2 { break-before: page; }
  .livret h2, .livret h3 { break-after: avoid; }
  .livret blockquote { break-inside: avoid; }
}
