/* Page « La Bible » (js/bible-page.js) : la table des matières, une colonne de lecture, une barre qui reste en haut. */
.bible-toc-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 .75rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; }
.bible-where { align-self: center; font-weight: 600; white-space: nowrap; }
.bible-toc { display: none; box-sizing: border-box; padding: .75rem 1rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; font-size: .9375rem; background: var(--sheet); border-bottom: 1px solid var(--rule-strong); }
.bible.is-toc-open .bible-toc { display: block; max-height: 60dvh; }
.bible-toc ul { margin: 0; padding: 0; list-style: none; }
.bible-toc-order { display: flex; margin-bottom: .75rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.bible-toc-order button { flex: 1 1 0; min-height: 2.75rem; padding: .2rem .4rem; font: inherit; font-size: .875rem; line-height: 1.15; color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.bible-toc-order button + button { border-left: 1px solid var(--rule-strong); }
.bible-toc-order button[aria-checked="true"] { font-weight: 600; color: var(--paper); background: var(--ink); }
.bible-toc-order button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -3px; }
.bible-toc-note { margin: 0 .4rem .5rem; font-size: .8125rem; line-height: 1.35; color: var(--ink-soft); }
/* Trois niveaux qu'on distingue d'un coup d'œil : la grande partie, le groupe (titre sur fond, qui reste visible au défilement), ses livres sous un filet. */
.bible-toc-block { margin-top: .75rem; }
.bible-toc-section { position: sticky; top: -.75rem; z-index: 1; margin: 0; padding: .4rem .6rem; line-height: 1.2; color: var(--ink); background: linear-gradient(var(--accent-wash), var(--accent-wash)), var(--sheet); border-left: 4px solid var(--accent); }
.bible-toc-section strong { display: block; font-size: .9375rem; font-weight: 700; }
.bible-toc-section span { display: block; margin-top: .1rem; font-size: .8125rem; color: var(--ink-soft); }
.bible-toc-block > ul, .bible-toc-testament + ul { margin: .25rem 0 0 .25rem; padding-left: .35rem; border-left: 1px solid var(--rule-strong); }
.bible-toc-testament { margin: 1.75rem 0 0; padding-bottom: .3rem; font-size: 1.0625rem; font-weight: 700; line-height: 1.2; color: var(--ink); border-bottom: 2px solid var(--ink); }
.bible-toc-list > .bible-toc-testament:first-child { margin-top: 0; }
.bible-toc summary { display: flex; align-items: center; min-height: 2.25rem; padding: 0 .4rem; line-height: 1.2; border-radius: var(--radius); cursor: pointer; }
.bible-toc summary:hover { background: var(--accent-wash); }
.bible-toc summary:focus-visible, .site .bible-toc a:focus-visible, .bible-toc-toggle:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.bible-toc details.is-current > summary { font-weight: 700; }
.bible-toc-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr)); gap: .2rem; padding: .25rem .4rem .5rem !important; }
.site .bible-toc a { display: flex; align-items: center; justify-content: center; min-height: 2.25rem; color: var(--ink); text-decoration: none; border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.site .bible-toc a:hover { background: var(--accent-wash); }
.site .bible-toc a[aria-current] { font-weight: 700; color: var(--paper); background: var(--ink); }
@media (min-width: 60rem) {
  .bible { display: grid; grid-template-columns: 17rem minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .bible-toc, .bible.is-toc-open .bible-toc { display: block; grid-column: 1; grid-row: 1 / span 2; position: sticky; top: var(--header-h); max-height: calc(100dvh - var(--header-h)); align-self: start; border-bottom: 0; border-right: 1px solid var(--rule-strong); }
  .bible-bar { grid-column: 2; grid-row: 1; }
  .bible-body { grid-column: 2; grid-row: 2; }
  .bible-toc-toggle { display: none; }
}
/* La page occupe toute la largeur : le pied de page aussi. */
.site-footer { max-width: none; }
.bible-bar { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .9rem; padding: .5rem 1rem; background: var(--sheet); border-block: 1px solid var(--rule); font-size: .875rem; }
.bible-search input { box-sizing: border-box; min-height: 2.75rem; padding: 0 .5rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.bible-steps { display: flex; gap: .25rem; }
.site .bible-step { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 2.75rem; height: 2.75rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.site .bible-step:hover { background: var(--accent-wash); }
.site .bible-step[aria-disabled="true"] { color: var(--rule-strong); background: none; }
.bible-search { display: flex; flex-direction: column; gap: .1rem; flex: 1 1 16rem; min-width: 0; max-width: 30rem; margin-left: auto; }
.bible-search-row { display: flex; gap: .25rem; }
.bible-search input { flex: 1 1 auto; min-width: 0; }
.bible-search input::placeholder { color: var(--ink-soft); opacity: 1; }
.bible-search button { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; padding: 0 .75rem; font: inherit; font-weight: 600; color: var(--paper); background: var(--ink); border: 0; border-radius: var(--radius); cursor: pointer; }
.bible-bar :is(input, button):focus-visible, .site .bible-step:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.bible-body[aria-busy="true"] > * { opacity: .45; }
.bible-body { box-sizing: border-box; max-width: 42rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.bible-body h1 { margin: 0 0 .35rem; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; }
.bible-body h1:focus { outline: none; }
.bible-edition { margin: 0 0 1.75rem; font-size: .875rem; line-height: 1.4; color: var(--ink-soft); }
.bible-lost { margin: 0 0 1rem; padding: .5rem .75rem; background: var(--accent-wash); border-radius: var(--radius); }
.bible-wait { color: var(--ink-soft); }

.bible-text { font-family: var(--font-read); font-size: 1.1875rem; line-height: 1.6; }
.bible-para { margin: 0 0 .9rem; }
.bible-heading { font-family: var(--font-ui); line-height: 1.3; }
.bible-heading.is-majorSection { margin: 2.25rem 0 .75rem; font-size: 1.15rem; font-weight: 700; }
.bible-heading.is-section { margin: 1.75rem 0 .6rem; font-size: 1rem; font-weight: 700; }
.bible-heading.is-subSection { margin: 1.25rem 0 .6rem; font-size: .875rem; color: var(--ink-soft); }
.v-num { font-family: var(--font-ui); font-size: .68em; font-weight: 600; vertical-align: .35em; line-height: 0; color: var(--ink-soft); }
/* Versets demandés : un fond et un filet, lisibles sans la couleur. Ils restent sous la barre collante. */
.verse { scroll-margin-block: 10rem; }
.verse.is-marked { background: var(--accent-wash); box-shadow: inset 0 -2px var(--accent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.site .note-call { padding: 0 .15em; font-family: var(--font-ui); font-size: .68em; font-weight: 700; vertical-align: .35em; line-height: 0; color: var(--accent-strong); }
.bible-notes { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule-strong); font-size: .9375rem; line-height: 1.45; }
.bible-notes h2 { margin: 0 0 .6rem; font-size: 1rem; }
.bible-notes ol { margin: 0; padding-left: 1.75rem; }
.bible-notes li { margin-top: .5rem; scroll-margin-top: 10rem; }
.bible-notes li:target { background: var(--accent-wash); }
.note-call { scroll-margin-top: 10rem; }
.site .note-back { display: inline-block; min-width: 1.5rem; text-align: center; text-decoration: none; }
.bible-results { padding-left: 2.25rem; font-family: var(--font-read); font-size: 1.0625rem; line-height: 1.45; }
.bible-results li { margin-top: .6rem; }
.bible-results a { font-family: var(--font-ui); font-size: .9375rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 520px) {
  .bible-search { flex-basis: 100%; max-width: none; margin-left: 0; }
  .bible-bar { position: static; }
  .bible-text { font-size: 1.125rem; }
}

/* Recherche : options (testament, notes, mots partiels) et mot surligné dans les versets trouvés. */
.bible-options { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: center; margin: .25rem 0 1rem; font-family: var(--font-ui); font-size: .9375rem; color: var(--ink-soft); }
.bible-option { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; cursor: pointer; }
.bible-option select { min-height: 2.25rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 5px; }
.bible-option input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent-strong); }
.bible-results mark { padding: 0 .1em; color: inherit; background: var(--accent-wash); border-bottom: 2px solid var(--accent); }
.bible-in-note { font-family: var(--font-ui); font-size: .875rem; color: var(--ink-soft); }
/* Recherche en cours : les livres parcourus, en pourcentage. */
.bible-wait p { margin: 0; }
.bible-wait-pct { font-variant-numeric: tabular-nums; }
.bible-wait-meter { display: block; width: min(16rem, 100%); height: 4px; margin-top: .6rem; overflow: hidden; border-radius: 2px; background: var(--rule); }
.bible-wait-meter i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--mt), var(--lk)); transition: width .25s ease-out; }
