:root {
  --ux-breath: 4.8s;
  --ux-transition: 0.28s;
  --font-ui: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --bg: #060606;
  --panel: rgba(18, 18, 18, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.02);
  --border: rgba(212, 175, 55, 0.14);
  --border-strong: rgba(212, 175, 55, 0.26);
  --gold: #d4af37;
  --text: #f4ecd0;
  --text-soft: #e9ddb7;
  --muted: #bba76b;
  --danger: #ff7b7b;
  --ok: #7dffb3;
  --warn: #ffd36e;
  --info: #98c6ff;
  --shadow-xl: 0 28px 90px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --sidebar-w: 210px;
  --state-rgb: 212, 175, 55;
  --state-text: #fff0c8;
  --state-glow: 0 0 26px rgba(212, 175, 55, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* progressive enhancement — iOS Safari 16+: supprime l'espace vide sous le footer */
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(var(--state-rgb), 0.07), transparent 24%),
    radial-gradient(circle at bottom right, rgba(var(--state-rgb), 0.04), transparent 18%),
    linear-gradient(180deg, #040404, #090909 42%, #050505 100%);
  transition: background 0.35s ease;
}

body[data-shell-state="expansion"] {
  --state-rgb: 125, 255, 179;
  --state-text: #e6fff0;
}

body[data-shell-state="compression"] {
  --state-rgb: 152, 198, 255;
  --state-text: #ebf5ff;
}

body[data-shell-state="breakout"] {
  --state-rgb: 152, 198, 255;
  --state-text: #ebf5ff;
}

body[data-shell-state="trend"] {
  --state-rgb: 125, 255, 179;
  --state-text: #e6fff0;
}

body[data-shell-state="defense"] {
  --state-rgb: 255, 211, 110;
  --state-text: #fff2c3;
}

body[data-shell-state="riskoff"] {
  --state-rgb: 255, 123, 123;
  --state-text: #ffe4e4;
}

body[data-shell-state="chaos"] {
  --state-rgb: 255, 123, 123;
  --state-text: #ffe4e4;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.main-shell,
.stack,
.side-panel,
.layout,
.main-grid,
.master-grid,
.overview-grid,
.pilot-grid,
.stretch-grid,
.agent-grid,
.action-columns,
.mode-head,
.mode-actions,
.hero-grid,
.hero-copy {
  min-width: 0;
}

.saas-header,
.hero,
.card,
.side-card,
.master-card,
.floating-sidebar,
.memory-box,
.diagnostic-item,
.alert-box {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.016), var(--shadow-lg);
}

.saas-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.92), rgba(12, 12, 12, 0.86));
  backdrop-filter: blur(14px);
}

.saas-header-inner,
.engine-journal-head,
.signal-narratif-head,
.mantra-operationnel-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-wrap,
.header-actions,
.master-badges,
.micro-badge-row,
.tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-seal,
.sidebar-seal {
  background: radial-gradient(circle, rgba(var(--state-rgb), 0.18), rgba(255, 255, 255, 0.02));
  box-shadow: var(--state-glow);
}

.brand-seal {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(var(--state-rgb), 0.22);
  flex: 0 0 auto;
  overflow: hidden;
}

.video-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  pointer-events: none;
  animation: videoLogoPulse 7s ease-in-out infinite;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--state-text);
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.header-chip,
.badge,
.state-pill,
.engine-journal-status,
.signal-narratif-pill,
.mantra-operationnel-pill,
.alert-badge,
.master-badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--state-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-chip {
  min-height: 38px;
  font-size: 12px;
  color: var(--text-soft);
}

.header-chip strong {
  color: var(--state-text);
}

.header-dot,
.badge-dot,
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.header-dot,
.badge-dot {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(125, 255, 179, 0.42);
  animation: pulseDot 2.2s infinite ease-in-out;
}

.badge-dot.warn,
.dot.warn {
  background: var(--warn);
}

.badge-dot.info,
.dot.blue {
  background: var(--info);
}

.dot.green {
  background: var(--ok);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.floating-sidebar {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
  padding: 14px 10px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(14px);
}

.sidebar-head {
  display: flex;
  justify-content: center;
}

.sidebar-seal {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.22);
  overflow: hidden;
}

.video-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  pointer-events: none;
  animation: videoCirclePulse 5.5s ease-in-out infinite;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-tab,
.tab-btn,
.mode-btn {
  appearance: none;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.side-tab {
  position: relative;
  width: 100%;
  min-height: 86px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.side-tab:hover,
.tab-btn:hover,
.mode-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--state-rgb), 0.24);
}

.side-tab.active,
.tab-btn.active,
.mode-btn.active {
  border-color: rgba(var(--state-rgb), 0.34);
  background: linear-gradient(180deg, rgba(var(--state-rgb), 0.16), rgba(255, 255, 255, 0.03));
  color: var(--state-text);
}

.snapshot-confirm {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  opacity: 1;
}

.snapshot-quality-bad {
  animation: snapPulse 1.2s ease-in-out infinite;
}

@keyframes snapPulse {
  0%   { box-shadow: 0 0 0 rgba(255, 68, 68, 0); }
  50%  { box-shadow: 0 0 8px rgba(255, 68, 68, 0.6); }
  100% { box-shadow: 0 0 0 rgba(255, 68, 68, 0); }
}

.snapshot-quality-medium {
  animation: snapGlow 2.5s ease-in-out infinite;
}

@keyframes snapGlow {
  0%   { box-shadow: 0 0 0 rgba(255, 170, 0, 0); }
  50%  { box-shadow: 0 0 6px rgba(255, 170, 0, 0.4); }
  100% { box-shadow: 0 0 0 rgba(255, 170, 0, 0); }
}

.snapshot-quality-good {
  box-shadow: 0 0 4px rgba(0, 255, 136, 0.25);
}

/* ── Trading Policy — visual gate ──────────────────────────── */
.policy-action-allowed {
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.28);
}

.policy-action-forbidden {
  box-shadow: 0 0 0 1px rgba(255, 68, 68, 0.22);
}

.policy-message {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  font-style: italic;
  line-height: 1.45;
  min-height: 16px;
}

.side-tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(var(--state-rgb), 0.95));
}

.side-tab-label,
.side-tab-state,
.tiny-label,
.kpi-label,
.alert-label,
.hero-chip-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-tab-label {
  font-size: 11px;
}

.side-tab-state,
.tiny-label,
.kpi-label,
.alert-label,
.hero-chip-label {
  font-size: 10px;
  color: var(--muted);
}

.side-tab-icon {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.side-tab-role {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-style: italic;
  opacity: 0.65;
  text-transform: none;
}

.pilotage-chapeau {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  font-style: italic;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 36px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 20%, rgba(var(--state-rgb), 0.18), transparent 26%),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.1), transparent 30%),
    linear-gradient(130deg, rgba(255, 255, 255, 0.028), transparent 44%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(8, 8, 8, 0.95));
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.08);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.hero-top,
.hero-bar,
.engine-journal-live,
.signal-narratif,
.mantra-operationnel,
.onboarding-strip {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hero-top > div:first-child {
  min-width: 0;
  max-width: 680px;
}

h1 {
  margin: 10px 0 8px;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.subtitle,
.card-desc,
.engine-journal-sub,
.signal-narratif-sub,
.mode-sub,
.agent-role,
.alert-sub,
.result,
.history-item,
.text-soft,
.insight-sub,
.table-mini-summary {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-soft);
}

.subtitle {
  max-width: 52ch;
}

.subtitle,
.engine-journal-sub,
.signal-narratif-sub,
.master-state-note,
.directive-line,
.history-item,
.result,
.card-desc,
.agent-role {
  overflow-wrap: anywhere;
}

.hero-logo {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 460px;
  padding: 0;
  border: 0;
  background: none;
  aspect-ratio: auto;
}

.hero-logo::before {
  content: "";
  position: absolute;
  inset: 34px 28px 126px 72px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 24% 26%, rgba(var(--state-rgb), 0.18), transparent 28%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  pointer-events: none;
  opacity: 0.82;
}

.hero-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.26)),
    radial-gradient(circle at 82% 70%, rgba(var(--state-rgb), 0.14), transparent 24%);
  pointer-events: none;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 38%;
  border-radius: 28px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.02);
  padding: 0;
  filter: saturate(0.5) contrast(0.78) brightness(0.8);
  opacity: 0.8;
  transform: scale(1.05);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.hero-visual-frame {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at 18% 22%, rgba(var(--state-rgb), 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.008));
}

.hero-visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.88) 0%, rgba(7, 7, 7, 0.64) 42%, rgba(7, 7, 7, 0.08) 100%),
    radial-gradient(circle at 22% 18%, rgba(var(--state-rgb), 0.12), transparent 32%);
  pointer-events: none;
}

.hero-visual-frame::after {
  content: "";
  position: absolute;
  inset: auto 26px 24px 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--state-rgb), 0), rgba(var(--state-rgb), 0.52), rgba(var(--state-rgb), 0));
  pointer-events: none;
}

.hero-overlay-panel {
  position: static;
  margin-top: 16px;
  z-index: 3;
  width: min(252px, calc(100% - 40px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background:
    linear-gradient(180deg, rgba(11, 11, 11, 0.9), rgba(10, 10, 10, 0.76)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 38%);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.hero-overlay-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-kpi-card {
  min-height: 114px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 34%);
  min-width: 0;
}

.hero-kpi-card.primary {
  border-color: rgba(var(--state-rgb), 0.24);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 36%),
    linear-gradient(180deg, rgba(var(--state-rgb), 0.11), rgba(255, 255, 255, 0.014));
}

.hero-kpi-value {
  display: block;
  margin-top: 10px;
  color: var(--state-text);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 22px;
  line-height: 1.15;
  white-space: normal;
  min-width: 0;
}

#heroBarMode {
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  min-width: 0;
}

.lecture-day-card {
  padding: 22px 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-lg);
}

.lecture-day-main {
  margin-top: 12px;
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.lecture-day-sub {
  margin-top: 10px;
  max-width: 60ch;
}

.hero-overlay-list {
  display: grid;
  gap: 10px;
}

.hero-overlay-item {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.028);
}

.hero-overlay-item span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-overlay-item strong {
  font-size: 15px;
  line-height: 1.45;
  color: var(--state-text);
  letter-spacing: -0.02em;
}

.hero-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-support-chip {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.hero-support-chip strong {
  display: block;
  margin-top: 6px;
  color: var(--state-text);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero-bar,
.hero-decision-grid,
.engine-journal-live,
.signal-narratif,
.mantra-operationnel,
.onboarding-strip {
  display: none;
}

.hero-top > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
}

.hero-top h1,
.hero-top .subtitle {
  display: none;
}

.hero-kpi-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.hero-kpi-card {
  display: none;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.hero-kpi-card:nth-child(1),
.hero-kpi-card:nth-child(2) {
  display: block;
}

.hero-kpi-card:nth-child(1) .hero-chip-label,
.hero-kpi-card:nth-child(2) .hero-chip-label {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kpi-card:nth-child(1) .hero-kpi-value {
  margin-top: 0;
  font-size: clamp(66px, 7vw, 108px);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.hero-kpi-card:nth-child(2) .hero-kpi-value {
  margin-top: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.lecture-day-card {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.lecture-day-sub {
  display: none;
}

.lecture-day-main {
  margin-top: 2px;
  max-width: 24ch;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--text);
}

.hero-bar,
.engine-journal-row,
.onboarding-strip,
.alerts-grid,
.overview-grid,
.kpi-grid,
.mode-head,
.mode-actions,
.agent-grid,
.action-columns,
.payload-grid,
.pilot-grid,
.form-grid,
.diagnostic-grid,
.command-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hero-bar {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.8fr);
}

/* Fix : la colonne AGENT (2e) ne doit pas être trop compressée.         */
/* Valeur 0.72fr insuffisante — certains labels comme "Observation"       */
/* cassaient visuellement. Corrigé à 0.92fr pour garantir la lisibilité. */
.hero-decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr) minmax(0, 1.36fr) minmax(0, 1fr);
  gap: 14px;
}

.hero-decision-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.1), transparent 34%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-decision-card .hero-chip-label {
  display: block;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.hero-decision-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--state-text);
  letter-spacing: -0.03em;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  line-height: 1.3;
  text-wrap: balance;
}

/* Verdict — 1re card : taille réduite pour tenir sur 1 ligne */
.hero-decision-grid > .hero-decision-card:nth-child(1) .hero-chip-label {
  margin-bottom: 14px;
}

.hero-decision-grid > .hero-decision-card:nth-child(1) .hero-decision-mini {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* Action du jour — 3e card, poids renforcé */
.hero-decision-grid > .hero-decision-card:nth-child(3) strong {
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-decision-grid > .hero-decision-card:nth-child(3) {
  border-color: rgba(var(--state-rgb), 0.28);
}

.hero-decision-card.primary {
  border-color: rgba(var(--state-rgb), 0.22);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.18), transparent 36%),
    linear-gradient(180deg, rgba(var(--state-rgb), 0.12), rgba(255, 255, 255, 0.016));
}

.hero-decision-card.warning {
  border-color: rgba(255, 123, 123, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 123, 123, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012));
}

.hero-decision-mini {
  font-size: 24px;
  line-height: 1.05;
}

.hero-decision-main {
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.14;
}

.hero-decision-text {
  font-size: 15px;
  line-height: 1.65;
}

.engine-journal-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-chip,
.engine-journal-mini,
.command-card,
.mode-box,
.action-box,
.diagnostic-item,
.payload-item,
.alert-box,
.memory-box {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.hero-chip {
  min-height: 108px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hero-bar .hero-chip:nth-child(4) {
  border-color: rgba(var(--state-rgb), 0.22);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.18), transparent 36%),
    linear-gradient(180deg, rgba(var(--state-rgb), 0.12), rgba(255, 255, 255, 0.02));
}

.hero-bar .hero-chip:nth-child(4) .hero-chip-value,
.hero-bar .hero-chip:first-child .hero-chip-value {
  font-size: 24px;
}

.engine-journal-title,
.signal-narratif-title,
.mantra-operationnel-title,
.onboarding-title,
.card-title,
.publication-title,
.command-card h4 {
  font-family: var(--font-display);
}

.market-badge {
  border-color: rgba(var(--state-rgb), 0.26);
  background: radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 34%), linear-gradient(180deg, rgba(var(--state-rgb), 0.14), rgba(255, 255, 255, 0.02));
}

.hero-chip-value,
.engine-journal-main,
.signal-narratif-main,
.mantra-operationnel-main,
.alert-value,
.master-state-name,
.insight-quote,
.kpi-value,
.mode-main,
.big-state,
.agent-name {
  color: var(--state-text);
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-chip-value {
  font-size: 17px;
  white-space: normal;
  line-height: 1.3;
  min-width: 0;
}

.market-strong {
  font-size: clamp(16px, 1.8vw, 24px);
  white-space: normal;
  line-height: 1.2;
  min-width: 0;
}

.engine-journal-live,
.signal-narratif,
.mantra-operationnel {
  margin-top: 0;
}

.engine-journal-live {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background: radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 30%), linear-gradient(180deg, rgba(var(--state-rgb), 0.08), rgba(255, 255, 255, 0.02));
}

.engine-journal-main {
  font-size: 24px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.engine-journal-title,
.signal-narratif-title,
.mantra-operationnel-title {
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--state-text);
}

.engine-journal-mini-label,
.master-state-title,
.onboarding-title,
.publication-kicker,
.publication-meta,
.publication-context {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.engine-journal-mini-label,
.publication-kicker,
.publication-meta,
.publication-context {
  font-size: 11px;
  color: var(--muted);
}

.engine-journal-mini-value {
  margin-top: 8px;
  color: var(--state-text);
  font-weight: 700;
}

.signal-narratif,
.mantra-operationnel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.015);
}

.signal-narratif-main {
  font-size: 22px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.mantra-operationnel-main {
  font-size: 20px;
  line-height: 1.2;
}

.onboarding-card,
.alert-card,
.kpi-card,
.history-item,
.action-item,
.agent-card {
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
}

.onboarding-card,
.alert-card,
.kpi-card,
.agent-card,
.side-card,
.card,
.master-card {
  padding: 18px;
}

.onboarding-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.onboarding-title {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--state-text);
}

.onboarding-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
}

