/* Page OST, sous le diptyque (22/11/2026) : texte de présentation puis 4 « fiches de prêt » de
   vidéoclub, une par catégorie (masterclass, concerts, résidences, cirque/danse/mode). Chaque fiche
   est imprimée dans l'encre de sa catégorie (--c), remplie à la main (Kalam, stylo bille ou feutre),
   une ligne par date avec son tampon encreur (rouge, violet, bleu, noir) ; elle sort d'une pochette
   kraft « Soyez sympa, rembobinez ! » et remonte un peu au survol. Les cassettes se lancent depuis une
   pastille fluo en étoile (« ▶ la K7 »), comme les prix des vidéoclubs.
   Historique : magazine de programmes, puis 31 petites fiches ; ni l'un ni l'autre retenus par Maxime.
   HTML : prototype/ost.html (section #programme) ; boutons « ▶ La cassette » : view-ost.js (data-tape). */

/* ---------- Invitation à descendre (comme « Presse » sur l'accueil) ---------- */
.ost-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;
}
.ost-cue span { display: inline-block; animation: ost-cue 1.8s ease-in-out infinite; }
@keyframes ost-cue { 50% { translate: 0 3px; } }
.ost-cue.is-gone { opacity: 0; translate: -50% 10px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ost-cue span { animation: none; } }

/* ---------- La section ---------- */
.prog {
  --wall: #efedf0; --ink: #1c1c1e; --ink-dim: #6e6e73;
  background: var(--wall); color: var(--ink);
  padding: 72px clamp(16px, 4vw, 56px) 96px;
  scroll-margin-top: 40px;
}
.prog-intro {
  max-width: 1240px; margin: 0 auto 40px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px 48px; align-items: start;
}
.prog-title {
  margin: 0; font: 600 clamp(34px, 4.6vw, 60px)/.98 var(--font-titres, "Josefin Sans", sans-serif);
  letter-spacing: .05em; text-transform: uppercase; text-wrap: balance;
}
.prog-lede { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.prog-lede p { margin: 0 0 .8em; }
.prog-lede p + p { color: var(--ink-dim); font-size: 15px; }
.prog-lede kbd {
  font: 600 .85em/1 "Familjen Grotesk", system-ui, sans-serif; padding: 2px 6px 1px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.2); border-bottom-width: 2px; background: #fff;
}

