/* =====================================================================
   JARVIS — Poste de commandement
   HTML/CSS/JS pur, aucune librairie. Toutes les couleurs et les rythmes
   sont réglables ici, dans le bloc :root ci-dessous.
   ===================================================================== */

:root {
  /* --- Fonds --- */
  --bg-0: #04060a;          /* noir bleuté profond */
  --bg-1: #070b12;
  --panel: rgba(10, 16, 26, 0.62);
  --panel-solid: #0a1018;

  /* --- Lignes et bordures --- */
  --line: rgba(120, 200, 220, 0.14);
  --line-hot: rgba(255, 60, 84, 0.45);

  /* --- Texte --- */
  --txt: #dbe6ef;
  --txt-dim: #6d7f92;
  --txt-faint: #3b4757;

  /* --- Couleurs vives --- */
  --red: #ff2f4d;
  --red-soft: rgba(255, 47, 77, 0.16);
  --cyan: #35e0f0;
  --cyan-soft: rgba(53, 224, 240, 0.14);
  --violet: #9b6bff;
  --amber: #ffb020;
  --mint: #43e39b;

  /* --- Typo --- */
  --f-display: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg-0);
  color: var(--txt);
  font-family: var(--f-display);
  overflow: hidden;
}

body::selection, ::selection { background: var(--red); color: #fff; }

/* =====================================================================
   COUCHES DE FOND
   ===================================================================== */

.layer { position: fixed; inset: 0; pointer-events: none; }
.layer--bg { z-index: 0; }

/* Sol en perspective : une grille inclinée en 3D, purement CSS */
.layer--grid { z-index: 1; overflow: hidden; perspective: 320px; }
.grid-floor {
  position: absolute;
  left: -50%; right: -50%;
  bottom: -42vh;
  height: 90vh;
  background-image:
    linear-gradient(to right, rgba(53, 224, 240, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(53, 224, 240, 0.10) 1px, transparent 1px);
  background-size: 62px 62px;
  transform: rotateX(74deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, transparent 92%);
  animation: floor-drift 14s linear infinite;
  opacity: 0.5;
}
@keyframes floor-drift { to { background-position: 0 62px, 0 62px; } }

.layer--vignette {
  z-index: 2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, transparent 40%, rgba(2,4,8,0.82) 100%),
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(255,47,77,0.07), transparent 60%);
}

/* Lignes de balayage + léger scintillement, pour la texture "hologramme" */
.layer--scan {
  z-index: 60;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  animation: flicker 5.5s steps(60) infinite;
}
@keyframes flicker { 0%,97%,100% { opacity: 1; } 98% { opacity: 0.78; } }

/* =====================================================================
   DÉMARRAGE
   ===================================================================== */

.boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.75rem;
  background: radial-gradient(circle at 50% 45%, #060a11, #010204 70%);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.boot.is-done { opacity: 0; visibility: hidden; }

.boot__stage { position: relative; width: 190px; height: 190px; }
.boot__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.boot__ring circle { fill: none; stroke-linecap: round; }
.boot__ring-track { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
.boot__ring-arc {
  stroke: var(--red); stroke-width: 2;
  stroke-dasharray: 553; stroke-dashoffset: 553;
  filter: drop-shadow(0 0 8px var(--red));
  transition: stroke-dashoffset 0.25s linear;
}
.boot__ring-arc2 {
  stroke: var(--cyan); stroke-width: 1; opacity: 0.55;
  stroke-dasharray: 40 400;
  animation: spin 2.4s linear infinite;
  transform-origin: 50% 50%;
}
.boot__pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--f-mono);
  font-size: 2.6rem; letter-spacing: 0.05em;
  color: var(--txt);
  text-shadow: 0 0 22px rgba(255,47,77,0.5);
}
.boot__log {
  font-family: var(--f-mono); font-size: 0.68rem;
  line-height: 1.85; color: var(--txt-dim);
  letter-spacing: 0.09em; text-align: left;
  min-height: 7.5rem; width: min(90vw, 380px);
}
.boot__log b { color: var(--mint); font-weight: 400; }

/* =====================================================================
   CADRE GÉNÉRAL
   ===================================================================== */

.hud {
  position: relative; z-index: 10;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.hud.is-live { opacity: 1; }

/* ---- En-tête ---- */
.hud__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,47,77,0.05), transparent);
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand__mark {
  width: 30px; height: 30px; fill: none;
  stroke: var(--red); stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(255,47,77,0.7));
  animation: spin 22s linear infinite;
}
.brand h1 {
  margin: 0; font-size: 1.22rem; font-weight: 600;
  letter-spacing: 0.42em; color: #fff;
  text-shadow: 0 0 20px rgba(255,47,77,0.55);
}
.brand__sub {
  display: block; font-family: var(--f-mono);
  font-size: 0.56rem; letter-spacing: 0.22em; color: var(--txt-faint);
}

