/* PROKOFIÈVRE — feuille de style unique
   Direction : affiche riso tirée à deux encres (rose fluo + bleu),
   légèrement mal calée. Le décalage est l'élément signature ; le reste reste sobre.
   Titres : Prokofeutre, police maison tracée au feutre (font/build_font.py).
   Texte : Shantell Sans, secouée lettre par lettre par ecriture.js. */

@font-face {
  font-family: "Prokofeutre";
  src: url("fonts/Prokofeutre.woff2?v=94fb48f5") format("woff2");
  font-weight: 100 900;
  font-display: block; /* titre invisible un instant plutôt qu'affiché dans une autre police */
}
@font-face {
  font-family: "Prokozine";
  src: url("fonts/Prokozine.woff2?v=6f47e350") format("woff2");
  font-weight: 100 900;
  font-display: block; /* titre invisible un instant plutôt qu'affiché dans une autre police */
}

:root {
  --paper: #ececE6;
  --ink: #1d1d1b;
  --pink: #ff48b0;
  --blue: #0078bf;
  --yellow: #ffe800;
  --muted: #5d5d58;
  --blend: multiply;
  --shift-x: 6px;
  --shift-y: 4px;
  --body: "Shantell Sans", "Comic Sans MS", sans-serif;
  --display: "Prokofeutre", var(--body);

  /* Écriture à la main (static/ecriture.js) — réglables en direct en mode dev, touche E.
     Texte (Shantell Sans), un jeu de réglages par mode du policier (feutre / zine) : graisse 300–800, rebond -100–100, manuscrit et espacement 0–100 ;
     saut en em, penché en degrés, pression = écart de graisse ; bavure et rugueux en px. */
  --texte-feutre-graisse: 800;
  --texte-feutre-rebond: -60;
  --texte-feutre-manuscrit: 40;
  --texte-feutre-espacement: 5;
  --texte-feutre-saut: 0.095;
  --texte-feutre-penche: 4.25;
  --texte-feutre-pression: 90;
  --texte-feutre-bavure: 0.55;
  --texte-feutre-rugueux: 0.4;
  --texte-zine-graisse: 490;
  --texte-zine-rebond: 10;
  --texte-zine-manuscrit: 65;
  --texte-zine-espacement: 25;
  --texte-zine-saut: 0.1;
  --texte-zine-penche: 3.5;
  --texte-zine-pression: 160;
  --texte-zine-bavure: 1.1;
  --texte-zine-rugueux: 2.1;
  /* le texte suit le mode du policier, comme les titres */
  --texte-graisse: var(--texte-feutre-graisse);
  --texte-rebond: var(--texte-feutre-rebond);
  --texte-manuscrit: var(--texte-feutre-manuscrit);
  --texte-espacement: var(--texte-feutre-espacement);
  --texte-saut: var(--texte-feutre-saut);
  --texte-penche: var(--texte-feutre-penche);
  --texte-pression: var(--texte-feutre-pression);
  --texte-bavure: var(--texte-feutre-bavure);
  --texte-rugueux: var(--texte-feutre-rugueux);
  /* Titres, selon la police choisie par le policier (espacement en centièmes d'em) */
  /* police des titres à la première visite : feutre (Prokofeutre) ou zine (Prokozine) — panneau E ;
     ensuite, c'est le choix du visiteur avec le policier qui compte (lu par build.py) */
  --police-defaut: zine;
  --feutre-espacement: 30;
  --feutre-saut: 0.04;
  --feutre-penche: 5.25;
  --feutre-bavure: 0.3;
  --feutre-rugueux: 3.5;
  --feutre-garder: 0; /* 1 : trembler mot par mot, les gouttes restent ; 0 : lettre par lettre, sans gouttes */
  --zine-espacement: 11;
  --zine-saut: 0.085;
  --zine-penche: 0;
  --zine-bavure: 1.5;
  --zine-rugueux: 1.5;
  --zine-garder: 1; /* 1 : trembler mot par mot, les lettres collées restent ; 0 : lettre par lettre */
  --titre-espacement: var(--feutre-espacement);
  --titre-saut: var(--feutre-saut);
  --titre-penche: var(--feutre-penche);
  --titre-bavure: var(--feutre-bavure);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171716; --ink: #ecece6; --pink: #ff5fbd; --blue: #3aa0e8;
    --yellow: #ffe800; --muted: #a3a39c; --blend: screen; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171716; --ink: #ecece6; --pink: #ff5fbd; --blue: #3aa0e8;
  --yellow: #ffe800; --muted: #a3a39c; --blend: screen; color-scheme: dark;
}
:root[data-police="zine"] {
  --display: "Prokozine", var(--body);
  --titre-espacement: var(--zine-espacement);
  --titre-saut: var(--zine-saut);
  --titre-penche: var(--zine-penche);
  --titre-bavure: var(--zine-bavure);
  --texte-graisse: var(--texte-zine-graisse);
  --texte-rebond: var(--texte-zine-rebond);
  --texte-manuscrit: var(--texte-zine-manuscrit);
  --texte-espacement: var(--texte-zine-espacement);
  --texte-saut: var(--texte-zine-saut);
  --texte-penche: var(--texte-zine-penche);
  --texte-pression: var(--texte-zine-pression);
  --texte-bavure: var(--texte-zine-bavure);
  --texte-rugueux: var(--texte-zine-rugueux);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: var(--texte-graisse);
  font-variation-settings: "BNCE" var(--texte-rebond), "INFM" var(--texte-manuscrit), "SPAC" var(--texte-espacement);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.5;
  /* grain papier */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--pink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.zine { font-family: "Courier Prime", "Courier New", monospace; }

/* ---------- écriture à la main (static/ecriture.js) ---------- */
.ecr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; user-select: none; }
.ecr-mot { display: inline-block; white-space: nowrap; }
.ecr-l {
  display: inline-block;
  transform: translateY(calc(var(--r1) * var(--saut, 0) * 1em)) rotate(calc(var(--r2) * var(--penche, 0) * 1deg));
}
.ecr-entier { /* un mot entier qui tremble : la police garde ses lettres voisines */
  transform: translateY(calc(var(--r1) * var(--saut, 0) * 1em)) rotate(calc(var(--r2) * var(--penche, 0) * 1deg));
}
.ecrit-texte { --saut: var(--texte-saut); --penche: var(--texte-penche); text-shadow: 0 0 calc(var(--texte-bavure) * 1px) currentColor; }
.ecrit-texte .ecr-l { font-weight: calc(var(--poids) + var(--r3) * var(--texte-pression)); }
.ecrit-titre {
  --saut: var(--titre-saut); --penche: var(--titre-penche);
  /* un espacement non nul coupe d'habitude les substitutions de la police : gouttes et lettres collées restent */
  font-feature-settings: "calt" 1, "liga" 1;
  letter-spacing: calc(var(--titre-espacement) * .01em); text-shadow: 0 0 calc(var(--titre-bavure) * 1px) currentColor;
}
.ecr-rugueux-texte .ecrit-texte { filter: url(#ecr-rugueux-texte); }
.ecr-rugueux-texte .ecrit-texte .ecrit-texte { filter: none; }
.ecr-rugueux-feutre:not([data-police="zine"]) .ecrit-titre { filter: url(#ecr-rugueux-feutre); }
.ecr-rugueux-zine[data-police="zine"] .ecrit-titre { filter: url(#ecr-rugueux-zine); }

/* ---------- fond collé d'une page ----------
   photo passée au collage punk (collage/build_collage.py), imprimée sur le papier ;
   quelle photo et quelle opacité : collage/reglages.json, réglé avec le panneau Wall (touche W) */
.avec-fond::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--fond) center / cover no-repeat;
  opacity: var(--fond-clair); mix-blend-mode: var(--blend);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avec-fond::before { opacity: var(--fond-sombre); } }
:root[data-theme="dark"] .avec-fond::before { opacity: var(--fond-sombre); }

/* ---------- navigation : bande de scotch ---------- */
.nav {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: baseline;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 3px solid var(--ink);
}
.nav .logo { font-family: var(--display); font-size: 1.6rem; line-height: 1; text-decoration: none; margin-right: auto; }
.nav a:not(.logo) { text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"] { background: var(--yellow); color: #1d1d1b; padding: 0 .3em; }

main { padding: 0 clamp(1rem, 4vw, 3rem); }

/* ---------- titre mal calé (élément signature) ---------- */
.misreg {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: .86;
  text-transform: uppercase;
}
.misreg .layer { display: block; }
.misreg .layer-pink { color: var(--pink); mix-blend-mode: var(--blend); }
.misreg .layer-blue {
  position: absolute; inset: 0; color: var(--blue); mix-blend-mode: var(--blend);
  transform: translate(var(--shift-x), var(--shift-y));
  transition: transform .25s ease-out;
  pointer-events: none; /* doublon décoratif décalé : il ne doit pas voler les clics des liens qu'il chevauche */
}
/* marge du haut négative : le titre remonte et le calque bleu (décalé, et qui suit la souris)
   déborde un peu sur le trait du menu ; plus elle est négative, plus il déborde (le rose suit).
   En dessous, de quoi laisser les gouttes au-dessus du texte.
   Le titre laisse passer les clics vers les liens du menu qu'il chevauche. */
.hero-title { font-size: clamp(4.2rem, 19vw, 17rem); padding: 1.5rem 0 0; margin: clamp(0rem, 0vw, 0rem) 0 .6rem; pointer-events: none; }
.page-title { font-size: clamp(3.5rem, 13vw, 10rem); padding: 1.5rem 0 .5rem; }

/* Text bloc used for Prokofièvre presentation margin */
.tagline {max-width: 50ch; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); margin: 0 0 1rem; }
.hero + .tagline { margin-bottom: 2.2rem; } /* même respiration que les bandes suivantes */
/* téléphone : la deuxième phrase de la présentation est repliée, un « + » rose la déplie (comme « date à venir ») */
.hero-case, .hero-plus { display: none; }
@media (max-width: 51.99rem) {
  .hero-case { display: inline; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .hero-plus { display: inline-block; vertical-align: -.15em; margin-left: .3rem; padding: 0 .2rem; cursor: pointer; }
  .hero-plus::after { content: "+"; display: block; font-family: var(--display); font-size: 1.8rem; line-height: 1;
    color: var(--pink); transition: transform .2s; }
  .hero-plus:hover::after { color: var(--blue); }
  .hero-case:checked + .hero-plus::after { transform: rotate(45deg); }
  .hero-case:focus-visible + .hero-plus { outline: 2px solid var(--blue); outline-offset: 2px; }
  .hero-case:not(:checked) ~ .tagline-suite { display: none; }
}

/* ---------- prochaine soirée : affiche ---------- */
.next {
  display: grid; gap: 1.5rem 3rem;
  grid-template-columns: minmax(0, 1fr);
  border-top: 3px solid var(--ink);
  padding: 2.2rem 0;
}
@media (min-width: 52rem) { .next { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.next .date { font-family: var(--display); font-size: clamp(4rem, 12vw, 9rem); line-height: .85; margin: 0; }
.next .date small { display: block; font-family: var(--body); font-size: .3em; line-height: 1.2; font-weight: 600; color: var(--muted); }
/* date pas encore fixée : l'animation « ?? date à venir » (anim.py, animate/date-a-venir/) */
/* sur ordinateur : l'animation à la place de la date, à côté des infos */
.next .date-anim { max-width: 34rem; }
.next-large .date-anim { align-self: center; } /* centrée entre les deux traits */
/* l'image des câbles a plus de vide sous « date à venir » qu'au-dessus des « ?? » : on le rattrape,
   pour que le dessin soit au milieu de sa bande (marge en % de la largeur, comme l'image) */
.date-anim .anim, .d-anim .anim { margin-bottom: -4.6%; }
.agenda .d-anim { max-width: 22rem; }
@media (min-width: 52rem) {
  .agenda li.agenda-large { grid-template-columns: 17rem minmax(0, 1fr) 14rem 8rem; align-items: center; }
  .next-plie { display: none; }
}
/* sur téléphone : l'animation seule, avec un « + » rose ; un clic déplie les infos,
   comme « Vous êtes qui au fait ? » (les deux versions sont dans la page, une seule est montrée) */
@media (max-width: 51.99rem) {
  .next-large { display: none; }
  .next-plie { display: block; }
}
.next-plie > .btn { margin-top: 1.25rem; } /* le bouton reste sous les câbles, hors du dépliant */
.next-plie summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; }
.next-plie summary { max-width: 38rem; }
.next-plie summary::-webkit-details-marker { display: none; }
.next-plie summary::after {
  content: "+"; flex: none; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--pink); transition: transform .2s;
}
.next-plie details[open] > summary::after { transform: rotate(45deg); }
.next-plie summary:hover::after { color: var(--blue); }
.next-plie .next-infos { margin-top: 1.5rem; }
.anim { display: block; width: 100%; flex: 1; min-width: 0; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .anim-inverse { filter: invert(1); } }
:root[data-theme="light"] .anim-inverse { filter: invert(1); } /* dessinée pour le thème sombre */
.next h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.5rem + 2.4vw, 3.4rem); line-height: 1; margin: 0 0 1rem; }
.lineup { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: clamp(1.3rem, 1.1rem + 1vw, 2rem); font-weight: 700; line-height: 1.15; }
.lineup li + li::before { content: "+ "; color: var(--pink); }
.meta { margin: 0 0 1.5rem; }
.btn {
  display: inline-block; padding: .6em 1.1em; font-weight: 700; text-decoration: none;
  background: var(--ink); color: var(--paper); border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--pink);
}
.btn:hover { color: var(--paper); box-shadow: 2px 2px 0 var(--blue); transform: translate(3px, 3px); }

.about { border-top: 3px solid var(--ink); padding: 2.2rem 0; }
.about h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
/* « Vous êtes qui au fait ? » : le texte reste caché jusqu'au clic sur la question */
.about summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .6rem; }
.about summary::-webkit-details-marker { display: none; }
.about summary::after { content: "+"; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--pink); transition: transform .2s; }
.about[open] > summary::after { transform: rotate(45deg); }
.about summary:hover h2 { color: var(--pink); }
.about[open] > div { margin-top: 1.5rem; }
.about p { margin: 0 0 1rem; max-width: 60ch; }

