/* H&C — page Classes digitales (/ressources/classes-digitales/). Se charge après fiche.css et apropos.css
   (`.btn--paper`, `.ex`, `.apf*`).
   2026-10-15 — l'utilisateur a choisi la piste 6 « La cinémathèque » parmi les six
   (planche : captures/ressources/planche-pistes.jpg).

   1. Hero · `.cld` : nuit + projecteur sur rail ; bandeau « Prochaine classe, gratuite » + S'inscrire, titre, une phrase,
      carte jaune des replays (59 000 F / an), rail de cinq affiches. L'affiche survolée (ou la première) est éclairée ;
      classes.js règle --rig-x / --rig-tilt pour que le projecteur pivote vers elle.
   2. Prochaines classes · `.clx` : la classe en billet bleu nuit + « Les suivantes » (lettre).
   3. Comment ça marche · `.cls` : quatre temps à photos sur un fil jaune (mur clair).
   4. Rideau final `.apf` (apropos.css) puis le pied de page.

   ≤ 1000 px : une colonne, les affiches défilent ; ≤ 760 px : bandeau en carte ; ≤ 560 px : étapes en lignes photo + texte. */

:root { --cl-soft: #4b5569; --cl-muted: #5b6478; --cl-card: #10213a; }

/* le projecteur glisse d'une affiche à l'autre : --rig-x et --rig-tilt sont de vraies valeurs animables */
@property --rig-x { syntax: "<length-percentage>"; inherits: true; initial-value: 50%; }
@property --rig-tilt { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

/* ---------- communs ---------- */
.cld :is(a, button):focus-visible, .clx :is(a, button, input):focus-visible, .cls :is(a, button):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cld :where(ul, ol), .cls :where(ol), .clx :where(ul) { margin: 0; padding: 0; list-style: none; }

/* bouton plein sombre sur la carte jaune : le pendant du bouton jaune (pas de contour) */
.btn--ink { padding-left: 7px; background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--night); }
.btn--ink .btn__label { flex: 1; text-align: left; }
.btn--ink .btn__icon { background: var(--gold); color: var(--ink); }
.btn--ink .btn__icon svg { fill: currentColor; stroke-width: 1.4; }
.btn--ink:hover .btn__icon { background: var(--gold); transform: rotate(-10deg); }

/* ---------- 1. Hero : la cinémathèque ---------- */
.cld {
  --rig-x: 24%;
  --rig-y: 12px;
  --rig-w: 72px;
  --rig-tilt: 0deg;
  padding-top: clamp(104px, 9vw, 128px);
  padding-bottom: clamp(56px, 6vw, 96px);
  transition: --rig-x 0.6s var(--ease-out), --rig-tilt 0.6s var(--ease-out);
}
.cld .cone { --spread: 24deg; --throw: 880px; }

/* bandeau d'annonce : la prochaine classe, un seul geste */
.cld__next {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 6px 7px 6px 24px;
  border-radius: 999px;
  background: var(--cl-card);
  box-shadow: 0 18px 40px -26px rgb(0 0 0 / 0.7);
}
.cld__next p { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0; min-width: 0; font-size: 1rem; line-height: 1.35; }
.cld__next b { font-weight: 600; }
.cld__next p > span:not(.cld__dot) { color: rgb(255 255 255 / 0.72); }
.cld__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgb(226 174 12 / 0.22); }
.cld__reg { flex: none; min-height: 44px; }

.cld__top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
  gap: 28px clamp(24px, 5vw, 80px);
  margin-top: clamp(26px, 3.2vw, 44px);
}
.cld__copy { display: grid; justify-items: start; gap: 16px; min-width: 0; }
.cld__copy .fh__crumb { margin-bottom: 4px; }
.cld__h { max-width: 15ch; font-size: clamp(2.3rem, 4.1vw, 3.7rem); }
.cld .fb__lead { max-width: 44ch; }

