/* Portfolio de Christophe Huang, version « Le viseur ».
   Le site est un écran de caméra : une bobine de plans, un viseur sur le plan en cours, les infos comme sur un moniteur.
   Sans script (ou sur téléphone), la bobine devient une simple liste de plans. Deux familles : Archivo et IBM Plex Mono. */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: 'Plex Mono'; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --noir: #000;
  --texte: #efeee9;
  --gris: #8a8984;
  --sombre: #4a4946;
  --rec: #e5322d;
  --or: #f3c34a; /* jaune doré, en petites touches seulement */
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pad: clamp(14px, 1.6vw, 24px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--noir);
  color: var(--texte);
  font-family: 'Archivo', 'Arial Narrow', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--or); color: var(--noir); }
img, video { display: block; max-width: 100%; }
h1, h2, p, dl, dd, ol { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: var(--or); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -80px; z-index: 30; padding: 8px 12px; background: var(--texte); color: var(--noir); }
.skip:focus { top: 8px; }
.redirect { padding: var(--pad); }

/* Textes « moniteur » */
.hud-top, .pitch, .hud-side, .now-meta, .now-client, .now-links, .filters, .shot-client, .shot-role, .shot-link, .generique dt, .fin, .info-close, .text-button {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Ordre en mode liste : haut, nom, filtres, plans, infos */
.hud-top { order: 1; }
.intro { order: 2; }
.hud-bottom { order: 3; }
.reel { order: 4; }
.info { order: 5; }

.hud-top { display: flex; justify-content: space-between; gap: 16px; padding: 12px var(--pad); }
.hud-id { display: flex; gap: 14px; }
.hud-dim { color: var(--gris); }
.hud-top nav { display: flex; gap: 18px; }
.hud-top nav a { text-decoration: none; }
.hud-top nav a:hover { text-decoration: underline; text-decoration-color: var(--or); }

/* Le nom, comme un logo */
.intro { padding: 4vh var(--pad) 0; text-align: center; }
.mark {
  font-size: 18vw;
  font-weight: 900;
  font-stretch: 62%;
  line-height: .82;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.mark-line { display: inline-block; overflow: hidden; padding: .06em .02em 0; vertical-align: top; }
.mark-word { display: inline-block; white-space: nowrap; }
.mark-word span { display: inline-block; }
/* Le logo Huang Prod (même animation que l'ancien « Chris ») : le noir de la vidéo se fond dans la page */
.logo { width: min(560px, 96vw); aspect-ratio: 2 / 1; margin: 0 auto; }
.logo-video { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; }
/* La signature sous le logo Huang Prod, dans le bas du halo */
.logo { position: relative; }
.logo-by { position: absolute; left: 0; right: 0; top: 74%; margin: 0; font-family: 'Plex Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--or); opacity: .9; white-space: nowrap; }
/* Le fond noir de la vidéo du logo doit laisser voir le grain : le mélange « écran » est posé sur le bloc
   qui isole le logo (le logo animé sur téléphone, le bloc fixe en haut à droite sur ordinateur) */
.logo { mix-blend-mode: screen; }
.is-reel .intro { mix-blend-mode: screen; }
.pitch { max-width: 52ch; margin: 6px auto 0; color: var(--gris); text-transform: none; font-size: 13px; }

/* Mode liste (téléphone, ou sans script) */
.hud-bottom { display: none; }
.filters { display: flex; justify-content: center; gap: 4px; margin: 20px 0 26px; }
.filters button {
  padding: 4px 10px;
  border: 1px solid var(--sombre);
  background: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.filters button span { color: var(--or); }
.filters button:hover { border-color: var(--gris); }
.filters button[aria-pressed="true"] { background: var(--or); color: var(--noir); border-color: var(--or); }
.filters button[aria-pressed="true"] span { color: #5c4a1c; }

.reel { padding: 0 var(--pad); }
.reel-track { list-style: none; padding: 0; max-width: 620px; margin: 0 auto; display: grid; gap: 34px; }
.shot[hidden] { display: none; }
.shot-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ar, .8);
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}
.shot-frame picture, .shot-frame img, .shot-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot-frame video { opacity: 0; transition: opacity .35s linear; }
.shot-frame.is-playing video { opacity: 1; }
.shot--white .shot-frame { background: #fff; }
.shot--white .shot-frame img, .shot--white .shot-frame video { object-fit: contain; padding: 6% 14%; }
.shot-cap { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-top: 10px; }
.shot-cap h2 { font-size: 22px; font-weight: 800; font-stretch: 62%; line-height: 1; text-transform: uppercase; }
.shot-client { text-align: right; }
.shot-role { grid-column: 1 / -1; color: var(--gris); }
/* Lien vers la publication (Instagram) */
.shot-link, .now-links a { justify-self: start; align-self: flex-start; color: var(--texte); text-decoration: underline; text-decoration-color: var(--or); text-underline-offset: .2em; }
.shot-link { grid-column: 1 / -1; margin-top: 4px; }
.shot-link + .shot-link { margin-top: 0; }
.now-links { display: flex; flex-wrap: wrap; gap: 6px 20px; pointer-events: auto; }
.now-links:empty { display: none; }

.viewfinder, .rail, .hud-side, .info-close { display: none; }

/* Infos : composées comme un générique de fin */
.info { padding: 12vh var(--pad) 48px; }
.info-frame { display: none; }
.info-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; max-width: 1200px; margin: 0 auto 30px; }
.info-label { font-family: var(--mono); font-size: 12px; line-height: 1.5; text-transform: uppercase; color: var(--gris); }
.info-bar .info-label { color: var(--texte); }
.info-bar .info-label span { color: var(--gris); }
.info-inner { display: grid; gap: 64px; max-width: 1200px; margin: 0 auto; }
.info-title { font-size: clamp(60px, 9vw, 150px); font-weight: 900; font-stretch: 62%; line-height: .84; text-transform: uppercase; }
.info-title .line { display: block; overflow: hidden; padding-top: .07em; margin-top: -.07em; }
.info-title .line > span { display: block; }
.info-role { margin-top: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--gris); }
.about { display: grid; gap: .75em; max-width: 34em; margin-top: 30px; font-size: clamp(18px, 1.45vw, 22px); line-height: 1.38; }
.about p + p { color: color-mix(in srgb, var(--texte) 80%, var(--noir)); }
.mail { display: grid; justify-items: start; gap: 8px; margin-top: 44px; }
.mail a { font-size: min(clamp(30px, 3.4vw, 54px), calc((100vw - 2 * var(--pad)) / 12)); font-weight: 800; font-stretch: 62%; line-height: 1.05; text-decoration-thickness: 2px; text-underline-offset: .12em; overflow-wrap: anywhere; }
/* Le générique : le rôle à gauche de l'axe, le nom à droite */
.info-label--axis { margin-bottom: 24px; text-align: center; }
.generique { display: grid; gap: 15px; }
.generique div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; }
.generique dt { color: var(--or); text-align: right; }
.generique dd { font-size: clamp(17px, 1.45vw, 21px); font-weight: 800; font-stretch: 62%; line-height: 1.2; text-transform: uppercase; }
.fin { display: grid; justify-items: center; gap: 8px; margin-top: 52px; color: var(--gris); text-align: center; }
.fin-mot { font-family: 'Archivo', sans-serif; font-size: 36px; font-weight: 900; font-stretch: 62%; line-height: 1; color: var(--texte); }
.fin a { color: var(--texte); }

/* Lecteur */
.text-button { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ===== Mode bobine (ordinateur, avec script) =====
   Les plans glissent le long d'une diagonale, du coin haut gauche au coin bas droit.
   Le logo occupe le coin libre en haut à droite, le titre du plan le coin libre en bas à gauche. */
.is-reel, .is-reel body { height: 100%; overflow: hidden; }
.is-reel .hud-top { position: fixed; inset: 0 0 auto; z-index: 6; }
.is-reel .intro {
  position: fixed;
  top: 34px;
  right: var(--pad);
  z-index: 5;
  width: min(32vw, 50vh, 560px);
  padding: 0;
  text-align: center;
  pointer-events: none;
}
.is-reel .logo { width: 100%; }
.is-reel .pitch { max-width: 40ch; margin: -1.2vh auto 0; pointer-events: auto; }
.is-reel .filters { margin: 16px 0 0; pointer-events: auto; }
.is-reel .reel { position: fixed; inset: 0; z-index: 2; padding: 0; pointer-events: none; }
.is-reel .reel-track { display: block; max-width: none; margin: 0; }
.is-reel .shot { position: absolute; top: 0; left: 0; width: auto; margin: 0; will-change: transform, opacity; pointer-events: auto; }
.is-reel .shot-frame { width: var(--w); height: var(--h); aspect-ratio: auto; transition: filter .3s; }
.is-reel .shot:not(.is-active) .shot-frame:hover { filter: brightness(1.5); }
.is-reel .shot--white .shot-frame { aspect-ratio: auto; }
.is-reel .shot-cap { display: none; }

/* La diagonale : un mètre ruban gradué, qui défile avec les plans */
.is-reel .rail {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  width: 300vmax;
  height: 14px;
  margin: -7px 0 0 -150vmax;
  pointer-events: none;
  background:
    linear-gradient(var(--sombre), var(--sombre)) 0 50% / 100% 1px no-repeat,
    linear-gradient(90deg, rgb(243 195 74 / .6) 0 1px, transparent 1px) var(--shift, 0px) 50% / 96px 14px repeat-x,
    linear-gradient(90deg, rgb(239 238 233 / .2) 0 1px, transparent 1px) var(--shift, 0px) 50% / 16px 6px repeat-x;
}

.is-reel .viewfinder { display: block; position: fixed; left: 0; top: 0; z-index: 4; width: 0; height: 0; pointer-events: none; }
.viewfinder i { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border: 0 solid var(--texte); will-change: transform; }
.viewfinder i:nth-child(1) { border-width: 1.5px 0 0 1.5px; }
.viewfinder i:nth-child(2) { border-width: 1.5px 1.5px 0 0; margin-left: -20px; }
.viewfinder i:nth-child(3) { border-width: 0 0 1.5px 1.5px; margin-top: -20px; }
.viewfinder i:nth-child(4) { border-width: 0 1.5px 1.5px 0; margin-left: -20px; margin-top: -20px; }
.viewfinder b { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; opacity: .55; }
.viewfinder b::before, .viewfinder b::after { content: ''; position: absolute; background: var(--or); }
.viewfinder b::before { left: 6.5px; top: 0; width: 1px; height: 14px; }
.viewfinder b::after { top: 6.5px; left: 0; height: 1px; width: 14px; }

/* Les infos de lecture suivent le viseur, juste au-dessus du plan */
.is-reel .hud-side {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}
.rec { display: flex; align-items: center; gap: 7px; color: var(--gris); }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sombre); }
.is-playing-now .rec { color: var(--texte); }
.is-playing-now .rec-dot { background: var(--rec); animation: blink 1.2s steps(2, jump-none) infinite; }
.hud-tc { margin-left: 4px; color: var(--or); }
.hud-ratio { color: var(--gris); }

