/* Dossier sensible — le site. Palette et polices de l'application (app/client/src/theme/palette.js) : noir d'encre,
   jaune scellé, rouge d'alerte, papier ; Big Shoulders Display, Geist, JetBrains Mono. L'ocre ne sert qu'à l'Affaire 02,
   le bleu qu'aux SMS, le laiton qu'aux cryptex. */

:root {
  --ink: #0a0a0a;
  --night: #0f0f0f;
  --panel: #141414;
  --panel2: #1c1c1e;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f2efe8;
  --soft: #b8b4aa;
  --muted: #8a867d;
  --faint: #6d6a63;
  --dim: #3a3a3c;
  --yellow: #f5d90a;
  --red: #ff453a;
  --green: #30d158;
  --green-ink: #04140a;
  --orange: #ff9f0a;
  --blue: #0a84ff;
  --paper: #efebe1;
  --paper-ink: #141414;
  --ocre: #d2743a;
  --brass: #c9a23f;
  --brass-dark: #5d4a1c;

  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --body: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --hand: Caveat, 'Segoe Print', cursive;

  --gutter: clamp(18px, 4vw, 44px);
  --wrap: min(1180px, 100% - 2 * var(--gutter));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ───────────── Briques ───────────── */

/* L'étiquette jaune de l'app. */
.tag {
  display: inline-block;
  padding: 5px 9px;
  background: var(--yellow);
  color: var(--ink);
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* L'onglet d'une chemise de dossier. */
.tab {
  display: inline-block;
  padding: 8px 14px 10px;
  border: 1px solid var(--line2);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--panel);
  color: var(--yellow);
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.btn {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--yellow);
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink);
  font: 700 16px/1.2 var(--body);
  text-decoration: none;
  transform: translate(var(--mx), var(--my));
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.2s;
  will-change: transform;
}

.btn i {
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}

.btn i::before {
  content: '→';
}

.btn:hover {
  box-shadow: 0 10px 34px rgba(245, 217, 10, 0.28);
}

.btn:hover i {
  transform: translateX(5px);
}

.btn:active {
  transform: translate(var(--mx), var(--my)) scale(0.97);
}

.btn--small {
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 14px;
}

.btn--big {
  padding: 20px 26px;
  font-size: 18px;
  border-radius: 16px;
}

.btn--ghost {
  background: rgba(10, 10, 10, 0.45);
  border-color: var(--line2);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: flex-start;
  gap: 10px;
}

.btn--ghost svg {
  width: 18px;
  height: 18px;
  fill: var(--yellow);
}

.btn--ghost:hover {
  box-shadow: none;
  border-color: var(--yellow);
}

.btn--ocre {
  background: var(--ocre);
  border-color: var(--ocre);
  color: #160a03;
}

.btn--ocre:hover {
  box-shadow: 0 10px 34px rgba(210, 116, 58, 0.3);
}

/* Tampon encreur à double filet. */
.stamp {
  --tone: var(--yellow);
  position: relative;
  display: inline-block;
  padding: 7px 12px;
  border: 2px solid var(--tone);
  border-radius: 6px;
  outline: 1px solid var(--tone);
  outline-offset: -5px;
  color: var(--tone);
  font: 700 12px/1 var(--mono);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  opacity: 0.92;
  transform: rotate(-7deg);
}

.stamp--red {
  --tone: var(--red);
}

.stamp--ocre {
  --tone: var(--ocre);
}

/* Apparition au défilement : les en-têtes de pièce et les dossiers seulement. */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

.spores {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ───────────── Barre du haut ───────────── */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid transparent;
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.35s var(--ease);
}

.bar.is-stuck {
  background: rgba(10, 10, 10, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 900 21px/1 var(--display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bar__brand span,
.btn--small {
  white-space: nowrap;
}

.bar__brand img {
  width: 34px;
  height: 34px;
  transition: transform 0.5s var(--ease);
}

.bar__brand:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.bar__nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.bar__nav a {
  position: relative;
  padding: 8px 10px;
  color: var(--soft);
  font: 500 12px/1 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.bar__nav a::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.bar__nav a:hover,
.bar__nav a.is-here {
  color: var(--text);
}

.bar__nav a:hover::after,
.bar__nav a.is-here::after {
  transform: scaleX(1);
}

/* ───────────── Ouverture ───────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  padding: 120px var(--gutter) 86px;
  overflow: hidden;
  isolation: isolate;
}

.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.04);
}

/* Une lueur d'ambre dans le ciel, qui respire : elle va à la nuit du Bellevue comme au soleil de la Vézère. */
.hero__storm {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 45% at 30% 8%, rgba(255, 159, 10, 0.22), transparent 70%);
  animation: breathe 7.6s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

@keyframes breathe {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 0.8;
  }
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.82) 0%, rgba(10, 10, 10, 0.25) 55%, rgba(10, 10, 10, 0.45) 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.6) 0%, rgba(10, 10, 10, 0) 28%, rgba(10, 10, 10, 0.55) 72%, var(--ink) 100%);
}

