/* S2 · bienvenue [lot B1]. Tout est rangé sous `html.film #s2` : sans la classe `film`, c'est css/film.css qui
   met la page en forme (le logo, le titre, les deux phrases, les uns sous les autres).
   Les places (logo, phrases, cadres) sont posées en pixels par js/scenes/s2.js ; ici, seulement les matières. */

html.film #s2 { text-align: center; }

/* ------------------------------------------------------------------ le logo entre ses équerres */
html.film #s2 .s2-brand { position: absolute; inset: 0; z-index: 3; }
html.film #s2 .s2-fly { position: absolute; transform-origin: 0 0; will-change: transform, opacity; }
html.film #s2 .s2-wipe { position: absolute; inset: 0; z-index: 1; overflow: hidden; will-change: transform; }
html.film #s2 .s2-wipe__in { width: 100%; height: 100%; will-change: transform; }
html.film #s2 .s2-logo { display: block; width: 100%; height: 100%; max-width: none; margin: 0; }
/* le trait de lumière qui file sous le logo, comme dans son teaser */
html.film #s2 .s2-sheen { position: absolute; z-index: 0; }
html.film #s2 .s2-sheen i {
  position: absolute;
  bottom: 9%;
  left: 0;
  width: 52%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(255 122 26 / 0) 0%, rgb(255 170 90 / .85) 34%, #fff 50%, rgb(255 170 90 / .85) 66%, rgb(255 122 26 / 0) 100%);
  box-shadow: 0 0 14px 2px rgb(255 140 50 / .5), 0 0 34px 6px rgb(255 122 26 / .22);
  opacity: 0;
  will-change: transform, opacity;
}
/* l'éclat sur l'objectif */
html.film #s2 .s2-spark { position: absolute; z-index: 2; opacity: 0; will-change: transform, opacity; }
html.film #s2 .s2-spark::before {
  content: '';
  position: absolute;
  inset: 34%;
  background: radial-gradient(closest-side, rgb(226 240 255 / .6) 0%, rgb(80 150 255 / .22) 45%, rgb(31 107 255 / 0) 100%);
}
html.film #s2 .s2-spark svg { position: relative; display: block; }

html.film #s2 .s2-welcome {
  position: absolute;
  inset-inline: max(var(--gutter), var(--safe-l, 0px)) max(var(--gutter), var(--safe-r, 0px));
  margin: 0;
  will-change: transform, opacity;
}
html.film #s2 .s2-kind {
  position: absolute;
  inset-inline: 0;
  margin: 0;
  color: var(--text-dim);
  opacity: 0;
  will-change: transform, opacity;
}
html.film #s2 .s2-focus { z-index: 4; }
html.film #s2 .s2-focus.is-off { visibility: hidden; }

/* ------------------------------------------------------------------ les deux phrases */
html.film #s2 .s2-line {
  position: absolute;
  inset-inline: max(var(--gutter), var(--safe-l, 0px)) max(var(--gutter), var(--safe-r, 0px));
  z-index: 2;
  margin: 0;
  will-change: transform, opacity;
}
/* la taille est sur chaque phrase : c'est elle que ui.fit() ajuste (--fit) */
html.film #s2 .s2-a,
html.film #s2 .s2-b { display: block; font-size: calc(min(var(--fs-line-lg), calc(var(--vh, 1vh) * 6.4)) * var(--fit, 1)); }
html.film #s2 .s2-b { margin-top: .12em; }
/* .s2-line .s-word : will-change posé par la scène le temps de l'entrée des mots (js/scenes/s2.js, busy) */

/* le mot fort en relief : le mot lui-même ne peint plus que sa lueur ; devant lui, ses copies sombres qui
   s'écartent (l'épaisseur), puis sa face en dégradé */
html.film #s2 .s2-deep { position: relative; background-image: none; }
html.film #s2 .s2-deep__l,
html.film #s2 .s2-deep__f {
  position: absolute;
  inset: 0;
  padding: inherit;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
}
html.film #s2 .s2-deep__l { -webkit-text-fill-color: currentColor; opacity: 0; }
html.film #s2 .s2-deep__l .em { color: inherit; background-image: none; -webkit-text-fill-color: currentColor; text-shadow: none; }
html.film #s2 .s2-deep__f {
  background-image: var(--grad-orange);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* le mot fort collé à sa ponctuation : son <em> garde le dégradé, le point reste blanc */
html.film #s2 .s2-deep__f--mix { background-image: none; -webkit-text-fill-color: currentColor; }
html.film #s2 .s2-deep__f--mix .em { text-shadow: none; }

/* ------------------------------------------------------------------ l'ampoule dans ses trois cadres */
html.film #s2 .s2-stage { position: absolute; inset: 0; z-index: 1; }
html.film #s2 .s2-plane,
html.film #s2 .s2-rays { position: absolute; width: 0; height: 0; transform-origin: 0 0; will-change: transform, opacity; }
html.film #s2 .s2-frame { position: absolute; }
html.film #s2 .s2-frame svg,
html.film #s2 .s2-refl svg,
html.film #s2 .s2-raysvg { display: block; max-width: none; overflow: visible; }
html.film #s2 .s2-raysvg { position: absolute; left: -10px; top: -10px; }
html.film #s2 .s2-raysvg path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; visibility: hidden; }
html.film #s2 .s2-n { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; visibility: hidden; }
html.film #s2 .s2-n--wide { opacity: .13; }
html.film #s2 .s2-n--mid { opacity: .42; }
/* la lueur d'un cadre : une ombre portée des deux côtés du trait, peinte une fois */
html.film #s2 .s2-halo {
  position: absolute;
  opacity: 0;
  box-shadow:
    0 0 26px 1px rgb(var(--h) / .62),
    0 0 7px 0 rgb(var(--h) / .9),
    inset 0 0 26px 1px rgb(var(--h) / .46),
    inset 0 0 7px 0 rgb(var(--h) / .8);
}
/* le reflet sur le sol : la même chose retournée, qui s'éteint en s'éloignant */
html.film #s2 .s2-refl {
  position: absolute;
  transform: scaleY(-1);
  opacity: 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / .35) 22%, transparent 50%);
  mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / .35) 22%, transparent 50%);
}
html.film #s2 .s2-refl .s2-n { stroke-dashoffset: 0; visibility: visible; }
html.film #s2 .s2-refl .s2-halo { opacity: .8; }
/* la lumière de l'ampoule */
html.film #s2 .s2-glow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 250 236 / .92) 0%, rgb(255 226 172 / .5) 20%, rgb(255 190 120 / .2) 44%, rgb(255 170 90 / 0) 76%);
  opacity: 0;
  will-change: transform, opacity;
}

/* ------------------------------------------------------------------ le logo qui se range dans la barre
   Il est posé dans <body> par la scène (voir js/scenes/s2.js) : au-dessus du voile des barres (25), sous les
   barres (30), à la place exacte du logo de la barre. */
html.film .s2-dock {
  position: fixed;
  z-index: 28;
  display: block;
  max-width: none;
  margin: 0;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform, opacity;
}