/* Le titre du plan en cours, en grand, dans le coin bas gauche */
.is-reel .hud-bottom {
  display: block;
  position: fixed;
  left: var(--pad);
  bottom: calc(var(--pad) + 4px);
  z-index: 5;
  width: min(40vw, 620px);
  pointer-events: none;
}
.now { display: grid; gap: 10px; }
.now-meta { display: flex; gap: 18px; color: var(--gris); }
.count-i { color: var(--or); }
.now-title {
  display: block;
  overflow: hidden;
  padding-top: .1em;
  font-family: 'Archivo', sans-serif;
  font-size: clamp(44px, 6.4vw, 112px);
  font-weight: 900;
  font-stretch: 62%;
  line-height: .86;
  text-transform: uppercase;
  text-wrap: balance;
}
.now-title-in { display: block; }
.now-client { color: var(--gris); }

.is-reel .info {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  padding: 0 calc(var(--pad) + 40px);
  background: var(--noir);
  visibility: hidden;
}
.is-reel .info.is-open { visibility: visible; }
.is-reel .info-frame { display: block; position: fixed; inset: 16px; z-index: 1; pointer-events: none; }
.info-frame i { position: absolute; width: 20px; height: 20px; border: 0 solid var(--or); }
.info-frame i:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.info-frame i:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.info-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.info-frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
.is-reel .info-bar { position: fixed; top: 30px; left: calc(var(--pad) + 40px); right: calc(var(--pad) + 40px); z-index: 2; max-width: none; margin: 0; }
.is-reel .info-close { display: block; padding: 0; border: 0; background: none; color: var(--texte); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.is-reel .info-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 7vw; min-height: 100vh; max-width: 1240px; padding: 96px 0 64px; }
.is-reel .fin { margin-top: 44px; }