/* ---------- agenda ---------- */
.agenda { list-style: none; margin: 0 0 4rem; padding: 0; border-top: 3px solid var(--ink); }
.agenda li {
  display: grid; gap: .25rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--ink);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 52rem) { .agenda li { grid-template-columns: 9rem minmax(0, 1fr) 14rem 8rem; align-items: baseline; } }
.agenda .d { font-family: var(--display); font-size: 2.8rem; line-height: 1; }
.agenda .d span { display: block; font-family: var(--body); font-size: .4em; font-weight: 600; color: var(--muted); }
.agenda .t { font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.agenda .t em { display: block; font-style: normal; font-weight: 400; font-size: 1rem; color: var(--muted); }
.agenda .r { justify-self: start; }

/* ---------- archives ---------- */

.editions {
  display: grid; gap: 2rem; margin: 0 0 4rem; padding: 2rem 0 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  border-top: 3px solid var(--ink);
}
.editions figure { margin: 0; }
.poster {
  aspect-ratio: 3 / 4; position: relative; overflow: hidden;
  background: var(--paper); border: 2px solid var(--ink);
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
/* gif « jeu vidéo » : garde son format et ses pixels nets */
.poster-gif { aspect-ratio: auto; }
.poster-gif img { height: auto; image-rendering: pixelated; }
/* image fixe en gris au repos ; au survol, l'animation en couleurs (static/vignettes.js) */
.poster-gif img { filter: grayscale(1) contrast(1.15); transition: filter .2s; }
.edition-lien:hover .poster-gif img, .edition-lien:focus-visible .poster-gif img,
.edition-lien.en-vue .poster-gif img { filter: none; } /* en-vue : écran tactile, vignette entière à l'écran */
/* « gif_repos: calque » : l'image fixe posée sur l'animation qui tourne dessous ; là où le GIF est
   transparent, on voit bouger ce qui sort de la pose (les têtes). Au survol, le calque s'efface. */
.poster-calque { position: relative; }
.poster-calque .vignette-fixe { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .15s, filter .2s; }
.edition-lien:hover .poster-calque .vignette-fixe, .edition-lien:focus-visible .poster-calque .vignette-fixe,
.edition-lien.en-vue .poster-calque .vignette-fixe { opacity: 0; }
/* soirée hors série (bonus, co-prod…) : un bout de scotch rose */
.hors-serie {
  display: inline-block; padding: .05em .45em; background: var(--pink); color: #0d0d0c;
  font-family: var(--display); font-size: .8em; font-weight: 400; line-height: 1.2; transform: rotate(-3deg); vertical-align: .1em;
}
.editions figcaption .hors-serie { margin-bottom: .3rem; }
.poster .num {
  position: absolute; left: .1em; bottom: 0; font-family: var(--display);
  font-size: 9rem; line-height: 1; color: var(--pink); mix-blend-mode: var(--blend);
}
.poster .num + .num { color: var(--blue); transform: translate(5px, 3px); }
.editions figcaption { padding-top: .6rem; }
.editions figcaption strong { display: block; font-size: 1.15rem; }
.edition-lien { display: block; text-decoration: none; }
/*.edition-lien:hover .poster { box-shadow: 6px 6px 0 var(--pink); transform: translate(-3px, -3px); }
.edition-lien .poster { transition: transform .15s, box-shadow .15s; }*/

/* ---------- page d'une édition : volets dépliables ---------- */
.retour { position: relative; z-index: 1; margin: 1.5rem 0 0; } /* au-dessus du calque bleu du titre, qui déborde */
.retour a { text-decoration: none; }
.edition-infos { margin: 0 0 2rem; }
.volets { margin: 0 0 4rem; border-bottom: 3px solid var(--ink); }
.volets details { border-top: 3px solid var(--ink); }
.volets summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-size: clamp(2rem, 1.5rem + 2.4vw, 3.4rem); line-height: 1;
}
.volets summary::-webkit-details-marker { display: none; }
.volets summary::after { content: "+"; color: var(--pink); transition: transform .2s; }
.volets details[open] > summary::after { transform: rotate(45deg); }
.volets summary:hover { color: var(--pink); }
.volets details > :not(summary) { margin: 0 0 2rem; }
.volet-vide { color: var(--muted); }
/* affiches : pliées en trois comme un tract, posées en vrac ; un clic les déplie (static/papiers.js).
   Chaque pan montre son tiers de l'image ; les pans 2 et 3 sont repliés derrière le premier. */
.affiches {
  list-style: none; margin: 0; padding: 1.5rem .5rem 2rem; display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 2rem 3rem; perspective: 1600px;
}
.affiche {
  --l: min(100%, 21rem); width: var(--l); position: relative;
  transform: translate(var(--decale-x), var(--decale-y)) rotate(var(--penche));
  /* place des deux pans dépliés sous le premier : un pan fait largeur / ratio-pan de haut */
  margin-bottom: 0; transition: margin-bottom .5s ease-in-out .2s;
}
.affiche.ouverte { margin-bottom: calc(2 * var(--l) / var(--ratio-pan)); transition-delay: 0s; }
.affiche-plie { all: unset; display: block; width: 100%; cursor: pointer; position: relative; }
.affiche-plie:focus-visible { outline: 3px solid var(--pink); outline-offset: 6px; }
.pan { display: block; position: relative; width: 100%; aspect-ratio: var(--ratio-pan); transform-style: preserve-3d; transform-origin: top; }
.pan .pan { position: absolute; top: 100%; left: 0; }
.face, .dos { position: absolute; inset: 0; backface-visibility: hidden; }
.face { background: var(--image) no-repeat; background-size: 100% 300%; }
.pan-1 > .face { background-position: 0 0; box-shadow: 4px 6px 0 rgba(0, 0, 0, .35); }
.pan-2 > .face { background-position: 0 50%; }
.pan-3 > .face { background-position: 0 100%; }
.dos { /* le dos du papier, qu'on voit quand le pan est replié */
  transform: rotateX(180deg); background: #d9d4c7 linear-gradient(rgba(0, 0, 0, .12), transparent 40%);
}
/* replié : le pan 2 remonte derrière le 1, le 3 redescend derrière le 2 — tous empilés sur le premier tiers */
.pan-2 { transform: rotateX(-178deg); transition: transform .45s cubic-bezier(.5, 0, .3, 1) .2s; }
.pan-3 { transform: rotateX(178deg); transition: transform .45s cubic-bezier(.5, 0, .3, 1); }
.ouverte .pan-2 { transform: rotateX(0); transition-delay: 0s; }
.ouverte .pan-3 { transform: rotateX(0); transition-delay: .3s; }
/* tous les navigateurs ne rangent pas les pans en profondeur : la face imprimée d'un pan replié reste cachée
   jusqu'à ce qu'il soit à mi-course, sinon le bas de l'affiche passerait devant le haut */
.pan-2 > .face, .pan-3 > .face, .pan-3 > .dos { visibility: hidden; transition: visibility 0s .45s; }
.ouverte .pan-2 > .face { visibility: visible; transition-delay: .2s; }
.ouverte .pan-3 > .face, .ouverte .pan-3 > .dos { visibility: visible; transition-delay: .45s; }
/* l'ombre du pli s'efface en dépliant */
.pan-2 > .face::after, .pan-3 > .face::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .1));
  opacity: 1; transition: opacity .45s .2s;
}
.ouverte .pan-2 > .face::after, .ouverte .pan-3 > .face::after { opacity: 0; transition-delay: .25s; }
/* pliée : photocopie grise et grillagée ; dépliée, l'affiche reprend ses couleurs */
.face { filter: grayscale(1) contrast(1.35) brightness(.92); transition: filter .5s .25s; }
.face::before {
  content: ""; position: absolute; inset: 0; transition: opacity .5s .25s;
  background: repeating-linear-gradient(45deg, rgba(20, 20, 18, .5) 0 1px, transparent 1px 4px),
              repeating-linear-gradient(-45deg, rgba(20, 20, 18, .35) 0 1px, transparent 1px 4px);
}
.ouverte .face { filter: none; transition-delay: .55s; }
.ouverte .face::before { opacity: 0; transition-delay: .55s; }
/* « Agrandir ! », « Source ! » : des bouts de bande noire collés sous le coin de l'affiche, une fois dépliée.
   margin-top en % = en largeur de l'affiche : on saute pile la hauteur des deux pans dépliés */
