/* ============================================================
   TSCM DIAGNOSTIC — STYLESHEET
   Elegant, motion-designed, oscilloscope-inspired
   ============================================================ */

:root {
  /* Palette */
  --bg: #EBEBEB;
  --bg-raised: #F4F4F4;
  --bg-card: #FFFFFF;
  --ink: #0A0F14;
  --ink-2: #1E252D;
  --ink-3: #4B5560;
  --ink-4: #8A929C;
  --line: rgba(10, 15, 20, 0.08);
  --line-strong: rgba(10, 15, 20, 0.16);

  /* Oscilloscope / signal greens — softened, emerald professional */
  --green: #10B981;
  --green-deep: #059669;
  --green-dark: #065F46;
  --green-soft: rgba(16, 185, 129, 0.08);
  --green-glow: rgba(16, 185, 129, 0.25);

  /* Electric blue — used for glitch hover stabilisation (sharp contrast). */
  --electric-blue: #1E5FFF;
  --electric-blue-glow: rgba(30, 95, 255, 0.32);

  /* Criticity — 5-level action-oriented palette */
  --lvl-prevent:   #0EA5E9;
  --lvl-advise:    #10B981;
  --lvl-target:    #F59E0B;
  --lvl-priority:  #EF4444;
  --lvl-emergency: #991B1B;

  /* Soft tints for level backgrounds */
  --lvl-prevent-soft:   rgba(14, 165, 233, 0.10);
  --lvl-advise-soft:    rgba(16, 185, 129, 0.10);
  --lvl-target-soft:    rgba(245, 158, 11, 0.10);
  --lvl-priority-soft:  rgba(239, 68, 68, 0.10);
  --lvl-emergency-soft: rgba(153, 27, 27, 0.10);

  /* Typography */
  --font-display: "Space Grotesk", "Neue Haas Grotesk Display", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Avenir Next", "Avenir", "Nunito Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  position: relative;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ===== BACKGROUND LAYERS ===== */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10,15,20,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,15,20,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 90%);
}
/* .noise removed (was costing a full-screen compositing layer for negligible visual impact) */

/* Oscilloscope canvas - mouse hover reveal */
#oscilloscope {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}

/* ===== HEADER ===== */
.app-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  max-width: 1400px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 40px; height: 40px; color: var(--ink);
  transition: color .4s var(--ease-out-expo), transform .6s var(--ease-out-expo);
}
.brand:hover .brand-mark { transform: scale(1.06); }

/* Antennes — léger shimmer continu */
.brand-antennas line {
  animation: brand-antenna 2.6s ease-in-out infinite;
}
.brand-antennas line:nth-child(2) { animation-delay: 0.3s; }
.brand-antennas line:nth-child(3) { animation-delay: 0.6s; }
.brand-antennas line:nth-child(4) { animation-delay: 0.9s; }
@keyframes brand-antenna {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* Diagrammes bâtons — oscillation continue verte → rouge en passant
   par jaune et orange, chaque barre déphasée. */
.brand-bars rect {
  fill: #10B981;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: brand-bar 1.8s ease-in-out infinite;
}
.brand-bars rect:nth-child(1) { animation-delay: 0s;    }
.brand-bars rect:nth-child(2) { animation-delay: 0.18s; }
.brand-bars rect:nth-child(3) { animation-delay: 0.34s; }
.brand-bars rect:nth-child(4) { animation-delay: 0.48s; }
.brand-bars rect:nth-child(5) { animation-delay: 0.66s; }
.brand-bars rect:nth-child(6) { animation-delay: 0.84s; }
@keyframes brand-bar {
  0%, 100% { transform: scaleY(0.18); fill: #10B981; }
  20%      { transform: scaleY(0.42); fill: #84CC16; }
  40%      { transform: scaleY(0.68); fill: #FBBF24; }
  60%      { transform: scaleY(0.92); fill: #F97316; }
  80%      { transform: scaleY(0.55); fill: #EF4444; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 2px;
}

.header-controls { display: flex; align-items: center; gap: 24px; }
.lang-switch { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.lang-btn {
  padding: 4px 8px;
  color: var(--ink-4);
  font-weight: 500;
  transition: color .3s var(--ease-out-quart);
}
.lang-btn.active { color: var(--ink); }
.lang-btn:hover { color: var(--green-deep); }
.lang-sep { color: var(--ink-4); }

.signal-dot {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.signal-dot .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green-glow);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===== APP / SCREENS ===== */
.app {
  position: relative; z-index: 5;
  max-width: 1100px; margin: 0 auto;
  padding: 40px;
  min-height: calc(100vh - 200px);
}
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  animation: screen-in .7s var(--ease-out-expo) forwards;
}
.screen.active { display: block; }
@keyframes screen-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== INTRO SCREEN ===== */
.intro-wrap { max-width: 900px; margin: 40px auto; text-align: center; }
.intro-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 32px;
  animation: fade-up .8s var(--ease-out-expo) .1s both;
}
.intro-badge svg { color: var(--green-deep); }

.intro-title {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--ink);
}
.intro-title .line { display: block; animation: fade-up .9s var(--ease-out-expo) .2s both; }
.intro-title .line:nth-child(2) { animation-delay: .35s; }
.intro-title .gradient {
  background: linear-gradient(90deg, var(--ink) 0%, var(--green-deep) 60%, var(--ink) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up .9s var(--ease-out-expo) .35s both, sheen 8s linear infinite;
}
@keyframes sheen {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.intro-lead {
  max-width: 620px; margin: 0 auto 56px;
  font-size: 17px; color: var(--ink-3);
  line-height: 1.65;
  animation: fade-up .9s var(--ease-out-expo) .5s both;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 22px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease-out-expo), border-color .4s, box-shadow .5s;
  animation: fade-up .9s var(--ease-out-expo) .65s both;
}
.info-card:nth-child(2) { animation-delay: .75s; }
.info-card:nth-child(3) { animation-delay: .85s; }
.info-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  transform: translateX(-100%);
  transition: transform .8s var(--ease-out-expo);
}
.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-deep);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.12), 0 0 0 1px var(--green-glow);
}
.info-card:hover::before { transform: translateX(100%); }

.card-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
  border: 1px solid rgba(16,185,129,0.2);
  margin-bottom: 18px;
  color: var(--green-dark);
  transition: transform .5s var(--ease-out-expo);
}
.info-card:hover .card-icon { transform: scale(1.08) rotate(-6deg); }
.card-icon svg { width: 22px; height: 22px; }
.info-card h3 {
  font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--ink);
}
.info-card p { font-size: 14px; color: var(--ink-3); line-height: 1.55; }