.onboarding-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  margin-bottom: 10px;
  border: 1px solid rgba(var(--state-rgb), 0.22);
  background: rgba(var(--state-rgb), 0.1);
  color: var(--state-text);
  font-size: 12px;
  font-weight: 700;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 0.78fr);
  gap: 24px;
  margin-top: 36px;
  align-items: start;
  position: relative;
  transition: opacity 0.25s ease;
}

.moteur-flow {
  display: grid;
  gap: 24px;
}

.moteur-flow > .zone-conscience      { order: 0; }
.moteur-flow > .verdict-shell       { order: 1; }
.moteur-flow > .pourquoi-shell      { order: 2; }
.moteur-flow > .master-card         { order: 3; }
.moteur-flow > .structured-shell    { order: 4; }
.moteur-flow > .publications-shell  { order: 5; }
.moteur-flow > .navigation-shell    { order: 6; }

.stack,
.side-panel,
.memory-actions,
.memory-list,
.history,
.list {
  display: grid;
  gap: 16px;
}

.card,
.side-card,
.master-card {
  border: 1px solid rgba(var(--state-rgb), 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.master-card {
  border-color: rgba(var(--state-rgb), 0.18);
  background: radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 26%), linear-gradient(180deg, rgba(var(--state-rgb), 0.05), rgba(255, 255, 255, 0.012));
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.card-head {
  margin-bottom: 18px;
}

.alerts-grid,
.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alert-card,
.kpi-card,
.command-card,
.mode-box,
.payload-item,
.diagnostic-item,
.history-item,
.action-item,
.agent-card,
.short-box,
.agent-box {
  min-height: 100%;
}

.alert-value,
.kpi-value {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.master-grid,
.overview-grid,
.pilot-grid,
.stretch-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.master-left,
.master-right {
  display: grid;
  gap: 16px;
}

.master-xxl {
  min-height: 240px;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.22);
  background: radial-gradient(circle at top left, rgba(var(--state-rgb), 0.2), transparent 36%), linear-gradient(180deg, rgba(var(--state-rgb), 0.12), rgba(255, 255, 255, 0.015));
}

.master-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
}

.master-card .master-grid {
  display: none;
}

.verdict-shell {
  display: grid;
  gap: 18px;
}

.action-directive {
  display: grid;
  gap: 8px;
  padding: 2px 0 0;
}

.action-directive strong {
  display: block;
  max-width: 26ch;
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.action-zone {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.action-panel {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.action-panel.dont {
  border-color: rgba(255, 123, 123, 0.14);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.08), rgba(255, 255, 255, 0.012));
}

.action-bullets {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.action-bullets li {
  color: var(--state-text);
  line-height: 1.55;
}

.action-bullets li::marker {
  color: var(--state-text);
}

.verdict-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
}

.verdict-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

.verdict-main-value {
  margin: 10px 0 8px;
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: clamp(34px, 2.8vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.verdict-side-grid {
  display: grid;
  gap: 14px;
}

.verdict-side-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.verdict-side-card.warn {
  border-color: rgba(255, 123, 123, 0.18);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.1), rgba(255, 255, 255, 0.012));
}

.verdict-side-card strong {
  display: block;
  margin-top: 8px;
  color: var(--state-text);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.verdict-main-note {
  margin: 0;
  max-width: 52ch;
  color: var(--text-soft);
  line-height: 1.72;
}

.verdict-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.verdict-directive {
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012));
}

.verdict-directive .directive-line {
  font-size: 24px;
}

.structured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.structured-shell {
  opacity: 0.92;
}

.structured-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.05), transparent 34%);
}

.structured-card h3 {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--state-text);
}

.structured-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.58;
}

.structured-accent {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.alerts-premium-layout {
  display: grid;
  gap: 18px;
}

.alertes-top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.alertes-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
}

.insight-panel,
.micro-summary-panel {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.micro-summary-grid {
  display: grid;
  gap: 12px;
}

.micro-summary-item {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.micro-summary-item strong {
  display: block;
  margin-top: 6px;
  color: var(--state-text);
  font-size: 16px;
  line-height: 1.55;
}

.micro-summary-item.subtle strong {
  font-size: 14px;
  color: var(--text-soft);
}

.master-card {
  border-color: rgba(var(--state-rgb), 0.12);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.008));
}

.master-card .alerts-grid {
  gap: 10px;
}

.master-card .alert-card {
  padding: 14px 16px;
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.014);
}

.master-card .alert-value {
  margin-top: 6px;
  font-size: 18px;
}

.master-card .alert-sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.insight-box {
  margin-top: 0;
  padding: 22px;
  border-color: rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

#insightQuote {
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.08;
}

#insightSub {
  max-width: 58ch;
}

.command-box {
  padding: 22px;
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

.command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.command-grid .command-card:nth-child(1),
.command-grid .command-card:nth-child(2) {
  border-color: rgba(var(--state-rgb), 0.18);
  background: linear-gradient(180deg, rgba(var(--state-rgb), 0.12), rgba(255, 255, 255, 0.02));
}

.command-grid .command-card:nth-child(3) {
  opacity: 0.82;
}

.command-grid .command-card:nth-child(4) {
  grid-column: 1 / -1;
  border-color: rgba(var(--state-rgb), 0.24);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.side-panel {
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 94px;
  opacity: 0.9;
}

.side-panel .side-card:first-child {
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01));
}

.decision-summary-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.decision-summary-headline {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--state-text);
}

.decision-summary-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}

.decision-rail {
  display: grid;
  gap: 12px;
}

.decision-rail-item {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.022);
}

.decision-rail-item.warn {
  border-color: rgba(255, 123, 123, 0.16);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.09), rgba(255, 255, 255, 0.012));
}

.decision-rail-item strong {
  display: block;
  margin-top: 6px;
  color: var(--state-text);
  font-size: 14px;
  line-height: 1.6;
}

.side-panel .side-card {
  padding: 16px;
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.012);
}

.side-panel .card-title {
  font-size: 18px;
}

.side-panel .card-desc,
.side-panel .history-item,
.side-panel .result,
.side-panel .decision-summary-text {
  font-size: 13px;
}

.technical-shell {
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.012);
}

.secondary-technical-card {
  opacity: 0.68;
  border-color: rgba(var(--state-rgb), 0.08);
}

.publications-shell,
.navigation-shell {
  opacity: 0.9;
}

.publications-shell .card-head,
.navigation-shell .card-head {
  margin-bottom: 14px;
}

.technical-shell summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.technical-shell summary::-webkit-details-marker {
  display: none;
}

.technical-shell[open] summary {
  border-bottom: 1px solid rgba(var(--state-rgb), 0.1);
}

.technical-shell .memory-box {
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#allowedNow,
#blockedNow,
#nextPriority {
  font-size: 18px;
  line-height: 1.55;
  color: var(--state-text);
  letter-spacing: -0.02em;
}

#watchNow {
  font-size: 14px;
}

.next-step-box {
  padding: 22px;
  border-color: rgba(var(--state-rgb), 0.18);
}

#directiveLine {
  font-size: 24px;
  line-height: 1.25;
}

.master-state-name {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.insight-box,
.command-box,
.next-step-box,
.mode-panel,
.table-shell,
.memory-shell {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.015);
}

.command-grid,
.mode-head,
.payload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.mode-btn {
  min-height: 98px;
  padding: 16px 14px;
  border-radius: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.compact-actions {
  margin-top: 16px;
}

.compact-btn {
  min-height: 78px;
}

.mode-btn-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mode-btn-desc,
.kpi-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
}

.prefill-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 14px 16px;
  background: #1a1208;
  border: 1px solid #3a2a10;
  border-left: 3px solid #a06020;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.prefill-warning-icon {
  font-size: 16px;
  flex-shrink: 0;
  padding-top: 1px;
}

.prefill-warning-body strong {
  display: block;
  color: #c89050;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13px;
}

.prefill-warning-body p {
  margin-bottom: 4px;
}

.prefill-warning-body p:last-child {
  margin-bottom: 0;
}

/* ── Constellium Panel ───────────────────────────────────────────────── */

.cst-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 480px;
  min-width: 420px;
  max-width: 520px;
  z-index: 9999;
  pointer-events: none;
}
.cst-panel[hidden] { display: none; }
.cst-panel.active  { pointer-events: auto; }

@media (max-width: 700px) {
  .cst-panel {
    width: 92vw;
    min-width: 0;
    max-width: none;
  }
}

.cst-panel-card {
  position: relative;
  height: 100%;
  background: linear-gradient(180deg, rgba(12,16,28,0.98), rgba(6,8,14,0.98));
  border-left: 1px solid rgba(245,208,111,0.28);
  box-shadow:
    -18px 0 44px rgba(0,0,0,0.75),
    inset 1px 0 0 rgba(255,255,255,0.04);
  padding: 28px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  color: #e6e8ef;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,208,111,0.35) transparent;
}
.cst-panel-card::-webkit-scrollbar        { width: 6px; }
.cst-panel-card::-webkit-scrollbar-track  { background: transparent; }
.cst-panel-card::-webkit-scrollbar-thumb  {
  background: rgba(245,208,111,0.28);
  border-radius: 999px;
}
.cst-panel.active .cst-panel-card { transform: translateX(0); }

.cst-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #c8cad4;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cst-close-btn:hover {
  color: #ffffff;
  border-color: rgba(245,208,111,0.35);
  background: rgba(245,208,111,0.08);
}

.cst-panel-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  padding-right: 60px;
}

.cst-sub {
  font-size: 12px;
  color: #9aa0b3;
  font-style: italic;
  margin: 0 0 18px;
}

/* ── Explanation inner content ─────────────────────────────────────── */

.cst-expl {
  font-size: 13px;
}

.cst-context-line {
  background: rgba(245,208,111,0.08);
  border: 1px solid rgba(245,208,111,0.18);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f5d06f;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.cst-expl-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cst-expl-row {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.cst-expl-row:hover { border-color: rgba(245,208,111,0.22); }

.cst-expl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cst-expl-label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cst-expl-value {
  color: #f5d06f;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245,208,111,0.10);
  border: 1px solid rgba(245,208,111,0.24);
  white-space: nowrap;
}

.cst-expl-desc {
  color: #bfc3d4;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.cst-expl-sentence {
  color: #8f96aa;
  font-size: 12px;
  font-style: italic;
  line-height: 1.45;
  margin-top: 3px;
}

.cst-expl-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #4a4c62;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
}

.cst-legal-block {
  margin-top: 20px;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #bfc3d4;
}

.cst-legal-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5d06f;
  margin-bottom: 10px;
}

.cst-legal-block p {
  margin: 0 0 10px;
}

.cst-legal-block p:last-child {
  margin-bottom: 0;
}

.tab-btn {
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  flex: 0 0 auto;
}

.tab-shell {
  display: grid;
  gap: 16px;
}

.tab-panel {
  display: none;
  min-width: 0;
}

.tab-panel.active {
  display: block;
  animation: panelReveal 0.25s ease forwards;
}

.short-box,
.agent-box {
  min-height: 190px;
  border-radius: 20px;
  padding: 20px;
}

.short-box {
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background: linear-gradient(180deg, rgba(var(--state-rgb), 0.1), rgba(255, 255, 255, 0.02));
}

.agent-box {
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.big-state {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 30px;
}

.agent-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
}

.micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--state-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.score-bar {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.score-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--state-rgb), 0.55), rgba(var(--state-rgb), 0.98));
  transition: width 0.25s ease;
}

.payload-grid,
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payload-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.payload-item strong {
  color: var(--state-text);
  font-size: 16px;
}

.action-item {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.018);
}

.field-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

/* ── Champs repliables (notes) ───────────────────────── */
.field-collapsible {
  border: none;
  margin: 0;
  padding: 0;
}

.field-collapsible-label {
  cursor: pointer;
  font-size: var(--font-xs, 0.75rem);
  color: var(--muted);
  user-select: none;
  padding: 4px 0;
  list-style: none;
}

.field-collapsible-label::before {
  content: "+ ";
  font-family: monospace;
}

details[open] .field-collapsible-label::before {
  content: "− ";
}

.field-collapsible textarea {
  width: 100%;
  margin-top: 6px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus,
.mode-btn:focus-visible,
.tab-btn:focus-visible,
.side-tab:focus-visible {
  border-color: rgba(var(--state-rgb), 0.42);
  box-shadow: 0 0 0 3px rgba(var(--state-rgb), 0.12);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

pre {
  margin: 0;
  max-height: 540px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-soft);
}

.result.strong-result,
.directive-line {
  font-size: 18px;
  color: var(--state-text);
  font-weight: 700;
}

.command-card h4 {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--state-text);
}

.command-card .value {
  color: var(--text-soft);
  line-height: 1.65;
}

.tag {
  margin-top: 8px;
  font-size: 12px;
}

.history-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

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

.diagnostic-item {
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(18, 18, 18, 0.96));
}

#storageSize[data-level="vigilance"] { color: #f59e0b; }
#storageSize[data-level="critique"]  { color: #ef4444; }

.publications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.publication-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  text-decoration: none;
  cursor: pointer;
}

.publication-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--state-rgb), 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.publication-index {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--state-text);
}

.publication-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.publication-badge,
.publication-reading-time {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--state-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.publication-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.14;
  letter-spacing: -0.04em;
  color: var(--state-text);
}

.publication-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-soft);
  opacity: 0.96;
}

.publication-context {
  padding-top: 12px;
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
}

.publication-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
}

.publication-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.2);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 36%),
    rgba(255, 255, 255, 0.03);
  color: var(--state-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.publication-link:hover {
  border-color: rgba(var(--state-rgb), 0.3);
}

#allowedActions .action-item,
#priorityActions .action-item,
#blockedActions .action-item {
  padding: 16px 16px;
}

#allowedActions .action-item {
  border-color: rgba(125, 255, 179, 0.16);
  background:
    linear-gradient(180deg, rgba(125, 255, 179, 0.1), rgba(255, 255, 255, 0.012));
  color: var(--state-text);
}

#blockedActions .action-item {
  border-color: rgba(255, 123, 123, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 123, 123, 0.11), rgba(255, 255, 255, 0.012));
  color: #ffe7e7;
}

#priorityActions .action-item:first-child {
  border-color: rgba(var(--state-rgb), 0.24);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  color: var(--state-text);
}

#priorityActions .action-item:last-child {
  border-color: rgba(var(--state-rgb), 0.14);
}

#decisionPanel,
#ultraShortPanel {
  color: var(--state-text);
}

#decisionPanel {
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.footer-note {
  margin-top: 32px;
  padding: 16px 0 22px;
  text-align: center;
  color: #ccb577;
  font-size: 14px;
  border-top: 1px solid rgba(var(--state-rgb), 0.1);
}


@media (max-width: 1380px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  }

  .hero-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .floating-sidebar {
    position: static;
    min-height: auto;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-tab {
    flex: 1 1 180px;
    min-height: 74px;
  }

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

  .hero-logo {
    min-height: 420px;
  }

  .hero-logo img {
    min-height: 360px;
    max-height: none;
  }

  .hero-overlay-panel {
    position: static;
    width: 100%;
    margin-top: 16px;
    margin-left: auto;
    max-width: 360px;
  }
}

@media (max-width: 1180px) {
  .main-grid,
  .master-grid,
  .verdict-grid,
  .action-zone,
  .structured-grid,
  .alertes-top-grid,
  .alertes-bottom-grid,
  .publications-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mode-head,
  .command-grid,
  .payload-grid,
  .form-grid,
  .diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .shell {
    padding-inline: 12px;
  }

  .hero,
  .card,
  .side-card,
  .master-card {
    padding-inline: 16px;
  }

  .saas-header-inner,
  .hero-top,
  .hero-kpi-grid,
  .engine-journal-row,
  .diagnostic-grid,
  .command-grid,
  .mode-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-top > div:first-child {
    max-width: none;
  }

  .hero-logo img {
    min-height: 260px;
    max-height: 320px;
  }

  .hero-overlay-panel {
    margin-top: 14px;
    max-width: none;
  }

  .side-panel {
    position: static;
  }

  .top-tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .tab-btn {
    white-space: nowrap;
  }
}

/* Moteur premium overrides */

.hero-top .hero-top-copy {
  display: grid !important;
  gap: 12px;
  max-width: 680px;
}