.hero__ref {
  position: absolute;
  top: 78px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 10px/1 var(--mono);
  letter-spacing: 2px;
  color: var(--muted);
}

.hero__ref span {
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__ref span:first-child {
  color: var(--yellow);
}

/* L'affaire à l'image : elle change avec le film. */
.hero__ref [data-hero-case] {
  color: var(--text);
  transition: opacity 0.25s;
}

.hero__ref [data-hero-case].is-changing {
  opacity: 0;
}

.hero__ref i {
  flex: 1;
  height: 1px;
  background: var(--line2);
}

.hero__ref b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.4s ease-in-out infinite alternate;
}

@keyframes blink {
  to {
    opacity: 0.15;
  }
}

.hero__body {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 780px;
}

.hero__title {
  display: grid;
  font: 900 clamp(76px, 15.5vw, 212px) / 0.84 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.5px;
  transform-origin: left bottom;
  animation:
    neon 2.6s linear both,
    settle 2.6s var(--ease) both;
}

.hero__title-hot {
  color: var(--yellow);
  text-shadow:
    0 0 22px rgba(245, 217, 10, 0.55),
    0 0 70px rgba(245, 217, 10, 0.25);
}

/* Le titre s'allume comme une enseigne : il grésille, puis se pose en reculant. */
@keyframes neon {
  0% {
    opacity: 0;
  }
  6% {
    opacity: 0.85;
  }
  9% {
    opacity: 0.15;
  }
  14% {
    opacity: 1;
  }
  17% {
    opacity: 0.3;
  }
  22% {
    opacity: 0.95;
  }
  27% {
    opacity: 0.55;
  }
  32%,
  100% {
    opacity: 1;
  }
}

@keyframes settle {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}

.hero__title.is-flick .hero__title-hot {
  animation: flick 0.42s linear;
}

@keyframes flick {
  0%,
  100% {
    opacity: 1;
  }
  20% {
    opacity: 0.35;
  }
  40% {
    opacity: 0.9;
  }
  60% {
    opacity: 0.2;
  }
}

.hero__lead {
  max-width: 44ch;
  color: var(--text);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* L'appel entrant. */
.ring {
  position: absolute;
  right: var(--gutter);
  bottom: 110px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: min(390px, calc(100% - 2 * var(--gutter)));
  padding: 14px;
  border: 1px solid var(--line2);
  border-radius: 24px;
  background: rgba(16, 16, 16, 0.62);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: ring-in 0.8s var(--ease) 2.8s both;
}

@keyframes ring-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
}