.intro-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.disclaimer {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-4);
  font-family: var(--font-mono);
  max-width: 540px; text-align: center; line-height: 1.5;
  animation: fade-up .9s var(--ease-out-expo) 1s both;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .4s var(--ease-out-expo), background .3s, color .3s, border-color .3s, box-shadow .4s;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(16,185,129,0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out-expo);
  pointer-events: none;
}
.btn-primary:not(:disabled):hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(6, 95, 70, 0.6), 0 0 0 1px var(--green-glow);
}
.btn-primary:not(:disabled):hover::before { transform: translateX(120%); }
.btn-primary .btn-arrow { transition: transform .4s var(--ease-out-expo); }
.btn-primary:not(:disabled):hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.btn-ghost:not(:disabled):hover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(255,255,255,0.5);
}

.btn-large { padding: 16px 28px; font-size: 15px; animation: fade-up .9s var(--ease-out-expo) .85s both; }

/* ===== QUESTIONS SCREEN ===== */
.q-wrap { max-width: 780px; margin: 20px auto; }

.progress-bar {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 50px;
}
.progress-track {
  flex: 1; height: 2px;
  background: var(--line); border-radius: 2px;
  overflow: hidden; position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  border-radius: 2px;
  transition: width .9s var(--ease-out-expo);
  position: relative;
  box-shadow: 0 0 12px var(--green-glow);
}
.progress-fill::after {
  content: ""; position: absolute; top: -3px; right: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.6s infinite;
}
.progress-meta {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-3);
}
.progress-step { color: var(--ink); font-weight: 600; font-size: 18px; }
.progress-sep { color: var(--ink-4); }
.progress-total { color: var(--ink-4); font-size: 14px; }
.progress-label {
  margin-left: 6px; text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.1em; color: var(--ink-4);
}

.question-frame { min-height: 380px; }
.question {
  animation: fade-in-up .6s var(--ease-out-expo);
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.q-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--green-dark);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.q-kicker::before {
  content: ""; width: 24px; height: 1px; background: var(--green-dark);
}
.q-title {
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.2; font-weight: 500;
  margin-bottom: 10px; color: var(--ink);
  letter-spacing: -0.02em;
}
.q-sub {
  color: var(--ink-3); font-size: 15px;
  margin-bottom: 32px; max-width: 620px; line-height: 1.6;
}