/* carte jaune : l'abonnement aux replays */
.cld__sub {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: clamp(0px, 3.4vw, 46px);
  padding: 24px 26px 26px;
  border-radius: 28px;
  background: var(--gold);
  color: var(--ink);
}
.cld__subk { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cld__price { margin: 0; line-height: 1; }
.cld__price b { font-size: clamp(2.6rem, 3.6vw, 3.4rem); font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cld__price small { font-size: 1.125rem; font-weight: 500; }
.cld__subt { margin: 0 0 8px; max-width: 30ch; font-size: 1rem; line-height: 1.4; }

/* le rail d'affiches */
.cld__shelf { position: relative; z-index: 1; margin-top: clamp(24px, 2.6vw, 38px); }
.cld__lab { margin: 0 0 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgb(255 255 255 / 0.66); }
.cld__rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.5vw, 22px); padding-top: 12px; }
.clw { position: relative; transition: translate 0.45s var(--ease-out); }
.clw::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  box-shadow: 0 0 0 3px var(--gold), 0 0 56px rgb(226 174 12 / 0.32);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.clw.is-lit { translate: 0 -8px; }
.clw.is-lit::before { opacity: 1; }

.clp {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 22px;
  background: #14233a;
  color: #fff;
  text-decoration: none;
}
.clp img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.52) saturate(0.72); transition: filter 0.5s; }
.clw.is-lit .clp img { filter: none; }
.clp::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(11 22 38 / 0.94) 0%, rgb(11 22 38 / 0.18) 56%, rgb(11 22 38 / 0.4) 100%); }
.clp__pl { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--ink); transition: scale 0.3s var(--ease-out); }
.clp__pl svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; stroke-width: 1.4; }
.clw.is-lit .clp__pl { scale: 1.1; }
.clp__tx { position: absolute; z-index: 2; right: 14px; bottom: 14px; left: 14px; display: grid; gap: 4px; }
.clp__tx b { font-size: clamp(1rem, 1.35vw, 1.1875rem); font-weight: 500; line-height: 1.15; text-wrap: balance; }
.clp__tx span { font-size: 0.8438rem; line-height: 1.3; color: rgb(255 255 255 / 0.74); }
.clp--ex .clp__tx b { font-style: italic; font-weight: 400; color: rgb(255 255 255 / 0.82); }
.cld__ex { position: relative; z-index: 1; margin-top: clamp(20px, 2.4vw, 30px); }

/* ---------- 2. Prochaines classes ---------- */
.clx { padding-block: clamp(64px, 8vw, 120px); }
.clx__head { display: grid; justify-items: start; gap: 14px; }
.clx__row { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(28px, 4vw, 52px); }

