/* Lecteur partagé par toutes les publications : barres bleu marine, fond sable, livre au centre.
   Toutes les classes de l'habillage commencent par « lv- » pour ne jamais entrer en conflit avec la mise en page d'une publication. */
:root { --lv-deep: #072b6b; --lv-gold: #f6c900; --lv-sable: #e9e3d5; --lv-police: "Archivo", "Arial Narrow", Arial, sans-serif; }
html, body { height: 100%; margin: 0; }
body { position: relative; background: var(--lv-sable); color: #18202e; font-family: var(--lv-police); display: flex; flex-direction: column; overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }

.lv-bar { background: var(--lv-deep); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; z-index: 30; }
.lv-top { height: 56px; padding: 0 16px; }
.lv-bottom { height: 54px; padding: 0 10px env(safe-area-inset-bottom, 0px); }
.lv-brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: #fff; text-decoration: none; font: 800 16px/1.1 var(--lv-police); font-stretch: 85%; letter-spacing: .1em; text-transform: uppercase; }
.lv-brand img { height: 42px; width: auto; display: block; flex: none; }
.lv-brand span { border-left: 2px solid var(--lv-gold); padding-left: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lv-pill { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); border-radius: 99px; padding: 8px 14px; font: 700 13px/1 var(--lv-police); letter-spacing: .06em; cursor: pointer; text-decoration: none; white-space: nowrap; }
.lv-pill:hover { background: rgba(255,255,255,.14); }
.lv-pill[aria-pressed="true"] { background: var(--lv-gold); border-color: var(--lv-gold); color: var(--lv-deep); }
.lv-pill[aria-pressed="true"]:hover { background: #ffd92e; }
.lv-bar svg, .lv-fleche svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.lv-pill svg { width: 16px; height: 16px; }
.lv-grp { display: flex; align-items: center; gap: 2px; }
.lv-grp button, .lv-grp a { width: 42px; height: 42px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 8px; color: #fff; cursor: pointer; }
.lv-grp button:hover, .lv-grp a:hover { background: rgba(255,255,255,.14); }
.lv-grp button:disabled { opacity: .35; cursor: default; background: transparent; }
.lv-grp button[aria-pressed="true"] { background: var(--lv-gold); color: var(--lv-deep); }
.lv-bar :focus-visible, .lv-fleche:focus-visible, #thumbs :focus-visible { outline: 3px solid var(--lv-gold); outline-offset: 2px; }
#folio { min-width: 78px; text-align: center; background: #fff; color: var(--lv-deep); border-radius: 6px; padding: 8px 10px; font: 800 14px/1 var(--lv-police); font-variant-numeric: tabular-nums; margin: 0 6px; }

#stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
#scroller { position: absolute; inset: 0; display: flex; overflow: hidden; padding: 22px 64px 34px; box-sizing: border-box; }
#scroller.lv-zoom { overflow: auto; padding: 16px; cursor: grab; }
#bookwrap { margin: auto; flex: none; transition: transform .55s cubic-bezier(.3,.7,.2,1); filter: drop-shadow(0 14px 26px rgba(30,25,10,.28)); }
#book { --k: 1; }
#book .lv-feuillet { background: #fff; overflow: hidden; }
#book .lv-feuillet > .sheet { transform: scale(var(--k)); transform-origin: 0 0; }
#book:not(.stf__parent) .lv-feuillet:not(:first-child) { display: none; }
#book a[data-goto] { cursor: pointer; }
#book a[data-goto] * { pointer-events: none; }

.lv-fleche { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 52px; height: 96px; background: transparent; border: 0; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); display: grid; place-items: center; }
.lv-fleche svg { width: 26px; height: 52px; stroke-width: 2.6; }
.lv-prec { left: 6px; } .lv-suiv { right: 6px; }
.lv-fleche:disabled { opacity: 0; pointer-events: none; }
#hint { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; font: 600 12px/1 var(--lv-police); letter-spacing: .06em; color: #6f6a5c; pointer-events: none; transition: opacity .4s; }
#hint.lv-off { opacity: 0; }

/* vignettes */
#thumbs { position: absolute; left: 0; right: 0; bottom: 54px; max-height: 62%; background: #0a2452; color: #fff; z-index: 25; overflow: auto; padding: 14px 18px 18px; box-shadow: 0 -10px 30px rgba(0,0,0,.3); }
.lv-thumbs-head { display: flex; justify-content: space-between; align-items: center; font: 800 13px/1 var(--lv-police); letter-spacing: .14em; text-transform: uppercase; color: var(--lv-gold); margin-bottom: 12px; }
.lv-thumbs-head button { background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; }
.lv-thumbs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--lv-vignette, 150px), 1fr)); gap: 14px; }
.lv-thumbs-grid button { background: transparent; border: 0; padding: 0; color: #dbe5f7; cursor: pointer; font: 600 12px/1.3 var(--lv-police); text-align: left; }
.lv-thumbs-grid img { width: 100%; height: auto; display: block; border-radius: 3px; border: 3px solid transparent; margin-bottom: 6px; background: #fff; }
.lv-thumbs-grid button[aria-current="true"] img { border-color: var(--lv-gold); }
.lv-thumbs-grid b { color: #fff; margin-right: 6px; }

#toast { position: absolute; left: 50%; bottom: 70px; transform: translate(-50%, 12px); background: #18202e; color: #fff; border-radius: 99px; padding: 10px 18px; font: 600 13px/1.25 var(--lv-police); opacity: 0; pointer-events: none; transition: .25s; z-index: 40; max-width: 80%; }
#toast.lv-on { opacity: 1; transform: translate(-50%, 0); }

/* mode lecture : les mêmes pages, à faire défiler. Chaque publication y règle ses propres tailles (#lecture …). */
body.lv-lecture { overflow: auto; height: auto; display: block; }
body.lv-lecture .lv-top { position: sticky; top: 0; }
body.lv-lecture #stage, body.lv-lecture .lv-bottom, body.lv-lecture #thumbs { display: none; }
#lecture { overflow-x: hidden; max-width: 794px; margin: 0 auto; padding: 0 0 40px; background: #fff; }
#lecture > .sheet { width: auto; height: auto; min-height: 0; max-width: none; margin: 0; box-shadow: none; overflow: hidden; scroll-margin-top: 58px; }

@media (max-width: 700px) {
  .lv-top { height: 50px; padding: 0 10px; }
  .lv-brand img { height: 34px; } .lv-brand { font-size: 12px; gap: 9px; } .lv-brand span { padding-left: 9px; }
  .lv-pill { padding: 8px 11px; font-size: 12px; }
  .lv-pill.lv-retour span { display: none; }
  #scroller { padding: 12px 8px 30px; }
  .lv-fleche { display: none; }
  .lv-grp button, .lv-grp a { width: 38px; height: 42px; }
  #btn-first, #btn-last, #btn-full { display: none; }
  #folio { min-width: 60px; margin: 0 2px; }
}
@media (prefers-reduced-motion: reduce) { #bookwrap, #toast, #hint { transition: none; } }