.ring img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.ring__halo {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 58px;
  height: 58px;
  margin-top: -29px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: halo 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes halo {
  from {
    opacity: 0.8;
    transform: scale(0.9);
  }
  to {
    opacity: 0;
    transform: scale(1.7);
  }
}

.ring__state {
  white-space: nowrap;
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
}

.ring__name {
  font: 900 26px/1 var(--display);
  text-transform: uppercase;
}

.ring__role {
  font-size: 13px;
  color: var(--muted);
}

.ring__keys {
  display: flex;
  gap: 10px;
}

.ring__key {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
}

.ring__key svg {
  width: 21px;
  height: 21px;
}

.ring__key:hover {
  transform: scale(1.1);
}

.ring__key--yes {
  background: var(--green);
  animation: wiggle 1.8s ease-in-out infinite;
}

.ring__key--yes svg {
  fill: var(--green-ink);
}

.ring__key--no {
  background: var(--red);
}

.ring__key--no svg {
  fill: #fff;
  transform: rotate(135deg);
}

@keyframes wiggle {
  0%,
  60%,
  100% {
    rotate: 0deg;
  }
  66% {
    rotate: -14deg;
  }
  72% {
    rotate: 12deg;
  }
  78% {
    rotate: -9deg;
  }
  84% {
    rotate: 6deg;
  }
}

.ring.is-refused {
  animation: refuse 0.5s var(--ease);
}

.ring.is-refused .ring__state {
  color: var(--red);
}

.ring.is-refused .ring__halo,
.ring.is-taken .ring__halo {
  display: none;
}

.ring.is-refused .ring__key--yes,
.ring.is-taken .ring__key--yes {
  animation: none;
}

@keyframes refuse {
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

/* La bande d'actualité du bas. */
.tape {
  position: absolute;
  inset: auto 0 0 0;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.7);
  overflow: hidden;
}

.tape__run {
  display: flex;
  width: max-content;
  padding: 13px 0;
  animation: tape 64s linear infinite;
}

.tape__run span {
  padding: 0 22px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
}

.tape__run b {
  padding: 3px 7px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.tape__run span::after {
  content: '/';
  margin-left: 44px;
  color: var(--yellow);
}

@keyframes tape {
  to {
    transform: translateX(-50%);
  }
}

/* ───────────── Pièces ───────────── */

.piece {
  position: relative;
  padding: clamp(76px, 11vw, 150px) 0;
}

.piece__head {
  width: var(--wrap);
  margin: 0 auto clamp(34px, 5vw, 60px);
  display: grid;
  justify-items: start;
}

.piece__head h2,
.fin h2 {
  width: 100%;
  padding-top: 26px;
  border-top: 1px solid var(--line2);
  font: 900 clamp(42px, 6.6vw, 92px) / 0.92 var(--display);
  text-transform: uppercase;
  max-width: 14ch;
  text-wrap: balance;
}

.piece__lead {
  margin-top: 20px;
  max-width: 56ch;
  color: var(--soft);
  font-size: clamp(16px, 1.35vw, 19px);
  text-wrap: pretty;
}

/* ───────────── Pièce 001 : la méthode ───────────── */

.methode__stage {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.steps {
  display: grid;
  border-top: 1px solid var(--line);
}

.step {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 8px;
  width: 100%;
  padding: 20px 0 20px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background 0.3s;
}

/* La réglette jaune : elle se remplit pendant que l'écran reste affiché. */
.step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--yellow);
  transform: scaleY(var(--p));
  transform-origin: top;
}

.step__n {
  padding-top: 7px;
  font: 700 12px/1 var(--mono);
  letter-spacing: 1px;
  color: var(--faint);
  transition: color 0.3s;
}

.step__t {
  font: 900 clamp(24px, 2.7vw, 36px) / 1 var(--display);
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.step__d {
  grid-column: 2;
  display: block;
  max-height: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.5;
  opacity: 0;
  transition:
    max-height 0.5s var(--ease),
    opacity 0.4s,
    margin 0.5s var(--ease);
}

.step:hover .step__t {
  color: var(--text);
}

.step.is-on {
  background: linear-gradient(90deg, rgba(245, 217, 10, 0.07), transparent 70%);
}

.step.is-on .step__n {
  color: var(--yellow);
}

.step.is-on .step__t {
  color: var(--text);
}

.step.is-on .step__d {
  max-height: 160px;
  margin-top: 10px;
  opacity: 1;
}

.phone {
  position: sticky;
  top: 104px;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.phone__glow {
  position: absolute;
  inset: 8% -18% 12%;
  background: radial-gradient(closest-side, rgba(245, 217, 10, 0.2), transparent);
  filter: blur(10px);
  animation: breathe 5s ease-in-out infinite alternate;
}

.phone__body {
  position: relative;
  width: min(310px, 72vw);
  padding: 9px;
  border-radius: 50px;
  background: linear-gradient(145deg, #2c2c2e, #0c0c0d 40%, #1d1d1f);
  box-shadow:
    0 0 0 1px #3a3a3c,
    0 40px 90px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: rotate(2.5deg);
  transition: transform 0.6s var(--ease);
}

.phone:hover .phone__body {
  transform: rotate(0deg);
}

.phone__island {
  position: absolute;
  top: 19px;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 24px;
  margin-left: -42px;
  border-radius: 14px;
  background: #000;
}

.phone__screen {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: 42px;
  overflow: hidden;
  background: var(--ink);
  container-type: inline-size;
}

.phone__screen [data-screen] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.45s,
    transform 0.7s var(--ease);
}

/* Une capture de l'app tient sous la barre d'état (50 points sur 844), à sa taille : rien n'est rogné. */
.phone__screen img[data-screen] {
  top: calc(100% * 50 / 844);
  height: auto;
}

.phone__status {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(100% * 50 / 844);
  padding: 1.2cqw 8.5cqw 0 11.5cqw;
  color: #fff;
  font: 600 11px/1 var(--body);
  font-size: 4cqw;
  pointer-events: none;
}

.phone__status svg {
  height: 3.3cqw;
  fill: currentColor;
}

.phone__screen [data-screen].is-on {
  opacity: 1;
  transform: none;
}

.phone__flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.phone__flash.go {
  animation: flash 0.38s ease-out;
}

@keyframes flash {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 0;
  }
}

.phone__cap {
  font: 500 11px/1 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Le son de l'appel : l'invitation à écouter, puis trois barres qui dansent quand on écoute. */
.phone__sound {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -4px;
  padding: 8px 14px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--soft);
  transition:
    color 0.25s,
    border-color 0.25s,
    background 0.25s;
}

.phone__sound[hidden] {
  display: none;
}

.phone__sound::before {
  content: '';
  width: 14px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 3px 45% no-repeat,
    linear-gradient(currentColor, currentColor) 50% 100% / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 3px 65% no-repeat;
}

.phone__sound.is-on {
  border-color: var(--yellow);
  background: rgba(245, 217, 10, 0.1);
  color: var(--yellow);
}

.phone__sound.is-on::before {
  animation: bars 0.7s ease-in-out infinite alternate;
}

@keyframes bars {
  to {
    background-size:
      3px 100%,
      3px 40%,
      3px 90%;
  }
}

/* L'appel rejoué (js/call.js) : l'écran d'appel de l'app, dessiné pour un téléphone de 390 × 844 puis réduit à la
   taille du cadre (--k). */
.call {
  overflow: hidden;
  background: #111;
}

.call__fit {
  --k: 0.75;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 844px;
  transform: scale(var(--k));
  transform-origin: 0 0;
  font-family: var(--body);
}

.call__bg {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  max-width: none;
  height: calc(100% + 80px);
  object-fit: cover;
  object-position: top;
  filter: blur(28px);
  opacity: 0.75;
}

.call__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.85));
}

