/* Studio 200 · ce qui reste à l'écran pendant tout le film. [lot habillage]
   Barre du haut, barre de lecture, bouton WhatsApp, curseur d'équerres, grain et vignettage.
   Tout est posé par js/chrome.js. Rien ici n'anime autre chose que `transform` et `opacity`.
   Même disposition dans les trois langues : le logo à gauche, la barre se remplit de gauche à droite. */

/* ====================================================================== le voile
   Au-dessus des scènes, sous les barres : un vignettage, un peu de nuit derrière les deux barres pour
   qu'elles se lisent sur une vidéo claire, et le grain (une texture fixe fabriquée une fois par chrome.js). */
.veil {
  position: fixed;
  inset: 0;
  z-index: var(--z-veil);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(var(--night-rgb) / .6) 0, rgb(var(--night-rgb) / .26) calc(var(--safe-t) * .75), transparent calc(var(--safe-t) * 1.8)),
    linear-gradient(0deg, rgb(var(--night-rgb) / .72) 0, rgb(var(--night-rgb) / .3) calc(var(--safe-b) * .8), transparent calc(var(--safe-b) * 1.9)),
    radial-gradient(125% 92% at 50% 46%, transparent 46%, rgb(var(--night-rgb) / .2) 74%, rgb(var(--night-rgb) / .6) 100%);
}
.veil::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--grain, none);
  background-size: var(--grain-size, 128px) var(--grain-size, 128px);
}

/* ====================================================================== la barre du haut */
#chrome-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-chrome);
  box-sizing: border-box;
  height: var(--safe-t);
  padding: env(safe-area-inset-top, 0px) max(calc(var(--gutter) - 6px), var(--safe-r)) 0 max(var(--gutter), var(--safe-l));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  direction: ltr;
  pointer-events: none;                 /* entre ses boutons, la barre laisse passer le toucher */
  transition: opacity var(--t-2) linear, visibility 0s linear;
}
#chrome-top > * { pointer-events: auto; }

/* Le logo : sa place est toujours là (chrome.logo.rect()), il n'apparaît que lorsque le film l'y amène. */
.top__logo {
  display: block;
  flex: none;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none !important;
}
.top__logo.is-docked { opacity: 1; pointer-events: auto !important; }
.top__logo .logo { width: auto; height: clamp(30px, 8.6vw, 36px); transition: opacity var(--t-3) linear; }
.top__logo.is-away { pointer-events: none !important; }
.top__logo.is-away .logo { opacity: 0; }

.top__right { display: flex; align-items: center; gap: clamp(.125rem, 1.2vw, 1.25rem); margin-left: auto; }

.top__nav { display: none; }
.top__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .35rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  line-height: 1;
  letter-spacing: .2em;
  text-indent: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(var(--white-rgb) / .88);
}
.top__link:lang(he) { font-weight: 700; font-size: .98rem; letter-spacing: .06em; text-indent: .06em; }

/* les langues : FR · עב · EN */
.langs { display: flex; align-items: center; }
.langs__b {
  position: relative;
  min-width: 38px;
  height: 44px;
  padding: 0 .3rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .75rem;
  line-height: 1;
  letter-spacing: .1em;
  text-indent: .1em;
  text-align: center;
  color: rgb(var(--white-rgb) / .56);
}
.langs__b[lang='he'] { font-family: 'Heebo', var(--font-body); font-size: .92rem; letter-spacing: 0; text-indent: 0; }
.langs__b[aria-current='true'] { color: var(--white); }
.langs__b::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 14px;
  height: 2px;
  margin-left: -7px;
  border-radius: 2px;
  background: var(--orange);
  box-shadow: 0 0 8px rgb(var(--orange-rgb) / .85);
  opacity: 0;
}
.langs__b[aria-current='true']::after { opacity: 1; }
.langs__sep { font-weight: 700; font-size: .75rem; line-height: 1; color: rgb(var(--white-rgb) / .3); }

