/* Reach Adz v23 — css/atelier21.css : « La planche de tournage », la salle 2 de l'accueil (L'atelier).
   Les coulisses des tournages en tirages instantanés (format 3:4) scotchés sur la planche de l'atelier, un peu de travers,
   la légende au feutre dans la marge du bas. Rien ne se fige : la planche défile avec la page (v21.1–v22 : la salle se
   figeait le temps qu'on longe le mur ; l'utilisateur, 17/11 : « trop long, comme si ça beuguait »).
   Balisage : _outils/atelier21.py ; gestes : js/atelier21.js (.est-actif : le tirage qu'on regarde ; .cl--joue : sa vidéo
   tourne). Arrivée : la planche reçoit .est-vu (data-reveal, js/site.js) et les tirages s'y posent un à un.
   Mouvement : transform et opacity seulement ; les ombres sont posées une fois, jamais animées. */

.ac-coulisses { overflow: clip; }
.cl { position: relative; display: grid; gap: clamp(26px, 3.4vw, 48px); }
.cl__tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 64px; width: 100%; }
.cl__tete .plaque { margin: 0; }
.cl__titre { display: flex; align-items: center; gap: .32em; margin: 0; color: #fff; text-wrap: balance; }

/* -- Le clap, devant « Moteur… » : il claque une fois quand le titre arrive --------------------------------------- */
.cl__clap { position: relative; flex: none; width: .9em; height: .74em; margin-right: .08em; translate: 0 .04em; }
.cl__clap::before, .cl__clap::after { content: ""; position: absolute; left: 0; right: 0; border-radius: .06em; }
.cl__clap::after { /* l'ardoise */
  bottom: 0; height: .5em; background: linear-gradient(#fff 0 0) 0 0 / 100% .14em no-repeat, #1B2F52;
  box-shadow: inset 0 0 0 .045em rgb(255 255 255 / .9);
}
.cl__clap::before { /* la claquette rayée */
  top: 0; height: .18em; transform-origin: .04em 100%;
  background: repeating-linear-gradient(-55deg, #fff 0 .11em, #0D203F .11em .22em);
  box-shadow: 0 0 0 .04em #fff;
}
@media (prefers-reduced-motion: no-preference) {
  html.js .cl__titre:not(.est-vu):not(:has(.est-vu)) .cl__clap::before { rotate: -26deg; }
  html.js .cl__clap::before { transition: rotate 260ms cubic-bezier(.6, 0, .9, .4) 380ms; }
}

/* -- La planche : la grille de découpe, à peine, et un halo ----------------------------------------------------- */
.cl__planche-wrap { position: relative; display: grid; gap: clamp(26px, 3vw, 40px); }
.cl__planche-wrap::before {
  content: ""; position: absolute; z-index: 0; inset: -6% -4% 18%; pointer-events: none;
  background:
    radial-gradient(closest-side, rgb(128 242 255 / .1), rgb(128 242 255 / 0)),
    linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 30px 30px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
          mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
.cl__planche {
  position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-start;
  margin: 0; padding: 22px 0 34px; list-style: none;
}

/* -- Un tirage ------------------------------------------------------------------------------------------------- */
.cl__tirage {
  --y: var(--yb, 0px); --r: 0deg; --lift: 0px; --rot: var(--r); --sc: 1;
  position: relative; z-index: 1; flex: 0 1 clamp(168px, 15.2vw, 224px); margin-inline: -5px;
  transform: translate3d(0, calc(var(--y) + var(--lift)), 0) rotate(var(--rot)) scale(var(--sc));
  transition: transform 520ms cubic-bezier(.2, .9, .25, 1.12);
}
.cl__fig {
  position: relative; display: grid; margin: 0; padding: 9px 9px 0; border-radius: 3px; background: #FBFAF6;
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgb(0 0 0 / .28), 0 26px 44px -22px rgb(0 0 0 / .8);
}
.cl__photo { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 1px; background: #0B1530; }
.cl__photo::after { /* le brillant du papier photo */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(128deg, rgb(255 255 255 / .2), rgb(255 255 255 / 0) 34%), linear-gradient(0deg, rgb(13 32 63 / .16), transparent 30%);
}
.cl__affiche, .cl__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.cl__video { z-index: 1; opacity: 0; transition: opacity 300ms linear; }
.cl__tirage.cl--joue .cl__video { opacity: 1; }

/* la légende, au feutre, dans la marge blanche */
.cl__legende { display: grid; justify-items: center; gap: 1px; padding: 9px 4px 11px; text-align: center; }
.cl__legende b { font: 700 clamp(21px, 18px + .35vw, 25px)/1 var(--main); color: #0D203F; rotate: -1.5deg; letter-spacing: .005em; }
.cl__legende span {
  display: inline-flex; align-items: center; gap: 6px; font: 650 10.5px/1.2 var(--corps); letter-spacing: .08em; text-transform: uppercase;
  color: rgb(13 32 63 / .55); font-variant-numeric: tabular-nums;
}
.cl__legende span::before { /* la puce de clap */
  content: ""; flex: none; width: 13px; height: 10px; border-radius: 2px;
  background: linear-gradient(#0D203F 0 0) 0 100% / 100% 6px no-repeat,
              repeating-linear-gradient(-45deg, #0D203F 0 2.5px, transparent 2.5px 5px) 0 0 / 100% 3px no-repeat;
  opacity: .8;
}

/* le scotch : washi cyan un tirage sur deux, papier crème l'autre ; bords déchirés en zigzag */
.cl__scotch {
  position: absolute; z-index: 3; top: -11px; left: 50%; width: 74px; height: 22px; translate: -50% 0; rotate: calc(var(--r) * -1.4 + 2deg);
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .16) 0 5px, transparent 5px 10px), rgb(128 242 255 / .62);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 10%, 96% 0, 100% 8%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%);
}
.cl__tirage:nth-child(even) .cl__scotch { background: rgb(245 236 210 / .82); width: 64px; rotate: calc(var(--r) * -1.2 - 3deg); }

/* le tirage qu'on regarde : il se redresse et s'avance */
.cl__tirage.est-actif { --lift: -14px; --rot: 0deg; --sc: 1.07; z-index: 3; }

/* l'arrivée : les tirages se posent sur la planche, un à un */
@media (prefers-reduced-motion: no-preference) {
  html.js .cl__planche:not(.est-vu) .cl__tirage { opacity: 0; }
  html.js .cl__planche.est-vu .cl__tirage { animation: cl-pose 760ms cubic-bezier(.2, .85, .25, 1.12) backwards; animation-delay: calc(var(--i) * 85ms); }
}
@keyframes cl-pose {
  from { opacity: 0; transform: translate3d(0, calc(var(--y) - 54px), 0) rotate(calc(var(--r) * 3.2)) scale(1.1); }
  55% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cl__tirage, .cl__video { transition: none; }
}

/* -- La fin : après la prise, le montage ------------------------------------------------------------------------ */
.cl__fin { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px; }
.cl__fin-main { display: flex; align-items: center; gap: 4px; }
.cl__fin-main .main { margin: 0; max-width: none; }
.cl__fin-main .trait { width: 70px; translate: 0 6px; }
.cl__fin-lien { color: #fff; }

/* -- Tablette : trois colonnes ---------------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .cl__planche { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 18px; justify-items: center; padding-top: 18px; }
  .cl__tirage { width: 100%; max-width: 240px; margin: 0; --y: 0px; }
  .cl__tirage:nth-child(3n + 2) { --y: 26px; }
}
/* -- Téléphone : deux colonnes décalées, quatre tirages ---------------------------------------------------------- */
@media (max-width: 759.98px) {
  [data-cl-tel="non"] { display: none !important; }
  .cl { gap: 22px; }
  .cl__tete { gap: 10px; }
  .ac-coulisses .cl__titre { font-size: clamp(26px, 7.4vw, 32px); }
  .cl__planche { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; padding: 16px 4px 30px; }
  .cl__tirage { max-width: none; --y: 0px; }
  .cl__tirage:nth-child(3n + 2) { --y: 0px; }
  .cl__tirage:nth-child(even of :not([data-cl-tel="non"])) { --y: 34px; }
  .cl__fig { padding: 7px 7px 0; }
  .cl__legende { padding: 7px 2px 9px; }
  .cl__legende b { font-size: 21px; }
  .cl__legende span { font-size: 9.5px; letter-spacing: .06em; }
  .cl__scotch { width: 58px; height: 19px; top: -9px; }
  .cl__tirage:nth-child(even) .cl__scotch { width: 52px; }
  .cl__tirage.est-actif { --lift: -6px; --sc: 1.04; }
  .cl__fin { flex-direction: column; gap: 14px; }
  .cl__fin-main .trait { display: none; }
}