/* ---------- Compteurs (compteur de bande du magnétoscope) ---------- */
.prog-counters {
  grid-column: 1 / -1; list-style: none; margin: 18px 0 0; padding: 14px 18px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  /* façade du magnétoscope : plastique noir mat, une fenêtre fumée par compteur */
  background: linear-gradient(180deg, #2a2c2e, #1b1c1e 60%, #141516);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 -2px 0 rgba(0,0,0,.4) inset, 0 14px 28px -18px rgba(0,0,0,.55);
}
.prog-counters li {
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  font: 600 11px/1.3 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: #a9aeb2;
}
.prog-counters li + li { border-left: 1px solid rgba(255,255,255,.08); }
.vcr-count {
  flex: none;
  padding: 6px 10px 3px; border-radius: 4px;
  background: linear-gradient(180deg, #060908, #0f1412);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.07);
  font: 400 clamp(30px, 3.1vw, 42px)/1 "VT323", monospace; letter-spacing: .08em;
  color: #7ff6e4; text-shadow: 0 0 6px rgba(127, 246, 228, .65), 0 0 14px rgba(127, 246, 228, .25);
  font-variant-numeric: tabular-nums;
}

/* ---------- Textures (SVG en ligne) ---------- */
.prog {
  /* grain du papier */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* encre usée des tampons : des trous là où le bruit est clair */
  --worn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='44'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 0 0 0 2.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Les 4 fiches ---------- */
.prog-fiches {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start;
}
/* deux colonnes indépendantes : (1) masterclass + (3) résidences | (2) concerts + (4) cirque */
.fiche-col { display: flex; flex-direction: column; gap: 76px; }
.fiche-col--b { padding-top: 54px; }
.fiche { position: relative; padding-bottom: 18px; rotate: var(--tilt, 0deg); }
.fiche[aria-labelledby="ch-mc"]     { --tilt: -.7deg; }
.fiche[aria-labelledby="ch-live"]   { --tilt: .6deg; }
.fiche[aria-labelledby="ch-res"]    { --tilt: .5deg; }
.fiche[aria-labelledby="ch-cirque"] { --tilt: -.5deg; }
/* fiches écrites dans l'admin (29/11/2026, OstProgramme) : inclinaison donnée par leur rang, remise à 0 sur téléphone */
.fiche[style*="--fiche-tilt"] { --tilt: var(--fiche-tilt); }

.fiche-card {
  --ink-print: var(--c);
  position: relative; z-index: 1;
  padding: 26px 24px 118px;
  background: var(--grain), #fbf7ea;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 14px 30px -18px rgba(0,0,0,.45);
  color: #1d2a55;
  transition: translate .35s cubic-bezier(.2,.8,.2,1);
}
.fiche:hover .fiche-card, .fiche:focus-within .fiche-card { translate: 0 -10px; }
/* morceau de ruban adhésif */
.fiche-card::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 118px; height: 30px; translate: -50% 0; rotate: -2.5deg;
  background: rgba(250, 248, 236, .62);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  clip-path: polygon(0 6%, 4% 0, 8% 7%, 12% 1%, 100% 0, 97% 50%, 100% 100%, 92% 94%, 88% 100%, 0 100%, 3% 48%);
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}

/* en-tête imprimé */
.fiche-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: end;
  padding-bottom: 12px;
}
.fiche-club {
  grid-column: 1 / -1; margin: 0;
  display: flex; justify-content: space-between; gap: 12px;
  font: 700 11px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-print);
}
.fiche-club span { font-weight: 500; letter-spacing: .16em; }
.fiche-head h3 {
  margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  font: 700 clamp(24px, 2.4vw, 31px)/1.1 "Kalam", cursive; color: #1d2a55;
  rotate: -.6deg;
}
.fiche-head h3::before {
  content: attr(data-champ); rotate: .6deg; flex-basis: 100%;   /* « Titre », écrit dans ost.html (data-champ) pour être traduit */
  font: 600 10.5px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-print);
}
.fiche-ref {
  order: 2; rotate: .6deg;
  font: 600 10.5px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-print); border: 1.5px solid currentColor; padding: 4px 6px 3px; border-radius: 2px;
}
/* code-barres de la cassette */
.fiche-code {
  width: 112px; height: 34px; align-self: center;
  background:
    linear-gradient(#fbf7ea, #fbf7ea) 0 100% / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, #1b1a17 0 2px, transparent 2px 4px, #1b1a17 4px 5px, transparent 5px 8px, #1b1a17 8px 11px, transparent 11px 12px, #1b1a17 12px 13px, transparent 13px 16px);
  opacity: .85;
}

/* colonnes imprimées */
.fiche-cols, .fiche-rows li {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; column-gap: 16px;
  background: linear-gradient(90deg, transparent 139px, color-mix(in srgb, var(--ink-print) 45%, transparent) 139px 140px, transparent 140px);
}
.fiche-cols {
  margin: 0; padding: 6px 0 5px;
  border-top: 2.5px solid var(--ink-print); border-bottom: 1px solid var(--ink-print);
  font: 600 10px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-print);
}
.fiche-cols span + span { grid-column: 2 / -1; padding-left: 2px; }
.fiche-rows { list-style: none; margin: 0; padding: 0; }
.fiche-rows li {
  padding: 13px 0 12px; align-items: start;
  border-bottom: 1px solid color-mix(in srgb, var(--ink-print) 30%, transparent);
}

/* le tampon de la date */
.fiche-rows time {
  justify-self: start; margin-top: 1px;
  padding: 5px 7px 3px; border: 2px solid currentColor; border-radius: 3px;
  font: 400 14.5px/1 "Special Elite", monospace; letter-spacing: .05em; white-space: nowrap; font-weight: 700;
  color: var(--stamp);
  rotate: var(--s-rot, -3deg); translate: var(--s-x, 0) 0;
  -webkit-mask: var(--worn) 0 0 / 140px 44px; mask: var(--worn) 0 0 / 140px 44px;
}
li[data-ink="red"]    { --stamp: rgba(196, 30, 38, .88); }
li[data-ink="violet"] { --stamp: rgba(102, 48, 168, .85); }
li[data-ink="blue"]   { --stamp: rgba(28, 66, 168, .85); }
li[data-ink="black"]  { --stamp: rgba(34, 32, 30, .82); }
.fiche-rows li:nth-child(3n+1) time { --s-rot: -4deg; }
.fiche-rows li:nth-child(3n+2) time { --s-rot: 2.5deg; --s-x: 6px; }
.fiche-rows li:nth-child(3n)   time { --s-rot: -1deg; --s-x: 2px; }
.fiche-rows li:nth-child(5n+2) time { -webkit-mask-position: 60px 10px; mask-position: 60px 10px; }
.fiche-rows li:nth-child(5n+4) time { -webkit-mask-position: 30px 22px; mask-position: 30px 22px; }

