/* ═══════════════════════════════════════════════════════════════
   Accueil, scène 2 : le théâtre (js/scenes/theatre.js). Préfixe .th__
   Le rideau de velours et ma phrase, puis le plateau tournant de mes personnages, dans le noir ;
   au salut, la salle se rallume et la page redevient blanche.
   ═══════════════════════════════════════════════════════════════ */
.th { position: relative; background: var(--paper); color: var(--ivory); overflow-x: clip; }
.th__back, .th__front, .th__curtain { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.th__back { z-index: 1; }
.th__front { z-index: 3; }
.th__curtain { z-index: 5; will-change: transform; }

/* le titre, derrière la tête de celui qui est dans la lumière */
.th__mast { position: absolute; z-index: 2; left: 0; right: 0; margin: 0; text-align: center; font-family: var(--display); font-stretch: 62.5%; font-weight: 400; line-height: .84; text-transform: uppercase; letter-spacing: .005em; white-space: nowrap; color: var(--ivory); opacity: 0; }
.th__row { display: block; width: max-content; margin: 0 auto; }
.th__ar { display: block; margin-top: .1em; font-family: var(--ar); font-weight: 700; font-size: .28em; line-height: 1.3; text-transform: none; letter-spacing: 0; color: var(--ivory-2); }

/* la phrase (lue par les lecteurs d'écran ; affichée seulement sans WebGL) et sa source */
.th__quote { position: absolute; z-index: 6; left: 0; right: 0; top: 0; margin: 0; padding: 0 var(--gutter); text-align: center; opacity: 0; visibility: hidden; }
.th__quote blockquote { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.th__src { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; font-size: .8rem; line-height: 1.6; color: rgba(255, 228, 196, .72); }
.th__src a { text-decoration: none; border-bottom: 1px solid rgba(255, 228, 196, .3); transition: color .3s, border-color .3s; }
.th__src a:hover { color: #fff; border-color: #fff; }

.th__copy { position: absolute; z-index: 7; }
.th__shade { position: absolute; z-index: 4; left: 0; bottom: 0; width: 52%; height: 58%; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 70% 72% at 0% 100%, rgba(10, 6, 5, .9), rgba(10, 6, 5, .55) 45%, rgba(10, 6, 5, 0) 100%); }
.th__txt { margin: 0; font-family: var(--text); font-size: clamp(1.05rem, 1.25vw, 1.25rem); line-height: 1.55; color: var(--ivory); }
.th__cta { margin: 22px 0 0; }
.th__btn { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 28px; background: var(--ivory); color: var(--night); text-decoration: none; font-size: .98rem; font-weight: 500; transition: background .4s var(--ease), color .4s var(--ease); }
.th__btn:hover { background: var(--velvet); color: #fff; }
.th__btn i { font-style: normal; }
.th__meter { position: absolute; z-index: 7; margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; color: var(--ivory-2); }
.th__num { font-family: var(--display); font-stretch: 62.5%; font-weight: 400; font-size: 3.4rem; line-height: 1; letter-spacing: .01em; color: var(--ivory); }

/* le salut : sur le blanc, la phrase de fin et le bouton */
.th__end { position: absolute; z-index: 7; left: 0; right: 0; text-align: center; color: var(--ink); opacity: 0; visibility: hidden; }
.th__end p { margin: 0 0 22px; font-family: var(--display); font-stretch: 62.5%; font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 4.4rem); line-height: .95; text-transform: uppercase; letter-spacing: .01em; }
.th__end .th__btn { background: var(--ink); color: var(--paper); }
.th__end .th__btn:hover { background: var(--velvet); color: #fff; }

/* sans WebGL : un rideau en dégradés, qui s'ouvre aussi */
.no-gl::before, .no-gl::after { content: ''; position: absolute; z-index: 5; top: 0; bottom: 0; width: 50%; pointer-events: none;
  background: repeating-linear-gradient(90deg, #1c0203 0, #5a0a0c 22px, #8e1416 34px, #5a0a0c 48px, #1c0203 72px), linear-gradient(180deg, rgba(10,6,5,.5), rgba(10,6,5,0) 30%);
  background-blend-mode: multiply;
  transition: none; }
.no-gl::before { left: 0; transform: translate3d(calc(var(--open, 0) * -92%), calc(var(--fly, 0) * -105%), 0); }
.no-gl::after { right: 0; transform: translate3d(calc(var(--open, 0) * 92%), calc(var(--fly, 0) * -105%), 0); }
.no-gl .th__quote blockquote { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.no-gl .th__quote { top: 50%; transform: translateY(-60%); }
.no-gl .th__q-ar { margin: 0; font-family: var(--ar); font-weight: 700; font-size: clamp(2.6rem, 9vw, 7rem); line-height: 1.3; color: #ffe6c4; }
.no-gl .th__q-fr { margin: .3em 0 0; font-family: var(--display); font-stretch: 62.5%; font-weight: 400; font-size: clamp(1.8rem, 5vw, 4rem); line-height: 1; text-transform: uppercase; color: #ffe6c4; }
.no-gl .th__src { position: static; margin-top: 22px; }

/* ═════════ Sur ordinateur : un plan fixe ═════════ */
.th.is-stage .th__track { height: 760vh; }
/* la scène commence sous la fin de la salle : sa scène fixe prend le relais à l'instant où celle de la salle se libère
   (la section est transparente : jusque-là, on voit la salle, et son rideau qui descend) */
.th.is-stage { margin-top: -100vh; margin-top: -100svh; background: transparent; }
.th.is-stage .th__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--night); }
/* l'arabe passe au-dessus du titre : dessous, les personnages le cacheraient */
.th.is-stage .th__mast { right: auto; display: flex; flex-direction: column; align-items: center; }
.th.is-stage .th__ar { order: -1; margin: 0 0 .06em; font-size: .3em; }
.th.is-stage .th__copy { left: var(--gutter); bottom: 6vh; width: min(30vw, 420px); }
.th.is-stage .th__meter { right: var(--gutter); bottom: 6vh; }
.th.is-stage .th__end { top: 11vh; }

/* ═════════ Le plan fixe sur un écran vertical (téléphone) ═════════ */
.th.is-portrait .th__track { height: 600vh; }
.th.is-portrait .th__copy { left: var(--gutter); bottom: max(22px, env(safe-area-inset-bottom)); width: auto; }
.th.is-portrait .th__copy .th__txt { display: none; }
.th.is-portrait .th__copy .th__cta { margin: 0; }
.th.is-portrait .th__btn { min-height: 46px; padding: 0 20px; font-size: .9rem; }
.th.is-portrait .th__shade { width: 100%; height: 30%; background: linear-gradient(0deg, rgba(10, 6, 5, .8), rgba(10, 6, 5, 0)); }
.th.is-portrait .th__meter { bottom: max(26px, env(safe-area-inset-bottom)); }
.th.is-portrait .th__num { font-size: 2.6rem; }
.th.is-portrait .th__end { top: calc(var(--header) + 14px); padding: 0 var(--gutter); text-align: left; }
.th.is-portrait .th__end p { margin: 0 0 14px; font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
.th__endtxt { display: block; margin: 0 0 18px; font-family: var(--text); font-size: 1rem; line-height: 1.5; text-transform: none; letter-spacing: 0; color: var(--ink); }

/* ═════════ Au téléphone ═════════ */
.th.is-flow .th__box { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--night); touch-action: pan-y; }
.th__tap { position: absolute; inset: 0; z-index: 8; border: 0; background: transparent; padding: 0; -webkit-tap-highlight-color: transparent; }
.th.is-flow .th__meter { right: var(--gutter); bottom: 22px; opacity: 0; }
.th.is-flow .th__num { font-size: 2.6rem; }
.th.is-flow .th__in { padding: 0 var(--gutter); }
.th.is-flow .th__mast { position: relative; opacity: 1; color: var(--ink); margin-top: 56px; text-align: left; }
.th.is-flow .th__row { margin: 0; }
.th.is-flow .th__ar { text-align: right; color: var(--ink-2); }
.th.is-flow .th__copy { position: relative; margin: 26px 0 0; }
.th.is-flow .th__txt { color: var(--ink); }
.th.is-flow .th__btn { background: var(--ink); color: var(--paper); }
.th__line { position: relative; margin: 40px auto 0; }
.th__p { position: absolute; margin: 0; }
.th__p img { width: 100%; height: 100%; max-width: none; }
.th.is-flow .th__end { position: relative; opacity: 1; visibility: visible; margin: 10px 0 0; padding-bottom: 90px; text-align: left; }
.th.is-flow .th__end p { font-size: clamp(2rem, 9vw, 3rem); }
.th.is-static .th__box--flat { height: auto; min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 120px 0; }
.th.is-static .th__box--flat .th__quote { position: relative; opacity: 1; visibility: visible; transform: none; top: auto; }
.th.is-static .no-gl::before, .th.is-static .no-gl::after { width: 9%; }