/* le son : coupé par défaut */
.sound {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: rgb(var(--white-rgb) / .92);
  isolation: isolate;
}
.sound::before, .sound::after {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 50%;
}
.sound::before {
  background: linear-gradient(180deg, rgb(14 22 62 / .72) 0%, rgb(7 10 30 / .84) 100%);
  box-shadow: inset 0 0 0 1px rgb(var(--ice-rgb) / .32);
}
/* allumé : une peau orange dont seule l'opacité change */
.sound::after {
  background: radial-gradient(110% 110% at 50% 100%, rgb(var(--orange-rgb) / .46), rgb(30 14 12 / .6) 78%);
  box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 18px -2px rgb(var(--orange-rgb) / .75);
  opacity: 0;
  transition: opacity var(--t-2) var(--ease-enter);
}
.sound[aria-pressed='true']::after { opacity: 1; }
.sound[aria-pressed='true'] { color: #ffe6c7; }
.sound .icon { width: 20px; height: 20px; }
.sound[aria-pressed='true'] .icon[data-icon='sound-off'],
.sound[aria-pressed='false'] .icon[data-icon='sound-on'] { display: none; }
/* l'invitation de la première image : « Voir avec le son » sous le bouton, ses équerres orange font le point
   sur lui ; tout s'efface au premier geste */
.sound > .corners { opacity: 0; transition: opacity var(--t-2) var(--ease-enter); }
.sound.is-asking > .corners { opacity: 1; }
.sound__ask {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .66rem;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffd9b0;
  text-shadow: 0 0 10px rgb(var(--orange-rgb) / .55);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, -4px, 0);
  transition: opacity var(--t-2) var(--ease-enter), transform var(--t-2) var(--ease-enter);
}
.sound__ask:lang(he) { font-family: 'Heebo', var(--font-body); font-size: .8rem; letter-spacing: .02em; }
.sound.is-asking .sound__ask { opacity: 1; transform: none; }

@media (max-width: 350px) {
  .langs__b { min-width: 32px; padding: 0 .15rem; }
}

@media (min-width: 760px) {
  .top__logo .logo { height: 46px; }
  .top__nav { display: flex; align-items: center; gap: clamp(.75rem, 1.8vw, 2rem); margin-right: clamp(.25rem, 1.2vw, 1.25rem); }
  .langs__b { min-width: 40px; font-size: .78rem; }
  .langs__b[lang='he'] { font-size: .96rem; }
}

/* ====================================================================== la barre du bas */
#chrome-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-chrome);
  height: 0;
  direction: ltr;
  pointer-events: none;
  transition: opacity var(--t-2) linear, visibility 0s linear;
}

/* ---------------------------------------------------------------- la barre de lecture
   Une ligne fine collée au bord bas, sur toute la largeur. Sur un écran qui réserve une bande en bas
   (la barre d'accueil d'un iPhone), la ligne se pose au-dessus de cette bande, que la nuit remplit. */