/* écrit à la main : stylo bille bleu ou feutre noir */
.fiche-entry { min-width: 0; }
li[data-pen="bille"]  { --pen: #1f3b8f; }
li[data-pen="feutre"] { --pen: #222125; }
.fiche-entry h4 { margin: 0; font: 700 18px/1.22 "Kalam", cursive; color: var(--pen); }
.fiche-where { margin: 1px 0 0; font: 400 15.5px/1.3 "Kalam", cursive; color: var(--pen); opacity: .92; }
.fiche-desc { margin: 4px 0 0; font: 400 15px/1.42 "Kalam", cursive; color: var(--pen); opacity: .82; }
.fiche-acts { margin: 4px 0 0; }
.fiche-news {
  font: 400 14px/1 "Kalam", cursive; color: var(--pen);
  text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--pen) 40%, transparent); text-underline-offset: 3px;
}
.fiche-news:hover, .fiche-news:focus-visible { text-decoration-color: currentColor; }

/* pastille fluo en étoile, comme les prix des vidéoclubs */
.fiche-tape {
  position: relative; align-self: center;
  width: 68px; height: 68px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
  font: 800 11.5px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase;
  color: #1b1a17; rotate: -12deg;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.28));
  transition: rotate .25s, scale .25s;
}
.fiche-tape::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%);
}
.fiche-tape { isolation: isolate; }
.fiche-tape span { display: block; font-size: 15px; margin-bottom: -2px; }
.fiche-rows li:nth-child(even) .fiche-tape { rotate: 9deg; }
.fiche-rows li:nth-child(even) .fiche-tape::before { background: #ff7ab8; }
.fiche-rows li:nth-child(3n) .fiche-tape::before { background: #7dfc6a; }
.fiche-tape:hover, .fiche-tape:focus-visible { rotate: 0deg; scale: 1.1; }
.fiche-tape:focus-visible { outline: 2px solid #1b1a17; outline-offset: 2px; border-radius: 50%; }

/* pochette kraft collée dans la jaquette : la fiche en sort */
.fiche-pocket {
  position: absolute; z-index: 2; left: -8px; right: -8px; bottom: 0; height: 104px;
  background: var(--grain), linear-gradient(180deg, #cfae74, #c19c5e);
  border-radius: 2px 2px 3px 3px;
  box-shadow: 0 -1px 0 rgba(255,255,255,.35) inset, 0 6px 16px -10px rgba(0,0,0,.5), 0 -3px 8px -6px rgba(0,0,0,.35);
  -webkit-mask: radial-gradient(circle 30px at 50% 0, transparent 97%, #000 100%);
  mask: radial-gradient(circle 30px at 50% 0, transparent 97%, #000 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20px;
  rotate: .5deg;
}
.fiche-pocket p {
  margin: 0; padding: 6px 14px 5px; border: 1.5px solid rgba(70, 44, 14, .6); border-radius: 2px;
  font: 700 12px/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(70, 44, 14, .78);
}

@media (max-width: 1000px) {
  .prog-intro { grid-template-columns: 1fr; }
  .prog-fiches { display: flex; flex-direction: column; max-width: 720px; gap: 64px; }
  .fiche-col { display: contents; }
  .fiche[aria-labelledby="ch-mc"] { order: 1; }
  .fiche[aria-labelledby="ch-live"] { order: 2; }
  .fiche[aria-labelledby="ch-res"] { order: 3; }
  .fiche[aria-labelledby="ch-cirque"] { order: 4; }
}
@media (max-width: 760px) {
  .prog { padding-top: 48px; padding-bottom: 72px; }
  .prog-lede { font-size: 16px; }
  .fiche[aria-labelledby] { --tilt: 0deg; }
  .prog-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; padding: 14px 6px; }
  .prog-counters li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 10px; }
  .prog-counters li:nth-child(3) { border-left: 0; }
  .fiche-card { padding: 22px 14px 104px; }
  .fiche-code { width: 72px; }
  .fiche-cols, .fiche-rows li {
    grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px;
    background: linear-gradient(90deg, transparent 103px, color-mix(in srgb, var(--ink-print) 45%, transparent) 103px 104px, transparent 104px);
  }
  .fiche-cols span + span { grid-column: 2; }
  .fiche-rows li { grid-template-areas: "date entry" "tape entry"; grid-template-rows: auto 1fr; }
  .fiche-rows time { grid-area: date; font-size: 11.5px; padding: 4px 5px 2px; }
  .fiche-entry { grid-area: entry; }
  .fiche-tape { grid-area: tape; align-self: start; justify-self: center; margin-top: 10px; width: 58px; height: 58px; font-size: 10.5px; }
  .fiche-pocket { left: -4px; right: -4px; height: 92px; }
  .fiche-pocket p { font-size: 10.5px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) { .fiche-card, .fiche-tape { transition: none; } }