.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-options.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.q-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .3s var(--ease-out-quart), background .3s, transform .3s;
  position: relative;
  text-align: left;
  font-size: 15px;
  color: var(--ink);
}
.q-opt:hover {
  border-color: var(--green-deep);
  transform: translateX(4px);
}
.q-opt.selected {
  border-color: var(--ink);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16,185,129,0.04) 100%);
  box-shadow: 0 0 0 1px var(--ink);
}
.q-opt-mark {
  flex: 0 0 20px; height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
  transition: border-color .3s, background .3s;
}
.q-opt.selected .q-opt-mark {
  border-color: var(--ink);
  background: var(--ink);
}
.q-opt.selected .q-opt-mark::after {
  content: ""; position: absolute; inset: 4px;
  background: var(--green); border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
}
.q-opt.multi .q-opt-mark { border-radius: 5px; }
.q-opt.multi.selected .q-opt-mark::after {
  inset: 0; border-radius: 4px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.q-opt.multi.selected .q-opt-mark {
  background: var(--ink);
}
.q-opt.multi.selected .q-opt-mark svg {
  display: block; width: 14px; height: 14px; color: var(--green);
}
.q-opt.multi .q-opt-mark svg { display: none; }

.q-opt-label { flex: 1; }
.q-opt-label strong { display: block; font-weight: 500; margin-bottom: 2px; }
.q-opt-label .meta {
  display: block; font-size: 13px; color: var(--ink-3); line-height: 1.4;
}

/* Numeric steppers — aligned grid, always-visible controls */
.q-quant { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 6px; }
.quant-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .3s, box-shadow .3s;
}
.quant-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 16px -10px rgba(0,0,0,0.1);
}
.quant-label {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  font-size: 15px; color: var(--ink);
}
.quant-label .qi {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
  border: 1px solid rgba(16,185,129,0.22);
  color: var(--green-dark);
  transition: transform .4s var(--ease-out-expo);
}
.quant-row:hover .quant-label .qi { transform: rotate(-6deg) scale(1.05); }
.quant-label .qi svg { width: 20px; height: 20px; display: block; }
.quant-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.quant-meta { font-size: 11px; color: var(--ink-4); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }

.quant-ctrl {
  display: grid;
  grid-template-columns: 40px 96px 40px;
  align-items: center;
  gap: 10px;
}
.quant-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease-out-quart), border-color .25s, color .25s, transform .3s var(--ease-out-expo), box-shadow .25s;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.quant-btn svg { width: 18px; height: 18px; display: block; transition: transform .35s var(--ease-out-expo); }
.quant-btn::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--green-soft) 0%, transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.quant-btn:hover {
  border-color: var(--green-deep);
  color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -10px var(--green-glow);
}
.quant-btn:hover::before { opacity: 1; }
.quant-btn:hover svg { transform: scale(1.25); }
.quant-btn:active { transform: translateY(0) scale(0.94); }
.quant-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.quant-value {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 600;
  color: var(--ink);
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.quant-value .num { transition: transform .25s var(--ease-out-expo); }
.quant-value.bump .num { animation: bump .35s var(--ease-out-expo); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); color: var(--green-dark); }
  100% { transform: scale(1); }
}
.quant-value .unit { font-size: 11px; color: var(--ink-4); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; }

.q-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ===== RESULT SCREEN ===== */
.result-wrap { max-width: 960px; margin: 0 auto; }

.result-header {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.result-header::before {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(circle at 30% 50%, var(--green-soft), transparent 60%);
  pointer-events: none;
  animation: float-bg 18s linear infinite;
}
@keyframes float-bg {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(5%, -5%); }
}

/* ===== ACTION-ORIENTED RESULT HEADER (no numeric score) ===== */
.result-action {
  position: relative;
  border-left: 6px solid var(--accent, var(--lvl-advise));
}
.result-action.level-prevent   { --accent: var(--lvl-prevent);   --accent-soft: var(--lvl-prevent-soft); }
.result-action.level-advise    { --accent: var(--lvl-advise);    --accent-soft: var(--lvl-advise-soft); }
.result-action.level-target    { --accent: var(--lvl-target);    --accent-soft: var(--lvl-target-soft); }
.result-action.level-priority  { --accent: var(--lvl-priority);  --accent-soft: var(--lvl-priority-soft); }
.result-action.level-emergency { --accent: var(--lvl-emergency); --accent-soft: var(--lvl-emergency-soft); }

.result-action::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 100% 0%, var(--accent-soft), transparent 55%);
  opacity: 0.9;
}

.action-kicker {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px; border-radius: 100px;
  margin-bottom: 16px;
}
.action-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: action-pulse 1.8s var(--ease-out-quart) infinite;
}
@keyframes action-pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent); opacity: 1; }
  70%  { box-shadow: 0 0 0 10px transparent; opacity: 0.6; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.action-step {
  color: var(--ink-4);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.action-step #action-step-num { color: var(--accent); font-weight: 600; }

.action-title {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.action-desc {
  position: relative; z-index: 1;
  font-size: 15.5px; color: var(--ink-3);
  max-width: 640px; line-height: 1.65;
  margin-bottom: 24px;
}

/* 5-step meter */
.action-meter {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
  max-width: 520px;
}
.action-meter .step {
  height: 8px;
  border-radius: 4px;
  background: rgba(10, 15, 20, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease-out-expo);
}
.action-meter .step.filled {
  background: var(--accent);
}
.action-meter .step.current {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.action-meter .step.current::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: meter-shimmer 2.4s var(--ease-in-out-quart) infinite;
}
@keyframes meter-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* CTA block — always action-inviting */
.action-cta {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 20px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(10,15,20,0.02), var(--accent-soft));
  border: 1px solid var(--line);
  border-radius: 14px;
  flex-wrap: wrap;
}
.action-cta .cta-text { flex: 1; min-width: 240px; }
.action-cta .cta-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.action-cta .cta-text p {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.55;
}
.action-cta .btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px -8px var(--accent);
}
.action-cta .btn:hover { filter: brightness(1.08); }

/* Legacy compatibility (ring may still exist in DOM) — hide it */
.level-ring, .ring-svg, .level-pulse, .level-center, .level-pill { display: none !important; }

.result-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 20px;
}
.section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), transparent);
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--green-dark);
}
.section-icon svg { width: 20px; height: 20px; }
.section-head h3 { font-size: 18px; font-weight: 600; color: var(--ink); }
.section-head > div { flex: 1; }
.section-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; line-height: 1.4; }

