/* Lecture v2 — fil d'Ariane, sommaire, progression, articles reliés.
   Partagé par l'export statique (dist/shared/) et le serveur (/shared/). */

.crumbs {
  font-size: .78rem;
  color: var(--muted);
  margin: .2rem 0 .7rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); }
.crumb-sep { color: #d5d5d5; }

/* Bandeau des sections (accueil) + pastilles de navigation d'arbre */
.section-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  margin: 0 0 .45rem;
}
.tree-jump {
  font-size: .74rem;
  text-decoration: none;
  padding: .08rem .4rem;
  border-radius: 5px;
  background: var(--jah-bg, #e8eef8);
  color: var(--jah, #0a246a);
  border: 1px solid var(--jah-border, #a8c0de);
  display: inline-flex;
  gap: .25rem;
  align-items: center;
}
.tree-jump:hover { border-color: var(--jah-soft, #3b6ea5); color: var(--jah, #0a246a); }
.tree-jump--root { background: var(--accent-solid); color: #fff; border-color: #8c0f0a; font-weight: 600; }
.tree-jump--root:hover { color: #fff; border-color: #fff; }

/* Les deux portes (accueil, L6) — dit qu'il y a deux lectures du même corpus.
   Compactées (2026-10) : une rangée basse pour ne plus masquer la pile. */
.two-doors {
  margin: 0 0 .55rem;
  padding: .45rem .6rem;
  border: 1px solid var(--hr-color);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
}
.two-doors-h { font-size: .78rem; margin: 0; color: var(--text-soft); font-weight: 700; flex: 0 0 auto; }
.two-doors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  flex: 1 1 auto;
  min-width: 0;
}
.door {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .45rem;
  text-decoration: none;
  padding: .2rem .45rem;
  border: 1px solid var(--hr-color);
  border-radius: 5px;
  background: var(--bg);
}
.door:hover { border-color: var(--link); }
.door--here { border-color: var(--link); background: var(--bg); }
.door-kicker { font-size: .66rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.door--here .door-kicker { color: var(--link); font-weight: 700; }
.door-title { font-size: .88rem; font-weight: 700; color: var(--text-strong); }
.door-desc { display: none; font-size: .74rem; color: var(--muted); line-height: 1.35; }
@media (min-width: 900px) {
  .door-desc {
    display: inline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 18rem;
  }
}
.two-doors-nav { font-size: .74rem; margin: 0 0 0 auto; color: var(--muted); flex: 0 0 auto; }
.two-doors-nav a { color: var(--info); text-decoration: none; }
.two-doors-nav a:hover { text-decoration: underline; }

/* Barre de progression de lecture */
.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  z-index: 120;
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-solid);
  transition: width .08s linear;
}

/* Sommaire auto (h2/h3) */
.doc-toc {
  margin: 0 0 1.2rem;
  padding: .5rem .7rem;
  border: 1px solid var(--hr-color);
  border-left: 2px solid var(--link);
  border-radius: 4px;
  background: var(--surface);
  font-size: .82rem;
}
.doc-toc[hidden] { display: none; }
.doc-toc-h {
  margin: 0 0 .3rem;
  font-weight: 700;
  color: var(--text-soft);
  font-size: .76rem;
  text-transform: lowercase;
  letter-spacing: .02em;
  cursor: pointer;
  list-style: none;
}
.doc-toc-h::-webkit-details-marker { display: none; }
.doc-toc-h::before { content: "▾ "; color: var(--link); }
.doc-toc:not([open]) .doc-toc-h::before { content: "▸ "; color: #c9c9c9; }
.doc-toc:not([open]) .doc-toc-h { margin-bottom: 0; }
.doc-toc-list { list-style: none; margin: 0; padding: 0; line-height: 1.55; }
.doc-toc-list .lvl-3 { padding-left: .9rem; font-size: .95em; }
.doc-toc-list a { color: var(--text-soft); text-decoration: none; }
.doc-toc-list a:hover { color: var(--link); }
.doc-toc-list a.active { color: var(--link); font-weight: 600; }

@media (min-width: 1100px) {
  .doc-toc { columns: 2; column-gap: 2rem; }
  .doc-toc-h { column-span: all; }
}

/* Articles reliés */
.relations {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hr-color);
  display: grid;
  gap: 1.1rem;
  clear: both;
}
.rel-h {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 .4rem;
  text-transform: lowercase;
  letter-spacing: .02em;
  display: flex;
  gap: .5rem;
  align-items: baseline;
}
.rel-all { color: var(--info); font-weight: 400; text-decoration: none; font-size: .74rem; }
.rel-all:hover { text-decoration: underline; }

.fil-nav { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.fil-nav a {
  display: block;
  padding: .45rem .6rem;
  border: 1px solid var(--hr-color);
  border-radius: 5px;
  text-decoration: none;
  background: var(--bg);
}
.fil-nav a:hover { border-color: var(--link); }
.fil-next { text-align: right; }
.fil-dir { display: block; font-size: .7rem; color: var(--muted); }
.fil-title { display: block; font-size: .87rem; color: var(--text-strong); line-height: 1.35; }
.fil-nav a:hover .fil-title { color: var(--link); }

.rel-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; line-height: 1.6; }
.rel-item { display: flex; gap: .5rem; align-items: baseline; padding: .12rem 0; }
.rel-link { color: var(--text-strong); text-decoration: none; flex: 1 1 auto; }
.rel-link:hover { color: var(--link); text-decoration: underline; }
.rel-meta { color: var(--muted); font-size: .72rem; white-space: nowrap; }

@media (max-width: 700px) {
  .fil-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .read-progress > span { transition: none; }
}

/* --- En-tête et pied d'article (lot L1.2-L1.4, finitions d'usage) ------------------- */
.top .site-name { margin: 0; font-size: 15px; font-weight: 700; }
.top .site-name a { color: var(--text-strong); text-decoration: none; }
.post-meta--head {
  margin: .35rem 0 .2rem;
  padding: 0;
  border: 0;
  font-size: .82rem;
  color: var(--text-soft);
}
.post-meta--head .sep { color: #c8c8c8; margin: 0 .15rem; }
.post-meta--head time { color: var(--text-strong); font-weight: 600; }
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: .3rem 0 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--hr-color);
}
.post-tags .tag { text-decoration: none; }
.post-tags .tag:hover { border-color: var(--link); color: var(--link); }
.post-foot { margin: 1.4rem 0 0; font-size: .75rem; color: var(--muted); text-align: right; }
.post-foot a { color: var(--muted); }
.audit-sidebar .side-date { display: block; font-size: 10.5px; color: var(--muted); }
.audit-sidebar .sidebar-more { margin: .6rem 0 0; font-size: 12px; }
.viewer-shell--solo { grid-template-columns: minmax(0, 1fr); }
.content-column > .blog-footer {
  max-width: min(100%, var(--read-width, 44rem));
  margin: 1.8rem auto 1rem;
  padding: .7rem 16px 0;
  border-top: 1px solid var(--hr-color);
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}
.content-column > .blog-footer a { color: var(--muted); }
.content-column > .blog-footer a:hover { color: var(--link); }

/* Article retiré de la vitrine (lot L1.5) */
.vitrine-notice {
  margin: .6rem 0 .4rem;
  padding: .55rem .75rem;
  border: 1px solid var(--border-warm);
  border-left: 4px solid #c26a1b;
  border-radius: 4px;
  background: var(--surface-warm);
  color: #5a3a1a;
  font-size: .86rem;
}
.vitrine-notice a { color: var(--warn); font-weight: 600; }

/* Qui parle (lot L2.1) */
.author-kind {
  font-size: .7rem;
  padding: 0 .35em;
  margin-left: .25rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
  white-space: nowrap;
}
.author--automate .author-kind { background: var(--surface); border-color: var(--card-border); color: var(--text-soft); }

/* Relecture et commentaires (vague V3) */
.review-launch {
  font: inherit;
  font-size: .75rem;
  margin-right: .6rem;
  padding: .1rem .5rem;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.review-launch:hover { border-color: var(--link); color: var(--link); }
.comments { margin: 2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--hr-color); }
.comments h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.comments-count { font-size: .8rem; color: var(--muted); font-weight: 400; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.comment { padding: .6rem .8rem; border: 1px solid var(--hr-color); border-radius: 6px; }
.comment-meta { margin: 0 0 .3rem; font-size: .78rem; color: var(--muted); }
.comment-body p { margin: .2rem 0; }
.comments-note { font-size: .75rem; color: var(--muted); margin: .6rem 0 0; }

/* Concepts du lexique (vague V4) : la première mention de chaque concept, liée */
.md-prose a.concept {
  position: relative;
  color: inherit;
  text-decoration: underline dotted #b08a2e;
  text-underline-offset: 3px;
}
.md-prose a.concept:hover,
.md-prose a.concept:focus-visible { color: var(--warn); }
.md-prose a.concept::after {
  content: attr(data-def);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  width: min(22rem, 80vw);
  padding: .5rem .65rem;
  border: 1px solid var(--border-warm);
  border-radius: 6px;
  background: var(--surface-warm);
  color: var(--text-strong);
  font-size: .82rem;
  font-weight: 400;
  line-height: 1.45;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
}
.md-prose a.concept:hover::after,
.md-prose a.concept:focus-visible::after { opacity: 1; visibility: visible; }
body.concepts-off .md-prose a.concept { text-decoration: none; pointer-events: none; color: inherit; }
body.concepts-off .md-prose a.concept::after { display: none; }
.concepts-toggle {
  font: inherit;
  font-size: .75rem;
  margin-right: .6rem;
  padding: .1rem .5rem;
  border: 1px solid var(--border-warm);
  border-radius: 4px;
  background: transparent;
  color: var(--accent-gold);
  cursor: pointer;
}
.article-concepts { margin: 2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--hr-color); }
.article-concepts h2 { font-size: 1rem; margin: 0 0 .5rem; }
.article-concepts h3 { font-size: .9rem; margin: 1rem 0 .3rem; color: var(--text-soft); }
.article-concepts .lx-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.article-concepts .lx-chips a { font-size: .8rem; padding: .1rem .5rem; border: 1px solid var(--border-warm); border-radius: 999px; color: var(--accent-gold); text-decoration: none; background: var(--surface-warm); }
.article-concepts .lx-chips a:hover { border-color: var(--link); color: var(--link); }
.article-concepts .lx-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.article-concepts .lx-list li { padding: .2rem 0; }
.article-concepts .lx-list a { color: var(--text-strong); text-decoration: none; }
.article-concepts .lx-list a:hover { color: var(--link); text-decoration: underline; }
.article-concepts .lx-meta { font-size: .72rem; color: var(--muted); margin-left: .4rem; }
@media (prefers-reduced-motion: reduce) { .md-prose a.concept::after { transition: none; } }

/* Séries (lot L5.1) : la barre sous l'en-tête d'un épisode */
.series-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .8rem;
  margin: .2rem 0 .8rem;
  padding: .45rem .7rem;
  border: 1px solid var(--border-warm);
  border-radius: 6px;
  background: var(--surface-warm);
  font-size: .82rem;
}
.series-nav a { color: var(--accent-gold); text-decoration: none; }
.series-nav a:hover { color: var(--link); text-decoration: underline; }
.series-nav .series-name { font-weight: 700; }
.series-nav .series-pos { color: var(--muted); }
.series-nav .series-next { margin-left: auto; }