@keyframes blink { 50% { opacity: 0; } }

/* ===== Grain de pellicule sur le fond noir =====
   Une texture de grain (images/grain.png) posée derrière tout le contenu, qui « vit » en sautant
   d'une position à l'autre huit fois par seconde. Figée si la personne a réduit les animations. */
:root { --grain: url('images/grain.png'); }
body::before {
  content: '';
  position: fixed;
  inset: -110px;
  z-index: -1;
  pointer-events: none;
  background: var(--grain) 0 0 / 220px 220px repeat;
  animation: grain 1s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  12.5% { transform: translate(-63px, 41px); }
  25% { transform: translate(37px, -88px); }
  37.5% { transform: translate(-91px, -17px); }
  50% { transform: translate(72px, 59px); }
  62.5% { transform: translate(-28px, 93px); }
  75% { transform: translate(85px, -46px); }
  87.5% { transform: translate(-52px, -71px); }
}
/* Les panneaux noirs (Info, obturateur, barre du haut des pages projet) ont le même grain */
.is-reel .info::before {
  content: '';
  position: fixed;
  inset: -110px;
  z-index: -1;
  pointer-events: none;
  background: var(--grain) 0 0 / 220px 220px repeat;
  animation: grain 1s steps(1) infinite;
}
.shutter-top, .shutter-bottom { background: var(--noir) var(--grain) 0 0 / 220px 220px repeat; }
.pj .hud-top { background: var(--noir) var(--grain) 0 0 / 220px 220px repeat; }