.gauge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  height: 0;
}
.gauge::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: var(--night);
}
.gauge__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.gauge__track, .gauge__fill, .gauge__flash { position: absolute; inset: 0; display: block; }
.gauge__track { background: rgb(var(--white-rgb) / .18); }
.gauge__fill { transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
/* de 0 à 100 : blanc */
.gauge__fill--a {
  background: linear-gradient(90deg, rgb(var(--ice-rgb) / .8) 0%, var(--white) 100%);
  box-shadow: 0 0 9px rgb(var(--ice-rgb) / .6);
}
/* de 100 à 200 : orange */
.gauge__fill--b {
  background: linear-gradient(90deg, var(--orange) 0%, var(--amber) 100%);
  box-shadow: 0 0 12px rgb(var(--orange-rgb) / .9), 0 -4px 22px rgb(var(--orange-rgb) / .42);
}
/* l'éclat du verrouillage à 200 : toute la ligne chauffée à blanc, dont seule l'opacité bouge */
.gauge__flash {
  background: #fff3e2;
  box-shadow: 0 0 16px 3px rgb(var(--orange-rgb) / .95), 0 0 64px 12px rgb(var(--orange-rgb) / .5);
  opacity: 0;
}

/* la tête de lecture : un trait debout au bout du rempli */
.gauge__head { position: absolute; inset: 0; display: block; will-change: transform; }
.gauge__head::before, .gauge__head::after {
  content: '';
  position: absolute;
  left: -1.5px;
  bottom: -1px;
  width: 3px;
  height: 12px;
  border-radius: 2px;
}
.gauge__head::before { background: var(--white); box-shadow: 0 0 8px 1px rgb(var(--ice-rgb) / .9); }
.gauge__head::after {
  background: #ffe2bd;
  box-shadow: 0 0 10px 2px rgb(var(--orange-rgb) / .95), 0 0 26px 6px rgb(var(--orange-rgb) / .45);
  opacity: var(--k, 0);
}

/* les repères 100 et 200 : un cran et son chiffre, juste au-dessus de la ligne */
.gauge__tick { position: absolute; left: 0; right: 0; bottom: 0; display: block; height: 0; opacity: 0; will-change: transform, opacity; }
.gauge__tick i { position: absolute; left: -1px; bottom: 0; display: block; width: 2px; height: 9px; border-radius: 1px; background: rgb(var(--white-rgb) / .85); }
.gauge__tick b {
  position: absolute;
  left: 0;
  bottom: 12px;
  display: block;
  font-family: var(--font-wide);
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  font-size: .625rem;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  color: rgb(var(--white-rgb) / .82);
  text-shadow: 0 1px 6px rgb(var(--night-rgb) / .9);
  will-change: transform;
}
.gauge__tick--200 i { left: -2px; background: var(--amber); box-shadow: 0 0 6px rgb(var(--orange-rgb) / .8); }
.gauge__tick--200 b { color: var(--amber); transform: translateX(-100%) translateX(-8px); }

/* le pourcentage : Archivo large, chiffres à largeur fixe, de gauche à droite dans les trois langues */
.gauge__slot { position: absolute; left: max(var(--gutter), var(--safe-l)); bottom: 16px; contain: layout style; } /* un chiffre qui change ne remet en page que lui */
.gauge__readout { position: relative; display: block; will-change: transform; }
.gauge__layer {
  display: flex;
  align-items: baseline;
  font-family: var(--font-wide);
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  font-weight: 900;
  font-size: var(--fs-gauge);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.gauge__layer--white { color: var(--white); text-shadow: 0 1px 12px rgb(var(--night-rgb) / .9), 0 0 3px rgb(var(--night-rgb) / .7); }
.gauge__layer--orange { position: absolute; inset: 0; opacity: 0; color: var(--amber); text-shadow: 0 0 .5em rgb(var(--orange-rgb) / .5), 0 0 1.2em rgb(var(--orange-rgb) / .25); }
.gauge__layer--orange .gauge__d,
.gauge__layer--orange .gauge__unit {
  background-image: var(--grad-orange);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gauge__d { display: inline-block; width: 1ch; text-align: center; }
.gauge__unit { display: inline-block; margin-left: .2em; font-size: .56em; font-weight: 800; }
.gauge__glow {
  position: absolute;
  inset: -20px -30px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--orange-rgb) / .5) 0%, rgb(var(--orange-rgb) / .16) 55%, transparent 100%);
  opacity: 0;
  pointer-events: none;
}
/* les équerres du 200 % : invisibles tant qu'il n'y est pas */
.gauge__slot > .corners { opacity: 0; transition: opacity var(--t-1) linear; }
.gauge.is-locked .gauge__slot > .corners { opacity: 1; }

/* ---------------------------------------------------------------- le bouton WhatsApp
   Rond de verre à liseré orange sur téléphone, capsule avec son nom sur ordinateur. */
.wa {
  position: absolute;
  right: max(var(--gutter), var(--safe-r));
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  color: var(--white);
  isolation: isolate;
  background:
    linear-gradient(128deg, rgb(200 216 255 / .16) 0%, rgb(200 216 255 / 0) 36%),
    radial-gradient(120% 120% at 66% 112%, rgb(var(--orange-rgb) / .5) 0%, rgb(var(--orange-rgb) / .12) 46%, transparent 68%),
    linear-gradient(180deg, rgb(18 22 58 / .88) 0%, rgb(10 9 24 / .94) 100%);
  box-shadow: 0 12px 30px -10px rgb(var(--orange-rgb) / .75), -6px -6px 22px -14px rgb(var(--electric-rgb) / .6);
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(.9);
  transition: opacity var(--t-3) var(--ease-enter), transform var(--t-3) var(--ease-enter);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.wa.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wa::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--edge-hot);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.wa .icon { width: 24px; height: 24px; }
