/* Mur des affiches de la page Soundtracks (29/11/2026) : sous le programme, un mur de rue en béton banché, la nuit,
   éclairé par une applique ; les affiches des films y sont collées par-dessus des lambeaux d'anciennes affiches.
   Défile à l'horizontale (glisser à la souris ou au doigt, ← → au clavier). Rempli par assets/js/ost/affiches.js.
   Titre : .prog-title (ost-programme.css). */

.affiches {
  --wall: #efedf0; --ink: #1c1c1e; --ink-dim: #6e6e73;
  --mur-h: clamp(440px, 74vh, 680px);
  --poster-h: calc(var(--mur-h) * .56);
  background: var(--wall); color: var(--ink);
  padding: 24px 0 56px;
  scroll-margin-top: 40px;
}
.affiches[hidden] { display: none; }
.affiches-head {
  max-width: 1240px; margin: 0 auto 40px; padding: 0 clamp(16px, 4vw, 56px); box-sizing: content-box;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 40px;
}
.affiches-lede { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }

/* ---------- Le mur (toute la largeur) ---------- */
.mur { position: relative; height: var(--mur-h); overflow: hidden; background: #2a2622; }
.mur-scroller {
  height: 100%; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  cursor: grab; outline: none;
}
.mur-scroller::-webkit-scrollbar { display: none; }
.mur-scroller.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.mur-scroller.is-dragging .affiche { cursor: grabbing; }
.mur-scroller:focus-visible { box-shadow: inset 0 0 0 3px #f4f23a; }

/* béton banché : photo (ChatGPT, docs/ost-affiches-prompts.md), raccordée pour se répéter sans couture à
   l'horizontale, à la hauteur du mur (la bordure du trottoir en bas). Portée par la piste : elle défile avec les affiches. */
.mur-track {
  list-style: none; margin: 0; height: 100%; width: max-content; box-sizing: border-box;
  display: flex; align-items: center;
  /* en haut, la place de la lampe ; en bas, le trottoir */
  /* de chaque côté, une demi-largeur de mur moins une demi-affiche : la 1re et la dernière affiche peuvent venir sous
     la lampe comme les autres, et le mur démarre sur la 1re, centrée. Du 29 au 30/11/2026 la marge n'était que de 32 à
     88 px sur ordinateur : la 1re (LīLā) restait collée à gauche, dans le noir (Maxime). Les marges ne sont pas nues :
     affiches.js y colle des lambeaux d'anciennes affiches arrachées. */
  padding: calc(var(--mur-h) * .23) calc(50vw - var(--poster-h) * .36) calc(var(--mur-h) * .13);
  background: #8d867c url("../generated/mur-affiches-beton.webp") repeat-x 0 0 / auto 100%;
  overflow: clip;   /* les lambeaux des bords ne rallongent pas la piste */
}

/* « Défense d'afficher — loi du 29 juillet 1881 », peint au pochoir sur le béton, à moitié recouvert par les affiches
   (texte du décor : pas traduit, cf. docs/langues.md) */
.mur-track { position: relative; }
.mur-track::before {
  content: "DÉFENSE D'AFFICHER\A LOI DU 29 JUILLET 1881"; white-space: pre; text-align: center;
  position: absolute; z-index: 0; left: calc(50vw - var(--poster-h) * .9); top: 9%;
  font: 400 calc(var(--mur-h) * .12)/.95 "Bebas Neue", "Anton", sans-serif; letter-spacing: .06em;
  color: rgba(244, 238, 226, .62); rotate: -1.2deg; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.08' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.4 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.08' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.4 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

/* lumière de l'applique (multiplication : le centre garde ses couleurs, un peu chaudes ; les bords tombent dans la nuit) */
.mur-night {
  position: absolute; inset: 0; z-index: 8; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(ellipse min(46vw, 620px) 112% at 50% calc(var(--mur-h) * .17), #fff6e6 0%, #f6e2c2 28%, #a8937b 54%, #4d4037 76%, #241d18 100%);
}
.mur-lamp {
  position: absolute; z-index: 9; top: 0; left: 50%; translate: -50% 0; pointer-events: none;
  width: calc(var(--mur-h) * .19); aspect-ratio: 400 / 412;
  background: url("../generated/mur-affiches-applique.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.45));
}
/* l'ampoule allumée : halo chaud sur le béton autour et sous l'abat-jour */
.mur-lamp::after {
  content: ""; position: absolute; left: -90%; right: -90%; top: 62%; height: 150%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 18%, rgba(255, 214, 150, .55), rgba(255, 214, 150, .14) 40%, rgba(255, 214, 150, 0) 70%);
  mix-blend-mode: screen; filter: none;
}

/* ---------- Une affiche collée ---------- */
.affiche-slot {
  position: relative; flex: none;
  margin-left: calc(var(--gap, .05) * var(--mur-h));
  scroll-snap-align: center;
}
.affiche-slot:first-child { margin-left: 0; }
.affiche {
  position: relative; z-index: 2; display: block;
  height: calc(var(--poster-h) * var(--s, 1)); aspect-ratio: var(--ar, .72);
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  translate: 0 var(--dy, 0); rotate: var(--tilt, 0deg);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)) drop-shadow(0 4px 6px rgba(0,0,0,.18));
  transition: rotate .35s cubic-bezier(.3, .7, .3, 1), scale .35s cubic-bezier(.3, .7, .3, 1), filter .35s;
}
.aff-paper { position: absolute; inset: 0; overflow: hidden; background: #ece6d8; }
.aff-img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
/* papier encollé : plis et cloques (relief d'un bruit étiré), colle brillante en biais, bords un peu sales */
.aff-glue {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: url("../generated/mur-affiches-papier.webp") var(--pp, 50% 50%) / 150% auto;
  filter: contrast(2.8);                     /* la photo est en gris doux : plis et cloques bien lisibles une fois réduits */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), inset 0 0 22px rgba(60,40,20,.35);
}
.aff-glue.is-flip { scale: -1 1; }
/* coin qui se décolle : le revers du papier, replié en triangle le long de la coupe */
.aff-peel {
  position: absolute; z-index: 3; top: 0; right: 0; width: var(--peel); aspect-ratio: calc(var(--ar, .72) / .7);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  background: linear-gradient(to top right, #d6cdb9 0%, #f4efe3 55%, #fffdf6 100%);
}

/* lambeaux d'anciennes affiches arrachées, sous les affiches */
.aff-scrap {
  position: absolute; z-index: 1; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: .78;
  rotate: var(--r); pointer-events: none;
  background-color: #cfc6b4;
  background-image: url("../generated/mur-affiches-papier.webp"), var(--img, none);
  background-size: 140% auto, 260% auto; background-position: var(--pp, 50% 50%), var(--bp, 50% 50%);
  background-blend-mode: overlay, normal;
  filter: grayscale(.45) sepia(.35) brightness(.84) contrast(.95);
  opacity: .92;
}
.aff-scrap.is-blank { background-color: #e2dccd; filter: brightness(.9); opacity: .85; }

.affiche:hover, .affiche:focus-visible { rotate: 0deg; scale: 1.03; z-index: 6; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)) drop-shadow(0 14px 18px rgba(0,0,0,.35)); }
.affiche:focus-visible { outline: 3px solid #f4f23a; outline-offset: 6px; }

/* ---------- Pastille « ▶ la K7 » (au survol) et bandeau « En lecture » ---------- */
.aff-sticker {
  position: absolute; z-index: 4; right: -14px; bottom: -14px; width: 70px; height: 70px;
  display: grid; place-content: center; justify-items: center; isolation: isolate;
  font: 800 11.5px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase;
  color: #1b1a17;
  opacity: 0; scale: .5; rotate: -30deg;
  transition: opacity .2s, scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .3s;
}
.aff-sticker::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #f4f23a;
  clip-path: polygon(50% 0%, 57% 13%, 69% 4%, 72% 18%, 86% 14%, 83% 28%, 97% 31%, 88% 42%, 100% 50%, 88% 58%, 97% 69%, 83% 72%, 86% 86%, 72% 82%, 69% 96%, 57% 87%, 50% 100%, 43% 87%, 31% 96%, 28% 82%, 14% 86%, 17% 72%, 3% 69%, 12% 58%, 0% 50%, 12% 42%, 3% 31%, 17% 28%, 14% 14%, 28% 18%, 31% 4%, 43% 13%);
}
.affiche-slot:nth-child(3n+2) .aff-sticker::before { background: #ff7ab8; }
.affiche-slot:nth-child(3n) .aff-sticker::before { background: #7dfc6a; }
.aff-sticker-play { font-size: 15px; margin-bottom: 1px; }
.affiche:hover .aff-sticker, .affiche:focus-visible .aff-sticker { opacity: 1; scale: 1; rotate: -10deg; }
.affiche.is-loaded .aff-sticker { opacity: 0; }

.aff-now {
  /* bandeau qui déborde du bas de l'affiche */
  position: absolute; z-index: 4; left: 50%; bottom: -13px; translate: -50% 0; white-space: nowrap;
  display: none; align-items: center; gap: 7px; padding: 4px 9px 2px;
  background: rgba(10, 10, 12, .85); color: #fff;
  font: 400 19px/1 "VT323", monospace; letter-spacing: .06em; text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255,255,255,.45);
}
.aff-now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: aff-rec 1.2s steps(2, jump-none) infinite; }
@keyframes aff-rec { 50% { opacity: .15; } }
.affiche.is-loaded .aff-now { display: inline-flex; }

@media (max-width: 760px) {
  .affiches { --mur-h: 480px; --poster-h: calc(var(--mur-h) * .52); padding-bottom: 40px; }
  .affiches-head { margin-bottom: 28px; }
  .mur-night { background: radial-gradient(ellipse 78vw 110% at 50% calc(var(--mur-h) * .17), #fff6e6 0%, #f6e2c2 30%, #9a8670 58%, #3a3029 80%, #15110e 100%); }
  .aff-sticker { width: 58px; height: 58px; right: -8px; bottom: -10px; font-size: 10px; }
  .aff-now { font-size: 16px; }
}
/* ---------- Flèches de bord (souris seulement : au doigt, on glisse) ---------- */
.mur-side {
  position: absolute; z-index: 10; top: 0; bottom: 0; width: clamp(56px, 7vw, 110px);
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; color: rgba(255, 244, 224, .82);
  background: none; transition: opacity .3s, color .2s;
}
.mur-side--prev { left: 0; background: linear-gradient(90deg, rgba(10,8,6,.55), rgba(10,8,6,0)); }
.mur-side--next { right: 0; background: linear-gradient(270deg, rgba(10,8,6,.55), rgba(10,8,6,0)); }
.mur-side span {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  font: 300 30px/1 "Josefin Sans", system-ui, sans-serif; padding-top: 3px;
  border: 1px solid rgba(255, 244, 224, .4); background: rgba(10, 8, 6, .35);
  transition: scale .2s, background .2s;
}
.mur-side:hover span, .mur-side:focus-visible span { scale: 1.1; background: rgba(10, 8, 6, .6); color: #fff; }
.mur-side:focus-visible { outline: none; }
.mur-side:focus-visible span { outline: 2px solid #f4f23a; outline-offset: 3px; }
.mur-side[hidden] { display: grid; opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 760px) { .mur-side { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .affiche, .aff-sticker { transition: none; }
  .aff-now::before { animation: none; }
}
