/* Atelier Flipbook — styles du lecteur */
.fb {
  --fb-accent: #2f5bea;
  --fb-accent-fg: #fff;
  --fb-bar-bg: #ffffff;
  --fb-bar-fg: #1d1f24;
  --fb-radius: 14px;
  --fb-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fb-paper: #ffffff;
  --fb-hs: var(--fb-accent);
  --fb-header-fg: #1d1f24;
  --pw: 400px; --ph: 560px; --bw: 800px;
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  font-family: var(--fb-font);
  font-stretch: var(--fb-font-stretch, normal);
  color: var(--fb-bar-fg);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
.fb *, .fb *::before, .fb *::after { box-sizing: border-box; }
:where(.fb) button { font: inherit; color: inherit; }
.fb-bg { position: absolute; inset: 0; z-index: 0; }

/* en-tête */
.fb-header { position: relative; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 12px 20px 0; min-height: 52px; color: var(--fb-header-fg); flex: none; }
.fb-header-brand { display: flex; align-items: center; gap: 14px 22px; min-width: 0; flex: 1; }
.fb-header--center .fb-header-brand { justify-content: center; }
.fb-header--right .fb-header-brand { justify-content: flex-end; }
.fb-header--bar { background: var(--fb-header-bg, #b0102b); min-height: var(--fb-header-h, 56px); padding: 6px 24px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.fb-logo { display: inline-flex; line-height: 0; flex: none; }
.fb-logo img { max-width: 40vw; object-fit: contain; }
.fb-tagline { font-size: var(--fb-tagline-fs, 12px); opacity: .85; white-space: nowrap; }
.fb-title { margin: 0; font-size: var(--fb-title-fs, 15px); font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-header-search { position: relative; flex: 0 1 260px; display: flex; align-items: center; }
.fb-header-search input { width: 100%; height: 34px; padding: 0 36px 0 12px; border: 0; border-radius: 2px; background: color-mix(in srgb, var(--fb-header-fg) 22%, transparent); color: var(--fb-header-fg); font: inherit; font-size: 14px; outline: none; }
.fb-header-search input::placeholder { color: var(--fb-header-fg); opacity: .8; }
.fb-header-search input:focus { background: color-mix(in srgb, var(--fb-header-fg) 30%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fb-header-fg) 50%, transparent); }
.fb-header-search svg { position: absolute; right: 10px; width: 17px; height: 17px; pointer-events: none; opacity: .85; }
.fb.is-mobile .fb-header-search, .fb.is-mobile .fb-tagline { display: none; }
.fb.is-mobile .fb-header--bar { min-height: 48px; padding: 4px 14px; }

/* pied de page */
.fb-footer { position: relative; z-index: 3; flex: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; padding: 18px 32px 16px; background: var(--fb-footer-bg, #1b1b1d); color: var(--fb-footer-fg, #e9e9ea); font-size: var(--fb-footer-fs, 12.5px); line-height: 1.5; user-select: text; }
.fb-footer a { color: inherit; text-decoration: none; }
.fb-footer a:hover { text-decoration: underline; }
.fb-footer-links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 6px; }
.fb-footer-copy, .fb-footer-text { margin: 0; opacity: .85; }
.fb-footer-right { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 560px; }
.fb-footer-logo { line-height: 0; }
.fb-footer-logo img { max-width: 50vw; object-fit: contain; }
.fb.is-mobile .fb-footer { padding: 10px 14px; font-size: 11px; gap: 8px; }
.fb.is-mobile .fb-footer--desk { display: none; }
.fb.is-mobile .fb-footer-right { display: none; }

/* scène */
.fb-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.fb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; outline: none; touch-action: none; cursor: default; }
.fb.is-zoomed .fb-stage { cursor: grab; }
.fb.is-zoomed .fb-stage:active { cursor: grabbing; }
.fb-zoom { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.fb-zoom.is-anim { transition: transform .28s cubic-bezier(.2,.7,.2,1); }
.fb-book { position: absolute; left: 50%; top: 50%; width: var(--bw); height: var(--ph); transform: translate(-50%, -50%); perspective: calc(var(--pw) * 4.2); }
.fb-sheet { position: absolute; inset: 0; transform-style: preserve-3d; z-index: 2; }
.fb-slot { position: absolute; top: 0; width: var(--pw); height: 100%; }
.fb-slot--l { left: 0; }
.fb-slot--r { left: var(--pw); }
.fb-book.is-single .fb-slot--r { left: 0; }
.fb-book.is-single .fb-slot--l { display: none; }
.fb-slot:not(.is-empty) { box-shadow: 0 18px 40px -12px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.12); background: var(--fb-paper); }
.fb-noshadow .fb-slot:not(.is-empty) { box-shadow: none; }
.fb.is-double .fb-slot--l:not(.is-empty)::after,
.fb.is-double .fb-slot--r:not(.is-empty)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; z-index: 3; }
.fb.is-double .fb-slot--l::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.16), rgba(0,0,0,.04) 40%, transparent); }
.fb.is-double .fb-slot--r::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,.16), rgba(0,0,0,.04) 40%, transparent); }