.call__head {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-top: 66px;
}

.call__face {
  width: 96px;
  height: 96px;
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.call__status {
  font-size: 15px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
}

.call__name {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.6px;
}

.call__clock {
  font: 500 15px/1.3 var(--mono);
  color: rgba(255, 255, 255, 0.75);
}

.call__stress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font: 500 11px/1 var(--mono);
  letter-spacing: 1px;
}

.call__stress i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: beat 1.4s ease-in-out infinite;
}

.call__stress b {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.call__stress u {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--orange);
  transition:
    width 0.9s var(--ease),
    background 0.4s;
}

.call__stress.is-high i {
  background: var(--red);
  animation-duration: 0.6s;
}

.call__stress.is-high u {
  background: var(--red);
}

@keyframes beat {
  50% {
    opacity: 0.4;
    transform: scale(1.6);
  }
}

.call__wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 300px;
  height: 70px;
  margin-top: 10px;
}

.call__wave i {
  width: 3px;
  height: 8%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  transition: height 0.09s linear;
}

.call__wave.is-live i {
  background: #fff;
}

.call__lines {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 22px 8px;
  overflow: hidden;
}

.call__line {
  display: grid;
  gap: 4px;
  max-width: 88%;
  animation: line 0.4s var(--ease) both;
  transition: opacity 0.4s;
}

.call__line small {
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 1px;
}

.call__line--them {
  align-self: flex-start;
}

.call__line--them small {
  color: rgba(255, 255, 255, 0.6);
}

.call__line--them span {
  font-weight: 500;
  font-size: 20px;
  line-height: 26px;
  color: #fff;
}

.call__line--me {
  align-self: flex-end;
  text-align: right;
}

.call__line--me small {
  color: var(--yellow);
}

.call__line--me span {
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.75);
}

.call__line.is-old {
  opacity: 0.45;
}

@keyframes line {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.call__keys {
  position: relative;
  display: flex;
  justify-content: space-around;
  padding: 14px 18px 36px;
}

.call__key {
  display: grid;
  justify-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 12px;
}

.call__key b {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.15s;
}

.call__key svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call__key--proofs b {
  border-color: transparent;
  background: var(--yellow);
}

.call__key--proofs svg {
  stroke: var(--ink);
}

.call__key em {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--text);
  color: var(--ink);
  font: 700 11px/18px var(--body);
  font-style: normal;
  text-align: center;
}

.call__key--end b {
  border-color: transparent;
  background: var(--red);
}

.call__key--end svg {
  fill: #fff;
}

.call__key.is-pressed b {
  transform: scale(0.88);
}

/* Le tiroir des preuves : la liste, puis la pièce ouverte et son bouton. */
.call__sheet {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 34px;
  border-radius: 26px 26px 0 0;
  background: var(--panel);
  transform: translateY(105%);
  transition: transform 0.45s var(--ease);
}

.call__sheet.is-up {
  transform: none;
}

.call__grip {
  display: block;
  width: 40px;
  height: 5px;
  margin: 8px auto 12px;
  border-radius: 3px;
  background: var(--dim);
}

.call__list,
.call__open {
  padding: 0 18px;
}

.call__open,
.call__sheet.is-open .call__list {
  display: none;
}

.call__sheet.is-open .call__open {
  display: block;
}

.call__sheet-title {
  font-weight: 600;
  font-size: 17px;
}

.call__sheet-sub {
  margin: 2px 0 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--soft);
}

.call__piece {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--panel2);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  transition: background 0.15s;
}

.call__piece i {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2a2a2c;
  font-style: normal;
  color: var(--soft);
}

.call__piece span {
  display: grid;
}

.call__piece small {
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 1.2px;
  color: var(--muted);
}

.call__piece.is-pressed {
  background: #2c2c2e;
}

.call__piece--open {
  margin-top: 0;
  padding: 0;
  background: none;
}

.call__piece--open i {
  border-radius: 50%;
}

.call__resume {
  margin: 12px 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--soft);
}

.call__present {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s;
}

.call__present i {
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.call__present.is-pressed {
  transform: scale(0.97);
}

/* Le doigt qui montre où toucher. */
.call__finger {
  --fx: 300px;
  --fy: 620px;
  --fs: 1;
  position: absolute;
  left: -23px;
  top: -23px;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(var(--fx), var(--fy)) scale(var(--fs));
  transition:
    transform 0.6s var(--ease),
    opacity 0.3s,
    background 0.15s;
  pointer-events: none;
}

.call__finger.is-here {
  opacity: 1;
}

.call__finger.is-down {
  --fs: 0.76;
  background: rgba(255, 255, 255, 0.55);
  transition-duration: 0.15s, 0.3s, 0.15s;
}

/* ───────────── Pièce 002 : le mur, à la lampe torche ───────────── */

.wall {
  --tx: 50%;
  --ty: 45%;
  --tr: 300px;
  position: relative;
  height: clamp(620px, 84vh, 860px);
  border-block: 1px solid var(--line);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 7px),
    radial-gradient(120% 90% at 50% 0%, #1c1913, #0d0c0a 70%);
  overflow: hidden;
  cursor: none;
  touch-action: pan-y;
}

/* Le halo : sur le mur nu, c'est lui qui montre où passe le faisceau. */
.wall__light {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle calc(var(--tr) * 0.85) at var(--tx) var(--ty),
    rgba(239, 235, 225, 0.2),
    rgba(239, 235, 225, 0.08) 45%,
    transparent 100%
  );
}