.hero-top .hero-top-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.hero-top h1,
.hero-top .subtitle {
  display: block;
}

.hero-top .badge {
  width: fit-content;
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero .hero-kpi-card {
  display: grid;
  align-content: start;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.hero .hero-kpi-card:nth-child(1),
.hero .hero-kpi-card:nth-child(2),
.hero .hero-kpi-card:nth-child(3),
.hero .hero-kpi-card:nth-child(4) {
  display: grid;
}

.hero .hero-kpi-card:nth-child(1) .hero-kpi-value,
.hero .hero-kpi-card:nth-child(2) .hero-kpi-value,
.hero .hero-kpi-card:nth-child(3) .hero-kpi-value,
.hero .hero-kpi-card:nth-child(4) .hero-kpi-value {
  margin-top: 10px;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero .hero-kpi-card:nth-child(1) .market-strong {
  font-size: clamp(18px, 2vw, 26px);
}

.lecture-day-card {
  padding: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-lg);
}

.lecture-day-main {
  margin-top: 10px;
  max-width: 24ch;
  font-size: clamp(30px, 2.5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: var(--state-text);
}

.lecture-day-sub {
  display: block;
  margin-top: 10px;
  max-width: 62ch;
}

.hero-reading-order {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-reading-step {
  padding: 16px 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.hero-reading-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  color: var(--state-text);
  font-size: 11px;
  font-weight: 700;
}

.hero-reading-step strong {
  display: block;
  margin-top: 14px;
  color: var(--state-text);
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero-reading-step p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.hero-logo {
  min-height: 540px;
}

.hero-logo::before,
.hero-logo::after {
  content: none;
}

.hero-visual-frame {
  --visual-gradient: radial-gradient(circle at 18% 20%, rgba(var(--state-rgb), 0.18), transparent 28%);
  min-height: 100%;
  padding: 24px;
  border-radius: 32px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: var(--visual-gradient), linear-gradient(180deg, rgba(9, 10, 12, 0.98), rgba(8, 8, 10, 0.96));
  isolation: isolate;
}

.hero-visual-frame::before {
  background:
    linear-gradient(180deg, rgba(6, 7, 9, calc(var(--visual-overlay-strength, 0.72) + 0.14)) 0%, rgba(6, 7, 9, var(--visual-overlay-strength, 0.72)) 48%, rgba(6, 7, 9, 0.38) 100%),
    var(--visual-accent-gradient, none);
}

.hero-visual-frame::after {
  inset: auto 24px 24px 24px;
}

.hero-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--visual-image-position, center center);
  filter: saturate(0.48) contrast(0.84) brightness(0.42) blur(var(--visual-image-blur, 0px));
  opacity: var(--visual-image-opacity, 0);
  transform: scale(1.04);
}

.hero-visual-noise {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 14px);
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-visual-header,
.hero-visual-copy {
  position: relative;
  z-index: 2;
}

.hero-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-visual-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-visual-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--state-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual-copy {
  display: grid;
  gap: 10px;
  max-width: 320px;
  margin-top: 180px;
}

.hero-visual-title {
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-visual-mood,
.hero-visual-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.hero-visual-note {
  color: rgba(233, 221, 183, 0.78);
}

.hero-overlay-panel {
  width: min(280px, calc(100% - 40px));
  border-color: rgba(var(--state-rgb), 0.1);
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.88), rgba(10, 10, 11, 0.74)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.06), transparent 38%);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.hero-overlay-item strong,
.hero-support-chip strong {
  color: var(--text);
}

.verdict-shell {
  gap: 20px;
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012));
}

.verdict-card,
.verdict-directive {
  border-color: rgba(var(--state-rgb), 0.2);
}

.verdict-side-card {
  min-height: 116px;
}

.verdict-side-note {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.structured-shell {
  opacity: 1;
}

.structured-card {
  border-color: rgba(var(--state-rgb), 0.1);
}

.master-card {
  border-color: rgba(var(--state-rgb), 0.14);
}

.technical-shell,
.secondary-technical-card {
  opacity: 0.78;
}

.decision-summary-card {
  gap: 18px;
  padding: 18px;
}

.decision-rail-item {
  background: rgba(255, 255, 255, 0.018);
}

.publications-shell {
  opacity: 1;
}

.publications-grid {
  align-items: stretch;
  gap: 16px;
}

.publication-card {
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 14px;
  min-height: 100%;
  padding: 20px;
  border-radius: 22px;
  border-color: rgba(var(--state-rgb), 0.14);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012));
}

.publication-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.publication-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.publication-badge {
  width: fit-content;
}

.publication-title {
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.18;
}

.publication-excerpt {
  min-height: 3.5em;
  line-height: 1.64;
}

.publication-context {
  min-height: 4.8em;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.publication-meta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-link {
  min-width: 150px;
}

@media (max-width: 1280px) {
  .hero-reading-order {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-logo {
    min-height: 460px;
  }

  .hero-visual-copy {
    margin-top: 140px;
  }
}

@media (max-width: 1180px) {
  .hero-kpi-grid,
  .hero-reading-order,
  .verdict-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .hero-kpi-card {
    min-height: 0;
  }

  .hero-visual-copy {
    max-width: 100%;
    margin-top: 96px;
  }
}

@media (max-width: 980px) {
  .hero-top .hero-top-meta {
    justify-items: start;
  }

  .hero-overlay-panel {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .hero-visual-frame {
    min-height: 320px;
  }

  .hero-visual-copy {
    margin-top: 72px;
  }
}

/* FINAL V2 Moteur fixes */

.hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.92fr);
  gap: 28px;
}

.hero-copy {
  gap: 18px;
}

.lecture-day-card {
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 46px rgba(0, 0, 0, 0.2);
}

.hero-reading-order {
  margin-top: -4px;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.hero-reading-support {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 38%),
    linear-gradient(180deg, rgba(12, 12, 14, 0.96), rgba(8, 8, 10, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 54px rgba(0, 0, 0, 0.26);
}

.hero-reading-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-reading-support-note {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.hero-reading-support-list {
  display: grid;
  gap: 12px;
}

.hero-reading-support-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-reading-support-item span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-reading-support-item strong {
  color: var(--state-text);
  font-size: 15px;
  line-height: 1.5;
}

.hero-reading-support-item.warn {
  border-color: rgba(255, 123, 123, 0.2);
  background: rgba(255, 123, 123, 0.06);
}

.hero-visual-frame {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100%;
  padding: 24px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at var(--visual-focus-x, 50%) var(--visual-focus-y, 28%), rgba(var(--state-rgb), 0.18), transparent 0 26%),
    var(--visual-gradient),
    linear-gradient(180deg, rgba(10, 10, 12, 0.98), rgba(7, 7, 9, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 54px rgba(0, 0, 0, 0.3);
}

.hero-visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 7, 9, calc(var(--visual-overlay-strength, 0.72) + 0.12)) 0%, rgba(6, 7, 9, var(--visual-overlay-strength, 0.72)) 44%, rgba(6, 7, 9, 0.32) 100%),
    var(--visual-accent-gradient, none);
  z-index: 0;
}

.hero-visual-frame::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  pointer-events: none;
  z-index: 0;
}

.hero-visual-grid,
.hero-visual-beam,
.hero-visual-orbit,
.hero-visual-image,
.hero-visual-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-visual-grid {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  opacity: var(--visual-grid-opacity, 0.34);
}

.hero-visual-grid span {
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  transform: skewX(-14deg);
}

.hero-visual-beam {
  z-index: 1;
  background:
    linear-gradient(var(--visual-beam-angle, 0deg), transparent 18%, rgba(var(--state-rgb), var(--visual-beam-opacity, 0.16)) 50%, transparent 82%);
  mix-blend-mode: screen;
}

.hero-visual-orbit {
  z-index: 1;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  border-radius: 999px;
  width: 170px;
  height: 170px;
  inset: auto auto 26px 26px;
  opacity: 0.7;
}

.hero-visual-orbit-b {
  width: 250px;
  height: 250px;
  inset: 58px 22px auto auto;
  opacity: 0.34;
}

.hero-visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--visual-image-position, center center);
  filter: saturate(0.48) contrast(0.84) brightness(0.42) blur(var(--visual-image-blur, 0px));
  opacity: var(--visual-image-opacity, 0);
  transform: scale(1.04);
  z-index: 1;
}

.hero-visual-noise {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 14px);
  opacity: var(--visual-noise-opacity, 0.16);
  mix-blend-mode: screen;
}

.hero-visual-header,
.hero-visual-copy,
.hero-visual-metrics,
.hero-visual-intensity,
.hero-visual-decision {
  position: relative;
  z-index: 2;
}

.hero-visual-copy {
  gap: 12px;
  max-width: 360px;
  margin-top: 84px;
}

.hero-visual-note {
  color: rgba(233, 221, 183, 0.84);
}

.hero-visual-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-visual-metric {
  display: grid;
  gap: 6px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.032);
}

.hero-visual-metric span,
.hero-visual-intensity-head span,
.hero-visual-decision-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-visual-metric strong {
  color: var(--state-text);
  font-size: 15px;
  line-height: 1.35;
}

.hero-visual-intensity,
.hero-visual-decision {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.hero-visual-intensity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-visual-intensity-head strong {
  color: var(--state-text);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.hero-visual-intensity-bar {
  height: 9px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.hero-visual-intensity-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--state-rgb), 0.3), rgba(var(--state-rgb), 1));
  box-shadow: 0 0 16px rgba(var(--state-rgb), 0.24);
  transition: width 0.28s ease;
}

.hero-visual-intensity-note,
.hero-visual-decision p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.hero-visual-decision strong {
  display: block;
  margin-top: 8px;
  color: var(--state-text);
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.hero-overlay-panel {
  width: min(350px, calc(100% - 44px));
  padding: 18px;
  border-color: rgba(var(--state-rgb), 0.12);
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.9), rgba(10, 10, 11, 0.78)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.09), transparent 38%);
}

.hero-support-grid-reading {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-support-grid-reading .hero-support-chip {
  min-height: 0;
  align-content: start;
}

.hero-support-grid-reading .hero-support-chip strong {
  font-size: 14px;
  line-height: 1.45;
}

.hero-overlay-item.warn {
  border-color: rgba(255, 123, 123, 0.22);
  background: rgba(255, 123, 123, 0.06);
}

.verdict-shell {
  gap: 22px;
  padding: 26px;
  border-color: rgba(var(--state-rgb), 0.2);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.13), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.014));
}

.verdict-card {
  min-height: 100%;
  padding: 24px;
  border-color: rgba(var(--state-rgb), 0.22);
}

.verdict-main-value {
  font-size: clamp(36px, 3.1vw, 50px);
  line-height: 0.94;
}

.verdict-main-note {
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.7;
}

.verdict-side-grid {
  gap: 14px;
}

.verdict-side-card {
  min-height: 124px;
  padding: 18px 18px 16px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.verdict-side-card.primary {
  border-color: rgba(var(--state-rgb), 0.22);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.verdict-side-card strong {
  font-size: 18px;
  line-height: 1.42;
}

.verdict-directive {
  padding: 20px 22px;
  border-color: rgba(var(--state-rgb), 0.18);
}

.structured-shell,
.publications-shell {
  padding: 24px;
}

.structured-shell .card-desc,
.publications-shell .card-desc,
.master-card .card-desc {
  max-width: 72ch;
}

.structured-card,
.master-card {
  border-color: rgba(var(--state-rgb), 0.11);
}

.master-card {
  opacity: 0.9;
}

.publications-shell {
  border-color: rgba(var(--state-rgb), 0.15);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.012));
}

.publications-grid {
  gap: 18px;
}

.publication-card {
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 14px;
  min-height: 100%;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.014));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.024), 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.publication-card:hover,
.publication-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--state-rgb), 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 48px rgba(0, 0, 0, 0.24);
  outline: none;
}

.publication-top-row {
  align-items: center;
}

.publication-index {
  min-width: 44px;
  min-height: 44px;
  border-color: rgba(var(--state-rgb), 0.14);
}

.publication-reading-time,
.publication-badge {
  border-color: rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.publication-title {
  margin-top: 2px;
}

.publication-excerpt {
  min-height: 4.6em;
  color: var(--text-soft);
}

.publication-context {
  min-height: 5.4em;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
  color: var(--muted);
}

.publication-actions {
  margin-top: auto;
}

.publication-link {
  min-width: 164px;
  pointer-events: auto;
}

.publication-card-empty {
  cursor: default;
}

.publication-card-empty:hover,
.publication-card-empty:focus-visible {
  transform: none;
}

@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-logo {
    min-height: 460px;
  }

  .hero-visual-copy {
    margin-top: 96px;
  }
}

@media (max-width: 1024px) {
  .hero-visual-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .hero,
  .verdict-shell,
  .structured-shell,
  .publications-shell {
    padding: 20px;
  }

  .hero-visual-copy {
    margin-top: 64px;
  }

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

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

  .hero-visual-intensity-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-overlay-panel {
    width: 100%;
  }

  .hero-reading-support-head {
    flex-direction: column;
  }
}

/* Moteur Restore V3 */

[hidden] {
  display: none !important;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.92fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  gap: 18px;
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-kpi-card {
  display: block;
  min-height: 126px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.014));
}

.hero-kpi-card.primary {
  border-color: rgba(var(--state-rgb), 0.24);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.16), transparent 36%),
    linear-gradient(180deg, rgba(var(--state-rgb), 0.1), rgba(255, 255, 255, 0.016));
}

.hero-kpi-value {
  margin-top: 10px;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.08;
}

.lecture-day-card {
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.016));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 46px rgba(0, 0, 0, 0.24);
}

.lecture-day-main {
  max-width: 28ch;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.08;
  color: var(--state-text);
}

.lecture-day-sub {
  display: block;
  margin-top: 10px;
  max-width: 64ch;
}

.hero-logo {
  position: relative;
  min-height: 520px;
  border-radius: 32px;
  overflow: hidden;
}

.hero-logo .hero-visual-frame {
  --visual-gradient: radial-gradient(circle at 20% 20%, rgba(var(--state-rgb), 0.14), transparent 28%);
  --visual-accent-gradient: none;
  --visual-overlay-strength: 0.72;
  --visual-image-opacity: 0.16;
  --visual-image-position: center center;
  --visual-image-blur: 2px;
  position: relative;
  min-height: 100%;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  border-radius: 32px;
  overflow: hidden;
  background:
    var(--visual-gradient),
    linear-gradient(180deg, rgba(11, 12, 14, 0.98), rgba(8, 8, 10, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 60px rgba(0, 0, 0, 0.3);
}

.hero-logo .hero-visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 7, 9, calc(var(--visual-overlay-strength) + 0.1)) 0%, rgba(6, 7, 9, var(--visual-overlay-strength)) 48%, rgba(6, 7, 9, 0.3) 100%),
    var(--visual-accent-gradient);
  pointer-events: none;
}

.hero-logo .hero-visual-frame::after {
  content: attr(data-visual-label) " · " attr(data-visual-bias);
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(8, 9, 12, 0.76);
  color: var(--state-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.45;
}

.hero-logo .hero-visual-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--visual-image-position);
  opacity: var(--visual-image-opacity);
  filter: saturate(0.52) contrast(0.84) brightness(0.5) blur(var(--visual-image-blur));
  transform: scale(1.04);
}

.hero-overlay-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: auto;
  width: min(320px, calc(100% - 36px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.9), rgba(10, 10, 11, 0.78)),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 38%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.hero-support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-support-chip {
  min-height: 94px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.hero-support-chip strong {
  display: block;
  margin-top: 6px;
  color: var(--state-text);
  font-size: 14px;
  line-height: 1.45;
}

.hero-overlay-list {
  gap: 10px;
}

.hero-overlay-item {
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.028);
}

.hero-overlay-item strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.moteur-flow > .verdict-shell,
.moteur-flow > .structured-shell,
.moteur-flow > .master-card,
.moteur-flow > .publications-shell,
.moteur-flow > .navigation-shell {
  opacity: 1;
  padding: 24px;
  border-color: rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

/* M2 — Renforcement centre de gravité : verdict-shell > ses voisins */
.moteur-flow > .verdict-shell {
  border-color: rgba(var(--state-rgb), 0.28);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.15), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.014));
}

.verdict-shell .action-directive {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.016));
}