.head-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; row-gap: 0.4rem; }
.nav-tab {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.18em;
  color: var(--txt-dim); background: transparent; cursor: pointer;
  border: 1px solid var(--line); padding: 0.42rem 0.95rem;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: all 0.25s var(--ease);
  flex: 0 0 auto;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--txt); border-color: var(--line-hot); }
.nav-tab.is-active {
  color: #fff; border-color: var(--red);
  background: var(--red-soft);
  box-shadow: inset 0 0 18px rgba(255,47,77,0.22);
}

.head-right { display: flex; align-items: center; gap: 1.1rem; }
.clock {
  font-family: var(--f-mono); font-size: 1rem; letter-spacing: 0.12em;
  color: var(--cyan); text-shadow: 0 0 14px rgba(53,224,240,0.45);
  font-variant-numeric: tabular-nums;
}
.link-state {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--f-mono); font-size: 0.58rem;
  letter-spacing: 0.15em; color: var(--txt-dim);
}
.link-state i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 8px var(--amber);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---- Corps : 3 colonnes ---- */
.hud__body {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 1.1rem; padding: 1.1rem 1.4rem;
  min-height: 0;
}

/* =====================================================================
   COLONNES LATÉRALES
   ===================================================================== */

.rail {
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 0; overflow: hidden;
}
.rail__title {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono); font-size: 0.57rem;
  letter-spacing: 0.24em; color: var(--txt-dim);
  margin-top: 0.2rem;
}
.rail__title i {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-hot), transparent);
}

/* -- Constantes (jauges à barre) -- */
.vital__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--f-mono); font-size: 0.6rem;
  letter-spacing: 0.14em; color: var(--txt-dim);
  margin-bottom: 0.3rem;
}
.vital__row b {
  color: var(--txt); font-size: 0.82rem; font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.meter {
  height: 4px; background: rgba(255,255,255,0.05);
  overflow: hidden;
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.meter span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--red), #ff7a5c);
  box-shadow: 0 0 10px var(--red);
  transition: width 0.6s var(--ease);
}
.meter--cyan span {
  background: linear-gradient(90deg, var(--cyan), #7ef0ff);
  box-shadow: 0 0 10px var(--cyan);
}

/* -- Jauge thermique circulaire -- */
.gauge { position: relative; width: 100%; max-width: 165px; margin: 0 auto; }
.gauge svg { width: 100%; transform: rotate(135deg); }
.gauge circle { fill: none; stroke-linecap: round; stroke-width: 5; }
.gauge__track { stroke: rgba(255,255,255,0.055); stroke-dasharray: 273 365; }
.gauge__arc {
  stroke: url(#gaugeGrad); stroke: var(--cyan);
  stroke-dasharray: 273 365; stroke-dashoffset: 273;
  filter: drop-shadow(0 0 8px rgba(53,224,240,0.65));
  transition: stroke-dashoffset 1s var(--ease), stroke 0.6s;
}
.gauge__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.05rem;
}
.gauge__center b {
  font-family: var(--f-mono); font-size: 1.9rem; font-weight: 400;
  color: #fff; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(53,224,240,0.5);
}
.gauge__center span { font-family: var(--f-mono); font-size: 0.65rem; color: var(--txt-dim); }
.gauge__center em {
  font-family: var(--f-mono); font-style: normal;
  font-size: 0.5rem; letter-spacing: 0.2em; color: var(--mint);
  margin-top: 0.3rem;
}

.spark { width: 100%; height: 46px; }
.spark path { fill: none; stroke: var(--cyan); stroke-width: 1.4; opacity: 0.85; }
.spark .spark__fill { stroke: none; fill: rgba(53,224,240,0.12); }

/* -- Journal système -- */
.log {
  flex: 1; min-height: 0; overflow: hidden;
  font-family: var(--f-mono); font-size: 0.6rem;
  line-height: 1.75; color: var(--txt-dim);
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 0.1rem;
}
.log__line { animation: log-in 0.4s var(--ease); white-space: nowrap; }
.log__line time { color: var(--txt-faint); margin-right: 0.5rem; }
.log__line.is-ok b { color: var(--mint); font-weight: 400; }
.log__line.is-warn b { color: var(--amber); font-weight: 400; }
.log__line.is-hot b { color: var(--red); font-weight: 400; }
.log__line b { color: var(--cyan); font-weight: 400; }
@keyframes log-in { from { opacity: 0; transform: translateX(10px); } }

/* -- Zones -- */
.zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.zones li {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.12em;
  color: var(--txt-dim);
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--line);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  transition: border-color 0.3s;
}
.zones li:hover { border-color: var(--line-hot); }
.zones b { font-weight: 400; font-size: 0.52rem; }
.zones .on { color: var(--mint); }
.zones .off { color: var(--txt-faint); }

/* =====================================================================
   SCÈNE CENTRALE — LE NOYAU
   ===================================================================== */