.wall__board {
  position: relative;
  width: min(1120px, 100% - 2 * var(--gutter));
  height: 100%;
  margin: 0 auto;
}

/* Le noir : un seul dégradé, troué là où pointe la lampe. */
.wall__dark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle var(--tr) at var(--tx) var(--ty),
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 0.05) 38%,
    rgba(10, 10, 10, 0.62) 70%,
    rgba(10, 10, 10, 0.965) 94%
  );
}

.wall__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font: 500 11px/1 var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--soft);
  pointer-events: none;
  transition: opacity 0.6s;
}

.wall__hint.is-gone {
  opacity: 0;
}

.polaroid {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(104px, 17vw, 196px);
  padding: 8px 8px 0;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
  transform: rotate(var(--r));
  transition: transform 0.4s var(--ease);
}

.polaroid::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a82, var(--red) 55%, #8f1a13);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 4.5;
  object-fit: cover;
  object-position: top;
  filter: grayscale(0.25) contrast(1.05);
}

.polaroid figcaption {
  display: grid;
  gap: 1px;
  padding: 7px 2px 9px;
  font: 500 clamp(8.5px, 0.95vw, 10.5px) / 1.25 var(--mono);
  letter-spacing: 0.3px;
  color: rgba(20, 20, 20, 0.62);
}

.polaroid figcaption b {
  font: 900 clamp(15px, 1.9vw, 22px) / 1 var(--display);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--paper-ink);
}

.polaroid .stamp {
  position: absolute;
  right: -10px;
  top: 38%;
  background: rgba(239, 235, 225, 0.82);
  font-size: clamp(9px, 1vw, 12px);
  transform: rotate(-12deg);
}

.note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  max-width: clamp(120px, 17vw, 210px);
  padding: 10px 12px 12px;
  background: #f2e488;
  color: #23200f;
  font: 600 clamp(15px, 1.7vw, 21px) / 1.1 var(--hand);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--r));
}

.note--small {
  background: var(--paper);
}

/* Les repères à l'encre invisible : ils ne répondent qu'à la lampe (--lit, posé par js/torch.js). */
.uv {
  --lit: 0;
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: flex-start;
  gap: 3px;
  font: 900 clamp(30px, 4.4vw, 54px) / 0.9 var(--display);
  color: var(--yellow);
  opacity: var(--lit);
  text-shadow:
    0 0 14px rgba(245, 217, 10, 0.9),
    0 0 40px rgba(245, 217, 10, 0.5);
  transform: rotate(-4deg) scale(calc(0.9 + var(--lit) * 0.1));
  pointer-events: none;
}

.uv i {
  padding: 2px 5px;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  font: 700 11px/1.2 var(--mono);
  font-style: normal;
  text-shadow: none;
}

/* ───────────── Pièce 003 : les affaires ───────────── */

.case {
  --rx: 0deg;
  --ry: 0deg;
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  perspective: 1400px;
}

.case + .case {
  margin-top: clamp(64px, 9vw, 130px);
}

.case--ocre .case__media {
  order: 2;
}

.case__media {
  position: relative;
  aspect-ratio: 16 / 10.5;
  border: 1px solid var(--line2);
  border-radius: 22px;
  overflow: hidden;
  background: var(--night);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.4s var(--ease);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.case__media video,
.case__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 10, 0.75));
  pointer-events: none;
}

.case__place {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 1;
  padding: 6px 10px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.6);
  font: 500 11px/1 var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* L'Affaire 02 : deux parois peintes qui se chevauchent. */
.case__media--duo {
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
}

.case__media--duo::after {
  display: none;
}

.case__media--duo > img {
  position: absolute;
  width: 58%;
  height: 112%;
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  transition: transform 0.6s var(--ease);
}

.case__media--duo > img:first-child {
  left: 2%;
  top: -10%;
  transform: rotate(-4deg);
}

.case__media--duo > img:nth-child(2) {
  right: 0;
  top: 4%;
  transform: rotate(3deg);
}

.case--ocre:hover .case__media--duo > img:first-child {
  transform: rotate(-6deg) translate(-8px, -6px);
}

.case--ocre:hover .case__media--duo > img:nth-child(2) {
  transform: rotate(5deg) translate(8px, 6px);
}

.case__media--duo .case__place {
  left: auto;
  right: 12px;
  top: auto;
  bottom: -2%;
}

.case__file {
  display: grid;
  justify-items: start;
}