.fb-page { position: absolute; inset: 0; background: var(--fb-paper); overflow: hidden; }
.fb-img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; opacity: 0; transition: opacity .25s; }
.fb-page.is-loaded .fb-img { opacity: 1; }
.fb-page:not(.is-loaded)::before { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); border-top-color: var(--fb-accent); animation: fb-spin .8s linear infinite; }
@keyframes fb-spin { to { transform: rotate(360deg); } }

/* feuille en mouvement */
.fb-leaf { position: absolute; top: 0; width: var(--pw); height: 100%; transform-style: preserve-3d; z-index: 6; will-change: transform; }
.fb-leaf--r { left: var(--pw); transform-origin: 0 50%; }
.fb-leaf--l { left: 0; transform-origin: 100% 50%; }
.fb-leaf--single { left: 0; transform-origin: 0 50%; }
.fb-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--fb-paper); overflow: hidden; box-shadow: 0 0 22px rgba(0,0,0,.18); }
.fb-face--back { transform: rotateY(180deg); }
.fb-face-shade { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0; }
.fb-face.is-right .fb-face-shade { background: linear-gradient(to right, rgba(0,0,0,.55), rgba(0,0,0,.18) 45%, rgba(0,0,0,.05)); }
.fb-face.is-left .fb-face-shade { background: linear-gradient(to left, rgba(0,0,0,.55), rgba(0,0,0,.18) 45%, rgba(0,0,0,.05)); }
.fb-leaf--single .fb-face-shade { background: linear-gradient(to right, rgba(0,0,0,.45), rgba(0,0,0,.08)); }
.fb-face.is-right::after, .fb-face.is-left::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; z-index: 4; pointer-events: none; }
.fb-face.is-right::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,.16), transparent); }
.fb-face.is-left::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.16), transparent); }
.fb-cast { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; }
.fb-cast--r { background: linear-gradient(to right, rgba(0,0,0,.45), rgba(0,0,0,.1) 30%, transparent 60%); }
.fb-cast--l { background: linear-gradient(to left, rgba(0,0,0,.45), rgba(0,0,0,.1) 30%, transparent 60%); }
.fb.is-turning .fb-hs { pointer-events: none; }