.clx__next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 52px);
  padding: clamp(24px, 3vw, 44px);
  border-radius: 30px 30px 0 0;
  background: var(--night);
  color: #fff;
}
.clx__date { display: grid; align-content: start; justify-items: start; gap: 6px; color: var(--gold); }
.clx__date b { font-size: clamp(4rem, 7vw, 6.4rem); font-weight: 300; line-height: 0.88; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.clx__date span { font-size: 1.0625rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; }
.clx__body { min-width: 0; }
.clx__k { margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold); }
.clx__body h3 { margin: 8px 0 0; font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.clx__d { margin: 10px 0 0; max-width: 50ch; line-height: 1.5; color: rgb(255 255 255 / 0.8); }
.clx__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.clx__meta li { padding: 5px 12px; border-radius: 16px; background: rgb(255 255 255 / 0.12); font-size: 0.875rem; font-weight: 500; }
.clx__tz { margin: 16px 0 0; font-size: 0.9375rem; line-height: 1.45; color: rgb(255 255 255 / 0.7); }
.clx__tz span { font-weight: 600; color: #fff; }
.clx__btns { display: grid; justify-items: start; gap: 16px; }
.clx__more { font-weight: 500; color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* « Les suivantes » : une bande claire, la lettre en une ligne */
.clx__after {
  display: grid;
  grid-template-columns: auto minmax(0, 0.9fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
  padding: clamp(22px, 2.6vw, 34px) clamp(24px, 3vw, 44px);
  border-radius: 28px;
  background: var(--wall);
  color: var(--ink);
}
.clx__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; }
.clx__ic svg { width: 24px; height: 24px; stroke-width: 1.8; }
.clx__k--soft { color: #7a5c00; }
.clx__at { min-width: 0; }
.clx__after h3 { margin: 4px 0 0; font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 500; letter-spacing: -0.01em; }
.clx__after .clx__d { margin: 6px 0 0; color: var(--cl-soft); }
.clx__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 10px; min-width: 0; }
.clx__form label { display: block; min-width: 0; }
.clx__form input { width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; }
.clx__form input::placeholder { color: #7a8498; }
.clx__form .letter__note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--cl-muted); }

/* ---------- 3. Comment ça marche ---------- */
.cls { padding-block: clamp(64px, 8vw, 120px); }
.cls__head { display: grid; justify-items: start; gap: 14px; }
.cls__tl { --gap: clamp(18px, 2.4vw, 36px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(32px, 4.4vw, 60px); }
.cls__st { position: relative; display: grid; align-content: start; gap: 0; min-width: 0; }
.cls__k { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.cls__k i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgb(226 174 12 / 0.28); }
.cls__st:not(:last-child) .cls__k::after { content: ""; position: absolute; top: 50%; left: 24px; right: calc(var(--gap) * -1); height: 3px; translate: 0 -50%; background: var(--gold); border-radius: 2px; opacity: 0.55; z-index: 0; }
.cls__k span { position: relative; z-index: 1; padding-right: 10px; background: var(--wall); }
.cls__ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: #14233a; }
.cls__ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cls__live { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--night); color: #fff; font-size: 0.8125rem; font-weight: 600; }
.cls__live i { width: 8px; height: 8px; border-radius: 50%; background: #ff5a4d; }
.cls__st h3 { margin: 16px 0 0; font-size: clamp(1.2rem, 1.6vw, 1.4375rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.cls__st > p:not(.cls__k) { margin: 6px 0 0; max-width: 30ch; line-height: 1.5; color: var(--cl-soft); }

/* =========================================================
   Tablette et mobile
   ========================================================= */
@media (max-width: 1000px) {
  .cld { --rig-x: 70%; }
  .cld__top { grid-template-columns: minmax(0, 1fr); }
  .cld__sub { max-width: 460px; margin-top: 0; }
  /* les affiches défilent : on voit la suivante dépasser */
  .cld__shelf { margin-inline: calc(var(--pad-x) * -1); }
  .cld__lab { padding-inline: var(--pad-x); }
  .cld__rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 14px var(--pad-x) 20px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--pad-x);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .cld__rail::-webkit-scrollbar { display: none; }
  .clw { flex: 0 0 clamp(190px, 30vw, 240px); scroll-snap-align: start; }
  .clx__next { grid-template-columns: auto minmax(0, 1fr); }
  .clx__btns { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 14px 26px; }
  .clx__after { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .clx__form { grid-column: 1 / -1; }
  .cls__tl { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: clamp(28px, 4vw, 44px); }
  .cls__st:nth-child(2n) .cls__k::after { display: none; }
}
@media (max-width: 760px) {
  .cld__next { align-items: flex-start; flex-direction: column; padding: 16px 16px 14px 20px; border-radius: 26px; }
  .cld__reg { align-self: flex-start; }
  .clx__next { grid-template-columns: minmax(0, 1fr); }
  .clx__btns { grid-auto-flow: row; }
  .clx__date { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 12px; }
  .clx__date b { font-size: 3.4rem; }
  .clx__date span br { display: none; }
}
@media (max-width: 560px) {
  .cld__h { max-width: none; font-size: clamp(1.9rem, 8.6vw, 2.3rem); }
  .cld__sub { max-width: none; }
  .clw { flex-basis: min(210px, 56vw); }
  .clx__form { grid-template-columns: minmax(0, 1fr); }
  .clx__form .btn { justify-self: start; }
  .cls__tl { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .cls__st { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 14px; align-items: start; }
  .cls__k { grid-column: 1 / -1; margin-bottom: 10px; }
  .cls__k::after { display: none !important; }
  .cls__ph { grid-row: 2 / span 3; aspect-ratio: 1; border-radius: 16px; }
  .cls__live { left: 6px; bottom: 6px; padding: 3px 8px 3px 7px; font-size: 0.6875rem; }
  .cls__st h3 { margin-top: 0; }
  .cls__st > p:not(.cls__k) { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cld { transition: none; }
  .clw, .clw::before, .clp img, .clp__pl { transition: none; }
}
