/* =================================================================
   ATOM IMPACT AI — reactor.css
   « L'IA en action » : scène 3D épinglée pendant le défilement,
   chapitres, console-téléphone (clin d'œil aux apps métier du
   portfolio), chaîne moléculaire de progression, étiquettes 3D.

   Sans JS / sans WebGL : lecture classique, chapitres en cartes.
   Avec JS (html.rx-on) : section haute de 600vh, scène collante.
   ================================================================= */

.reactor {
  position: relative;
  background: var(--bg-deep);
  scroll-margin-top: -80px;   /* annule le scroll-padding global : l'ancre tombe pile sur la scène */
}

/* ── Lecture classique (repli) ─────────────────────────────────── */
#reactor-canvas, .rx-veil, .rx-labels, .rx-phone, .rx-strip, .rx-chain, .rx-hint { display: none; }

.rx-ui {
  max-width: 1200px;
  margin: 0 auto;
  padding: 128px 24px;
}
/* .rx-eyebrow, .rx-num, .rx-intro-kicker : style commun des libellés (css/styles.css) */
.rx-chapters {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 1rem;
}
.rx-chapter {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 34px 30px;
}
/* « 01 / 05 - Aujourd'hui » contient un fragment grisé : texte d'un seul tenant, trait en ligne */
.rx-num { display: block; margin-bottom: 1rem; }
.rx-num::before { display: inline-block; vertical-align: .32em; margin-right: .6rem; }
.rx-num i { font-style: normal; color: var(--ink-500); }
.rx-chapter h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 1rem;
}
.rx-chapter p { color: var(--ink-300); }
.rx-chapter p strong { color: var(--ink-100); font-weight: 600; }

/* Acte 1 : légende de l'image (point rouge = tâche en attente) + invitation à défiler */
.rx-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 1.3rem;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.rx-legend li { display: flex; align-items: center; gap: 9px; }
.rx-legend li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff6b52;
  box-shadow: 0 0 10px rgba(255, 74, 58, 0.9);
}
.rx-legend .rx-legend--done::before { background: var(--cyan); box-shadow: 0 0 10px rgba(0, 212, 255, 0.9); }
.rx-next { display: none; }   /* sans la scène 3D, rien à faire défiler */
.rx-on .rx-chapter p.rx-next {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--cyan);
}
.rx-next::after {
  content: '↓';
  display: inline-block;
  margin-left: 10px;
  font-family: var(--ff-body, inherit);
  font-size: 14px;
  animation: rxNext 1.8s ease-in-out infinite;
}
@keyframes rxNext {
  0%, 100% { transform: translateY(-2px); opacity: .5; }
  50%      { transform: translateY(3px);  opacity: 1; }
}.rx-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 1.8rem;
}

/* ── Mode cinéma ───────────────────────────────────────────────── */
.rx-on .reactor { height: 600vh; }
.rx-on .rx-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}
.rx-on #reactor-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.rx-on .reactor--ready #reactor-canvas { opacity: 1; }