/* ===== VIGILANCE POINTS ===== */
.vigilance-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--ink);
  color: var(--bg-card);
  border-radius: 12px;
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.vigilance-section.empty .vigilance-count { background: var(--ink-4); }

.vigilance-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.vigilance-item {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform .25s var(--ease-out-quart), border-color .25s;
  animation: vig-in .5s var(--ease-out-expo) both;
}
@keyframes vig-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vigilance-item:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.vigilance-item .vig-dot {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  margin-top: 7px;
  background: var(--lvl-advise);
  box-shadow: 0 0 0 4px var(--lvl-advise-soft);
}
.vigilance-item.sev-low  .vig-dot { background: var(--lvl-advise);   box-shadow: 0 0 0 4px var(--lvl-advise-soft); }
.vigilance-item.sev-mid  .vig-dot { background: var(--lvl-target);   box-shadow: 0 0 0 4px var(--lvl-target-soft); }
.vigilance-item.sev-high .vig-dot {
  background: var(--lvl-priority); box-shadow: 0 0 0 4px var(--lvl-priority-soft);
  animation: vig-pulse 1.6s var(--ease-out-quart) infinite;
}
@keyframes vig-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--lvl-priority-soft); }
  50%      { box-shadow: 0 0 0 8px rgba(239,68,68,0.06); }
}
.vigilance-item .vig-body { flex: 1; min-width: 0; }
.vigilance-item .vig-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-bottom: 3px;
}
.vigilance-item .vig-label {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}
.vigilance-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--ink-3);
  font-style: italic;
  background: var(--bg-raised);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

/* Exclusive option (ex: "Aucun indicateur", "Accès contrôlé") */
.q-opt.exclusive {
  background: rgba(10,15,20,0.02);
  border-style: dashed;
}
.q-opt.exclusive.selected {
  background: rgba(16,185,129,0.06);
  border-style: solid;
}

.recos-list { display: flex; flex-direction: column; gap: 14px; }
.reco-item {
  display: flex; gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,0,0,0.015), transparent);
  border-left: 3px solid var(--green-deep);
  transition: transform .3s var(--ease-out-quart), background .3s;
}
.reco-item:hover { transform: translateX(4px); background: rgba(16,185,129,0.04); }
.reco-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.reco-content strong {
  display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px;
  font-family: var(--font-display); font-size: 15px;
}
.reco-content p { font-size: 14px; color: var(--ink-3); line-height: 1.55; }

.reco-sep {
  list-style: none;
  margin: 10px 0 2px;
  padding: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: flex; align-items: center; gap: 12px;
}
.reco-sep::before,
.reco-sep::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(5,95,60,0.25), transparent);
}
.reco-item.profile {
  border-left-color: var(--green-mid, #059669);
  background: linear-gradient(135deg, rgba(16,185,129,0.05), transparent);
}
.reco-item.profile .reco-num {
  background: var(--green-dark); color: #fff;
}

.scope-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.scope-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.scope-card .ic { color: var(--green-dark); margin-bottom: 10px; }
.scope-card .ic svg { width: 22px; height: 22px; }
.scope-card .k { font-size: 12px; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }
.scope-card .v { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--ink); margin-top: 2px; letter-spacing: -0.02em; }

.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.summary-row:last-child { border-bottom: none; }
.summary-k {
  flex: 0 0 220px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em;
  padding-top: 2px;
}
.summary-v { flex: 1; color: var(--ink); font-size: 14px; line-height: 1.55; }

.result-actions {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 28px; flex-wrap: wrap;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 15, 20, 0.78);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease-out-quart), visibility .4s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 620px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform .5s var(--ease-out-expo);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: color .25s, background .25s;
  z-index: 2;
}
.modal-close:hover { color: var(--ink); background: var(--bg-raised); }