/* ===== Lueur sous la souris =====
   Un voile de lumière très léger, et le grain redoublé, dans un cercle qui suit la souris. Le masque est posé
   sur le calque plein écran (immobile) : seul le cercle bouge, le grain reste à sa place. */
.lueur {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease;
  background: rgb(240 226 190 / .085);
  -webkit-mask-image: radial-gradient(circle 240px at var(--x, 50%) var(--y, 50%), #000 0%, rgb(0 0 0 / .55) 35%, rgb(0 0 0 / .18) 65%, transparent 100%);
  mask-image: radial-gradient(circle 240px at var(--x, 50%) var(--y, 50%), #000 0%, rgb(0 0 0 / .55) 35%, rgb(0 0 0 / .18) 65%, transparent 100%);
}
.lueur.is-on { opacity: 1; }
.lueur::after {
  content: '';
  position: absolute;
  inset: -110px;
  background: var(--grain) 0 0 / 220px 220px repeat;
  animation: grain 1s steps(1) infinite;
}

/* Obturateur d'ouverture : couvre la page dès le premier affichage, le script l'ouvre.
   S'il ne se lance pas, il disparaît tout seul au bout de 4 secondes. */
.shutter { position: fixed; inset: 0; z-index: 100; pointer-events: none; animation: shutter-secours 0s 4s forwards; }
.shutter-top, .shutter-bottom { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--noir); will-change: transform; }
.shutter-top { top: 0; }
.shutter-bottom { bottom: 0; }
.shutter-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: var(--texte); transform: scaleX(0); }
.shutter-tc { position: absolute; left: 50%; top: calc(50% + 14px); transform: translateX(-50%); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--gris); opacity: 0; }
@keyframes shutter-secours { to { visibility: hidden; } }