/* Voile : lisibilité du texte, vignettage, grille fine, grain */
.rx-on .rx-veil {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 13, 0.9) 0%, rgba(4, 5, 13, 0.55) 24%, rgba(4, 5, 13, 0) 44%),
    radial-gradient(120% 95% at 56% 50%, transparent 52%, rgba(4, 5, 13, 0.72) 100%);
}
.rx-on .rx-veil::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(68, 136, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 136, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 56% 50%, #000 15%, transparent 80%);
  mask-image: radial-gradient(ellipse 55% 65% at 56% 50%, #000 15%, transparent 80%);
  opacity: .55;
}
.rx-on .rx-veil::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.rx-on .rx-labels {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.rx-on .rx-ui {
  position: absolute;
  inset: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.rx-on .rx-ui a,
.rx-on .rx-ui button { pointer-events: auto; }

.rx-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.rx-on .rx-head {
  position: absolute;
  top: 92px;
  left: clamp(24px, 5vw, 88px);
}
.rx-on .rx-eyebrow { margin: 0; }

/* Bouton « Mode d'emploi » : rouvre la fenêtre d'explication (seulement si la 3D tourne) */
.rx-help { display: none; }
.rx-on .reactor--ready .rx-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: rgba(4, 5, 13, 0.5);
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-300);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.rx-help i {
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.14);
  color: var(--cyan);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}
.rx-on .reactor--ready .rx-help:hover { color: var(--ink-100); border-color: var(--cyan); background: rgba(0, 212, 255, 0.08); }
.rx-help:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Chapitres superposés : un seul visible à la fois */
.rx-on .rx-chapters {
  position: absolute;
  left: clamp(24px, 5vw, 88px);
  top: 50%;
  transform: translateY(-46%);
  width: min(440px, 34vw);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}
/* Les chapitres inactifs restent lisibles par les lecteurs d'écran :
   on les efface visuellement (opacité) sans visibility:hidden. */
.rx-on .rx-chapter {
  grid-area: 1 / 1;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition: opacity .6s ease, transform .9s var(--ease), filter .6s ease;
}
.rx-on .rx-chapter:not(.is-active) a,
.rx-on .rx-chapter:not(.is-active) button { pointer-events: none; }
.rx-on .rx-chapter.is-past { transform: translateY(-30px); }
.rx-on .rx-chapter.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .7s ease .1s, transform 1s var(--ease) .1s, filter .7s ease .1s;
}
.rx-on .rx-chapter h3 {
  font-size: clamp(2.1rem, 3.5vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.3rem;
  text-shadow: 0 4px 30px rgba(4, 5, 13, 0.8);
}
.rx-on .rx-chapter p {
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 40ch;
  text-shadow: 0 2px 16px rgba(4, 5, 13, 0.9);
}
.rx-on .rx-num { margin-bottom: 1.2rem; }

/* ── Console-téléphone (inspirée de la vitrine #app du portfolio) ── */
.rx-on .rx-phone {
  display: block;
  position: absolute;
  right: clamp(24px, 4.6vw, 88px);
  top: 50%;
  width: 256px;
  transform: translateY(-50%);
  perspective: 1300px;
  opacity: 0;
  transition: opacity 1s ease .3s;
}
.rx-on .reactor--ready .rx-phone { opacity: 1; }
.rx-phone::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 380px; height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.14) 0%, transparent 68%);
  pointer-events: none;
}
.rx-device {
  position: relative;
  background: #06070d;
  border-radius: 34px;
  padding: 7px;
  border: 1px solid #232d45;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(68, 136, 255, 0.12),
    0 0 90px rgba(0, 212, 255, 0.10);
  transform: rotateY(-15deg) rotateX(4deg) rotateZ(.6deg);
  transform-style: preserve-3d;
  animation: rxFloat 5.5s ease-in-out infinite;
}
@keyframes rxFloat {
  0%, 100% { transform: rotateY(-15deg) rotateX(4deg) rotateZ(.6deg) translateY(0); }
  50%      { transform: rotateY(-12deg) rotateX(3deg) rotateZ(.6deg) translateY(-14px); }
}
.rx-screen {
  position: relative;
  border-radius: 27px;
  overflow: hidden;
  height: 520px;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(30, 95, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0b1427 0%, #070b16 100%);
  color: var(--ink-100);
}
.rx-screen::after {   /* reflet de verre */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 32%);
  pointer-events: none;
}
.rx-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 8px 0;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 11px;
  color: #dfe3ee;
}
.rx-sys { display: inline-flex; gap: 3px; align-items: flex-end; }
.rx-sys i { display: block; width: 3px; background: #dfe3ee; border-radius: 1px; }
.rx-sys i:nth-child(1) { height: 5px; }
.rx-sys i:nth-child(2) { height: 7px; }
.rx-sys i:nth-child(3) { height: 9px; margin-right: 4px; box-shadow: 8px 0 0 -1px transparent; }
.rx-sys::after {
  content: '';
  width: 18px; height: 9px;
  border: 1.5px solid #dfe3ee;
  border-radius: 3px;
  background: linear-gradient(90deg, #dfe3ee 70%, transparent 70%) content-box;
  padding: 1px;
}
.rx-apphead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid rgba(68, 136, 255, 0.14);
}
.rx-apphead img { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(68, 136, 255, 0.5)); }
.rx-appname { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.rx-appname strong { font-family: var(--ff-display); font-weight: 700; font-size: 13.5px; letter-spacing: .01em; }
.rx-appname span {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ff7a5c;
  transition: color .4s;
}
.rx-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff3b2f;
  box-shadow: 0 0 10px #ff3b2f;
  animation: rxBlink 1.4s ease-in-out infinite;
}
.reactor:not([data-rx-step="0"]) .rx-appname span { color: var(--cyan); }
.reactor:not([data-rx-step="0"]) .rx-live { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.reactor[data-rx-step="4"] .rx-appname span { color: #38e07e; }
.reactor[data-rx-step="4"] .rx-live { background: #38e07e; box-shadow: 0 0 10px #38e07e; animation: none; }
@keyframes rxBlink { 50% { opacity: .35; } }

.rx-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.rx-kpi {
  padding: 9px 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(68, 136, 255, 0.14);
  min-width: 0;
}
.rx-kpi b, .rx-strip b {
  display: block;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rx-kpi span, .rx-strip span {
  display: block;
  margin-top: 2px;
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rx-kpi--warn b  { color: #ff6b52; }
.rx-kpi--ok b    { color: var(--cyan); }
.rx-kpi--human b { color: #38e07e; }

.rx-auto { padding: 2px 2px 0; }
.rx-auto-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.rx-auto-row b { font-family: var(--ff-display); font-size: 12px; color: var(--ink-100); letter-spacing: 0; }
.rx-auto-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.rx-auto-bar i {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}
.rx-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.rx-feed-head i {
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: linear-gradient(90deg, rgba(68, 136, 255, 0.3), transparent);
}
.rx-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  flex: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}
.rx-ev {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 10.5px;
  line-height: 1.3;
  color: #c9cde0;
}
.rx-ev i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px currentColor; color: var(--cyan); }
.rx-ev time { font-family: var(--ff-mono); font-size: 8.5px; color: var(--ink-500); }
.rx-ev span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ev--warn  i { background: #ff4a3a; color: #ff4a3a; }
.rx-ev--scan  i { background: #7fe9ff; color: #7fe9ff; animation: rxBlink 1s ease-in-out infinite; }
.rx-ev--link  i { background: #ffcc33; color: #ffcc33; }
.rx-ev--human i { background: #38e07e; color: #38e07e; }
.rx-ev--human { border-color: rgba(56, 224, 126, 0.25); background: rgba(56, 224, 126, 0.06); }
.rx-ev.is-new { animation: rxEvIn .55s var(--ease); }
@keyframes rxEvIn {
  from { opacity: 0; transform: translateY(-10px) scale(.97); background: rgba(0, 212, 255, 0.18); }
  to   { opacity: 1; transform: none; }
}

/* ── Chaîne moléculaire : 5 atomes liés = 5 actes ──────────────── */
.rx-on .rx-chain {
  display: flex;
  justify-content: space-between;
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: min(640px, 60vw);
  transform: translateX(-50%);
}
.rx-chain-track {
  position: absolute;
  left: 52px; right: 52px;
  top: 21px;
  height: 1.5px;
  background: rgba(68, 136, 255, 0.22);
}
.rx-chain-fill {
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}
.rx-step {
  position: relative;
  width: 104px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 15px 0 4px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  transition: color .3s;
}
.rx-step i {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1.5px solid rgba(68, 136, 255, 0.55);
  transition: background .3s, border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.rx-step:hover { color: var(--ink-100); }
.rx-step:hover i { transform: scale(1.25); border-color: var(--cyan); }
.rx-step.is-done i { background: var(--blue-light); border-color: var(--blue-light); }
.rx-step.is-active { color: var(--ink-100); }
.rx-step.is-active i {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 0 5px rgba(0, 212, 255, 0.16), 0 0 18px rgba(0, 212, 255, 0.9);
}
.rx-step:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }

/* Indice de navigation : en haut de la scène, lisible, jusqu'au dernier acte */
.rx-on .rx-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: calc((var(--rx-free-l, 0px) + var(--rx-free-r, 100%)) / 2);
  top: 132px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(var(--rx-free-r, 100%) - var(--rx-free-l, 0px));
  padding: 10px 20px 10px 14px;
  line-height: 1.4;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: rgba(4, 5, 13, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-100);
  transition: opacity .6s ease;
}
.rx-on .rx-hint b { color: var(--cyan); font-weight: 600; }
.rx-on [data-rx-step="4"] .rx-hint { opacity: 0; }
.rx-wheel {
  position: relative;
  width: 18px; height: 28px;
  border: 1.5px solid var(--ink-500);
  border-radius: 10px;
}
.rx-wheel::after {
  content: '';
  position: absolute;
  left: 50%; top: 5px;
  width: 3px; height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: rxWheel 1.8s ease-in-out infinite;
}
@keyframes rxWheel {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ── Mode d'emploi : prologue intégré à la scène ───────────────────
   Visible tant qu'on n'a pas cliqué « IA : quel impact ? » (.rx-intro-off) ;
   .rx-intro-force le réaffiche (bouton « Mode d'emploi »). */
.rx-intro { display: none; }
.rx-on .rx-intro {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: 16px;
  background: rgba(4, 5, 13, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.rx-on .reactor:not(.rx-intro-off) .rx-intro,
.rx-on .reactor.rx-intro-force .rx-intro {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease;
}
.rx-on .reactor--fallback .rx-intro { display: none; }
.rx-intro-card {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;   /* au bout de la carte, le défilement passe à la page : c'est lui qui lance l'animation */
  color: var(--ink-100);
  transform: translateY(14px);
  transition: transform .6s var(--ease);
  padding: 30px 34px 28px;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(0, 212, 255, 0.10), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(255, 90, 60, 0.07), transparent 60%),
    rgba(10, 15, 30, 0.94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 212, 255, 0.06) inset;
}
.rx-on .reactor:not(.rx-intro-off) .rx-intro-card,
.rx-on .reactor.rx-intro-force .rx-intro-card { transform: none; }
/* Scène pas encore calée en haut de l'écran : la carte ne défile pas toute seule, sinon sur
   téléphone le doigt fait défiler la carte au lieu de la page (js : classe .rx-docked) */
.rx-on .reactor:not(.rx-docked) .rx-intro-card { overflow-y: hidden; }

.rx-intro-kicker { margin-bottom: .8rem; }
.rx-intro h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 .8rem;
}
.rx-intro-lead { color: var(--ink-300); line-height: 1.6; margin: 0 0 1.2rem; }

/* 5 étapes : une chaîne verticale, le point rouge devient cyan comme dans l'animation */
.rx-intro-steps {
  list-style: none;
  counter-reset: rx;
  display: grid;
  gap: 8px;
  margin: 0 0 1.2rem;
  padding: 0;
}
.rx-intro-steps li {
  counter-increment: rx;
  display: grid;
  grid-template-columns: 26px 128px 1fr;
  column-gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}
.rx-intro-steps li::before {
  content: '0' counter(rx);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--cyan);
}
.rx-intro-steps li:first-child::before { color: #ff6b52; }
.rx-intro-steps b {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-100);
}
.rx-intro-steps span { color: var(--ink-300); font-size: .92rem; line-height: 1.45; }

.rx-intro-how {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 1.3rem;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(68, 136, 255, 0.07);
  border: 1px solid var(--border-soft);
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-300);
}
.rx-intro-how .rx-wheel { flex: none; }
.rx-intro-go { white-space: normal; text-align: center; line-height: 1.3; }

@media (max-width: 760px) {
  .rx-intro-card { padding: 22px 18px 0; border-radius: 18px; }
  .rx-intro-kicker { font-size: 10px; margin-bottom: .6rem; }
  .rx-intro h2 { font-size: 1.45rem; margin-bottom: .6rem; }
  .rx-intro-lead { font-size: .9rem; line-height: 1.5; margin-bottom: .8rem; }
  .rx-intro-steps { gap: 0; margin-bottom: .8rem; }
  .rx-intro-steps li { grid-template-columns: 24px 1fr; padding: 6px 0; }
  .rx-intro-steps li::before { grid-row: span 2; }
  .rx-intro-steps b { font-size: 14px; }
  .rx-intro-steps span { font-size: .84rem; line-height: 1.4; }
  .rx-intro-how { font-size: .84rem; padding: 8px 12px; margin-bottom: 0; }
  /* l'action principale reste toujours visible, même si la carte défile */
  .rx-intro-foot {
    position: sticky;
    bottom: 0;
    margin: 0 -18px;
    padding: 14px 18px 18px;
    background: linear-gradient(180deg, rgba(10, 15, 30, 0), rgba(10, 15, 30, 0.96) 30%);
  }
  .rx-intro-go { width: 100%; }
}

/* ── Étiquettes des outils (atome géant) ───────────────────────── */
.rx-label {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  opacity: 0;
  will-change: transform, opacity;
  --c: var(--cyan);
  --oy: 0px;
}
.rx-label::before {   /* tige : relie l'outil à son étiquette */
  content: '';
  position: absolute;
  left: -0.5px;
  bottom: 6px;
  width: 1px;
  height: calc(9px - var(--oy));
  background: linear-gradient(0deg, var(--c), rgba(255, 255, 255, 0.15));
}
.rx-pill {
  position: absolute;
  left: 0;
  bottom: calc(14px - var(--oy));
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  padding: 6px 12px 7px;
  border-radius: 10px;
  background: rgba(4, 5, 13, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.rx-pill b {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: #fff;
}
.rx-pill span {
  display: block;
  margin-top: 1px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c);
}

/* ── Écrans moyens : téléphone plus discret ────────────────────── */
@media (max-width: 1180px) {
  .rx-on .rx-phone { width: 226px; right: 24px; }
  .rx-screen { height: 470px; }
  .rx-on .rx-chapters { width: min(400px, 36vw); }
}
@media (max-height: 760px) and (min-width: 761px) {
  .rx-screen { height: 420px; }
  .rx-feed .rx-ev:nth-child(n+5) { display: none; }
  .rx-on .rx-head { top: 80px; }
}
@media (max-height: 640px) and (min-width: 761px) {
  .rx-on .rx-phone { display: none; }
  .rx-on .rx-chain { bottom: 14px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .rx-on .rx-phone { display: none; }
  .rx-on .rx-chapters { width: min(420px, 46vw); }
}

/* ── Téléphones : texte en bas, compteurs en haut ──────────────── */
@media (max-width: 760px) {
  .rx-on .rx-veil {
    background:
      linear-gradient(0deg, rgba(4, 5, 13, 0.95) 0%, rgba(4, 5, 13, 0.75) 30%, rgba(4, 5, 13, 0) 55%),
      linear-gradient(180deg, rgba(4, 5, 13, 0.7) 0%, rgba(4, 5, 13, 0) 22%);
  }
  /* en haut de l'écran, de haut en bas : indication (tout en haut, dans la bande que libère le menu
     masqué pendant la descente), « L'IA en action » (114 px), compteurs (150 px) */
  .rx-on .rx-head { top: 114px; left: 16px; right: 16px; gap: 8px 12px; flex-wrap: nowrap; }
  .rx-on .rx-eyebrow { font-size: 11px; }
  .rx-on .reactor--ready .rx-help { padding: 5px; }
  .rx-help span { display: none; }   /* sur téléphone : juste « ? » */
  .rx-on .rx-phone { display: none; }
  .rx-on .rx-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    position: absolute;
    top: 150px;
    left: 16px; right: 16px;
  }
  .rx-strip > div {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(4, 5, 13, 0.6);
    border: 1px solid rgba(68, 136, 255, 0.16);
  }
  .rx-strip b { font-size: 15px; }
  .rx-strip .rx-kpi--warn b  { color: #ff6b52; }
  .rx-strip .rx-kpi--ok b    { color: var(--cyan); }
  .rx-strip .rx-kpi--human b { color: #38e07e; }
  .rx-on .rx-chapters {
    left: 16px; right: 16px;
    top: auto;
    bottom: 92px;
    width: auto;
    transform: none;
  }
  .rx-on .rx-chapter { align-self: end; }
  .rx-on .rx-chapter h3 { font-size: clamp(1.75rem, 8vw, 2.3rem); margin-bottom: .8rem; }
  .rx-on .rx-chapter p { font-size: .95rem; line-height: 1.6; }
  .rx-on .rx-num { margin-bottom: .7rem; font-size: 10.5px; }
  .rx-cta { margin-top: 1.1rem; gap: 6px 18px; }
  .rx-cta .btn-primary { width: 100%; }
  .rx-on .rx-chain { width: calc(100% - 24px); bottom: 12px; }
  .rx-chain-track { left: 22px; right: 22px; }
  .rx-step { width: 44px; font-size: 9px; letter-spacing: .1em; }
  .rx-step span {
    position: absolute;
    top: 38px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity .3s;
  }
  .rx-step.is-active span { opacity: 1; }
  .rx-step:first-of-type span { left: 0; }   /* « Aujourd'hui » ne déborde pas de l'écran */
  .rx-on .rx-chain { padding-bottom: 14px; }
  .rx-on .rx-hint {
    left: 50%;
    top: 68px;                           /* sous la barre de menu quand elle est affichée… */
    z-index: 4;                          /* au premier plan de la scène (le mode d'emploi, z 5, reste devant) */
    transition: opacity .6s ease, top .35s var(--ease);
    max-width: calc(100% - 32px);
    padding: 8px 14px 8px 10px;
    font-size: 12.5px;
    background: rgba(4, 5, 13, 0.78);
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  }
  /* … et tout en haut quand elle se masque pendant la descente (html.nav-off, js/ui.js) */
  .rx-on.nav-off .rx-hint { top: calc(14px + env(safe-area-inset-top, 0px)); }
  .rx-hint-long { display: none; }   /* « Faites défiler ou cliquez pour avancer » : une seule ligne */
  .rx-on .rx-hint .rx-wheel { width: 14px; height: 22px; flex: none; }
  .rx-pill { padding: 4px 9px 5px; }
  .rx-pill b { font-size: 11px; }
  .rx-pill span { display: none; }
}
/* Très petits écrans (ex. 320 × 568) : pas la place pour les compteurs sous l'indication et le titre */
@media (max-width: 760px) and (max-height: 600px) {
  .rx-on .rx-strip { display: none; }
}

/* Écrans tactiles (téléphone, tablette) : pas de molette qui tourne vers le bas, mais un doigt qui
   glisse vers le haut - le geste réel pour faire défiler. Ordinateur : la molette reste. */
@media (hover: none) and (pointer: coarse) {
  .rx-wheel,
  .rx-on .rx-hint .rx-wheel {
    width: 22px; height: 28px;
    border: 0;
    border-radius: 0;
    flex: none;
  }
  /* trace du glissé, au-dessus du bout du doigt */
  .rx-wheel::before {
    content: '';
    position: absolute;
    left: 6.5px; top: 0;
    width: 2px; height: 12px;
    border-radius: 2px;
    background: linear-gradient(to top, rgba(0, 212, 255, 0.9), rgba(0, 212, 255, 0));
    animation: rxSwipeTrail 1.8s ease-out infinite;
  }
  /* main, index pointé (contour) */
  .rx-wheel::after {
    left: 0; top: auto; bottom: 0;
    width: 22px; height: 22px;
    margin: 0;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237fe8ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'/%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2'/%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1'/%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10'/%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: rxSwipe 1.8s ease-out infinite;
  }
}
@keyframes rxSwipe {
  0%   { transform: translateY(5px); opacity: 0; }
  18%  { transform: translateY(5px); opacity: 1; }
  70%  { transform: translateY(-6px); opacity: 1; }
  100% { transform: translateY(-6px); opacity: 0; }
}
@keyframes rxSwipeTrail {
  0%, 30% { transform: translateY(8px) scaleY(0.3); opacity: 0; }
  70%     { transform: translateY(-2px) scaleY(1); opacity: 1; }
  100%    { transform: translateY(-4px) scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rx-device, .rx-next::after { animation: none; }
  .rx-intro-card { transition: none; transform: none; }
  .rx-on .rx-chapter { filter: none; }
}