.modal-inner { padding: 40px; }
.modal-head { text-align: center; margin-bottom: 30px; }
.modal-icon {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ink), var(--ink-2));
  color: var(--green);
}
.modal-icon svg { width: 26px; height: 26px; }
#modal-title { font-size: 26px; margin-bottom: 8px; font-weight: 500; }
.modal-sub { font-size: 14px; color: var(--ink-3); max-width: 420px; margin: 0 auto; line-height: 1.5; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); font-weight: 500;
}
.field input, .field textarea {
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink); font-size: 14px;
  transition: border-color .3s, background .3s;
  outline: none;
}
.field input:focus, .field textarea:focus {
  border-color: var(--ink);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.field textarea { resize: vertical; min-height: 88px; font-family: inherit; }

/* RGPD notice block above the consent checkbox */
.rgpd-notice {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green-deep);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-top: 4px;
}
.rgpd-notice strong { color: var(--ink); font-weight: 600; }
.rgpd-notice a { color: var(--green-dark); text-decoration: underline; }
.rgpd-notice a:hover { color: var(--electric-blue); }

/* Footer legal link */
.footer-legal-link {
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--ink-4);
  padding-bottom: 1px;
  transition: color .25s var(--ease-out-quart), border-color .25s var(--ease-out-quart);
}
.footer-legal-link:hover { color: var(--electric-blue); border-color: var(--electric-blue); }
.footer-sep-dot { color: var(--ink-4); margin: 0 4px; }