.tab--file {
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.case__sheet,
.next__sheet {
  position: relative;
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line2);
  border-radius: 0 20px 20px 20px;
  background: var(--panel);
}

.case__sheet .stamp,
.next__sheet .stamp {
  position: absolute;
  right: 18px;
  top: -16px;
  background: var(--panel);
}

.case__sheet .stamp.in {
  animation: slam 0.32s cubic-bezier(0.5, 0, 0.9, 0.4) both;
}

@keyframes slam {
  from {
    opacity: 0;
    transform: rotate(-7deg) scale(2.4);
  }
  to {
    opacity: 0.92;
    transform: rotate(-7deg) scale(1);
  }
}

.case h3,
.next h3 {
  font: 900 clamp(38px, 4.6vw, 64px) / 0.92 var(--display);
  text-transform: uppercase;
}

.case__meta {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.case__pitch {
  color: var(--soft);
  font-size: 16.5px;
  line-height: 1.62;
  text-wrap: pretty;
}

/* Le caviardage : une bande noire qui se lève sous la souris, le doigt ou le clavier. */
.redact {
  position: relative;
  color: transparent;
  background: #2e2e30;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  cursor: help;
  transition:
    color 0.35s,
    background 0.35s;
}

.redact:hover,
.redact:focus,
.redact.is-read {
  color: var(--text);
  background: rgba(245, 217, 10, 0.16);
  outline: none;
}

.case--ocre .redact:hover,
.case--ocre .redact:focus,
.case--ocre .redact.is-read {
  background: rgba(210, 116, 58, 0.2);
}

.case__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 4px 0 6px;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.case__facts b {
  margin-right: 6px;
  font: 900 26px/1 var(--display);
  letter-spacing: 0;
  color: var(--yellow);
  vertical-align: -3px;
}

.case--ocre .case__facts b {
  color: var(--ocre);
}

/* ───────────── Pièce 004 : les cryptex ───────────── */

.scelles {
  background: radial-gradient(70% 50% at 50% 60%, rgba(201, 162, 63, 0.09), transparent 70%), var(--night);
  border-block: 1px solid var(--line);
}

.vault {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 30px;
}

.vault__lock {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.vault__lock[hidden],
.vault__slip[hidden],
.next[hidden] {
  display: none;
}

.vault__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 12px;
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.vault__label b {
  font: 900 28px/1 var(--display);
  letter-spacing: 0.5px;
  color: var(--brass);
}

.vault__state {
  font: 700 11px/1 var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--faint);
}

.vault__state.is-open {
  color: var(--green);
}

.cryptex {
  --fh: 36px; /* hauteur d'une lettre ; le rayon du tambour s'en déduit (js/cryptex.js) */
  --rw: 46px;
  position: relative;
  display: flex;
  gap: 5px;
  padding: 10px 26px;
  border-radius: 26px;
  background: linear-gradient(180deg, #3a3018, #17130a 46%, #0d0b06 54%, #2a2211);
  box-shadow:
    0 0 0 1px var(--brass-dark),
    0 30px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 233, 160, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Les deux embouts de laiton. */
.cryptex::before,
.cryptex::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 20px;
  height: 64%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #f2d67a, #a17a22 40%, #5a4312 60%, #c9a23f);
  box-shadow: 0 0 0 1px #3d2f0c;
}

.cryptex::before {
  left: -12px;
  border-radius: 9px 3px 3px 9px;
}

.cryptex::after {
  right: -12px;
  border-radius: 3px 9px 9px 3px;
}

.wheel {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.wheel__arrow {
  display: grid;
  place-items: center;
  width: var(--rw);
  height: 26px;
  color: var(--brass);
  opacity: 0.65;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.wheel__arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wheel__arrow:hover {
  opacity: 1;
}

.wheel__arrow:active {
  transform: scale(0.85);
}

.wheel__window {
  position: relative;
  width: var(--rw);
  height: calc(var(--fh) * 3.7);
  border-radius: 7px;
  overflow: hidden;
  perspective: 620px;
  background: #050403;
  box-shadow: inset 0 0 0 1px #000;
  cursor: grab;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
}

.wheel__window:active {
  cursor: grabbing;
}

.wheel__window:focus-visible {
  outline-offset: 1px;
}

.wheel__drum {
  --a: 0deg;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--R) * -1)) rotateX(var(--a));
  transition: transform 0.28s var(--ease);
}

.wheel.is-dragging .wheel__drum {
  transition: none;
}

.wheel__face {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - var(--fh) / 2);
  height: var(--fh);
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(180deg, #d9b655, #b08a2c 50%, #8c6b1c);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 200, 0.5),
    inset 0 -1px 0 rgba(40, 28, 4, 0.7);
  color: #1c1503;
  font: 900 calc(var(--fh) * 0.74) / 1 var(--display);
}

/* La ligne de lecture. */
.cryptex__line {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: calc(var(--fh) + 6px);
  margin-top: calc(var(--fh) / -2 - 3px);
  border-block: 2px solid var(--yellow);
  pointer-events: none;
  box-shadow: 0 0 22px rgba(245, 217, 10, 0.25);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.cryptex.is-open .cryptex__line {
  border-color: var(--green);
  box-shadow: 0 0 34px rgba(48, 209, 88, 0.5);
}

.cryptex.is-open .wheel__arrow {
  visibility: hidden;
}

.cryptex.is-open .wheel__window {
  cursor: default;
}

.cryptex.is-open {
  animation: unlock 0.7s var(--ease);
}

@keyframes unlock {
  30% {
    transform: scale(1.04);
    filter: brightness(1.5);
  }
}

/* La bande de papier qui sort du premier cryptex. */
.vault__slip {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 28px 20px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.5deg);
  animation: slip 0.8s var(--ease) both;
  max-width: 100%;
}

@keyframes slip {
  from {
    opacity: 0;
    transform: translateY(-46px) rotate(4deg) scaleY(0.4);
  }
}

.vault__slip-tag {
  font: 500 10px/1 var(--mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(20, 20, 20, 0.55);
}

.vault__cipher {
  font: 700 clamp(22px, 5.4vw, 38px) / 1 var(--mono);
  letter-spacing: 2px;
  white-space: nowrap;
}

.vault__clue {
  font: 600 clamp(20px, 2.6vw, 26px) / 1.1 var(--hand);
  text-align: center;
}

/* L'affaire suivante. */
.next {
  position: relative;
  width: min(640px, 100%);
  display: grid;
  justify-items: start;
  animation: slip 0.9s var(--ease) both;
}

.next__sheet {
  border-color: rgba(245, 217, 10, 0.5);
  box-shadow: 0 0 80px rgba(245, 217, 10, 0.12);
}

.next__sheet p {
  color: var(--soft);
  max-width: 52ch;
}

.next__wait {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted) !important;
}

/* Le sceau saute. */
.next__seal {
  position: absolute;
  right: 26px;
  bottom: -34px;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6f66, #c5271d 55%, #7a130c);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
  animation: seal 1.1s var(--ease) 0.5s both;
}

.next__seal img {
  width: 54px;
  height: 54px;
  filter: brightness(0) invert(0.12);
  opacity: 0.55;
}

@keyframes seal {
  0% {
    transform: scale(1) rotate(0deg);
  }
  35% {
    transform: scale(1.18) rotate(-8deg);
  }
  100% {
    transform: translate(40px, 30px) rotate(24deg);
  }
}

.vault__reset {
  font: 500 11px/1 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.vault__reset:hover {
  color: var(--soft);
}

/* ───────────── Pièce 005 : la capitaine par SMS ───────────── */

.ligne {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 6vw, 90px);
  align-items: center;
}

.ligne .piece__head {
  width: auto;
  margin: 0;
}

.ligne__lines {
  display: grid;
  gap: 4px;
  margin-top: 30px;
  font: 600 clamp(24px, 2.7vw, 34px) / 1.15 var(--hand);
  color: var(--faint);
}

.ligne__lines li:nth-child(2) {
  margin-left: 2ch;
  color: var(--muted);
}

.ligne__lines li:nth-child(3) {
  margin-left: 5ch;
}

.sms {
  width: min(390px, 100%);
  height: min(680px, 82svh);
  display: flex;
  flex-direction: column;
  border: 1px solid #2a2a2c;
  border-radius: 44px;
  background: #000;
  overflow: hidden;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.7),
    0 0 0 8px #0d0d0e,
    0 0 0 9px #2c2c2e;
}