/* Mentions légales */
.legal { order: 2; width: 100%; max-width: 820px; margin: 0 auto; padding: 9vh var(--pad) 72px; }
.legal h1 { font-size: clamp(52px, 8vw, 112px); font-weight: 900; font-stretch: 62%; line-height: .86; text-transform: uppercase; }
.legal-maj { margin: 16px 0 40px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--gris); }
.legal section { display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid rgb(239 238 233 / .14); }
.legal h2 { font-family: var(--mono); font-size: 12px; font-weight: 400; line-height: 1.6; text-transform: uppercase; color: var(--gris); }
.legal p { font-size: 17px; line-height: 1.5; }
.legal p + p { margin-top: .7em; }
.legal-retour { margin-top: 40px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .is-playing-now .rec-dot { animation: none; }
  body::before, .is-reel .info::before, .lueur::after { animation: none; }
  .shutter { display: none; }
}

/* Téléphone */
@media (max-width: 760px) {
  .hud-dim { display: none; }
  .mark { font-size: 21vw; }
  .generique div { gap: 14px; }
  .generique dd { font-size: 17px; }
  .info-inner { gap: 52px; }
  .legal section { grid-template-columns: 1fr; gap: 6px; }
}


/* ===== Balayage diagonal entre les pages ===== */
.pj-wipe { position: fixed; inset: 0; z-index: 90; background: var(--noir); pointer-events: none; }
.pj .pj-wipe:not(.pj-wipe--out) { animation: pj-wipe-away .9s cubic-bezier(.7, 0, .2, 1) .05s both; }
.pj-wipe--out { pointer-events: auto; animation: pj-wipe-in .5s cubic-bezier(.7, 0, .3, 1) both; }
@keyframes pj-wipe-away {
  from { clip-path: polygon(0% 0%, 300% 0%, 300% 300%, 0% 300%, 0% 0%); }
  to { clip-path: polygon(200% 0%, 300% 0%, 300% 300%, 0% 300%, 0% 200%); }
}
@keyframes pj-wipe-in {
  from { clip-path: polygon(0% 0%, 0% 0%, 0% 0%); }
  to { clip-path: polygon(0% 0%, 200% 0%, 0% 200%); }
}

/* ===== Page projet ===== */
.pj .hud-top { position: sticky; top: 0; z-index: 10; background: var(--noir); border-bottom: 1px solid rgb(239 238 233 / .12); }
.pj-main { order: 2; width: 100%; }
.pj-foot { order: 3; display: flex; justify-content: space-between; gap: 16px; padding: 18px var(--pad); border-top: 1px solid rgb(239 238 233 / .12); font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--gris); }
.pj-foot a { color: var(--texte); }
.pj-label { margin-bottom: 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--gris); }