.verdict-shell .action-directive strong {
  display: block;
  margin-top: 10px;
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.verdict-shell .action-zone {
  gap: 14px;
}

.verdict-shell .action-panel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.verdict-shell .action-panel.dont {
  border-color: rgba(255, 123, 123, 0.2);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.08), rgba(255, 255, 255, 0.012));
}

.structured-grid,
.alerts-grid {
  gap: 14px;
}

.structured-card,
.alert-card,
.micro-summary-panel,
.insight-panel {
  border-color: rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.publications-grid {
  gap: 16px;
  align-items: stretch;
}

.publication-card {
  min-height: 100%;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.014));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.024), 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.publication-card:hover,
.publication-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--state-rgb), 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 48px rgba(0, 0, 0, 0.24);
  outline: none;
}

.publication-context {
  min-height: 4.6em;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
}

.side-panel {
  gap: 12px;
  position: sticky;
  top: 94px;
  align-self: start;
  opacity: 1;
}

.side-panel .side-card:first-child {
  padding: 18px;
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.decision-summary-card {
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.014));
}

.decision-summary-headline {
  font-size: clamp(28px, 2.2vw, 34px);
}

.decision-rail-item {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.024);
}

.decision-rail-item.warn {
  border-color: rgba(255, 123, 123, 0.18);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.08), rgba(255, 255, 255, 0.012));
}

.history {
  gap: 10px;
}

.history-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.tab-panel[data-tab-panel="moteur"] .mode-panel {
  margin-top: 0;
}

@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-logo {
    min-height: 420px;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero-kpi-grid,
  .alerts-grid,
  .structured-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-overlay-panel {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .hero-logo {
    min-height: 340px;
  }
}

@media (max-width: 720px) {
  .hero,
  .moteur-flow > .verdict-shell,
  .moteur-flow > .structured-shell,
  .moteur-flow > .master-card,
  .moteur-flow > .publications-shell,
  .moteur-flow > .navigation-shell {
    padding: 20px;
  }

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

  .hero-logo .hero-visual-frame::after {
    font-size: 11px;
    line-height: 1.5;
  }
}

.header-help-btn {
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
  justify-content: center;
}

.header-chip,
.header-chip strong,
.hero-kpi-value,
.lecture-day-main,
.lecture-day-sub,
.hero-overlay-item strong,
.hero-support-chip strong,
.mode-main,
.mode-sub,
.mode-btn-title,
.mode-btn-desc,
.decision-summary-headline,
.decision-summary-text,
.history-item,
.alert-value,
.alert-sub,
.structured-card h3,
.structured-card p,
.state-pill {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: pretty;
  hyphens: none;
}

.hero-kpi-card,
.hero-overlay-item,
.hero-support-chip,
.mode-box,
.decision-rail-item,
.history-item {
  overflow: hidden;
}

.hero-logo .hero-visual-frame::before {
  background:
    linear-gradient(180deg, rgba(6, 7, 9, calc(var(--visual-overlay-strength) - 0.02)) 0%, rgba(6, 7, 9, calc(var(--visual-overlay-strength) - 0.08)) 48%, rgba(6, 7, 9, 0.14) 100%),
    var(--visual-accent-gradient);
}

.hero-logo .hero-visual-frame::after {
  text-transform: none;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.hero-logo .hero-visual-frame img {
  filter: saturate(0.7) contrast(0.92) brightness(0.82) blur(var(--visual-image-blur));
}

/* P1-BUG-01 — iOS Safari <15.4 ne supporte pas <dialog> nativement : pas de display:none implicite */
dialog:not([open]) {
  display: none;
}

.help-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid rgba(var(--state-rgb), 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(12, 12, 14, 0.98), rgba(8, 8, 10, 0.98));
  color: var(--text);
  box-shadow: var(--shadow-xl);
}

.help-dialog::backdrop {
  background: rgba(4, 6, 10, 0.76);
  backdrop-filter: blur(6px);
}

.help-dialog-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.help-tagline {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.04em;
  margin: 0;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-card {
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.help-card p,
.help-list li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.help-card p + p {
  margin-top: 10px;
}

.help-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.help-close-btn {
  max-width: 180px;
}

@media (max-width: 720px) {
  .help-dialog {
    max-height: 92vh;
  }

  .help-dialog-shell {
    padding: 20px;
  }

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

  .help-close-btn {
    max-width: none;
  }
}

.hero > .hero-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.hero-top,
.hero-bar,
.hero-decision-grid,
.engine-journal-live,
.signal-narratif,
.mantra-operationnel,
.onboarding-strip,
.hero-logo {
  display: none;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.lecture-day-card {
  order: 1;
  max-width: none;
  padding: 28px;
}

.lecture-day-card > .tiny-label {
  font-size: 0;
}

.lecture-day-card > .tiny-label::before {
  content: "D\00e9cision";
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lecture-day-main {
  max-width: none;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.lecture-day-sub {
  margin-top: 14px;
  max-width: 30ch;
  color: var(--text);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 700;
  line-height: 1.14;
}

.hero-kpi-grid {
  order: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-kpi-card:nth-child(1) {
  order: 4;
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.hero-kpi-card:nth-child(1) .hero-chip-label {
  font-size: 0;
}

.hero-kpi-card:nth-child(1) .hero-chip-label::before {
  content: "\00c9tat du march\00e9";
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kpi-card:nth-child(1) .hero-kpi-value {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--state-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
}

.hero-kpi-card:nth-child(2) {
  order: 1;
  grid-column: 1 / -1;
  min-height: 0;
  padding: 18px 20px;
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.016));
}

.hero-kpi-card:nth-child(2) .hero-chip-label {
  font-size: 0;
}

.hero-kpi-card:nth-child(2) .hero-chip-label::before {
  content: "Pourquoi";
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kpi-card:nth-child(2) .hero-kpi-value {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.6;
}

.hero-kpi-card:nth-child(3),
.hero-kpi-card:nth-child(4) {
  order: 2;
  min-height: 0;
  padding: 18px;
}

.hero-kpi-card:nth-child(3) .hero-kpi-value,
.hero-kpi-card:nth-child(4) .hero-kpi-value {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .lecture-day-card {
    padding: 22px;
  }

  .lecture-day-sub {
    font-size: 24px;
  }

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

/* Priority 2 - Clean UI */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(42%, 560px);
  background: url("../../assets/images/cameleon-logo.png") right center / contain no-repeat;
  opacity: var(--hero-logo-opacity, 0.14);
  pointer-events: none;
  z-index: 0;
  filter: saturate(0) contrast(1.04);
}

.hero.market-range {
  --hero-logo-opacity: 0.14;
}

.hero.market-compression,
.hero.market-breakout {
  --hero-logo-opacity: 0.16;
}

.hero.market-trend {
  --hero-logo-opacity: 0.18;
}

.hero.market-defense,
.hero.market-chaos,
.hero.market-unknown {
  --hero-logo-opacity: 0.12;
}

.hero-grid,
.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-logo {
  display: none;
}

.hero-kpi-grid {
  max-width: 980px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero .hero-kpi-card:nth-child(4) {
  display: none;
}

.hero .hero-kpi-card:nth-child(1) {
  order: 3;
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.hero .hero-kpi-card:nth-child(1) .hero-chip-label {
  font-size: 0;
}

.hero .hero-kpi-card:nth-child(1) .hero-chip-label::before {
  content: "Etat du marche";
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero .hero-kpi-card:nth-child(1) .hero-kpi-value,
.state-pill {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}

.hero .hero-kpi-card:nth-child(1) .hero-kpi-value {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--state-rgb), 0.14);
  background: rgba(255, 255, 255, 0.025);
}

.hero .hero-kpi-card:nth-child(2),
.hero .hero-kpi-card:nth-child(3) {
  min-height: 0;
  padding: 18px 20px;
}

.hero .hero-kpi-card:nth-child(2) .hero-kpi-value,
.hero .hero-kpi-card:nth-child(3) .hero-kpi-value {
  font-size: 18px;
  line-height: 1.45;
}

.lecture-day-card {
  max-width: 900px;
}

.lecture-day-main {
  max-width: 12ch;
}

.lecture-day-sub {
  max-width: 18ch;
}

.moteur-flow > .navigation-shell {
  display: block;
}

.verdict-shell .card-desc,
.structured-shell .card-desc,
.master-card .card-desc,
.publications-shell .card-desc {
  max-width: 40ch;
}

.verdict-shell .action-directive {
  padding: 0;
  border: 0;
  background: none;
}

.verdict-shell .action-directive strong {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.02;
}

.verdict-shell .state-pill {
  opacity: 0.45;
}

.verdict-shell .action-zone {
  grid-template-columns: minmax(0, 1fr);
}

.verdict-shell .action-panel.dont {
  display: none;
}

.verdict-shell .action-panel.do {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.verdict-shell .action-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.verdict-shell .action-bullets li:last-child {
  color: var(--text);
  font-weight: 700;
}

.structured-shell {
  opacity: 0.94;
}

.structured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.structured-grid > .structured-card:first-child {
  display: none;
}

.structured-card {
  padding: 18px;
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.016);
}

.structured-card h3 {
  font-size: 16px;
}

.structured-card p {
  font-size: 14px;
  line-height: 1.55;
}

.structured-accent {
  opacity: 0.6;
}

.master-card {
  opacity: 0.78;
  border-color: rgba(var(--state-rgb), 0.1);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.05), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.008));
}

.master-card .state-pill {
  opacity: 0.42;
}

.master-card .alert-card,
.master-card .insight-panel,
.master-card .micro-summary-panel {
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.master-card .alert-value {
  font-size: 16px;
}

.master-card .alert-sub,
.master-card .insight-sub,
.master-card .micro-summary-item strong {
  font-size: 13px;
  line-height: 1.5;
}

.master-card .micro-summary-item:first-child strong,
.master-card .micro-summary-item:first-child .tiny-label {
  opacity: 0.55;
}

.publications-shell {
  opacity: 0.66;
  border-color: rgba(var(--state-rgb), 0.08);
  background:
    radial-gradient(circle at top right, rgba(var(--state-rgb), 0.04), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.01));
}

.publications-shell .state-pill {
  opacity: 0.38;
}

.publication-card {
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
}

.publication-excerpt,
.publication-context,
.publication-meta,
.publication-link {
  font-size: 13px;
}

.side-panel .decision-summary-card {
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.012));
}

.side-panel .decision-summary-headline {
  font-size: clamp(26px, 2.1vw, 32px);
}

.side-panel .decision-summary-text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.side-panel .decision-rail-item.warn,
.side-panel .history-item:nth-child(1),
.side-panel .history-item:nth-child(2) {
  display: none;
}

.side-panel .history {
  gap: 8px;
}

.side-panel .history-item {
  padding: 10px 12px;
  border-color: rgba(var(--state-rgb), 0.08);
  background: rgba(255, 255, 255, 0.015);
}

@media (max-width: 1024px) {
  .hero::before {
    width: 36%;
    opacity: 0.12;
  }

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

@media (max-width: 720px) {
  .hero::before {
    width: 44%;
    opacity: 0.1;
    background-size: 88%;
  }

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

  .lecture-day-main {
    max-width: none;
  }
}

/* Final UI cleanup */

.hero-top,
.hero-kpi-grid,
.verdict-shell,
.master-card .alertes-bottom-grid,
.navigation-shell > .tab-panel[data-tab-panel="moteur"],
.tab-panel[data-tab-panel="pilotage"] .diagnostic-grid .side-card:nth-child(3) {
  display: none !important;
}

.hero {
  margin-bottom: 28px;
  padding: clamp(28px, 4vw, 56px);
  border-color: rgba(var(--state-rgb), 0.26);
  background:
    radial-gradient(circle at 88% 20%, rgba(var(--state-rgb), 0.16), transparent 28%),
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.99), rgba(6, 6, 6, 0.97));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero::before {
  width: min(28%, 360px);
  opacity: 0.08;
}

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

.hero-copy {
  gap: 0;
}

.lecture-day-card {
  max-width: min(980px, 100%) !important;
  padding: clamp(28px, 4vw, 58px) !important;
  border: 1px solid rgba(var(--state-rgb), 0.22) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)) !important;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.26) !important;
}

.lecture-day-card > .tiny-label,
.lecture-day-card > .tiny-label::before {
  font-size: 11px !important;
  letter-spacing: 0.12em !important;
  color: var(--muted) !important;
}

.lecture-day-main {
  max-width: 10ch !important;
  font-size: clamp(60px, 8vw, 118px) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.08em !important;
  color: var(--state-text) !important;
}

.lecture-day-sub {
  display: block !important;
  margin-top: 18px !important;
  max-width: 24ch !important;
  color: var(--text) !important;
  font-size: clamp(20px, 2.6vw, 34px) !important;
  font-weight: 700 !important;
  line-height: 1.16 !important;
}

.main-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}

.structured-shell,
.master-card,
.side-panel .side-card:first-child {
  padding: 22px;
  border-color: rgba(var(--state-rgb), 0.14);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.012));
}

.structured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.structured-grid > .structured-card:first-child {
  display: block;
}

.structured-card,
.alert-card,
.decision-rail-item,
.side-panel .history-item {
  border-color: rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.018);
}

.side-panel {
  display: grid;
  gap: 0;
}

.decision-summary-card {
  gap: 14px;
}

.decision-rail {
  display: grid;
  gap: 10px;
}

.side-panel .history {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.side-panel .history-item:nth-child(1),
.side-panel .history-item:nth-child(2) {
  display: block !important;
}

.tab-panel[data-tab-panel="pilotage"] .pilot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tab-panel[data-tab-panel="pilotage"] .diagnostic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tab-panel[data-tab-panel="pilotage"] .side-card {
  min-height: 100%;
}

.memory-list {
  display: grid;
  gap: 14px;
}

.memory-entry {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.memory-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.memory-entry-title {
  margin-top: 4px;
  color: var(--state-text);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.memory-entry-summary {
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.memory-entry-detail {
  border-top: 1px solid rgba(var(--state-rgb), 0.12);
  padding-top: 12px;
}

.memory-entry-detail summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.memory-entry-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--state-rgb), 0.1);
  background: rgba(255, 255, 255, 0.018);
}

.memory-entry-item span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.memory-entry-item strong {
  color: var(--text);
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .structured-grid,
  .tab-panel[data-tab-panel="pilotage"] .pilot-grid,
  .tab-panel[data-tab-panel="pilotage"] .diagnostic-grid,
  .side-panel .history,
  .memory-entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lecture-day-main {
    font-size: clamp(46px, 12vw, 82px) !important;
  }

  .lecture-day-sub {
    font-size: 22px !important;
  }
}

/* Priority 3 - Hero final */

.hero::before {
  width: min(24%, 300px);
  opacity: 0.06;
  background-position: right 52%;
  background-size: 72%;
}

.hero > .hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
}

.hero-copy {
  gap: 0;
  align-content: center;
}

.lecture-day-card {
  max-width: min(560px, 100%) !important;
  padding: clamp(22px, 3.2vw, 38px) !important;
  border: 1px solid rgba(var(--state-rgb), 0.18) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01)) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22) !important;
}

.lecture-day-card > .tiny-label,
.lecture-day-card > .tiny-label::before {
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
}

.lecture-day-main {
  margin-top: 12px;
  max-width: 13ch !important;
  font-size: clamp(34px, 4.8vw, 56px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.04em !important;
  text-transform: none !important;
  color: var(--state-text) !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  text-wrap: balance;
}

.lecture-day-sub {
  display: block !important;
  margin-top: 12px !important;
  max-width: 30ch !important;
  color: var(--text-soft) !important;
  font-size: clamp(15px, 1.8vw, 18px) !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  text-wrap: pretty;
}

.hero-logo {
  display: flex !important;
  flex-direction: column;
  min-height: clamp(260px, 34vw, 380px);
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}

.hero-logo::before {
  inset: 22px 20px 78px 44px;
  opacity: 0.4;
}

.hero-logo::after {
  opacity: 0.72;
}

.hero-visual-frame {
  min-height: 100%;
  border-radius: 28px;
  border-color: rgba(var(--state-rgb), 0.14);
  background:
    radial-gradient(circle at 22% 24%, rgba(var(--state-rgb), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01));
}

.hero-visual-frame::before {
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.18) 0%, rgba(8, 8, 8, 0.06) 48%, rgba(8, 8, 8, 0) 100%),
    radial-gradient(circle at 24% 22%, rgba(var(--state-rgb), 0.08), transparent 34%);
}

