/* ==========================================================================
   Bible LSG — boutons de lecture et MODE DU SOIR
   • Automatique si l'appareil est réglé en mode sombre.
   • Forcé par le bouton ☾/☀ (attribut data-theme="nuit" ou "jour" sur <html>).
   Fichier généré : modifier les couleurs ici s'applique à tout le site.
   ========================================================================== */
.bp-theme,.bp-haut{position:fixed;bottom:16px;z-index:60;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  font:17px/1 Georgia,"Times New Roman",serif;cursor:pointer;text-decoration:none;box-shadow:0 3px 8px rgba(0,0,0,.4);-webkit-tap-highlight-color:transparent}
.bp-theme{left:16px;padding:0;border:1px solid rgba(155,27,18,.45);background:#f1e4c4;color:#9b1b12}
.bp-theme:hover{filter:brightness(1.06)}
.bp-haut{right:16px;border:0;font-size:14px;color:#f5dcc8;background:radial-gradient(circle at 35% 30%,#c23a2c,#7d130c 70%);
  opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .25s,transform .25s}
.bp-haut.visible{opacity:1;transform:none;pointer-events:auto}
.bp-theme:focus-visible,.bp-haut:focus-visible{outline:2px solid currentColor;outline-offset:3px}
@media (prefers-reduced-motion:reduce){.bp-haut{transition:none}}
@media print{.bp-theme,.bp-haut{display:none}}

/* ---- Mode du soir choisi avec le bouton ---- */
:root[data-theme="nuit"]{color-scheme:dark;--ink:#eadcc0;--ink2:#bba98a;--rubric:#ec8a76;--paper:#1e160f;--a-ink:#eadcc0;--a-ink2:#bba98a;--a-rubric:#ec8a76;--a-paper:#1e160f;--text:#dccfb3;--muted:#b3a383;--line:rgba(234,220,192,.2);--paper-2:#221a12;background:#0c0805 radial-gradient(ellipse at 50% 0%,#2a1d12 0%,#0c0805 75%) fixed}
:root[data-theme="nuit"] body, :root[data-theme="nuit"] .page{background:radial-gradient(ellipse at 50% 28%,rgba(255,214,150,.07),transparent 70%),radial-gradient(ellipse at 0 0,rgba(0,0,0,.35),transparent 35%),radial-gradient(ellipse at 100% 100%,rgba(0,0,0,.4),transparent 40%),#1e160f;box-shadow:0 30px 80px rgba(0,0,0,.85),inset 0 0 90px rgba(0,0,0,.55)}
:root[data-theme="nuit"] body:has(> .page){background:transparent;box-shadow:none}
:root[data-theme="nuit"] body::before, :root[data-theme="nuit"] .page::before{border-color:rgba(236,138,118,.38)}
:root[data-theme="nuit"] .page::after{opacity:.12}
:root[data-theme="nuit"] .hero h1{text-shadow:none}
:root[data-theme="nuit"] img[src$="fleuron_bible_1910.svg"], :root[data-theme="nuit"] h1::after, :root[data-theme="nuit"] .page-header::after, :root[data-theme="nuit"] center:has(> img[src$="line.gif"]){filter:invert(1) sepia(.45) saturate(1.3) brightness(.9)}
:root[data-theme="nuit"] .books a::after{border-bottom-color:rgba(234,220,192,.22)}
:root[data-theme="nuit"] .testament + .testament{border-left-color:rgba(234,220,192,.22)}
:root[data-theme="nuit"] .links li{border-bottom-color:rgba(234,220,192,.22)}
:root[data-theme="nuit"] footer, :root[data-theme="nuit"] .page-links{border-top-color:rgba(234,220,192,.22)}
:root[data-theme="nuit"] td{border-color:rgba(234,220,192,.22)}
:root[data-theme="nuit"] .verse-box, :root[data-theme="nuit"] .cadre, :root[data-theme="nuit"] .cadre2, :root[data-theme="nuit"] .note-box, :root[data-theme="nuit"] .study-card, :root[data-theme="nuit"] .study-fieldset, :root[data-theme="nuit"] .translations-list li, :root[data-theme="nuit"] .timeline-card, :root[data-theme="nuit"] .page-link, :root[data-theme="nuit"] #main table{background:rgba(255,232,196,.055);border-color:rgba(234,220,192,.22);color:var(--ink)}
:root[data-theme="nuit"] .verse-box, :root[data-theme="nuit"] .cadre2{border-left-color:var(--rubric)}
:root[data-theme="nuit"] .verse-icon, :root[data-theme="nuit"] .manuscript-icon, :root[data-theme="nuit"] .note-box::before{background:#1e160f;border-color:rgba(234,220,192,.22);color:var(--ink2)}
:root[data-theme="nuit"] .page-link:hover{background:var(--rubric);color:#1e160f}
:root[data-theme="nuit"] .date{background:rgba(255,232,196,.055);border-color:rgba(236,138,118,.4)}
:root[data-theme="nuit"] .timeline-date, :root[data-theme="nuit"] .timeline-title{color:var(--ink)}
:root[data-theme="nuit"] .timeline-era, :root[data-theme="nuit"] .timeline-note{color:#c9b48a}
:root[data-theme="nuit"] .nombres a{background:rgba(255,232,196,.055);border-color:rgba(236,138,118,.35)}
:root[data-theme="nuit"] .nombres a:hover{background:var(--rubric);color:#1e160f}
:root[data-theme="nuit"] tr:has(.number:target) > td{background:rgba(236,138,118,.17)}
:root[data-theme="nuit"] .livres-nav{border-top-color:var(--ink)}
:root[data-theme="nuit"] b, :root[data-theme="nuit"] strong{color:#f7ecd4}
:root[data-theme="nuit"] .livres-nav strong{color:var(--rubric)}
:root[data-theme="nuit"] .ombre{color:#fff4dc;text-shadow:1px 1px 2px #000}
:root[data-theme="nuit"] .yellow, :root[data-theme="nuit"] .pink, :root[data-theme="nuit"] .green, :root[data-theme="nuit"] .orange, :root[data-theme="nuit"] .red, :root[data-theme="nuit"] .blue, :root[data-theme="nuit"] .white, :root[data-theme="nuit"] .pastel, :root[data-theme="nuit"] .gold, :root[data-theme="nuit"] .purple{color:#1b120a}
:root[data-theme="nuit"] td svg{filter:invert(.88) sepia(.3)}
:root[data-theme="nuit"] td font[color="#2e6d96" i]{color:#8cc0e6}
:root[data-theme="nuit"] td font[color="red" i]{color:#ff8f7f}
:root[data-theme="nuit"] td font[color="purple" i]{color:#d6a2ec}
:root[data-theme="nuit"] td font[color="#8f5507" i]{color:#e8ac62}
:root[data-theme="nuit"] td font[color="green" i]{color:#86d891}
:root[data-theme="nuit"] td font[color="#117a65" i]{color:#6cd8bd}
:root[data-theme="nuit"] td font[color="#000000" i]{color:var(--ink)}
:root[data-theme="nuit"] .bp-theme{background:#2a1f15;color:#f0c27a;border-color:rgba(240,194,122,.45)}

/* ---- Mode du soir automatique (réglage de l'appareil), sauf si « jour » a été choisi ---- */
@media (prefers-color-scheme: dark){
:root:not([data-theme="jour"]){color-scheme:dark;--ink:#eadcc0;--ink2:#bba98a;--rubric:#ec8a76;--paper:#1e160f;--a-ink:#eadcc0;--a-ink2:#bba98a;--a-rubric:#ec8a76;--a-paper:#1e160f;--text:#dccfb3;--muted:#b3a383;--line:rgba(234,220,192,.2);--paper-2:#221a12;background:#0c0805 radial-gradient(ellipse at 50% 0%,#2a1d12 0%,#0c0805 75%) fixed}
:root:not([data-theme="jour"]) body, :root:not([data-theme="jour"]) .page{background:radial-gradient(ellipse at 50% 28%,rgba(255,214,150,.07),transparent 70%),radial-gradient(ellipse at 0 0,rgba(0,0,0,.35),transparent 35%),radial-gradient(ellipse at 100% 100%,rgba(0,0,0,.4),transparent 40%),#1e160f;box-shadow:0 30px 80px rgba(0,0,0,.85),inset 0 0 90px rgba(0,0,0,.55)}
:root:not([data-theme="jour"]) body:has(> .page){background:transparent;box-shadow:none}
:root:not([data-theme="jour"]) body::before, :root:not([data-theme="jour"]) .page::before{border-color:rgba(236,138,118,.38)}
:root:not([data-theme="jour"]) .page::after{opacity:.12}
:root:not([data-theme="jour"]) .hero h1{text-shadow:none}
:root:not([data-theme="jour"]) img[src$="fleuron_bible_1910.svg"], :root:not([data-theme="jour"]) h1::after, :root:not([data-theme="jour"]) .page-header::after, :root:not([data-theme="jour"]) center:has(> img[src$="line.gif"]){filter:invert(1) sepia(.45) saturate(1.3) brightness(.9)}
:root:not([data-theme="jour"]) .books a::after{border-bottom-color:rgba(234,220,192,.22)}
:root:not([data-theme="jour"]) .testament + .testament{border-left-color:rgba(234,220,192,.22)}
:root:not([data-theme="jour"]) .links li{border-bottom-color:rgba(234,220,192,.22)}
:root:not([data-theme="jour"]) footer, :root:not([data-theme="jour"]) .page-links{border-top-color:rgba(234,220,192,.22)}
:root:not([data-theme="jour"]) td{border-color:rgba(234,220,192,.22)}
:root:not([data-theme="jour"]) .verse-box, :root:not([data-theme="jour"]) .cadre, :root:not([data-theme="jour"]) .cadre2, :root:not([data-theme="jour"]) .note-box, :root:not([data-theme="jour"]) .study-card, :root:not([data-theme="jour"]) .study-fieldset, :root:not([data-theme="jour"]) .translations-list li, :root:not([data-theme="jour"]) .timeline-card, :root:not([data-theme="jour"]) .page-link, :root:not([data-theme="jour"]) #main table{background:rgba(255,232,196,.055);border-color:rgba(234,220,192,.22);color:var(--ink)}
:root:not([data-theme="jour"]) .verse-box, :root:not([data-theme="jour"]) .cadre2{border-left-color:var(--rubric)}
:root:not([data-theme="jour"]) .verse-icon, :root:not([data-theme="jour"]) .manuscript-icon, :root:not([data-theme="jour"]) .note-box::before{background:#1e160f;border-color:rgba(234,220,192,.22);color:var(--ink2)}
:root:not([data-theme="jour"]) .page-link:hover{background:var(--rubric);color:#1e160f}
:root:not([data-theme="jour"]) .date{background:rgba(255,232,196,.055);border-color:rgba(236,138,118,.4)}
:root:not([data-theme="jour"]) .timeline-date, :root:not([data-theme="jour"]) .timeline-title{color:var(--ink)}
:root:not([data-theme="jour"]) .timeline-era, :root:not([data-theme="jour"]) .timeline-note{color:#c9b48a}
:root:not([data-theme="jour"]) .nombres a{background:rgba(255,232,196,.055);border-color:rgba(236,138,118,.35)}
:root:not([data-theme="jour"]) .nombres a:hover{background:var(--rubric);color:#1e160f}
:root:not([data-theme="jour"]) tr:has(.number:target) > td{background:rgba(236,138,118,.17)}
:root:not([data-theme="jour"]) .livres-nav{border-top-color:var(--ink)}
:root:not([data-theme="jour"]) b, :root:not([data-theme="jour"]) strong{color:#f7ecd4}
:root:not([data-theme="jour"]) .livres-nav strong{color:var(--rubric)}
:root:not([data-theme="jour"]) .ombre{color:#fff4dc;text-shadow:1px 1px 2px #000}
:root:not([data-theme="jour"]) .yellow, :root:not([data-theme="jour"]) .pink, :root:not([data-theme="jour"]) .green, :root:not([data-theme="jour"]) .orange, :root:not([data-theme="jour"]) .red, :root:not([data-theme="jour"]) .blue, :root:not([data-theme="jour"]) .white, :root:not([data-theme="jour"]) .pastel, :root:not([data-theme="jour"]) .gold, :root:not([data-theme="jour"]) .purple{color:#1b120a}
:root:not([data-theme="jour"]) td svg{filter:invert(.88) sepia(.3)}
:root:not([data-theme="jour"]) td font[color="#2e6d96" i]{color:#8cc0e6}
:root:not([data-theme="jour"]) td font[color="red" i]{color:#ff8f7f}
:root:not([data-theme="jour"]) td font[color="purple" i]{color:#d6a2ec}
:root:not([data-theme="jour"]) td font[color="#8f5507" i]{color:#e8ac62}
:root:not([data-theme="jour"]) td font[color="green" i]{color:#86d891}
:root:not([data-theme="jour"]) td font[color="#117a65" i]{color:#6cd8bd}
:root:not([data-theme="jour"]) td font[color="#000000" i]{color:var(--ink)}
:root:not([data-theme="jour"]) .bp-theme{background:#2a1f15;color:#f0c27a;border-color:rgba(240,194,122,.45)}
}