/* Le film, cadré comme dans un viseur, avec deux rails : plein écran et son */
.pj-hero {
  --sh: calc(100vh - 150px);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-areas: "left screen right" ". scrub .";
  border-bottom: 1px solid rgb(239 238 233 / .12);
}
.pj-screen { grid-area: screen; position: relative; justify-self: center; width: min(100%, calc(var(--sh) * var(--ar))); aspect-ratio: var(--ar); margin: 28px 0 0; background: #000; }
.pj-video { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; cursor: pointer; }
.pj-frame { position: absolute; inset: -12px; z-index: 2; pointer-events: none; }
.pj-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--texte); }
.pj-frame i:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.pj-frame i:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.pj-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.pj-frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
.pj-hud { position: absolute; z-index: 2; mix-blend-mode: difference; top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; text-shadow: 0 1px 6px rgb(0 0 0 / .7); pointer-events: none; }
.pj-state { display: flex; align-items: center; gap: 7px; }
.pj-tc { margin-right: auto; color: var(--or); }
.pj-rail { grid-row: 1; display: flex; justify-content: center; align-items: center; gap: .5em; white-space: nowrap; padding: 0; border: 0; border-right: 1px solid rgb(239 238 233 / .12); background: none; color: var(--texte); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; writing-mode: vertical-rl; transform: rotate(180deg); cursor: pointer; }
.pj-rail--left { grid-area: left; border-right: 0; border-left: 1px solid rgb(239 238 233 / .12); }
.pj-rail--right { grid-area: right; transform: none; }
.pj-rail:hover { background: rgb(239 238 233 / .05); color: var(--or); }
.pj-rail[aria-pressed="true"] span { color: var(--rec); }
/* La frise : le mètre ruban du site, qui se remplit avec le film et qu'on peut tirer */
.pj-scrub { grid-area: scrub; position: relative; justify-self: center; width: min(100%, calc(var(--sh) * var(--ar))); height: 34px; margin: 14px 0 18px; cursor: pointer; touch-action: none;
  background: linear-gradient(90deg, rgb(239 238 233 / .28) 0 1px, transparent 1px) 0 50% / 8px 12px repeat-x; }
.pj-scrub-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--texte) 0 1px, transparent 1px) 0 50% / 8px 22px repeat-x; }
.pj-scrub-fill::after { content: ''; position: absolute; right: -1px; top: 0; bottom: 0; width: 2px; background: var(--rec); }
.pj-scrub:focus-visible { outline-offset: 4px; }

