/* ============================================================
   PF2026 — Bibliothèque FanFics (inc/fanfics.php)
   Une librairie de nuit : en-têtes bleu encre, rayons de couvertures, papier pour lire.
   Titres éditoriaux en Literata italique, interface en Inter, marque en Unbounded.
   ============================================================ */

.ff {
  --ff-night: #0C1626;
  --ff-night-2: #13233B;
  --ff-gold: var(--pfb-jaune, #FFCC00);
  --ff-ink: var(--pfb-encre);
  --ff-body: var(--pfb-encre-corps);
  --ff-muted: color-mix(in srgb, var(--pfb-encre) 62%, transparent);
  --ff-line: var(--pfb-ligne);
  --ff-surface: var(--pfb-surface);
  --ff-surface-2: var(--pfb-surface-2);
  --ff-paper: var(--pfb-fond);
  --ff-accent: #B4461B;
  --ff-read: "Literata", Georgia, "Times New Roman", serif;
  --ff-ui: var(--pfb-font-texte);
  --ff-brand: var(--pfb-font-titre);
  --ff-r: 14px;
  --ff-shadow-book: 0 1px 1px rgba(0, 0, 0, .12), 0 6px 14px rgba(8, 14, 26, .18), 0 18px 34px -12px rgba(8, 14, 26, .35);
  background: var(--ff-paper);
  color: var(--ff-ink);
  font-family: var(--ff-ui);
  overflow-x: clip;
  padding-bottom: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ff { --ff-accent: #FFB089; --ff-shadow-book: 0 1px 1px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .45); }
}
:root[data-theme="dark"] .ff { --ff-accent: #FFB089; --ff-shadow-book: 0 1px 1px rgba(0, 0, 0, .4), 0 8px 20px rgba(0, 0, 0, .45); }

.ff *, .ff *::before, .ff *::after { box-sizing: border-box; }
.ff .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ff [hidden] { display: none !important; }
.ff :where(h1, h2, h3) { text-wrap: balance; }
.ff a { color: inherit; text-underline-offset: 3px; }
.ff-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.ff-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 40px; }
.ff-body > *, .ffwork__body > *, .ffhero__in > *, .fffeat > *, .ffregions > *, .ffwrite > * { min-width: 0; }

.ff-eyebrow { margin: 0 0 10px; font: 700 12px/1.3 var(--ff-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ff-gold); }
.ff-eyebrow a { color: inherit; }
.ff-eyebrow--ink { color: var(--ff-accent); }
.ff-h2 { margin: 0; font: 800 clamp(20px, 2.2vw, 25px)/1.2 var(--ff-brand); letter-spacing: -.015em; color: var(--ff-ink); }
/* Titres d'œuvres en Literata (la charte impose Unbounded à tous les titres : on l'écarte pour les seuls titres de livres). */
html body .ff :is(.ffwork__title, .fffeat__title, .ffpage__title, .fftome__title, .ffside__title, .ff-dexbox__title, .ffgate__box h2, .ffwrite__title, .ffprose h2),
html body .ff :is(.ffwork__title, .fffeat__title, .ffpage__title, .fftome__title, .ffside__title, .ffwrite__title) *,
html body .ff .ffhero__title em { font-family: var(--ff-read) !important; font-weight: 500 !important; font-style: italic; letter-spacing: -.01em !important; }
html body .ff-dexbox .ff-dexbox__title { font-family: "Literata", Georgia, serif !important; font-weight: 500 !important; font-style: italic; }
.ff-more { font: 600 14px/1 var(--ff-ui); text-decoration: none; white-space: nowrap; border-bottom: 2px solid var(--ff-gold); padding-bottom: 3px; }
.ff-more:hover { color: var(--ff-accent); }
.ffmuted { color: var(--ff-muted); }

/* ---------- Boutons ---------- */
.ff-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ff-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--ff-line); background: var(--ff-surface); color: var(--ff-ink);
  font: 600 15px/1 var(--ff-ui); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.ff-btn:hover { border-color: var(--ff-ink); }
.ff-btn:focus-visible, .ff a:focus-visible, .ff button:focus-visible, .ff select:focus-visible, .ff input:focus-visible, .ff textarea:focus-visible { outline: 3px solid var(--ff-gold); outline-offset: 2px; }
.ff-btn--main { background: var(--ff-gold); border-color: var(--ff-gold); color: #0A0A0A; }
.ff-btn--main:hover { background: #FFD83D; border-color: #0A0A0A; }
.ff-btn--ghost { background: transparent; }
.ff-btn--icon[aria-pressed="true"] { background: var(--ff-ink); color: var(--ff-paper); border-color: var(--ff-ink); }
.ff-btn--icon[data-ff-like][aria-pressed="true"] span { color: #FF5C7A; }
.ff-btn[disabled] { opacity: .5; cursor: default; }

/* ---------- Barre de la Bibliothèque ---------- */
.ffnav { background: var(--ff-night); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ffnav__in { display: flex; align-items: center; gap: 8px 22px; min-height: 56px; flex-wrap: wrap; }
.ffnav__brand { font: 900 16px/1 var(--ff-brand); color: #fff !important; text-decoration: none; letter-spacing: -.01em; }
.ffnav__brand span { color: var(--ff-gold); }
.ffnav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.ffnav__list::-webkit-scrollbar { display: none; }
.ffnav__list a { display: block; padding: 9px 13px; border-radius: 999px; color: rgba(255, 255, 255, .78) !important; text-decoration: none; font: 600 14px/1 var(--ff-ui); white-space: nowrap; }
.ffnav__list a:hover { color: #fff !important; background: rgba(255, 255, 255, .08); }
.ffnav__list a[aria-current="page"] { color: #fff !important; background: rgba(255, 255, 255, .12); }
.ffnav__list .ffnav__write { color: var(--ff-gold) !important; }
.ffnav__search { display: flex; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 0 4px 0 14px; flex: 0 1 280px; min-width: 0; }
.ffnav__search input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; color: #fff; font: 15px var(--ff-ui); }
.ffnav__search input::placeholder { color: rgba(255, 255, 255, .55); }
.ffnav__search button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
@media (max-width: 760px) { .ffnav__search { flex-basis: 100%; margin-bottom: 10px; } .ffnav__in { gap: 4px 12px; padding-top: 8px; } }

/* ============================================================
   Couvertures
   ============================================================ */
.ffc {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; max-width: 100%;
  border-radius: 3px 7px 7px 3px; overflow: hidden; box-shadow: var(--ff-shadow-book);
  container-type: inline-size; isolation: isolate; background: var(--ff-surface-2);
}
.ffc::after { /* reliure : pli et reflet sur le bord gauche */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(255, 255, 255, .18) 2.2%, rgba(0, 0, 0, .12) 4.5%, transparent 9%, transparent 94%, rgba(0, 0, 0, .08));
}
.ffc img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ffc--s { width: 64px; flex: none; }

/* Couverture de collection générée */
.ffc--gen { background: linear-gradient(165deg, var(--c1), var(--c2)); color: var(--ink); }
/* Le contenu vit dans .ffc__in : les unités cqw d'un élément se rapportent à son conteneur parent, pas à lui-même. */
.ffc__in { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding: 9cqw 9cqw 8cqw 12cqw; }
.ffc__sil {
  position: absolute; z-index: 0; right: -8%; bottom: 7%; width: 86%; height: 56%; opacity: .32;
  background: var(--acc); -webkit-mask: var(--sil) no-repeat right bottom / contain; mask: var(--sil) no-repeat right bottom / contain;
}
.ffc__kicker { position: relative; z-index: 1; font: 700 5.6cqw/1.2 var(--ff-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.ffc__title { position: relative; z-index: 1; margin-top: 5cqw; font: 800 12.5cqw/1.02 var(--ff-brand); letter-spacing: -.02em; overflow-wrap: break-word; hyphens: manual; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.ffc--long .ffc__title { font-size: 10cqw; }
.ffc--xlong .ffc__title { font-size: 8cqw; -webkit-line-clamp: 7; }
.ffc__author { position: relative; z-index: 1; margin-top: auto; font: 600 6cqw/1.2 var(--ff-ui); letter-spacing: .06em; text-transform: uppercase; }
.ffc__mark { position: absolute; z-index: 1; right: 7cqw; bottom: 7cqw; font: 900 4.2cqw/1 var(--ff-brand); opacity: .7; }
.ffc--s .ffc__mark, .ffc--s .ffc__kicker { display: none; }

/* soft : romance, drame, tranche de vie */
.ffc--soft .ffc__in { text-align: center; align-items: center; padding: 11cqw 10cqw 9cqw 12cqw; }
.ffc--soft::before { content: ""; position: absolute; inset: 5cqw 5cqw 5cqw 7cqw; border: .6cqw solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 2px; z-index: 1; pointer-events: none; }
.ffc--soft .ffc__title { font: 500 italic 13cqw/1.05 var(--ff-read); letter-spacing: 0; margin-top: 12cqw; }
.ffc--soft.ffc--long .ffc__title { font-size: 11cqw; }
.ffc--soft.ffc--xlong .ffc__title { font-size: 9cqw; }
.ffc--soft .ffc__sil { right: 50%; transform: translateX(50%); width: 70%; height: 44%; bottom: 14%; opacity: .22; -webkit-mask-position: center bottom; mask-position: center bottom; }
.ffc--soft .ffc__mark { right: 50%; transform: translateX(50%); }
.ffc--soft .ffc__author { margin-bottom: 7cqw; }

/* noir : mystère, sombre */
.ffc--noir .ffc__title { font: 700 11cqw/1.08 var(--ff-read); text-transform: uppercase; letter-spacing: .06em; padding-top: 5cqw; border-top: .8cqw solid var(--acc); }
.ffc--noir.ffc--long .ffc__title { font-size: 9cqw; }
.ffc--noir.ffc--xlong .ffc__title { font-size: 7.4cqw; }
.ffc--noir .ffc__sil { opacity: .18; filter: blur(.3px); bottom: 0; height: 64%; }
.ffc--noir::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(120% 70% at 70% 100%, transparent 30%, rgba(0, 0, 0, .55)); }

/* myth : fantastique, science-fiction */
.ffc--myth { background: radial-gradient(90% 60% at 50% 72%, color-mix(in srgb, var(--acc) 38%, transparent), transparent 70%), linear-gradient(170deg, var(--c1), var(--c2)); }
.ffc--myth .ffc__in { text-align: center; align-items: center; }
.ffc--myth::before { content: ""; position: absolute; inset: 4cqw 4cqw 4cqw 6cqw; border: .5cqw solid color-mix(in srgb, var(--acc) 70%, transparent); box-shadow: inset 0 0 0 1.6cqw transparent, inset 0 0 0 2.1cqw color-mix(in srgb, var(--acc) 35%, transparent); z-index: 1; pointer-events: none; }
.ffc--myth .ffc__title { font: 700 10.5cqw/1.1 var(--ff-read); text-transform: uppercase; letter-spacing: .08em; margin-top: 9cqw; }
.ffc--myth.ffc--long .ffc__title { font-size: 8.6cqw; }
.ffc--myth.ffc--xlong .ffc__title { font-size: 7cqw; }
.ffc--myth .ffc__sil { right: 50%; transform: translateX(50%); bottom: 12%; width: 74%; height: 46%; opacity: .5; -webkit-mask-position: center bottom; mask-position: center bottom; }
.ffc--myth .ffc__author { margin-bottom: 6cqw; }
.ffc--myth .ffc__mark { right: 50%; transform: translateX(50%); bottom: 8cqw; }

/* pop : humour */
.ffc--pop .ffc__title { font-size: 13cqw; transform: rotate(-4deg); transform-origin: left; background: var(--acc); color: #fff; padding: 2cqw 3cqw; margin-top: 12cqw; align-self: flex-start; }
.ffc--pop .ffc__sil { opacity: .45; }

/* saga : aventure, action (par défaut) */
.ffc--saga::before { content: ""; position: absolute; left: 0; right: 0; bottom: 21%; height: 1.2cqw; background: var(--acc); z-index: 0; opacity: .9; }
.ffc--saga .ffc__title { text-transform: uppercase; }

/* ============================================================
   Cartes, rayons
   ============================================================ */
.ffcard { position: relative; min-width: 0; }
.ffcard__link { display: block; text-decoration: none; }
.ffcard__link .ffc { transition: transform .2s ease, box-shadow .2s ease; }
.ffcard__link:hover .ffc { transform: translateY(-4px) rotate(-.6deg); }
.ffcard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 12px; font: 600 15.5px/1.3 var(--ff-read); color: var(--ff-ink); }
.ffcard__link:hover .ffcard__title { text-decoration: underline; }
.ffcard__by { margin: 4px 0 0; font: 500 13.5px/1.3 var(--ff-ui); color: var(--ff-muted); }
.ffcard__by a { text-decoration: none; }
.ffcard__by a:hover { text-decoration: underline; color: var(--ff-ink); }
.ffcard__tome { font-weight: 700; color: var(--ff-accent); }
.ffcard__meta { margin: 3px 0 0; font: 13px/1.3 var(--ff-ui); color: var(--ff-muted); font-variant-numeric: tabular-nums; }
.ffcard__blurb { margin: 8px 0 0; font: 14px/1.5 var(--ff-ui); color: var(--ff-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ffcard__rank { position: absolute; left: -6px; top: -8px; z-index: 6; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--ff-gold); color: #0A0A0A; font: 900 13px/1 var(--ff-brand); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.ffcard__age { position: absolute; right: 6px; top: 6px; z-index: 6; padding: 3px 7px; border-radius: 6px; background: rgba(10, 10, 10, .78); color: #fff; font: 700 11px/1 var(--ff-ui); }

.ffshelf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ffshelf__sub { margin: 6px 0 0; font-size: 15px; color: var(--ff-muted); }
.ffshelf__tools { display: flex; align-items: center; gap: 8px; }
.ffshelf__nav { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ff-line); background: var(--ff-surface); color: var(--ff-ink); font-size: 20px; line-height: 1; cursor: pointer; }
.ffshelf__nav:hover { border-color: var(--ff-ink); }
@media (max-width: 700px) { .ffshelf__nav { display: none; } }
.ffshelf__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 4px 16px; margin: -10px -4px 0; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.ffshelf__track > * { scroll-snap-align: start; }
@media (max-width: 600px) { .ffshelf__track { grid-auto-columns: 128px; gap: 16px; } }

.ffgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 34px 24px; }
@media (max-width: 520px) { .ffgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; } }

.ffchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ffchip { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 999px; background: var(--ff-surface-2); border: 1px solid var(--ff-line); font: 600 13px/1 var(--ff-ui); color: var(--ff-ink); text-decoration: none; }
a.ffchip:hover { border-color: var(--ff-ink); }
.ffchip--region::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ff-accent); }

/* ============================================================
   Accueil
   ============================================================ */
.ffhero {
  position: relative; color: #fff; overflow: hidden; padding: 56px 0 64px;
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(255, 204, 0, .14), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(180, 70, 27, .22), transparent 70%),
    linear-gradient(160deg, var(--ff-night-2), var(--ff-night) 70%);
}
.ffhero::before { /* rayonnages : lignes horizontales discrètes */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(180deg, transparent 0 118px, rgba(255, 255, 255, .05) 118px 120px);
}
.ffhero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.ffhero__title { margin: 0; font: 900 clamp(32px, 4.6vw, 56px)/1.04 var(--ff-brand); letter-spacing: -.025em; color: #fff; }
.ffhero__title em { font: 500 italic 1.08em/1 var(--ff-read); letter-spacing: -.01em; color: var(--ff-gold); }
.ffhero__lead { margin: 18px 0 0; max-width: 58ch; font: 18px/1.6 var(--ff-read); color: rgba(255, 255, 255, .84); }
.ffhero__search { display: flex; gap: 8px; margin-top: 26px; max-width: 560px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.ffhero__search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: 16px var(--ff-ui); color: #0A0A0A; }
.ffhero__search input:focus { outline: none; }
.ffhero__search button { height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ff-gold); color: #0A0A0A; font: 700 15px var(--ff-ui); cursor: pointer; }
.ffhero__facts { display: flex; flex-wrap: wrap; gap: 26px; margin: 28px 0 0; padding: 0; list-style: none; }
.ffhero__facts li { display: grid; gap: 2px; }
.ffhero__facts b { font: 900 24px/1 var(--ff-brand); color: #fff; font-variant-numeric: tabular-nums; }
.ffhero__facts span { font-size: 13px; color: rgba(255, 255, 255, .62); letter-spacing: .04em; }
.ffhero__stack { position: relative; height: 400px; perspective: 1400px; }
.ffhero__book { position: absolute; top: 50%; left: 50%; width: 190px; transition: transform .35s ease; }
.ffhero__book .ffc { box-shadow: 0 30px 50px -18px rgba(0, 0, 0, .7), 0 8px 16px rgba(0, 0, 0, .35); }
.ffhero__book--0 { transform: translate(-50%, -50%) rotate(-1deg); z-index: 5; width: 210px; }
.ffhero__book--1 { transform: translate(-112%, -46%) rotate(-9deg); z-index: 4; }
.ffhero__book--2 { transform: translate(14%, -46%) rotate(8deg); z-index: 4; }
.ffhero__book--3 { transform: translate(-165%, -40%) rotate(-15deg) scale(.9); z-index: 3; }
.ffhero__book--4 { transform: translate(68%, -40%) rotate(14deg) scale(.9); z-index: 3; }
.ffhero__stack:hover .ffhero__book--0 { transform: translate(-50%, -54%) rotate(0); }
@media (max-width: 960px) {
  .ffhero__in { grid-template-columns: 1fr; }
  .ffhero__stack { height: 300px; order: -1; }
  .ffhero__book { width: 140px; } .ffhero__book--0 { width: 156px; }
}
@media (max-width: 520px) { .ffhero { padding: 28px 0 40px; } .ffhero__stack { height: 240px; } .ffhero__book { width: 112px; } .ffhero__book--0 { width: 128px; } .ffhero__book--3, .ffhero__book--4 { display: none; } }

.ffresume__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.ffresume__item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: var(--ff-r); background: var(--ff-surface); border: 1px solid var(--ff-line); text-decoration: none; }
.ffresume__item:hover { border-color: var(--ff-ink); }
.ffresume__item b { display: block; font: 600 16px/1.25 var(--ff-read); }
.ffresume__item small { display: block; margin-top: 4px; font-size: 13px; color: var(--ff-muted); }
.ffbar { display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--ff-line); overflow: hidden; }
.ffbar span { display: block; height: 100%; background: var(--ff-accent); }

.fffeat { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 44px; align-items: center; padding: 36px; border-radius: 22px; background: var(--ff-surface-2); border: 1px solid var(--ff-line); }
.fffeat__cover { display: block; transform: rotate(-2deg); }
.fffeat__title { margin: 0; font: 600 italic clamp(28px, 3.6vw, 42px)/1.08 var(--ff-read); letter-spacing: -.015em; }
.fffeat__title a { text-decoration: none; }
.fffeat__by { margin: 10px 0 0; font-size: 15px; color: var(--ff-muted); }
.fffeat__blurb { margin: 18px 0; max-width: 64ch; font: 17.5px/1.65 var(--ff-read); color: var(--ff-body); }
.fffeat__facts { margin: 14px 0 0; font-size: 14px; color: var(--ff-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .fffeat { grid-template-columns: 1fr; padding: 24px; gap: 24px; } .fffeat__cover { width: 180px; margin: 0 auto; } }

.ffsagas__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ffsaga { display: grid; gap: 6px; padding: 22px 22px 20px; border-radius: 18px; background: var(--ff-surface); border: 1px solid var(--ff-line); text-decoration: none; transition: border-color .15s; }
.ffsaga:hover { border-color: var(--ff-ink); }
.ffsaga__fan { position: relative; height: 172px; margin-bottom: 12px; }
.ffsaga__book { position: absolute; top: 0; width: 104px; transition: transform .25s ease; }
.ffsaga__book .ffc { width: 100%; }
.ffsaga__book--0 { left: 0; z-index: 3; transform: rotate(-4deg); }
.ffsaga__book--1 { left: 76px; z-index: 2; transform: rotate(2deg) translateY(6px); }
.ffsaga__book--2 { left: 150px; z-index: 1; transform: rotate(7deg) translateY(12px); }
.ffsaga:hover .ffsaga__book--1 { transform: rotate(0) translateY(-4px); }
.ffsaga__name { font: 600 italic 21px/1.2 var(--ff-read); }
.ffsaga__meta { font-size: 14px; color: var(--ff-muted); }
.ffsaga__fan--big { height: 300px; width: 380px; max-width: 100%; }
.ffsaga__fan--big .ffsaga__book { width: 170px; }
.ffsaga__fan--big .ffsaga__book--1 { left: 110px; }
.ffsaga__fan--big .ffsaga__book--2 { left: 210px; }

.ffgenres__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.ffgenre { position: relative; display: grid; gap: 4px; min-height: 104px; padding: 18px; border-radius: 16px; text-decoration: none; overflow: hidden; color: #fff !important; background: linear-gradient(150deg, var(--g1, #0E4C92), var(--g2, #062B55)); }
.ffgenre::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 96px; height: 96px; border-radius: 50%; border: 14px solid rgba(255, 255, 255, .12); }
.ffgenre__name { font: 600 italic 21px/1.15 var(--ff-read); }
.ffgenre__n { font: 600 13px var(--ff-ui); opacity: .78; margin-top: auto; }
.ffgenre:hover { filter: brightness(1.08); }
.ffgenre--aventure { --g1: #0E6BA8; --g2: #0A2342; }
.ffgenre--romance { --g1: #D9576E; --g2: #6D1A36; }
.ffgenre--drame { --g1: #6B7A8F; --g2: #262F3B; }
.ffgenre--mystere { --g1: #3A3F58; --g2: #10121C; }
.ffgenre--action { --g1: #D1495B; --g2: #4A1019; }
.ffgenre--humour { --g1: #F2A541; --g2: #B5541B; }
.ffgenre--fantastique { --g1: #6A3FC1; --g2: #1E0B4F; }
.ffgenre--science-fiction { --g1: #0F7C8C; --g2: #062A33; }
.ffgenre--tranche-de-vie { --g1: #4E9F5D; --g2: #1E4A2A; }
.ffgenre--sombre { --g1: #3B1F2B; --g2: #0B0507; }

.ffregions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 30px; align-items: center; padding: 32px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #0B3B5C, var(--ff-night)); }
.ffregions .ff-h2 { color: #fff; }
.ffregions p { margin: 10px 0 0; color: rgba(255, 255, 255, .78); }
.ffregions__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ffregions__list a { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #fff !important; text-decoration: none; font: 600 15px var(--ff-ui); }
.ffregions__list a:hover { background: rgba(255, 255, 255, .14); border-color: var(--ff-gold); }
.ffregions__list b { font: 700 12px var(--ff-ui); color: var(--ff-gold); }
@media (max-width: 760px) { .ffregions { grid-template-columns: 1fr; padding: 24px; } }

.ffpoke__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ffpoke__list a { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; background: var(--ff-surface); border: 1px solid var(--ff-line); text-decoration: none; text-align: center; }
.ffpoke__list a:hover { border-color: var(--ff-ink); }
.ffpoke__list img { width: 56px; height: 56px; object-fit: contain; image-rendering: auto; }
.ffpoke__list span { font: 600 14px var(--ff-ui); }
.ffpoke__list small { font-size: 12px; color: var(--ff-muted); }

.ffrecent__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 4px 28px; margin: 0; padding: 0; list-style: none; }
.ffrecent__item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ff-line); text-decoration: none; }
.ffrecent__item .ffc { width: 52px; }
.ffrecent__text b { display: block; font: 600 15.5px/1.25 var(--ff-read); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ffrecent__text small { font-size: 13px; color: var(--ff-muted); }
.ffrecent__item time { font-size: 13px; color: var(--ff-muted); white-space: nowrap; }
@media (max-width: 420px) { .ffrecent__list { grid-template-columns: 1fr; } }

.ffauthors__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.ffauthor { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; padding: 16px; border-radius: 16px; background: var(--ff-surface); border: 1px solid var(--ff-line); text-decoration: none; }
.ffauthor:hover { border-color: var(--ff-ink); }
.ffauthor__ini { grid-row: 1 / span 3; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ff-night); color: var(--ff-gold); font: 900 20px/1 var(--ff-brand); }
.ffauthor__ini--xl { width: 84px; height: 84px; font-size: 34px; flex: none; }
.ffauthor__name { font: 700 16px/1.25 var(--ff-ui); }
.ffauthor__meta { font-size: 13px; color: var(--ff-muted); }
.ffauthor__top { margin-top: 6px; font: italic 14px/1.3 var(--ff-read); color: var(--ff-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ffwrite { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px 40px; align-items: center; padding: 40px; border-radius: 22px; background: linear-gradient(135deg, var(--ff-night-2), var(--ff-night)); color: #fff; }
.ffwrite__title { margin: 0; font: 600 italic clamp(24px, 3vw, 34px)/1.15 var(--ff-read); }
.ffwrite p { margin: 12px 0 0; max-width: 60ch; color: rgba(255, 255, 255, .8); line-height: 1.6; }
.ffwrite .ff-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
@media (max-width: 760px) { .ffwrite { grid-template-columns: 1fr; padding: 26px; } }

/* ============================================================
   En-têtes de pages, explorer
   ============================================================ */
.ffhead { padding: 34px 0 30px; background: var(--ff-surface-2); border-bottom: 1px solid var(--ff-line); }
.ffhead .breadcrumb { margin: 0 0 14px; padding: 0; background: none; font-size: 13px; color: var(--ff-muted); }
.ffhead__row { display: flex; align-items: center; gap: 20px; }
.ffhead__poke { width: 72px; height: 72px; object-fit: contain; }
.ffhead__title { margin: 0; font: 900 clamp(28px, 3.6vw, 42px)/1.08 var(--ff-brand); letter-spacing: -.02em; }
.ffhead__lead { margin: 10px 0 0; max-width: 66ch; font: 17px/1.6 var(--ff-read); color: var(--ff-body); }
.ffhead__saga { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; }
@media (max-width: 760px) { .ffhead__saga { grid-template-columns: 1fr; } .ffsaga__fan--big { height: 220px; } .ffsaga__fan--big .ffsaga__book { width: 120px; } .ffsaga__fan--big .ffsaga__book--1 { left: 80px; } .ffsaga__fan--big .ffsaga__book--2 { left: 160px; } }

.ffexplore { padding-top: 28px; }
.ffexplore__filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 18px; border-radius: 18px; background: var(--ff-surface); border: 1px solid var(--ff-line); }
.fffilter { display: grid; gap: 6px; min-width: 0; }
.fffilter span { font: 700 11.5px/1 var(--ff-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ff-muted); }
.fffilter select, .fffilter input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--ff-line); background: var(--ff-paper); color: var(--ff-ink); font: 15px var(--ff-ui); }
.fffilter--q { grid-column: span 2; }
@media (max-width: 420px) { .fffilter--q { grid-column: auto; } .ffexplore__filters { grid-template-columns: 1fr 1fr; } .fffilter--q { grid-column: 1 / -1; } }
.ffexplore__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 20px; }
.ffexplore__count { margin: 0; font-size: 15px; color: var(--ff-muted); }
.ffexplore__count b { color: var(--ff-ink); font-variant-numeric: tabular-nums; }
.ffpager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 44px; }
.ffpager a, .ffpager span { min-width: 42px; height: 42px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--ff-line); text-decoration: none; font: 600 15px var(--ff-ui); }
.ffpager a:hover { border-color: var(--ff-ink); }
.ffpager .ffpager__cur { background: var(--ff-ink); color: var(--ff-paper); border-color: var(--ff-ink); }
.ffpager .ffpager__gap { border: 0; }
.ffempty, .ffguest { padding: 32px; border-radius: 18px; border: 1.5px dashed var(--ff-line); text-align: center; display: grid; justify-items: center; gap: 14px; }
.ffempty p, .ffguest p { margin: 0; max-width: 56ch; line-height: 1.6; }

/* ============================================================
   Fiche d'une œuvre
   ============================================================ */
.ffdraft { background: #FFF4CC; color: #4A3700; font-size: 14px; padding: 10px 0; border-bottom: 1px solid #E8D27A; }
.ffwork { position: relative; color: #fff; padding: 40px 0 46px; background: var(--ff-night); overflow: hidden; isolation: isolate; }
.ffwork::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--ffw-bg, none) center / cover; filter: blur(40px) saturate(1.3); opacity: .5; transform: scale(1.2); }
.ffwork::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 22, 38, .55), rgba(12, 22, 38, .92)); }
.ffwork__in { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 44px; align-items: start; }
.ffwork__cover .ffc { box-shadow: 0 40px 60px -24px rgba(0, 0, 0, .8), 0 10px 20px rgba(0, 0, 0, .4); }
.ffwork .breadcrumb { margin: 0 0 18px; padding: 0; background: none; font-size: 13px; color: rgba(255, 255, 255, .62); }
.ffwork .breadcrumb a { color: rgba(255, 255, 255, .85); }
.ffwork__title { margin: 0; font: 600 italic clamp(30px, 4.4vw, 52px)/1.05 var(--ff-read); letter-spacing: -.02em; color: #fff; }
.ffwork__by { margin: 12px 0 0; font-size: 16px; color: rgba(255, 255, 255, .78); }
.ffwork__by a { color: #fff; font-weight: 600; }
.ffchips--hero { margin-top: 18px; }
.ffchips--hero .ffchip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.ffchips--hero a.ffchip:hover { border-color: var(--ff-gold); }
.ffchip--y { border-color: rgba(79, 211, 154, .6) !important; }
.ffchip--age { background: rgba(255, 92, 92, .2) !important; border-color: rgba(255, 92, 92, .5) !important; }
.ffwork__facts { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 24px 0 0; }
.ffwork__facts div { display: grid; gap: 4px; }
.ffwork__facts dt { font: 700 11px/1 var(--ff-ui); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.ffwork__facts dd { margin: 0; font: 900 22px/1 var(--ff-brand); color: #fff; font-variant-numeric: tabular-nums; }
.ffwork__facts small { font-size: 13px; opacity: .6; }
.ffwork .ff-btn:not(.ff-btn--main) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.ffwork .ff-btn:not(.ff-btn--main):hover { border-color: #fff; }
.ffwork .ff-btn--icon[aria-pressed="true"] { background: #fff; color: #0A0A0A; }
.ffwork__resume { margin: 14px 0 0; font-size: 14px; color: rgba(255, 255, 255, .78); }
@media (max-width: 860px) { .ffwork__in { grid-template-columns: 1fr; gap: 26px; } .ffwork__cover { width: 200px; } }

.ffwork__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-top: 40px; }
@media (max-width: 960px) { .ffwork__body { grid-template-columns: 1fr; } }
.ffwork__main { display: grid; gap: 44px; align-content: start; min-width: 0; }
.ffsec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ffsec__meta { margin: 0; font-size: 14px; color: var(--ff-muted); }
.ffsum { margin-top: 14px; max-width: 68ch; font: 18px/1.7 var(--ff-read); color: var(--ff-body); }
.ffsum p { margin: 0 0 .8em; }
.ffsum--pitch { padding: 16px 20px; border-radius: 14px; background: var(--ff-surface-2); }
.ffsum--note { padding-left: 18px; border-left: 3px solid var(--ff-gold); font-size: 16.5px; }
.ffsum__label { font: 700 12px/1 var(--ff-ui) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--ff-muted); }
.ffsum__note { margin: 0 !important; font: 13px/1.4 var(--ff-ui); color: var(--ff-muted); }
.ffwarn { margin: 0; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, #FF5C5C 12%, var(--ff-surface)); border: 1px solid color-mix(in srgb, #FF5C5C 40%, transparent); font-size: 15px; }
.ffwork__poke { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.ffwork__poke a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--ff-surface); border: 1px solid var(--ff-line); text-decoration: none; font: 600 14px var(--ff-ui); }
.ffwork__poke a:hover { border-color: var(--ff-ink); }
.ffwork__poke img { width: 40px; height: 40px; object-fit: contain; }

.fftoc { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ff-line); }
.fftoc a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 13px 4px; border-bottom: 1px solid var(--ff-line); text-decoration: none; }
.fftoc a:hover .fftoc__t { text-decoration: underline; }
.fftoc__n { font: 700 14px var(--ff-ui); color: var(--ff-muted); font-variant-numeric: tabular-nums; }
.fftoc__t { font: 17px/1.35 var(--ff-read); }
.fftoc__d { font-size: 13px; color: var(--ff-muted); white-space: nowrap; }
.fftoc__item.is-read .fftoc__n::after { content: " ✓"; color: #1F9D55; }
.fftoc__item.is-read .fftoc__t { color: var(--ff-muted); }
.fftoc__item.is-current a { background: color-mix(in srgb, var(--ff-gold) 18%, transparent); }
.fftoc--long:not(.is-open) [data-ff-fold] { display: none; }
.fftoc--long:not(.is-open) [data-ff-fold] + :not([data-ff-fold])::before { content: "⋯"; display: block; padding: 8px 4px; color: var(--ff-muted); border-bottom: 1px solid var(--ff-line); }
.fftoc__more { margin-top: 14px; }
.fftoc--long.is-open + .fftoc__more { display: none; }

.ffrevs { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ffrev { padding: 16px 18px; border-radius: 14px; background: var(--ff-surface); border: 1px solid var(--ff-line); }
.ffrev p { margin: 0; font: 16px/1.6 var(--ff-read); }
.ffrev .ffrev__by { font: 13px var(--ff-ui); color: var(--ff-muted); margin-bottom: 6px; }
.ffrevform { display: grid; gap: 8px; margin-top: 18px; }
.ffrevform label { font: 700 14px var(--ff-ui); }
.ffrevform textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--ff-line); background: var(--ff-surface); color: var(--ff-ink); font: 16px/1.5 var(--ff-ui); resize: vertical; }
.ffrevform__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ffrevform__foot small { color: var(--ff-muted); }

.ffwork__side { display: grid; gap: 18px; align-content: start; }
.ffside { padding: 20px; border-radius: 18px; background: var(--ff-surface); border: 1px solid var(--ff-line); }
.ffside__title { margin: 0 0 12px; font: 600 italic 22px/1.2 var(--ff-read); }
.ffside__title a { text-decoration: none; }
.ffside__tomes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ffside__tomes a { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border-radius: 10px; text-decoration: none; }
.ffside__tomes a:hover { background: var(--ff-surface-2); }
.ffside__tomes .ffc { width: 46px; }
.ffside__tomes span { font: 600 14.5px/1.3 var(--ff-read); }
.ffside__tomes small { display: block; font: 700 11px var(--ff-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ff-muted); }
.ffside__tomes .is-current a { background: color-mix(in srgb, var(--ff-gold) 20%, transparent); }
.ffside__author { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ffside__author b { display: block; font-size: 16px; }
.ffside__author small { color: var(--ff-muted); font-size: 13px; }
.ffside__list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font: 15px/1.35 var(--ff-read); }
.ffside__list small { color: var(--ff-muted); font: 12.5px var(--ff-ui); }

.fftomes { margin: 0; padding: 0; list-style: none; display: grid; gap: 28px; }
.fftome { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--ff-line); }
.fftome__title { margin: 0; font: 600 italic 26px/1.15 var(--ff-read); }
.fftome__title a { text-decoration: none; }
.fftome__meta { margin: 8px 0 0; font-size: 14px; color: var(--ff-muted); }
.fftome__blurb { margin: 12px 0 0; max-width: 66ch; font: 17px/1.65 var(--ff-read); color: var(--ff-body); }
@media (max-width: 560px) { .fftome { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; } .fftome__title { font-size: 20px; } .fftome__blurb { display: none; } }

.ffprose { max-width: 70ch; font: 18px/1.7 var(--ff-read); color: var(--ff-body); }
.ffprose h2 { margin: 1.6em 0 .4em; font: 600 italic 26px/1.2 var(--ff-read); color: var(--ff-ink); }
.ffprose li { margin: .35em 0; }
.ffprose code { font-size: .85em; padding: 1px 5px; border-radius: 4px; background: var(--ff-surface-2); }

.fflib { display: grid; gap: 16px; }
.fflib__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* Encart des fiches Pokédex */
.ff-dexbox { margin: 32px 0; padding: 24px; border-radius: 20px; background: linear-gradient(150deg, #13233B, #0C1626); color: #fff; }
.ff-dexbox__eyebrow { margin: 0 0 6px; font: 700 12px/1 var(--pfb-font-texte); letter-spacing: .14em; text-transform: uppercase; color: var(--pfb-jaune, #FFCC00); }
.ff-dexbox__title { margin: 0 0 16px; font: 600 italic 24px/1.2 "Literata", Georgia, serif; color: #fff; }
.ff-dexbox__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ff-dexbox__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff !important; text-decoration: none; }
.ff-dexbox__item:hover { background: rgba(255, 255, 255, .12); }
.ff-dexbox__item .ffc { width: 56px; }
.ff-dexbox__item b { display: block; font: 600 15px/1.25 "Literata", Georgia, serif; }
.ff-dexbox__item small { font-size: 12.5px; opacity: .7; }
.ff-dexbox__more { display: inline-block; margin-top: 14px; color: var(--pfb-jaune, #FFCC00) !important; font-weight: 600; }

/* ============================================================
   Liseuse
   ============================================================ */
body.pf-ff--chapter .nav { position: relative; }
.ff--chapter { padding-bottom: 0; }
.ffreader {
  --rd-bg: #FBF9F4; --rd-ink: #1F1B16; --rd-muted: #6F675C; --rd-line: #E6E0D4; --rd-panel: #FFFFFF; --rd-accent: #9A3B12;
  --rd-size: 19.5px; --rd-width: 66ch; --rd-font: var(--ff-read);
  background: var(--rd-bg); color: var(--rd-ink); min-height: 70vh;
}
.ffreader[data-theme="sepia"] { --rd-bg: #F3E9D7; --rd-ink: #3B2F22; --rd-muted: #7A6A55; --rd-line: #DCCDB2; --rd-panel: #FAF3E6; --rd-accent: #8A4A1C; }
.ffreader[data-theme="night"] { --rd-bg: #12151B; --rd-ink: #D9D4CB; --rd-muted: #8C877E; --rd-line: #272C35; --rd-panel: #1A1E26; --rd-accent: #E9B66B; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ffreader:not([data-theme="paper"]):not([data-theme="sepia"]) { --rd-bg: #12151B; --rd-ink: #D9D4CB; --rd-muted: #8C877E; --rd-line: #272C35; --rd-panel: #1A1E26; --rd-accent: #E9B66B; }
}
:root[data-theme="dark"] .ffreader:not([data-theme="paper"]):not([data-theme="sepia"]) { --rd-bg: #12151B; --rd-ink: #D9D4CB; --rd-muted: #8C877E; --rd-line: #272C35; --rd-panel: #1A1E26; --rd-accent: #E9B66B; }
.ffreader[data-size="s"] { --rd-size: 17px; }
.ffreader[data-size="l"] { --rd-size: 22px; }
.ffreader[data-size="xl"] { --rd-size: 25px; }
.ffreader[data-width="narrow"] { --rd-width: 56ch; }
.ffreader[data-width="wide"] { --rd-width: 78ch; }
.ffreader[data-font="sans"] { --rd-font: var(--ff-ui); }

.ffreader__bar { position: sticky; top: 0; z-index: 150; background: color-mix(in srgb, var(--rd-bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rd-line); transition: transform .25s ease; }
.ffreader__bar.is-hidden { transform: translateY(-100%); }
.ffreader__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.ffreader__progress span { display: block; height: 100%; width: 0; background: var(--rd-accent); transition: width .1s linear; }
.ffreader__barin { display: flex; align-items: center; gap: 14px; height: 54px; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.ffreader__back { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--rd-ink) !important; text-decoration: none; font: 600 15px var(--ff-ui); }
.ffreader__wt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: italic 16px var(--ff-read); }
.ffreader__pos { font: 13px var(--ff-ui); color: var(--rd-muted); white-space: nowrap; }
.ffreader__tools { display: flex; gap: 6px; }
.ffreader__tool { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--rd-line); background: var(--rd-panel); color: var(--rd-ink); font: 600 14px var(--ff-ui); cursor: pointer; }
.ffreader__tool[aria-expanded="true"] { border-color: var(--rd-ink); }
@media (max-width: 600px) { .ffreader__pos { display: none; } }

.ffpanel { position: absolute; z-index: 160; top: calc(100% + 8px); right: max(12px, calc(50% - 540px)); width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 140px); overflow: auto; padding: 18px; border-radius: 16px; background: var(--rd-panel); color: var(--rd-ink); border: 1px solid var(--rd-line); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.ffpanel__title { margin: 0 0 12px; font: 600 italic 18px/1.25 var(--ff-read); }
.ffset { margin: 0 0 14px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ffset legend { width: 100%; margin-bottom: 6px; font: 700 11px var(--ff-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--rd-muted); }
.ffset label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--rd-line); cursor: pointer; font: 14px var(--ff-ui); }
.ffset input { position: absolute; opacity: 0; pointer-events: none; }
.ffset label:has(input:checked) { border-color: var(--rd-accent); box-shadow: inset 0 0 0 1px var(--rd-accent); }
.ffset label:has(input:focus-visible) { outline: 3px solid var(--ff-gold); }
.ffset__serif { font-family: var(--ff-read); }
.ffset__sw { display: inline-block; padding: 2px 8px; border-radius: 6px; }
.ffset__sw--paper { background: #FBF9F4; color: #1F1B16; }
.ffset__sw--sepia { background: #F3E9D7; color: #3B2F22; }
.ffset__sw--night { background: #12151B; color: #D9D4CB; }
.ffpanel__toc { margin: 0; padding: 0; list-style: none; font: 15px/1.35 var(--ff-read); }
.ffpanel__toc a { display: block; padding: 8px 6px; border-radius: 8px; text-decoration: none; }
.ffpanel__toc a:hover { background: color-mix(in srgb, var(--rd-ink) 6%, transparent); }
.ffpanel__toc a[aria-current="page"] { background: color-mix(in srgb, var(--rd-accent) 16%, transparent); font-weight: 600; }
.ffpanel__toc span { display: inline-block; min-width: 26px; font: 600 12px var(--ff-ui); color: var(--rd-muted); }
.ffpanel__toc .is-read span::after { content: "✓"; color: #1F9D55; margin-left: 2px; }

.ffpage { max-width: calc(var(--rd-width) + 40px); margin: 0 auto; padding: 56px 20px 40px; }
.ffpage__head { text-align: center; margin-bottom: 44px; }
.ffpage__work { margin: 0; font: 13.5px var(--ff-ui); color: var(--rd-muted); }
.ffpage__work a { color: inherit; }
.ffpage__num { margin: 26px 0 8px; font: 700 12px var(--ff-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--rd-accent); }
.ffpage__title { margin: 0; font: 500 italic clamp(28px, 4.4vw, 42px)/1.12 var(--ff-read); letter-spacing: -.01em; color: var(--rd-ink); }
.ffpage__meta { margin: 14px 0 0; font: 13.5px var(--ff-ui); color: var(--rd-muted); }
.ffpage__text { font-family: var(--rd-font); font-size: var(--rd-size); line-height: 1.72; color: var(--rd-ink); font-variant-ligatures: common-ligatures; font-kerning: normal; hanging-punctuation: first; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
.ffreader[data-font="sans"] .ffpage__text { line-height: 1.68; }
.ffpage__text p { margin: 0 0 1.05em; }
.ffreader[data-align="justify"] .ffpage__text p { text-align: justify; }
@media (min-width: 900px) { .ffreader[data-align="justify"] .ffpage__text p { hyphens: auto; -webkit-hyphens: auto; } }
.ffpage__text .ff-c { text-align: center !important; }
.ffpage__text .ff-r { text-align: right !important; }
.ffpage__text em { font-style: italic; }
.ffpage__text strong { font-weight: 700; }
.ffpage__text h2, .ffpage__text h3, .ffpage__text h4 { margin: 1.8em 0 .7em; font: 600 1.05em/1.3 var(--ff-ui); letter-spacing: .02em; text-align: center; }
.ffpage__text hr.ff-scene, .ffpage__text hr { border: 0; height: auto; margin: 1.8em 0; text-align: center; }
.ffpage__text hr::before { content: "⁂"; font-size: 1.2em; color: var(--rd-muted); letter-spacing: .4em; }
.ffpage__text blockquote { margin: 1.2em 0; padding-left: 1.2em; border-left: 3px solid var(--rd-line); font-style: italic; }
.ffpage__text a { color: var(--rd-accent); }
.ffpage__text.has-dropcap > p:first-child::first-letter { float: left; margin: .08em .1em 0 0; font: 500 3.4em/.82 var(--ff-read); color: var(--rd-accent); }
.ffpage__text table { border-collapse: collapse; margin: 1em 0; font-size: .9em; }
.ffpage__text td, .ffpage__text th { border: 1px solid var(--rd-line); padding: 4px 8px; }

.ffpage__end { margin-top: 56px; display: grid; gap: 24px; }
.ffpage__fin { margin: 0; text-align: center; font-size: 26px; color: var(--rd-muted); }
.ffnext { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 22px 24px; border-radius: 18px; background: var(--rd-panel); border: 1.5px solid var(--rd-line); color: var(--rd-ink) !important; text-decoration: none; transition: border-color .15s, transform .15s; }
.ffnext:hover { border-color: var(--rd-accent); transform: translateY(-2px); }
.ffnext__k { grid-column: 1; font: 700 12px var(--ff-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--rd-accent); }
.ffnext__t { grid-column: 1; font: 500 italic 22px/1.25 var(--ff-read); }
.ffnext__go { grid-column: 2; grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ff-gold); color: #0A0A0A; font-size: 22px; }
.ffnext--tome { grid-template-columns: 64px minmax(0, 1fr) auto; }
.ffnext--tome > span:nth-child(2) { display: grid; gap: 4px; }
.ffnext--tome .ffnext__go { grid-column: 3; grid-row: 1; }
.ffthe-end { padding: 26px; border-radius: 18px; background: var(--rd-panel); border: 1px solid var(--rd-line); text-align: center; display: grid; justify-items: center; gap: 10px; font: 16px/1.6 var(--ff-read); }
.ffthe-end p { margin: 0; }
.ffthe-end__k { font: 600 italic 30px/1 var(--ff-read) !important; color: var(--rd-accent); }
.ffpage__nav { display: flex; justify-content: space-between; gap: 12px; font: 600 14.5px var(--ff-ui); }
.ffpage__nav a { color: var(--rd-muted) !important; }
.ffpage__nav a:hover { color: var(--rd-ink) !important; }
.ffreader__more { padding: 20px 20px 80px; }
.ffreader__more .ff-h2, .ffreader__more .ffcard__title { color: var(--rd-ink); }

.ffreader__dock {
  position: fixed; z-index: 140; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: var(--rd-panel); border: 1px solid var(--rd-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: transform .25s ease, opacity .25s ease;
}
.ffreader__dock.is-hidden { transform: translate(-50%, 140%); opacity: 0; }
.ffreader__dk { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; line-height: 1; text-decoration: none; color: var(--rd-ink) !important; }
.ffreader__dk:hover { background: color-mix(in srgb, var(--rd-ink) 8%, transparent); }
.ffreader__dk--next { background: var(--ff-gold); color: #0A0A0A !important; }
.ffreader__dk.is-off { opacity: .3; }
.ffreader__dkpos { display: grid; justify-items: center; min-width: 120px; padding: 0 8px; font: 12px/1.25 var(--ff-ui); color: var(--rd-muted); }
.ffreader__dkpos b { font: 700 14px var(--ff-ui); color: var(--rd-ink); font-variant-numeric: tabular-nums; }

.ffgate { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 20, .78); backdrop-filter: blur(8px); }
.ffgate__box { max-width: 480px; padding: 28px; border-radius: 20px; background: var(--ff-surface); color: var(--ff-ink); }
.ffgate__box h2 { margin: 0 0 10px; font: 600 italic 24px/1.2 var(--ff-read); }
.ffgate__box p { line-height: 1.6; }

/* ============================================================
   Studio
   ============================================================ */
.ffstudio { gap: 24px; }
[data-ff-studio-app] { display: grid; gap: 22px; }
.ffresume__item .ffc, .ffst-work .ffc { width: 64px; }
.ffst-work .ffc { width: 76px; }
.ffst-list { display: grid; gap: 14px; }
.ffst-work { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: var(--ff-surface); border: 1px solid var(--ff-line); }
.ffst-work .ffc { width: 76px; }
.ffst-work h3 { margin: 0; font: 600 italic 20px/1.2 var(--ff-read); }
.ffst-work p { margin: 4px 0 0; font-size: 14px; color: var(--ff-muted); }
@media (max-width: 640px) { .ffst-work { grid-template-columns: 60px minmax(0, 1fr); } .ffst-work .ff-actions { grid-column: 1 / -1; margin-top: 0; } }
.ffst-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 700 11.5px/1.4 var(--ff-ui); letter-spacing: .04em; background: var(--ff-surface-2); border: 1px solid var(--ff-line); }
.ffst-badge--publiee { background: color-mix(in srgb, #1F9D55 16%, transparent); border-color: color-mix(in srgb, #1F9D55 40%, transparent); }
.ffst-badge--en-validation { background: color-mix(in srgb, #F5B800 22%, transparent); border-color: color-mix(in srgb, #F5B800 50%, transparent); }
.ffst-form { display: grid; gap: 16px; max-width: 760px; padding: 24px; border-radius: 18px; background: var(--ff-surface); border: 1px solid var(--ff-line); }
.ffst-field { display: grid; gap: 6px; }
.ffst-field > span, .ffst-field legend { font: 700 13px var(--ff-ui); }
.ffst-field small { color: var(--ff-muted); font-size: 13px; }
.ffst-field input[type="text"], .ffst-field select, .ffst-field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--ff-line); background: var(--ff-paper); color: var(--ff-ink); font: 16px/1.5 var(--ff-ui); }
.ffst-field fieldset, fieldset.ffst-field { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ffst-check { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--ff-line); font: 14px var(--ff-ui); cursor: pointer; }
.ffst-check:has(input:checked) { border-color: var(--ff-ink); background: var(--ff-surface-2); }
.ffst-err { color: #C2311A; font-size: 13.5px; }
.ffst-note { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, #F5B800 14%, var(--ff-surface)); border: 1px solid color-mix(in srgb, #F5B800 40%, transparent); font-size: 14.5px; }
.ffst-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 960px) { .ffst-editor { grid-template-columns: 1fr; } }
.ffst-editor textarea { min-height: 62vh; font: 17px/1.7 var(--ff-read); padding: 18px; }
.ffst-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.ffst-tools button { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--ff-line); background: var(--ff-surface); color: var(--ff-ink); font: 600 14px var(--ff-ui); cursor: pointer; }
.ffst-preview { max-height: 72vh; overflow: auto; padding: 24px 28px; border-radius: 14px; background: #FBF9F4; color: #1F1B16; border: 1px solid #E6E0D4; font: 18px/1.7 var(--ff-read); }
.ffst-preview p { margin: 0 0 1em; }
.ffst-preview .ff-c { text-align: center; }
.ffst-preview hr { border: 0; text-align: center; }
.ffst-preview hr::before { content: "⁂"; color: #6F675C; }
.ffst-status { font-size: 13.5px; color: var(--ff-muted); }
.ffst-chapters { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ff-line); }
.ffst-chapters li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--ff-line); }

.fftoast { position: fixed; z-index: 500; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: #0A0A0A; color: #fff; font: 600 14.5px var(--ff-ui); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.fftoast a, .fftoast button { color: var(--ff-gold); background: none; border: 0; font: inherit; margin-left: 10px; cursor: pointer; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .ff *, .ff *::before, .ff *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   Polices : la charte force Inter sur tout élément (brand-late.css, !important).
   On rétablit ici, avec la même force, les polices de lecture et de marque de la Bibliothèque.
   ============================================================ */
html body .ff :is(.ffpage__text, .ffpage__text *) { font-family: var(--rd-font) !important; }
html body .ff :is(.ffcard__title, .ffsum, .ffsum p:not(.ffsum__label):not(.ffsum__note), .ffhero__lead, .fftoc__t, .ffrev p:not(.ffrev__by), .fffeat__blurb, .ffhead__lead,
  .fftome__blurb, .ffprose, .ffprose :not(code), .ffside__tomes span:not(small), .ffside__list a, .ffresume__item b, .ffrecent__text b, .ffauthor__top, .ffsaga__name,
  .ffgenre__name, .ffreader__wt, .ffnext__t, .ffthe-end p, .ffpanel__title, .ffpanel__toc a, .ffset__serif, .ffst-editor textarea, .ffst-preview, .ffst-preview *,
  .ffpage__title, .ffpage__fin, .ffc--soft .ffc__title, .ffc--noir .ffc__title, .ffc--myth .ffc__title) { font-family: var(--ff-read) !important; }
html body .ff :is(.ffnav__brand, .ffhero__facts b, .ffwork__facts dd, .ffcard__rank, .ffc__title, .ffc__mark, .ffauthor__ini, .ffnext__go) { font-family: var(--ff-brand) !important; }
html body .ff :is(.ffc--soft, .ffc--noir, .ffc--myth) .ffc__title { font-family: var(--ff-read) !important; }
html body .ff .ffpanel__toc span { font-family: var(--ff-ui) !important; }
html body .ff-dexbox :is(.ff-dexbox__title, .ff-dexbox__item b) { font-family: "Literata", Georgia, serif !important; }