.hero-logo img {
  height: 100%;
  object-fit: contain;
  object-position: center right;
  padding: 28px;
  opacity: 0.78;
  transform: none;
  border: 0;
  background: none;
  filter: saturate(0) contrast(1.02) brightness(0.78);
  box-shadow: none;
}

.hero-overlay-panel {
  display: none;
}

@media (max-width: 980px) {
  .hero > .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .lecture-day-card {
    max-width: none !important;
  }

  .hero-logo {
    max-width: none;
    min-height: 220px;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 22px;
  }

  .lecture-day-main {
    max-width: 11ch !important;
    font-size: clamp(30px, 9vw, 44px) !important;
  }

  .lecture-day-sub {
    max-width: 26ch !important;
    font-size: 15px !important;
  }

  .hero-logo {
    min-height: 200px;
  }

  .hero-logo img {
    padding: 18px;
  }
}

/* Priority 4 - Final UI polish */

body {
  --text: #f5f1e7;
  --text-soft: #dcd5c7;
  --muted: #b5ad9d;
}

.hero {
  margin-bottom: 36px;
  padding: clamp(30px, 4vw, 52px);
}

.hero > .hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero-copy {
  gap: 0;
  align-content: center;
}

.lecture-day-card {
  max-width: min(590px, 100%) !important;
  padding: clamp(24px, 3.3vw, 40px) !important;
}

.lecture-day-card > .tiny-label {
  color: var(--text-soft) !important;
}

.lecture-day-card > .tiny-label::before {
  content: none !important;
  display: none !important;
}

.lecture-day-main {
  margin-top: 14px !important;
  max-width: 12ch !important;
  font-size: clamp(32px, 4.4vw, 54px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.05em !important;
  font-weight: 700 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.lecture-day-sub {
  margin-top: 14px !important;
  max-width: 32ch !important;
  color: rgba(245, 241, 231, 0.9) !important;
  font-size: clamp(16px, 1.55vw, 19px) !important;
  font-weight: 600 !important;
  line-height: 1.52 !important;
  text-wrap: balance;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.hero-logo {
  justify-self: center;
  align-self: center;
  min-height: clamp(320px, 36vw, 420px);
  max-width: min(100%, 500px);
  margin-left: 0;
}

.hero-visual-frame {
  min-height: 100%;
  border-color: rgba(var(--state-rgb), 0.18);
  background:
    radial-gradient(circle at 28% 28%, rgba(var(--state-rgb), 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 64px rgba(0, 0, 0, 0.28);
}

.hero-visual-frame::before {
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.12) 0%, rgba(8, 8, 10, 0.05) 58%, rgba(8, 8, 10, 0) 100%),
    radial-gradient(circle at 22% 24%, rgba(var(--state-rgb), 0.08), transparent 34%);
}

.hero-logo img {
  width: 100%;
  max-width: 500px;
  max-height: 100%;
  object-position: center center;
  padding: 14px;
  opacity: 0.92;
  transform: scale(1.08);
  filter: saturate(0) contrast(1.08) brightness(0.92);
}

.main-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 400px);
  gap: 24px;
  align-items: start;
}

.stack {
  gap: 22px;
}

.structured-shell,
.master-card,
.side-panel .side-card:first-child,
.side-panel .side-card {
  padding: 24px;
}

.structured-shell,
.master-card,
.side-panel .side-card {
  border-color: rgba(var(--state-rgb), 0.12);
  background:
    radial-gradient(circle at top left, rgba(var(--state-rgb), 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

.structured-grid {
  gap: 18px !important;
}

.card-title {
  font-size: clamp(20px, 1.55vw, 24px);
  letter-spacing: -0.04em;
}

.card-desc,
.side-panel .card-desc {
  color: var(--text-soft);
  line-height: 1.66;
}

.tiny-label,
.hero-chip-label,
.kpi-label,
.alert-label,
.muted {
  color: var(--muted);
}

.structured-card,
.alert-card,
.decision-summary-card,
.decision-rail-item,
.side-panel .history-item,
.publication-card {
  border-color: rgba(var(--state-rgb), 0.12);
  background: rgba(255, 255, 255, 0.022);
}

.side-panel {
  gap: 18px;
  opacity: 1;
}

.side-panel .card-head {
  margin-bottom: 20px;
}

.decision-summary-card {
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
}

.decision-summary-headline {
  font-size: clamp(28px, 2.1vw, 34px);
  line-height: 0.98;
}

.decision-summary-text {
  color: var(--text-soft) !important;
  font-size: 15px !important;
  line-height: 1.62 !important;
}

.decision-rail {
  gap: 14px;
}

.decision-rail-item {
  padding: 16px 18px;
}

.decision-rail-item strong {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
}

.side-panel .history {
  gap: 12px;
  margin-top: 14px;
}

.side-panel .history-item {
  min-height: 92px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.side-panel .history-item > strong {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-panel .history-item .muted,
#decisionPanel,
#ultraShortPanel {
  color: var(--text) !important;
}

#decisionPanel,
#ultraShortPanel {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

@media (max-width: 980px) {
  .hero > .hero-grid,
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-logo {
    max-width: none;
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .hero {
    margin-bottom: 28px;
    padding: 22px;
  }

  .lecture-day-main {
    max-width: 11ch !important;
    font-size: clamp(30px, 9vw, 42px) !important;
  }

  .lecture-day-sub {
    max-width: 26ch !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .hero-logo {
    min-height: 220px;
  }

  .hero-logo img {
    padding: 12px;
    transform: scale(1.04);
  }

  .structured-shell,
  .master-card,
  .side-panel .side-card {
    padding: 20px;
  }
}

/* Priority 5 - Final real polish */

.hero-logo .hero-visual-frame::after {
  content: none !important;
  display: none !important;
}

.hero-overlay-panel {
  display: none !important;
}

.side-panel {
  gap: 22px;
}

.side-panel .side-card {
  padding: 26px !important;
}

.side-panel .card-head {
  margin-bottom: 22px;
}

.side-panel .decision-summary-card {
  gap: 20px;
  padding: 24px !important;
}

.side-panel .decision-rail {
  gap: 16px;
}

.side-panel .decision-rail-item {
  min-height: 112px;
  padding: 18px 20px !important;
  display: grid;
  gap: 10px;
  align-content: start;
}

.side-panel .history {
  gap: 14px;
  margin-top: 16px;
}

.side-panel .history-item {
  min-height: 104px;
  padding: 16px 18px !important;
  gap: 10px;
}

#decisionPanel,
#ultraShortPanel {
  font-size: 16px;
  line-height: 1.56;
}

.tab-panel[data-tab-panel="pilotage"] .pilot-grid {
  gap: 20px;
}

.tab-panel[data-tab-panel="pilotage"] .diagnostic-grid {
  gap: 18px;
}

.tab-panel[data-tab-panel="pilotage"] .side-card,
.tab-panel[data-tab-panel="pilotage"] .card {
  padding: 24px !important;
}

.tab-panel[data-tab-panel="pilotage"] .card-head {
  margin-bottom: 18px;
}

.tab-panel[data-tab-panel="pilotage"] .list,
.tab-panel[data-tab-panel="pilotage"] .tag-row {
  gap: 12px;
}

.tab-panel[data-tab-panel="pilotage"] .result,
.tab-panel[data-tab-panel="pilotage"] .alert-box {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .side-panel .side-card,
  .tab-panel[data-tab-panel="pilotage"] .side-card,
  .tab-panel[data-tab-panel="pilotage"] .card {
    padding: 20px !important;
  }

  /* P1-BUG-02 — overflow texte petits écrans : 4 colonnes → 2 sur téléphones étroits */
  .mode-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-btn-title {
    overflow-wrap: break-word;
  }
}

/* Regression repair: restore panels hidden by late polish passes */
.hero-top {
  display: flex !important;
}

.hero-kpi-grid,
.hero-bar,
.hero-decision-grid,
.hero-bottom-zone > .onboarding-strip,
.master-card .alertes-bottom-grid {
  display: grid !important;
}

.engine-journal-live,
.signal-narratif,
.mantra-operationnel,
.structured-grid > .structured-card:first-child,
.verdict-shell .action-panel.dont,
.tab-panel[data-tab-panel="pilotage"] .diagnostic-grid .side-card:nth-child(3) {
  display: block !important;
}

.verdict-shell {
  display: grid !important;
}

.hero-overlay-panel {
  display: grid !important;
}

/* --- Preset auto-fill --- */
.preset-indicator {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--accent, #7eb8a4);
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.preset-reset-btn {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: var(--font-ui);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.preset-reset-btn:hover {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.28);
}

/* --- Input vs Engine divergence --- */
#marketStateTinyLabel {
  transition: color 0.2s;
}

#marketStateTinyLabel[data-divergent="true"],
.divergent-label {
  color: var(--accent, #7eb8a4);
}

.divergent-note {
  color: var(--accent, #7eb8a4);
  opacity: 0.9;
}

/* ── P3 Hero Split ─────────────────────────────────────── */
#hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

#hero-split .hero-block {
  width: 40%;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

#hero-split .hero-title {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .5;
  margin-bottom: 10px;
}

#hero-split .hero-status {
  width: 20%;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
}

#hero-split .hero-block > div:not(.hero-title) {
  font-size: 13px;
  padding: 3px 0;
  opacity: .85;
  min-width: 0;
}

#hero-split .hero-block span {
  font-weight: 600;
  opacity: 1;
}

.market-filter-warning {
  font-size: 11px;
  color: #e57373;
  opacity: 0.8;
  margin-top: 6px;
  font-style: italic;
}

/* ── Behaviour visual priority hierarchy — 5 états ──────────────────────────
   Source: #hero-split[data-bhv-state] + body[data-behavior-state]
           set by _applyBehaviorStateSweep() at end of render().
   Priority: OVERTRADING > FOMO > STRESS > NEUTRE > CALME.
   OVERTRADING — critical stop (opacity 0.4, red glow on LDC card)
   FOMO        — hard block   (opacity 0.5, red glow on LDC card)
   STRESS      — soft block   (opacity 0.72, amber glow on LDC card)
   NEUTRE/CALME — no override
   No layout change. No reflow. Opacity transition only.
   ──────────────────────────────────────────────────────────────────────────── */

/* OVERTRADING — market block severely dimmed (full stop state) */
#hero-split[data-bhv-state="overtrading"] .hero-block.hero-market {
  opacity: 0.4;
  transition: opacity 0.25s;
}

/* FOMO — market block secondary (verdict visible but not primary) */
#hero-split[data-bhv-state="fomo"] .hero-block.hero-market {
  opacity: 0.5;
  transition: opacity 0.25s;
}

/* STRESS — market block attenuated (~70%) */
#hero-split[data-bhv-state="stress"] .hero-block.hero-market {
  opacity: 0.72;
  transition: opacity 0.25s;
}

/* OVERTRADING — LDC card: critical red glow (may not be triggered by decisionState) */
body[data-behavior-state="overtrading"] .hero-bottom-zone > .lecture-day-card {
  box-shadow:
    0 0 0 1px rgba(210, 55, 55, 0.65),
    0 10px 40px rgba(210, 55, 55, 0.28) !important;
  border-color: rgba(210, 55, 55, 0.45) !important;
}

/* FOMO — LDC blocked card: red glow → visual dominance */
.hero-bottom-zone > .lecture-day-card[data-ldc-state="blocked"] {
  box-shadow:
    0 0 0 1px rgba(210, 55, 55, 0.5),
    0 8px 36px rgba(210, 55, 55, 0.2) !important;
}

/* STRESS — LDC protect card: amber glow (L2 priority) */
.hero-bottom-zone > .lecture-day-card[data-ldc-state="protect"] {
  box-shadow:
    0 0 0 1px rgba(210, 140, 30, 0.38),
    0 6px 24px rgba(210, 140, 30, 0.16) !important;
}

.status-aligned  { color: #00ff88; }
.status-ready    { color: #4fa8ff; }
.status-tension  { color: #ffaa00; }
.status-protect  { color: #ff8c42; }
.status-wait     { color: rgba(180, 180, 220, 0.75); }
.status-block    { color: #ff4444; }

/* ── P4 Snapshot history ───────────────────────────────── */
#history-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

#history-section .history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#history-section .history-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .5;
}

#history-insight {
  font-size: 13px;
  padding: 8px 0 4px;
  font-weight: 600;
}

/* ── Behavioral 5-level zones ───────────────────────────── */

.mem-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.mem-zone-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .35;
  padding-bottom: 2px;
}

.mem-zone--data { gap: 4px; }

.mem-zone--interpretation { opacity: .82; }

.mem-zone--action .side-card {
  padding: 16px 18px;
  border-color: rgba(125, 255, 179, 0.22);
  background: rgba(125, 255, 179, 0.03);
}

.mem-zone--action .mem-zone-label {
  color: var(--ok, #7dffb3);
  opacity: .7;
}

.mem-empty-hint {
  font-size: 11px;
  color: var(--muted, #bba76b);
  opacity: .6;
  text-align: center;
  padding: 12px 8px;
  margin: 0;
}

.memory-shell:has(#behaviorProfileCard[style*="block"]) .mem-empty-hint {
  display: none;
}

/* ── UX Phase 2 — Visual hierarchy ─────────────────────── */

/* Spacing between zones */
.mem-zone { margin-top: 18px; }
.mem-zone--data { margin-top: 14px; }

/* ── 1. SIGNAL — Priority 1 ─────────────────────────────── */

#behaviorAlertCard[style*="block"] {
  padding: 14px 16px;
  background: rgba(255, 80, 80, 0.035);
  border-color: rgba(255, 80, 80, 0.25);
  box-shadow: 0 0 10px rgba(255, 80, 80, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.016);
}

#preBehaviorAlertCard[style*="block"] {
  padding: 10px 14px;
  background: rgba(255, 180, 50, 0.04);
  border-color: rgba(255, 180, 50, 0.22);
}

.mem-zone--signal .mem-zone-label {
  color: var(--danger, #ff7b7b);
  opacity: .65;
}

/* ── 2. ACTION — Priority 2 ─────────────────────────────── */

.mem-zone--action .side-card {
  padding: 18px 20px;
  border-color: rgba(125, 255, 179, 0.35);
  background: rgba(125, 255, 179, 0.06);
  box-shadow: 0 0 14px rgba(125, 255, 179, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.022);
}

/* Main action line — render.js injects first coaching tip as leading text */
.mem-zone--action .side-card > div:first-of-type {
  font-size: 14px;
  font-weight: 700;
}

/* Secondary lines — lower opacity */
.mem-zone--action .side-card > div:not(:first-of-type) {
  opacity: .72;
}

/* ── 3. DATA — Priority 4 (background info) ──────────────── */

.mem-zone--data {
  opacity: .78;
}

.mem-zone--data .side-card {
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* ── 4. DIAGNOSTIC — readability ────────────────────────── */

.mem-zone--diagnostic .side-card {
  line-height: 1.7;
}

/* ── 5. INTERPRÉTATION — secondary weight ───────────────── */

.mem-zone--interpretation .side-card {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.008);
}

/* ── Guidance immédiate ─────────────────────────────────── */


.guidance-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold, #d4af37);
  opacity: .85;
  margin-bottom: 12px;
}

.guidance-section {
  margin-bottom: 10px;
}

.guidance-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .4;
  margin-bottom: 4px;
}

.guidance-list {
  margin: 0;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guidance-list li {
  font-size: 12px;
  color: var(--text, #f4ecd0);
  line-height: 1.5;
}

.guidance-list--why li {
  opacity: .65;
  font-size: 11px;
}

.guidance-focus {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.guidance-focus-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold, #d4af37);
  opacity: .7;
  white-space: nowrap;
}

.guidance-focus-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #f4ecd0);
}

/* Hero visual fix */
.hero-logo {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
}

.hero-logo .hero-visual-frame {
  flex: 1 1 0;
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 18px;
}

.hero-logo .hero-visual-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-overlay-panel {
  position: static;
  width: auto;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* ── Decision Block ─────────────────────────────────────────── */

.decision-block {
  margin-bottom: 24px;
  padding: 40px 44px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--state-rgb), 0.48);
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--state-rgb), 0.18), transparent 52%),
    linear-gradient(160deg, rgba(26, 21, 11, 0.99), rgba(16, 13, 7, 0.98));
  box-shadow:
    0 0 0 1px rgba(var(--state-rgb), 0.14) inset,
    0 2px 0 rgba(var(--state-rgb), 0.22) inset,
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 6px 24px rgba(0, 0, 0, 0.35);
  animation: decisionReveal 0.32s ease both;
}