.stage {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 0;
}
.core-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
/* -- Accueil personnalisé -- */
.greet {
  position: relative; z-index: 4;
  text-align: center; pointer-events: none;
  transform: translateY(-185px);
}

/* voile sombre : garde le texte lisible par-dessus les anneaux du noyau */
.greet::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 155%; height: 260%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(2, 4, 8, 0.86) 0%,
    rgba(2, 4, 8, 0.62) 42%,
    transparent 72%);
  z-index: -1;
}

/* onde de choc à l'apparition */
.greet__burst {
  position: absolute; left: 50%; top: 55%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 1px solid var(--red);
  opacity: 0;
}
.greet.is-in .greet__burst { animation: greet-burst 1.5s var(--ease) 0.15s; }
@keyframes greet-burst {
  0%   { transform: scale(1); opacity: 1; box-shadow: 0 0 40px 10px rgba(255,47,77,0.55); }
  100% { transform: scale(58); opacity: 0; box-shadow: 0 0 0 0 rgba(255,47,77,0); }
}

.greet__eyebrow {
  font-family: var(--f-mono); font-size: 0.55rem;
  letter-spacing: 0.4em; color: var(--red);
  text-shadow: 0 0 14px rgba(255,47,77,0.6);
  opacity: 0;
}
.greet.is-in .greet__eyebrow { animation: fade-up 0.7s var(--ease) 0.1s forwards; }

.greet__line {
  margin: 0.5rem 0 0.6rem;
  font-size: clamp(1.9rem, 4.4vw, 3.5rem);
  font-weight: 600; letter-spacing: 0.08em;
  line-height: 1; color: #fff;
  text-shadow: 0 0 40px rgba(255,47,77,0.45);
  white-space: nowrap;
}
/* chaque lettre arrive séparément */
.greet__line span {
  display: inline-block;
  opacity: 0; transform: translateY(0.35em) scale(1.35);
  filter: blur(6px);
  animation: letter-in 0.62s var(--ease) forwards;
}
.greet__line span.is-space { width: 0.32em; }
.greet__line .accent {
  color: var(--red);
  text-shadow: 0 0 28px rgba(255,47,77,0.85), 0 0 60px rgba(255,47,77,0.35);
}
@keyframes letter-in {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.greet__meta {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  font-family: var(--f-mono); font-size: 0.62rem;
  letter-spacing: 0.16em; color: var(--txt-dim);
  opacity: 0;
}
.greet__meta i {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--txt-faint);
}
.greet.is-in .greet__meta { animation: fade-up 0.8s var(--ease) 0.85s forwards; }

.greet__brief {
  margin-top: 0.45rem;
  font-family: var(--f-mono); font-size: 0.57rem;
  letter-spacing: 0.1em; color: var(--txt-faint);
  opacity: 0;
}
.greet.is-in .greet__brief { animation: fade-up 0.8s var(--ease) 1.05s forwards; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stage__hud {
  position: relative; z-index: 2;
  text-align: center; pointer-events: none;
  transform: translateY(190px);
}
.stage__state {
  font-family: var(--f-mono); font-size: 0.95rem;
  letter-spacing: 0.42em; color: #fff;
  text-shadow: 0 0 24px currentColor;
  transition: color 0.5s var(--ease);
}
.stage__caption {
  font-family: var(--f-mono); font-size: 0.6rem;
  letter-spacing: 0.14em; color: var(--txt-dim);
  margin-top: 0.45rem;
}

.stage__controls {
  position: relative; z-index: 3;
  display: flex; gap: 0.55rem;
  transform: translateY(215px);
}
.cmd {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.18em;
  color: var(--txt-dim); background: rgba(8,14,22,0.7);
  border: 1px solid var(--line); cursor: pointer;
  padding: 0.55rem 1.1rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.25s var(--ease);
}
.cmd i {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.6;
}
.cmd:hover { color: var(--txt); border-color: rgba(255,255,255,0.28); transform: translateY(-2px); }
.cmd:active { transform: translateY(0) scale(0.97); }
.cmd.is-on { color: #fff; }
.cmd--accent.is-on { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 22px rgba(255,47,77,0.25); }
.cmd--violet.is-on { border-color: var(--violet); background: rgba(155,107,255,0.14); box-shadow: 0 0 22px rgba(155,107,255,0.25); }
.cmd.is-on:not(.cmd--accent):not(.cmd--violet) { border-color: var(--cyan); background: var(--cyan-soft); }

/* =====================================================================
   MODULES PILOTABLES (bas d'écran)
   ===================================================================== */

.modules {
  display: grid;
  grid-template-columns: 1fr 1fr 1.55fr;
  gap: 1rem; padding: 0 1.4rem 1.2rem;
}

.mod {
  position: relative; overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem 0.95rem;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
  opacity: 0; transform: translateY(24px);
}
.hud.is-live .mod { animation: mod-in 0.75s var(--ease) forwards; }
.hud.is-live .mod:nth-child(2) { animation-delay: 0.1s; }
.hud.is-live .mod:nth-child(3) { animation-delay: 0.2s; }
@keyframes mod-in { to { opacity: 1; transform: translateY(0); } }

.mod:hover { border-color: rgba(255,255,255,0.22); }
.mod.is-on { border-color: var(--line-hot); }

/* halo interne qui s'allume avec le module */
.mod__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 100% at 12% 120%, rgba(255,47,77,0.30), transparent 62%);
  opacity: 0; transition: opacity 0.55s var(--ease);
}
.mod.is-on .mod__glow { opacity: 1; }