.sms__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 16px 12px;
  background: linear-gradient(180deg, #000 55%, transparent);
}

.sms__round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s;
}

.sms__round:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sms__round svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sms__round[data-app] svg {
  fill: none;
  stroke-width: 1.8;
}

.sms__who {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.sms__who img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.sms__who span {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 600;
  font-size: 13px;
}

.sms__who i {
  font-style: normal;
  color: var(--muted);
}

.sms__thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 12px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.sms__thread::-webkit-scrollbar {
  display: none;
}

.sms__time {
  align-self: center;
  margin: 8px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.bubble {
  max-width: 80%;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.32;
  overflow-wrap: anywhere;
  animation: pop 0.34s var(--ease) both;
}

.bubble--them {
  align-self: flex-start;
  background: #26262a;
  border-bottom-left-radius: 6px;
  transform-origin: left bottom;
}

.bubble--me {
  align-self: flex-end;
  margin-top: 6px;
  margin-bottom: 6px;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 6px;
  transform-origin: right bottom;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.72) translateY(8px);
  }
}

.bubble--dots {
  display: flex;
  gap: 5px;
  padding: 14px;
}

.bubble--dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8e8e93;
  animation: dots 1.2s ease-in-out infinite;
}

.bubble--dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.bubble--dots i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes dots {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: none;
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.sms__chips {
  display: flex;
  gap: 8px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sms__chips::-webkit-scrollbar {
  display: none;
}

.sms__chips button {
  flex: none;
  padding: 8px 12px;
  border: 1px solid #3a3a3c;
  border-radius: 999px;
  font-size: 14px;
  color: var(--blue);
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.2s;
}

.sms__chips button:hover {
  background: rgba(10, 132, 255, 0.14);
}

.sms__chips button:active {
  transform: scale(0.95);
}

.sms__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 18px;
}

.sms__plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1c1c1e;
  font-size: 22px;
  line-height: 1;
}

