/* ============================================================
   term-route.css — Page d'un parcours ou d'une série (version 3.40.0)
   Les vignettes du thème restent telles quelles ; s'y ajoutent un
   plan de ligne (les études en stations, qui reste en haut pendant
   la lecture), une vue « Sommaire » par tronçons de dix et le
   passage biblique raccourci, à déplier. Classes propres
   (schilo-route…). Contrastes de 4,5 au moins.
   ============================================================ */

/* ── Plan de ligne ── */
/* Le bloc entier colle sous l'en-tête pendant la lecture (le sommaire est à part, juste après). */
.schilo-route { position: sticky; top: var(--schilo-route-top, 70px); z-index: 30; margin-bottom: 1.25rem; }
.schilo-route__bar { padding: 12px 18px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--schilo-border, #dde2ea); box-shadow: 0 6px 18px rgba(30, 42, 58, .08); }
.schilo-route__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.schilo-route__position { flex: 1 1 260px; min-width: 0; margin: 0; overflow: hidden; font-size: 14px; color: var(--schilo-text-secondary, #556070); white-space: nowrap; text-overflow: ellipsis; }
.schilo-route__position strong { font-size: 16px; color: var(--schilo-text-primary, #1a2230); }
.schilo-route__nav, .schilo-route__views { display: inline-flex; gap: 6px; }
.schilo-route__nav button, .schilo-route__views button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 1px solid #c8cfda; border-radius: 99px; background: #fff; color: #1a2230; font-size: 13px; font-weight: 600; cursor: pointer; }
.schilo-route__nav button:hover, .schilo-route__views button:hover { border-color: var(--schilo-accent, #2872d4); }
.schilo-route__views button.is-active { background: var(--schilo-bg-dark, #1e2a3a); border-color: var(--schilo-bg-dark, #1e2a3a); color: #fff; }

/* Les stations sur la ligne ; la partie déjà lue se colore (--progress, réglé par le script). */
.schilo-route__line { position: relative; display: flex; justify-content: space-between; align-items: center; height: 22px; margin: 0 4px; padding: 0; list-style: none; }
.schilo-route__line::before, .schilo-route__line::after { content: ""; position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; }
.schilo-route__line::before { right: 0; background: #d6dbe3; }
.schilo-route__line::after { width: var(--progress, 0%); background: var(--schilo-accent, #2872d4); transition: width .25s ease; }
.schilo-route__line li { position: relative; z-index: 1; display: flex; }
.schilo-route__stop { display: block; width: var(--dot, 10px); height: var(--dot, 10px); border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #8f9bae; transition: transform .15s ease, background-color .15s ease; }
.schilo-route__stop.is-done { background: var(--schilo-accent, #2872d4); box-shadow: 0 0 0 2px var(--schilo-accent, #2872d4); }
.schilo-route__stop.is-current { transform: scale(1.7); background: #fff; box-shadow: 0 0 0 2px var(--schilo-accent, #2872d4), 0 0 0 5px rgba(40, 114, 212, .2); }
.schilo-route__stop:hover, .schilo-route__stop:focus-visible { transform: scale(1.6); }
.schilo-route__stop:focus-visible { outline: 2px solid var(--schilo-accent, #2872d4); outline-offset: 3px; }
/* La bulle du titre au survol d'une station. */
.schilo-route__tip { position: absolute; bottom: calc(100% + 8px); z-index: 2; max-width: 280px; padding: 4px 10px; border-radius: 8px; background: var(--schilo-bg-dark, #1e2a3a); color: #fff; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateX(-50%); pointer-events: none; }
.schilo-route__tip[hidden] { display: none; }

/* Une vignette ne passe pas sous la barre quand on y saute. */
[data-step] { scroll-margin-top: calc(var(--schilo-route-top, 70px) + 130px); }

/* ── Sommaire : tous les titres par tronçons de dix ── */
.schilo-route__summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 1.25rem; }
.schilo-route__summary[hidden] { display: none; }
.schilo-route__section { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--schilo-border, #dde2ea); }
.schilo-route__section h2 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--schilo-text-secondary, #556070); }
.schilo-route__section ol { margin: 0; padding: 0; list-style: none; }
.schilo-route__section a { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; border-radius: 8px; color: #1a2230; text-decoration: none; font-size: 14px; line-height: 1.35; }
.schilo-route__section a:hover, .schilo-route__section a:focus-visible { background: var(--schilo-accent-pale, #e2eefb); }
.schilo-route__num { flex: none; min-width: 24px; font-size: 12px; font-weight: 700; color: var(--schilo-accent-dark, #0e3f88); }
.schilo-route__name { flex: 1; }
.schilo-route__ref { flex: none; font-size: 12px; color: var(--schilo-text-secondary, #556070); white-space: nowrap; }
/* En vue sommaire, les vignettes laissent la place. */
.schilo-parcours-main.is-summary > .schilo-card { display: none; }

/* ── Passage biblique raccourci (le script ne raccourcit que les passages longs) ── */
.schilo-parcours-article__verse.is-collapsed { max-height: 15em; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.schilo-route-verse-toggle { display: inline-flex; align-items: center; gap: 6px; margin: -.5rem 0 1rem; padding: 0; border: 0; background: none; color: var(--spa-accent-dark, #0e3f88); font-size: 14px; font-weight: 700; cursor: pointer; }
.schilo-route-verse-toggle:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .schilo-route__line::after, .schilo-route__stop { transition: none; }
}
@media (max-width: 640px) {
  .schilo-route__bar { padding: 10px 12px 12px; }
  .schilo-route__nav button { padding: 0 10px; }
  .schilo-route__summary { grid-template-columns: 1fr; }
  .schilo-route__ref { display: none; }
}

/* ── Études lues (barre latérale « Votre progression ») ── */
.schilo-route__stop.is-read { background: var(--schilo-accent, #2872d4); box-shadow: 0 0 0 2px var(--schilo-accent, #2872d4); }
.schilo-route__stop.is-current.is-read { background: #fff; }
.schilo-parcours-article.is-read .schilo-parcours-article__title::after { content: "✓ lu"; margin-left: .5rem; padding: 1px 8px; border-radius: 99px; background: var(--schilo-accent-pale, #e2eefb); color: var(--schilo-accent-dark, #0e3f88); font-family: var(--schilo-font-sans, sans-serif); font-size: 12px; font-weight: 700; vertical-align: middle; }

/* ── Stations allumées par une étiquette ou un Évangile ── */
.schilo-route__line.is-filtered .schilo-route__stop:not(.is-lit) { opacity: .3; }
.schilo-route__stop.is-lit { transform: scale(1.6); background: #f2b705; box-shadow: 0 0 0 2px #8a6400; }
/* Une étiquette, un Évangile ou une sous-partie allumés : les autres études disparaissent (plutôt qu'un voile), et une
   section dont aucune étude ne reste disparaît avec elles. */
.schilo-parcours-article.is-faded { display: none; }
.schilo-card:has([data-step].is-faded):not(:has([data-step]:not(.is-faded))) { display: none; }
.schilo-route__lit { margin: -4px 0 10px; font-size: 14px; color: var(--schilo-text-primary, #1a2230); }
.schilo-route__lit a { color: var(--schilo-accent-dark, #0e3f88); font-weight: 700; }
.schilo-route__lit button { margin-left: 4px; padding: 2px 10px; border: 1px solid #c8cfda; border-radius: 99px; background: #fff; color: #1a2230; font-size: 12px; font-weight: 600; cursor: pointer; }
.schilo-sidebar-theme-tag.is-lit { background: #1e2a3a !important; border-color: #1e2a3a !important; color: #fff !important; }

/* ── Barre latérale : votre progression ── */
.schilo-route-progress[hidden] { display: none; }
.schilo-route-progress__ring { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.schilo-route-progress__ring svg { flex: none; }
.schilo-route-progress__arc { stroke: var(--schilo-accent, #2872d4); transition: stroke-dashoffset .4s ease; }
.schilo-route-progress__pct { font-size: 14px; font-weight: 700; fill: var(--schilo-text-primary, #1a2230); }
.schilo-route-progress__ring p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--schilo-text-secondary, #556070); }
.schilo-route-progress__ring strong { font-size: 18px; color: var(--schilo-text-primary, #1a2230); }
.schilo-route-progress__resume { width: 100%; min-height: 40px; border: 0; border-radius: 99px; background: var(--schilo-accent, #2872d4); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.schilo-route-progress__resume:hover { filter: brightness(1.08); }
.schilo-route-progress__reset { display: block; margin: 8px auto 0; border: 0; background: none; color: var(--schilo-text-secondary, #556070); font-size: 12px; text-decoration: underline; cursor: pointer; }
.schilo-route-progress__reset[hidden] { display: none; }
.schilo-route-progress__note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--schilo-text-secondary, #556070); }

/* ── Barre latérale : par Évangile (couleurs de la charte) ── */
.schilo-route-g--matthieu { --rg: var(--schilo-mat, #d71f1f); }
.schilo-route-g--marc { --rg: var(--schilo-marc, #0f490f); }
.schilo-route-g--luc { --rg: var(--schilo-luc, #0a137e); }
.schilo-route-g--jean { --rg: var(--schilo-jean, #484204); }
.schilo-route-g--bible { --rg: #7a3e6e; }
.schilo-route-gospels__bar { display: flex; height: 14px; margin: 4px 0 10px; border-radius: 99px; overflow: hidden; }
.schilo-route-gospels__bar span { background: var(--rg); }
.schilo-route-gospels__legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.schilo-route-gospels__legend button { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--schilo-text-primary, #1a2230); font-size: 13px; text-align: left; cursor: pointer; }
.schilo-route-gospels__legend button:hover { background: #eef0f4; }
.schilo-route-gospels__legend button.is-lit { background: color-mix(in srgb, var(--rg) 14%, #fff); font-weight: 700; }
.schilo-route-gospels__legend i { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--rg); }

@media (prefers-reduced-motion: reduce) {
  .schilo-route-progress__arc { transition: none; }
}

/* ── Barre latérale : sous l'en-tête et jamais plus haute que l'écran ── */
/* Le thème la colle à 1 rem du haut (donc sous l'en-tête) ; plus longue que l'écran, son haut et son bas devenaient
   inaccessibles. Elle se colle sous l'en-tête et défile d'elle-même si besoin. */
.schilo-parcours-sidebar {
  top: calc(var(--schilo-route-top, 64px) + 12px);
  max-height: calc(100vh - var(--schilo-route-top, 64px) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px 4px 4px 2px;
}
/* Les cartes gardent leur hauteur : c'est la colonne qui défile. */
.schilo-parcours-sidebar > * { flex-shrink: 0; }
@media (max-width: 860px) {
  .schilo-parcours-sidebar { max-height: none; overflow: visible; padding: 0; }
}

/* ── Barre latérale : la carte des lieux ── */
.schilo-route-map__svg { display: block; width: 100%; height: auto; max-height: 330px; margin: 2px 0 8px; border-radius: 10px; background: #f6f1e4; }
.schilo-route-map__sea { fill: #cfe0f0; }
.schilo-route-map__water { fill: #a9c8e6; }
.schilo-route-map__river { fill: none; stroke: #7fa9d4; stroke-width: 2; stroke-linecap: round; }
.schilo-route-map__region circle { fill: rgba(122, 62, 110, .1); stroke: rgba(122, 62, 110, .35); stroke-dasharray: 3 3; }
.schilo-route-map__region text { font-size: 9px; font-weight: 700; letter-spacing: .08em; fill: #5d2f55; pointer-events: none; }
.schilo-route-map__place circle { fill: var(--schilo-accent, #2872d4); fill-opacity: .8; stroke: #fff; stroke-width: 1.5; transition: fill .15s ease; }
.schilo-route-map__place:hover circle, .schilo-route-map__place:focus-visible circle { fill: #0e3f88; fill-opacity: 1; }
.schilo-route-map__region:hover circle, .schilo-route-map__region:focus-visible circle { fill: rgba(122, 62, 110, .22); }
.schilo-route-map__place.is-lit circle { fill: #f2b705; fill-opacity: 1; stroke: #8a6400; stroke-width: 2; }
.schilo-route-map__region.is-lit circle { fill: rgba(242, 183, 5, .35); stroke: #8a6400; stroke-dasharray: none; }
.schilo-route-map__legend, .schilo-route-map__others { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; font-size: 12px; color: var(--schilo-text-secondary, #556070); }
.schilo-route-map__others { margin-top: 8px; align-items: center; }
.schilo-route-map__legend button, .schilo-route-map__others button { padding: 2px 9px; border: 1px solid #c8cfda; border-radius: 99px; background: #fff; color: #1a2230; font-size: 12px; cursor: pointer; }
.schilo-route-map__legend button.is-lit, .schilo-route-map__others button.is-lit { background: #1e2a3a; border-color: #1e2a3a; color: #fff; }

.schilo-route-progress__random { width: 100%; min-height: 36px; margin-top: 8px; border: 1px solid var(--schilo-accent, #2872d4); border-radius: 99px; background: #fff; color: var(--schilo-accent-dark, #0e3f88); font-size: 13px; font-weight: 700; cursor: pointer; }
.schilo-route-progress__random:hover { background: var(--schilo-accent-pale, #e2eefb); }

/* ── Barre latérale : parcours ou séries voisins ── */
.schilo-route-neighbours__list { margin: 0; padding: 0; list-style: none; }
.schilo-route-neighbours__list a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; color: var(--schilo-text-primary, #1a2230); text-decoration: none; transition: background-color .15s ease; }
.schilo-route-neighbours__list a:hover, .schilo-route-neighbours__list a:focus-visible { background: var(--schilo-accent-pale, #e2eefb); }
.schilo-route-neighbours__list strong { font-family: var(--schilo-font-serif); font-size: 15px; font-weight: 500; line-height: 1.3; }
.schilo-route-neighbours__list span { font-size: 12px; color: var(--schilo-text-secondary, #556070); }

/* Page sans plan de ligne : l'annonce des études d'une étiquette, en haut de la colonne. */
.schilo-route__lit--alone { position: sticky; top: calc(var(--schilo-route-top, 64px) + 8px); z-index: 20; margin: 0 0 1rem; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--schilo-border, #dde2ea); box-shadow: 0 6px 18px rgba(30, 42, 58, .08); }
.schilo-route__lit--alone[hidden] { display: none; }

/* Ligne très dense (plus d'une centaine de stations) : des traits serrés plutôt que des ronds cerclés. */
.schilo-route__line.is-dense .schilo-route__stop { height: 12px; border-radius: 1px; box-shadow: none; background: #9aa6b8; }
.schilo-route__line.is-dense .schilo-route__stop.is-read { background: var(--schilo-accent, #2872d4); }
.schilo-route__line.is-dense .schilo-route__stop.is-current { transform: scaleY(1.8); background: #0e3f88; box-shadow: none; }
.schilo-route__line.is-dense .schilo-route__stop.is-lit { transform: scaleY(1.8); background: #f2b705; box-shadow: none; }

/* La ligne ne doit jamais élargir la colonne (un grand thème compte des centaines de stations). */
.schilo-parcours-main, .schilo-route, .schilo-route__bar { min-width: 0; }
.schilo-route__line li { flex: 0 1 auto; min-width: 0; }
.schilo-route__line { overflow: visible; max-width: 100%; }

/* Vignettes d'une catégorie : masquées par une étiquette, marquées une fois lues. */
.schilo-archive-card.is-faded { display: none; }
.schilo-archive-card.is-read .schilo-archive-card__title::after { content: "✓ lu"; margin-left: .4rem; padding: 1px 7px; border-radius: 99px; background: var(--schilo-accent-pale, #e2eefb); color: var(--schilo-accent-dark, #0e3f88); font-family: var(--schilo-font-sans, sans-serif); font-size: 11px; font-weight: 700; vertical-align: middle; }
.schilo-route-progress__resume:disabled { opacity: .6; cursor: default; }

.schilo-parcours-main.is-summary > .schilo-archive-posts,
.schilo-parcours-main.is-summary > .schilo-archive-toolbar,
.schilo-parcours-main.is-summary > .schilo-archive-pagination,
.schilo-parcours-main.is-summary > nav { display: none; }
/* Une catégorie : la ligne au-dessus de la grille de vignettes. */
.schilo-category-layout .schilo-route { margin-top: 0; }
.schilo-archive-card { scroll-margin-top: calc(var(--schilo-route-top, 64px) + 130px); }

/* ── Barre latérale : les sous-catégories d'une catégorie ── */
.schilo-route-parts__list { margin: 0; padding: 0; list-style: none; }
.schilo-route-parts__list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--schilo-text-primary, #1a2230); font-size: 14px; text-align: left; cursor: pointer; }
.schilo-route-parts__list button:hover { background: var(--schilo-accent-pale, #e2eefb); }
.schilo-route-parts__list button.is-lit { background: #1e2a3a; color: #fff; }
.schilo-route-parts__list strong { flex: none; min-width: 28px; padding: 1px 8px; border-radius: 99px; background: var(--schilo-accent-pale, #e2eefb); color: var(--schilo-accent-dark, #0e3f88); font-size: 12px; text-align: center; }
.schilo-route__part { display: block; font-size: 12px; color: var(--schilo-text-secondary, #556070); }

/* ── Plan de ligne d'une catégorie : ses sous-catégories en tronçons sous la ligne ── */
.schilo-route__parts { position: relative; height: 24px; margin: 6px 4px 0; padding: 0; list-style: none; }
.schilo-route__parts li { position: absolute; top: 0; height: 100%; min-width: 0; padding: 0 2px; }
.schilo-route__parts button { display: block; width: 100%; height: 100%; padding: 0 8px; overflow: hidden; border: 0; border-top: 3px solid #b9c3d1; border-radius: 0 0 8px 8px; background: #f2f4f8; color: var(--schilo-text-secondary, #556070); font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.schilo-route__parts li:nth-child(even) button { border-top-color: #8f9bae; background: #e9edf3; }
.schilo-route__parts button:hover { background: var(--schilo-accent-pale, #e2eefb); color: var(--schilo-accent-dark, #0e3f88); }
.schilo-route__parts button.is-lit { border-top-color: #8a6400; background: #f2b705; color: #1a2230; }

/* Passer d'une sous-catégorie à l'autre. */
.schilo-route__partnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 8px 4px 0; font-size: 13px; }
.schilo-route__partnav[hidden] { display: none; }
.schilo-route__partnav strong { padding: 2px 12px; border-radius: 99px; background: #1e2a3a; color: #fff; font-size: 12px; white-space: nowrap; }
.schilo-route__partnav a { min-width: 0; overflow: hidden; color: var(--schilo-accent-dark, #0e3f88); font-weight: 600; text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.schilo-route__partnav a:last-child { text-align: right; }
.schilo-route__partnav a:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.schilo-route__partnav a[hidden] { display: block; visibility: hidden; }

/* Sommaire d'une catégorie : une carte par sous-catégorie, ses premières études et « Voir plus ». */
.schilo-route__section--part h2 { display: flex; justify-content: space-between; gap: 10px; color: #1a2230; }
.schilo-route__section--part h2 span { flex: none; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--schilo-text-secondary, #556070); }
.schilo-route__section a.schilo-route__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--schilo-accent-dark, #0e3f88); font-size: 13px; font-weight: 700; }

/* Catégorie : les vignettes rangées par sous-catégorie. Le bloc ne crée pas de boîte (la grille reste une) ; son titre
   prend toute la largeur. Une sous-catégorie allumée ne laisse que le sien. */
.schilo-category-part { display: contents; }
.schilo-category-part__title { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; margin: 18px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--schilo-border, #dde2ea); font-family: var(--schilo-font-serif, serif); font-size: 24px; font-weight: 600; color: #1a2230; }
.schilo-category-part:first-child .schilo-category-part__title { margin-top: 0; }
.schilo-category-part__title span { font-family: var(--schilo-font-sans, sans-serif); font-size: 13px; font-weight: 600; color: var(--schilo-text-secondary, #556070); }
.schilo-category-part:has([data-step].is-faded):not(:has([data-step]:not(.is-faded))) { display: none; }

/* Carte de chiffres : les compléments rattachés aux études, à part. */
.schilo-sidebar-stat__more { margin: 8px 0 0; color: #c3cbd6; font-size: 13px; line-height: 1.4; }