/* Titre, générique et fiche */
.pj-head { max-width: 1320px; margin: 0 auto; padding: 56px var(--pad) 0; }
.pj-index { display: flex; gap: 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--gris); }
.pj-index span:first-child { color: var(--texte); }
.pj-title { margin-top: 18px; font-size: clamp(64px, 11vw, 196px); font-weight: 900; font-stretch: 62%; line-height: .84; text-transform: uppercase; }
/* chaque ligne du titre glisse d'un cran vers la droite : la diagonale du site */
.pj-line { display: block; overflow: hidden; padding: .06em 0 0 calc(var(--k) * .9em); margin-top: -.06em; }
.pj-line > span { display: inline-block; }
.pj-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 7vw; margin-top: 64px; }
.pj-credits { gap: 13px; }
.pj-credits dd span { display: block; }
.pj-credits div { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.pj-facts div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid rgb(239 238 233 / .12); font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.pj-facts div:last-child { border-bottom: 1px solid rgb(239 238 233 / .12); }
.pj-facts dt { color: var(--or); }
.pj-note { margin-top: 18px; color: var(--gris); font-size: 15px; line-height: 1.45; }
.pj-link a { text-decoration-color: var(--or); }
.pj-link { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }

/* Photogrammes : ils descendent en escalier le long d'une diagonale */
.pj-stills { position: relative; width: 100%; max-width: 1320px; margin: 0 auto; padding: 140px var(--pad) 40px; }
.pj-stills-list { --n: 6; position: relative; list-style: none; margin: 0; padding: 0; }
.pj-stills-list:has(> li:nth-child(3):last-child) { --n: 3; }
.pj-still { --w: min(40vw, calc(64vh * var(--r)), 100%); position: relative; z-index: calc(var(--i) + 1); width: var(--w); margin-left: calc((100% - var(--w)) * var(--i) / (var(--n) - 1)); }
.pj-still + .pj-still { margin-top: calc(var(--w) / var(--r) * -.06); }
.pj-still img { display: block; width: 100%; height: auto; background: #111; }
.pj-still figcaption { display: flex; gap: 12px; padding: 8px 0 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--gris); }
.pj-still figcaption span { color: var(--texte); }
.pj-stills-rail { position: absolute; left: var(--pad); right: var(--pad); top: 190px; bottom: 60px; pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - .5px), rgb(239 238 233 / .22) 50%, transparent calc(50% + .5px)); }
.js-reveal .pj-still { opacity: 0; transform: translate(60px, 60px); transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.js-reveal .pj-still.is-in { opacity: 1; transform: none; }

/* Précédent / suivant : deux affiches coupées en diagonale */
.pj-next { position: relative; height: 72vh; min-height: 420px; margin-top: 120px; border-top: 1px solid rgb(239 238 233 / .12); }
.pj-nav { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 0 6vw; overflow: hidden; color: var(--texte); text-decoration: none; }
.pj-nav img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: brightness(.32) grayscale(.3); transition: filter .5s, transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.pj-nav:hover img { filter: brightness(.55) grayscale(0); transform: scale(1.04); }
.pj-nav--prev { clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); align-items: flex-start; }
.pj-nav--next { clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%); align-items: flex-end; text-align: right; }
.pj-nav-label { font-size: clamp(56px, 8.5vw, 150px); font-weight: 900; font-stretch: 62%; line-height: .84; text-transform: uppercase; }
.pj-nav-title { font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.pj-next::after { content: ''; position: absolute; top: 0; bottom: 0; left: 42%; width: 16%; pointer-events: none;
  background: linear-gradient(to bottom right, transparent calc(50% - .5px), rgb(239 238 233 / .5) 50%, transparent calc(50% + .5px)); }

/* Film vertical : le titre à gauche, le film debout à droite */
@media (min-width: 900px) {
  .pj--vertical .pj-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .pj--vertical .pj-hero { grid-column: 2; grid-row: 1; grid-template-columns: 64px calc(var(--sh) * var(--ar)) 64px; border-bottom: 0; border-left: 1px solid rgb(239 238 233 / .12); }
  .pj--vertical .pj-screen, .pj--vertical .pj-scrub { width: 100%; }
  .pj--vertical .pj-head { grid-column: 1; grid-row: 1; width: 100%; padding-top: 7vh; }
  .pj--vertical .pj-title { font-size: clamp(60px, 8vw, 150px); }
  .pj--vertical .pj-cols { grid-template-columns: 1fr; gap: 44px; margin-top: 48px; }
  .pj--vertical .pj-stills, .pj--vertical .pj-next { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .pj-wipe { display: none; }
  .js-reveal .pj-still { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 899px) {
  .pj-hero { --sh: 70vh; grid-template-columns: 1fr 1fr; grid-template-areas: "screen screen" "scrub scrub" "left right"; }
  .pj-screen { margin-top: 16px; }
  .pj-rail, .pj-rail--left, .pj-rail--right { writing-mode: horizontal-tb; transform: none; padding: 14px 0; border: 0; border-top: 1px solid rgb(239 238 233 / .12); }
  .pj-rail--left { border-right: 1px solid rgb(239 238 233 / .12); }
  .pj-scrub { width: calc(100% - 2 * var(--pad)); margin: 10px 0; }
  .pj-cols { grid-template-columns: 1fr; gap: 44px; margin-top: 40px; }
  .pj-stills { padding-top: 80px; }
  .pj-stills-rail { display: none; }
  .pj-still, .pj-still + .pj-still { --w: min(100%, calc(70vh * var(--r))); margin: 0 auto; }
  .pj-still + .pj-still { margin-top: 28px; }
  .pj-next { height: auto; min-height: 0; margin-top: 72px; display: grid; }
  .pj-nav { position: relative; height: 34vh; clip-path: none; }
  .pj-nav + .pj-nav { border-top: 1px solid rgb(239 238 233 / .12); }
  .pj-next::after { display: none; }
  .pj-foot { flex-direction: column; }
}