.sms__form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #2c2c2e;
  border-radius: 21px;
  background: #0b0b0c;
  color: var(--text);
  font: 400 16px/1 var(--body);
}

.sms__form input::placeholder {
  color: #6b6b70;
}

.sms__form input:focus {
  outline: none;
  border-color: #48484a;
}

.sms__form button {
  display: grid;
  place-items: center;
  flex: none;
  width: 0;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  overflow: hidden;
  transition:
    width 0.25s var(--ease),
    opacity 0.2s;
}

.sms__form.has-text button {
  width: 36px;
  opacity: 1;
}

.sms__form button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────────── Clôture ───────────── */

.fin {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(90px, 12vw, 150px);
  text-align: center;
  overflow: hidden;
  background: radial-gradient(60% 45% at 50% 22%, rgba(245, 217, 10, 0.13), transparent 70%);
}

.fin__logo {
  width: min(330px, 70vw);
  height: auto;
  animation: breathe-logo 5s ease-in-out infinite alternate;
}

@keyframes breathe-logo {
  from {
    filter: drop-shadow(0 0 30px rgba(245, 217, 10, 0.15));
  }
  to {
    filter: drop-shadow(0 0 60px rgba(245, 217, 10, 0.35));
  }
}

.fin h2 {
  border: 0;
  padding: 0;
  max-width: 16ch;
}

.fin p {
  color: var(--soft);
  margin-bottom: 10px;
}

.foot {
  display: grid;
  gap: 6px;
  padding: 26px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

.foot b {
  color: var(--soft);
}

/* ───────────── La notification de la capitaine ───────────── */

/* En haut à gauche : à droite, elle couvrirait le téléphone de démonstration. */
.ping {
  position: fixed;
  top: 74px;
  left: var(--gutter);
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(370px, calc(100% - 2 * var(--gutter)));
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: 22px;
  background: rgba(30, 30, 32, 0.78);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  text-align: left;
  animation: ping 0.6s var(--ease) both;
}

.ping[hidden] {
  display: none;
}

.ping.is-leaving {
  animation: ping-out 0.4s var(--ease) both;
}

@keyframes ping {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.94);
  }
}

@keyframes ping-out {
  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.94);
  }
}

.ping img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.ping span {
  display: grid;
  font-size: 14px;
  line-height: 1.3;
}

.ping i {
  font-style: normal;
  color: var(--soft);
}

.ping small {
  align-self: start;
  font-size: 11px;
  color: var(--muted);
}

/* ───────────── La bande-annonce ───────────── */

.cine {
  width: min(1100px, 100% - 2 * var(--gutter));
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: #000;
  overflow: visible;
}

.cine::backdrop {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(6px);
}

.cine video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 17px;
}

.cine__close {
  position: absolute;
  right: 0;
  top: -52px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.8);
}

.cine__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* ───────────── Petits écrans ───────────── */

@media (max-width: 900px) {
  .bar__nav {
    display: none;
  }

  .bar .btn {
    margin-left: auto;
  }

  .hero {
    padding-bottom: 70px;
  }

  .ring {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 26px;
  }

  .methode__stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone {
    position: relative;
    top: auto;
    order: -1;
  }

  .phone__body {
    width: min(250px, 62vw);
    border-radius: 42px;
  }

  .phone__screen {
    border-radius: 34px;
  }

  .phone__island {
    width: 66px;
    height: 19px;
    margin-left: -33px;
    top: 17px;
  }

  .case {
    grid-template-columns: minmax(0, 1fr);
  }

  .case--ocre .case__media {
    order: 0;
  }

  .case__media--duo {
    aspect-ratio: 16 / 12.5;
    margin-bottom: 26px;
  }

  .ligne {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .ligne .piece__head {
    justify-self: stretch;
  }

  .ligne__lines {
    display: none;
  }
}

@media (max-width: 640px) {
  .bar {
    gap: 10px;
  }

  .bar__brand {
    font-size: 17px;
    gap: 8px;
  }

  .bar__brand img {
    width: 30px;
    height: 30px;
  }

  .bar .btn--small {
    padding: 9px 12px;
    font-size: 13px;
  }

  .ring {
    gap: 12px;
  }

  .ring__name {
    font-size: 22px;
  }

  .ring__role {
    font-size: 12px;
  }

  .wall {
    --tr: 230px;
    height: 630px;
    cursor: default;
  }

  .polaroid {
    width: 31%;
  }

  .note {
    max-width: 34%;
  }

  .cryptex {
    --fh: 30px;
    --rw: 33px;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 20px;
  }

  .cryptex::before,
  .cryptex::after {
    width: 12px;
  }

  .cryptex::before {
    left: -8px;
  }

  .cryptex::after {
    right: -8px;
  }

  .sms {
    border-radius: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .tape__run {
    animation: none;
  }
}