.mod header {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.mod__idx {
  font-family: var(--f-mono); font-size: 0.55rem;
  color: var(--txt-faint); letter-spacing: 0.1em;
}
.mod h2 {
  margin: 0; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.22em; color: var(--txt);
}
.mod__state {
  margin-left: auto;
  font-family: var(--f-mono); font-size: 0.52rem;
  letter-spacing: 0.16em; color: var(--txt-faint);
  transition: color 0.4s;
}
.mod.is-on .mod__state { color: var(--red); text-shadow: 0 0 10px rgba(255,47,77,0.6); }

.mod__body { display: flex; align-items: center; gap: 1rem; }

/* -- Bouton d'alimentation circulaire -- */
.pwr {
  position: relative; flex-shrink: 0;
  width: 62px; height: 62px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.pwr svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pwr circle { fill: none; stroke-width: 2; stroke-linecap: round; }
.pwr__track { stroke: rgba(255,255,255,0.08); }
.pwr__arc {
  stroke: var(--red); stroke-dasharray: 151; stroke-dashoffset: 151;
  filter: drop-shadow(0 0 7px var(--red));
  transition: stroke-dashoffset 0.65s var(--ease);
}
.pwr__icon {
  position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px;
  border: 2px solid var(--txt-faint);
  border-radius: 50%;
  border-top-color: transparent;
  transition: all 0.4s var(--ease);
}
.pwr__icon::after {
  content: ""; position: absolute;
  left: 50%; top: -6px; transform: translateX(-50%);
  width: 2px; height: 9px;
  background: var(--txt-faint);
  transition: background 0.4s, box-shadow 0.4s;
}
.pwr:hover .pwr__icon { border-color: var(--txt-dim); }
.mod.is-on .pwr__arc { stroke-dashoffset: 0; }
.mod.is-on .pwr__icon {
  border-color: var(--red);
  box-shadow: 0 0 16px rgba(255,47,77,0.55);
}
.mod.is-on .pwr__icon::after { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* onde de choc au clic */
.pwr__wave {
  position: absolute; inset: 0; margin: auto;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--red); pointer-events: none;
  animation: wave 0.75s var(--ease) forwards;
}
@keyframes wave {
  from { transform: scale(0.6); opacity: 0.9; }
  to   { transform: scale(2.4); opacity: 0; }
}

/* -- Affichage droit du module -- */
.mod__readout { flex: 1; min-width: 0; display: grid; gap: 0.5rem; }
.mod__readout > div:first-child {
  display: flex; align-items: baseline; justify-content: space-between;
}
.mod__readout em {
  font-family: var(--f-mono); font-style: normal;
  font-size: 0.52rem; letter-spacing: 0.18em; color: var(--txt-faint);
}
.mod__num {
  font-family: var(--f-mono); font-size: 1.15rem; font-weight: 400;
  color: var(--txt); font-variant-numeric: tabular-nums;
  transition: color 0.4s, text-shadow 0.4s;
}
.mod__num i { font-style: normal; font-size: 0.6rem; color: var(--txt-dim); margin-left: 1px; }
.mod.is-on .mod__num { color: #fff; text-shadow: 0 0 14px rgba(255,47,77,0.55); }

/* petites barres d'égaliseur */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.bars span {
  flex: 1; height: 12%;
  background: var(--txt-faint);
  transition: height 0.25s var(--ease), background 0.4s, box-shadow 0.4s;
}
.mod.is-on .bars span { background: var(--red); box-shadow: 0 0 6px rgba(255,47,77,0.55); }

/* périphériques du simulateur */
.periph { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.periph li {
  font-family: var(--f-mono); font-size: 0.5rem; letter-spacing: 0.12em;
  color: var(--txt-faint);
  border: 1px solid var(--line); padding: 0.22rem 0.5rem;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  transition: all 0.35s var(--ease);
}
.periph li.is-live {
  color: #fff; border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 0 12px rgba(255,47,77,0.22);
}

/* trait d'énergie qui traverse le module quand il s'allume */
.mod__flow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  transform: translateX(-100%); opacity: 0;
}
.mod.is-on .mod__flow { animation: flow 2.6s var(--ease) infinite; }
@keyframes flow {
  0%   { transform: translateX(-100%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* =====================================================================
   DIVERS
   ===================================================================== */

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Adaptation aux petits écrans ---- */
@media (max-width: 1100px) {
  html, body { overflow-y: auto; }
  .hud { height: auto; min-height: 100%; }
  .hud__body { grid-template-columns: 1fr; }
  .rail { order: 2; }
  .stage { order: 1; height: 62vh; min-height: 420px; }
  .modules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hud__head { flex-wrap: wrap; gap: 0.7rem; }
  .head-nav { order: 3; width: 100%; }
  .stage__hud { transform: translateY(150px); }
  .stage__controls { transform: translateY(175px); flex-wrap: wrap; justify-content: center; }
  .brand h1 { font-size: 1rem; letter-spacing: 0.3em; }
  .greet { transform: translateY(-140px); }
  .greet__line { white-space: normal; }
  .greet__meta { flex-wrap: wrap; }
  .nav-tab { flex: 1 1 auto; min-width: 4.4rem; text-align: center; padding: 0.42rem 0.5rem; }
}

/* Filet de sécurité : jamais de scroll horizontal, peu importe la page */
html, body { max-width: 100vw; overflow-x: hidden; }
img, svg, canvas, video { max-width: 100%; }

/* ---- Respect des préférences d'accessibilité ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Port React uniquement : même mécanisme que ci-dessus, mais déclenché
   par un attribut plutôt qu'une media query — sert aux captures d'écran de
   contrôle (?boot=skip dans Dashboard.tsx) pour obtenir un état "posé" sans
   attendre les transitions réelles. Aucun effet pour les utilisateurs
   normaux (l'attribut n'est jamais posé en dehors de ce mode de test). */
[data-skip-anim="true"] *, [data-skip-anim="true"] *::before, [data-skip-anim="true"] *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
}

/* =====================================================================
   PAGES SECONDAIRES (config / notes / outils / verrouillage)
   Ajouté pour shared/shell.js — mêmes variables, même vocabulaire
   visuel que le tableau de bord (bords biseautés, mono, palette rouge/
   cyan/violet), mais en page défilante plutôt qu'en plein écran figé.
   ===================================================================== */

body.subpage {
  min-height: 100%;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255,47,77,0.09), transparent 62%),
    radial-gradient(ellipse 70% 50% at 50% 108%, rgba(53,224,240,0.07), transparent 60%),
    var(--bg-0);
}
html:has(body.subpage) { overflow: auto; height: auto; }

.page-main {
  position: relative; z-index: 5;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.7rem 1.4rem 4rem;
}
.page-head { margin: 0.3rem 0 1.7rem; }
.page-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem; font-weight: 600;
  letter-spacing: 0.32em; color: #fff;
  text-shadow: 0 0 20px rgba(255,47,77,0.35);
}
.page-head p {
  margin: 0; font-family: var(--f-mono);
  font-size: 0.64rem; letter-spacing: 0.1em; color: var(--txt-dim);
}

/* -- panneau générique (bord biseauté, même recette que .mod) -- */
.panel {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--line);
  padding: 1.15rem 1.3rem 1.3rem;
  margin-bottom: 1.1rem;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.panel h2 {
  margin: 0 0 1rem;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.22em; color: var(--txt);
}
.hint, p.hint {
  margin: -0.5rem 0 1rem;
  font-family: var(--f-mono); font-size: 0.6rem;
  letter-spacing: 0.06em; color: var(--txt-faint); line-height: 1.6;
}

/* -- bandeau d'avertissement (config.html) -- */
.warn-banner {
  display: flex; gap: 0.7rem; align-items: flex-start;
  border: 1px solid rgba(255,176,32,0.4);
  background: rgba(255,176,32,0.08);
  padding: 0.75rem 0.95rem;
  margin-bottom: 1.2rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  font-family: var(--f-mono); font-size: 0.62rem; line-height: 1.6;
  letter-spacing: 0.02em; color: #ffd58a;
}
.warn-banner i {
  flex-shrink: 0; width: 14px; height: 14px; margin-top: 0.1rem;
  border-radius: 50%; border: 1px solid var(--amber);
  display: grid; place-items: center; font-style: normal;
  font-size: 0.6rem; color: var(--amber);
}
.warn-banner i::before { content: "!"; }

/* -- champs de formulaire -- */
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label {
  font-family: var(--f-mono); font-size: 0.58rem;
  letter-spacing: 0.14em; color: var(--txt-dim);
}
.field input, .field select, .field textarea {
  font-family: var(--f-mono); font-size: 0.78rem;
  background: rgba(4,8,14,0.6); border: 1px solid var(--line);
  color: var(--txt); padding: 0.6rem 0.75rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 90px; font-size: 0.72rem; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--txt-faint); }
.field-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

.form-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.4rem; }
.form-note {
  font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.06em;
  color: var(--mint); opacity: 0; transition: opacity 0.3s var(--ease);
}
.form-note.is-shown { opacity: 1; }

