/* ═══════════════════════════════════════════════════════════
   markdown.css — rendu des contenus Markdown
   Deux contextes :
     .article-body   pages documents complets (route_document, route_md_custom)
     .dp-md-body     panel embarqué dans la fiche personne (doc-viewer.js)
   ═══════════════════════════════════════════════════════════ */

/* ── ARTICLE BODY (page document complète) ───────────────── */
.article-wrap {
  padding: 3.5rem 0 4rem;
}

.article-body {
  font-family: var(--garamond);
  font-size: 1.18rem;
  line-height: 1.88;
  color: var(--ink-soft);
  max-width: 680px;
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.8rem;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  margin-right: 0.08em;
  margin-top: 0.12em;
  color: var(--amber);
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
  margin: 2.5em 0 0.75em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--rule);
}

.article-body blockquote {
  border-left: 3px solid var(--amber);
  margin: 2em 0;
  padding: 0.75em 1.5em;
  background: var(--amber-pale);
  border-radius: 0 3px 3px 0;
}

.article-body blockquote p {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 0.3em;
  font-size: 1.12rem;
}

.article-body blockquote cite {
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── DP-MD-BODY (panel fiche personne) ───────────────────── */
.dp-md-body {
  font-family: var(--garamond);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink-soft);
  /* max-width: 720px;*/
}

.dp-md-body h1, .dp-md-body h2, .dp-md-body h3 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 1.8em 0 0.6em;
}

.dp-md-body p { margin-bottom: 1.2em; }

.dp-md-body p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin-right: 0.1em;
  margin-top: 0.12em;
  color: var(--amber);
}

.dp-md-body a { color: var(--amber); }
.dp-md-body a:hover { color: var(--amber-light); }

.dp-md-body ul, .dp-md-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}

.dp-md-body blockquote {
  border-left: 3px solid var(--amber-light);
  margin: 0 0 1.2em;
  padding: 0.5rem 1rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ── IMAGES ──────────────────────────────────────────────── */
.article-body img,
.dp-md-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  filter: sepia(10%) contrast(0.96);
  margin: 2em 0;
  cursor: zoom-in;
}

/* ── INLINE PHOTO (figure avec légende) ──────────────────── */
.inline-photo {
  margin: 2.5em 0;
}

.inline-photo img {
  width: 100%;
  max-width: 520px;
  border-radius: 3px;
  filter: sepia(10%) contrast(0.96);
  display: block;
}

.inline-photo figcaption {
  font-family: var(--garamond);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.6rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--amber-light);
}

/* ── TOC SIDEBAR ─────────────────────────────────────────── */
.toc-sticky {
  position: sticky;
  top: 80px;
}

.toc-box {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.toc-box-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
}

.toc-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-items li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--cream-dark);
}

.toc-items li:last-child {
  border-bottom: none;
}

.toc-items a {
  font-family: var(--garamond);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.toc-items a:hover {
  color: var(--amber);
}
