/* Revue de presse de l'accueil (22/11/2026) : mur de coupures sous le diptyque + pastilles ★ sur les
   tranches de la pile. Code : assets/js/press/press.js ; données : /data/press.json (admin « Critiques »)
   ou assets/press/press.json (prototype seul). */

/* ---------- Invitation à descendre ---------- */
.press-cue {
  position: fixed; left: 50%; bottom: 14px; z-index: 40; translate: -50% 0;
  font: 600 12px/1 var(--font-titres, "Josefin Sans", sans-serif); letter-spacing: .16em; text-transform: uppercase;
  color: #2a2c2f; text-decoration: none;
  padding: 9px 14px 8px; border-radius: 999px;
  background: rgba(239, 237, 240, .82); box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 14px -6px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .35s, translate .35s;
}
.press-cue span { display: inline-block; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { translate: 0 3px; } }
.press-cue.is-gone { opacity: 0; translate: -50% 10px; pointer-events: none; }

/* ---------- Pastille sur la tranche ---------- */
.p-sticker {
  position: absolute; top: 50%; right: 3px;      /* au bout du boîtier, sans cacher l'année */
  width: 2.1em; height: 2.1em; margin-top: -1.05em;
  font-size: 17px;                 /* en pixels de la photo : le cadre est mis à l'échelle avec elle */
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 42%),
    #e3051b;
  color: #fff; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 .08em rgba(255,255,255,.9), 0 1px 2px rgba(0,0,0,.35);
  rotate: -12deg;
  pointer-events: none;
}
.p-sticker::before { content: "★"; font-size: 1.15em; translate: 0 -.04em; }

.p-press-tip {
  position: absolute; z-index: 60; pointer-events: none;
  max-width: min(320px, 80%);
  padding: 10px 12px 9px; border-radius: 6px;
  background: #fffef8; color: #1c1c1e;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 10px 24px -10px rgba(0,0,0,.45);
  font-size: 14px; line-height: 1.35;
  opacity: 0; translate: 0 4px; transition: opacity .18s, translate .18s;
}
.p-press-tip.is-on { opacity: 1; translate: 0 0; }
.p-press-tip q { display: block; font-style: italic; quotes: "« " " »"; }
.p-press-tip small { display: block; margin-top: 4px; color: #6e6e73; font-size: 12px; }

/* ---------- Le mur de coupures ---------- */
.press {
  --wall: #efedf0; --ink: #1c1c1e; --ink-dim: #6e6e73;
  background: var(--wall); color: var(--ink);
  padding: 72px clamp(16px, 4vw, 56px) 110px;
  position: relative;
}
.press-intro { max-width: 1240px; margin: 0 auto 28px; display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.press-title {
  margin: 0; font: 600 clamp(36px, 5vw, 64px)/.95 var(--font-titres, "Josefin Sans", sans-serif);
  letter-spacing: .06em; text-transform: uppercase;
}
.press-lede { margin: 0; color: var(--ink-dim); max-width: 46ch; }

.press-wall {
  max-width: 1240px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 54px 46px; padding-top: 22px;
}

.clip {
  position: relative; width: var(--w, 300px); margin: 0;
  rotate: var(--r, 0deg); translate: 0 var(--dy, 0);
  transition: rotate .3s, scale .3s;
}
.clip:hover { rotate: 0deg; scale: 1.015; z-index: 3; }

/* le papier découpé */
.clip-paper {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; width: 100%;
  background: #f6f3ea;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 14px 22px -14px rgba(40,30,20,.45);
  clip-path: var(--cut);
}
.clip-paper::after {                                    /* papier un peu jauni */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(170deg, rgba(255,250,225,.18), rgba(190,170,120,.12));
  mix-blend-mode: multiply;
}
.clip-frame { display: block; overflow: hidden; aspect-ratio: var(--ar, 3 / 4); position: relative; }
.clip-frame img { position: absolute; left: 0; top: 0; display: block; max-width: none; height: auto; filter: saturate(.92) contrast(1.02); }

/* l'étiquette au feutre sous la coupure */
.clip-note { margin: 14px 4px 0; }
.clip-quote {
  margin: 0; font-size: 17px; line-height: 1.38; font-weight: 500;
  quotes: "« " " »";
}
.clip-quote mark {
  color: inherit; padding: 0; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, transparent .2em, rgba(255, 226, 40, .78) .25em, rgba(255, 220, 30, .62) 92%, transparent 99%) 0 60% / 100% 62% no-repeat;
}
.clip-quote::before { content: open-quote; } .clip-quote::after { content: close-quote; }
.clip-tr { margin: 4px 0 0; font-size: 14px; color: var(--ink-dim); font-style: italic; }
.clip-src { margin: 7px 0 0; font-size: 13px; color: var(--ink-dim); }
.clip-src b { color: var(--ink); font-weight: 600; }
.clip-src a { color: inherit; text-decoration: none; }
.clip-src a:hover b { text-decoration: underline; text-underline-offset: 2px; }
.press[hidden], .press-cue[hidden], .clip-play[hidden] { display: none; }
.clip-rate { letter-spacing: .08em; color: #e3051b; }

.clip-play {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.5); cursor: pointer;
}
.clip-play:hover { background: #fff; border-color: rgba(0,0,0,.25); }
.clip-play img { width: 28px; height: 28px; border-radius: 3px; box-shadow: 0 0 0 .5px rgba(0,0,0,.15); }
.clip-play span::before { content: "▶ "; font-size: .8em; }

/* scotch (repris de la page News) */
.clip .tape {
  position: absolute; z-index: 2; pointer-events: none;
  width: 38%; height: 24px; left: 31%; top: -11px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, rgba(240,232,205,.8), rgba(228,218,188,.74));
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  clip-path: polygon(2% 0, 98% 0, 100% 12%, 97% 26%, 100% 41%, 98% 57%, 100% 72%, 97% 86%, 99% 100%, 1% 100%, 3% 85%, 0 70%, 2% 55%, 0 40%, 3% 26%, 0 12%);
  transform: rotate(var(--t, -3deg));
}
.clip .tape--l { width: 30%; left: -8%; top: 1%; transform: rotate(-40deg); }
.clip .tape--r { width: 30%; left: auto; right: -8%; top: 1%; transform: rotate(40deg); }
.clip .pin {
  position: absolute; z-index: 2; left: calc(50% - 9px); top: -5px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), transparent 35%), var(--pin, #e3051b);
  box-shadow: inset -2px -3px 4px rgba(0,0,0,.28), 2px 5px 5px -1px rgba(0,0,0,.35);
}