/* Legal / RGPD modal — wider, scrollable, structured */
.modal-legal { max-width: 760px; }
.modal-legal-inner { padding: 44px 44px 32px; }
.modal-legal-inner h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.legal-section { margin-bottom: 22px; }
.legal-section h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--green-dark);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.legal-section p {
  font-size: 14px; line-height: 1.65;
  color: var(--ink-2);
}
.legal-section strong { color: var(--ink); font-weight: 600; }
.legal-section ul { margin: 8px 0 8px 20px; padding: 0; }
.legal-section li { margin: 4px 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.legal-section a { color: var(--green-dark); text-decoration: underline; }
.legal-section a:hover { color: var(--electric-blue); }
.legal-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal-footer p {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.field-checkbox { flex-direction: row; align-items: flex-start; }
.checkbox {
  display: flex; gap: 12px; cursor: pointer;
  font-size: 13px; color: var(--ink-3); line-height: 1.5;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-box {
  flex: 0 0 20px; height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s;
  background: var(--bg-card);
  margin-top: 1px;
}
.checkbox-box svg { width: 14px; height: 14px; color: var(--bg); opacity: 0; transition: opacity .2s; }
.checkbox input:checked ~ .checkbox-box { background: var(--ink); border-color: var(--ink); }
.checkbox input:checked ~ .checkbox-box svg { opacity: 1; color: var(--green); }

.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.form-status {
  font-family: var(--font-mono); font-size: 12px;
  padding: 12px 14px; border-radius: 8px;
  display: none;
}
.form-status.error { display: block; background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.form-status.success { display: block; background: rgba(16,185,129,0.08); color: var(--green-dark); border: 1px solid rgba(16,185,129,0.2); }
.form-status.loading { display: block; background: var(--bg-raised); color: var(--ink-3); border: 1px solid var(--line); }

/* ============================================================
   GLITCH / INTERFERENCE TEXT — second iteration
   Text always readable. Snap-burst chromatic jitter combined
   with a SMOOTH italic-style lean (transform skewX) — both
   composed via registered custom properties so the discrete
   jitter and the eased tilt never fight for the transform.
   ============================================================ */
@property --glitch-jx    { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --glitch-jy    { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --glitch-jskew { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --glitch-tilt  { syntax: '<angle>';  inherits: false; initial-value: 0deg; }

.glitch {
  position: relative;
  display: inline-block;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  --glitch-jx: 0px;
  --glitch-jy: 0px;
  --glitch-jskew: 0deg;
  --glitch-tilt: 0deg;
  transform: translate(var(--glitch-jx), var(--glitch-jy)) skewX(calc(var(--glitch-jskew) + var(--glitch-tilt)));
  text-shadow:
    0.6px 0 0 rgba(255, 46, 91, 0.55),
    -0.6px 0 0 rgba(0, 230, 255, 0.55);
  animation:
    glitch-jitter 5.2s steps(1, end) infinite,
    glitch-tilt 7s cubic-bezier(0.55, 0, 0.45, 1) infinite;
  transition:
    color .35s var(--ease-out-expo),
    text-shadow .35s var(--ease-out-expo),
    --glitch-jx .35s var(--ease-out-expo),
    --glitch-jy .35s var(--ease-out-expo),
    --glitch-jskew .35s var(--ease-out-expo),
    --glitch-tilt .45s var(--ease-out-expo),
    filter .35s var(--ease-out-expo);
}
a.glitch { text-decoration: none; }

/* Snap-burst jitter — each frame holds (steps), text-shadow and
   the registered translate/skew variables flick into their new
   value at every keyframe. */
@keyframes glitch-jitter {
  0%, 17%, 22%, 38%, 43%, 64%, 69%, 100% {
    --glitch-jx: 0px;
    --glitch-jy: 0px;
    --glitch-jskew: 0deg;
    text-shadow:
      0.6px 0 0 rgba(255, 46, 91, 0.55),
      -0.6px 0 0 rgba(0, 230, 255, 0.55);
    filter: none;
  }
  18% {
    --glitch-jx: -1px; --glitch-jy: 0px; --glitch-jskew: -3deg;
    text-shadow:
      1.8px 0 0 rgba(255, 46, 91, 0.85),
      -1.8px 0 0 rgba(0, 230, 255, 0.85);
    filter: blur(0.3px);
  }
  19% {
    --glitch-jx: 1px; --glitch-jy: -1px; --glitch-jskew: 2deg;
    text-shadow:
      -1.4px 0 0 rgba(255, 46, 91, 0.75),
      1.4px 0 0 rgba(0, 230, 255, 0.75);
  }
  20% {
    --glitch-jx: -1px; --glitch-jy: 1px; --glitch-jskew: -1deg;
    text-shadow:
      2px 0 0 rgba(255, 46, 91, 0.9),
      -2px 0 0 rgba(0, 230, 255, 0.9);
    filter: blur(0.4px);
  }
  21% {
    --glitch-jx: 1px; --glitch-jy: 0px; --glitch-jskew: 0deg;
    text-shadow:
      -1.2px 0 0 rgba(255, 46, 91, 0.7),
      1.2px 0 0 rgba(0, 230, 255, 0.7);
  }
  39% {
    --glitch-jx: 1px; --glitch-jy: 0px; --glitch-jskew: 2deg;
    text-shadow:
      1.4px 0 0 rgba(255, 46, 91, 0.8),
      -1.4px 0 0 rgba(0, 230, 255, 0.8);
  }
  40% {
    --glitch-jx: -1px; --glitch-jy: 1px; --glitch-jskew: -2deg;
    text-shadow:
      -2px 0 0 rgba(255, 46, 91, 0.9),
      2px 0 0 rgba(0, 230, 255, 0.9);
    filter: blur(0.5px);
  }
  41% {
    --glitch-jx: 0px; --glitch-jy: -1px; --glitch-jskew: 1deg;
    text-shadow:
      1.6px 0 0 rgba(255, 46, 91, 0.85),
      -1.6px 0 0 rgba(0, 230, 255, 0.85);
  }
  42% { --glitch-jx: -1px; --glitch-jy: 0px; --glitch-jskew: -1deg; }
  65% {
    --glitch-jx: -1px; --glitch-jy: 0px; --glitch-jskew: -2deg;
    text-shadow:
      1.6px 0 0 rgba(255, 46, 91, 0.8),
      -1.6px 0 0 rgba(0, 230, 255, 0.8);
    filter: blur(0.3px);
  }
  66% {
    --glitch-jx: 1px; --glitch-jy: 1px; --glitch-jskew: 2deg;
    text-shadow:
      -1.8px 0 0 rgba(255, 46, 91, 0.85),
      1.8px 0 0 rgba(0, 230, 255, 0.85);
  }
  67% {
    --glitch-jx: -1px; --glitch-jy: 0px; --glitch-jskew: -3deg;
    text-shadow:
      2px 0 0 rgba(255, 46, 91, 0.9),
      -2px 0 0 rgba(0, 230, 255, 0.9);
    filter: blur(0.4px);
  }
  68% { --glitch-jx: 0px; --glitch-jy: 1px; --glitch-jskew: 1deg; }
}

/* Smooth italic-style basculement — eased skewX that gently
   leans the letters from upright to a strong italic angle and
   back. Composes with the snap jitter via shared transform. */
@keyframes glitch-tilt {
  0%, 100% { --glitch-tilt: 0deg; }
  18%      { --glitch-tilt: -3deg; }
  32%      { --glitch-tilt: -10deg; }
  46%      { --glitch-tilt: -7deg; }
  58%      { --glitch-tilt: -2deg; }
  72%      { --glitch-tilt: -9deg; }
  86%      { --glitch-tilt: -4deg; }
}

/* Continuous fine scanlines drifting over the letters — denser
   and more present than V2 baseline so the interference feels
   alive between bursts. */
.glitch::before {
  content: "";
  position: absolute;
  left: -3%; right: -3%; top: -10%; bottom: -10%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.36) 2px,
    rgba(0, 0, 0, 0.36) 3px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.78;
  animation: glitch-scanlines 2.8s linear infinite;
  border-radius: 2px;
}
@keyframes glitch-scanlines {
  0%   { transform: translateY(-18%); }
  100% { transform: translateY(18%); }
}

/* Periodic horizontal "tear" bars — taller, brighter, with a
   stronger glow so each burst reads as a real signal corruption. */
.glitch::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%;
  top: 30%;
  height: 2px;
  background: rgba(0, 230, 255, 0.95);
  box-shadow: 0 0 10px rgba(0, 230, 255, 0.7);
  pointer-events: none;
  opacity: 0;
  animation: glitch-bar 5.2s steps(1, end) infinite;
  animation-delay: .3s;
  mix-blend-mode: screen;
}
@keyframes glitch-bar {
  0%, 17%, 22%, 38%, 43%, 64%, 69%, 100% { opacity: 0; }
  18% { opacity: 1;    top: 22%; height: 2px; background: rgba(255, 46, 91, 0.95);  box-shadow: 0 0 12px rgba(255, 46, 91, 0.7); }
  19% { opacity: 0.95; top: 64%; height: 3px; background: rgba(0, 230, 255, 0.95);  box-shadow: 0 0 14px rgba(0, 230, 255, 0.7); }
  20% { opacity: 1;    top: 42%; height: 2px; background: rgba(255, 255, 255, 1);    box-shadow: 0 0 12px rgba(0, 230, 255, 0.6); }
  21% { opacity: 0.9;  top: 78%; height: 2px; background: rgba(255, 46, 91, 0.95);  box-shadow: 0 0 10px rgba(255, 46, 91, 0.6); }
  39% { opacity: 1;    top: 18%; height: 3px; background: rgba(0, 230, 255, 0.95);  box-shadow: 0 0 14px rgba(0, 230, 255, 0.7); }
  40% { opacity: 1;    top: 58%; height: 2px; background: rgba(255, 46, 91, 0.95);  box-shadow: 0 0 12px rgba(255, 46, 91, 0.7); }
  41% { opacity: 0.95; top: 36%; height: 3px; background: rgba(255, 255, 255, 1);    box-shadow: 0 0 14px rgba(255, 46, 91, 0.55); }
  42% { opacity: 0.85; top: 70%; height: 2px; background: rgba(0, 230, 255, 0.95);  box-shadow: 0 0 10px rgba(0, 230, 255, 0.65); }
  65% { opacity: 1;    top: 26%; height: 2px; background: rgba(0, 230, 255, 0.95);  box-shadow: 0 0 12px rgba(0, 230, 255, 0.7); }
  66% { opacity: 0.95; top: 60%; height: 3px; background: rgba(255, 46, 91, 0.95);  box-shadow: 0 0 14px rgba(255, 46, 91, 0.7); }
  67% { opacity: 1;    top: 44%; height: 2px; background: rgba(255, 255, 255, 1);    box-shadow: 0 0 12px rgba(0, 230, 255, 0.55); }
  68% { opacity: 0.9;  top: 80%; height: 2px; background: rgba(255, 46, 91, 0.95);  box-shadow: 0 0 10px rgba(255, 46, 91, 0.6); }
}

/* Stabilise on hover — interference vanishes, letters lock to electric blue.
   Stopping the animations lets the registered variables transition smoothly
   back to their initial 0 values, so the freeze is gentle (no snap). */
.glitch:hover,
.glitch:focus-visible {
  color: var(--electric-blue);
  animation: none;
  text-shadow: 0 0 10px var(--electric-blue-glow);
  filter: none;
}
.glitch:hover::before,
.glitch:focus-visible::before {
  animation: none;
  opacity: 0;
}
.glitch:hover::after,
.glitch:focus-visible::after {
  animation: none;
  opacity: 0;
}

/* Title variant — used for "la criticité" inside .line.gradient.
   At rest, solid ink (the chromatic glitch plays over it).
   On hover the glyphs become transparent so the parent's animated
   green→black gradient (the same one used by "de votre situation.")
   shows through — the whole line then reads as a continuous gradient
   while the animation is frozen. */
.glitch--title {
  color: var(--ink);
}
.glitch--title:hover,
.glitch--title:focus-visible {
  color: transparent;
  text-shadow: none;
}
/* ===== FOOTER ===== */
.app-footer {
  position: relative; z-index: 5;
  padding: 30px 40px 40px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.1em;
  text-align: center;
}
.footer-line {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-mark { color: var(--ink-2); font-weight: 500; }
.footer-partner { font-weight: 700; color: var(--ink-2); }
.footer-legal { color: var(--ink-4); }
/* Legacy separator — now hidden, kept for backward compat */
.footer-sep { display: none; }

/* ============================================================
   ICON ANIMATIONS — continuous, subtle, TSCM-spectrum inspired
   ============================================================ */
[data-icon] { display: inline-flex; }
[data-icon] svg { display: block; transition: transform .5s var(--ease-out-expo); }
.info-card:hover [data-icon] svg { transform: rotate(-8deg) scale(1.1); }

/* RADAR — rotating sweep + pulsing rings */
.ico-radar-sweep {
  transform-origin: 12px 12px;
  animation: radar-rotate 3.6s linear infinite;
}
.ico-radar-ring-outer { animation: radar-ring 3.2s var(--ease-out-quart) infinite; transform-origin: 12px 12px; }
.ico-radar-ring-mid   { animation: radar-ring 3.2s var(--ease-out-quart) 1.1s infinite; transform-origin: 12px 12px; }
.ico-radar-ring-core  { animation: radar-core 1.6s ease-in-out infinite; transform-origin: 12px 12px; }
@keyframes radar-rotate { to { transform: rotate(360deg); } }
@keyframes radar-ring {
  0%   { transform: scale(0.5); opacity: 0; }
  30%  { opacity: 0.55; }
  100% { transform: scale(1.05); opacity: 0; }
}
@keyframes radar-core {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* WAVE — traveling waveform */
.ico-wave-path {
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
  animation: wave-travel 3s linear infinite;
}
@keyframes wave-travel {
  to { stroke-dashoffset: -60; }
}

/* SHIELD — subtle breathing + check draw */
.ico-shield svg { animation: shield-breathe 4s ease-in-out infinite; transform-origin: center; }
.ico-shield-check {
  stroke-dasharray: 14; stroke-dashoffset: 14;
  animation: shield-check 4s ease-in-out infinite;
}
@keyframes shield-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes shield-check {
  0%, 30% { stroke-dashoffset: 14; }
  55%, 100% { stroke-dashoffset: 0; }
}

/* ALERT — tick pulse */
.ico-alert-bang {
  transform-origin: 12px 13px;
  animation: alert-bang 1.8s var(--ease-out-quart) infinite;
}
@keyframes alert-bang {
  0%, 80%, 100% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.25); opacity: 0.75; }
}

/* MAP — gentle drift */
.ico-map svg { animation: map-drift 6s ease-in-out infinite; }
@keyframes map-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0.8px, -0.6px); }
}

/* DOC — line scan */
.ico-doc-line1, .ico-doc-line2 {
  stroke-dasharray: 12; stroke-dashoffset: 12;
  animation: doc-scan 3.5s var(--ease-out-quart) infinite;
}
.ico-doc-line2 { animation-delay: 0.35s; stroke-dasharray: 8; stroke-dashoffset: 8; }
@keyframes doc-scan {
  0%, 20% { stroke-dashoffset: 12; }
  55%, 100% { stroke-dashoffset: 0; }
}

/* SEND — paper plane propulsion */
.ico-send svg { animation: send-fly 3.2s ease-in-out infinite; }
@keyframes send-fly {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1.5px, -1.5px) rotate(-2deg); }
}