/* zones interactives */
.fb-hsl { position: absolute; inset: 0; z-index: 4; }
.fb-hs { position: absolute; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; margin: 0; background: transparent; border-radius: 4px; cursor: pointer; transition: background-color .15s, box-shadow .15s; overflow: hidden; }
.fb-hs:focus-visible { outline: 2px solid var(--fb-hs); outline-offset: 2px; }
.fb-hs--hover:hover, .fb-hs--visible { background: color-mix(in srgb, var(--fb-hs) 16%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fb-hs) 70%, transparent); }
.fb-hs--visible { animation: fb-pulse 2.6s ease-in-out infinite; }
@media (hover: none) { .fb-hs--hover { background: color-mix(in srgb, var(--fb-hs) 9%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fb-hs) 45%, transparent); } }
@keyframes fb-pulse { 50% { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fb-hs) 35%, transparent); } }
.fb-hs-play { width: min(56px, 60%); aspect-ratio: 1; max-height: 80%; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.fb-hs-play svg { width: 55%; height: 55%; }
.fb-hs--hidden .fb-hs-play { display: none; }
.fb-hs.is-playing { background: #000; box-shadow: none; animation: none; }
.fb-hs .fb-media { width: 100%; height: 100%; border: 0; display: block; background: #000; }

/* onglets de chapitres */
.fb-tabs { position: absolute; z-index: 3; display: flex; gap: 3px; pointer-events: none; transition: left .5s cubic-bezier(.3,.7,.3,1), width .5s; }
.fb-tabs[hidden], .fb.is-mobile .fb-tabs { display: none; }
.fb .fb-tab { font-family: var(--fb-tab-font, inherit); font-stretch: var(--fb-tab-stretch, inherit); }
.fb-tabs-upper .fb-tab, .fb-tabs-upper .fb-tab::after { text-transform: uppercase; letter-spacing: .05em; }
/* onglets « livre » : l'emplacement reste réservé de l'autre côté */
.fb-tab { transition: transform .2s, filter .2s, box-shadow .2s, opacity .25s, visibility .25s; }
.fb-tab.is-off { opacity: 0; visibility: hidden; pointer-events: none; }
.fb-tab { pointer-events: auto; border: 0; cursor: pointer; background: var(--c); color: var(--cf); font-size: var(--fb-tab-fs, 12px); font-weight: var(--fb-tab-weight, 600); letter-spacing: .02em; padding: 10px 0; display: flex; align-items: center; justify-content: var(--fb-tab-justify, center); text-align: center; overflow: hidden; transition: transform .2s, filter .2s, box-shadow .2s; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35); min-height: 0; min-width: 0; }
.fb-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; max-width: 100%; }
.fb-tab:hover { filter: brightness(1.06); }
.fb-tabs--right, .fb-tabs--left { top: 5%; bottom: 5%; width: var(--fb-tab-w, 36px); flex-direction: column; }
.fb-tabs--right { left: var(--tx1); }
.fb-tabs--left { left: calc(var(--tx0) - var(--fb-tab-w, 36px)); }
.fb-tabs--right .fb-tab, .fb-tabs--left .fb-tab { flex: 0 1 calc(var(--fb-tab-fs, 12px) * 11); width: var(--fb-tab-w, 36px); writing-mode: vertical-rl; padding: 12px 0; }
.fb-tabs--right .fb-tab { border-radius: 0 9px 9px 0; transform: translateX(-7px); }
.fb-tabs--left .fb-tab { border-radius: 9px 0 0 9px; transform: translateX(7px) ; }
.fb-tabs--left .fb-tab span { transform: rotate(180deg); }
.fb-tabs--right .fb-tab:hover, .fb-tabs--right .fb-tab.is-active,
.fb-tabs--left .fb-tab:hover, .fb-tabs--left .fb-tab.is-active { transform: translateX(0); }
.fb-tabs--top, .fb-tabs--bottom { left: calc(var(--tx0) + 3%); width: calc(var(--tx1) - var(--tx0) - 6%); height: var(--fb-tab-h, 30px); flex-direction: row; }
.fb-tabs--top { top: calc(var(--fb-tab-h, 30px) * -1); }
.fb-tabs--bottom { bottom: calc(var(--fb-tab-h, 30px) * -1); }
.fb-tabs--top .fb-tab, .fb-tabs--bottom .fb-tab { flex: 0 1 calc(var(--fb-tab-fs, 12px) * 12.5); height: var(--fb-tab-h, 30px); padding: 0 12px; }
.fb-tabs--top .fb-tab { border-radius: 9px 9px 0 0; transform: translateY(7px); }
.fb-tabs--bottom .fb-tab { border-radius: 0 0 9px 9px; transform: translateY(-7px); }
.fb-tabs--top .fb-tab:hover, .fb-tabs--top .fb-tab.is-active,
.fb-tabs--bottom .fb-tab:hover, .fb-tabs--bottom .fb-tab.is-active { transform: translateY(0); }
.fb-tabs--pill { gap: 6px; }
.fb-tabs--pill.fb-tabs--right .fb-tab { border-radius: 0 18px 18px 0; }
.fb-tabs--pill.fb-tabs--left .fb-tab { border-radius: 18px 0 0 18px; }
.fb-tabs--pill.fb-tabs--top .fb-tab { border-radius: 18px 18px 0 0; }
.fb-tabs--pill.fb-tabs--bottom .fb-tab { border-radius: 0 0 18px 18px; }
.fb-tabs--minimal .fb-tab { background: var(--fb-bar-bg); color: var(--fb-bar-fg); box-shadow: inset 4px 0 0 var(--c), 0 4px 10px -4px rgba(0,0,0,.3); }
.fb-tabs--minimal.fb-tabs--left .fb-tab { box-shadow: inset -4px 0 0 var(--c), 0 4px 10px -4px rgba(0,0,0,.3); }
.fb-tabs--minimal.fb-tabs--top .fb-tab { box-shadow: inset 0 4px 0 var(--c), 0 4px 10px -4px rgba(0,0,0,.3); }
.fb-tabs--minimal.fb-tabs--bottom .fb-tab { box-shadow: inset 0 -4px 0 var(--c), 0 4px 10px -4px rgba(0,0,0,.3); }
.fb-tabs--minimal .fb-tab.is-active { background: var(--c); color: var(--cf); }
/* onglets compacts : libellé affiché au survol */
.fb-tabs--compact .fb-tab { overflow: visible; position: relative; padding: 0; }
.fb-tabs--compact .fb-tab span { display: none; }
.fb-tabs--compact .fb-tab::after { content: attr(data-label); position: absolute; z-index: 5; writing-mode: horizontal-tb; white-space: nowrap; background: var(--c); color: var(--cf); font-size: max(12.5px, var(--fb-tab-fs, 12px)); font-weight: var(--fb-tab-weight, 600); padding: 6px 11px; border-radius: 8px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.fb-tabs--compact.fb-tabs--right .fb-tab::after { left: calc(100% + 6px); top: 50%; transform: translate(-4px, -50%); }
.fb-tabs--compact.fb-tabs--left .fb-tab::after { right: calc(100% + 6px); top: 50%; transform: translate(4px, -50%); }
.fb-tabs--compact.fb-tabs--top .fb-tab::after { bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); }
.fb-tabs--compact.fb-tabs--bottom .fb-tab::after { top: calc(100% + 6px); left: 50%; transform: translate(-50%, -4px); }
.fb-tabs--compact .fb-tab:hover::after, .fb-tabs--compact .fb-tab:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.fb-tabs--compact.fb-tabs--top .fb-tab:hover::after, .fb-tabs--compact.fb-tabs--bottom .fb-tab:hover::after { transform: translate(-50%, 0); }
.fb-tabs--compact.fb-tabs--right .fb-tab, .fb-tabs--compact.fb-tabs--left .fb-tab { flex: 1 1 0; width: calc(var(--fb-tab-w, 36px) * .62); }
.fb-tabs--compact.fb-tabs--right .fb-tab.is-active, .fb-tabs--compact.fb-tabs--left .fb-tab.is-active, .fb-tabs--compact .fb-tab:hover { width: calc(var(--fb-tab-w, 36px) * .8); }
.fb-tabs--compact.fb-tabs--left .fb-tab { margin-left: auto; }

/* barre de chapitres mobile */
.fb-chips { display: none; gap: 8px; padding: 6px 12px 2px; overflow-x: auto; scrollbar-width: none; flex: none; }
.fb-chips::-webkit-scrollbar { display: none; }
.fb.is-mobile .fb-chips:not([hidden]) { display: flex; }
.fb-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 7px 13px; background: var(--fb-bar-bg); color: var(--fb-bar-fg); font-size: 13px; font-weight: 500; box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); cursor: pointer; }
.fb-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.fb-chip.is-active { background: var(--c); color: #fff; }
.fb-chip.is-active i { background: #fff; }

/* flèches latérales */
.fb-arrow { position: absolute; top: 50%; z-index: 4; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--fb-bar-bg) 88%, transparent); color: var(--fb-bar-fg); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .2s, transform .2s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fb-arrow svg { width: 22px; height: 22px; }
.fb-arrow:hover { transform: scale(1.06); }
.fb-arrow:disabled { opacity: 0; pointer-events: none; }
.fb-arrow--prev { left: 14px; }
.fb-arrow--next { right: 14px; }
.fb.is-mobile .fb-arrow { display: none; }

/* barre d'outils */
.fb-toolbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 4px; flex: none; color: var(--fb-bar-fg); }
.fb-barpos--top .fb-toolbar { order: -1; }
.fb-bar--floating .fb-toolbar { align-self: center; margin: 6px 12px 14px; padding: 5px; background: var(--fb-bar-bg); border-radius: calc(var(--fb-radius) + 5px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.08); max-width: calc(100% - 24px); }
.fb-bar--floating.fb-barpos--top .fb-toolbar { margin: 10px 12px 6px; }
.fb-bar--bar .fb-toolbar { padding: 7px 14px; background: var(--fb-bar-bg); box-shadow: 0 -1px 0 rgba(0,0,0,.06); }
.fb-bar--bar.fb-barpos--top .fb-toolbar { box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.fb-bar--bar .fb-group--tools { margin-right: auto; }
.fb-bar--bar .fb-group--view { margin-left: auto; }
.fb-group { display: flex; align-items: center; gap: 2px; }
.fb-group + .fb-group { padding-left: 6px; margin-left: 4px; border-left: 1px solid color-mix(in srgb, var(--fb-bar-fg) 14%, transparent); }
.fb-bar--bar .fb-group + .fb-group { border-left: 0; }
.fb-icon-btn { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--fb-radius); background: transparent; cursor: pointer; transition: background-color .15s, opacity .15s; }
.fb-icon-btn svg { width: 21px; height: 21px; }
.fb-icon-btn:hover { background: color-mix(in srgb, var(--fb-bar-fg) 9%, transparent); }
.fb-icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.fb-icon-btn:focus-visible, .fb-arrow:focus-visible, .fb-tab:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 1px; }
.fb-pageind { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font-size: var(--fb-page-fs, 13px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fb-pageinput { width: 64px; height: 30px; text-align: center; border: 1px solid color-mix(in srgb, var(--fb-bar-fg) 16%, transparent); border-radius: calc(var(--fb-radius) * .6); background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 0 4px; user-select: text; }
.fb-pageinput:focus { outline: none; border-color: var(--fb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fb-accent) 25%, transparent); }
.fb-pageinput[readonly] { border-color: transparent; }
.fb-pagecount { opacity: .6; }
.fb-mobile-only { display: none; }
.fb.is-mobile .fb-mobile-only { display: inline-flex; }
.fb.is-mobile .fb-desk-only { display: none; }
.fb.is-mobile .fb-icon-btn { width: 38px; height: 38px; }
.fb.is-mobile .fb-group + .fb-group { padding-left: 3px; margin-left: 2px; }
.fb.is-mobile .fb-pageinput { width: 58px; }

/* panneau latéral */
.fb-scrim { position: absolute; inset: 0; z-index: 7; background: rgba(10,12,16,.28); opacity: 0; pointer-events: none; transition: opacity .25s; }
.fb.has-panel .fb-scrim, .fb.has-modal .fb-scrim { opacity: 1; pointer-events: auto; }
.fb-panel { position: absolute; z-index: 8; top: 12px; bottom: 12px; left: 12px; width: min(360px, calc(100% - 24px)); display: flex; flex-direction: column; background: var(--fb-bar-bg); color: var(--fb-bar-fg); border-radius: calc(var(--fb-radius) + 6px); box-shadow: 0 24px 60px -20px rgba(0,0,0,.45); transform: translateX(calc(-100% - 20px)); transition: transform .32s cubic-bezier(.2,.8,.2,1); user-select: text; }
.fb.has-panel .fb-panel { transform: none; }
.fb.is-mobile .fb-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 72%; border-radius: 20px 20px 0 0; transform: translateY(105%); }
.fb.is-mobile.has-panel .fb-panel { transform: none; }
.fb-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 20px; }
.fb-panel-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.fb-panel-body { flex: 1; overflow-y: auto; padding: 6px 16px 18px; overscroll-behavior: contain; }
.fb-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.fb-thumbs-ch { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.fb-thumbs-ch i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.fb-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: color-mix(in srgb, var(--fb-bar-fg) 6%, transparent); border-radius: 6px; cursor: pointer; aspect-ratio: var(--ar); }
.fb-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; box-shadow: 0 2px 8px -3px rgba(0,0,0,.3); background: var(--fb-paper); }
.fb-thumb img:not([src]) { visibility: hidden; }
.fb-thumb span { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: var(--fb-bar-bg); box-shadow: 0 1px 4px rgba(0,0,0,.15); font-variant-numeric: tabular-nums; }
.fb-thumb.is-current img { outline: 3px solid var(--fb-accent); outline-offset: 2px; }
.fb-thumb.is-current span { background: var(--fb-accent); color: var(--fb-accent-fg); }
.fb-toc { list-style: none; margin: 0; padding: 0; }
.fb-toc button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: 14.5px; }
.fb-toc button:hover { background: color-mix(in srgb, var(--fb-bar-fg) 6%, transparent); }
.fb-toc button.is-active { background: color-mix(in srgb, var(--c) 14%, transparent); font-weight: 600; }
.fb-toc i { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.fb-toc span { flex: 1; }
.fb-toc em { font-style: normal; font-size: 12px; opacity: .55; font-variant-numeric: tabular-nums; }
.fb-empty { opacity: .6; font-size: 14px; }
.fb-search-input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--fb-bar-fg) 18%, transparent); background: transparent; color: inherit; font: inherit; font-size: 15px; }
.fb-search-input:focus { outline: none; border-color: var(--fb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fb-accent) 22%, transparent); }
.fb-search-info { font-size: 12.5px; opacity: .6; margin: 10px 2px; }
.fb-results { list-style: none; margin: 0; padding: 0; }
.fb-results button { width: 100%; text-align: left; border: 0; background: none; padding: 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.4; }
.fb-results button:hover { background: color-mix(in srgb, var(--fb-bar-fg) 6%, transparent); }
.fb-results strong { font-size: 12px; color: var(--fb-accent); }
.fb-results small { opacity: .7; font-weight: 500; }
.fb-results mark { background: color-mix(in srgb, var(--fb-accent) 25%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* modale */
.fb-modal { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fb-modal[hidden] { display: none; }
.fb-modal-box { position: relative; background: var(--fb-bar-bg); color: var(--fb-bar-fg); border-radius: calc(var(--fb-radius) + 6px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); max-width: 560px; width: 100%; max-height: 100%; overflow: auto; user-select: text; animation: fb-pop .22s cubic-bezier(.2,.8,.2,1); }
.fb-modal[data-kind="video"] .fb-modal-box { max-width: min(1100px, 100%); background: #000; padding: 0; overflow: visible; }
.fb-modal-close { position: absolute; top: 8px; right: 8px; z-index: 2; }
.fb-modal[data-kind="video"] .fb-modal-close { top: -46px; right: -6px; color: #fff; }
@keyframes fb-pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.fb-video-box { aspect-ratio: 16 / 9; width: 100%; border-radius: inherit; overflow: hidden; }
.fb-video-box .fb-media { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.fb-popup { padding: 28px 28px 24px; }
.fb-popup h3 { margin: 0 32px 10px 0; font-size: 19px; }
.fb-popup-text { font-size: 15px; line-height: 1.55; opacity: .9; }
.fb-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 18px; padding: 10px 18px; border-radius: var(--fb-radius); background: var(--fb-accent); color: var(--fb-accent-fg); border: 0; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.fb-btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); }

/* toast, chargement, consentement */
.fb-toast { position: absolute; left: 50%; bottom: 86px; z-index: 10; transform: translate(-50%, 10px); background: #16181d; color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.fb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.fb-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity .4s; z-index: 5; }
.fb-loader span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0,0,0,.1); border-top-color: var(--fb-accent); animation: fb-spin .8s linear infinite; }
.fb.is-ready .fb-loader { opacity: 0; }
.fb-consent { position: absolute; z-index: 11; left: 50%; bottom: 76px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); background: var(--fb-bar-bg); color: var(--fb-bar-fg); border-radius: 16px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.5); padding: 16px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13.5px; line-height: 1.45; }
.fb-consent p { margin: 0; flex: 1 1 260px; }
.fb-consent-btns { display: flex; gap: 8px; }
.fb-consent .fb-btn { margin: 0; padding: 8px 14px; }
.fb-cookie-link { position: absolute; z-index: 3; left: 10px; bottom: 6px; border: 0; background: none; font-size: 11px; opacity: .55; cursor: pointer; color: var(--fb-header-fg); padding: 4px; }
.fb-cookie-link:hover { opacity: 1; text-decoration: underline; }
.fb.is-mobile .fb-cookie-link { bottom: auto; top: 4px; left: auto; right: 6px; }

@media (prefers-reduced-motion: reduce) {
  .fb-panel, .fb-tabs, .fb-zoom.is-anim { transition: none; }
}
@media print {
  .fb-toolbar, .fb-arrow, .fb-chips, .fb-header { display: none; }
}

/* taille des boutons */
.fb-btns--sm .fb-icon-btn { width: 34px; height: 34px; }
.fb-btns--sm .fb-icon-btn svg { width: 18px; height: 18px; }
.fb-btns--lg .fb-icon-btn { width: 46px; height: 46px; }
.fb-btns--lg .fb-icon-btn svg { width: 24px; height: 24px; }
/* flèches latérales en chevron fin */
.fb-arrows--line .fb-arrow { width: 44px; height: 88px; margin-top: -44px; border-radius: 6px; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--fb-arrow-fg, rgba(0,0,0,.35)); }
.fb-arrows--line .fb-arrow svg { width: 20px; height: 48px; }
.fb-arrows--line .fb-arrow:hover { transform: none; color: var(--fb-accent); background: rgba(0,0,0,.04); }