.wa__label { display: none; font-family: var(--font-body); font-weight: 700; font-size: .875rem; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.wa__label:lang(he) { font-weight: 800; font-size: .95rem; }

@media (min-width: 760px) {
  .gauge__bar { height: 4px; }
  .gauge__head::before, .gauge__head::after { height: 14px; }
  .gauge__slot { bottom: 18px; }
  .gauge__tick b { font-size: .6875rem; bottom: 13px; }
  .wa { width: auto; bottom: calc(30px + env(safe-area-inset-bottom, 0px)); padding: 0 1.3rem 0 1.05rem; }
  .wa__label { display: inline; }
}

/* L'invitation au geste (film joué par passages, écran tactile) : trois chevrons orange, grands et lumineux,
   qui montent au milieu de la barre du bas (on doit voir tout de suite qu'il faut glisser vers le haut). */
.cue {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 40px;
  height: 46px;
  margin-left: -20px;
  opacity: 0;
  transition: opacity var(--t-3) linear;
  filter: drop-shadow(0 0 8px rgb(var(--orange-rgb) / .7));
}
.cue.is-on { opacity: 1; }
.cue i {
  position: absolute;
  left: 9px;
  width: 20px;
  height: 20px;
  border-top: 3.5px solid var(--amber);
  border-left: 3.5px solid var(--amber);
  border-radius: 2px;
  transform: translateY(0) rotate(45deg);
}
.cue i:nth-child(1) { top: 4px; }
.cue i:nth-child(2) { top: 15px; opacity: .7; }
.cue i:nth-child(3) { top: 26px; opacity: .4; }
.cue.is-on i { animation: cue-up 1.4s var(--ease-enter) infinite; }
.cue.is-on i:nth-child(2) { animation-delay: .1s; }
.cue.is-on i:nth-child(3) { animation-delay: .2s; }
@keyframes cue-up {
  0% { transform: translateY(7px) rotate(45deg); }
  60%, 100% { transform: translateY(-5px) rotate(45deg); }
}

/* les deux barres s'effacent (chrome.hide()) */
.chrome-off #chrome-top,
.chrome-off #chrome-bottom {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-2) linear, visibility 0s linear var(--t-2);
}

/* ====================================================================== le curseur (ordinateur, souris)
   Quatre petites équerres qui suivent la souris avec un léger retard, et un point à sa place exacte.
   Sur ce qui se clique, elles vont se poser sur ses quatre coins et virent à l'orange. Jamais au doigt. */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor :is(input, textarea, [contenteditable='true']) { cursor: text !important; }

.cur {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-cursor);
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-2) linear;
}
.cur.is-on { opacity: 1; }
.cur__c { position: absolute; left: 0; top: 0; display: block; width: 8px; height: 8px; will-change: transform; }
.cur__o { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity var(--t-1) linear; }
.cur__c::before, .cur__c::after, .cur__o::before, .cur__o::after {
  content: '';
  position: absolute;
  border-radius: 1px;
  background: var(--white);
  box-shadow: 0 0 0 .5px rgb(var(--night-rgb) / .4), 0 0 5px rgb(var(--ice-rgb) / .6);
}
.cur__c::before, .cur__o::before { left: 0; right: 0; height: 1.5px; }
.cur__c::after, .cur__o::after { top: 0; bottom: 0; width: 1.5px; }
.cur__c--tl::before, .cur__c--tr::before, .cur__c--tl > .cur__o::before, .cur__c--tr > .cur__o::before { top: 0; }
.cur__c--bl::before, .cur__c--br::before, .cur__c--bl > .cur__o::before, .cur__c--br > .cur__o::before { bottom: 0; }
.cur__c--tl::after, .cur__c--bl::after, .cur__c--tl > .cur__o::after, .cur__c--bl > .cur__o::after { left: 0; }
.cur__c--tr::after, .cur__c--br::after, .cur__c--tr > .cur__o::after, .cur__c--br > .cur__o::after { right: 0; }
.cur__o::before, .cur__o::after {
  background: var(--amber);
  box-shadow: 0 0 6px 1px rgb(var(--orange-rgb) / .9), 0 0 16px 2px rgb(var(--orange-rgb) / .45);
}
.cur.is-locked .cur__o { opacity: 1; }
.cur__dot {
  position: absolute;
  left: -2.5px;
  top: -2.5px;
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 .5px rgb(var(--night-rgb) / .4), 0 0 6px rgb(var(--ice-rgb) / .8);
  will-change: transform;
  transition: opacity var(--t-1) linear;
}
.cur.is-text .cur__dot { opacity: 0; }

/* Au doigt : les équerres se verrouillent un instant sur ce qu'on vient de toucher, puis s'effacent. */
.tapfocus {
  position: fixed;
  z-index: var(--z-cursor);
  pointer-events: none;
  opacity: 0;
  transition: opacity .24s linear;
}
.tapfocus.is-on { opacity: 1; transition-duration: .04s; }