/* HOME / OFFICE / MEETING / HOTEL — soft breathing */
.ico-breath svg { animation: breath 4.5s ease-in-out infinite; transform-origin: center; }
@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* CAR — wheels spinning */
.ico-car-wheel-l, .ico-car-wheel-r {
  transform-origin: center;
  animation: car-shake 2.6s ease-in-out infinite;
}
.ico-car-wheel-l { transform-origin: 7px 15px; }
.ico-car-wheel-r { transform-origin: 17px 15px; }
@keyframes car-shake {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-0.6px) scale(1.08); }
}

/* ROOMS — grid expand pulse */
.ico-rooms svg { animation: rooms-pulse 3.4s ease-in-out infinite; transform-origin: center; }
@keyframes rooms-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

/* SURFACE — rotating measure */
.ico-surface svg { animation: surface-rotate 6s linear infinite; transform-origin: center; }
@keyframes surface-rotate {
  to { transform: rotate(360deg); }
}

/* PLUS / MINUS in steppers — subtle attention pulse to make them visible */
.quant-btn svg {
  animation: btn-attn 3s ease-in-out infinite;
  transform-origin: center;
}
@keyframes btn-attn {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}
.quant-btn:hover svg { animation: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .action-title { font-size: 34px; }
  .action-cta { flex-direction: column; align-items: flex-start; }
  .action-cta .btn { width: 100%; justify-content: center; }
  .vigilance-list { grid-template-columns: 1fr 1fr; }
  .summary-k { flex: 0 0 140px; }
}
@media (max-width: 680px) {
  .app-header { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
  .signal-dot .sig-label { display: none; }
  .app { padding: 20px; }
  .intro-wrap { margin: 20px auto; }
  .intro-title { font-size: 40px; }
  .intro-lead { font-size: 15px; margin-bottom: 36px; }
  .info-card { padding: 22px 18px; }
  .result-header,
  .result-action { padding: 26px 22px; }
  .result-section { padding: 22px 18px; }
  .modal-inner { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .q-options.grid-2 { grid-template-columns: 1fr; }
  .summary-row { flex-direction: column; gap: 4px; }
  .summary-k { flex: none; }
  .q-actions { gap: 10px; }
  .q-actions .btn { flex: 1; padding: 13px 14px; font-size: 13px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .app-footer { padding: 24px 20px; }
  .action-kicker { font-size: 10px; flex-wrap: wrap; }
  .action-title { font-size: 28px; }
  .action-desc { font-size: 14px; }
  .action-meter { gap: 4px; }
  .action-meter .step { height: 6px; }
  .action-cta { padding: 16px; gap: 14px; }
  .action-cta .cta-text strong { font-size: 14px; }
  .action-cta .cta-text p { font-size: 12px; }
  .vigilance-list { grid-template-columns: 1fr; }
  .vigilance-item { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