/* onglets qui se chevauchent (intercalaires superposés) */
.fb-tabs--overlap { gap: 0; }
.fb-tabs--overlap.fb-tabs--right { align-items: flex-start; }
.fb-tabs--overlap.fb-tabs--left { align-items: flex-end; }
.fb-tabs--overlap .fb-tab { flex: none !important; position: relative; transform: none !important; box-shadow: 0 5px 7px -3px rgba(0,0,0,.38), 2px 1px 4px -2px rgba(0,0,0,.25); transition: box-shadow .2s, opacity .25s, visibility .25s; }
.fb-tabs--overlap.fb-tabs--right .fb-tab, .fb-tabs--overlap.fb-tabs--left .fb-tab { height: var(--fb-tab-len, 132px); width: auto; min-width: var(--fb-tab-w, 36px); justify-content: var(--fb-tab-justify, center); padding: 10px 0; }
.fb-tabs--overlap.fb-tabs--right .fb-tab + .fb-tab, .fb-tabs--overlap.fb-tabs--left .fb-tab + .fb-tab { margin-top: var(--fb-tab-gap, 3px); }
.fb-tabs--overlap.fb-tabs--top .fb-tab, .fb-tabs--overlap.fb-tabs--bottom .fb-tab { width: var(--fb-tab-len, 150px); justify-content: var(--fb-tab-justify, center); }
.fb-tabs--overlap.fb-tabs--top .fb-tab + .fb-tab, .fb-tabs--overlap.fb-tabs--bottom .fb-tab + .fb-tab { margin-left: var(--fb-tab-gap, 3px); }
.fb-tabs--overlap.fb-tabs--left .fb-tab span { transform: none; }
.fb-tabs--overlap .fb-tab span { overflow: hidden; text-overflow: clip; }
/* survol : l'onglet passe devant, s'élargit et montre son intitulé complet */
.fb-tabs--overlap .fb-tab:hover, .fb-tabs--overlap .fb-tab:focus-visible { z-index: 99 !important; filter: none; box-shadow: 0 8px 18px -4px rgba(0,0,0,.45), 0 2px 5px rgba(0,0,0,.2); }
.fb-tabs--overlap.fb-tabs--right .fb-tab:hover, .fb-tabs--overlap.fb-tabs--left .fb-tab:hover,
.fb-tabs--overlap.fb-tabs--right .fb-tab:focus-visible, .fb-tabs--overlap.fb-tabs--left .fb-tab:focus-visible { justify-content: var(--fb-tab-justify, center); padding: 12px calc(var(--fb-tab-w, 36px) * .22); min-width: calc(var(--fb-tab-w, 36px) * 1.9); }
.fb-tabs--overlap .fb-tab:hover span, .fb-tabs--overlap .fb-tab:focus-visible span { white-space: normal; overflow: visible; max-height: none; line-height: 1.15; }
.fb-tabs--overlap.fb-tabs--top .fb-tab:hover, .fb-tabs--overlap.fb-tabs--bottom .fb-tab:hover { justify-content: var(--fb-tab-justify, center); height: auto; min-height: var(--fb-tab-h, 30px); padding: 6px 12px; }