/* ---------- Agrandissement du scan ---------- */
.press-zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96dvh; }
.press-zoom::backdrop { background: rgba(20, 20, 22, .82); }
.press-zoom img { display: block; max-width: 94vw; max-height: 92dvh; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.press-zoom button {
  position: fixed; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); font-size: 20px; cursor: pointer;
}

@media (max-width: 760px) {
  .press { padding: 48px 16px 90px; }
  .press-wall { gap: 46px; }
  .clip { width: min(100%, 86vw, calc(var(--w) * 1.1)); }   /* la colonne haute des Inrocks reste étroite */
  .clip-quote { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .press-cue span { animation: none; }
  .clip { transition: none; }
}

/* ---------- Visionneuse de microfilm (23/11/2026) : assets/js/press/microfilm.js ----------
   Photo assets/generated/presse-microfilm.webp ; l'écran, le voyant et les boutons sont placés en % de la photo. */
.press-wall[hidden] { display: none; }
.mf {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 440px);
  justify-content: center; align-items: center; gap: clamp(24px, 4vw, 64px);
  padding-bottom: 24px;
}
.mf-machine { position: relative; aspect-ratio: 1; outline: none; user-select: none; -webkit-user-select: none; }
.mf-machine:focus-visible { outline: 2px solid #1738ff; outline-offset: 6px; border-radius: 8px; }
.mf-photo { display: block; width: 100%; height: 100%; }

/* l'écran : vitre éteinte de la photo, puis la lumière du projecteur */
.mf-screen { position: absolute; overflow: hidden; cursor: zoom-in; touch-action: pan-y; container-type: size; }
.mf-light {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 75% at 50% 46%, #eef0e6, #d3d7c9 62%, #a9ae9f);
  opacity: 0; transition: opacity .2s;
}
.mf.is-on .mf-light { opacity: 1; animation: mf-on 1.1s steps(1, end); }
@keyframes mf-on { 0% { opacity: 0; } 8% { opacity: .7; } 14% { opacity: .1; } 22% { opacity: .85; } 30% { opacity: .35; } 42% { opacity: 1; } }
.mf-strip {
  position: absolute; inset: 0; display: flex;
  transition: transform .75s cubic-bezier(.55, .05, .25, 1);
  will-change: transform;
}
.mf-strip.is-winding { animation: mf-wind .75s ease-in-out; }
@keyframes mf-wind { 0%, 100% { filter: none; } 18%, 75% { filter: url(#mf-motion) brightness(1.06); } }
.mf-frame {
  flex: 0 0 100%; height: 100%; position: relative; container-type: size;
  display: grid; place-items: center;
  /* trait de séparation entre deux vues du film */
  background: linear-gradient(90deg, rgba(20,22,18,.75) 0 1.2%, transparent 1.2% 98.8%, rgba(20,22,18,.75) 98.8%);
}
.mf-page {
  position: relative; display: block; overflow: hidden;
  width: min(92cqw, 90cqh * var(--ar)); aspect-ratio: var(--ar);
  background: #f4f4ee;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.mf-page img {
  position: absolute; left: 0; top: 0; display: block; max-width: none; height: auto; pointer-events: none;
  filter: grayscale(1) sepia(.18) hue-rotate(40deg) contrast(1.22) brightness(calc(1.04 * var(--exp, 1)));   /* tirage de microfilm, un peu vert ; densité propre à chaque vue */
}
.mf-page { rotate: var(--tilt, 0deg); }
.mf-page--text { padding: 8%; font: 15px/1.35 "Special Elite", monospace; color: #222; }
.mf-imprint {
  position: absolute; left: 3%; bottom: 2.5%; z-index: 2;
  font: 10px/1 "VT323", monospace; letter-spacing: .14em; color: rgba(25,28,22,.55);
}
/* reflet de la vitre, grain, vignettage de la lampe */
.mf-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,.16), transparent 32%),
    radial-gradient(ellipse 90% 95% at 50% 48%, transparent 55%, rgba(30,34,26,.42)),
    repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.mf-lamp {
  position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 35%, #ffd0c4, #ff3a1a 45%, rgba(255,40,10,0) 72%);
  opacity: 0; transition: opacity .3s .1s; mix-blend-mode: screen;
}
.mf.is-on .mf-lamp { opacity: 1; }
/* bobine et boutons : un rond découpé dans la même photo, qui tourne avec le film (--turn, en vues) */
.mf-rot {
  position: absolute; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: none;
  isolation: isolate;
}
.mf-rot img, .mf-rotor { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mf-rotor { transition: rotate .75s cubic-bezier(.55, .05, .25, 1); }
.mf.is-still .mf-rotor, .mf.is-still .mf-film { transition: none; }
.mf-lit { mix-blend-mode: multiply; }          /* la lumière de la photo, fixe */
.mf-rot--reel { pointer-events: none; }
.mf-rot--reel .mf-rotor { rotate: calc(var(--turn, 0) * -170deg); }
.mf-knob--next .mf-rotor { rotate: calc(var(--turn, 0) * 110deg); }
.mf-knob--prev .mf-rotor { rotate: calc(var(--turn, 0) * 60deg); }

/* la bande de film sur la platine : perforations et densités qui défilent avec --turn (17 % de la photo par vue,
   la longueur que la bobine déroule en 170°) */
.mf-machine { container-type: inline-size; }
.mf-film {
  position: absolute; pointer-events: none; transform-origin: 0 0; border-radius: .05cqw;
  background:
    radial-gradient(circle, rgba(214,182,154,.75) 36%, transparent 58%) 0 12% / .61cqw .3cqw repeat-x,
    radial-gradient(circle, rgba(214,182,154,.55) 36%, transparent 58%) 0 88% / .61cqw .3cqw repeat-x,
    repeating-linear-gradient(90deg, rgba(255,214,170,.1) 0 2.2cqw, transparent 2.2cqw 3.3cqw, rgba(0,0,0,.14) 3.3cqw 4.6cqw, transparent 4.6cqw 6.1cqw),
    linear-gradient(180deg, #6a3e1f, #4e2b12 45%, #3d200c);
  background-position-x: calc(var(--turn, 0) * 17cqw);
  transition: background-position-x .75s cubic-bezier(.55, .05, .25, 1);
  box-shadow: 0 .06cqw .1cqw rgba(30,18,8,.35);
  filter: blur(.25px);
}
.mf-film.is-glass { opacity: .72; filter: blur(.35px) saturate(.85); }   /* sous la vitre du presse-film */
.mf-knob { cursor: pointer; }
.mf-knob:focus-visible { outline: 2px solid #1738ff; outline-offset: 2px; }
.mf-knob::after { content: ""; position: absolute; inset: 0; border-radius: 50%; transition: background .2s; }
.mf-knob:hover::after { background: rgba(255,255,255,.12); }
.mf-knob:disabled { cursor: default; }
.mf-knob:disabled::after { background: none; }

/* la visionneuse flotte (demande de Maxime, 23/11/2026) : une ombre douce sous les pieds */
.mf-machine { isolation: isolate; }
.mf-shadow {
  position: absolute; left: 14%; width: 72%; top: 96%; height: 7%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40,32,24,.26), rgba(40,32,24,.1) 55%, transparent);
  mix-blend-mode: multiply;
}

/* la fiche de bibliothèque, tapée à la machine */
.mf-card {
  position: relative; padding: 22px 26px 30px;
  background:
    linear-gradient(#e94b4b, #e94b4b) 0 52px / 100% 1.5px no-repeat,
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(60,110,190,.22) 25px 26px) 0 52px / 100% calc(100% - 52px) no-repeat,
    #fbf8ee;
  border-radius: 3px; rotate: .8deg;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 18px 28px -18px rgba(40,30,20,.5);
  font-family: "Special Elite", "Courier New", monospace; color: #23221f;
}
.mf-card-head {
  display: flex; justify-content: space-between; gap: 12px; height: 26px; margin-bottom: 14px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6b675e;
}
.mf-card-body { min-height: 13em; }
.mf-quote { margin: 0; font-size: 18px; line-height: 26px; quotes: "« " " »"; }
.mf-quote::before { content: open-quote; } .mf-quote::after { content: close-quote; }
.mf-quote mark {
  color: inherit; padding: 0; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, transparent .2em, rgba(255, 226, 40, .78) .25em, rgba(255, 220, 30, .62) 92%, transparent 99%) 0 60% / 100% 62% no-repeat;
}
.mf-tr { margin: 0; font-size: 14px; line-height: 26px; color: #6b675e; }
.mf-src { margin: 0; font-size: 13px; line-height: 26px; color: #6b675e; }
.mf-src b { color: #23221f; font-weight: 400; }
.mf-src a { color: inherit; text-decoration: none; }
.mf-src a:hover b { text-decoration: underline; text-underline-offset: 2px; }
.mf-play {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 9px;
  font: 14px "Special Elite", monospace; color: #23221f; cursor: pointer;
  padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); background: rgba(255,255,255,.6);
}
.mf-play:hover { background: #fff; border-color: rgba(0,0,0,.3); }
.mf-play img { width: 28px; height: 28px; border-radius: 3px; }
.mf-play span::before { content: "▶ "; font-size: .8em; }
.mf-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.mf-count { font-size: 14px; letter-spacing: .1em; min-width: 6ch; text-align: center; white-space: nowrap; }
.mf-step {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); background: #fff;
  font-size: 14px; color: #23221f; cursor: pointer;
}
.mf-step:disabled { opacity: .3; cursor: default; }
.mf-hole {           /* trou de la tringle du fichier */
  position: absolute; left: calc(50% - 7px); bottom: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--wall, #efedf0); box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}

@media (max-width: 860px) {
  .mf { grid-template-columns: minmax(0, 560px); gap: 40px; }
  .mf-card { rotate: 0deg; padding: 18px 18px 30px; }
  .mf-card-body { min-height: 0; }
  .mf-quote { font-size: 16px; }
}
/* ---------- Plein écran ---------- */
.mf-full-on {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); background: #fff;
  font-size: 18px; line-height: 1; color: #23221f; cursor: pointer; margin-left: 6px;
}
.mf-bar { display: none; }
html.mf-lock { overflow: hidden; }
.mf.is-full {
  position: fixed; inset: 0; z-index: 1000; display: block; max-width: none; margin: 0; padding: 0;
  background: #efedf0;   /* le blanc du mur : la photo s'y fond, quelle que soit la forme de la fenêtre */
  overflow: hidden;
}
.mf.is-full .mf-card, .mf.is-full .mf-shadow { display: none; }
.mf.is-full .mf-machine { position: absolute; aspect-ratio: 1; }
.mf.is-full .mf-machine:focus-visible { outline: none; }
.mf.is-full .mf-imprint { font-size: 14px; }
.mf.is-full .mf-bar {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 16px);
  padding: 8px 10px; border-radius: 999px;
  background: rgba(251,248,238,.94); color: #23221f; font-family: "Special Elite", monospace;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 10px 30px -8px rgba(0,0,0,.4);
}
.mf-bar .mf-step, .mf-full-off { flex: none; }
.mf-bar-src { margin: 0 4px; font-size: 13px; color: #6b675e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mf-bar-src b { color: #23221f; font-weight: 400; }
.mf-bar-src a { color: inherit; text-decoration: none; }
.mf-full-off {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #23221f; color: #fbf8ee;
  font-size: 16px; cursor: pointer;
}
@media (max-width: 600px) { .mf-bar-src { display: none; } }

/* ---------- Artefacts de projection (23/11/2026) ----------
   --fx : intensité (discrète sur la page, pleine en plein écran). Couches au-dessus du film, dans la lumière :
   point chaud de la lampe qui dérive, température de couleur qui varie, grain, papillotement, éclat. */
.mf { --fx: .55; }
.mf.is-full { --fx: 1; }
.mf-fx { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.mf-fx i { position: absolute; inset: 0; }
.mf-hot {
  inset: -25% !important;
  background: radial-gradient(ellipse 34% 40% at 50% 48%, rgba(255,251,232,.8), rgba(255,251,232,.2) 55%, transparent 75%);
  mix-blend-mode: soft-light; opacity: var(--fx);
  animation: mf-drift 13s ease-in-out infinite alternate;
}
@keyframes mf-drift {
  0% { translate: -4% -2%; } 35% { translate: 1.5% 1.5%; } 70% { translate: -1% -1%; } 100% { translate: 4% 1%; }
}
.mf-tint {
  background: linear-gradient(115deg, rgba(255,186,105,.9), transparent 55%, rgba(110,205,165,.8));
  mix-blend-mode: soft-light; opacity: 0;
  animation: mf-temp 21s ease-in-out infinite;
}
@keyframes mf-temp { 0%, 100% { opacity: calc(.08 * var(--fx)); } 40% { opacity: calc(.32 * var(--fx)); } 70% { opacity: calc(.14 * var(--fx)); } }
.mf-grain {
  inset: -60% !important;
  background: var(--mf-grain) 0 0 / 128px 128px;
  mix-blend-mode: overlay; opacity: calc(.28 * var(--fx));
  animation: mf-grain .5s steps(1, end) infinite;
}
@keyframes mf-grain {
  0% { translate: 0 0; } 17% { translate: -9% 5%; } 33% { translate: 6% -8%; }
  50% { translate: -4% -3%; } 67% { translate: 8% 6%; } 83% { translate: -7% 9%; }
}
.mf-flicker {                       /* la lampe qui baisse : voile sombre */
  background: #161812; mix-blend-mode: multiply; opacity: 0;
  animation: mf-flick 6.1s steps(1, end) infinite;
}
@keyframes mf-flick {
  0%, 100% { opacity: 0; } 11% { opacity: calc(.05 * var(--fx)); } 12% { opacity: 0; }
  37% { opacity: calc(.03 * var(--fx)); } 38.5% { opacity: calc(.07 * var(--fx)); } 40% { opacity: 0; }
  73% { opacity: calc(.04 * var(--fx)); } 74% { opacity: 0; } 91% { opacity: calc(.025 * var(--fx)); } 93% { opacity: 0; }
}
.mf-flare {                         /* la lampe qui monte : éclat clair */
  background: radial-gradient(ellipse 80% 80% at 50% 48%, rgba(255,253,240,.95), rgba(255,253,240,.5));
  mix-blend-mode: screen; opacity: 0;
}
/* pendant le bobinage, les traits entre les vues hachent la lumière */
.mf.is-winding .mf-flicker { animation: mf-chop .75s steps(1, end); }
@keyframes mf-chop {
  0% { opacity: 0; } 15% { opacity: .1; } 22% { opacity: .02; } 30% { opacity: .16; } 38% { opacity: .04; }
  46% { opacity: .2; } 54% { opacity: .05; } 62% { opacity: .14; } 72% { opacity: .03; } 84% { opacity: .08; } 100% { opacity: 0; }
}
/* événements au hasard (microfilm.js, lightEvent) */
.mf[data-light="dip"] .mf-flicker { animation: mf-dip .9s steps(1, end); }
@keyframes mf-dip {
  0% { opacity: 0; } 9% { opacity: .5; } 18% { opacity: .08; } 24% { opacity: .62; } 37% { opacity: .18; }
  55% { opacity: .4; } 68% { opacity: .05; } 80% { opacity: .12; } 100% { opacity: 0; }
}
.mf[data-light="surge"] .mf-flare { animation: mf-surge .9s ease-out; }
@keyframes mf-surge { 0% { opacity: 0; } 6% { opacity: .55; } 30% { opacity: .3; } 60% { opacity: .1; } 100% { opacity: 0; } }
.mf[data-light="surge"] .mf-hot { opacity: 1; }

/* sur le film : poussières, cheveux (ils défilent avec la vue), rayures sur toute la longueur */
.mf-dust {
  position: absolute; z-index: 1; width: var(--s); height: var(--s); border-radius: 50%; pointer-events: none;
  background: rgba(18,20,15,.75); filter: blur(.2px); opacity: var(--fx);
}
.mf-dust.is-light { background: rgba(255,255,250,.9); }
.mf-dust.is-hair, .mf-gd.is-hair {
  width: var(--w); height: var(--h); background: none; border-radius: 50%;
  border-top: max(1px, .12cqw) solid rgba(18,20,15,.55); rotate: var(--r); filter: blur(.3px);
}
.mf-scratch {
  position: absolute; left: 0; height: max(1px, .15cqh); z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,248,.8) 0 var(--a), transparent var(--a) var(--b));
  opacity: calc(var(--o) * var(--fx)); mix-blend-mode: screen;
}
.mf-scratch.is-dark { background: repeating-linear-gradient(90deg, rgba(20,22,16,.6) 0 var(--a), transparent var(--a) var(--b)); mix-blend-mode: multiply; }

/* à l'arrêt : sursaut du film, puis mise au point qui cherche (flou → net, léger dépassement) */
.mf-strip.is-judder { animation: mf-judder .32s steps(1, end); }
@keyframes mf-judder { 0% { translate: 0 .5%; } 25% { translate: 0 -.35%; } 50% { translate: 0 .2%; } 75% { translate: 0 -.1%; } 100% { translate: 0 0; } }
.mf-frame.is-settle .mf-page { animation: mf-focus 1.1s cubic-bezier(.25, .7, .3, 1); }
@keyframes mf-focus {
  0% { filter: blur(calc(3px * var(--fx))); scale: 1.012; }
  40% { filter: blur(0); scale: 1; }
  58% { filter: blur(calc(1.1px * var(--fx))); scale: 1.004; }
  100% { filter: blur(0); scale: 1; }
}
.mf-knob--prev .mf-rotor { rotate: calc(var(--turn, 0) * 60deg + var(--focus, 0) * 35deg); }   /* la mise au point fait tourner le petit bouton */

/* la vitre : poussières fixes et, en plein écran, la lentille de Fresnel et une trace de doigt */
.mf-gd {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: rgba(30,32,26,.5); filter: blur(.6px); opacity: var(--fx);
}
.mf-smudge {
  position: absolute; left: 62%; top: 56%; width: 26%; height: 30%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,255,255,.35), rgba(255,255,255,.12) 60%, transparent);
  filter: blur(6px); rotate: -24deg; mix-blend-mode: screen;
}
.mf.is-full .mf-smudge { opacity: .55; }
.mf.is-full .mf-glass {
  background:
    linear-gradient(125deg, rgba(255,255,255,.14), transparent 30%),
    radial-gradient(ellipse 85% 90% at 50% 48%, transparent 50%, rgba(28,32,24,.55)),
    repeating-radial-gradient(circle at 50% 48%, rgba(0,0,0,.035) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 1px, transparent 1px 3px);
}

/* la salle s'éteint en plein écran : tout s'assombrit autour de l'écran, qui déborde un peu de lumière */
.mf-room { position: absolute; z-index: 5; pointer-events: none; display: none; }
.mf.is-full .mf-room {
  display: block;
  box-shadow: 0 0 90px 14px rgba(226,236,214,.2), 0 0 0 300vmax rgba(14,14,11,.66);
  animation: mf-dim 1.8s ease both;
}
@keyframes mf-dim { 0% { opacity: 0; } 25% { opacity: .35; } 32% { opacity: .2; } 100% { opacity: 1; } }
.mf.is-full .mf-bar { z-index: 6; }
.mf.is-full[data-light="dip"] .mf-room { animation: mf-dim 1.8s ease both, mf-room-dip .9s steps(1, end); }   /* mf-dim gardé : pas de redémarrage */
@keyframes mf-room-dip { 0%, 100% { filter: none; } 9%, 24% { filter: brightness(.6); } 18%, 37% { filter: brightness(.9); } }

@media (prefers-reduced-motion: reduce) {
  .mf-strip { transition: none; }
  .mf.is-on .mf-light { animation: none; }
  .mf-hot, .mf-tint, .mf-grain, .mf-flicker, .mf.is-full .mf-room { animation: none; }
}

/* ---------- Usure du film, franche en plein écran (23/11/2026, Maxime : « que le microfilm s'affiche avec les
   dégradations quand je passe en plein écran ») ----------
   --wear : 0,3 sur la page, 1 en plein écran. Sur l'article (.mf-wear, tiré d'après la clé de la critique et
   plus fourni pour les critiques anciennes) : tache d'humidité, piqûres rouille, émulsion griffée, pli, bord
   voilé. Sur toute la bande : rayures en plus et bande d'abrasion. Dans la lumière : bords flous de l'objectif,
   vignettage plus fort. Le film « flotte » un peu dans le presse-film. */
.mf { --wear: .3; }
.mf.is-full { --wear: 1; }
.mf-wear { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; container-type: size; }
.mf-wear i { position: absolute; display: block; pointer-events: none; }
.mf-stain {                          /* tache d'humidité : auréole plus sombre sur le bord, fond un peu jauni */
  aspect-ratio: 1.3; border-radius: 47% 53% 44% 56% / 52% 46% 54% 48%;
  background: radial-gradient(closest-side, rgba(120,112,70,.1) 0 62%, rgba(70,64,36,.5) 80%, rgba(70,64,36,.16) 88%, transparent 96%);
  mix-blend-mode: multiply; opacity: calc(var(--o) * var(--wear)); filter: blur(.6px);
}
.mf-redox {                          /* « rougeole » du microfilm : petites piqûres rousses cerclées */
  width: var(--s); height: var(--s); translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,104,44,.45) 0 34%, rgba(120,56,18,.9) 50%, rgba(150,80,30,.3) 64%, transparent 71%);
  mix-blend-mode: multiply; opacity: var(--wear); filter: blur(.25px);
}
.mf-scrape {                         /* émulsion griffée : trait clair irrégulier */
  height: max(1px, .5cqh); transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,250,.9) 8%, rgba(255,255,250,.35) 30%, rgba(255,255,250,.85) 55%, rgba(255,255,250,.2) 80%, transparent);
  mix-blend-mode: screen; opacity: calc(.85 * var(--wear)); filter: blur(.35px);
}
.mf-crease {                         /* pli du journal photographié : arête claire et ombre */
  left: -5%; right: -5%; height: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%, rgba(30,30,24,.28) 60%, transparent);
  opacity: calc(.9 * var(--wear));
}
.mf-fog {                            /* bord voilé par la lumière : un côté plus pâle */
  inset: 0; background: linear-gradient(var(--side), rgba(255,255,245,.85), transparent 22%);
  mix-blend-mode: screen; opacity: calc(var(--o) * var(--wear));
}
.mf-scratch.is-extra { display: none; }
.mf.is-full .mf-scratch.is-extra { display: block; }
.mf.is-full .mf-scratch { height: max(1.5px, .2cqh); }
.mf-abrasion {                       /* bande d'abrasion : là où le film frotte, la surface est mate et griffée */
  position: absolute; left: 0; height: 7%; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,248,.22) 0 1px, transparent 1px 4px, rgba(255,255,248,.12) 4px 5px, transparent 5px 9px),
    linear-gradient(180deg, transparent, rgba(255,255,248,.18) 30% 70%, transparent);
  mix-blend-mode: screen; opacity: calc(var(--wear) - .2);
}
.mf-page img { filter: grayscale(1) sepia(.18) hue-rotate(40deg) contrast(calc(1.22 + .1 * var(--wear))) brightness(calc(1.04 * var(--exp, 1))) blur(calc(.3px * (var(--wear) - .3))); }
.mf-lens { display: none; }          /* objectif bon marché : net au centre, flou et sombre sur les bords */
.mf.is-full .mf-lens {
  display: block;
  -webkit-backdrop-filter: blur(1.8px); backdrop-filter: blur(1.8px);
  -webkit-mask: radial-gradient(ellipse 62% 66% at 50% 48%, transparent 52%, #000 100%);
  mask: radial-gradient(ellipse 62% 66% at 50% 48%, transparent 52%, #000 100%);
  background: radial-gradient(ellipse 62% 66% at 50% 48%, transparent 60%, rgba(24,28,20,.32));
}
.mf.is-full .mf-frame { animation: mf-weave 2.6s steps(1, end) infinite; }   /* le film flotte dans le presse-film */
@keyframes mf-weave {
  0% { translate: 0 0; } 13% { translate: .08% .12%; } 29% { translate: -.05% -.06%; } 41% { translate: .03% .16%; }
  58% { translate: -.07% .02%; } 71% { translate: .05% -.1%; } 86% { translate: -.02% .08%; }
}

/* raccourcis clavier : rappel sur la fiche (souris seulement) et bulle à l'entrée du plein écran */
.mf-keys { display: none; margin: 8px 0 0; font: 10px/1.4 "Special Elite", monospace; color: #8a857a; text-align: center; white-space: nowrap; cursor: help; }
.mf-keys kbd { font: inherit; margin: 0 1px; padding: 0 4px; border: 1px solid #cfc9bb; border-radius: 3px; background: #fffdf6; color: #4b483f; }
@media (hover: hover) and (pointer: fine) { .mf-keys { display: block; } }
.mf-hint { display: none; font: 11px/1.5 "Special Elite", monospace; }
.mf-hint kbd { font: inherit; padding: 0 4px; border: 1px solid #cfc9bb; border-radius: 3px; background: #fffdf6; color: #4b483f; }
.mf.is-full .mf-hint {
  display: block; position: absolute; left: 50%; top: 18px; translate: -50% 0; z-index: 6; margin: 0;
  padding: 6px 14px; border-radius: 999px; background: rgba(251,248,238,.92); color: #6b675e;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.45); white-space: nowrap;
  animation: mf-hint 4.5s ease forwards;
}
@keyframes mf-hint { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (hover: none) { .mf.is-full .mf-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .mf.is-full .mf-frame { animation: none; }
}

/* ---------- Interrupteur à levier et extinction (23/11/2026, Maxime : « anime le bouton pour allumer la
   machine, mais surtout pour l'éteindre, avec une anim sur l'écran ») ----------
   Le levier est découpé dans la photo (outils/presse_microfilm_interrupteur.py) : socle sans levier + levier seul
   qui bascule autour de l'écrou (vu de face : il raccourcit, passe par l'axe et ressort de l'autre côté).
   Levier en haut = allumé (la photo d'origine), en bas = éteint. */
.mf-switch {
  position: absolute; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.mf-switch:focus-visible { outline: 2px solid #1738ff; outline-offset: 2px; }
.mf-switch::before { content: ""; position: absolute; inset: -8px -15px; }   /* zone tactile d'au moins 44 px sur téléphone */
.mf-switch img { position: absolute; display: block; max-width: none; pointer-events: none; }
.mf-switch-base { left: 10%; top: 4.255%; width: 82.5%; height: 53.191%; }
.mf-lever {
  left: 30%; top: 6.383%; width: 42.5%; height: 42.553%;
  transform-origin: 50% 100%; scale: 1 -1;
  transition: scale .16s cubic-bezier(.7, 0, .3, 1.3);
  filter: drop-shadow(-.05cqw .12cqw .06cqw rgba(50,36,16,.35));
}
.mf.is-on .mf-lever { scale: 1 1; }
.mf-switch:hover .mf-lever { filter: drop-shadow(-.05cqw .12cqw .06cqw rgba(50,36,16,.35)) brightness(1.08); }

/* Extinction sur l'écran : la lumière tombe d'un coup, se reprend, puis le filament refroidit (l'image vire à
   l'ambre puis au rouge sombre) pendant que le noir se referme depuis les bords vers le point chaud. */
.mf.is-off .mf-light { opacity: 0; animation: mf-off 1.6s linear both; }
@keyframes mf-off {
  0% { opacity: 1; filter: none; }
  4% { opacity: 1; filter: brightness(.5) sepia(.3); }
  8% { opacity: 1; filter: brightness(.78) sepia(.35); }
  12% { opacity: 1; filter: brightness(.42) sepia(.7) saturate(1.5) hue-rotate(-10deg); }
  40% { opacity: 1; filter: brightness(.24) sepia(1) saturate(2.4) hue-rotate(-16deg); }
  75% { opacity: .6; filter: brightness(.12) sepia(1) saturate(3) hue-rotate(-22deg); }
  100% { opacity: 0; filter: brightness(.05) sepia(1) saturate(3) hue-rotate(-24deg); }
}
.mf-closing {
  inset: -40% !important; opacity: 0;
  background: radial-gradient(closest-side, transparent 30%, rgba(10,11,8,.92) 72%);
}
.mf.is-off .mf-closing { animation: mf-close 1.6s cubic-bezier(.3, .5, .4, 1) both; }
@keyframes mf-close { 0% { opacity: 0; scale: 1.9; } 12% { opacity: .55; scale: 1.7; } 100% { opacity: 1; scale: .65; } }
.mf.is-full .mf-room { transition: box-shadow 1.2s ease-out; }
.mf.is-full.is-off .mf-room { box-shadow: 0 0 0 0 rgba(226,236,214,0), 0 0 0 300vmax rgba(14,14,11,.66); }

/* Loupe du plein écran (remplace la fenêtre du scan brut) : l'article grossit sur la vitre, avec son usure */
.mf-page { transition: scale .5s cubic-bezier(.3, .7, .2, 1), transform-origin .25s ease-out; }
.mf-frame.is-mag .mf-page { scale: var(--mag, 2); transform-origin: var(--mx, 50%) var(--my, 0%); }
.mf.is-mag .mf-screen { cursor: zoom-out; touch-action: none; }

@media (prefers-reduced-motion: reduce) {
  .mf-lever, .mf-page { transition: none; }
  .mf.is-off .mf-light, .mf.is-off .mf-closing { animation-duration: .01s; }
}