.decision-block__inner {
  display: grid;
  gap: 28px;
  max-width: 860px;
}

.decision-block__verdict {
  display: flex;
  align-items: center;
  gap: 16px;
}

.decision-block__verdict-icon {
  font-size: 32px;
  line-height: 1;
  flex: 0 0 auto;
}

.decision-block__verdict-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--state-text);
}

.decision-block__posture {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 3px solid rgba(var(--state-rgb), 0.48);
  padding-left: 16px;
}

.decision-block__line {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

.decision-block__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.decision-block__col {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.decision-block__col--do {
  border-color: rgba(125, 255, 179, 0.26);
  background: rgba(125, 255, 179, 0.07);
}

.decision-block__col--dont {
  border-color: rgba(255, 123, 123, 0.26);
  background: rgba(255, 123, 123, 0.07);
}

.decision-block__col-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.decision-block__col--do .decision-block__col-label {
  color: var(--ok);
}

.decision-block__col--dont .decision-block__col-label {
  color: var(--danger);
}

.decision-block__col-icon {
  font-size: 13px;
}

.decision-block__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.decision-block__list li {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.decision-block__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.decision-block__status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.decision-block__status-chip--blocked {
  color: var(--danger);
  border-color: rgba(255, 123, 123, 0.32);
  background: rgba(255, 123, 123, 0.10);
}

.decision-block__status-chip--risk {
  color: var(--warn);
  border-color: rgba(255, 211, 110, 0.32);
  background: rgba(255, 211, 110, 0.10);
}

.decision-block__status-chip--confidence {
  color: var(--muted);
  border-color: rgba(187, 167, 107, 0.18);
  background: rgba(187, 167, 107, 0.05);
}


@media (max-width: 600px) {
  .decision-block {
    padding: 24px 20px;
  }

  .decision-block__actions {
    grid-template-columns: 1fr;
  }

  .decision-block__verdict-text {
    font-size: clamp(36px, 10vw, 48px);
  }
}

/* ── Cerveau Caméléon Panel ──────────────────────────────────── */

#debug-brain {
  width: 100%;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--state-rgb), 0.16);
  background: linear-gradient(160deg, rgba(var(--state-rgb), 0.06), rgba(255, 255, 255, 0.012));
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.4;
}

.debug-brain__label {
  margin-bottom: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--state-rgb), 0.55);
}

.cerveau-core {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.debug-brain__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-brain__row:last-child {
  border-bottom: none;
}

.debug-brain__row span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.debug-brain__row strong {
  color: rgba(var(--state-rgb), 0.9);
  font-weight: 600;
  font-size: 11px;
  text-align: right;
}

.cerveau-rules {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cerveau-rules__block {
  border-radius: 10px;
  padding: 8px 10px;
}

.cerveau-rules__block--allowed {
  background: rgba(125, 255, 179, 0.05);
  border: 1px solid rgba(125, 255, 179, 0.14);
}

.cerveau-rules__block--forbidden {
  background: rgba(255, 100, 100, 0.05);
  border: 1px solid rgba(255, 100, 100, 0.14);
}

.cerveau-rules__title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cerveau-rules__block--allowed .cerveau-rules__title {
  color: rgba(125, 255, 179, 0.65);
}

.cerveau-rules__block--forbidden .cerveau-rules__title {
  color: rgba(255, 100, 100, 0.65);
}

.cerveau-rules__list {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
}

.cerveau-hidden {
  display: none;
}

/* ── Cerveau — états dynamiques par agent ────────────────────── */

#debug-brain.cerveau--defender {
  border-color: rgba(255, 100, 100, 0.22);
  background: linear-gradient(160deg, rgba(255, 100, 100, 0.07), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(255, 100, 100, 0.06);
}

#debug-brain.cerveau--defender .debug-brain__label {
  color: rgba(255, 120, 120, 0.6);
}

#debug-brain.cerveau--attacker {
  border-color: rgba(125, 255, 179, 0.22);
  background: linear-gradient(160deg, rgba(125, 255, 179, 0.07), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(125, 255, 179, 0.06);
}

#debug-brain.cerveau--attacker .debug-brain__label {
  color: rgba(125, 255, 179, 0.6);
}

#debug-brain.cerveau--observer {
  border-color: rgba(152, 198, 255, 0.18);
  background: linear-gradient(160deg, rgba(152, 198, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(152, 198, 255, 0.04);
}

#debug-brain.cerveau--observer .debug-brain__label {
  color: rgba(152, 198, 255, 0.55);
}

#debug-brain.cerveau--execute {
  border-color: rgba(212, 175, 55, 0.22);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.07), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.06);
}

#debug-brain.cerveau--execute .debug-brain__label {
  color: rgba(212, 175, 55, 0.6);
}

.debug-brain__sublabel {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  margin-top: -8px;
  margin-bottom: 10px;
}

.cerveau-synthesis-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cerveau-synthesis-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
  font-style: italic;
}

/* ── Text overflow fixes ─────────────────────────────────────── */

/* Textes longs dans cards (journal, posture, action...) */
.insight-quote,
.engine-journal-main,
.engine-journal-sub,
.card-desc,
.card-title,
.action-directive,
.mode-main,
.agent-name,
.agent-role {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  overflow: hidden;
}

/* Journal principal : 2 lignes max avec ellipsis */
.insight-quote,
.engine-journal-main {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

/* Cerveau panel : valeurs dans les lignes étroites */
.debug-brain__row strong {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 60%;
  text-align: right;
}

/* Cerveau rules : texte des listes */
.cerveau-rules__list {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

/* ── Overview grid — espace réel pour la colonne agent ──────── */
/* Override ciblé : minmax(0,1fr) autorise la colonne à descendre */
/* à 0 — on donne à la 2e colonne un minimum = son contenu réel. */

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

/* ── Agent box — agent-name fix ─────────────────────────────── */
/* Priorité : ne jamais couper un mot au milieu.                 */
/* keep-all tient les mots entiers ; break-word n'intervient     */
/* qu'en dernier recours sur les mots vraiment trop longs.       */

.agent-box .agent-name {
  font-size: 18px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.25;
  /* pas de overflow:hidden ni line-clamp : ils empêchent le calcul  */
  /* min-content de la colonne grid et causent la coupure mid-mot.  */
}

/* ── Confidence Panel — strength flag ───────────────────────── */

.confidence-panel[data-strength="strong"] {
  border-color: rgba(125, 255, 179, 0.22);
  background: linear-gradient(160deg, rgba(125, 255, 179, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(125, 255, 179, 0.06);
}

.confidence-panel[data-strength="medium"] {
  border-color: rgba(255, 211, 110, 0.22);
  background: linear-gradient(160deg, rgba(255, 211, 110, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(255, 211, 110, 0.06);
}

.confidence-panel[data-strength="weak"] {
  border-color: rgba(255, 123, 123, 0.22);
  background: linear-gradient(160deg, rgba(255, 123, 123, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: 0 0 18px rgba(255, 123, 123, 0.06);
}

/* ── Confidence Panel — barre vivante ────────────────────────── */

#cs-bar {
  transition: width 0.6s ease, box-shadow 0.6s ease;
}

.confidence-panel[data-strength="weak"]   #cs-bar { box-shadow: 0 0 6px rgba(255, 123, 123, 0.25); }
.confidence-panel[data-strength="medium"] #cs-bar { box-shadow: 0 0 6px rgba(255, 211, 110, 0.20); }
.confidence-panel[data-strength="strong"] #cs-bar { box-shadow: 0 0 10px rgba(125, 255, 179, 0.35); }

/* ── Confidence Panel — pulse (strong only) ─────────────────── */

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 0px  rgba(125, 255, 179, 0.06); }
  50%  { box-shadow: 0 0 22px rgba(125, 255, 179, 0.18); }
  100% { box-shadow: 0 0 0px  rgba(125, 255, 179, 0.06); }
}

.confidence-panel.pulse-strong {
  animation: pulseGlow 2.4s ease-in-out infinite;
}

/* ── Confidence Panel — action block par strength ───────────── */

.confidence-panel[data-strength="weak"] #cs-action {
  opacity: 0.45;
}

.confidence-panel[data-strength="strong"] #cs-action {
  opacity: 1;
  transform: scale(1.02);
  transform-origin: left center;
}

/* ── Score card — confidence strength flag ───────────────────── */
/* data-strength posé par render.js sur #scoreCard               */

.kpi-card[data-strength] {
  transition: border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.25s ease;
}

.kpi-card[data-strength="weak"] {
  border-color: rgba(var(--state-rgb), 0.10);
}

.kpi-card[data-strength="medium"] {
  border-color: rgba(var(--state-rgb), 0.18);
}

.kpi-card[data-strength="strong"] {
  border-color: rgba(var(--state-rgb), 0.28);
  box-shadow: 0 0 14px rgba(var(--state-rgb), 0.06);
}

/* Score card — micro pulse au changement de strength */
@keyframes strengthPulse {
  0%   { box-shadow: 0 0 0px  rgba(var(--state-rgb), 0.06); }
  50%  { box-shadow: 0 0 18px rgba(var(--state-rgb), 0.16); }
  100% { box-shadow: 0 0 0px  rgba(var(--state-rgb), 0.06); }
}

#scoreCard.strength-pulse {
  animation: strengthPulse 0.42s ease-out forwards;
}

/* Barre de score — transition + intensité par strength */
.score-bar-fill {
  transition: width 0.4s ease, opacity 0.3s ease;
}

.kpi-card[data-strength="weak"]   .score-bar-fill { opacity: 0.4; }
.kpi-card[data-strength="medium"] .score-bar-fill { opacity: 0.7; }
.kpi-card[data-strength="strong"] .score-bar-fill { opacity: 1; }

/* Confidence flag label */
.confidence-flag {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.45;
  color: rgba(var(--state-rgb), 0.9);
  transition: opacity 0.3s ease;
}

.kpi-card[data-strength="strong"] .confidence-flag { opacity: 0.7; }

/* ── Score card — decision row (posture · agent · action) ─────── */
.score-decision-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.score-decision-row span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(var(--state-rgb), 0.75);
  transition: color 0.3s ease;
}

.score-decision-sep {
  opacity: 0.3;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}


/* ─── Secondary line — Centre de décision ───────────────────── */
.secondary-line {
  display: block;
  font-size: 0.82em;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.risk-low    { color: rgba(110, 231, 183, 0.85); }
.risk-medium { color: rgba(251, 191,  36, 0.85); }
.risk-high   { color: rgba(248, 113, 113, 0.85); }

/* ─── Intent classes — 2e ligne Centre de décision ─────────── */
.intent-neutral { color: rgba(156, 163, 175, 0.80); }
.intent-wait    { color: rgba(251, 191,  36, 0.85); }
.intent-danger  { color: rgba(248, 113, 113, 0.85); }

/* ─── Intent — couleur lignes panneau Moteur Brut ────────────── */
#debug-brain.intent-neutral .debug-brain__row strong { color: rgba(156, 163, 175, 0.80); }
#debug-brain.intent-wait    .debug-brain__row strong { color: rgba(251, 191,  36, 0.85); }
#debug-brain.intent-danger  .debug-brain__row strong { color: rgba(248, 113, 113, 0.85); }

/* ─── Plan d'action — card dynamique ────────────────────────── */
.plan-card {
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.plan-card.plan-neutral {
  background: linear-gradient(160deg, rgba(152, 198, 255, 0.04), rgba(255, 255, 255, 0.008));
  border-color: rgba(152, 198, 255, 0.14);
}

.plan-card.plan-wait {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.04), rgba(255, 255, 255, 0.008));
  border-color: rgba(251, 191, 36, 0.16);
}

.plan-card.plan-danger {
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.05), rgba(255, 255, 255, 0.008));
  border-color: rgba(248, 113, 113, 0.16);
}

.plan-card.plan-active {
  background: linear-gradient(160deg, rgba(110, 231, 183, 0.04), rgba(255, 255, 255, 0.008));
  border-color: rgba(110, 231, 183, 0.14);
}

/* ── Signature Caméléon ─────────────────────────────────────── */
.signature-cameleon {
  max-width: 500px;
  margin-top: 6px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.signature-line1 {
  font-family: var(--font-display);
  font-size: 0.808rem;
  color: var(--text-soft);
  opacity: 0.65;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.signature-line2 {
  font-family: var(--font-ui);
  font-size: 0.665rem;
  color: var(--muted);
  opacity: 0.45;
  margin-top: 3px;
  letter-spacing: 0.1em;
}

/* ── Hero warning pulse ─────────────────────────────────────── */
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 80, 80, 0); }
  50%       { box-shadow: 0 0 12px rgba(255, 80, 80, 0.08); }
}

.hero-warning {
  animation: heroPulse 2.8s ease-in-out infinite;
}

/* ── Overtrading block ───────────────────────────────────────── */

.overtrading-block {
  --ot-border: var(--border-strong);
  --ot-glow: rgba(212, 175, 55, 0.0);
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 20px;
  padding: 22px 26px;
  background: var(--panel);
  border: 1px solid var(--ot-border);
  border-radius: var(--radius-md);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Niveaux 1–2 : warning discret (jaune) */
.overtrading-block.ot-warning {
  --ot-border: rgba(253, 224, 71, 0.22);
  --ot-glow: rgba(253, 224, 71, 0.0);
}

/* Niveau 3 : alerte (orange) */
.overtrading-block.ot-alerte {
  --ot-border: rgba(251, 146, 60, 0.34);
  --ot-glow: rgba(251, 146, 60, 0.12);
  box-shadow: var(--shadow-lg), 0 0 14px 2px rgba(251, 146, 60, 0.10);
}

/* Niveaux 4–5 : danger (rouge) + pulse */
.overtrading-block.ot-danger {
  --ot-border: rgba(248, 113, 113, 0.42);
  --ot-glow: rgba(248, 113, 113, 0.14);
  animation: ot-pulse 2.8s ease-in-out infinite;
}

/* Intensité accumulée — streak >= 3 sur niveau >= 3 */
.overtrading-block.ot-intense {
  --ot-border: rgba(251, 146, 60, 0.52);
  border-width: 1.5px;
}

.overtrading-block.ot-intense .overtrading-etat,
.overtrading-block.ot-intense .overtrading-badge {
  opacity: 1;
}

/* Intensité critique — streak >= 5 sur niveau >= 4, ou niveau 5 streak >= 3 */
.overtrading-block.ot-critical {
  --ot-border: rgba(248, 113, 113, 0.65);
  border-width: 2px;
  animation: ot-pulse 1.8s ease-in-out infinite;
}

.overtrading-block.ot-critical .overtrading-etat {
  letter-spacing: 0.08em;
}

.overtrading-block.ot-critical .overtrading-action {
  color: #f87171;
  opacity: 0.9;
  border-top-color: rgba(248, 113, 113, 0.22);
}

.overtrading-media {
  flex: 0 0 auto;
}

.overtrading-img {
  display: block;
  width: 156px;
  height: 156px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.36);
}

.overtrading-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

/* Header : badge + titre */
.overtrading-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.overtrading-badge {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid currentColor;
  white-space: nowrap;
}