/* -- boutons d'icône ronds (verrouillage / aide) dans l'en-tête -- */
.head-extras { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
  color: var(--txt-dim); cursor: pointer;
  font-family: var(--f-mono); font-size: 0.7rem;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}
.icon-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.icon-btn:hover { color: #fff; border-color: var(--line-hot); }

/* =====================================================================
   NOTIFICATIONS (toasts)
   ===================================================================== */

.toast-host {
  position: fixed; left: 1.2rem; bottom: 1.2rem; z-index: 400;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em;
  color: var(--txt); background: var(--panel-solid);
  border: 1px solid var(--line); border-left: 2px solid var(--cyan);
  padding: 0.55rem 0.9rem; max-width: 300px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast.is-ok { border-left-color: var(--mint); }
.toast.is-warn { border-left-color: var(--amber); }
.toast.is-hot { border-left-color: var(--red); }

/* =====================================================================
   BULLE DE DISCUSSION FLOTTANTE
   ===================================================================== */

.chat-fab {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 300;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--panel-solid); border: 1px solid var(--line-hot);
  color: var(--red); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 0 0 rgba(255,47,77,0), 0 10px 30px rgba(0,0,0,0.45);
  transition: all 0.3s var(--ease);
}
.chat-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.chat-fab:hover { box-shadow: 0 0 22px rgba(255,47,77,0.4), 0 10px 30px rgba(0,0,0,0.45); transform: translateY(-2px); }
.chat-fab.is-open { color: #fff; background: var(--red-soft); border-color: var(--red); }

.chat-panel {
  position: fixed; right: 1.4rem; bottom: 5.4rem; z-index: 300;
  width: min(330px, calc(100vw - 2.4rem));
  height: min(440px, calc(100vh - 8rem));
  background: var(--panel-solid);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  opacity: 0; transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--txt-dim);
}
.chat-panel__close {
  background: none; border: 0; color: var(--txt-dim); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 0.1rem 0.3rem;
}
.chat-panel__close:hover { color: #fff; }

.chat-panel__log {
  flex: 1; overflow-y: auto; padding: 0.85rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.chat-bubble {
  max-width: 85%; padding: 0.55rem 0.75rem;
  font-family: var(--f-mono); font-size: 0.66rem; line-height: 1.55;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.chat-bubble--jarvis {
  align-self: flex-start; background: var(--cyan-soft);
  border: 1px solid rgba(53,224,240,0.3); color: var(--txt);
}
.chat-bubble--user {
  align-self: flex-end; background: var(--red-soft);
  border: 1px solid rgba(255,47,77,0.3); color: #fff;
}

.chat-panel__form {
  display: flex; gap: 0.5rem; padding: 0.75rem;
  border-top: 1px solid var(--line);
}
.chat-panel__form input {
  flex: 1; min-width: 0;
  font-family: var(--f-mono); font-size: 0.68rem;
  background: rgba(4,8,14,0.6); border: 1px solid var(--line); color: var(--txt);
  padding: 0.5rem 0.65rem;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.chat-panel__form input:focus { outline: none; border-color: var(--cyan); }
.chat-panel__form .cmd { padding: 0.5rem 0.8rem; font-size: 0.56rem; }

@media (max-width: 480px) {
  .chat-panel { right: 0.7rem; bottom: 4.9rem; }
  .chat-fab { right: 0.9rem; bottom: 0.9rem; }
}

/* =====================================================================
   TUTORIEL INTERACTIF
   ===================================================================== */

.tut-overlay { position: fixed; inset: 0; z-index: 500; }
.tut-spot {
  position: fixed; border-radius: 10px;
  border: 1px solid var(--red);
  box-shadow: 0 0 0 9999px rgba(2,4,8,0.82), 0 0 24px rgba(255,47,77,0.35);
  transition: all 0.35s var(--ease);
  pointer-events: none;
}
.tut-tip {
  position: fixed; width: 280px;
  background: var(--panel-solid); border: 1px solid var(--line-hot);
  padding: 0.95rem 1rem 1rem;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
  transition: all 0.35s var(--ease);
}
.tut-tip p {
  margin: 0 0 0.9rem; font-family: var(--f-mono); font-size: 0.68rem;
  line-height: 1.6; color: var(--txt);
}
.tut-tip__actions { display: flex; justify-content: space-between; gap: 0.5rem; }
.tut-tip__actions .cmd { padding: 0.45rem 0.85rem; font-size: 0.56rem; }

/* =====================================================================
   NOTES (notes.html)
   ===================================================================== */

.notes-toolbar { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.notes-toolbar input {
  flex: 1; font-family: var(--f-mono); font-size: 0.72rem;
  background: rgba(4,8,14,0.6); border: 1px solid var(--line); color: var(--txt);
  padding: 0.55rem 0.75rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.notes-toolbar input:focus { outline: none; border-color: var(--cyan); }

.notes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.note-item {
  display: flex; align-items: flex-start; gap: 0.8rem;
  border: 1px solid var(--line); padding: 0.65rem 0.8rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color 0.25s var(--ease);
}
.note-item:hover { border-color: var(--line-hot); }
.note-item__body { flex: 1; min-width: 0; }
.note-item__text {
  font-size: 0.82rem; color: var(--txt); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.note-item__date {
  display: block; margin-top: 0.3rem;
  font-family: var(--f-mono); font-size: 0.54rem;
  letter-spacing: 0.1em; color: var(--txt-faint);
}
.note-item__del {
  flex-shrink: 0; background: none; cursor: pointer;
  border: 1px solid var(--line); color: var(--txt-faint);
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 0.85rem; line-height: 1;
  transition: all 0.25s var(--ease);
}
.note-item__del:hover { color: var(--red); border-color: var(--line-hot); }
.notes-empty {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--txt-faint); padding: 1rem 0; text-align: center;
}

/* =====================================================================
   OUTILS (tools.html)
   ===================================================================== */

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.tool-stat-row { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.tool-stat { font-family: var(--f-mono); }
.tool-stat b {
  display: block; font-size: 1.3rem; color: #fff;
  text-shadow: 0 0 14px rgba(53,224,240,0.4);
  font-variant-numeric: tabular-nums;
}
.tool-stat span { font-size: 0.55rem; letter-spacing: 0.14em; color: var(--txt-faint); }

.tool-output {
  font-family: var(--f-mono); font-size: 0.7rem; color: var(--mint);
  background: rgba(4,8,14,0.6); border: 1px solid var(--line);
  padding: 0.6rem 0.75rem; word-break: break-all;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* =====================================================================
   VERROUILLAGE (lock.html)
   ===================================================================== */

.lock-wrap {
  max-width: 380px; margin: 3vh auto 0;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}
.lock-dots { display: flex; gap: 0.7rem; }
.lock-dots i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--line-hot); background: transparent;
  transition: all 0.2s var(--ease);
}
.lock-dots i.is-filled { background: var(--red); box-shadow: 0 0 10px var(--red); }
.lock-wrap.is-error .lock-dots i { border-color: var(--red); }
@keyframes lock-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
.lock-wrap.is-shake { animation: lock-shake 0.55s; }

.keypad { display: grid; grid-template-columns: repeat(3, 64px); gap: 0.7rem; }
.keypad button {
  width: 64px; height: 64px; font-family: var(--f-mono); font-size: 1.1rem;
  color: var(--txt); background: rgba(8,14,22,0.7); border: 1px solid var(--line);
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.2s var(--ease);
}
.keypad button:hover { border-color: var(--line-hot); color: #fff; }
.keypad button:active { transform: scale(0.94); }
.keypad button.is-wide { grid-column: span 1; font-size: 0.6rem; letter-spacing: 0.08em; }

.face-box {
  width: 100%; margin-top: 0.6rem; padding: 1rem;
  border: 1px dashed var(--txt-faint); text-align: center;
  color: var(--txt-faint); font-family: var(--f-mono);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.face-box svg { width: 30px; height: 30px; stroke: var(--txt-faint); fill: none; stroke-width: 1.3; margin-bottom: 0.5rem; }
.face-box p { margin: 0 0 0.6rem; font-size: 0.6rem; letter-spacing: 0.08em; }
.face-box button {
  font-family: var(--f-mono); font-size: 0.56rem; letter-spacing: 0.12em;
  color: var(--txt-faint); background: transparent; border: 1px solid var(--line);
  padding: 0.5rem 1rem; cursor: not-allowed;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* =====================================================================
   MODULES BUSINESS (business.html, telegram.html, projects.html,
   content.html, collab.html, glossary.html) — composants communs
   ===================================================================== */

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--f-mono); font-size: 0.55rem; letter-spacing: 0.1em;
  padding: 0.25rem 0.55rem; border-radius: 20px; text-transform: uppercase;
}
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--on { color: var(--mint); background: rgba(67,227,155,0.12); }
.badge--off { color: var(--txt-faint); background: rgba(120,140,160,0.08); }
.badge--sim { color: var(--amber); background: rgba(255,176,32,0.12); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); padding: 1.1rem 1.2rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.5rem; }
.card__title { font-family: var(--f-display); font-size: 0.95rem; color: #fff; letter-spacing: 0.02em; }
.card__meta { font-family: var(--f-mono); font-size: 0.58rem; color: var(--txt-faint); letter-spacing: 0.08em; margin-top: 0.2rem; }
.card__body { font-size: 0.78rem; color: var(--txt-dim); line-height: 1.5; }
.card__stats { display: flex; gap: 1.2rem; margin-top: 0.7rem; flex-wrap: wrap; }
.card__actions { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.card__actions .cmd { padding: 0.4rem 0.8rem; font-size: 0.55rem; }

.wallet-strip { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: 0.4rem 0 1.3rem; }
.wallet-figure { font-family: var(--f-mono); }
.wallet-figure b {
  display: block; font-size: 1.7rem; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(53,224,240,0.4);
}
.wallet-figure span { font-size: 0.55rem; letter-spacing: 0.14em; color: var(--txt-faint); }
.wallet-figure.is-mint b { text-shadow: 0 0 14px rgba(67,227,155,0.4); }

.sim-notice {
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.05em; color: var(--amber);
  background: rgba(255,176,32,0.08); border: 1px solid rgba(255,176,32,0.3);
  padding: 0.6rem 0.85rem; margin-bottom: 1.3rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.timeline { display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--line); padding-left: 1rem; }
.timeline li { list-style: none; position: relative; padding-bottom: 1rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.34rem; top: 0.2rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.timeline .t-when { font-family: var(--f-mono); font-size: 0.55rem; color: var(--txt-faint); letter-spacing: 0.08em; }
.timeline .t-what { font-size: 0.78rem; color: var(--txt); margin-top: 0.15rem; }

/* =====================================================================
   TEMPLE DES AGENTS (temple.html / Temple.tsx) — page pour rire
   ===================================================================== */

.temple-stage {
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap; padding: 2.5rem 1.5rem;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(155,107,255,0.08), transparent 70%);
}

.temple-worshippers { display: flex; flex-direction: column; gap: 1.4rem; max-width: 220px; }
.temple-worshipper { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.temple-worshipper__icon { font-size: 1.8rem; animation: temple-bob 2.6s ease-in-out infinite; }
.temple-worshipper__bubble {
  font-family: var(--f-mono); font-size: 0.62rem; line-height: 1.5; color: var(--txt-dim);
  background: rgba(10,16,26,0.7); border: 1px solid var(--line); padding: 0.6rem 0.8rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  min-height: 4.2rem; display: flex; align-items: center; transition: opacity 0.3s;
}
@keyframes temple-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.temple-statues { display: flex; gap: 2rem; align-items: flex-end; }
.temple-statue { display: flex; flex-direction: column; align-items: center; gap: 0; perspective: 600px; }
.temple-statue__bust {
  width: 110px; height: 130px; border-radius: 50% 50% 44% 44% / 55% 55% 40% 40%;
  background: linear-gradient(160deg, #2a3542, #12161c) center/cover;
  border: 1px solid var(--line-hot); box-shadow: 0 0 30px rgba(255,47,77,0.18), inset 0 0 24px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease);
}
.temple-statue:hover .temple-statue__bust { transform: rotateY(12deg) rotateX(-4deg); }
.temple-statue__placeholder { font-size: 2.6rem; opacity: 0.3; }
.temple-statue__pedestal {
  margin-top: 0.6rem; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.28em;
  color: var(--txt); background: rgba(8,14,22,0.8); border: 1px solid var(--line-hot);
  padding: 0.4rem 1.2rem; box-shadow: 0 0 14px rgba(255,47,77,0.15);
}

.agent-sprite-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.agent-sprite {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem;
  padding: 1.1rem 0.8rem; background: var(--panel); border: 1px solid var(--line); opacity: 0.55;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.agent-sprite.is-active { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 16px rgba(53,224,240,0.15); }
.agent-sprite__avatar { font-size: 1.6rem; }
.agent-sprite.is-active .agent-sprite__avatar { animation: temple-bob 1.8s ease-in-out infinite; }
.agent-sprite__name { font-family: var(--f-display); font-size: 0.78rem; color: #fff; }
.agent-sprite__mission { font-family: var(--f-mono); font-size: 0.58rem; color: var(--txt-dim); line-height: 1.4; }

@media (max-width: 640px) {
  .temple-stage { flex-direction: column; gap: 1.5rem; padding: 1.6rem 1rem; }
  .temple-worshippers { flex-direction: row; max-width: 100%; }
  .temple-worshipper__bubble { font-size: 0.58rem; min-height: 3.6rem; }
}

/* --- Jeu explorable (Temple.tsx) --- */
.temple-game-bubble {
  position: absolute; top: 1.2rem; left: 50%; transform: translateX(-50%);
  max-width: 80%; text-align: center;
  font-family: var(--f-mono); font-size: 0.72rem; line-height: 1.5; color: #fff;
  background: rgba(8,14,22,0.92); border: 1px solid var(--line-hot);
  padding: 0.7rem 1.1rem; box-shadow: 0 0 22px rgba(255,47,77,0.25);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  pointer-events: none;
}
.temple-joystick {
  position: absolute; bottom: 1.2rem; right: 1.2rem;
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(8,14,22,0.55); border: 1px solid var(--line);
  touch-action: none; display: flex; align-items: center; justify-content: center;
}
.temple-joystick__knob {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 16px rgba(67,227,155,0.5);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  /* Sur desktop (clavier), le joystick reste dispo mais discret */
  .temple-joystick { opacity: 0.4; }
}