/* page souple */
.fb-curl { position: absolute; top: 0; left: 0; height: 100%; z-index: 6; pointer-events: none; }
.fb-curl-face { position: absolute; top: 0; left: 0; width: var(--pw); height: 100%; overflow: hidden; background: var(--fb-paper); transform-origin: 0 0; will-change: clip-path, transform; }
.fb-curl-face.is-right::after, .fb-curl-face.is-left::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; z-index: 4; pointer-events: none; }
.fb-curl-face.is-right::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,.16), transparent); }
.fb-curl-face.is-left::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.16), transparent); }
.fb-curl-back.is-blank { background: linear-gradient(to right, color-mix(in srgb, var(--fb-paper) 92%, #000), var(--fb-paper)); }
.fb-curl-flap { position: absolute; inset: 0; filter: drop-shadow(0 0 10px rgba(0,0,0,.28)); }
.fb-curl-flap.is-light { filter: none; }
.fb-curl-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fb-curl-strip { position: absolute; pointer-events: none; }
.fb-curl-strip--cast { background: linear-gradient(to bottom, rgba(0,0,0,.42), rgba(0,0,0,.14) 35%, rgba(0,0,0,0)); }
.fb-curl-strip--flap { background: linear-gradient(to top, rgba(0,0,0,.3), rgba(0,0,0,.08) 25%, rgba(255,255,255,.18) 55%, rgba(0,0,0,0)); }

/* les onglets (et leurs ombres) ne débordent jamais sur la page : on coupe côté reliure du livre */
.fb-tabs--right { clip-path: inset(-60px -400px -60px 0); }
.fb-tabs--left { clip-path: inset(-60px 0 -60px -400px); }
.fb-tabs--top { clip-path: inset(-400px -60px 0 -60px); }
.fb-tabs--bottom { clip-path: inset(0 -60px -400px -60px); }

/* chevauchement : le texte est centré dans la partie visible de l'onglet (hors zone recouverte) */
.fb-tabs--overlap.fb-tabs--right .fb-tab + .fb-tab, .fb-tabs--overlap.fb-tabs--left .fb-tab + .fb-tab { padding-top: calc(10px + var(--fb-tab-cover, 0px)); }
.fb-tabs--overlap.fb-tabs--top .fb-tab + .fb-tab, .fb-tabs--overlap.fb-tabs--bottom .fb-tab + .fb-tab { padding-left: calc(12px + var(--fb-tab-cover, 0px)); }
.fb-tabs--overlap.fb-tabs--right .fb-tab:hover, .fb-tabs--overlap.fb-tabs--left .fb-tab:hover { padding-top: 12px; }
.fb-tabs--overlap.fb-tabs--top .fb-tab:hover, .fb-tabs--overlap.fb-tabs--bottom .fb-tab:hover { padding-left: 12px; }
.fb-tabs--overlap.fb-tabs--right .fb-tab.is-lead, .fb-tabs--overlap.fb-tabs--left .fb-tab.is-lead { padding-top: 10px; }
.fb-tabs--overlap.fb-tabs--top .fb-tab.is-lead, .fb-tabs--overlap.fb-tabs--bottom .fb-tab.is-lead { padding-left: 12px; }

/* bouton de téléchargement du PDF */
.fb-dl-btn { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 10px; margin-left: 4px; border: 0; border-radius: var(--fb-radius); background: var(--fb-accent); color: var(--fb-accent-fg); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: filter .15s; }
.fb-dl-btn:hover { filter: brightness(1.08); }
.fb-dl-btn svg, .fb-header-dl svg { width: 18px; height: 18px; flex: none; }
.fb-dl-btn small, .fb-header-dl small { font-weight: 500; opacity: .8; font-size: .9em; }
.fb-dl-btn:focus-visible, .fb-header-dl:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 2px; }
.fb-bar--bar .fb-dl-btn { background: color-mix(in srgb, var(--fb-bar-fg) 16%, transparent); color: var(--fb-bar-fg); }
.fb.is-mobile .fb-dl-btn span { display: none; }
.fb.is-mobile .fb-dl-btn { width: 38px; padding: 0; justify-content: center; background: transparent; color: inherit; }
.fb-header-dl { flex: none; height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px 0 11px; border: 1px solid color-mix(in srgb, var(--fb-header-fg) 45%, transparent); border-radius: var(--fb-radius); background: transparent; color: var(--fb-header-fg); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s; }
.fb-header-dl:hover { background: color-mix(in srgb, var(--fb-header-fg) 14%, transparent); }
.fb.is-mobile .fb-header-dl { display: none; }
.fb:not(.is-mobile) .fb-dl-btn.fb-mobile-only { display: none; }
/* panneau masqué hors ouverture (évite qu'il traverse l'écran lors d'un passage mobile ↔ ordinateur) */
.fb-panel { visibility: hidden; transition: transform .32s cubic-bezier(.2,.8,.2,1), visibility 0s linear .32s; }
.fb.has-panel .fb-panel { visibility: visible; transition: transform .32s cubic-bezier(.2,.8,.2,1), visibility 0s; }