.ot-warning  .overtrading-badge { color: #fde047; }
.ot-alerte   .overtrading-badge { color: #fb923c; }
.ot-danger   .overtrading-badge { color: #f87171; }

/* Titre état */
.overtrading-etat {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.ot-warning  .overtrading-etat { color: #fde047; }
.ot-alerte   .overtrading-etat { color: #fb923c; }
.ot-danger   .overtrading-etat { color: #f87171; }

/* Phrase principale */
.overtrading-message {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
  margin-top: 2px;
}

/* Impact / risque */
.overtrading-risque {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Action conseillée */
.overtrading-action {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-soft);
  opacity: 0.75;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .overtrading-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .overtrading-img {
    width: 100%;
    height: auto;
    max-width: 320px;
  }
}

/* ── P6 — Hero layout restructure ──────────────────────────────── */

/* hero-grid : 1 colonne, hero-copy prend toute la largeur */
.hero > .hero-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

/* hero-copy : grille 1 colonne, gap serré */
.hero-copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  align-content: start !important;
}

/* Zone haute — tous les blocs directs de hero-copy = pleine largeur */
.hero-copy > .hero-top,
.hero-copy > .hero-kpi-grid,
.hero-copy > .hero-bar,
.hero-copy > .hero-decision-grid,
.hero-copy > .engine-journal-live {
  grid-column: 1 !important;
}

/* hero-bottom-zone : grille 3 colonnes (gauche | droite | image) */
.hero-copy > .hero-bottom-zone {
  grid-column: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) clamp(300px, 28vw, 420px) !important;
  column-gap: 20px !important;
  row-gap: 14px !important;
  align-items: stretch !important;
}

/* ── lecture-day-card : bloc maître — P6 ────────────────────────────────── */
.hero-bottom-zone > .lecture-day-card {
  grid-column: 1 / span 2 !important;
  grid-row: 1 !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  padding: clamp(28px, 3.5vw, 44px) clamp(28px, 3.5vw, 44px) clamp(32px, 4vw, 48px) !important;
}

/* Titre — libérer la contrainte 12ch orpheline de P4, renforcer l'impact */
.hero-bottom-zone > .lecture-day-card .lecture-day-main {
  max-width: none !important;
  color: var(--text) !important;
}

/* Sous-texte — alléger pour hiérarchiser sous le titre */
.hero-bottom-zone > .lecture-day-card .lecture-day-sub {
  font-weight: 400 !important;
  color: rgba(245, 241, 231, 0.6) !important;
  margin-top: 10px !important;
}

/* Zone basse — Loi du jour */
.hero-bottom-zone > .lecture-day-card .ldc-rule {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Label "LOI DU JOUR" — substitution CSS, texte HTML masqué */
.hero-bottom-zone > .lecture-day-card .ldc-rule-label {
  font-size: 0 !important;
}

.hero-bottom-zone > .lecture-day-card .ldc-rule-label::before {
  content: "LOI DU JOUR";
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--state-text);
  opacity: 0.5;
  margin-bottom: 7px;
}

/* Texte de la règle — plus de présence */
.hero-bottom-zone > .lecture-day-card .ldc-rule-text {
  font-size: 14px;
  line-height: 1.58;
  color: rgba(245, 241, 231, 0.78);
  font-weight: 500;
  max-width: 56ch;
}

/* ── États critiques LDC — source : data-ldc-state posé par renderHero() ── */

/* BLOCKED — interdit, rouge sombre premium */
.hero-bottom-zone > .lecture-day-card[data-ldc-state="blocked"] {
  border-color: rgba(210, 55, 55, 0.38) !important;
  background-image: radial-gradient(
    ellipse at top left,
    rgba(185, 30, 30, 0.10) 0%,
    transparent 55%
  ) !important;
}

.hero-bottom-zone > .lecture-day-card[data-ldc-state="blocked"] .lecture-day-main {
  color: rgba(255, 200, 200, 0.95) !important;
}

.hero-bottom-zone > .lecture-day-card[data-ldc-state="blocked"] .lecture-day-sub {
  color: rgba(245, 210, 210, 0.72) !important;
}

/* PROTECT — défensif, ambre chaud discret */
.hero-bottom-zone > .lecture-day-card[data-ldc-state="protect"] {
  border-color: rgba(210, 140, 30, 0.32) !important;
  background-image: radial-gradient(
    ellipse at top left,
    rgba(180, 110, 20, 0.08) 0%,
    transparent 55%
  ) !important;
}

.hero-bottom-zone > .lecture-day-card[data-ldc-state="protect"] .lecture-day-main {
  color: rgba(255, 220, 150, 0.95) !important;
}

.hero-bottom-zone > .lecture-day-card[data-ldc-state="protect"] .lecture-day-sub {
  color: rgba(245, 225, 185, 0.70) !important;
}

/* Pourquoi — rangée 2, colonne gauche */
.hero-bottom-zone > .signal-narratif {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

/* Posture — rangée 2, colonne droite */
.hero-bottom-zone > .mantra-operationnel {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

/* Onboarding — rangée 3, pleine largeur gauche */
.hero-bottom-zone > .onboarding-strip {
  grid-column: 1 / span 2 !important;
  grid-row: 3 !important;
}

/* État du marché — rangée 4, pleine largeur gauche */
.hero-bottom-zone > #hero-split {
  grid-column: 1 / span 2 !important;
  grid-row: 4 !important;
  margin-top: 0 !important;
}

/* Image — col 3, couvre les 4 rangées */
.hero-bottom-zone > .hero-logo {
  grid-column: 3 !important;
  grid-row: 1 / span 4 !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  min-height: 0 !important;
  max-width: none !important;
}

/* Frame image : s'étire pour remplir toute la hauteur */
.hero-bottom-zone > .hero-logo .hero-visual-frame {
  flex: 1 1 0 !important;
  min-height: 0 !important;
}

/* KPI grid : 2 colonnes pour éviter les rangées incomplètes */
.hero-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* État du marché : opacité lisible */
.hero-kpi-card:nth-child(1) .hero-kpi-value {
  opacity: 0.9 !important;
}

/* Action du jour — carte plus large mais équilibrée */
.hero-decision-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 0.8fr) !important;
}

/* hero-overlay-panel : hors du flux hero dans le DOM — neutralisé via spec (0,2,0) > regression repair (0,1,0) */
.main-shell > .hero-overlay-panel {
  display: none !important;
}

/* Responsive : sous 980px, zone basse en 1 colonne */
@media (max-width: 980px) {
  .hero-copy > .hero-bottom-zone {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-bottom-zone > .lecture-day-card,
  .hero-bottom-zone > .signal-narratif,
  .hero-bottom-zone > .mantra-operationnel,
  .hero-bottom-zone > .onboarding-strip,
  .hero-bottom-zone > #hero-split {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .hero-bottom-zone > .hero-logo {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 240px !important;
  }

  .hero-bottom-zone > .hero-logo .hero-visual-frame {
    min-height: 240px !important;
  }
}

/* ── Liaison visuelle globale — data-decision-state sur root ────────────── */
[data-decision-state="blocked"] .hero-kpi-grid,
[data-decision-state="blocked"] .hero-bar {
  border-color: rgba(255, 80, 80, 0.15);
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.08);
}

[data-decision-state="protect"] .hero-kpi-grid,
[data-decision-state="protect"] .hero-bar {
  border-color: rgba(255, 200, 120, 0.15);
  box-shadow: 0 0 12px rgba(255, 200, 120, 0.08);
}

[data-decision-state="aligned"] .hero-kpi-grid,
[data-decision-state="aligned"] .hero-bar {
  border-color: rgba(120, 255, 180, 0.15);
  box-shadow: 0 0 12px rgba(120, 255, 180, 0.08);
}

/* ── Plan d'action — format 3 lignes ────────────────────────────────────── */
.action-plan {
  font-size: 13px;
  line-height: 1.5;
}

.action-plan div {
  opacity: 0.9;
}


/* ── Focus state system — pilotage visuel dynamique ─────────────────────── */
.focus-primary {
  opacity: 1 !important;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  z-index: 2;
}

.focus-secondary {
  opacity: 0.82;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body[data-decision-state="blocked"] .focus-primary {
  border-color: rgba(220, 60, 60, 0.28) !important;
}

body[data-decision-state="protect"] .focus-primary {
  border-color: rgba(255, 180, 60, 0.24) !important;
}

/* ── Reset mental — bloc émotionnel contextuel ───────────────────────────── */
.mental-reset {
  font-size: 13px;
  line-height: 1.7;
  padding: 4px 0;
}

.mental-reset div {
  opacity: 0.88;
}

/* ── Onboarding overlay — première ouverture ─────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 160ms ease;
}

.onboarding-overlay:not(.hidden) {
  opacity: 1;
}

html.onboarding-seen .onboarding-overlay {
  display: none !important;
}

.onboarding-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.onboarding-card {
  width: min(480px, calc(100vw - 32px));
  padding: 36px 32px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface, #0d1117);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.98);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

.onboarding-overlay:not(.hidden) .onboarding-card {
  transform: scale(1);
  opacity: 1;
}

.onboarding-logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}

.onboarding-phrase {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.onboarding-blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-block {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.onboarding-block p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.85;
}

.onboarding-btn {
  align-self: flex-end;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.onboarding-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================
   GUIDANCE V2 — DOMINANT BLOCK
   ============================ */

.guidance-card {
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: radial-gradient(circle at top, rgba(212, 175, 55, 0.08), transparent 70%);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.07);
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 12px;
  padding: 24px 28px;
  position: relative;
  z-index: 10;
}

.guidance-v2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guidance-mode {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold, #d4af37);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.guidance-block {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  line-height: 1.4;
}

.guidance-block .label {
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 4px;
}

.guidance-block--forbidden {
  border-left: 3px solid rgba(255, 70, 70, 0.7);
}

.guidance-block--allowed {
  border-left: 3px solid rgba(80, 200, 120, 0.7);
}

.guidance-block--focus {
  border-left: 3px solid rgba(212, 175, 55, 0.7);
}

.guidance-context {
  font-size: 11px;
  opacity: 0.6;
  padding-top: 6px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* ============================
   STATE VISUAL DOMINANCE
   ============================ */

@keyframes subtlePulse {
  0%   { opacity: 0.95; }
  50%  { opacity: 1; }
  100% { opacity: 0.95; }
}

.guidance-v2[data-state="BLOCKED"] {
  box-shadow: 0 0 24px rgba(255, 50, 50, 0.1);
  animation: subtlePulse 3s ease-in-out infinite;
}

.guidance-v2[data-state="READY"] {
  box-shadow: 0 0 24px rgba(80, 200, 120, 0.1);
}

.guidance-v2[data-state="WAIT"] {
  border: 1px solid rgba(255, 200, 80, 0.25);
  box-shadow: 0 0 24px rgba(255, 200, 80, 0.08);
}

.guidance-v2[data-state="BLOCKED"] .guidance-headline {
  color: rgba(255, 90, 90, 0.85);
  opacity: 0.9;
}

.guidance-v2[data-state="READY"] .guidance-headline {
  color: rgba(125, 255, 179, 0.95);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


.guidance-headline {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}


/* Soft friction — only actions, NOT inputs */
body[data-guidance-state="BLOCKED"] .moteur-flow button {
  opacity: 0.6;
}

/* Inputs must remain normal and usable */
body[data-guidance-state="BLOCKED"] .moteur-flow select,
body[data-guidance-state="BLOCKED"] .moteur-flow input {
  cursor: default;
  opacity: 1;
}

body[data-guidance-state="BLOCKED"] .guidance-headline {
  color: rgba(255, 90, 90, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

body[data-guidance-state="BLOCKED"] .guidance-card,
body[data-guidance-state="WAIT"] .guidance-card {
  opacity: 1;
  pointer-events: auto;
}

body[data-guidance-state="BLOCKED"] .guidance-card {
  filter: none;
  z-index: 20;
  border-color: rgba(255, 90, 90, 0.35);
  animation: lockBreath var(--ux-breath) ease-in-out infinite;
}

@keyframes readyBreath {
  0%, 100% { box-shadow: 0 0 24px rgba(80, 200, 120, 0.10); }
  50%       { box-shadow: 0 0 32px rgba(80, 200, 120, 0.18); }
}

body[data-guidance-state="READY"] .guidance-card {
  opacity: 1;
  transform: scale(1.01);
  border-color: rgba(80, 200, 120, 0.35);
  animation: readyBreath var(--ux-breath) ease-in-out infinite;
}

body[data-guidance-state="READY"] .moteur-flow,
body[data-guidance-state="READY"] .side-panel {
  opacity: 1;
  filter: none;
}

body[data-guidance-state="WAIT"] .guidance-card {
  animation: subtlePulse var(--ux-breath) ease-in-out infinite;
}

/* Priority fade — secondary content */
.moteur-flow,
.side-panel {
  transition: opacity var(--ux-transition) ease, filter var(--ux-transition) ease, transform var(--ux-transition) ease;
}

body[data-guidance-state="BLOCKED"] .moteur-flow,
body[data-guidance-state="BLOCKED"] .side-panel {
  opacity: 0.52;
  /* filter removed — was creating stacking context conflicting with backdrop-filter on child cards */
  transition: opacity var(--ux-transition) ease;
}

body[data-guidance-state="WAIT"] .moteur-flow,
body[data-guidance-state="WAIT"] .side-panel {
  opacity: 0.7;
}

/* ============================
   UX INTENSITY — BEHAVIORAL LAYER
   ============================ */

body[data-ux-intensity="TENSION"] .moteur-flow {
  opacity: 0.9;
}

body[data-ux-intensity="DRIFT"] .moteur-flow {
  opacity: 0.75;
}

body[data-ux-intensity="DRIFT"] .guidance-card {
  transform: scale(calc(1 + 0.01 * var(--behavior-intensity)));
  border-color: rgba(255, 180, 80, 0.25);
}

body[data-ux-intensity="TENSION"] button,
body[data-ux-intensity="DRIFT"] button {
  transition: all 0.2s ease;
}

/* ============================
   TENSION UX — subtle behavioral friction
   ============================ */

@keyframes lockBreath {
  0%, 100% {
    box-shadow: 0 0 26px rgba(255, 90, 90, 0.10);
    transform: scale(1.01);
  }
  50% {
    box-shadow: 0 0 34px rgba(255, 90, 90, 0.16);
    transform: scale(1.012);
  }
}

body[data-guidance-state="BLOCKED"] .moteur-flow p,
body[data-guidance-state="BLOCKED"] .moteur-flow li,
body[data-guidance-state="BLOCKED"] .moteur-flow span,
body[data-guidance-state="BLOCKED"] .side-panel p,
body[data-guidance-state="BLOCKED"] .side-panel li,
body[data-guidance-state="BLOCKED"] .side-panel span {
  opacity: 0.82;
}

body[data-guidance-state="BLOCKED"] .guidance-block .label {
  opacity: 0.72;
  letter-spacing: 0.09em;
}

/* ============================
   UX LEVEL 4 — cognitive friction
   ============================ */

body[data-guidance-state="BLOCKED"] .moteur-flow,
body[data-guidance-state="BLOCKED"] .side-panel {
  line-height: 1.48;
}

body[data-guidance-state="BLOCKED"] .moteur-flow p,
body[data-guidance-state="BLOCKED"] .moteur-flow li,
body[data-guidance-state="BLOCKED"] .side-panel p,
body[data-guidance-state="BLOCKED"] .side-panel li {
  letter-spacing: 0.015em;
}

/* translateY(0.5px) removed — subpixel offset caused text ghosting on side-panel cards */

/* ============================
   BEHAVIORAL FEEDBACK BLOCK
   ============================ */

.behavior-block {
  opacity: 0.7;
  font-size: 0.85rem;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ============================
   DECISION ANCHOR
   ============================ */

.decision-anchor {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.decision-title {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 8px;
}

.decision-actions {
  display: flex;
  gap: 8px;
}

.decision-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: default;
  text-align: center;
  transition: border-color 0.2s ease;
  user-select: none;
}

.decision-btn:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.decision-btn.alt {
  opacity: 0.6;
}

.decision-btn.selected {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.decision-btn.alt.selected {
  border-color: rgba(255, 100, 100, 0.28);
  background: rgba(255, 100, 100, 0.05);
  color: rgba(255, 180, 180, 0.85);
  opacity: 1;
}

.decision-override-msg {
  font-size: 0.72rem;
  color: rgba(255, 180, 160, 0.75);
  text-align: center;
  padding: 4px 6px 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}

.decision-override-msg.visible {
  opacity: 1;
  max-height: 40px;
}

/* ============================
   READY STATE ENHANCEMENT
   ============================ */

body[data-guidance-state="READY"] .moteur-flow {
  transform: scale(1.002);
  transition: all 0.2s ease;
}

/* ============================
   BLOCKED MICRO-FRICTION
   ============================ */

body[data-guidance-state="BLOCKED"] button {
  transition: all 0.35s ease;
}


/* ============================
   ACTION SCORE — UX display layer
   ============================ */

.action-score-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.action-score {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.action-score-label {
  opacity: 0.7;
  font-size: 0.82rem;
}

.action-score-title {
  opacity: 0.65;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.engine-score-secondary {
  opacity: 0.34;
  font-size: 0.72rem;
  margin-top: 6px;
  line-height: 1.35;
}

.engine-score-note {
  opacity: 0.75;
  font-style: italic;
}

/* ============================
   ACTION LOCK UX
   ============================ */

body[data-action-level="LOCKED"] .action-plan,
body[data-action-level="OBSERVE"] .action-plan {
  opacity: 0.55;
}

body[data-action-level="PREPARE"] .action-plan {
  opacity: 0.75;
}

body[data-action-level="LIMITED"] .action-plan {
  opacity: 0.9;
}

body[data-action-level="EXECUTE"] .action-plan {
  opacity: 1;
}

body[data-action-level="LOCKED"] button {
  opacity: 0.62;
  transition: all 0.35s ease;
}

body[data-action-level="OBSERVE"] button {
  opacity: 0.65;
}

body[data-action-level="PREPARE"] button {
  opacity: 0.8;
}

body[data-action-level="LIMITED"] button {
  opacity: 0.9;
}

body[data-action-level="EXECUTE"] button {
  opacity: 1;
  transform: scale(1.01);
}

body[data-action-level="LOCKED"] .decision-anchor {
  opacity: 0.6;
  border-left: 2px solid rgba(220, 80, 80, 0.38);
  box-shadow: inset 3px 0 10px rgba(220, 80, 80, 0.06);
}

body[data-action-level="OBSERVE"] .decision-anchor {
  border-left: 2px solid rgba(255, 209, 102, 0.32);
  box-shadow: inset 3px 0 10px rgba(255, 209, 102, 0.05);
}

body[data-action-level="EXECUTE"] .decision-anchor {
  border-color: rgba(80, 200, 120, 0.25);
}

body[data-action-level="LOCKED"]  .action-score {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(220, 80, 80, 0.28);
  letter-spacing: 0.04em;
  font-weight: 600;
}
body[data-action-level="OBSERVE"] .action-score {
  color: #ffd166;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.22);
  letter-spacing: 0.03em;
}
body[data-action-level="PREPARE"] .action-score { color: #fcbf49; }
body[data-action-level="LIMITED"] .action-score { color: #80ed99; }
body[data-action-level="EXECUTE"] .action-score {
  color: #00f5d4;
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.24);
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* ============================
   SCORE HIERARCHY — visual priority
   ============================ */

/* Engine score — low priority (context only) */
#scoreCard > .kpi-label {
  opacity: 0.5;
  font-size: 0.72rem;
}

#scoreCard > .kpi-value {
  opacity: 0.6;
  font-size: 1rem;
  font-weight: 600;
}

/* Readability — medium priority */
.confidence-panel .kpi-card:first-child .kpi-label {
  opacity: 0.75;
  font-size: 0.75rem;
}

.confidence-panel .kpi-card:first-child .kpi-value {
  font-weight: 700;
  opacity: 0.85;
}

/* ============================
   VISUAL LINKING SYSTEM
   ============================ */

.active-link {
  position: relative;
  z-index: 2;
}

.active-link::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  opacity: 0.25;
  filter: blur(10px);
  pointer-events: none;
}

/* Color mapping — link-engagement + link-mode */
body[data-action-level="LOCKED"] .link-engagement,
body[data-action-level="LOCKED"] .link-mode  { color: #ff6b6b; }

body[data-action-level="OBSERVE"] .link-engagement,
body[data-action-level="OBSERVE"] .link-mode  { color: #ffd166; }

body[data-action-level="PREPARE"] .link-engagement,
body[data-action-level="PREPARE"] .link-mode  { color: #fcbf49; }

body[data-action-level="LIMITED"] .link-engagement,
body[data-action-level="LIMITED"] .link-mode  { color: #80ed99; }

body[data-action-level="EXECUTE"] .link-engagement,
body[data-action-level="EXECUTE"] .link-mode  { color: #00f5d4; }

/* Glow on dominant link-mode */
body[data-action-level="EXECUTE"] .link-mode.active-link::after {
  background: rgba(0, 245, 212, 0.25);
}

body[data-action-level="LIMITED"] .link-mode.active-link::after {
  background: rgba(128, 237, 153, 0.2);
}

body[data-action-level="OBSERVE"] .link-mode.active-link::after {
  background: rgba(255, 209, 102, 0.15);
}

@keyframes activeLinkBreath {
  0%, 100% { transform: scale(1);     opacity: 0.92; }
  50%       { transform: scale(1.006); opacity: 1;    }
}

@keyframes activeGlowBreath {
  0%, 100% { opacity: 0.16; }
  50%       { opacity: 0.28; }
}

.active-link {
  animation: activeLinkBreath 4.8s ease-in-out infinite;
  transform-origin: center;
  letter-spacing: 0.01em;
}

body[data-action-level="EXECUTE"] .active-link {
  letter-spacing: 0.02em;
}

.active-link::after {
  animation: activeGlowBreath 4.8s ease-in-out infinite;
}

.focus-settling {
  opacity: 0.82;
  transform: scale(0.996);
  transition: opacity 180ms ease, transform 180ms ease;
}

.focus-settled {
  opacity: 1;
  transform: scale(1);
  transition: opacity 220ms ease, transform 220ms ease;
}

/* ============================
   BEHAVIOR FEEDBACK — silent UX signal
   ============================ */

.behavior-feedback {
  height: 6px;
  margin-top: 8px;
  border-radius: 4px;
  opacity: 0.6;
  transition: background var(--ux-transition) ease, opacity var(--ux-transition) ease, box-shadow var(--ux-transition) ease, transform var(--ux-transition) ease;
}

.behavior-feedback[data-behavior="positive"] {
  background: rgba(0, 245, 212, 0.5);
  opacity: 0.6;
}

.behavior-feedback[data-behavior="neutral"] {
  background: rgba(255, 209, 102, 0.3);
}

.behavior-feedback[data-behavior="negative"] {
  background: rgba(255, 107, 107, 0.25);
  opacity: 0.3;
}

.behavior-feedback[data-memory-tone="strict"]    { box-shadow: 0 0 14px rgba(255, 107, 107, 0.18); }
.behavior-feedback[data-memory-tone="confident"] { box-shadow: 0 0 14px rgba(0, 245, 212, 0.18); }
.behavior-feedback[data-memory-tone="neutral"]   { box-shadow: none; }

.behavior-feedback { --behavior-intensity: 0; }

.behavior-feedback[data-behavior-pattern="drift"]       { transform: translateY(calc(1px * var(--behavior-intensity))); }
.behavior-feedback[data-behavior-pattern="force"]       { box-shadow: 0 0 calc(18px * var(--behavior-intensity)) rgba(255, 107, 107, 0.25); }
.behavior-feedback[data-behavior-pattern="discipline"]  { box-shadow: 0 0 calc(18px * var(--behavior-intensity)) rgba(0, 245, 212, 0.25); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease, background 0.4s ease;
}

body[data-behavior-pattern="force"]::before {
  opacity: calc(0.16 * var(--behavior-intensity));
  background: radial-gradient(circle at 50% 30%, rgba(255,107,107,0.26), transparent 55%);
}

body[data-behavior-pattern="drift"]::before {
  opacity: calc(0.13 * var(--behavior-intensity));
  background: radial-gradient(circle at 50% 30%, rgba(255,209,102,0.22), transparent 55%);
}

body[data-behavior-pattern="discipline"]::before {
  opacity: calc(0.11 * var(--behavior-intensity));
  background: radial-gradient(circle at 50% 30%, rgba(0,245,212,0.20), transparent 55%);
}

/* ── Lecture & Décision — card fusion ────────────────────────────────── */

.pourquoi-shell {
  border-color: rgba(var(--state-rgb), 0.24);
}

/* STATUS colors */
.status-green  { color: #22c55e; font-weight: 600; text-shadow: 0 0 8px rgba(34,197,94,0.4); }
.status-orange { color: #f59e0b; font-weight: 600; text-shadow: 0 0 8px rgba(245,158,11,0.4); }
.status-red    { color: #ef4444; font-weight: 600; text-shadow: 0 0 8px rgba(239,68,68,0.4); }

@keyframes statusBreath {
  0%   { opacity: 0.85; }
  50%  { opacity: 1; }
  100% { opacity: 0.85; }
}
.status-green,
.status-orange,
.status-red { animation: statusBreath 2.5s ease-in-out infinite; }

/* Primary zone — STATUS + phrase centrale */
#whyDecisionPrimary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.why-status-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.88;
}

.why-central-phrase {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* Secondary — sections list */
#whyDecisionSecondary {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.why-decision-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.why-decision-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.why-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.why-section-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.why-bhv-risk {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.why-action-strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.95);
}

.why-action-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Prudence Expert Block ───────────────────────────────────── */
.prudence-expert-shell {
  border-color: rgba(245, 158, 11, 0.28);
}

.prudence-expert-shell--active {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.05);
}

.prudence-expert-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.prudence-expert-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.prudence-expert-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.prudence-expert-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(245, 158, 11, 0.7);
}

.prudence-expert-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

/* ── Premium Decision Block ──────────────────────────────────── */
.premium-decision-block {
  text-align: center;
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(var(--state-rgb), 0.06);
  border: 1px solid rgba(var(--state-rgb), 0.14);
}
.pdv-label {
  display: block;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
  color: rgba(var(--state-rgb), 1);
}
.pdv-label.pdv-exec    { color: #7dffc7; }
.pdv-label.pdv-wait    { color: rgba(var(--state-rgb), 0.9); }
.pdv-label.pdv-protect { color: #ffd36e; }
.pdv-label.pdv-stop    { color: #ff7b7b; }
.pdv-label.pdv-caution { color: #ffc36e; }
.pdv-info {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.45;
  text-transform: uppercase;
}

.no-trade-block {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.25);
  text-align: center;
}

.nt-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffd36e;
}

.nt-sub {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

.nt-hidden {
  display: none;
}

/* ── V2 message — T3 cockpit exposition (T2-05) ─────────────────── */
.v2-message {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.v2-message--t3 {
  letter-spacing: 0.01em;
}

.v2-message--hidden {
  display: none;
}

/* ── Hero video (.video-main) ───────────────────────────────────── */
.video-main {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  transform: scale(0.92);
  transform-origin: center;
  display: block;
  pointer-events: none;
}

@keyframes videoLogoPulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50%       { filter: brightness(1.08); transform: scale(1.015); }
}

@keyframes videoCirclePulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50%       { filter: brightness(1.12); transform: scale(1.025); }
}


/* ── Execution Confidence Block (V2) ─────────────────────────────────────── */

.exec-confidence-block {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.exec-confidence-score {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.4rem;
  color: var(--text-primary, #fff);
}

.exec-confidence-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  margin-bottom: 0.4rem;
}

.exec-confidence-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.35s ease;
}

.exec-confidence-fill[data-tone="high"]     { background: #4ade80; }
.exec-confidence-fill[data-tone="moderate"] { background: #facc15; }
.exec-confidence-fill[data-tone="low"]      { background: #fb923c; }
.exec-confidence-fill[data-tone="minimal"]  { background: #f87171; }
.exec-confidence-fill[data-tone="none"]     { background: rgba(255,255,255,0.12); }

.exec-confidence-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.35rem;
}

.exec-confidence-phrase {
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.6;
  margin: 0;
}

/* ── Friction message (V3) ───────────────────────────────────────────────── */

.friction-message {
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.55;
  padding: 0.25rem 0;
  transition: opacity 0.2s ease;
}

.friction-message:not([hidden]) {
  display: block;
}

[data-friction-state="pending"] {
  opacity: 0.5;
  cursor: wait;
}

/* ── Sidebar doctrine link ───────────────────────────────────────────────── */

.sidebar-doctrine-link {
  padding: 0.5rem 0.75rem 0.75rem;
}

.doctrine-link {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.doctrine-link:hover {
  opacity: 0.9;
}

/* ── Page Manifeste ──────────────────────────────────────────────────────── */

.manifeste-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.manifeste-accroche {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  margin: 0 0 3rem;
  opacity: 0.8;
}

.manifeste-section {
  margin-bottom: 2.8rem;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.manifeste-section:last-child {
  border-bottom: none;
}

.manifeste-h2 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.manifeste-h3 {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  margin: 1.6rem 0 0.6rem;
}

.manifeste-inner p {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.88;
  color: var(--text);
  margin: 0 0 0.9rem;
  font-weight: 300;
}

.manifeste-inner em {
  font-style: italic;
  color: var(--text-soft);
}

.manifeste-list {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.88;
  color: var(--text);
  font-weight: 300;
  padding-left: 1.4rem;
  margin: 0.6rem 0 0.9rem;
}

.manifeste-list li {
  margin-bottom: 0.5rem;
}

.manifeste-principe {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--text-soft);
  margin: 1.6rem 0;
  padding: 1.4rem 1.8rem;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.04);
  border-radius: 0 8px 8px 0;
}

.manifeste-postface p {
  color: var(--muted);
  font-size: 0.96rem;
}

.manifeste-closing {
  margin-top: 1.6rem;
  font-style: italic;
  opacity: 0.7;
}

.manifeste-origin-link {
  max-width: 680px;
  margin: 0 auto 2.8rem;
  padding: 0 2rem;
}

.manifeste-ext-link {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  letter-spacing: 0.02em;
}

.manifeste-ext-link:hover {
  opacity: 0.85;
}

/* ── SEC-B4 — états initiaux extraits des attributs style="" HTML ──────────── */

/* Groupe A — masquage initial (display géré par render.js via .style.display="block"|"none") */
#guidanceCard,
#behaviorRepetitionCard,
#traderSignatureCard,
#behaviorProfileCard,
#traderMemoryCard,
#psychProfileCard,
#behaviorCoachCard,
#mentalResetCard { display: none; }

/* Groupe D — styles propres composés (behaviorAlertCard / preBehaviorAlertCard) */
#behaviorAlertCard    { display: none; font-size: 13px; opacity: 0.88; }
#preBehaviorAlertCard { display: none; font-size: 13px; opacity: 0.72; }

/* Groupe C — espacements spécifiques au panneau confidence */
.confidence-panel .mode-panel          { margin-top: 0.5rem; }
.confidence-panel > p.text-soft        { margin-top: 0.5rem; }

/* ── PERC-01 — Calibration perceptive cockpit production (première passe) ──── */
/* Principes V1-R1A adaptés à l'architecture de cartes production.              */
/* Scope : moteur-flow uniquement. CSS-only. Aucune modification HTML/JS.       */

/* A1 — Pause cognitive avant la synthèse décisionnelle                         */
/* Effet : gap visuel 24px → 40px entre verdict-shell et pourquoi-shell         */
.moteur-flow > .pourquoi-shell { margin-top: 16px; }

/* A2 — Récession spatiale de la zone système (KPI / Mode / CORE / SNIPER)      */
/* Effet : gap visuel 24px → 44px avant navigation-shell                        */
.moteur-flow > .navigation-shell { margin-top: 20px; }

/* ══════════════════════════════════════════════════════════════════════════
   P3-A LOT 1 — Modifications d'interface dérivées du User Journey V1
   ══════════════════════════════════════════════════════════════════════════ */

/* P3-03 — Constellium dormant (D5) : boutons masqués — HTML intact, réactivable */
#prefillBtn,
#constelliumNavBtn,
#prefillWarning {
  display: none;
}

/* P3-01 — Debug Brain masqué par défaut (D3) */
#debug-brain {
  display: none;
}
#debug-brain.expert-visible {
  display: block;
}

/* P3-01 — Bouton Mode expert */
.expert-mode-btn {
  display: block;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.65rem;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.expert-mode-btn:hover {
  opacity: 1;
}

/* P3-07 — Promesse centrale au premier écran */
.hero-promesse {
  margin: 10px 0 4px;
  max-width: 480px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.8;
  letter-spacing: 0.01em;
}

/* P3-A LOT 2 — Manifeste footer (Pilotage restauré dans la nav) */
.side-tab[data-tab-target="manifeste"] {
  display: none;
}
.sidebar-doctrine-link {
  display: none;
}
.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}
.footer-link {
  background: none;
  border: none;
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.55;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
  padding: 0;
}
.footer-link:hover {
  opacity: 1;
}
.footer-link.active {
  color: var(--text-soft);
  opacity: 0.85;
}