.affiche-outils {
  position: absolute; z-index: 2; top: 100%; right: -.6rem; margin-top: calc(200% / var(--ratio-pan) - .4rem);
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem .4rem;
}
.affiche-outil {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem .3rem .45rem;
  background: #0d0d0c; color: #f4f2ec; text-decoration: none; font-family: var(--display); font-size: 1.35rem; line-height: 1;
  transform: rotate(-5deg) scale(.6); box-shadow: 3px 3px 0 var(--pink);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1), visibility 0s .25s;
}
.affiche-outil + .affiche-outil { --penche-outil: 3deg; box-shadow: 3px 3px 0 var(--blue); }
.affiche:nth-child(even) .affiche-outil { box-shadow: 3px 3px 0 var(--blue); }
.affiche:nth-child(even) .affiche-outil + .affiche-outil { box-shadow: 3px 3px 0 var(--pink); }
.ouverte .affiche-outil { opacity: 1; visibility: visible; transform: rotate(var(--penche-outil, -5deg)); transition-delay: .8s; }
.ouverte .affiche-outil + .affiche-outil { transition-delay: .95s; }
.affiche-outil:hover { background: var(--pink); color: #0d0d0c; }
/* la source de l'édition : un seul bout de bande, posé à côté des affiches, toujours là */
.affiches-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; }
.affiches-zone .affiches { flex: 0 1 47rem; min-width: 0; } /* place pour deux affiches ; la source à droite, ou dessous sur téléphone */
.affiches-source { /* même matière que les fiches d'artistes : papiers gris arrachés, grillagés, texte blanc */
  opacity: 1; visibility: visible; transform: rotate(6deg); align-self: center; margin: 0 0 2rem 3.5rem;
  position: relative; isolation: isolate; padding: 1.1rem 1.4rem 1.1rem 1.1rem; font-size: 1.5rem; background: none; box-shadow: none;
  text-shadow: 0 0 3px #111, 2px 2px 0 #0d0d0c; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .4));
}
.affiches-source:hover { background: none; color: #f4f2ec; filter: drop-shadow(4px 5px 0 var(--blue)); }
.affiches-source:hover .papier-fond { filter: url(#encre-rose); }
.affiches-source svg:not(.papier-fond) { filter: drop-shadow(1px 1px 0 #0d0d0c); }
.affiches-posees + .affiches-source { animation: poser-source .5s cubic-bezier(.3, 1.4, .5, 1) .35s both; }
@keyframes poser-source { from { opacity: 0; transform: translateY(-40px) rotate(18deg); } }
.affiche-outil small { font-family: var(--body); font-size: .6em; opacity: .75; }
.affiche-outil svg:not(.papier-fond) { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* à l'ouverture du volet, les affiches pliées tombent sur la page, l'une après l'autre */
.affiches-posees .affiche { animation: poser .5s cubic-bezier(.3, 1.4, .5, 1) calc(var(--i) * .15s) both; }
@keyframes poser {
  from { opacity: 0; transform: translate(var(--decale-x), calc(var(--decale-y) - 40px)) rotate(calc(var(--penche) * 3)); }
}
.volet-photos { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.volet-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); }
/* line-up : par artiste, un fouillis de papiers photocopiés arrachés et collés de travers
   (façon Sniffin' Glue, ZIT), chacun grillagé à sa façon, et la description écrite par-dessus en blanc.
   Le fond est un SVG tiré par build.py (papier_svg), unique à chaque artiste. */
.papiers {
  list-style: none; margin: 0; padding: 1.5rem .5rem 1rem; display: grid; gap: 3rem 2.5rem; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  overflow: clip; overflow-clip-margin: 1rem; /* les papiers qui dépassent ne font pas défiler la page */
}
.papier {
  position: relative; isolation: isolate; padding: 1.6rem 1.4rem 1.8rem;
  color: #f4f2ec; text-shadow: 0 0 3px #111, 0 0 1px #111;
  transform: translate(var(--decale-x), calc(var(--decale-y) + var(--survol, 0px))) rotate(var(--penche));
  filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, .4));
}
.papier-fond { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; }
.papier-nom {
  margin: 0 0 .3rem -.2rem; font-family: var(--display); font-weight: 400; line-height: .95;
  font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.7rem); transform: rotate(var(--titre)); transform-origin: left;
  text-shadow: 3px 3px 0 #0d0d0c;
}
.papier-insta { /* bout de bande noire collée, en machine à écrire */
  display: inline-block; margin: .2rem 0 .1rem; padding: .1rem .45rem; background: #0d0d0c; color: #f4f2ec;
  font-weight: 700; text-decoration: none; text-shadow: none; transform: rotate(calc(var(--titre) * -.7));
}
.papier-insta:hover { background: var(--pink); color: #0d0d0c; }
.papier-accroche { margin: .5rem 0 0; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.papier p:not(.papier-accroche) { margin: .8rem 0 0; font-size: .95rem; line-height: 1.5; }
.papier-trait { border: 0; border-top: 2px dashed currentColor; margin: 1.1rem 25%; opacity: .7; transform: rotate(-2deg); }
/* fermé : rien que le nom ; ouvert (static/papiers.js) : le papier se déplie et ce qui est sous le nom
   apparaît trait de feutre par trait de feutre, en zigzag (masque animé par le script) */
.papier { cursor: pointer; }
.papier-ouvrir {
  all: unset; cursor: pointer; display: inline-block;
  font: inherit; color: inherit; text-shadow: inherit;
}
.papier-ouvrir:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.papier-ouvrir::after { content: " +"; font-family: var(--body); font-size: .5em; vertical-align: middle; color: var(--pink); text-shadow: none; }
.ouvert .papier-ouvrir::after { content: " ×"; }
.papier-corps { display: none; }
.ouvert .papier-corps { display: block; }
/* au survol : le papier passe à l'encre rose, ombre bleue (comme le titre mal calé) ; une fiche sur deux l'inverse */
.papier-encres { position: absolute; }
.papier { transition: transform .15s ease-out; }
@media (hover: hover) {
  .papier:hover, .papier:has(:focus-visible) { --survol: -3px; filter: drop-shadow(6px 8px 0 var(--blue)); }
  .papier:nth-child(even):hover, .papier:nth-child(even):has(:focus-visible) { filter: drop-shadow(6px 8px 0 var(--pink)); }
  .papier:hover .papier-fond, .papier:has(:focus-visible) .papier-fond { filter: url(#encre-rose); }
  .papier:nth-child(even):hover .papier-fond, .papier:nth-child(even):has(:focus-visible) .papier-fond { filter: url(#encre-bleue); }
  .papier:hover .papier-ouvrir::after, .papier:has(:focus-visible) .papier-ouvrir::after { color: #fff; }
}
/* à l'ouverture du volet, les noms s'écrivent de gauche à droite, l'un après l'autre */
.noms-ecrits .papier-nom { animation: craie-nom .8s cubic-bezier(.5, 0, .3, 1) calc(var(--i) * .25s) both; }
@keyframes craie-nom {
  from { clip-path: inset(-30% 100% -30% -10%); text-shadow: 0 0 8px #fff; }
  to { clip-path: inset(-30% -10% -30% -10%); }
}
.volet-credits { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .4rem 1.5rem; }
.volet-credits dt { font-weight: 700; }
.volet-credits dd { margin: 0; grid-column: 2; }
.volet-liens { list-style: none; padding: 0; }
.volet-liens li { padding: .5rem 0; border-bottom: 1px solid var(--ink); }
.volet-liens img { width: 6rem; display: inline-block; vertical-align: middle; margin-right: 1rem; border: 2px solid var(--ink); }

/* ---------- pied ---------- */
footer {
  border-top: 3px solid var(--ink); padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .95rem;
}
footer p { margin: 0; }

/* ---------- le policier : change la police des titres ---------- */
.policier {
  position: fixed; z-index: 10;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 4.25rem; height: 4.25rem; padding: .2rem;
  border: 3px solid var(--ink); border-radius: 50%;
  background: var(--yellow); box-shadow: 4px 4px 0 var(--pink);
  cursor: pointer;
}
.policier > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.policier .p-tete { fill: #fff3e6; stroke: #1d1d1b; stroke-width: 2.5; }
.policier .p-ink { fill: #1d1d1b; }
.policier .p-joue { fill: var(--pink); opacity: .55; }
.policier .p-nez { fill: var(--pink); }
.policier .p-casquette { fill: var(--blue); stroke: #1d1d1b; stroke-width: 2.5; }
.policier .p-badge { fill: var(--yellow); stroke: #1d1d1b; stroke-width: 1.2; }
.policier:hover > svg, .policier:focus-visible > svg { animation: hoche .5s ease-in-out; }
.policier:hover { box-shadow: 2px 2px 0 var(--blue); transform: translate(2px, 2px); }
.policier.siffle > svg { animation: siffle .70s ease-in-out; }
/* nuage « Police » au clic, qui part en poussière — 0,85 s, transform et opacity seulement */
.nuage { position: absolute; right: 45%; bottom: 90%; width: 8.5rem; pointer-events: none; }
.nuage svg {
  display: block; width: 100%; overflow: visible; transform-origin: 85% 100%;
  animation: nuage-pop .85s cubic-bezier(.2, .8, .3, 1) forwards;
}
.nuage path, .nuage circle { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.nuage text { font-family: var(--display); font-size: 25px; text-anchor: middle; fill: var(--ink); }
.nuage i {
  position: absolute; left: var(--x); top: var(--y); width: var(--t); height: var(--t);
  margin: calc(var(--t) / -2); border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink); opacity: 0;
  animation: poussiere .45s ease-out var(--d) forwards;
}
.nuage i:nth-child(3n) { background: var(--pink); border-color: var(--pink); }
@keyframes nuage-pop {
  0% { opacity: 0; transform: translateY(8px) scale(.3); }
  18% { opacity: 1; transform: scale(1.08); }
  30%, 42% { opacity: 1; transform: scale(1); }
  62%, 100% { opacity: 0; transform: scale(1.18); }
}
@keyframes poussiere {
  0% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); }
}
@keyframes hoche { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 70% { transform: rotate(6deg); } }
@keyframes siffle {
  0%, 100% { transform: none; }
  20% { transform: translateY(-6px) rotate(-12deg) scale(1.08); }
  45% { transform: translateY(-3px) rotate(10deg); }
  70% { transform: rotate(-5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .poster-calque .vignette-anim { visibility: hidden; }
  .edition-lien .poster-calque .vignette-fixe { opacity: 1; }
  .affiche, .pan-2, .pan-3, .ouverte .pan-2, .ouverte .pan-3, .face, .dos, .face::before, .face::after, .affiche-outil { transition: none !important; }
  .misreg .layer-blue, .btn, .edition-lien .poster, .volets summary::after { transition: none; }
  .policier > svg, .policier.siffle > svg { animation: none !important; }
  .nuage { display: none; }
}

/* ---------- guide (onglet Doc, mode dev uniquement : docs/guide.md) ---------- */
.doc-avant { color: var(--muted); margin: 0 0 2rem; }
.doc { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); margin-bottom: 4rem; }
@media (min-width: 60rem) { .doc { grid-template-columns: 15rem minmax(0, 1fr); } }
.doc-sommaire { font: 600 .95rem/1.4 system-ui, sans-serif; }
@media (min-width: 60rem) { .doc-cote { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; } }
.doc-recherche { margin: 0 0 1.2rem; font: 400 .95rem/1.4 system-ui, sans-serif; }
.doc-recherche input { width: 100%; font: inherit; padding: .5rem .7rem; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--pink); outline: none; }
.doc-recherche input:focus { box-shadow: 3px 3px 0 var(--blue); }
.doc-compte { margin: .4rem 0 0; color: var(--muted); font-size: .85rem; }
.doc-compte:empty { display: none; }
.doc-resultats { list-style: none; margin: .5rem 0 0; padding: 0; }
.doc-resultats a { display: block; padding: .45rem .5rem; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
.doc-resultats a:hover, .doc-resultats a:focus-visible { background: color-mix(in srgb, var(--pink) 15%, transparent); }
.doc-resultats small { display: block; color: var(--pink); font-weight: 600; font-size: .78rem; margin-bottom: .15rem; }
.doc-resultats mark, .doc-texte mark { background: var(--yellow); color: #1d1d1b; padding: 0 .1em; }
/* le passage choisi dans les résultats : surligné un instant */
.doc-ici { animation: doc-ici 2.2s ease-out; }
@keyframes doc-ici { 0%, 40% { background: color-mix(in srgb, var(--yellow) 45%, transparent); } 100% { background: transparent; } }
.doc-sommaire ul { list-style: none; margin: 0; padding: 0; }
.doc-sommaire ul ul { padding-left: .9rem; font-weight: 400; }
.doc-sommaire li { margin: .3rem 0; }
.doc-sommaire a { text-decoration: none; }
.doc-sommaire a:hover { color: var(--pink); text-decoration: underline; }
.doc-texte { max-width: 52rem; font: 400 1.05rem/1.65 system-ui, sans-serif; }
.doc-texte h1 { display: none; } /* le titre est déjà en haut de la page */
.doc-texte h2 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.1;
  margin: 3rem 0 1rem; padding-top: 1rem; border-top: 3px solid var(--ink); }
.doc-texte h2:first-of-type { margin-top: 0; }
.doc-texte h3 { font-size: 1.25rem; margin: 2rem 0 .6rem; color: var(--pink); }
.doc-texte code { font: .92em/1.4 ui-monospace, Consolas, monospace; background: color-mix(in srgb, var(--ink) 9%, transparent);
  padding: .1em .35em; border-radius: 3px; }
.doc-texte pre { overflow-x: auto; padding: .9rem 1rem; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--blue);
  background: color-mix(in srgb, var(--ink) 6%, var(--paper)); }
.doc-texte pre code { background: none; padding: 0; font-size: .88rem; }
.doc-texte blockquote { margin: 1.2rem 0; padding: .6rem 1rem; border-left: 5px solid var(--yellow);
  background: color-mix(in srgb, var(--yellow) 12%, transparent); }
.doc-texte blockquote p { margin: .3rem 0; }
.doc-texte table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.doc-texte th, .doc-texte td { text-align: left; vertical-align: top; padding: .45rem .7rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.doc-texte th { border-bottom: 2px solid var(--ink); }
.doc-texte a { color: var(--blue); }
.doc-schema { margin: 1rem 0 1.5rem; color: var(--ink); }
.doc-schema svg { width: 100%; height: auto; max-width: 760px; font-family: system-ui, sans-serif; }
.doc-schema .rose { stroke: var(--pink); }
.doc-schema .bleu { stroke: var(--blue); }
.doc-schema .gris { fill: var(--muted); }
