/* ============================================================================
   AIOS Console — components.css
   Coquille + galerie du système de design. DESIGN.md §3–8.
   Aucun style inline : tout vit ici (CSP stricte).
   ========================================================================== */

/* --------------------------- Réinitialisation --------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-size: 100%;
  line-height: var(--lh-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-base);
  display: flex;
  flex-direction: column;
}

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

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

ul {
  list-style: none;
  padding: 0;
}

a {
  color: var(--pg-violet);
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ------------------------------ Skip-link ------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -60px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: var(--sp-2) var(--sp-4);
  border: 2px solid var(--pg-violet);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: var(--sp-2);
}

/* ---------------------- Utilitaire lecteur d'écran ---------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------- En-tête ------------------------------- */
.app-header {
  position: relative;
  background: var(--pg-gradient);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  box-shadow: var(--shadow-1);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.app-header__logomark {
  height: 44px;
  width: 44px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-md);
  padding: 4px;
}

.app-header__wordmark {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.app-header__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: 0.2px;
}

.app-header__subtitle {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.92);
}

.app-header__controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Contrôles d'en-tête sur fond dégradé : variante claire */
.app-header__controls .btn--toggle {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.app-header__controls .btn--toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.92);
  color: var(--pg-violet);
  border-color: #fff;
}

/* ------------------------------- Corps ---------------------------------- */
.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 264px 1fr;
  align-items: start;
}

/* ------------------------------ Navigation ------------------------------ */
.app-nav {
  position: sticky;
  top: 0;
  align-self: stretch;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-3);
  min-height: 100%;
}

.app-nav__heading {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: var(--sp-2) var(--sp-3);
}

.app-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: background 150ms ease, color 150ms ease;
}
.app-nav__link:hover {
  background: var(--surface-2);
}
.app-nav__link svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
.app-nav__link[aria-current="page"] {
  background: var(--surface-3);
  color: var(--pg-violet);
  font-weight: var(--fw-semibold);
  box-shadow: inset 3px 0 0 0 var(--pg-rose);
}
.app-nav__link[aria-current="page"] svg {
  color: var(--pg-rose);
}

/* -------------------------------- Main ---------------------------------- */
.app-main {
  padding: var(--sp-6);
  max-width: 1080px;
}

.view[hidden] {
  display: none;
}

.view__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}
.view__lead {
  color: var(--text-muted);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-6);
  max-width: 62ch;
}

.view__title:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 4px;
}

/* -------------------------------- Pied ---------------------------------- */
.app-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-6);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  background: var(--surface);
}

/* ================================ CARTES ================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
}
.card + .card,
.stack > * + * {
  margin-top: var(--sp-5);
}
.card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}
.card__hint {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
}

/* Grille de démonstration */
.demo-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: start;
}
.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.section-label {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin: var(--sp-7) 0 var(--sp-4);
}
.section-label:first-of-type {
  margin-top: 0;
}

/* ================================ BOUTONS =============================== */
/* DESIGN.md §3 — 8 types. Base commune. */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--sp-4);
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: filter 150ms ease, background 150ms ease, box-shadow 150ms ease,
    transform 80ms ease;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.btn--primary {
  background: var(--pg-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-1);
}
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  background: var(--surface-2);
}
.btn--validation {
  background: var(--ok);
  color: var(--text-invert);
}
.btn--danger {
  background: var(--crit);
  color: var(--text-invert);
}
.btn--link {
  background: transparent;
  color: var(--pg-violet);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding: 0 var(--sp-2);
  border-color: transparent;
}
.btn--link:hover {
  filter: none;
  color: var(--pg-rose);
}
.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--icon svg {
  width: 20px;
  height: 20px;
}
.btn--toggle {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--toggle[aria-pressed="true"] {
  background: var(--pg-violet);
  color: #fff;
  border-color: var(--pg-violet);
}
.btn--system {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
}

/* Emphase (Approuver et exécuter) */
.btn--emphasis {
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.28), var(--shadow-1);
}

.btn svg {
  flex: 0 0 auto;
}

/* ============================ BADGES NIVEAUX =========================== */
/* DESIGN.md §4 — N0..N4 */
.level {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.level__code {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
}
.level--n0 {
  background: var(--n0-bg);
  color: var(--n0-fg);
  border-color: var(--n0-bd);
}
.level--n1 {
  background: var(--n1-bg);
  color: var(--n1-fg);
  border-color: var(--n1-bd);
}
.level--n2 {
  background: var(--n2-bg);
  color: var(--n2-fg);
  border-color: var(--n2-bd);
}
.level--n3 {
  background: var(--n3-bg);
  color: var(--n3-fg);
  border-color: var(--n3-bd);
}
.level--n4 {
  background: var(--n4-bg);
  color: var(--n4-fg);
  border-color: var(--n4-bd);
}
/* Badge « MFA requise » : friction supplémentaire signalée dès la liste. */
.level--mfa {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
}
.level-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.level-item__friction {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ============================ CHIPS ORIGINE =========================== */
/* DESIGN.md §5 */
.origin {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
}
.origin svg {
  width: 14px;
  height: 14px;
}
.origin--human {
  background: var(--origin-human-bg);
  color: var(--origin-human-fg);
}
.origin--ai {
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
}
.origin--system {
  background: var(--origin-system-bg);
  color: var(--origin-system-fg);
}

/* ========================= VOCABULAIRE IA (barre) ===================== */
/* DESIGN.md §6 */
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  border-top: 1px dashed var(--border);
}

/* ======================= COMPTEUR DE CONFIANCE ======================== */
/* DESIGN.md §7 */
.confidence {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.confidence__track {
  flex: 1;
  height: 10px;
  min-width: 140px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.confidence__fill {
  height: 100%;
  background: var(--pg-gradient);
  border-radius: var(--r-full);
}
.confidence__fill--72 {
  width: 72%;
}
.confidence__fill--88 {
  width: 88%;
}
/* Paliers de 5 % (remplissage sans style inline — CSP stricte) */
.confidence__fill--step-0 { width: 0%; }
.confidence__fill--step-5 { width: 5%; }
.confidence__fill--step-10 { width: 10%; }
.confidence__fill--step-15 { width: 15%; }
.confidence__fill--step-20 { width: 20%; }
.confidence__fill--step-25 { width: 25%; }
.confidence__fill--step-30 { width: 30%; }
.confidence__fill--step-35 { width: 35%; }
.confidence__fill--step-40 { width: 40%; }
.confidence__fill--step-45 { width: 45%; }
.confidence__fill--step-50 { width: 50%; }
.confidence__fill--step-55 { width: 55%; }
.confidence__fill--step-60 { width: 60%; }
.confidence__fill--step-65 { width: 65%; }
.confidence__fill--step-70 { width: 70%; }
.confidence__fill--step-75 { width: 75%; }
.confidence__fill--step-80 { width: 80%; }
.confidence__fill--step-85 { width: 85%; }
.confidence__fill--step-90 { width: 90%; }
.confidence__fill--step-95 { width: 95%; }
.confidence__fill--step-100 { width: 100%; }
.confidence__value {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
  min-width: 3.5ch;
  text-align: right;
}

/* ============================= KILL-SWITCH ============================ */
/* DESIGN.md §7 */
.kill-switch {
  gap: var(--sp-2);
}
.app-header__controls .kill-switch {
  background: rgba(255, 255, 255, 0.95);
  color: var(--crit);
  border: 1px solid #fff;
  font-weight: var(--fw-bold);
}
.app-header__controls .kill-switch[aria-pressed="true"] {
  background: var(--crit);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}
.kill-switch__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: currentColor;
}

/* ============================ PERMISSIONS ============================= */
.permission {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--n2-bd);
}

/* ============================= STATUTS =============================== */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.status--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.status--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.status--crit {
  background: var(--crit-bg);
  color: var(--crit);
}
.status--info {
  background: var(--info-bg);
  color: var(--info);
}

/* ======================= CARTE DE PROPOSITION ======================= */
.proposal {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.proposal__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.proposal__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  flex: 1 1 240px;
  min-width: 0;
}
.proposal__meta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.proposal__body {
  padding: var(--sp-5);
}

/* Bloc transparence */
.transparency {
  display: grid;
  gap: var(--sp-3);
}
.transparency__legend {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.transparency__item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-2) 0;
  border-bottom: 1px dashed var(--border);
}
.transparency__item:last-child {
  border-bottom: 0;
}
.transparency__term {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.transparency__desc {
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 640px) {
  .transparency__item {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }
  .activity__row {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
    align-items: start;
  }
  .activity__tags {
    justify-content: flex-start;
  }
}

/* ==================== VUE PROPOSITIONS (Partie C) ==================== */
/* Zone d'erreur réseau (réutilise le style cockpit-error) */
.prop-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.prop-error[hidden] {
  display: none;
}
.prop-error__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* Disposition : boîte de réception + détail */
.prop-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: var(--sp-5);
  align-items: start;
}

.section-label--inbox,
.section-label--detail {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-4);
}

/* --- Boîte de réception --- */
.prop-inbox__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.prop-inbox__empty {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding: var(--sp-3) 0;
}
.prop-inbox__empty[hidden] {
  display: none;
}

/* Carte de la boîte de réception (bouton pour sélection clavier/souris) */
.inbox-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  color: var(--text);
  font: inherit;
  transition: background 150ms ease, border-color 150ms ease,
    box-shadow 150ms ease, transform 80ms ease;
}
.inbox-card:hover {
  background: var(--surface-2);
}
.inbox-card:active {
  transform: translateY(1px);
}
.inbox-card:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}
.inbox-card[aria-current="true"] {
  border-left-color: var(--pg-rose);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--pg-rose);
  background: var(--surface-2);
}
.inbox-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.inbox-card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--text);
}
.inbox-card__capability {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.inbox-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.inbox-card__proposer {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.inbox-card__proposer strong {
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.inbox-card__confidence {
  min-width: 140px;
}

/* --- Panneau de détail --- */
.prop-detail {
  min-width: 0;
}
.prop-detail:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 4px;
}
.prop-detail__hint {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  padding: var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.prop-detail__hint[hidden] {
  display: none;
}
.prop-detail__panel[hidden] {
  display: none;
}
.prop-detail__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-3);
}
.prop-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  margin-bottom: var(--sp-4);
}
.prop-detail__capability {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}

/* --- Traceur de cycle --- */
.cycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.cycle__step {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cycle__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.cycle__step--done {
  color: var(--ok);
}
.cycle__step--done .cycle__num {
  background: var(--ok);
  color: var(--text-invert);
}
.cycle__step--current {
  color: var(--pg-violet);
  background: var(--surface);
  border-color: var(--pg-rose);
  box-shadow: inset 0 0 0 1px var(--pg-rose);
}
.cycle__step--current .cycle__num {
  background: var(--pg-rose);
  color: #fff;
}
.cycle__step--rejected {
  color: var(--crit);
}
.cycle__step--rejected .cycle__num {
  background: var(--crit);
  color: var(--text-invert);
}
.cycle__step--changes {
  color: var(--warn);
}
.cycle__step--changes .cycle__num {
  background: var(--warn);
  color: var(--text-invert);
}
.cycle__sep {
  color: var(--text-muted);
  flex: 0 0 auto;
}

/* --- Bandeau de statut courant --- */
.prop-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.prop-statusbar__label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

/* --- Zone révélée (Expliquer/Simuler/Prévisualiser) --- */
.prop-reveal {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-md);
  background: var(--info-bg);
}
.prop-reveal[hidden] {
  display: none;
}
.prop-reveal__kind {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--info);
  margin-bottom: var(--sp-2);
}
.prop-reveal__text {
  font-size: var(--fs-sm);
  color: var(--text);
}
.prop-reveal__noside {
  display: inline-block;
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--ok);
}

/* --- Résultat d'exécution --- */
.prop-result {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--ok);
  border-left: 4px solid var(--ok);
  border-radius: var(--r-md);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.prop-result[hidden] {
  display: none;
}

/* --- Badge de permission accordée (état consommé) --- */
.permission--granted {
  background: var(--n1-bg);
  color: var(--n1-fg);
  border-color: var(--n1-bd);
}
.permission--consumed {
  background: var(--surface-3);
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.prop-permission {
  margin-bottom: var(--sp-5);
}
.prop-permission[hidden] {
  display: none;
}

/* ============================== CHAMPS ============================== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.field__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.field__input {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field__input:focus-visible {
  outline: none;
  border-color: var(--pg-violet);
  box-shadow: var(--focus-ring);
}
.field__input[readonly] {
  background: var(--surface-2);
  color: var(--text-muted);
}
.field__input--code {
  font-family: var(--font-mono);
  letter-spacing: 0.4em;
  font-size: var(--fs-lg);
  max-width: 12ch;
}
.field__textarea {
  min-height: 88px;
  resize: vertical;
  line-height: var(--lh-base);
}
.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.field__error {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--crit);
}
.field__error[hidden] {
  display: none;
}

/* ============================ PLACEHOLDER ============================ */
.placeholder {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  padding: var(--sp-6);
  text-align: center;
  color: var(--text-muted);
}
.placeholder__badge {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
}
.placeholder__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-bottom: var(--sp-2);
}

/* ============================ ZONE LIVE ============================= */
.live-region {
  position: sticky;
  bottom: var(--sp-4);
  margin-top: var(--sp-6);
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.live-region:empty {
  display: none;
}

/* ===================== BOUTON D'AIDE FLOTTANT ===================== */
/* Lance la visite guidée de l'écran courant. Même geste/aspect que le « ? » du Marketing Hub. */
.help-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 190; /* au-dessus du contenu, sous les overlays (modale 200, tour) */
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--pg-gradient);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.help-fab:hover {
  transform: scale(1.06);
}
.help-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
/* Pendant la visite guidée, on masque le bouton pour ne pas gêner le surlignage. */
.tour-open .help-fab {
  display: none;
}

/* ===================== PANNEAU D'AIDE FLOTTANT ===================== */
/* Ouvert par le « ? ». Même format que le Marketing Hub : question + résumé/détail + visite guidée. */
.help-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 191;
  width: 370px;
  max-width: calc(100vw - 40px);
  max-height: 72vh;
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: var(--sp-5);
}
.help-panel[hidden] {
  display: none;
}
.tour-open .help-panel {
  display: none;
}
.help-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.help-panel__title {
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
}
.help-panel__x {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
}
.help-panel__q {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font: inherit;
  margin-bottom: var(--sp-4);
  background: var(--surface);
  color: var(--text);
}
.help-panel__lead {
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: var(--text);
}
.help-panel__points {
  margin: var(--sp-3) 0 0;
  padding-left: 18px;
}
.help-panel__points li {
  padding: 2px 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.help-panel__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}
.help-panel__note {
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ===== COMBIEN DE MOTEURS — un bouton qui annonce son prix ===== */
.ecip-engines {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}
.ecip-engines__btn {
  font-size: var(--fs-xs);
  white-space: nowrap;
}
/* Allumé = on dépense davantage. La teinte d'accent le signale sans avoir à relire le libellé. */
.ecip-engines__btn--on {
  border-color: var(--accent, #e91e8c);
  color: var(--accent, #e91e8c);
  font-weight: 600;
}
.ecip-engines__hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* --- La RÉPONSE posée dans le panneau : elle se distingue de la fiche de l'écran par un
   liseré, sinon on ne sait plus ce qui vient de l'assistant et ce qui décrit l'écran. --- */
.help-panel__answer {
  margin: var(--sp-3) 0 var(--sp-4);
  padding-left: var(--sp-3);
  border-left: 3px solid var(--accent, #e91e8c);
}
.help-panel__asked {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}
.help-panel__loading,
.help-panel__error {
  margin: 0;
  font-size: var(--fs-sm);
}
.help-panel__error {
  color: var(--danger, #c62828);
}
/* La réponse peut être longue : elle défile DANS le panneau plutôt que de le faire grandir
   hors de l'écran, ce qui rendrait les boutons du bas inatteignables. */
.help-panel__md {
  max-height: 46vh;
  overflow-y: auto;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.help-panel__engines {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
/* Réponse GRATUITE : liseré vert, pour la distinguer d'un coup d'œil d'une réponse payée. */
.help-panel__answer--free {
  border-left-color: var(--ok, #2e7d32);
}
.help-panel__free-tag {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--ok, #2e7d32);
  font-weight: 600;
}
.help-panel__escalate {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}
.help-panel__esc-btn {
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.help-panel__toconv {
  margin-top: var(--sp-3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #e91e8c);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.help-panel__toconv:hover {
  text-decoration: underline;
}

/* ===================== MODE POINTER & EXPLIQUER ===================== */
.inspect-open,
.inspect-open * {
  cursor: help !important;
}
.inspect-hover {
  outline: 2px solid var(--accent, #e91e8c) !important;
  outline-offset: 2px;
  border-radius: 6px;
}
.inspect-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 240;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: var(--shadow-2);
  font-size: var(--fs-sm);
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.inspect-pop {
  position: fixed;
  z-index: 241;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 12px 14px;
  /* Un détail très long ne doit jamais repousser les boutons hors de l'écran :
     la bulle défile à l'intérieur plutôt que de grandir sans fin. */
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.inspect-pop__role {
  font-weight: var(--fw-regular, 400);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.inspect-pop__text {
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  margin: 4px 0 0;
}
.inspect-pop__act {
  text-align: right;
  margin-top: 8px;
}

/* ============================== MODALE ============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(20, 10, 28, 0.6);
}
.modal-overlay[hidden] {
  display: none;
}
.modal {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  max-width: 480px;
  width: 100%;
  padding: var(--sp-5);
}
.modal__level {
  margin-bottom: var(--sp-3);
}
.modal__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.modal__body {
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}
.modal__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ============================= COCKPIT ============================= */
/* --- Badge Démo --- */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-2) var(--sp-3);
  border: 1px dashed var(--n2-bd);
  border-radius: var(--r-full);
  background: var(--warn-bg);
}
.demo-badge__tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--warn);
  color: var(--text-invert);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.demo-badge__hint {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--warn);
}

/* --- Points de statut (réutilisables) --- */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: var(--r-full);
  background: var(--text-muted);
}
.status-dot--ok {
  background: var(--ok);
}
.status-dot--warn {
  background: var(--warn);
}
.status-dot--crit {
  background: var(--crit);
}
.status-dot--info {
  background: var(--info);
}
/* Échelle d'alerte à 5 niveaux (§82.9) : low (faible) et high (élevée). */
.status-dot--low {
  background: var(--info);
}
.status-dot--high {
  background: var(--crit);
}

/* --- Bandeau honnête (état partiellement instrumenté) --- */
.honest-banner {
  margin-bottom: var(--sp-5);
}
.honest-banner[hidden] {
  display: none;
}
.honest-banner,
.honest-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.honest-banner__inner {
  width: 100%;
}
.honest-banner {
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.honest-banner__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}

/* --- Badge de provenance : « réel » (mesuré) vs « à venir » --- */
.src-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.src-badge--real {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok);
}
.src-badge--soon {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px dashed var(--n2-bd);
}

/* --- Bandeau d'alertes --- */
.alerts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.alerts:empty {
  display: none;
}
.alert {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background 150ms ease, transform 80ms ease;
}
a.alert:hover {
  background: var(--surface-2);
}
a.alert:active {
  transform: translateY(1px);
}
.alert--ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}
.alert--warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}
.alert--crit {
  border-left-color: var(--crit);
  background: var(--crit-bg);
}
.alert--info {
  border-left-color: var(--info);
  background: var(--info-bg);
}
/* low : faible criticité — le plus discret (arête bleue, sans remplissage). */
.alert--low {
  border-left-color: var(--info);
  background: var(--surface);
}
/* high : criticité élevée — remplissage ambré, arête rouge (entre warn et crit). */
.alert--high {
  border-left-color: var(--crit);
  background: var(--warn-bg);
}
.alert .alert__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: var(--r-full);
}
.alert__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* --- Zone d'erreur réseau --- */
.cockpit-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.cockpit-error[hidden] {
  display: none;
}
.cockpit-error__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* --- Grille de KPIs --- */
.kpi-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.kpi {
  --kpi-accent: var(--info);
  position: relative;
  border-left: 4px solid var(--kpi-accent);
  padding: var(--sp-4) var(--sp-5);
}
.kpi--ok {
  --kpi-accent: var(--ok);
}
.kpi--warn {
  --kpi-accent: var(--warn);
}
.kpi--crit {
  --kpi-accent: var(--crit);
}
.kpi--info {
  --kpi-accent: var(--info);
}
.kpi__dot {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--kpi-accent);
}
.kpi__value {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi__label {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.kpi__hint {
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* --- Activité récente (timeline) --- */
.activity {
  display: flex;
  flex-direction: column;
}
.activity__row {
  display: grid;
  grid-template-columns: 108px auto 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px dashed var(--border);
}
.activity__row:first-child {
  padding-top: 0;
}
.activity__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.activity__when {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.activity__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.activity__capability {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.activity__actor {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.activity__tags {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.activity__footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* --- Badges de décision --- */
.decision {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.decision--proposee {
  background: var(--info-bg);
  color: var(--info);
}
.decision--approuvee {
  background: var(--ok-bg);
  color: var(--ok);
}
.decision--executee {
  background: var(--ok);
  color: var(--text-invert);
}
.decision--revoquee {
  background: var(--surface-3);
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.decision--refusee {
  background: var(--crit-bg);
  color: var(--crit);
}
.decision--modifs {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--n2-bd);
}

/* --- Statut (badge avec point + libellé) --- */
.status--ok {
  background: transparent;
  color: var(--ok);
}
.status--warn {
  background: transparent;
  color: var(--warn);
}
.status--crit {
  background: transparent;
  color: var(--crit);
}
.status--info {
  background: transparent;
  color: var(--info);
}

/* --- Composants du cerveau --- */
.components-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.component {
  padding: var(--sp-4) var(--sp-5);
}
.component__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.component__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.component__detail {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* --- Système de design (repliable) --- */
.ds-details {
  margin-top: var(--sp-7);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  overflow: hidden;
}
.ds-details__summary {
  cursor: pointer;
  list-style: none;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
}
.ds-details__summary::-webkit-details-marker {
  display: none;
}
.ds-details__summary::before {
  content: "▸";
  color: var(--pg-violet);
  font-size: var(--fs-base);
}
.ds-details[open] .ds-details__summary::before {
  content: "▾";
}
.ds-details__summary:focus-visible {
  outline: var(--focus-outline);
  outline-offset: -2px;
}
.ds-details__body {
  padding: var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.ds-details__body .section-label:first-of-type {
  margin-top: 0;
}

/* --- Petit bouton (barre d'export) --- */
.btn--sm {
  min-height: 36px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-xs);
}

/* ==================== DÉCISIONS (compléments Partie D) ==================== */
/* Échouée : alerte, texte rayé pour signaler l'échec. */
.decision--echouee {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
/* Consultée : info discret (lecture seule, aucun effet). */
.decision--consultee {
  background: transparent;
  color: var(--info);
  border-color: var(--n0-bd);
}
/* Exécutée : emphase (déjà défini) — variante de mise en avant. */
.decision--executee {
  box-shadow: inset 0 0 0 1px var(--ok);
}

/* ===================== VUE JOURNAL D'AUDIT (Partie D) ==================== */
/* Mention « registre immuable » avec cadenas. */
.ledger-note {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.ledger-note__lock {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--pg-violet);
}

/* Zone d'erreur réseau (partagée avec le style cockpit-error). */
.audit-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.audit-error[hidden] {
  display: none;
}
.audit-error__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* Barre de filtres. */
.audit-filters {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.audit-filters__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-4);
}
.audit-filters__row {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.field--filter {
  margin-bottom: 0;
}
.field__select {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field__select:focus-visible {
  outline: none;
  border-color: var(--pg-violet);
  box-shadow: var(--focus-ring);
}

/* Compteur de résultats. */
.audit-count {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}

/* Timeline des entrées. */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-6);
  padding: 0;
}
.audit-entry {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.audit-entry--proposee { border-left-color: var(--info); }
.audit-entry--approuvee { border-left-color: var(--ok); }
.audit-entry--executee { border-left-color: var(--ok); }
.audit-entry--revoquee { border-left-color: var(--border-strong); }
.audit-entry--refusee { border-left-color: var(--crit); }
.audit-entry--echouee { border-left-color: var(--crit); }
.audit-entry--consultee { border-left-color: var(--n0-bd); }
.audit-entry__at {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.audit-entry__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}
.audit-entry__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.audit-entry__actor {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.audit-entry__capability {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
  line-height: var(--lh-tight);
}
.audit-entry__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.audit-entry__detail {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.audit-empty {
  padding: var(--sp-5);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

/* Export CSV (démo, sans téléchargement). */
.audit-export {
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.audit-export__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}
.audit-export__note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.audit-export__panel {
  margin-top: var(--sp-4);
}
.audit-export__panel[hidden] {
  display: none;
}
.audit-export__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.audit-export__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.audit-export__pre {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
  white-space: pre;
}
.audit-export__pre:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* ======================= VUE PERMISSIONS (Partie D) ===================== */
.perm-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.perm-error[hidden] {
  display: none;
}
.perm-error__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* Récapitulatif (actives / consommées / révoquées). */
.perm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
}
.perm-summary:empty {
  display: none;
}
.perm-summary__item {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.perm-summary__num {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.perm-summary__label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

/* Grille de cartes. */
.perm-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.perm-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.perm-card--active { border-left-color: var(--warn); }
.perm-card--consumed { border-left-color: var(--border-strong); }
.perm-card--revoked { border-left-color: var(--crit); }
.perm-card--expired { border-left-color: var(--border); }
.perm-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.perm-card__id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.perm-card__capability {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--text);
}
.perm-card__grants {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
  font-size: var(--fs-sm);
}
.perm-card__term {
  color: var(--text-muted);
}
.perm-card__val {
  margin: 0;
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.perm-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

/* Badge d'usage unique. */
.perm-single {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
  border: 1px solid transparent;
}

/* Badge de statut de permission. */
.perm-status {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.perm-status--active {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--n2-bd);
}
.perm-status--consumed {
  background: var(--surface-3);
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.perm-status--revoked {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit);
}
.perm-status--expired {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

/* Pastille de compte à rebours. */
.perm-countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  align-self: flex-start;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--n2-bd);
  font-weight: var(--fw-bold);
}
.perm-countdown__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.perm-countdown__time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
}
.perm-card__actions {
  margin-top: auto;
  padding-top: var(--sp-2);
}

/* ============================ RESPONSIVE =========================== */
@media (max-width: 860px) {
  .app-body {
    grid-template-columns: 1fr;
  }
  .app-nav {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    padding: var(--sp-3);
  }
  .app-nav__heading {
    display: none;
  }
  .app-nav__list {
    flex-direction: row;
  }
  .app-nav__link {
    white-space: nowrap;
  }
  .app-main {
    padding: var(--sp-4);
  }
  .prop-layout {
    grid-template-columns: 1fr;
  }
  .audit-entry {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

/* ======================================================================== */
/* ==================== VUE MODÈLES & COÛTS (Partie E) ==================== */
/* ======================================================================== */

.models-error,
.assist-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.models-error[hidden],
.assist-error[hidden] {
  display: none;
}
.models-error__text,
.assist-error__text {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.models-hint {
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ------- Barre générique (paliers de 5 %, sans style inline — CSP) ------ */
.bar {
  height: 10px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.bar--lg {
  height: 16px;
}
.bar__fill {
  display: block;
  height: 100%;
  background: var(--pg-gradient);
  border-radius: var(--r-full);
}
.bar__fill--ok {
  background: var(--ok);
}
.bar__fill--warn {
  background: var(--warn);
}
.bar__fill--crit {
  background: var(--crit);
}
.bar__fill--step-0 { width: 0%; }
.bar__fill--step-5 { width: 5%; }
.bar__fill--step-10 { width: 10%; }
.bar__fill--step-15 { width: 15%; }
.bar__fill--step-20 { width: 20%; }
.bar__fill--step-25 { width: 25%; }
.bar__fill--step-30 { width: 30%; }
.bar__fill--step-35 { width: 35%; }
.bar__fill--step-40 { width: 40%; }
.bar__fill--step-45 { width: 45%; }
.bar__fill--step-50 { width: 50%; }
.bar__fill--step-55 { width: 55%; }
.bar__fill--step-60 { width: 60%; }
.bar__fill--step-65 { width: 65%; }
.bar__fill--step-70 { width: 70%; }
.bar__fill--step-75 { width: 75%; }
.bar__fill--step-80 { width: 80%; }
.bar__fill--step-85 { width: 85%; }
.bar__fill--step-90 { width: 90%; }
.bar__fill--step-95 { width: 95%; }
.bar__fill--step-100 { width: 100%; }

/* --------------------- 1. Bandeau budget (FinOps) --------------------- */
.budget {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.budget--ok { border-left-color: var(--ok); }
.budget--warn { border-left-color: var(--warn); }
.budget--crit { border-left-color: var(--crit); }
.budget__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.budget__caption {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.budget__amounts {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-base);
  color: var(--text-muted);
}
.budget__spent {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.budget__sep {
  color: var(--text-muted);
}
.budget__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
}
.budget__pct {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  color: var(--text);
}
.budget__warn {
  color: var(--warn);
  font-weight: var(--fw-semibold);
}
.budget--crit .budget__warn {
  color: var(--crit);
}

/* --------------------------- 2. Totaux du jour ------------------------ */
.totals-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.total-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
}
.total-tile__value {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.total-tile__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}

/* ----------------- 3. Fournisseurs (Model Router) ------------------- */
.providers {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.provider {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.provider--ok { border-left-color: var(--ok); }
.provider--info { border-left-color: var(--info); }
.provider--warn { border-left-color: var(--warn); }
.provider__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.provider__ident {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.provider__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.provider__model {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.provider-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.provider-status--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.provider-status--info {
  background: var(--info-bg);
  color: var(--info);
}
.provider-status--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.provider__share {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.provider__share .bar {
  flex: 1;
  min-width: 120px;
}
.provider__sharepct {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  min-width: 3.5ch;
  text-align: right;
  color: var(--text);
}
.provider__prices {
  display: grid;
  gap: var(--sp-2) var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
}
.provider__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.provider__price-term {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.provider__price-val {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.provider__price--cost .provider__price-val {
  color: var(--pg-violet);
}
.provider__price-none {
  font-weight: var(--fw-medium);
  font-style: italic;
  color: var(--text-muted);
}

/* ------------------------ 4. Ordre de repli ------------------------ */
.fallback-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-2);
  padding: 0;
  counter-reset: fallback;
}
.fallback-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.fallback-chip + .fallback-chip::before {
  content: "→";
  margin-right: var(--sp-2);
  color: var(--text-muted);
  font-weight: var(--fw-bold);
}
.fallback-chip__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--pg-gradient);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

/* ----------------------- 5. Règles de routage --------------------- */
.routing-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.routing {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.routing__col {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.routing tbody tr + tr td {
  border-top: 1px dashed var(--border);
}
.routing__task,
.routing__provider {
  padding: var(--sp-3) var(--sp-4);
  vertical-align: middle;
}
.routing__task {
  color: var(--text);
  font-weight: var(--fw-medium);
}
.routing__provider-name {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
}

/* ======================================================================== */
/* ================== VUE ASSISTANTS & COFFRE (Partie E) ================== */
/* ======================================================================== */

/* ------------------------ 1. Carte « Coffre » --------------------- */
.vault {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--pg-gradient);
  color: #fff;
  box-shadow: var(--shadow-2);
}
.vault__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.18);
}
.vault__icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}
.vault__body {
  min-width: 0;
}
.vault__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}
.vault__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.94);
  max-width: 62ch;
  margin-bottom: var(--sp-4);
}
.vault__cta {
  background: #fff;
  color: var(--pg-violet);
  border-color: #fff;
  box-shadow: var(--shadow-1);
}
.vault__cta:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.92);
}
.vault__cta svg {
  width: 18px;
  height: 18px;
}
.vault__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

/* --------------------- 2. Roster d'assistants -------------------- */
.assist-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  margin: 0 0 var(--sp-5);
  padding: 0;
}
.assist-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 100%;
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.assist-card--on { border-left-color: var(--ok); }
.assist-card--off { border-left-color: var(--border-strong); }
.assist-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.assist-card__label {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.assist-card__model {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.assist-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.assist-card__manage {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--pg-violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.assist-card__manage:hover {
  color: var(--pg-rose);
}
.assist-card__actions {
  margin-top: auto;
  padding-top: var(--sp-2);
}

/* Badge de type (anthropic / openai / gemini). */
.kind {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.kind--anthropic {
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
}
.kind--openai {
  background: var(--ok-bg);
  color: var(--ok);
}
.kind--gemini {
  background: var(--info-bg);
  color: var(--info);
}
.kind--other {
  background: var(--surface-3);
  color: var(--text-muted);
  border-color: var(--border-strong);
}

/* Badge d'état (Activé / Désactivé). */
.assist-state {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.assist-state--on {
  background: var(--ok-bg);
  color: var(--ok);
}
.assist-state--off {
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

/* Badge de clé (présente / manquante). */
.key-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.key-badge__icon {
  font-weight: var(--fw-bold);
}
.key-badge--present {
  background: var(--ok-bg);
  color: var(--ok);
}
.key-badge--missing {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--n2-bd);
}

/* ----------------- Bandeau de statut du coffre ------------------- */
.assist-status-host {
  margin: 0 0 var(--sp-5);
}
.assist-status-host:empty {
  margin: 0;
}
.assist-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.assist-status--ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}
.assist-status--warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}
.assist-status--crit {
  border-left-color: var(--crit);
  background: var(--crit-bg);
}
.assist-status__help {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
}
a.assist-status__help {
  color: var(--pg-violet);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.assist-status__help:hover {
  color: var(--pg-rose);
}

/* --------------------- État vide du roster ----------------------- */
.assist-empty {
  margin: 0 0 var(--sp-5);
}
.assist-empty[hidden] {
  display: none;
}
.assist-empty__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.assist-empty__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  max-width: 62ch;
}
.assist-empty__cta svg {
  width: 18px;
  height: 18px;
}

/* --------------------------- 3. Rappel --------------------------- */
.assist-reminder {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.assist-reminder__lock {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--pg-violet);
}

/* ============================================================================
   PARTIE F — Agents IA · Mémoire · Connaissances · Registres
   ========================================================================== */

/* --- Boîte d'erreur générique (Partie F) --- */
.agents-error,
.memory-error,
.knowledge-error,
.registries-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.agents-error[hidden],
.memory-error[hidden],
.knowledge-error[hidden],
.registries-error[hidden] {
  display: none;
}
.error-box__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

/* ============================ AGENTS IA ============================= */
/* Bandeau hiérarchie : CEO humain → CEI → 18 agents. */
.hierarchy-wrap {
  margin-bottom: var(--sp-4);
}
.hierarchy {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.hierarchy__node {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1 1 200px;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.hierarchy__node--ceo {
  border-left: 4px solid var(--pg-rose);
}
.hierarchy__node--orch {
  border-left: 4px solid var(--pg-orange);
}
.hierarchy__node--agents {
  border-left: 4px solid var(--pg-violet);
}
.hierarchy__tag {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hierarchy__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.hierarchy__sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.hierarchy__sep {
  display: flex;
  align-items: center;
  align-self: center;
  font-size: var(--fs-xl);
  color: var(--text-muted);
}

/* Note « les agents n'exécutent JAMAIS ». */
.agents-note {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--n3-bd);
  border-left: 4px solid var(--pg-rose);
  border-radius: var(--r-md);
  background: var(--n3-bg);
  color: var(--n3-fg);
}
.agents-note__icon {
  display: inline-flex;
  flex: 0 0 auto;
}
.agents-note__icon svg {
  width: 22px;
  height: 22px;
}
.agents-note__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-base);
}

/* Grille des 18 agents. */
.agents-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.agent-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.agent-card--fafic {
  border-color: var(--pg-violet);
  box-shadow: var(--shadow-1), inset 3px 0 0 var(--pg-violet);
}
.agent-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.agent-card__code {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.agent-card__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.agent-card__domain {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.agent-card__tag {
  align-self: flex-start;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.agent-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.agent-status--active {
  background: var(--ok-bg);
  color: var(--ok);
}
.agent-status--idle {
  background: var(--surface-3);
  color: var(--text-muted);
}
.agent-status--paused {
  background: var(--warn-bg);
  color: var(--warn);
}
.agent-card__stats {
  display: flex;
  gap: var(--sp-4);
  margin: var(--sp-1) 0 0;
}
.agent-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agent-stat__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.agent-stat__value {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.agent-card__confidence {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: auto;
}
.agent-card__conf-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ============================= MÉMOIRE ============================== */
.mem-encrypted {
  margin-bottom: var(--sp-4);
}
.mem-encrypted:empty {
  display: none;
}
.mem-lock {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.mem-lock__icon {
  display: inline-flex;
}
.mem-lock__icon svg {
  width: 18px;
  height: 18px;
}
.mem-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.mem-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.mem-card__label {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.mem-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  flex: 1;
}
.mem-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
/* Panneau des entrées épisodiques récentes (repliable) — sous la carte Épisodique. */
.mem-card__entries-wrap { margin-top: var(--sp-3); }
.mem-card__toggle { width: 100%; }
.mem-card__entries { margin-top: var(--sp-2); }
.mem-entries__types { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: var(--sp-2); }
.mem-entries__types-label { font-size: 11px; font-weight: 700; opacity: .55; text-transform: uppercase; letter-spacing: .03em; margin-right: 2px; }
.mem-entries__type { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(127,127,127,.12); white-space: nowrap; }
.mem-entries__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mem-entry { display: flex; flex-direction: column; gap: 1px; padding: 5px 0; border-top: 1px solid rgba(127,127,127,.1); }
.mem-entry:first-child { border-top: 0; }
.mem-entry__name { font-weight: 600; font-size: 12px; overflow-wrap: anywhere; }
.mem-entry__meta { font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mem-entry__link { color: var(--accent, #6b8afd); text-decoration: none; }
.mem-entry__link:hover { text-decoration: underline; }
.mem-entry__link::after { content: " ↗"; opacity: .6; font-size: .85em; }
.mem-entries__none { font-size: 12px; opacity: .6; margin: 4px 0 0; }
.mem-entries__more { font-size: 11px; opacity: .5; margin: 6px 0 0; font-style: italic; }
.mem-card__count {
  display: flex;
  flex-direction: column;
}
.mem-card__num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.mem-card__unit {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.mem-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}
.mem-card__updated {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: right;
}
/* Type « à venir » : carte atténuée, mais badge et texte restent lisibles. */
.mem-card--soon {
  opacity: 0.72;
  border-style: dashed;
}
.mem-card--soon .src-badge--soon {
  opacity: 1;
}
.mem-search {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.mem-search__field,
.kb-search__field {
  flex: 1 1 260px;
  margin-bottom: 0;
}
.mem-search__btn,
.kb-search__btn {
  flex: 0 0 auto;
}
.mem-search__result {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--info);
}
.mem-search__result:empty {
  display: none;
}

/* ========================== CONNAISSANCES =========================== */
.kb-banner {
  margin-bottom: var(--sp-5);
}
.kb-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pg-violet);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.kb-banner__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.kb-reindex {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--n2-bd);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.kb-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  margin: 0;
  padding: 0;
}
.kb-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.kb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.kb-card__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.kb-version {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--info-bg);
  color: var(--info);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.kb-card__docs {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kb-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.kb-card__updated {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.kb-card--soon {
  opacity: 0.72;
  border-style: dashed;
}
/* Encart « recherche sémantique à venir » : désactivé, non fonctionnel. */
.kb-search-slot[hidden] {
  display: none;
}
.kb-soon {
  padding: var(--sp-5) var(--sp-5);
  border: 1px dashed var(--n2-bd);
  border-radius: var(--r-md);
  background: var(--surface-2);
  opacity: 0.85;
}
.kb-soon__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.kb-soon__desc {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.kb-results {
  margin-top: var(--sp-4);
}
.kb-results:empty {
  display: none;
}
.kb-results__note {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kb-results__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.kb-result {
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pg-orange);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.kb-result__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.kb-result__snippet {
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.kb-result__source {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ============================= REGISTRES ============================ */
.registries {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.registry {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.registry__title {
  margin-top: 0;
}
.registry__desc {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.registry__count {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.registry__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.reg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.reg-item__main {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.reg-item__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.reg-item__meta {
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
.registry__empty {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* -------------------- Responsive Partie E -------------------- */
@media (max-width: 640px) {
  .vault {
    flex-direction: column;
    gap: var(--sp-3);
  }
  .provider__prices {
    grid-template-columns: 1fr 1fr;
  }
  .hierarchy {
    flex-direction: column;
  }
  .hierarchy__sep {
    transform: rotate(90deg);
    align-self: center;
  }
  .mem-search__btn,
  .kb-search__btn {
    width: 100%;
  }
}

/* ============================================================================
   PARTIE G — Gouvernance · Paramètres
   ========================================================================== */

/* --- Boîte d'erreur (Gouvernance) --- */
.gov-error {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--crit);
  border-radius: var(--r-md);
  background: var(--crit-bg);
  color: var(--crit);
}
.gov-error[hidden] {
  display: none;
}

/* ---------------- 1. Contrôle kill-switch pleine largeur --------------- */
.gov-kill {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-6);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.gov-kill--armed {
  border-color: var(--n1-bd);
  background: var(--ok-bg);
}
.gov-kill--disarmed {
  border-color: var(--crit);
  background: var(--crit-bg);
}
.gov-kill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
}
.gov-kill--armed .gov-kill__icon {
  color: var(--ok);
}
.gov-kill--disarmed .gov-kill__icon {
  color: var(--crit);
}
.gov-kill__icon svg {
  width: 30px;
  height: 30px;
}
.gov-kill__body {
  flex: 1 1 260px;
  min-width: 0;
}
.gov-kill__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.gov-kill--armed .gov-kill__title {
  color: var(--ok);
}
.gov-kill--disarmed .gov-kill__title {
  color: var(--crit);
}
.gov-kill__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin-top: 2px;
}
.gov-kill__scope {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
}
.gov-kill__btn {
  flex: 0 0 auto;
}

/* --------------------- 2. Niveau d'autonomie -------------------------- */
.gov-autonomy__level {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--pg-violet);
}
.gov-autonomy__note {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border-left: 3px solid var(--pg-violet);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface-2);
}
.gov-autonomy__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  margin-bottom: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--origin-ai-bg);
  color: var(--origin-ai-fg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gov-autonomy__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: var(--lh-base);
}

/* --------------------- 3. Politiques appliquées ---------------------- */
.gov-policies {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gov-policy {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.gov-policy__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--ok-bg);
  color: var(--ok);
}
.gov-policy__mark svg {
  width: 18px;
  height: 18px;
}
.gov-policy__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.gov-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.gov-badge--ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--n1-bd);
}

/* --------------------------- 4. Conformité --------------------------- */
.gov-compliance {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.gov-compliance-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.gov-compliance-card__label {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.gov-compliance-card__note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}

/* ============================ PARAMÈTRES ============================= */
.setting-card {
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.setting-card__head {
  margin-bottom: var(--sp-4);
}
.setting-card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.setting-card__hint {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.setting-card__body {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: var(--lh-base);
}

/* --- Groupes de bascules (thème / langue) --- */
.toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
}

/* --- Carte sécurité / coffre --- */
.setting-vault {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.setting-vault__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--origin-ai-bg);
  color: var(--pg-violet);
}
.setting-vault__icon svg {
  width: 26px;
  height: 26px;
}
.setting-vault__body {
  min-width: 0;
}
.setting-vault__text {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: var(--lh-base);
  max-width: 60ch;
}
.setting-vault__master {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-3) 0 var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.setting-vault__masterIcon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--pg-violet);
}
.setting-vault__cta svg {
  width: 16px;
  height: 16px;
}

/* --- Notifications (bascules démo) --- */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.notif-toggle {
  width: 100%;
  justify-content: flex-start;
}
.notif-toggle__dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: var(--r-full);
  background: var(--border-strong);
}
.notif-toggle[aria-pressed="true"] .notif-toggle__dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* --- À propos --- */
.about__version {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.about__principle {
  margin-top: var(--sp-2);
  padding: var(--sp-4);
  border-left: 3px solid var(--pg-rose);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  font-style: italic;
  color: var(--text);
  line-height: var(--lh-base);
}
.about__subtitle {
  margin: var(--sp-5) 0 var(--sp-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.about__parts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.about__part {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text);
}
.about__partCode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--pg-gradient);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.about__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.about__chip {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}

/* ============ LOT P1 — Voir avant d'approuver ============ */
/* --- Aperçu « Avant → Après » --- */
.prop-diff {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
}
.prop-diff__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}
.prop-diff__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.prop-diff__table th,
.prop-diff__table td {
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prop-diff__table thead th {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: var(--fw-semibold);
}
.prop-diff__field {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.prop-diff__before {
  color: var(--text-muted);
  text-decoration: line-through;
}
.prop-diff__after {
  color: var(--ok);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.prop-diff__arrow {
  color: var(--ok);
}

/* --- Impacts attendus --- */
.prop-impacts {
  margin-top: var(--sp-4);
}
.prop-impacts__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.prop-impacts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.prop-impacts__item {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--fs-sm);
}
.prop-impacts__label {
  color: var(--text-muted);
}
.prop-impacts__value {
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* --- Rapport d'exécution --- */
.exec-report {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border-left: 4px solid var(--ok);
}
.exec-report--failed {
  border-left-color: var(--crit);
}
.exec-report__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}
.exec-report__grid {
  margin: 0 0 var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.exec-report__row {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
}
.exec-report__label {
  min-width: 9rem;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.exec-report__value {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text);
}
.exec-report__status {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.exec-report__status--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.exec-report__status--err {
  background: var(--crit-bg);
  color: var(--crit);
}
.exec-report__targets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.exec-report__target {
  display: inline-block;
  padding: 2px var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.exec-report__subtitle {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.exec-report__steps {
  margin: 0 0 var(--sp-3);
  padding-left: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text);
}
.exec-report__note {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ok);
}
.exec-report__note--err {
  color: var(--crit);
}

/* --- Compteur de propositions cliquable (carte agent) --- */
.agent-stat__link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--info);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.agent-stat__link:hover,
.agent-stat__link:focus-visible {
  color: var(--text);
}

/* --- Bouton « Faire tourner » par carte agent --- */
.agent-card__run {
  margin-top: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.agent-card__run-btn {
  width: 100%;
}
.agent-card__run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.agent-card__run-status {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  min-height: 1em;
}

/* --- Bandeau de filtre par agent (propositions) --- */
.prop-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-sm);
  background: var(--info-bg);
}
.prop-filter__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.prop-filter__clear {
  padding: 2px var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text);
  cursor: pointer;
}
.prop-filter__clear:hover,
.prop-filter__clear:focus-visible {
  background: var(--surface-2);
}

/* ==================== MOUVEMENT RÉDUIT ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    scroll-behavior: auto;
  }
}

/* ====================================================================== */
/* Lot P2 — Qualité, tendance FinOps, briefing CEI/FAFIC, score Guardian  */
/* Additif : réutilise .card, .bar, tokens ; aucun style inline (CSP).    */
/* ====================================================================== */

/* --- Composant de score partagé (Qualité + Architecture Guardian) --- */
.score-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.score-grid--single {
  grid-template-columns: 1fr;
}
.score-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.score-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.score-card__label {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.score-card__num {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.score-card__num--ok {
  color: var(--ok);
}
.score-card__num--warn {
  color: var(--warn);
}
.score-card__num--crit {
  color: var(--crit);
}
.score-gauge {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.score-gauge .bar {
  flex: 1;
  height: 12px;
}
.score-card__subt {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: var(--sp-2);
}
.score-card__list {
  list-style: disc;
  padding-left: var(--sp-5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text);
}

/* --- Portes de qualité --- */
.quality-gates {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.gate {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.gate .status-dot {
  flex-shrink: 0;
}
.gate__label {
  flex: 1;
  font-weight: var(--fw-medium);
  color: var(--text);
}
.gate__status {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
}
.gate__status--ok {
  color: var(--ok);
  background: var(--ok-bg);
}
.gate__status--warn {
  color: var(--warn);
  background: var(--warn-bg);
}
.gate__status--crit {
  color: var(--crit);
  background: var(--crit-bg);
}

/* --- Tendance du coût (barres SVG faites main) --- */
.trend {
  padding: var(--sp-4) var(--sp-5);
}
.trend__svg {
  display: block;
  width: 100%;
  height: auto;
}
.trend__bar {
  fill: var(--pg-violet);
  opacity: 0.55;
}
.trend__bar--last {
  fill: var(--pg-rose);
  opacity: 1;
}
.trend__label {
  fill: var(--text-muted);
  font-size: 7px;
  font-family: inherit;
}

/* --- Budget & seuil configurable --- */
.budgetcfg {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.budgetcfg__grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.budgetcfg__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.budgetcfg__item-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.budgetcfg__item-value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.budgetcfg__note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.budgetcfg__btn {
  align-self: flex-start;
}

/* --- Briefing exécutif CEI --- */
.briefing {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.briefing__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.briefing__stat {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.briefing__num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.briefing__num-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.briefing__subt {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: var(--sp-2);
}
.briefing__levels {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.briefing__level {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.briefing__level-count {
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.briefing__reco {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.briefing__reco-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.briefing__reco-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.briefing__reco-title {
  font-weight: var(--fw-medium);
  color: var(--text);
}
.briefing__reco-proposer {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.briefing__reco-conf {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
}
.briefing__risks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.briefing__risk {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.briefing__risk-text {
  font-size: var(--fs-sm);
  color: var(--text);
}
.briefing__empty {
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* --- FAFIC — centre analytique --- */
.fafic {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.fafic__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.fafic__badge {
  margin: 0;
}
.fafic__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.fafic__scenario {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.fafic__scenario-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.fafic__scenario-name {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.fafic__scenario-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.fafic__cost-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-top: var(--sp-2);
}
.fafic__cost-soon {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ====================================================================== */
/* Lot P3 — Accessibilité & assistance                                    */
/* Additif : réutilise .btn, tokens ; aucun style inline (CSP).           */
/* Le mouvement réduit est déjà neutralisé par le bloc prefers-reduced-   */
/* motion plus haut (transitions * → ~0ms).                               */
/* ====================================================================== */

/* --- Barre d'assistance par écran (Lecture vocale + Aide) --- */
.view-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.view-tools svg {
  width: 18px;
  height: 18px;
}
.view-tools__playback {
  display: inline-flex;
  gap: var(--sp-2);
}
.view-tools__playback[hidden] {
  display: none;
}

/* --- Sous-groupe de réglage (taille du texte) --- */
.setting-subgroup {
  margin-top: var(--sp-5);
}
.setting-card__sublabel {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-1);
}
.setting-subgroup .setting-card__hint {
  margin-bottom: var(--sp-3);
}

/* --- Détail de l'explication (Court / Détaillé, P3.4) --- */
.prop-reveal__length {
  margin-bottom: var(--sp-3);
}

/* --- Tiroir d'aide contextuelle (P3.2) --- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  justify-content: flex-end;
  background: rgba(20, 10, 28, 0.6);
}
.drawer-overlay[hidden] {
  display: none;
}
.drawer {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  max-width: 100%;
  height: 100%;
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  padding: var(--sp-5);
  overflow-y: auto;
}
.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.drawer__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.drawer__close {
  flex: 0 0 auto;
}
.drawer__body {
  display: flex;
  flex-direction: column;
}
.drawer__lead {
  font-size: var(--fs-base);
  color: var(--text);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-4);
}
.drawer__points {
  list-style: disc;
  padding-left: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
}
.drawer__points li {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}

/* --- Visite guidée première visite (P3.6) --- */
/* Surbrillance par CLASSE sur la cible (anneau), aucune coordonnée inline. */
.tour-highlight {
  position: relative;
  z-index: 205;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 3px var(--pg-rose), 0 0 0 8px rgba(233, 30, 140, 0.28);
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--sp-5);
}
.tour-overlay[hidden] {
  display: none;
}
.tour-bubble {
  width: min(440px, 100%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: var(--sp-5);
}
.tour-bubble__step {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pg-rose);
  margin-bottom: var(--sp-2);
}
.tour-bubble__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}
.tour-bubble__body {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-5);
}
.tour-bubble__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* Explication approfondie de la partie surlignée, dépliée par « En détail ». */
.tour-bubble__detail {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: var(--lh-base);
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface-2, rgba(127, 127, 127, 0.08));
  border-radius: var(--radius-md, 10px);
  border-left: 3px solid var(--accent, #e91e8c);
}
.tour-bubble__detail[hidden] {
  display: none;
}
/* Bouton « En détail » discret (poussé à gauche des actions). */
.tour-bubble__detail-btn {
  margin-right: auto;
  background: transparent;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.3));
  color: var(--text);
}
/* « Précédent » désactivé à la première étape. */
.tour-bubble__prev:disabled {
  opacity: 0.45;
  cursor: default;
}
/* Lien « Ouvrir le panneau d'aide » dans le détail de la visite guidée. */
.tour-bubble__help-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent, #e91e8c);
  text-decoration: underline;
  cursor: pointer;
}

/* ====================================================================== */
/* Lot P4 — composants avancés (lecture seule) + RBAC + sessions          */
/* Additif, thémé (clair/sombre), aucun style inline. Réutilise les       */
/* tokens de couleur, d'espacement et de rayon existants.                 */
/* ====================================================================== */

/* --- Badge de session dans l'en-tête (Session unique) --- */
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.session-badge__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: var(--r-full);
  background: var(--ok);
}
@media (max-width: 640px) {
  .session-badge {
    display: none;
  }
}

/* --- Workflows (Lot P4.4) --- */
.wf-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.wf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.wf-item__main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.wf-item__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.wf-item__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.wf-item__sep {
  opacity: 0.5;
}
.wf-item__ver {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
}
.wf-status,
.rm-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.wf-status--ok,
.rm-status--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.wf-status--warn,
.rm-status--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.wf-status--info,
.rm-status--info {
  background: var(--info-bg);
  color: var(--info);
}

/* --- Évolution / roadmap (Lot P4.5) --- */
.roadmap-list {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.rm-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.rm-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.rm-card__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.rm-card__score {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.rm-card__metrics {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.rm-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rm-metric__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rm-metric__val {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rm-status {
  align-self: flex-start;
}

/* --- Apprentissage continu (Lot P4.1) --- */
.gov-learning__note {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-4);
}
.gov-learning__noteText {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.gov-learning__lessonsTitle {
  margin: var(--sp-5) 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.gov-learning__lessons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.gov-learning__lesson {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text);
}
.gov-learning__lesson svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--info);
}

/* --- Matrice RBAC (Lot P4.6) --- */
.rbac-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.rbac-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.rbac-matrix th,
.rbac-matrix td {
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.rbac-matrix thead th {
  background: var(--surface-2);
}
.rbac-matrix__corner,
.rbac-matrix__roleName {
  text-align: left;
}
.rbac-matrix__roleName {
  font-weight: var(--fw-semibold);
  color: var(--text);
  white-space: nowrap;
}
.rbac-matrix__lvl {
  display: table-cell;
}
.rbac-matrix__lvlName {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.rbac-matrix tbody tr:last-child th,
.rbac-matrix tbody tr:last-child td {
  border-bottom: none;
}
.rbac-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
}
.rbac-mark svg {
  width: 15px;
  height: 15px;
}
.rbac-mark--yes {
  background: var(--ok-bg);
  color: var(--ok);
}
.rbac-mark--no {
  background: var(--surface-3);
  color: var(--text-muted);
}

/* --- Gouvernance de la mémoire (Lot P4.3) --- */
.mem-gov {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  align-items: baseline;
  margin: var(--sp-2) 0 0;
  padding: var(--sp-3) 0 0;
  border-top: 1px dashed var(--border);
}
.mem-gov__row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin: 0;
}
.mem-gov__term {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mem-gov__val {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.mem-gov__tag {
  flex-basis: 100%;
  font-size: var(--fs-xs);
  font-style: italic;
  color: var(--text-muted);
}

/* --- Centre de validation des connaissances (Lot P4.2) --- */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.kv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.kv-item__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.kv-item__tags {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.kv-tag {
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.kv-tag--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.kv-tag--info {
  background: var(--info-bg);
  color: var(--info);
}
.kv-tag--crit {
  background: var(--crit-bg);
  color: var(--crit);
}
.kv-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}

/* --- Sessions actives (Lot P4.7) --- */
.session-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
}
.session-item {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.session-item--current {
  border-color: var(--ok);
}
.session-item__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.session-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.session-item__device {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.session-item__illus {
  display: inline-flex;
}
.session-item__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ====================================================================== */
/* Mode conversationnel multimodal — « Demander à l'AI OS »               */
/* Additif : réutilise .card, .btn, les tokens ; aucun style inline (CSP). */
/* ====================================================================== */
.ask {
  margin-top: var(--sp-5);
}
.ask__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
}
.ask__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.ask__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.ask__label {
  flex: 1 0 100%;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}
.ask__input {
  flex: 1 1 260px;
  min-width: 0;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}
.ask__input:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}
.ask__answer {
  margin-top: var(--sp-3);
}
.ask__answer:empty {
  margin-top: 0;
}
.ask__answer-text {
  color: var(--text);
  line-height: 1.5;
}
.ask__source {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.ask__listen {
  margin-top: var(--sp-3);
}
.ask__loading,
.ask__hint {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.ask__hint--err {
  color: var(--warn);
}

/* Surlignage temporaire du bloc visé par une réponse conversationnelle.
   L'outline + le fond restent visibles même sans animation (mouvement réduit). */
.transparency__item.is-highlighted,
.prop-reveal.is-highlighted {
  outline: 2px solid var(--info);
  outline-offset: 2px;
  border-radius: var(--r-md);
  background: var(--info-bg);
  animation: ask-facet-flash 2.6s ease;
}
@keyframes ask-facet-flash {
  0% {
    background: var(--info-bg);
  }
  70% {
    background: var(--info-bg);
  }
  100% {
    background: transparent;
  }
}

/* ====================================================================== */
/* Communication multimodale — mode VISUEL (SVG fait main, zéro dépendance) */
/* Dérivé des vraies données ; un visuel ne décide rien (voir .viz__legend). */
/* ====================================================================== */
.viz-wrap {
  margin-top: var(--sp-4);
}
.viz-toggle {
  margin-bottom: var(--sp-3);
}
.viz {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.viz__block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.viz__block-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.viz__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
  font-family: inherit;
}
.viz__legend {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: var(--sp-2);
}

/* A) Organigramme du cycle de décision */
.viz-cycle__box {
  fill: var(--surface-2);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.viz-cycle__label {
  fill: var(--text-muted);
  font-size: 9px;
  font-weight: var(--fw-medium);
  text-anchor: middle;
  dominant-baseline: middle;
}
.viz-cycle__arrow {
  fill: var(--text-muted);
  font-size: 13px;
  text-anchor: middle;
}
.viz-cycle__node--current .viz-cycle__box {
  fill: var(--n2-bg);
  stroke: var(--pg-violet);
  stroke-width: 2;
}
.viz-cycle__node--current .viz-cycle__label {
  fill: var(--text);
  font-weight: var(--fw-semibold);
}
.viz-cycle__node--done .viz-cycle__box {
  fill: var(--ok-bg);
  stroke: var(--ok);
}
.viz-cycle__node--done .viz-cycle__label {
  fill: var(--ok);
}
.viz-cycle__node--rejected .viz-cycle__box {
  fill: var(--crit-bg);
  stroke: var(--crit);
}
.viz-cycle__node--rejected .viz-cycle__label {
  fill: var(--crit);
  font-weight: var(--fw-semibold);
}
.viz-cycle__node--changes .viz-cycle__box {
  fill: var(--warn-bg);
  stroke: var(--warn);
}
.viz-cycle__node--changes .viz-cycle__label {
  fill: var(--warn);
}

/* B) Jauge de confiance (arc) */
.viz-gauge__svg {
  max-width: 160px;
  margin: 0 auto;
}
.viz-gauge__track {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 10;
  stroke-linecap: round;
}
.viz-gauge__fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.viz-gauge__fill--high {
  stroke: var(--ok);
}
.viz-gauge__fill--moderate {
  stroke: var(--warn);
}
.viz-gauge__fill--low {
  stroke: var(--crit);
}
.viz-gauge__value {
  fill: var(--text);
  font-size: 15px;
  font-weight: var(--fw-bold);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* C) Avant → Après */
.viz-diff__field {
  fill: var(--text-muted);
  font-size: 9px;
  font-weight: var(--fw-medium);
}
.viz-diff__box--before {
  fill: var(--surface-2);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.viz-diff__box--after {
  fill: var(--ok-bg);
  stroke: var(--ok);
  stroke-width: 1;
}
.viz-diff__text {
  fill: var(--text);
  font-size: 9px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.viz-diff__arrow {
  fill: var(--text-muted);
  font-size: 13px;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* D) Impacts (pastilles) */
.viz-impacts__pill {
  fill: var(--surface-2);
  stroke: var(--border);
  stroke-width: 1;
}
.viz-impacts__label {
  fill: var(--text-muted);
  font-size: 10px;
  text-anchor: start;
  dominant-baseline: middle;
}
.viz-impacts__value {
  fill: var(--text);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  text-anchor: end;
  dominant-baseline: middle;
}

/* ===================================================================== */
/* Système 1 — Sélecteur de profil (en-tête)                             */
/* ===================================================================== */
.role-select {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.role-select__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.role-select__field {
  font: inherit;
  font-size: var(--fs-sm);
  padding: 6px 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--pg-violet);
  border: 1px solid #fff;
  cursor: pointer;
}
.role-select__field:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* --- Badge & note de profil dans le tiroir d'aide (S1) --- */
.drawer__profile-badge {
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--pg-violet);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full, 999px);
  padding: 4px 12px;
  margin-bottom: var(--sp-3);
}
.drawer__profile-note {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--pg-rose);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.drawer__profile-note-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pg-rose);
  margin-bottom: 4px;
}
.drawer__profile-note-body {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: var(--lh-base);
}

/* ===================================================================== */
/* Systèmes S2/S3 — Écran « Expérience » (Labo UX + thèmes)              */
/* ===================================================================== */
.section-hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
  margin: 0 0 var(--sp-4);
}
.experience-rule {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  line-height: var(--lh-base);
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--pg-rose);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin: 0 0 var(--sp-5);
}
.experience-signals,
.experience-variants,
.experience-themes {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
}
.exp-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.exp-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.exp-card__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.exp-tone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 3px 10px;
  border-radius: var(--r-full, 999px);
  white-space: nowrap;
}
.exp-tone--info {
  color: var(--info);
  background: var(--info-bg);
}
.exp-tone--warn {
  color: var(--warn);
  background: var(--warn-bg);
}
.exp-tone--high {
  color: var(--crit);
  background: var(--crit-bg);
}
.exp-signal__observation {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.exp-signal__fields {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.exp-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.exp-field__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: var(--fw-semibold);
}
.exp-field__value {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: var(--lh-base);
}
.exp-variant__desc,
.exp-theme__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.exp-variant__group {
  margin: 0;
}
.exp-card__btn {
  align-self: flex-start;
}
.exp-principle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-base);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
  margin: 0;
}
.exp-principle__main {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.exp-principle__truth {
  font-style: italic;
}

/* ====================================================================== */
/* Communication multimodale — PRÉSENTATION ANIMÉE NARRÉE (couche média). */
/* Diapositives dérivées des vraies données ; une présentation ne décide   */
/* RIEN (voir .pres__legend). Additif ; réutilise .card, .btn, tokens.     */
/* La transition entre diapos est neutralisée par le bloc global           */
/* prefers-reduced-motion (aucune auto-avance animée agressive).           */
/* ====================================================================== */
.pres-wrap {
  margin-top: var(--sp-4);
}
.pres-toggle {
  margin-bottom: var(--sp-3);
}
.pres {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.pres__stage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 180px;
}
.pres__stage > * {
  animation: presFadeIn 240ms ease both;
}
@keyframes presFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pres__slide-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin: 0;
}
.pres__viz {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
}
.pres__lines {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.pres__line {
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  margin: 0;
}
.pres__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.pres__btn {
  min-width: 44px;
  min-height: 44px;
}
.pres__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pres__export {
  margin-left: auto;
}
.pres__progress {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.pres__bar {
  width: 100%;
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.pres__bar-fill {
  height: 100%;
  width: 0;
  background: var(--pg-gradient);
  border-radius: var(--r-full);
  transition: width 240ms ease;
}
.pres__count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: 0;
}
.pres__legend {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: var(--sp-2);
  margin: 0;
}

/* ============================= NOUVEAUTÉS ============================= */
/* Badge « données réelles » (pas une démo) — contraste OK en clair/sombre. */
.real-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--ok);
  border-radius: var(--r-full);
  background: var(--ok-bg);
}
.real-badge__tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--ok);
}
.novelty-rule {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-2) var(--sp-3);
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.novelty-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.novelty-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.novelty-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.novelty-card__title {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.novelty-card__badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--ok);
  white-space: nowrap;
}
.novelty-card__message {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-sm);
}
.novelty-card__meta,
.novelty-card__actor {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.novelty-card__actions {
  margin-top: auto;
}
.novelty-card__status {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.novelty-empty {
  margin: 0;
  padding: var(--sp-5);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  text-align: center;
}

/* ====================================================================== */
/* PORTE CONVERSATIONNELLE (ECIP) — additif, tokens existants, CSP stricte */
/* ====================================================================== */
.conversation-composer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.conversation__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.conversation__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: stretch;
}
.conversation__input {
  flex: 1 1 260px;
  min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.conversation__input:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.conversation__mic svg {
  width: 1.1em;
  height: 1.1em;
}
.conversation__mic[aria-pressed="true"] {
  background: var(--warn-bg);
  border-color: var(--warn);
  color: var(--warn);
}
/* --- Indicateur d'écoute (pastille micro pulsée) --- */
.conversation__mic.is-listening {
  position: relative;
}
.conversation__mic.is-listening::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 var(--warn);
  animation: conv-mic-pulse 1.4s ease-out infinite;
}
@keyframes conv-mic-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--warn);
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
    opacity: 0.85;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    opacity: 1;
  }
}
/* Respect de prefers-reduced-motion : pastille visible, sans animation. */
@media (prefers-reduced-motion: reduce) {
  .conversation__mic.is-listening::before {
    animation: none;
  }
}
/* --- Zone de transcription en direct (aria-live polite) --- */
.conversation__live {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-md);
}
.conversation__live[hidden] {
  display: none;
}

/* --- Zone de réponse : suite de cartes --- */
.conversation-answer {
  margin-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.conversation-answer:empty {
  margin-top: 0;
}
.conv-hint,
.conv-loading {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.conv-block__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

/* --- Ce que l'AI OS a compris --- */
.conv-understood {
  border-left: 4px solid var(--pg-violet);
}
.conv-facts {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.conv-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-fact__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.conv-fact__value {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

/* --- Badge de risque (4 niveaux) --- */
.conv-risk {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
}
.conv-risk--faible {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok);
}
.conv-risk--modere {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
}
.conv-risk--eleve {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
  font-weight: var(--fw-bold);
}
.conv-risk--critique {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit);
}

/* --- Précision demandée (needInfo) --- */
.conv-needinfo {
  border-left: 4px solid var(--warn);
  background: var(--warn-bg);
}
.conv-needinfo__text {
  color: var(--text);
}

/* --- Plan proposé --- */
.conv-plan {
  border-left: 4px solid var(--info);
}
.conv-plan__objective,
.conv-plan__rollback {
  margin-bottom: var(--sp-4);
}
.conv-plan__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: var(--sp-4) 0 var(--sp-2);
}
.conv-plan__group {
  margin-top: var(--sp-2);
}
.conv-plan__empty {
  color: var(--text-muted);
}
.conv-plan__rollback {
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}

/* --- Étapes numérotées --- */
.conv-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.conv-step {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-step__n {
  flex: 0 0 auto;
  width: 1.6em;
  height: 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--pg-violet);
  color: var(--text-invert);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.conv-step__body {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: baseline;
}
.conv-step__service {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  padding: 1px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-muted);
}

/* --- Puces services / permissions / validations --- */
.conv-chips,
.conv-validations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.conv-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
}
.conv-validations {
  flex-direction: column;
}
.conv-validation {
  position: relative;
  padding-left: var(--sp-5);
  font-size: var(--fs-sm);
}
.conv-validation::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: var(--fw-bold);
}

/* --- Explicabilité --- */
.conv-sources {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* --- Assistant universel de connaissance (5 niveaux) — additif --- */
.conv-know {
  border-left: 4px solid var(--pg-blue, var(--pg-violet));
}
.conv-know__step {
  display: inline-block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--fw-semibold);
  color: var(--pg-violet);
  margin-right: var(--sp-2);
}
.conv-know__step--analyze {
  color: var(--ok);
}
.conv-know__reformulation {
  font-size: var(--fs-base);
  margin-bottom: var(--sp-3);
}
.conv-know__name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin: var(--sp-2) 0;
}
.conv-know__grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.conv-know__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-know__row-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.conv-know__row-value {
  font-size: var(--fs-sm);
}
.conv-know__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.conv-know__chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
}
.conv-know__state {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-know__state-value {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.conv-know__table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-2) 0;
}
.conv-know__table th,
.conv-know__table td {
  border: 1px solid var(--border);
  padding: var(--sp-3);
  text-align: left;
  font-size: var(--fs-sm);
  vertical-align: top;
}
.conv-know__table th {
  background: var(--surface-2);
  font-weight: var(--fw-semibold);
}
.conv-know__advice {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
}
.conv-know__action {
  margin-top: var(--sp-2);
}
.conv-know__note {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.conv-know__sources {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}
.drawer__learn-more {
  margin-top: var(--sp-3);
}

/* --- Assistant : réponse LLM enrichie et ANCRÉE (additif, dégradation propre) --- */
.conv-know__llm {
  margin: var(--sp-3) 0;
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pg-orange);
  border-radius: var(--r-md);
}
.conv-know__llm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.conv-know__llm-badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pg-orange);
}
.conv-know__llm-model {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-know__llm-text {
  font-size: var(--fs-sm);
  white-space: pre-wrap;
}
.conv-know__llm-grounded {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* --- Assistant : recherche large (correspondances classées) --- */
.conv-know__search {
  margin: var(--sp-3) 0;
}
.conv-know__search-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}
.conv-know__matches {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.conv-know__match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-know__match-kind {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-muted);
}
.conv-know__match-kind--capability {
  color: var(--pg-orange);
}
.conv-know__match-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.conv-know__match-snippet {
  flex-basis: 100%;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-know__match-open {
  margin-left: auto;
}

/* --- Décision --- */
.conv-decide {
  border-left: 4px solid var(--pg-orange);
}
.conv-decide__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.conv-decide__status {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  min-height: 1.2em;
}
.conv-listen {
  align-self: flex-start;
}

/* ====================================================================== */
/* Plan MULTI-PHASES — décomposition honnête (une décision par phase)       */
/* ====================================================================== */
.conv-phases {
  border-left: 4px solid var(--pg-violet);
}
.conv-phases__recap {
  margin-bottom: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.conv-phases__all {
  margin-top: var(--sp-2);
}
.conv-phases__hint {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}
.conv-phases__list {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  counter-reset: conv-phase;
}
.conv-phase {
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.conv-phase--todo {
  border-color: var(--warn);
  background: var(--warn-bg);
}
.conv-phase__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: baseline;
  margin-bottom: var(--sp-2);
}
.conv-phase__clause {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.conv-phase__facts {
  margin: var(--sp-2) 0;
}
.conv-phase__objective {
  margin: var(--sp-2) 0;
  font-size: var(--fs-sm);
}
.conv-phase__act {
  margin-top: var(--sp-2);
}
.conv-phase__needinfo {
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  font-size: var(--fs-sm);
  color: var(--text);
}

/* ====================================================================== */
/* Plan orchestré — « Lancer le plan » + déroulé des étapes (additif)       */
/* ====================================================================== */
.conv-phases__run {
  margin-top: var(--sp-2);
  margin-left: var(--sp-2);
}
.conv-run__note {
  font-style: italic;
}
.conv-run {
  margin-top: var(--sp-3);
}
.conv-run__report {
  border-left: 4px solid var(--pg-violet);
}
.conv-run__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: baseline;
  justify-content: space-between;
}
.conv-run__title {
  margin: 0;
}
.conv-run__badge {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid var(--border);
}
.conv-run__badge--ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok);
}
.conv-run__badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
}
.conv-run__badge--muted {
  background: var(--surface-3);
  color: var(--text-muted);
}
.conv-run__summary {
  margin: var(--sp-2) 0;
  font-size: var(--fs-sm);
}
.conv-run__killed {
  margin: var(--sp-2) 0;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: var(--fw-semibold);
}
.conv-run__steps {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.conv-run__step {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.conv-run__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.conv-run__dot--ok {
  background: var(--ok);
}
.conv-run__dot--warn {
  background: var(--warn);
}
.conv-run__dot--info {
  background: var(--info);
}
.conv-run__dot--err {
  background: var(--crit);
}
.conv-run__dot--muted {
  background: var(--text-muted);
}
.conv-run__stepbody {
  flex: 1 1 auto;
  min-width: 0;
}
.conv-run__stepline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: baseline;
}
.conv-run__stepn {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.conv-run__stepstatus {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.conv-run__stepdetail {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-sm);
  color: var(--text);
}
.conv-run__stepproposed {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-xs);
  color: var(--ok);
  font-weight: var(--fw-semibold);
}
.conv-run__created {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--ok-bg);
  border-radius: var(--r-md);
}
.conv-run__createdtitle {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
}
.conv-run__link {
  display: inline-block;
  font-weight: var(--fw-semibold);
  color: var(--info);
}
.conv-run__createdlist {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.conv-run__createdid {
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
}
.conv-run__honest {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* ====================================================================== */
/* Couche MULTIMODALE HONNÊTE — bouton Joindre + carte d'analyse            */
/* ====================================================================== */
.conversation__attach svg,
.conversation__voice svg {
  width: 1.1em;
  height: 1.1em;
}
.conv-analyze {
  border-left: 4px solid var(--pg-violet);
}
.conv-analyze__file {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: var(--sp-3);
}
.conv-analyze__preview {
  display: block;
  max-width: 100%;
  height: auto;
  margin: var(--sp-2) 0 var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.conv-analyze__warn {
  font-size: var(--fs-sm);
  color: var(--warn);
  background: var(--warn-bg);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-3);
}
.conv-analyze__summary {
  margin-bottom: var(--sp-3);
}
.conv-analyze__vision {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  background: var(--info-bg);
  color: var(--info);
  border-radius: var(--r-pill, var(--r-sm));
  font-size: var(--fs-sm);
  font-weight: 600;
}
.conv-analyze__note {
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  background: var(--info-bg);
  border-left: 3px solid var(--info);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text);
}
.conv-analyze__noact {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: italic;
}

/* --- Constats (findings) avec sévérité colorée --- */
.conv-findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.conv-finding {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
  border-left: 3px solid var(--border);
}
.conv-finding--warn {
  border-left-color: var(--warn);
}
.conv-finding--crit {
  border-left-color: var(--crit);
}
.conv-finding__sev {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info);
}
.conv-finding__sev--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
}
.conv-finding__sev--crit {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit);
}
.conv-finding__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.conv-finding__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.conv-finding__detail {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  word-break: break-word;
}

/* --- Historique (Enterprise Conversation Record) --- */
.conversation-history {
  padding: 0;
  overflow: hidden;
}
.conv-history {
  list-style: none;
  margin: 0;
  padding: 0;
}
.conv-history__item {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.conv-history__item:last-child {
  border-bottom: none;
}
.conv-history__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: baseline;
}
.conv-history__msg {
  font-weight: var(--fw-semibold);
}
.conv-history__when {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
}
.conv-history__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.conv-history__obj {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.conv-history__empty {
  padding: var(--sp-5);
  color: var(--text-muted);
  text-align: center;
}
.conv-tag {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
}
.conv-tag--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.conv-tag--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

/* ============ Gouvernance de la mémoire conversationnelle ============ */
/* Additif : réutilise .card, .btn, les tokens ; aucun style inline (CSP).
   Note honnête « mémoire vive éphémère » rendue en clair côté écran. */
.conv-gov-policy {
  margin-bottom: var(--sp-4);
  padding: var(--sp-4);
}
.conv-gov-policy__title {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.conv-gov-policy__note {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-gov-policy__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
}
.conv-gov-policy__field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.conv-gov-policy__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-gov-policy__input {
  width: 6rem;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: inherit;
  font: inherit;
}
.conv-gov-policy__hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-gov-policy__check {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
}
.conv-gov-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}
.conv-gov-tag {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
}
.conv-gov-tag--exp {
  background: var(--warn-bg);
  color: var(--warn);
}
.conv-gov-tag--conf {
  background: var(--crit-bg);
  color: var(--crit);
}
.conv-gov-tag--limit {
  background: var(--surface-2);
  color: var(--text);
}
.conv-history__msg--restricted {
  font-style: italic;
  color: var(--text-muted);
}
.conv-gov-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.conv-gov-btn {
  font-size: var(--fs-xs);
  padding: 4px 10px;
}
.conv-gov-correct {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.conv-gov-correct__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-gov-correct__input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.conv-gov-correct__actions {
  display: flex;
  gap: var(--sp-2);
}

/* ==================== GESTION PROACTIVE (cloche 🔔) ==================== */
/* Cloche dans l'en-tête + pastille de compteur ; panneau (tiroir) latéral.
   Additif, tokens existants, thème clair/sombre hérités, mouvement réduit. */
.bell {
  position: relative;
}
.bell__count {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: #fff;
  background: var(--crit);
  border-radius: var(--r-full);
  box-shadow: 0 0 0 2px var(--surface);
}
.bell__count[hidden] {
  display: none;
}
.app-header__controls .bell.bell--active {
  border-color: var(--crit);
}

/* 🔔 « Sonnerie » visuelle quand une nouvelle importante arrive (balancement bref + halo). */
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  10%, 50%, 90% { transform: rotate(-12deg); }
  30%, 70% { transform: rotate(12deg); }
}
.bell.bell--pulse { animation: bell-ring 1.4s ease-in-out; transform-origin: 50% 12%; }
.bell.bell--pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit, #dc2626) 40%, transparent);
  animation: bell-halo 1.4s ease-out;
}
@keyframes bell-halo { from { opacity: .9; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bell.bell--pulse, .bell.bell--pulse::after { animation: none; } }

/* Le panneau proactif s'ancre en haut à droite (tiroir), pas au centre. */
.proactive-overlay {
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}
.proactive-drawer {
  background: var(--surface);
  color: var(--text);
  border-inline-start: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  width: min(420px, 100%);
  max-width: 100%;
  height: 100%;
  padding: var(--sp-5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.proactive-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.proactive-drawer__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}
.proactive-drawer__intro {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.proactive-drawer__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-2);
}
/* La note des sources de la cloche : discrète quand tout répond, marquée quand une source manque.
   Elle est en TÊTE du panneau — après les alertes, personne ne la lirait. */
/* Historique des recherches — même grammaire que la barre d'outils de la cloche : case à cocher,
   tout sélectionner, supprimer. Un utilisateur qui a appris l'un sait déjà se servir de l'autre. */
.gsearch__hist-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.gsearch__hist-title {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.gsearch__hist-alllab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.gsearch__hist {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-3);
}
.gsearch__hist-q {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--r-sm);
}
.gsearch__hist-q:hover,
.gsearch__hist-q:focus-visible {
  background: var(--surface-2);
}
.gsearch__hist-x {
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 6px;
  border-radius: var(--r-sm);
}
.gsearch__hist-x:hover,
.gsearch__hist-x:focus-visible {
  color: var(--crit);
  background: var(--surface-2);
}
.proactive-srcnote {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.proactive-srcnote--warn {
  color: var(--warn);
  font-weight: 600;
}
.proactive-empty {
  color: var(--text-muted);
  padding: var(--sp-4);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}
.proactive-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.proactive-group__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.proactive-item {
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.proactive-item--crit {
  border-inline-start-color: var(--crit);
}
.proactive-item--high {
  border-inline-start-color: var(--crit);
}
.proactive-item--warn {
  border-inline-start-color: var(--warn);
}
.proactive-item--low {
  border-inline-start-color: var(--info);
}
.proactive-item--info {
  border-inline-start-color: var(--info);
}
.proactive-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.proactive-sev {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.proactive-sev--crit,
.proactive-sev--high {
  background: var(--crit-bg);
  color: var(--crit);
}
.proactive-sev--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.proactive-sev--low,
.proactive-sev--info {
  background: var(--info-bg);
  color: var(--info);
}
.proactive-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}
.proactive-item__title {
  font-weight: var(--fw-semibold);
}
.proactive-item__why {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.proactive-item__action {
  align-self: flex-start;
  margin-top: var(--sp-1);
}

/* Actions de gestion d'une notification : sélection + vue + supprimer */
.proactive-item__acts {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
}
.proactive-item__select {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-danger, #c0392b);
}
.proactive-seen-badge {
  font-size: 0.8rem;
  color: var(--color-text-muted, #6b7280);
  font-weight: 600;
}
.proactive-item--seen {
  opacity: 0.6;
}
/* Barre d'outils du panneau : tout sélectionner + supprimer la sélection */
.proactive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-wrap: wrap;
}
.proactive-toolbar__all {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.proactive-toolbar__all input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

@media (max-width: 520px) {
  .proactive-drawer {
    width: 100%;
  }
}

/* ============ 2a. Autonomie du système (niveaux 5-6, gouvernée) ============ */
/* Panneau ADDITIF : sélecteur de niveau, jauge de budget quotidien, capacités
   auto (bascules), rappel kill-switch prioritaire et note honnête permanente. */
.gov-auto {
  display: grid;
  gap: var(--sp-4);
}
.gov-auto__lead {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.gov-auto__honest {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--warn);
  background: var(--warn-bg);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--fs-sm);
}
.gov-auto__honest svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--warn);
}
.gov-auto__level {
  display: grid;
  gap: var(--sp-2);
}
.gov-auto__levelLabel {
  font-weight: var(--fw-semibold);
}
.gov-auto__select {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.gov-auto__hint {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.gov-auto__budget {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4);
}
.gov-auto__budgetTitle {
  font-weight: var(--fw-semibold);
}
.gov-auto__budgetText {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.gov-auto__kill {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.gov-auto__kill svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.gov-auto__kill--armed {
  color: var(--crit);
  font-weight: var(--fw-semibold);
}
.gov-auto__capsTitle {
  font-weight: var(--fw-semibold);
}
.gov-auto__caps {
  display: grid;
  gap: var(--sp-3);
}
.gov-auto__cap {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.gov-auto__capHead {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.gov-auto__capLabel {
  font-weight: var(--fw-semibold);
}
.gov-auto__capTags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.gov-badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn);
}
.gov-auto__toggle {
  justify-self: start;
}
.gov-auto__capNote {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.gov-auto__runBtn {
  justify-self: start;
}
.gov-auto__cycle {
  display: grid;
  gap: var(--sp-2);
}
.gov-auto__cycleHead {
  font-weight: var(--fw-semibold);
}
.gov-auto__cycleSteps {
  display: grid;
  gap: var(--sp-2);
}
.gov-auto__cycleStep {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  font-size: var(--fs-sm);
}
.gov-auto__cycleText {
  color: var(--text);
}

/* ============================================================================
   COLLABORATION MULTI-UTILISATEURS (prototype, sans authentification réelle).
   Panneau repliable par enregistrement de conversation : participants, fil de
   commentaires, assignation (porte RBAC), tâches cochables, partage. Additif.
   ========================================================================== */
.collab {
  margin-top: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.collab__summary {
  cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.collab__summary::-webkit-details-marker {
  display: none;
}
.collab__summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: var(--sp-2);
  color: var(--text-muted);
}
.collab[open] > .collab__summary::before {
  content: "\25BE";
}
.collab__body {
  padding: var(--sp-3);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.collab__banner {
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--r-sm);
}
.collab__actor {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.collab__actor-label {
  color: var(--text-muted);
}
.collab-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.collab-section__title {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text);
}
.collab-empty {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.collab-people,
.collab-thread,
.collab-tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.collab-people__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
}
.collab-people__name {
  color: var(--text);
}
.collab-chip {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-muted);
}
.collab-chip--actor {
  background: var(--info-bg);
  color: var(--info);
}
.collab-thread__item {
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.collab-thread__head {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
}
.collab-thread__actor {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
}
.collab-thread__when {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.collab-thread__text {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.collab-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: flex-end;
}
.collab-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1 1 auto;
  min-width: 140px;
}
.collab-field__label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.collab-field__input {
  padding: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
.collab-field__input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.collab-btn {
  white-space: nowrap;
}
.collab-assignee {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.collab-assignee__label {
  color: var(--text-muted);
}
.collab-assignee__note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: pre-wrap;
}
.collab-forbidden {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--warn);
}
.collab-tasks__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
}
.collab-tasks__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}
.collab-tasks__title--done {
  text-decoration: line-through;
  color: var(--text-muted);
}
.collab-tasks__by {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.collab-share {
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.collab-share__text {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--sp-2);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  resize: vertical;
}

/* ============================================================================
   Analyse causale d'une campagne (Conversation) — additif, dégradation propre.
   Métriques (barre livrés/échoués/en attente), causes classées (sévérité colorée),
   recommandations vers l'existant, sources et note honnête. Thème clair/sombre via tokens.
   ========================================================================== */
.conv-diag {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}
.conv-diag__step {
  font-weight: var(--fw-semibold);
  color: var(--brand, var(--info));
  margin-right: 4px;
}
.conv-diag__h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin: 4px 0 0;
}
.conv-diag__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.conv-diag__input-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.conv-diag__input {
  width: 10rem;
  max-width: 100%;
  padding: 6px 10px;
  color: var(--text, inherit);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm, 8px);
}
/* Barre empilée : largeurs posées en ligne (JS) à partir des VRAIS compteurs. */
.conv-diag__bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.conv-diag__seg {
  height: 100%;
}
.conv-diag__seg--delivered { background: var(--ok); }
.conv-diag__seg--failed { background: var(--crit); }
.conv-diag__seg--pending { background: var(--warn); }
.conv-diag__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 6px 14px;
}
.conv-diag__metric {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-sm);
  border-bottom: 1px dotted var(--border);
  padding-bottom: 2px;
}
.conv-diag__metric-label { color: var(--text-muted); }
.conv-diag__metric-value { font-weight: var(--fw-semibold); }
.conv-diag__causes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.conv-diag__cause {
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--r-sm, 8px);
  padding: 10px 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.conv-diag__cause--warn { border-left-color: var(--warn); }
.conv-diag__cause--high { border-left-color: var(--crit); }
.conv-diag__cause--crit { border-left-color: var(--crit); }
.conv-diag__cause-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.conv-diag__cause-title {
  font-weight: var(--fw-semibold);
}
.conv-diag__sev {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--info);
  background: var(--info-bg);
  color: var(--info);
}
.conv-diag__sev--warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn);
}
.conv-diag__sev--high {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit);
}
.conv-diag__sev--crit {
  background: var(--crit);
  color: #fff;
  border-color: var(--crit);
}
.conv-diag__conf {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.conv-diag__row-label {
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.conv-diag__evidence,
.conv-diag__reco {
  font-size: var(--fs-sm);
  margin: 0;
}
.conv-diag__breakdown,
.conv-diag__sources,
.conv-diag__note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.conv-diag__note {
  font-style: italic;
}
.conv-diag__none,
.conv-diag__loading {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.conv-diag__error {
  font-size: var(--fs-sm);
  color: var(--crit);
  font-weight: var(--fw-semibold);
}

/* ====================================================================== */
/* ECIP — Vitesse de lecture, synthèse Cockpit, réglages avancés (additif) */
/* ====================================================================== */

/* --- Contrôle de vitesse de lecture (Paramètres) --- */
.readrate {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.readrate__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.readrate__slider {
  flex: 1 1 200px;
  min-width: 160px;
  accent-color: var(--pg-violet);
  height: 28px;
}
.readrate__value {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 3.5ch;
  text-align: right;
}
.readrate__presets {
  flex-wrap: wrap;
}
.readrate__test {
  margin-left: auto;
}

/* --- Sélecteur compact de vitesse dans la barre de lecture d'écran --- */
.view-tools__rate {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px 8px;
  min-height: 36px;
  cursor: pointer;
}
.view-tools__rate:hover {
  border-color: var(--pg-violet);
}

/* --- Synthèse des sous-systèmes (Cockpit) --- */
.synth-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: var(--sp-4);
}
.synth-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pg-violet);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.synth-tile:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.synth-tile__value {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.synth-tile__cta {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--pg-violet);
}
.synth-tile__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.synth-tile__sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* --- Réglages avancés (raccourcis) --- */
.advanced-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.advanced-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--border);
}
.advanced-link:first-child {
  border-top: 0;
}
.advanced-link__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 220px;
}
.advanced-link__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.advanced-link__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.advanced-link__cta {
  flex: 0 0 auto;
}

/* ====================================================================== */
/* DEMANDE UNIVERSELLE D'EXÉCUTION — aperçu de préparation d'action        */
/* (Préparé/Approuvé/Exécuté) + liste « Actions disponibles ». Additif.     */
/* ====================================================================== */
.actprep {
  border-left: 4px solid var(--pg-violet);
}
.actprep--unavailable {
  border-left-color: var(--warn);
}
.actprep--need_info {
  border-left-color: var(--info);
}
.actprep__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.actprep__states {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
}
.actprep__state {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}
.actprep__state--active {
  background: var(--info-bg);
  color: var(--info);
  border-style: solid;
  border-color: var(--info);
  font-weight: var(--fw-bold);
}
.actprep__row {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-1) 0;
  flex-wrap: wrap;
}
.actprep__label {
  flex: 0 0 auto;
  min-width: 9rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.actprep__value {
  flex: 1 1 12rem;
  color: var(--text);
  word-break: break-word;
}
.actprep__summary {
  margin: var(--sp-2) 0;
  color: var(--text);
}
.actprep__subtitle {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.actprep__params,
.actprep__details,
.actprep__needinfo,
.actprep__unavailable,
.actprep__authority {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}
.actprep__needinfo {
  border-left: 4px solid var(--info);
  padding-left: var(--sp-3);
  border-top: none;
}
.actprep__validations,
.actprep__plan,
.actprep__alternatives {
  margin: var(--sp-2) 0 0;
  padding-left: var(--sp-4);
}
.actprep__validations li,
.actprep__plan li,
.actprep__alternatives li {
  margin-bottom: var(--sp-1);
  color: var(--text);
}
.actprep__authority {
  border-left: 4px solid var(--warn);
  padding-left: var(--sp-3);
  background: var(--warn-bg);
}
.actprep__authority-reason {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.actprep__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  align-items: center;
}
.actprep__status {
  width: 100%;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  min-height: 1.2em;
}
.actprep__note {
  color: var(--text-muted);
}

/* --- Section « Actions disponibles » (dans l'écran Registres) --- */
.actions-avail {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.actions-avail__search-label {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.actions-avail__search {
  width: 100%;
  max-width: 28rem;
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  background: var(--surface);
  color: var(--text);
}
.actions-avail__count {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.actions-avail__items {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
}
.actions-avail__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.actions-avail__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.actions-avail__name {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.actions-avail__service {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.actions-avail__meta {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
}
.actions-avail__state {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
}
.actions-avail__state--available {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok);
}
.actions-avail__state--preparation {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info);
}
.actions-avail__state--absent {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.actions-avail__empty {
  margin-top: var(--sp-2);
  color: var(--text-muted);
}

/* ── Panneau de détail / création d'agent ────────────────────────────────────────────────
   Volontairement sobre : cet écran sert à COMPRENDRE ce qu'un agent fait et à en créer un.
   Tout ornement qui détournerait l'œil des événements observés dessert son objet. */
.agent-detail { margin-bottom: 16px; padding: 18px; }
.agent-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.agent-detail__head h3 { margin: 0; font-size: 17px; }
.agent-detail__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 5px 0; }
.agent-detail__label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; opacity: .7; min-width: 190px; }
.agent-detail__value { font-weight: 600; }
.agent-detail__mission { margin: 6px 0; font-size: 14px; line-height: 1.5; }
.agent-detail__tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
                     border: 1px solid currentColor; opacity: .8; margin: 0 0 8px; }
/* L'absence d'événement observé est l'information la plus importante de la fiche : un agent qui
   n'observe rien se taira à vie. On la met en garde, pas en note de bas de page. */
.agent-detail__warn { margin: 8px 0; padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
                      border: 1px solid rgba(220, 38, 38, .35); }
.agent-detail__rule { margin: 12px 0 0; font-size: 12.5px; opacity: .75; font-style: italic; }
.agent-detail__suggestion { flex-direction: column; align-items: flex-start;
                            border-top: 1px solid rgba(127,127,127,.2); padding-top: 12px; margin-top: 6px; }
.agent-detail input.input { flex: 1 1 240px; padding: 7px 10px; border-radius: 8px;
                            border: 1px solid rgba(127,127,127,.35); font: inherit; }
/* Trois boutons dans le pied d'une carte : ils doivent tenir sans déborder. */
.agent-card__run { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-card__run .agent-card__run-btn { flex: 1 1 auto; }

/* ── Routage réel : ce que les modèles ont vraiment traité ────────────────────────────────
   Discret sous la table des règles : c'est un complément de preuve, pas le sujet principal. */
.routing-actual { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(127,127,127,.18); }
.routing-actual__title { margin: 0 0 8px; font-size: 12px; text-transform: uppercase;
                         letter-spacing: .05em; opacity: .7; }
.routing-actual__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
                       padding: 4px 0; font-size: 13.5px; }
.routing-actual__task { font-family: ui-monospace, Menlo, monospace; opacity: .85; }
.routing-actual__prov { font-weight: 600; text-align: right; }

/* ── Veille quotidienne de l'ECIP (Cockpit) ───────────────────────────────────────────────
   Un rapport calme, informatif : ce que l'ECIP a appris aujourd'hui et ce qu'il recommande. */
.veille { padding: 16px 18px; }
.veille__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.veille__day { font-weight: 700; }
.veille__trigger { font-size: 12px; opacity: .6; margin-left: auto; }
.veille__summary { margin: 0 0 12px; opacity: .9; }
.veille__recs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.veille__rec { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline;
               padding: 8px 12px; border-radius: 8px; background: rgba(127,127,127,.06);
               border-left: 3px solid rgba(127,127,127,.3); }
.veille__rec--warn { border-left-color: #f59e0b; background: rgba(245,158,11,.07); }
.veille__rec--info { border-left-color: #6366f1; }
.veille__rec-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .55;
                    font-family: ui-monospace, Menlo, monospace; }
.veille__rec-label { font-weight: 600; }
.veille__rec-detail { grid-column: 2; font-size: 13px; opacity: .7; }
.veille__empty { opacity: .6; font-style: italic; }
.veille__note { margin: 4px 0 0; font-size: 12.5px; opacity: .6; border-top: 1px solid rgba(127,127,127,.15); padding-top: 10px; }

/* ── Panneau « Lire » : explication détaillée écrite + voix (propositions & audit) ────────── */
.read-modal { max-width: 640px; width: 92vw; max-height: 84vh; overflow-y: auto; }
.read-panel__intro { font-size: 13px; opacity: .7; margin: 0 0 14px; }
.read-panel__list { margin: 0 0 16px; display: grid; gap: 10px; }
.read-panel__term { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .55; margin-bottom: 2px; }
.read-panel__desc { margin: 0 0 6px; line-height: 1.5; }
.read-panel__voice { display: flex; gap: 10px; margin: 4px 0 16px; padding-top: 12px; border-top: 1px solid rgba(127,127,127,.15); }
.read-panel__empty { opacity: .6; font-style: italic; }

/* ── Conseil de l'ECIP (Conversation) : raisonnement multi-moteurs ancré ───────────────────── */
.ecip-advice { padding: 18px 20px; margin-bottom: 14px; border-left: 3px solid var(--brand-pink, #e91e8c); }
.ecip-advice--loading { opacity: .8; }
.ecip-advice__loading { margin: 0; font-style: italic; opacity: .7; }
.ecip-advice__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ecip-advice__title { font-weight: 700; font-size: 15px; }
.ecip-advice__engines { font-size: 12px; opacity: .6; margin-left: auto; }
.ecip-advice__body { line-height: 1.55; }
.ecip-advice__line { margin: 0 0 10px; }

/* ── Mise en forme Markdown de la réponse ECIP (professionnelle, sobre) ────────── */
.md { line-height: 1.6; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md .md-h { line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.md .md-h3 { font-size: 16px; margin: 18px 0 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(127,127,127,.16); }
.md .md-h4 { font-size: 14.5px; margin: 16px 0 6px; opacity: .95; }
.md .md-h5, .md .md-h6 { font-size: 13px; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.md strong { font-weight: 650; }
.md .md-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; padding: 1px 5px; border-radius: 5px; background: rgba(127,127,127,.14); }
.md .md-pre { margin: 10px 0; padding: 12px 14px; border-radius: 10px; overflow-x: auto; background: rgba(127,127,127,.1); border: 1px solid rgba(127,127,127,.14); }
.md .md-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.md .md-hr { border: none; border-top: 1px solid rgba(127,127,127,.18); margin: 16px 0; }
.md .md-list { margin: 8px 0 12px; padding-left: 22px; }
.md .md-list__item { margin: 4px 0; }
.md .md-quote { margin: 12px 0; padding: 4px 14px; border-left: 3px solid var(--accent, #6b8afd); background: rgba(107,138,253,.07); border-radius: 0 8px 8px 0; }
.md .md-quote__line { margin: 4px 0; opacity: .85; font-size: 13.5px; }
.md .md-link { color: var(--accent, #6b8afd); text-decoration: underline; text-underline-offset: 2px; }
.md .md-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid rgba(127,127,127,.16); border-radius: 10px; }
.md .md-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md .md-table th, .md .md-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid rgba(127,127,127,.12); vertical-align: top; }
.md .md-table th { font-weight: 650; background: rgba(127,127,127,.07); white-space: nowrap; }
.md .md-table tr:last-child td { border-bottom: none; }
.ecip-advice__voice { display: flex; gap: 10px; margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.15); }
.ecip-advice__note { margin: 6px 0 0; font-size: 12.5px; opacity: .6; }

/* ── MODE PRODUCTION par défaut : les badges « DÉMO » sont cachés d'emblée (aucun flash au
   chargement). Ils ne réapparaissent QUE si le serveur tourne en mode démo (body.demo-mode).
   Robuste au timing : c'est du CSS, appliqué avant tout render, sans attendre de requête. */
.demo-badge { display: none !important; }
body.demo-mode .demo-badge:not([hidden]) { display: inline-flex !important; }

/* ══════════════════════════════════════════════════════════════════════════════════════════
   ECIP — la page « cerveau » (futuriste sobre). Élégant, vivant, theme-aware, sans distraire.
   ══════════════════════════════════════════════════════════════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── En-tête vivant : l'orbe du cerveau + identité + moteurs + état ── */
.ecip-hero {
  display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 18px;
  border-radius: 18px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(233,30,140,.14), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(124,58,237,.16), transparent 55%),
    var(--color-surface, #fff);
  border: 1px solid rgba(124,58,237,.22);
  box-shadow: 0 10px 40px -20px rgba(124,58,237,.5);
}
.ecip-hero__orb {
  width: 58px; height: 58px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(from 0deg, #e91e8c, #7c3aed, #06b6d4, #e91e8c);
  animation: ecip-spin 8s linear infinite;
  box-shadow: 0 0 30px -4px rgba(233,30,140,.6);
}
.ecip-hero__core {
  position: absolute; inset: 6px; border-radius: 50%; background: var(--color-surface, #fff);
  display: block;
}
@keyframes ecip-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ecip-hero__orb { animation: none; } }
.ecip-hero__id { flex: 1 1 auto; min-width: 0; }
.ecip-hero__name { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(90deg, #e91e8c, #7c3aed); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; }
.ecip-hero__tagline { margin: 2px 0 10px; font-size: 13.5px; opacity: .75; }
.ecip-hero__engines { display: flex; flex-wrap: wrap; gap: 8px; }
.ecip-engine { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(127,127,127,.08); border: 1px solid rgba(127,127,127,.18); }
.ecip-engine__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ecip-engine--on .ecip-engine__dot { background: #16a34a; box-shadow: 0 0 8px 1px rgba(22,163,74,.6); }
.ecip-engine--off .ecip-engine__dot { background: #9ca3af; }
.ecip-hero.thinking .ecip-engine--on .ecip-engine__dot { animation: ecip-pulse 1.1s ease-in-out infinite; }
@keyframes ecip-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.ecip-hero__stats { display: flex; gap: 18px; flex: none; }
.ecip-stat { text-align: center; }
.ecip-stat__n { font-size: 20px; font-weight: 800; line-height: 1; }
.ecip-stat__l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .55; }

/* ── Zone de dialogue ── */
.ecip-dialogue { min-height: 120px; margin-bottom: 16px; }
.ecip-empty { text-align: center; padding: 28px 16px; }
.ecip-empty__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.ecip-empty__sub { margin: 0 auto 18px; max-width: 520px; font-size: 14px; opacity: .7; }
.ecip-suggestions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ecip-suggestion { padding: 9px 16px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  background: var(--color-surface, #fff); border: 1px solid rgba(124,58,237,.3);
  color: var(--color-text); transition: background .15s, transform .1s; }
.ecip-suggestion:hover { background: color-mix(in srgb, #7c3aed 8%, var(--color-surface, #fff));
  transform: translateY(-1px); }

/* ── Champ héros ── */
.ecip-composer { position: sticky; bottom: 12px; padding: 14px; border-radius: 16px;
  background:
    linear-gradient(var(--color-surface,#fff), var(--color-surface,#fff)) padding-box,
    linear-gradient(90deg, rgba(233,30,140,.5), rgba(124,58,237,.5)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 14px 44px -22px rgba(124,58,237,.55); }
.ecip-composer__row { display: flex; gap: 10px; align-items: center; }
.ecip-composer .conversation__input { flex: 1 1 auto; font-size: 15.5px; padding: 12px 14px;
  border-radius: 11px; }

.ecip-memory { margin-top: 18px; }
.ecip-memory__summary { cursor: pointer; font-size: 13px; opacity: .65; padding: 8px 4px;
  list-style: none; user-select: none; }
.ecip-memory__summary::-webkit-details-marker { display: none; }
.ecip-memory[open] .ecip-memory__summary { opacity: .85; margin-bottom: 8px; }

/* Dégradés adaptés au thème sombre : surfaces plus profondes, glow conservé. */
@media (prefers-color-scheme: dark) {
  .ecip-hero, .ecip-composer { --color-surface: #16151c; }
  .ecip-suggestion { --color-surface: #16151c; }
}
:root[data-theme="dark"] .ecip-hero, :root[data-theme="dark"] .ecip-composer,
:root[data-theme="dark"] .ecip-suggestion { --color-surface: #16151c; }
:root[data-theme="light"] .ecip-hero, :root[data-theme="light"] .ecip-composer,
:root[data-theme="light"] .ecip-suggestion { --color-surface: #fff; }

/* ══════════════════ RADAR ECIP — Rapports & Suggestions (futuriste sobre) ══════════════════ */
.radar-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 18px;
  border-radius: 18px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(6,182,212,.14), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(124,58,237,.16), transparent 55%), var(--color-surface, #fff);
  border: 1px solid rgba(124,58,237,.22); box-shadow: 0 10px 40px -20px rgba(124,58,237,.5); }
.radar-hero__orb { width: 54px; height: 54px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(from 0deg, #06b6d4, #7c3aed, #e91e8c, #06b6d4);
  animation: ecip-spin 10s linear infinite; box-shadow: 0 0 26px -4px rgba(6,182,212,.6); }
.radar-hero__core { position: absolute; inset: 6px; border-radius: 50%; background: var(--color-surface, #fff); display: block; }
.radar-hero__id { flex: 1 1 auto; min-width: 0; }
.radar-hero__name { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .03em;
  background: linear-gradient(90deg, #06b6d4, #7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.radar-hero__tagline { margin: 2px 0 0; font-size: 13px; opacity: .72; }
.radar-hero__gen { flex: none; }

.radar-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.radar-filter { padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--color-surface, #fff); border: 1px solid rgba(127,127,127,.25); color: var(--color-text); }
.radar-filter--on { border-color: var(--brand-pink, #e91e8c);
  background: color-mix(in srgb, var(--brand-pink, #e91e8c) 10%, var(--color-surface, #fff)); font-weight: 600; }

.radar-feed { display: flex; flex-direction: column; gap: 14px; }
.radar-empty { opacity: .6; font-style: italic; text-align: center; padding: 40px 16px; }
.radar-card { padding: 16px 18px; border-left: 3px solid rgba(127,127,127,.3); }
.radar-card--high { border-left-color: #dc2626; }
.radar-card--warn { border-left-color: #f59e0b; }
.radar-card--info { border-left-color: #7c3aed; }
.radar-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.radar-card__icon { font-size: 18px; }
.radar-card__title { font-weight: 700; font-size: 15px; }
.radar-card__tag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px;
  border-radius: 999px; background: rgba(124,58,237,.1); color: #7c3aed; }
.radar-card__when { font-size: 12px; opacity: .5; }
.radar-card__body { line-height: 1.5; font-size: 14px; }
.radar-card__line { margin: 0 0 4px; }
.radar-src { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(127,127,127,.06); border: 1px solid rgba(127,127,127,.12); }
.radar-src__label { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; opacity: .6; }
.radar-src__list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.radar-src__item { font-size: 12.5px; line-height: 1.45; }
.radar-src__link { color: var(--accent, #6b8afd); text-decoration: none; word-break: break-word; }
.radar-src__link:hover { text-decoration: underline; }
/* Variante compacte pour les sources DANS une notification cloche (place réduite). */
.radar-src--compact { margin-top: 8px; padding: 7px 9px; }
.radar-src--compact .radar-src__item { font-size: 12px; }

.radar-card__actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.14); flex-wrap: wrap; }
.radar-card__done { font-size: 12px; color: #16a34a; margin-left: 4px; }

/* ═══════════════ NEWS — onglets bonne/mauvaise nouvelle ═══════════════ */
.news-tabs { display: flex; gap: 10px; margin: 4px 0 16px; }
.news-tab { padding: 9px 20px; border-radius: 999px; border: 1px solid rgba(127,127,127,.24); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
.news-tab:hover { border-color: rgba(127,127,127,.5); }
.news-tab--all.news-tab--on { background: rgba(107,138,253,.14); border-color: var(--accent, #6b8afd); color: var(--accent, #6b8afd); }
.news-tab--good.news-tab--on { background: rgba(22,163,74,.14); border-color: #16a34a; color: #15803d; }
.news-tab--bad.news-tab--on { background: rgba(220,38,38,.12); border-color: #dc2626; color: #b91c1c; }
.news-pill { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; flex: none; }
.news-pill--good { background: rgba(22,163,74,.16); color: #15803d; }
.news-pill--bad { background: rgba(220,38,38,.16); color: #b91c1c; }

@media (prefers-color-scheme: dark) { .radar-hero, .radar-filter { --color-surface: #16151c; } }
:root[data-theme="dark"] .radar-hero, :root[data-theme="dark"] .radar-filter { --color-surface: #16151c; }
:root[data-theme="light"] .radar-hero, :root[data-theme="light"] .radar-filter { --color-surface: #fff; }

/* ═══════════════ MISE À JOUR — l'onglet gouverné ═══════════════ */
.maj-panel { margin: 4px 0 22px; padding: 16px 18px; border: 1px solid rgba(127,127,127,.16); border-radius: 14px; background: rgba(127,127,127,.03); }
.maj-panel__head { display: flex; align-items: center; gap: 12px; }
.maj-panel__head .section-label { margin: 0; }
.maj-panel__head .btn { margin-left: auto; }
.maj-cadence { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.maj-cadence__options { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.maj-chip { padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(127,127,127,.24); background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; transition: all .15s; }
.maj-chip:hover { border-color: var(--accent, #6b8afd); }
.maj-chip--on { background: var(--accent, #6b8afd); border-color: var(--accent, #6b8afd); color: #fff; font-weight: 600; }
.maj-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.maj-toggle input { width: 16px; height: 16px; accent-color: var(--accent, #6b8afd); }

.maj-systems { list-style: none; margin: 8px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.maj-system { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(127,127,127,.16); border-radius: 10px; font-size: 13.5px; }
.maj-system__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.maj-system--up .maj-system__dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
.maj-system--down .maj-system__dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.16); }
.maj-system__label { font-weight: 550; }
.maj-system__state { margin-left: auto; font-size: 12px; opacity: .6; }
.maj-system--down .maj-system__state { color: #dc2626; opacity: 1; }

.maj-reco { list-style: none; margin: 8px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.maj-empty { opacity: .6; font-style: italic; padding: 18px; text-align: center; }
.maj-reco__item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid rgba(127,127,127,.16); border-left-width: 3px; border-radius: 10px; }
.maj-reco__item--warn { border-left-color: #f59e0b; }
.maj-reco__item--info { border-left-color: #6b8afd; }
.maj-reco__icon { font-size: 18px; flex: none; }
.maj-reco__label { margin: 0; font-weight: 550; font-size: 14px; }
.maj-reco__detail { margin: 3px 0 0; font-size: 13px; opacity: .7; }

.maj-external { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.maj-ext { padding: 16px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.maj-ext__head { display: flex; align-items: center; gap: 8px; }
.maj-ext__kind { font-size: 18px; }
.maj-ext__name { font-weight: 650; font-size: 15px; }
.maj-ext__cat { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(107,138,253,.14); color: var(--accent, #6b8afd); }
.maj-ext__risk { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.maj-ext__risk--low { background: rgba(22,163,74,.14); color: #16a34a; }
.maj-ext__risk--medium { background: rgba(245,158,11,.16); color: #b45309; }
.maj-ext__what { margin: 10px 0 6px; font-size: 13.5px; line-height: 1.5; }
/* Les corps Markdown contiennent de longues URLs : on force la coupure pour éviter le débordement. */
.maj-ext__what, .maj-ext__what * { overflow-wrap: anywhere; word-break: break-word; }
.maj-ext__why { margin: 0 0 8px; font-size: 13px; opacity: .72; line-height: 1.5; }
.maj-ext__source { margin: 0 0 12px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .55; word-break: break-all; }
.maj-ext__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.14); flex-wrap: wrap; }
.maj-ext__badge { font-size: 12px; font-weight: 600; margin-right: auto; }
.maj-ext__badge--proposed { color: #16a34a; }
.maj-ext__badge--dismissed { color: #dc2626; opacity: .8; }

/* Fiche d'installation (dépliable) d'un outil retenu */
.maj-install { margin-top: 12px; border: 1px solid rgba(22,163,74,.28); border-radius: 10px; background: rgba(22,163,74,.05); overflow: hidden; }
.maj-install__summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13.5px; list-style: none; user-select: none; }
.maj-install__summary::-webkit-details-marker { display: none; }
.maj-install__summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.maj-install[open] .maj-install__summary::before { transform: rotate(90deg); }
.maj-install__body { padding: 4px 16px 16px; }
.maj-install__h { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .6; }
.maj-install__p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.maj-install__steps { margin: 4px 0 0; padding-left: 22px; font-size: 13.5px; line-height: 1.55; }
.maj-install__steps li { margin: 5px 0; }
.maj-install__steps code, .maj-install__p code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; padding: 1px 5px; border-radius: 5px; background: rgba(127,127,127,.16); }
.maj-install__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.14); flex-wrap: wrap; }
.maj-install__src { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--accent, #6b8afd); margin-right: auto; word-break: break-all; }

/* ── Pagination réutilisable (audit, radar, et toute liste à l'échelle) ──────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 4px; }
.pagination__info { font-size: 13px; opacity: .7; min-width: 160px; text-align: center; }

/* ── Avis individuel de chaque moteur (sous la synthèse ECIP) ────────────────────────────────── */
.ecip-perspectives { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(127,127,127,.15); }
.ecip-perspectives__summary { cursor: pointer; font-size: 13.5px; font-weight: 600; opacity: .8; list-style: none; user-select: none; }
.ecip-perspectives__summary::-webkit-details-marker { display: none; }
.ecip-perspectives__summary::before { content: "▸ "; }
.ecip-perspectives[open] .ecip-perspectives__summary::before { content: "▾ "; }
.ecip-perspective { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(127,127,127,.05);
  border-left: 3px solid rgba(127,127,127,.3); }
.ecip-perspective--ok { border-left-color: #16a34a; }
.ecip-perspective--off { border-left-color: #9ca3af; opacity: .75; }
.ecip-perspective__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ecip-perspective__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.ecip-perspective--off .ecip-perspective__dot { background: #9ca3af; }
.ecip-perspective__name { font-weight: 700; font-size: 13.5px; }
.ecip-perspective__badge { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #b45309;
  background: rgba(245,158,11,.15); padding: 1px 7px; border-radius: 999px; }
.ecip-perspective__text { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* ── Historique des échanges ECIP (localStorage) ─────────────────────────────────────────────── */
.ecip-hist-drawer { margin-top: 14px; }
.ecip-hist-drawer__summary { cursor: pointer; font-size: 13px; opacity: .7; padding: 8px 4px; list-style: none; user-select: none; }
.ecip-hist-drawer__summary::-webkit-details-marker { display: none; }
.ecip-hist__head { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.ecip-hist__count { font-size: 12.5px; opacity: .6; margin-right: auto; }
.ecip-hist__empty { opacity: .55; font-style: italic; font-size: 13px; }
.ecip-hist__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  background: rgba(127,127,127,.05); margin-bottom: 6px; }
.ecip-hist__q { flex: 1 1 auto; text-align: left; background: none; border: none; cursor: pointer; color: var(--color-text);
  font-size: 13.5px; font-weight: 600; padding: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecip-hist__q:hover { color: var(--brand-pink, #e91e8c); }
.ecip-hist__meta { font-size: 11.5px; opacity: .5; flex: none; }
.ecip-hist__del { background: none; border: none; cursor: pointer; opacity: .45; font-size: 14px; flex: none; padding: 2px 6px; }
.ecip-hist__del:hover { opacity: 1; color: #dc2626; }

/* ══════════════════════════════════════════════════════════════════════════════════════════════
   PASSE DE DESIGN GLOBALE — look moderne & aéré (comme ECIP). CSS PUR : aucun HTML/JS touché,
   donc aucune fonction affectée. Applique le langage visuel futuriste à TOUS les écrans.
   ══════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Plus d'air : la zone de contenu respire ── */
.app-main { padding: 32px 36px 56px; }
@media (max-width: 640px) { .app-main { padding: 20px 16px 40px; } }

/* ── Titres d'écran en dégradé de marque (les écrans-phares ECIP/Radar ont un .view__title sr-only,
      donc non affectés). Un filet lumineux sous le titre pour l'accent futuriste. ── */
.view__title:not(.sr-only) {
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
  letter-spacing: -0.01em;
  background: linear-gradient(92deg, #e91e8c, #7c3aed 60%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-bottom: 2px;
}
.view__title:not(.sr-only)::after {
  content: ""; display: block; width: 52px; height: 3px; margin-top: 12px; border-radius: 3px;
  background: linear-gradient(90deg, #e91e8c, #7c3aed);
}
.view__lead { font-size: 1.02rem; line-height: 1.6; margin-bottom: 28px; opacity: .82; }

/* ── Cartes plus douces, plus aérées, avec une ombre-glow subtile ── */
.card {
  border-radius: 18px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: 0 1px 2px rgba(41,20,55,.04), 0 12px 32px -22px rgba(124,58,237,.35);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 1px 2px rgba(41,20,55,.05), 0 18px 44px -24px rgba(124,58,237,.5); }

/* ── Étiquettes de section : accent lumineux à gauche, plus d'espace au-dessus ── */
.section-label {
  position: relative; padding-left: 14px; margin-top: 34px;
  letter-spacing: -0.01em;
}
.section-label::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.05em; border-radius: 3px;
  background: linear-gradient(180deg, #e91e8c, #7c3aed);
}

/* ── Grilles un peu plus espacées (aéré) ── */
.kpi-grid, .components-grid, .agents-grid, .synth-grid { gap: 16px; }

/* ── KPIs : coins arrondis + accent en haut, look tableau de bord moderne ── */
.kpi {
  border-radius: 16px; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px -24px rgba(124,58,237,.5);
}
.kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #e91e8c, #7c3aed);
  opacity: .8;
}

/* ── Boutons primaires : léger relief lumineux ── */
.btn--primary, .btn--emphasis {
  box-shadow: 0 8px 22px -12px rgba(233,30,140,.6);
}
.btn--primary:hover, .btn--emphasis:hover { box-shadow: 0 12px 28px -12px rgba(124,58,237,.7); }

/* ── Barres de nav : item actif avec un léger glow de marque ── */
.app-nav__link[aria-current="page"] {
  box-shadow: inset 3px 0 0 0 #e91e8c, 0 6px 18px -14px rgba(124,58,237,.6);
}

/* ── Badges & pastilles : plus arrondis (cohérence) ── */
.st, .src-badge, .demo-badge__tag, .level-badge, .decision-badge { border-radius: 999px; }

/* Le dégradé de titre reste lisible en thème sombre (le clip texte suit la couleur du dégradé). */

/* ── Pièce jointe à l'ECIP (image/document compris par le cerveau) ───────────────────────────── */
.ecip-attach { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px;
  border-radius: 999px; background: color-mix(in srgb, #7c3aed 10%, transparent);
  border: 1px solid rgba(124,58,237,.3); font-size: 13px; }
.ecip-attach__name { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecip-attach__rm { background: none; border: none; cursor: pointer; opacity: .6; font-size: 13px; padding: 0 2px; }
.ecip-attach__rm:hover { opacity: 1; color: #dc2626; }
.ecip-attach__conv { padding: 4px 12px !important; font-size: 12.5px !important; }

/* PDF → Excel : panneau de résultat (aperçu + téléchargements) */
.pdf-result__note { margin: 0 0 12px; font-size: 13.5px; opacity: .8; }
.pdf-result__note--warn { color: #b45309; opacity: 1; }
.pdf-result__downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pdf-result__downloads a { text-decoration: none; }
.pdf-result__sheet { margin: 16px 0 6px; font-size: 14px; font-weight: 650; }
.pdf-result__tablewrap { overflow-x: auto; border: 1px solid rgba(127,127,127,.16); border-radius: 10px; }
.pdf-result__table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.pdf-result__table th, .pdf-result__table td { text-align: left; padding: 7px 11px; border-bottom: 1px solid rgba(127,127,127,.12); white-space: nowrap; }
.pdf-result__table th { font-weight: 650; background: rgba(127,127,127,.07); position: sticky; top: 0; }
.pdf-result__table tr:last-child td { border-bottom: none; }

/* Graphique SVG en direct (analyse de données) */
.chart-wrap { margin: 6px 0 18px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: rgba(127,127,127,.18); stroke-width: 1; }
.chart-axis { fill: currentColor; opacity: .6; font-size: 11px; }
.chart-axis--y { text-anchor: end; }
.chart-bar { transition: opacity .12s; }
.chart-bar:hover { opacity: .8; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12.5px; }
.chart-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend__dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ── Glisser-déposer un fichier sur la Conversation ──────────────────────────────────────────── */
#conversation { position: relative; }
#conversation.dnd-over::after {
  content: "⤓"; position: absolute; inset: 0; z-index: 20; pointer-events: none;
  display: flex; align-items: center; justify-content: center; font-size: 64px; color: #fff;
  background: linear-gradient(135deg, rgba(233,30,140,.82), rgba(124,58,237,.82));
  border: 3px dashed rgba(255,255,255,.7); border-radius: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* ═══════════════ MODE VOCAL — conversation parlée avec l'ECIP (type ChatGPT) ═══════════════ */
.voice-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 12, 24, .62); backdrop-filter: blur(10px);
}
.voice-overlay[hidden] { display: none; }
.voice-panel {
  position: relative; width: min(560px, 96vw); max-height: 92vh; overflow: auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px 28px 24px; border-radius: 28px;
  background: var(--surface, #fff); box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark) { .voice-panel { background: #14172a; } }
.voice-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 18px; line-height: 1;
  background: rgba(127,127,127,.14); color: inherit;
}
.voice-close:hover { background: rgba(127,127,127,.24); }
/* L'orbe animée : couleur/animation selon l'état (idle/listening/thinking/speaking). */
.voice-orb {
  width: 180px; height: 180px; border-radius: 50%; margin: 6px 0 2px;
  background: radial-gradient(circle at 50% 38%, #cdd7ff 0%, #9db0ff 46%, #6b8afd 100%);
  box-shadow: 0 12px 48px rgba(107,138,253,.5); position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.voice-orb__core {
  position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.9), rgba(255,255,255,.15));
  opacity: .5;
}
.voice-orb[data-state="listening"] { animation: voice-listen 1.6s ease-in-out infinite; box-shadow: 0 12px 60px rgba(34,197,94,.55); background: radial-gradient(circle at 50% 38%, #d6ffe4 0%, #86e2a8 46%, #16a34a 100%); }
.voice-orb[data-state="thinking"] { animation: voice-think 1.1s ease-in-out infinite; background: radial-gradient(circle at 50% 38%, #ece0ff 0%, #c3a8ff 46%, #7c3aed 100%); }
.voice-orb[data-state="speaking"] { animation: voice-speak .7s ease-in-out infinite; box-shadow: 0 12px 66px rgba(107,138,253,.7); }
@keyframes voice-listen { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes voice-think { 0%,100% { transform: scale(.98); opacity: .85; } 50% { transform: scale(1.03); opacity: 1; } }
@keyframes voice-speak { 0%,100% { transform: scale(1); } 25% { transform: scale(1.08); } 60% { transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .voice-orb { animation: none !important; } }
.voice-status { font-size: 16px; font-weight: 600; text-align: center; min-height: 22px; margin: 0; }
.voice-transcript {
  width: 100%; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 4px 2px; margin: 2px 0;
}
.voice-line { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.voice-line--user { background: rgba(107,138,253,.12); align-self: flex-end; max-width: 88%; }
.voice-line--ecip { background: rgba(127,127,127,.10); align-self: flex-start; max-width: 92%; }
.voice-line__who { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .55; }
.voice-line__txt { overflow-wrap: anywhere; }
.voice-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; width: 100%; margin-top: 4px; }
.voice-ctl-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; opacity: .6; margin-right: 4px; }
.voice-gender { display: flex; align-items: center; gap: 6px; }
.voice-chip { border: 1px solid rgba(127,127,127,.28); background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.voice-chip[aria-pressed="true"] { background: var(--accent, #6b8afd); color: #fff; border-color: transparent; }
.voice-pick { display: flex; align-items: center; gap: 6px; }
.voice-select { max-width: 200px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(127,127,127,.28); background: transparent; color: inherit; font-size: 13px; }
.voice-note { font-size: 11.5px; opacity: .62; text-align: center; line-height: 1.5; margin: 6px 0 0; max-width: 460px; }


/* ═══════════════ BASE DE CONNAISSANCE — mémoire vivante (doc store + recherche sémantique) ═══════════════ */
.kb-status { font-size: 12.5px; opacity: .7; margin: 4px 0 12px; }
.kb-searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.kb-searchbar .conversation__input { flex: 1 1 auto; }
.kb-hits { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.kb-hits__lead, .kb-hits__loading, .kb-hits__empty { font-size: 12.5px; opacity: .65; margin: 0; }
.kb-hit { padding: 10px 12px; }
.kb-hit__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-hit__score { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(107,138,253,.16); color: var(--accent, #6b8afd); }
.kb-hit__title { font-weight: 600; font-size: 13.5px; }
.kb-hit__excerpt { font-size: 12.5px; opacity: .78; line-height: 1.5; margin: 6px 0 0; overflow-wrap: anywhere; }
/* Détail structuré d'un résultat : grille Clé / Valeur lisible (au lieu de la ligne brute collée). */
.kb-hit__fields { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 12.5px; }
.kb-hit__k { font-weight: 600; opacity: .6; }
.kb-hit__v { margin: 0; overflow-wrap: anywhere; }
.kb-hit__foot { font-size: 11.5px; opacity: .55; margin: 7px 0 0; overflow-wrap: anywhere; }
.kb-hit__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.kb-hit__src { font-size: 12px; font-weight: 600; color: var(--accent, #6b8afd); text-decoration: none; }
.kb-hit__src:hover { text-decoration: underline; }
.kb-hit__where { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(127,127,127,.14); }
.kb-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kb-empty { opacity: .6; font-size: 13px; padding: 10px; }
.kb-doc { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127,127,127,.14); }
.kb-doc__main { flex: 1 1 auto; min-width: 0; }
.kb-doc__title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.kb-doc__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.kb-doc__tag { font-size: 11px; opacity: .6; padding: 1px 7px; border-radius: 6px; background: rgba(127,127,127,.1); }
.kb-doc__badge { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; }
.kb-doc__badge--int { background: rgba(22,163,74,.14); color: #16a34a; }
.kb-doc__badge--ext { background: rgba(245,158,11,.16); color: #b45309; }
.kb-textarea { resize: vertical; min-height: 120px; }

/* Analyse d'impact (graphe de dépendances) */
.kb-impact { margin: 6px 0 16px; }
.kb-impact__root { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.kb-impact__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.kb-impact__item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.kb-impact__label { font-weight: 600; }
.kb-impact__via { font-size: 11.5px; opacity: .6; }

/* Zone de dépôt d'image pour l'analyse d'impact (vision) */
.kb-drop { margin: 4px 0 8px; padding: 14px; border-radius: 12px; border: 2px dashed rgba(127,127,127,.3); background: rgba(127,127,127,.03); text-align: center; font-size: 13px; opacity: .8; cursor: pointer; }
.kb-drop:hover, .kb-drop:focus-visible { border-color: var(--accent, #6b8afd); opacity: 1; }
.kb-drop--over { border-color: var(--accent, #6b8afd); background: rgba(107,138,253,.08); opacity: 1; }
.kb-impact-attach { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.kb-impact-attach__name { font-weight: 600; }
.kb-impact-attach__rm { border: none; background: rgba(127,127,127,.14); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; color: inherit; }
.kb-impact__answer { font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }

/* ============================ INVESTMENT INTELLIGENCE ============================ */
.inv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 8px; }
.inv-controls__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .6; }
.inv-select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface, #fff); color: inherit; font-size: 13.5px; min-width: 260px; max-width: 100%; }
.inv-sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.inv-src { font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.inv-src--on { background: rgba(22,163,74,.14); color: #16a34a; }
.inv-src--off { background: rgba(127,127,127,.14); opacity: .8; }
.inv-note { font-size: 12.5px; opacity: .7; font-style: italic; margin: 6px 0 12px; line-height: 1.5; }
.inv-results { display: flex; flex-direction: column; gap: 12px; }
.inv-results__head { font-weight: 700; font-size: 14px; margin: 0; }
.inv-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.inv-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-card__name { font-weight: 700; font-size: 15px; }
.inv-conf { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: auto; }
.inv-conf--hi { background: rgba(22,163,74,.16); color: #16a34a; }
.inv-conf--mid { background: rgba(245,158,11,.18); color: #b45309; }
.inv-conf--lo { background: rgba(127,127,127,.16); opacity: .85; }
.inv-card__thesis { font-size: 13px; line-height: 1.55; margin: 0; opacity: .9; }
.inv-card__meta { font-size: 12px; opacity: .6; margin: 0; }
.inv-block { display: flex; flex-direction: column; gap: 3px; }
.inv-block__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .55; }
.inv-block__text { font-size: 13px; line-height: 1.5; }
.inv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.inv-chip { font-size: 11.5px; padding: 2px 9px; border-radius: 6px; background: rgba(107,138,253,.14); color: var(--accent, #6b8afd); }
.inv-obj { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.inv-obj__item { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 2px solid rgba(127,127,127,.2); }
.inv-obj__risk { font-size: 12.5px; font-weight: 600; }
.inv-obj__resp { font-size: 12.5px; opacity: .75; }
.inv-card__sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(127,127,127,.14); }
.inv-source { font-size: 11.5px; color: var(--accent, #6b8afd); text-decoration: none; overflow-wrap: anywhere; }
.inv-source::after { content: " ↗"; opacity: .6; }
.inv-source:hover { text-decoration: underline; }

/* Investment — pack documents (tranche 2) */
.inv-input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface, #fff); color: inherit; font-size: 13.5px; min-width: 240px; flex: 1 1 auto; }
.inv-doc { margin-top: 12px; }
.inv-doc-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.inv-doc__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-doc__title { font-weight: 700; font-size: 15px; }
.inv-doc__downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-doc__dl { font-variant-numeric: tabular-nums; }
.inv-doc__section { border-top: 1px solid rgba(127,127,127,.12); padding-top: 8px; }
.inv-doc__section:first-of-type { border-top: 0; }
.inv-doc__h { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; }
.inv-doc__body { margin: 0; font-size: 13px; line-height: 1.55; white-space: pre-wrap; opacity: .92; }

/* Investment — coaching (t3) + approche (t4) */
.inv-coach, .inv-reach { margin-top: 10px; }
.inv-prep { margin: 4px 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.inv-prep__item { font-size: 13px; line-height: 1.5; }
.inv-reach__created { font-size: 12.5px; font-weight: 600; color: #16a34a; background: rgba(22,163,74,.10); padding: 8px 10px; border-radius: 8px; margin: 0 0 6px; }
.inv-reach__subject { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.inv-reach__subject-val { font-weight: 700; font-size: 14px; }
.inv-reach__body { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.6; margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(127,127,127,.06); border: 1px solid rgba(127,127,127,.14); overflow-x: auto; }

/* Boutons Services/Skills : panneau de détails repliable */
.tool-det { margin: 6px 0 2px; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.06); border: 1px solid rgba(127,127,127,.12); display: flex; flex-direction: column; gap: 2px; }
.tool-det__row { margin: 0; font-size: 12px; opacity: .8; overflow-wrap: anywhere; }

/* ============================ SURVEILLANCE ============================ */
.surv-overview__card { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin: 10px 0 8px; }
.surv-score { display: flex; align-items: baseline; gap: 2px; font-weight: 800; }
.surv-score__num { font-size: 40px; line-height: 1; }
.surv-score__unit { font-size: 15px; opacity: .55; }
.surv-score--ok { color: #16a34a; }
.surv-score--mid { color: #b45309; }
.surv-score--lo { color: #dc2626; }
.surv-overview__label { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .55; }
.surv-overview__counts { margin: 3px 0 0; font-size: 14px; }
.surv-components { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 8px; }
.surv-comp { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid transparent; }
.surv-comp--ok { border-left-color: #16a34a; }
.surv-comp--mid { border-left-color: #f59e0b; }
.surv-comp--lo { border-left-color: #dc2626; }
.surv-comp__head { display: flex; align-items: center; gap: 8px; }
.surv-comp__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.surv-comp__dot--ok { background: #16a34a; }
.surv-comp__dot--mid { background: #f59e0b; }
.surv-comp__dot--lo { background: #dc2626; }
.surv-comp__label { flex: 1 1 auto; overflow-wrap: anywhere; }
.surv-comp__score { font-size: 12px; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; }
.surv-comp__sub { margin: 0; font-size: 11.5px; opacity: .6; }
.surv-comp__link { align-self: flex-start; text-decoration: none; }
.surv-incidents { display: flex; flex-direction: column; gap: 10px; }
.surv-inc { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid transparent; }
.surv-inc--hi { border-left-color: #dc2626; }
.surv-inc--mid { border-left-color: #f59e0b; }
.surv-inc--lo { border-left-color: rgba(127,127,127,.4); }
.surv-inc__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.surv-inc__level { font-size: 11px; font-weight: 800; padding: 1px 9px; border-radius: 999px; }
.surv-inc__level--hi { background: rgba(220,38,38,.14); color: #dc2626; }
.surv-inc__level--mid { background: rgba(245,158,11,.16); color: #b45309; }
.surv-inc__level--lo { background: rgba(127,127,127,.14); }
.surv-inc__comp { font-weight: 700; font-size: 13px; }
.surv-inc__at { margin-left: auto; font-size: 11px; opacity: .5; font-variant-numeric: tabular-nums; }
.surv-inc__cause { margin: 0; font-weight: 600; font-size: 14px; }
.surv-inc__detail { margin: 0; font-size: 12.5px; opacity: .78; line-height: 1.5; overflow-wrap: anywhere; }
.surv-inc__reco { margin: 2px 0 0; font-size: 12.5px; font-style: italic; opacity: .8; }
.surv-inc__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.surv-inc__locate { text-decoration: none; }
.surv-inc__resolve-input { min-width: 220px; flex: 1 1 220px; }

/* ── Surveillance T2 — onglets + catalogue de contrôles ── */
.surv-tabs { display: flex; gap: 6px; margin: 8px 0 18px; border-bottom: 1px solid var(--border, #e2e8f0); }
.surv-tab { appearance: none; background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--text-muted, #64748b); cursor: pointer; }
.surv-tab:hover { color: var(--text, #0f172a); }
.surv-tab--active { color: var(--accent, #2563eb); border-bottom-color: var(--accent, #2563eb); }
.surv-cat-summary { margin-bottom: 18px; }
.surv-cat-sum__card { display: flex; align-items: center; gap: 18px; padding: 16px 18px; }
.surv-cat-group { margin-bottom: 22px; }
.surv-cat-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.surv-cat-group__title { font-size: 15px; margin: 0; }
.surv-cat-group__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.surv-cat-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.surv-cat-badge--on { background: #dcfce7; color: #166534; }
.surv-cat-badge--off { background: #f1f5f9; color: #475569; }
.surv-cat-badge--warn { background: #fef3c7; color: #92400e; }
.surv-cat-list { display: flex; flex-direction: column; gap: 6px; }
.surv-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-left-width: 3px; border-radius: 8px; background: var(--surface, #fff); }
.surv-ctrl--ok { border-left-color: #16a34a; }
.surv-ctrl--mid { border-left-color: #b45309; }
.surv-ctrl--lo { border-left-color: #94a3b8; }
.surv-ctrl__main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.surv-ctrl__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #94a3b8; }
.surv-ctrl__dot--ok { background: #16a34a; }
.surv-ctrl__dot--mid { background: #b45309; }
.surv-ctrl__dot--lo { background: #94a3b8; }
.surv-ctrl__body { min-width: 0; }
.surv-ctrl__label { display: block; font-size: 14px; }
.surv-ctrl__meta { margin: 2px 0 0; font-size: 12px; color: var(--text-muted, #64748b); overflow-wrap: anywhere; }
.surv-ctrl__side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.surv-ctrl__link { text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .surv-cat-badge--on { background: #14331f; color: #86efac; }
  .surv-cat-badge--off { background: #1e293b; color: #94a3b8; }
  .surv-cat-badge--warn { background: #3a2c08; color: #fcd34d; }
}

/* ── Surveillance T3 — parcours synthétiques ── */
.surv-synth-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 6px 0 16px; }
.surv-synth-summary { font-size: 13px; color: var(--text-muted, #64748b); }
.surv-synth-journeys { display: flex; flex-direction: column; gap: 12px; }
.surv-jrn { padding: 14px 16px; }
.surv-jrn__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.surv-jrn__title { font-size: 15px; }
.surv-jrn__desc { margin: 3px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.surv-jrn__right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.surv-jrn__steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.surv-step { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; background: var(--surface-alt, #f8fafc); }
.surv-step__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #cbd5e1; }
.surv-step--ok .surv-step__dot { background: #16a34a; }
.surv-step--lo .surv-step__dot { background: #dc2626; }
.surv-step--wait .surv-step__dot, .surv-step--app .surv-step__dot { background: #94a3b8; }
.surv-step--auto .surv-step__dot { background: #64748b; }
.surv-step__label { flex: 1 1 auto; font-size: 13px; min-width: 0; }
.surv-step__kind { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; flex: 0 0 auto; }
.surv-step__status { font-size: 12px; color: var(--text-muted, #64748b); flex: 0 0 auto; }
.surv-step--ok .surv-step__status { color: #166534; }
.surv-step--lo .surv-step__status { color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .surv-step { background: #0f172a; }
}

/* ── Surveillance T4 — analyse avancée ── */
.surv-adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.surv-adv-trend { padding: 14px 16px; border-left: 3px solid #94a3b8; }
.surv-adv-trend--ok { border-left-color: #16a34a; }
.surv-adv-trend--mid { border-left-color: #b45309; }
.surv-adv-trend--lo { border-left-color: #94a3b8; }
.surv-adv-trend__head { display: flex; align-items: center; gap: 8px; }
.surv-adv-trend__arrow { font-size: 20px; font-weight: 800; line-height: 1; }
.surv-adv-trend__arrow--ok { color: #16a34a; }
.surv-adv-trend__arrow--mid { color: #b45309; }
.surv-adv-trend__arrow--lo { color: #64748b; }
.surv-adv-trend__label { font-size: 14px; }
.surv-adv-trend__detail { margin: 6px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.surv-adv-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.surv-adv-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-left-width: 3px; border-radius: 8px; background: var(--surface, #fff); }
.surv-adv-row--ok { border-left-color: #16a34a; }
.surv-adv-row--mid { border-left-color: #b45309; }
.surv-adv-row--lo { border-left-color: #dc2626; }
.surv-adv-row__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #94a3b8; }
.surv-adv-row__dot--ok { background: #16a34a; }
.surv-adv-row__dot--mid { background: #b45309; }
.surv-adv-row__dot--lo { background: #dc2626; }
.surv-adv-row__body { flex: 1 1 auto; min-width: 0; }
.surv-adv-row__label { font-size: 14px; }
.surv-adv-row__detail { margin: 2px 0 0; font-size: 12px; color: var(--text-muted, #64748b); overflow-wrap: anywhere; }
.surv-adv-scorechip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px; margin-bottom: 6px; background: #f1f5f9; }
.surv-adv-scorechip--ok { background: #dcfce7; }
.surv-adv-scorechip--mid { background: #fef3c7; }
.surv-adv-scorechip--lo { background: #fee2e2; }
.surv-adv-scorechip__num { font-size: 22px; font-weight: 800; }
.surv-adv-scorechip__label { font-size: 12px; color: var(--text-muted, #475569); }
@media (prefers-color-scheme: dark) {
  .surv-adv-scorechip { background: #1e293b; }
  .surv-adv-scorechip--ok { background: #14331f; }
  .surv-adv-scorechip--mid { background: #3a2c08; }
  .surv-adv-scorechip--lo { background: #3a1414; }
}

/* ── Surveillance T5 — centre d'incidents ── */
.surv-inc-summary { font-size: 13px; color: var(--text-muted, #64748b); margin-bottom: 6px; }
.surv-inc-plan { margin-bottom: 8px; }
.surv-inc-chan { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.surv-inc-groups { display: flex; flex-direction: column; gap: 12px; }
.surv-inc-grp { padding: 14px 16px; border-left: 3px solid #94a3b8; }
.surv-inc-grp--hi { border-left-color: #dc2626; }
.surv-inc-grp--mid { border-left-color: #b45309; }
.surv-inc-grp--lo { border-left-color: #94a3b8; }
.surv-inc-grp__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.surv-inc-grp__title { font-size: 15px; }
.surv-inc-grp__count { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #fee2e2; color: #b91c1c; }
.surv-inc-grp__meta { margin: 4px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.surv-inc-grp__life { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.surv-inc-grp__lifelabel { font-size: 12px; color: var(--text-muted, #64748b); }
.surv-inc-grp__status { min-width: 130px; }
.surv-inc-grp__analysis:not(:empty) { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--surface-alt, #f8fafc); font-size: 13px; }
.surv-inc-grp__analysis-src { margin: 0 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
@media (prefers-color-scheme: dark) {
  .surv-inc-grp__count { background: #3a1414; color: #fca5a5; }
  .surv-inc-grp__analysis:not(:empty) { background: #0f172a; }
}

/* ── Juridique (T1) ── */
.jur-counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.jur-counter { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.jur-counter__num { font-size: 30px; font-weight: 800; line-height: 1; }
.jur-counter__label { font-size: 12px; color: var(--text-muted, #64748b); }
.jur-domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.jur-domain { padding: 12px 14px; border-left: 3px solid #94a3b8; }
.jur-domain--ok { border-left-color: #16a34a; }
.jur-domain--mid { border-left-color: #b45309; }
.jur-domain--lo { border-left-color: #dc2626; }
.jur-domain__label { display: block; font-size: 14px; }
.jur-domain__state { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.jur-domain__note { margin: 6px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.jur-library { display: flex; flex-direction: column; gap: 8px; }
.jur-doc { padding: 12px 14px; }
.jur-doc__title { display: block; font-size: 14px; }
.jur-doc__meta { margin: 3px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.jur-assist-answer { margin-bottom: 12px; }
.jur-assist__card { padding: 14px 16px; }
.jur-assist__card--refus { border-left: 3px solid #b45309; }
.jur-assist__md { font-size: 14px; line-height: 1.55; }
.jur-assist__sources { margin: 10px 0 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.jur-assist__loading { color: var(--text-muted, #64748b); font-size: 14px; margin: 0; }
.jur-assist-form { display: flex; gap: 8px; }
.jur-assist-form .inv-input { flex: 1 1 auto; }
.jur-roadmap { display: flex; flex-direction: column; gap: 5px; }
.jur-road { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; background: var(--surface-alt, #f8fafc); opacity: .75; }
.jur-road--live { opacity: 1; background: #dcfce7; }
.jur-road__badge { flex: 0 0 auto; min-width: 42px; text-align: center; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.jur-road--live .jur-road__badge { background: #16a34a; color: #fff; }
.jur-road__name { font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .jur-road { background: #0f172a; }
  .jur-road--live { background: #14331f; }
}

/* ── Juridique T2 — analyse & génération ── */
.jur-drop { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px; margin-bottom: 10px; border: 2px dashed var(--border, #cbd5e1); border-radius: 12px; color: var(--text-muted, #64748b); cursor: pointer; text-align: center; }
.jur-drop:hover, .jur-drop--over { border-color: #f97316; color: #f97316; background: rgba(249,115,22,.05); }
.jur-drop__input { display: none; }
.jur-textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; resize: vertical; }
.jur-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.jur-filename { font-size: 12px; color: var(--text-muted, #64748b); }
.jur-result { margin-top: 8px; }
.jur-result__card { padding: 16px 18px; }
.jur-gen-row { margin-bottom: 10px; }
.jur-gen-type { min-width: 260px; }
.jur-gen-example { margin: 6px 0 10px; }
.jur-gen-example summary { cursor: pointer; font-size: 13px; color: var(--text-muted, #64748b); }
.jur-gen-example .jur-textarea { margin-top: 8px; }
.jur-draft-banner { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .jur-draft-banner { background: #3a2c08; color: #fcd34d; }
}

/* ── Juridique T3 — cycle de vie & échéances ── */
.jur-newdoc { margin-bottom: 12px; }
.jur-newdoc summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent, #2563eb); }
.jur-newdoc__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.jur-newdoc__form .inv-input { flex: 1 1 160px; }
.jur-nd-type { flex: 1 1 200px; }
.jur-nd-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted, #64748b); }
.jur-doc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.jur-doc__lifelabel { font-size: 12px; color: var(--text-muted, #64748b); }
.jur-doc__status { min-width: 150px; }

/* ── Juridique T4 — litiges & preuves ── */
.jur-doc__head2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jur-case__status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.jur-case-detail { margin-top: 14px; }
.jur-case__card { padding: 16px 18px; }
.jur-case__title { margin: 0 0 8px; font-size: 16px; }
.jur-sub { margin: 14px 0 6px; font-size: 13px; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: .03em; }
.jur-facts { margin: 0; padding-left: 18px; font-size: 13px; }
.jur-facts li { margin: 2px 0; }
.jur-evidence { display: flex; flex-direction: column; gap: 6px; }
.jur-ev { padding: 8px 10px; border: 1px solid var(--border, #e2e8f0); border-left: 3px solid #64748b; border-radius: 7px; background: var(--surface, #fff); }
.jur-ev__title { font-size: 13px; }
.jur-ev__meta { margin: 2px 0 0; font-size: 11px; color: var(--text-muted, #64748b); overflow-wrap: anywhere; }
.jur-assist-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.jur-case__assist-result { margin-top: 12px; }

/* ── Juridique T5 — conformité ── */
.jur-verdict { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.jur-verdict--ok { background: #dcfce7; color: #166534; }
.jur-verdict--mid { background: #fef3c7; color: #92400e; }
.jur-verdict--lo { background: #fee2e2; color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .jur-verdict--ok { background: #14331f; color: #86efac; }
  .jur-verdict--mid { background: #3a2c08; color: #fcd34d; }
  .jur-verdict--lo { background: #3a1414; color: #fca5a5; }
}
/* T7 — modèles de documents */
.jur-modeles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.jur-modele-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface, #fff); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.jur-modele-card:hover { border-color: #a855f7; box-shadow: 0 2px 8px rgba(168, 85, 247, .15); }
.jur-modele-card__title { font-size: 14px; font-weight: 700; color: var(--text, #0f172a); }
.jur-modele-card__struct { font-size: 12px; color: var(--text-muted, #64748b); line-height: 1.4; }
.jur-modeles-gen { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border, #e2e8f0); }
/* T6/T7 — risques, rapports, pilotage */
.jur-risk-src { font-size: 11px; font-weight: 500; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.jur-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.jur-set-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted, #64748b); }
.jur-set-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text, #0f172a); }
@media (prefers-color-scheme: dark) { .jur-set-check { color: #e2e8f0; } }
@media (prefers-color-scheme: dark) {
  .jur-modele-card { border-color: #2a2a3a; background: #16161f; }
  .jur-modele-card__title { color: #e2e8f0; }
  .jur-modele-card__struct { color: #94a3b8; }
  .jur-modeles-gen { border-color: #2a2a3a; }
}


/* ============================================================================
   RANGÉE BUSINESS DU COCKPIT — les chiffres d'argent.
   Volontairement plus sobre que la grille de KPIs système : ici, une tuile SANS
   chiffre est un cas NORMAL et fréquent (source non branchée, schéma à valider).
   Elle doit rester lisible et non alarmante — l'absence de mesure est une
   information honnête, pas une erreur.
   ========================================================================== */
.business {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.business__banner {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  border-left: 4px solid var(--info);
  background: var(--surface-2, rgba(127, 127, 127, 0.06));
  color: var(--text-muted);
}
.business__banner--ok { border-left-color: var(--ok); }
.business__banner--warn { border-left-color: var(--warn); }
.business__banner--off { border-left-color: var(--text-muted); }

.business__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp-3);
}
.business-kpi {
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--info);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.business-kpi--ok { border-left-color: var(--ok); }
.business-kpi--warn { border-left-color: var(--warn); }
.business-kpi--info { border-left-color: var(--info); }
/* Tuile sans mesure : accent neutre, jamais rouge — ne rien savoir n'est pas une panne. */
.business-kpi--unknown { border-left-color: var(--text-muted); }

.business-kpi__value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  /* Les montants multi-devises peuvent être longs : on les laisse respirer. */
  overflow-wrap: anywhere;
}
.business-kpi__value--none {
  color: var(--text-muted);
  font-weight: 500;
}
.business-kpi__label {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}
.business-kpi__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.business-kpi__state {
  align-self: flex-start;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1));
  color: var(--text-muted);
}

.business__chart,
.business__stores {
  padding: var(--sp-4) var(--sp-5);
}
.business__chart-title {
  margin: 0 0 var(--sp-3);
  font-size: 0.86rem;
  font-weight: 600;
}
.business__spark {
  width: 100%;
  height: auto;
  /* Une courbe de tendance se lit d'un coup d'œil : on la borne pour qu'elle
     n'écrase pas les tuiles chiffrées au-dessus, qui restent l'information
     principale. */
  max-height: 150px;
  display: block;
}
.business__spark-line {
  fill: none;
  stroke: #e91e8c;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.business__store-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.business__store {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 3fr auto;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.84rem;
}
.business__store-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business__store-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f57c00, #e91e8c);
}
.business__store-value {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.business__store-bar--1 { width: 5%; }
.business__store-bar--2 { width: 10%; }
.business__store-bar--3 { width: 15%; }
.business__store-bar--4 { width: 20%; }
.business__store-bar--5 { width: 25%; }
.business__store-bar--6 { width: 30%; }
.business__store-bar--7 { width: 35%; }
.business__store-bar--8 { width: 40%; }
.business__store-bar--9 { width: 45%; }
.business__store-bar--10 { width: 50%; }
.business__store-bar--11 { width: 55%; }
.business__store-bar--12 { width: 60%; }
.business__store-bar--13 { width: 65%; }
.business__store-bar--14 { width: 70%; }
.business__store-bar--15 { width: 75%; }
.business__store-bar--16 { width: 80%; }
.business__store-bar--17 { width: 85%; }
.business__store-bar--18 { width: 90%; }
.business__store-bar--19 { width: 95%; }
.business__store-bar--20 { width: 100%; }

@media (prefers-color-scheme: dark) {
  .business__banner { background: rgba(255, 255, 255, 0.04); }
  .business-kpi__state { background: rgba(255, 255, 255, 0.07); }
}

/* --- Onglet Business de la Surveillance : signaux liés aux revenus. --- */
.surv-biz-signals { margin-top: var(--sp-3); }
.surv-biz-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.surv-biz-item {
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--warn);
}
.surv-biz-item--info { border-left-color: var(--info); }
.surv-biz-item--warn { border-left-color: var(--warn); }
.surv-biz-item--high { border-left-color: var(--crit); }
.surv-biz-item__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.surv-biz-item__type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1));
  color: var(--text-muted);
}
.surv-biz-item__label { font-weight: 600; }
.surv-biz-item__detail {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}
.surv-biz-item__rows {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   MISSION CONTROL — la carte vivante. Densité assumée : l'écran doit tenir
   l'écosystème entier sans défilement infini, tout en gardant chaque nœud
   cliquable et lisible au clavier.
   ========================================================================== */
.mission-kill {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 12px;
  font-weight: 600;
  border-left: 4px solid var(--crit);
  background: var(--crit-bg, rgba(200, 30, 30, 0.08));
}
.mission-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.mission-tile { padding: var(--sp-4) var(--sp-5); border-left: 4px solid var(--info); }
.mission-tile--ok { border-left-color: var(--ok); }
.mission-tile--degraded { border-left-color: var(--warn); }
.mission-tile--down { border-left-color: var(--crit); }
.mission-tile--unknown { border-left-color: var(--text-muted); }
.mission-tile__value { margin: 0; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.mission-tile__label { margin: 2px 0 0; font-size: 0.82rem; color: var(--text-muted); }
.mission-note {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--surface-2, rgba(127, 127, 127, 0.06));
  color: var(--text-muted);
}

.mission-map { display: flex; flex-direction: column; gap: var(--sp-4); }
.mission-layer {
  border: 1px solid var(--border, rgba(127, 127, 127, 0.2));
  border-radius: 14px;
  padding: var(--sp-4) var(--sp-5);
}
.mission-layer__head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.mission-layer__title { margin: 0; font-size: 1rem; }
.mission-layer__count { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mission-layer__hint { margin: 2px 0 var(--sp-3); font-size: 0.8rem; color: var(--text-muted); }
.mission-layer__empty { margin: 0; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

.mission-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: var(--sp-3);
}
.mission-node {
  display: grid;
  grid-template-columns: 12px 1fr;
  grid-template-areas: "dot label" ". detail" ". source";
  gap: 2px var(--sp-3);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.2));
  text-decoration: none;
  color: inherit;
  align-items: start;
}
a.mission-node:hover { border-color: #e91e8c; }
a.mission-node:focus-visible { outline: 3px solid #e91e8c; outline-offset: 2px; }
.mission-node__dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--text-muted);
}
.mission-node--ok .mission-node__dot { background: var(--ok); }
.mission-node--degraded .mission-node__dot { background: var(--warn); }
.mission-node--down .mission-node__dot { background: var(--crit); }
.mission-node__label { grid-area: label; font-weight: 600; font-size: 0.86rem; overflow-wrap: anywhere; }
.mission-node__detail { grid-area: detail; font-size: 0.76rem; color: var(--text-muted); }
.mission-node__source { grid-area: source; font-size: 0.7rem; color: var(--text-muted); opacity: 0.75; }

.mission-inc-list,
.mission-stream-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mission-inc { padding: 10px 14px; border-left: 4px solid var(--warn); display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: baseline; }
.mission-inc--critique { border-left-color: var(--crit); }
.mission-inc--eleve { border-left-color: var(--warn); }
.mission-inc--info { border-left-color: var(--info); }
.mission-inc__level {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1)); color: var(--text-muted);
}
.mission-inc__title { font-weight: 600; font-size: 0.88rem; }
.mission-inc__meta { font-size: 0.76rem; color: var(--text-muted); }

.mission-stream__row {
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(90px, auto) 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border, rgba(127, 127, 127, 0.14));
  font-size: 0.82rem;
}
.mission-stream__when { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mission-stream__actor { color: var(--text-muted); }
.mission-stream__action { overflow-wrap: anywhere; }

/* ============================================================================
   SIMULATION — « voir avant d'approuver ». La garantie « aucun effet de bord »
   est répétée en haut ET au pied du résultat : c'est la promesse de l'écran,
   elle ne doit jamais être hors du champ de vision.
   ========================================================================== */
.sim-guarantee {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border-left: 4px solid var(--ok);
  background: var(--ok-bg, rgba(46, 125, 50, 0.08));
}
.sim-form { margin-bottom: var(--sp-4); }
.sim-form__label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.sim-form__row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.sim-form__input { flex: 1 1 320px; }
.sim-form__hint { margin: 6px 0 0; font-size: 0.78rem; color: var(--text-muted); }

.sim-result { margin-bottom: var(--sp-4); }
.sim-card { padding: var(--sp-4) var(--sp-5); border-left: 4px solid var(--info); }
.sim-card--prepared { border-left-color: var(--ok); }
.sim-card--need_info { border-left-color: var(--warn); }
.sim-card--unavailable { border-left-color: var(--text-muted); }
.sim-card__head { display: flex; gap: var(--sp-3); align-items: baseline; flex-wrap: wrap; }
.sim-card__status {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1)); color: var(--text-muted);
}
.sim-card__action { font-weight: 700; font-size: 1.05rem; }
.sim-card__risk { font-size: 0.76rem; color: var(--text-muted); }
.sim-card__service { margin: 4px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.sim-card__summary,
.sim-card__question,
.sim-card__note,
.sim-card__line { margin: 8px 0 0; font-size: 0.86rem; line-height: 1.5; }
.sim-card__question { font-weight: 600; }
.sim-card__note { color: var(--text-muted); }
.sim-card__guarantee {
  margin: var(--sp-4) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.18));
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.sim-block { margin-top: var(--sp-3); }
.sim-block__title { margin: 0 0 4px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sim-block__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sim-block__item { font-size: 0.85rem; padding-left: 14px; position: relative; }
.sim-block__item::before { content: "·"; position: absolute; left: 4px; color: var(--text-muted); }

.sim-catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: var(--sp-3);
}
.sim-action {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border-left: 4px solid var(--ok);
  font: inherit;
  color: inherit;
}
.sim-action--preparation { border-left-color: var(--warn); }
.sim-action--absent { border-left-color: var(--text-muted); }
.sim-action:focus-visible { outline: 3px solid #e91e8c; outline-offset: 2px; }
.sim-action__head { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; }
.sim-action__name { font-weight: 600; font-size: 0.9rem; }
.sim-action__state { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.sim-action__service { font-size: 0.76rem; color: var(--text-muted); }
.sim-action__desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ============================================================================
   COUVERTURE DE LA FLOTTE — le chiffre qui compte vraiment. Placé AVANT la
   grille des agents : on doit savoir combien sont nourris avant de compter
   combien il y en a.
   ========================================================================== */
.fleet-cov { margin-bottom: var(--sp-4); }
.fleet-cov__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
}
.fleet-cov__tile { padding: var(--sp-3) var(--sp-4); border-left: 4px solid var(--info); }
.fleet-cov__tile--ok { border-left-color: var(--ok); }
.fleet-cov__tile--warn { border-left-color: var(--warn); }
.fleet-cov__tile--unknown { border-left-color: var(--text-muted); }
.fleet-cov__value { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.fleet-cov__label { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.fleet-cov__note {
  margin: var(--sp-3) 0 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  background: var(--surface-2, rgba(127, 127, 127, 0.06));
}
.fleet-cov__excluded { margin: 6px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.fleet-cov__unwatched {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  border-left: 4px solid var(--warn);
  background: var(--warn-bg, rgba(180, 83, 9, 0.07));
}
.fleet-cov__unwatched-title { margin: 0 0 6px; font-size: 0.84rem; font-weight: 600; }
.fleet-cov__unwatched-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fleet-cov__event {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

/* Badge d'état de source sur la carte d'un agent. Volontairement discret pour
   « alimenté » et lisible pour les deux cas qui demandent une action. */
.agent-card__source {
  /* La carte d'agent est un conteneur flex : sans `align-self`/`width`, le badge
     serait étiré sur toute la largeur et ressemblerait à un bandeau d'alerte. */
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1));
  color: var(--text-muted);
}
.agent-card__source--live { background: var(--ok-bg, rgba(46, 125, 50, 0.12)); color: var(--ok); }
.agent-card__source--dormant { background: var(--warn-bg, rgba(180, 83, 9, 0.12)); color: var(--warn); }

/* Matrice skill → directeurs. */
.skill-card__agents {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  font-size: 0.76rem;
}
.skill-card__agents--none { color: var(--text-muted); font-style: italic; }
.skill-card__agents-label { color: var(--text-muted); margin-right: 2px; }
.skill-card__agent-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
}
.skill-card__agent-chip:hover { background: rgba(233, 30, 140, 0.15); }
.skill-card__agent-chip:focus-visible { outline: 3px solid #e91e8c; outline-offset: 2px; }

/* ============================================================================
   FICHE DE PERFORMANCE DES MOTEURS — un tableau dense, mais qui doit rester
   lisible sur petit écran : il défile horizontalement dans son propre cadre
   plutôt que de faire déborder la page.
   ========================================================================== */
.scorecard { padding: var(--sp-4) var(--sp-5); }
.scorecard__scroll { overflow-x: auto; }
.scorecard__table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.scorecard__table th,
.scorecard__table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, rgba(127, 127, 127, 0.16));
  white-space: nowrap;
}
.scorecard__table th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.scorecard__engine { white-space: normal; min-width: 210px; }
.scorecard__engine-name { display: block; font-weight: 600; }
.scorecard__verdict { display: block; font-size: 0.74rem; color: var(--text-muted); line-height: 1.35; }
.scorecard__rate { font-variant-numeric: tabular-nums; font-weight: 600; }
.scorecard__rate--bad { color: var(--crit); }
.scorecard__unit { font-variant-numeric: tabular-nums; font-weight: 600; }
.scorecard__row--unmeasured { opacity: 0.6; }
.scorecard__note { margin: var(--sp-3) 0 0; font-size: 0.84rem; line-height: 1.5; }
.scorecard__empty { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.scorecard__caveat {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.16));
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Badge de PROVENANCE (Radar) ─────────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.trust-badge--measured { background: var(--ok-bg, rgba(46, 125, 50, 0.14)); color: var(--ok); }
.trust-badge--sourced { background: rgba(59, 130, 246, 0.14); color: #2563eb; }
.trust-badge--model { background: var(--warn-bg, rgba(180, 83, 9, 0.14)); color: var(--warn); }
.trust-badge__count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}
.radar-trust { margin-bottom: var(--sp-3); }
.radar-trust__row { display: flex; flex-wrap: wrap; gap: 6px; }
.radar-trust__note { margin: 6px 0 0; font-size: 0.78rem; color: var(--text-muted); }

/* ── Diff bénéfice / risque / coût ───────────────────────────────────────── */
.radar-diff {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.2));
}
.radar-diff__title { margin: 0 0 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.radar-diff__row {
  display: grid;
  grid-template-columns: minmax(120px, auto) auto 1fr;
  gap: 4px var(--sp-3);
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.12));
}
.radar-diff__row:first-of-type { border-top: 0; }
.radar-diff__label { font-weight: 600; font-size: 0.82rem; }
.radar-diff__value { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; }
.radar-diff__value--none { color: var(--text-muted); font-weight: 500; }
.radar-diff__evidence { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.radar-diff__why { grid-column: 1 / -1; margin: 2px 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }

/* ── Frise d'audit par décision ──────────────────────────────────────────── */
.audit-stories__note { margin: 0 0 var(--sp-3); font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; }
.audit-stories { display: flex; flex-direction: column; gap: var(--sp-3); }
.story { padding: var(--sp-4) var(--sp-5); }
.story__head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.story__capability { font-weight: 600; }
.story__summary { margin: 6px 0 var(--sp-3); font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }
.story__steps { list-style: none; margin: 0; padding: 0 0 0 var(--sp-4); position: relative; }
/* Le trait vertical qui fait la « frise » : il relie visuellement les étapes d'une même décision. */
.story__steps::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border, rgba(127, 127, 127, 0.25));
}
.story__step {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.8rem;
}
.story__dot {
  position: absolute;
  left: calc(-1 * var(--sp-4) + 1px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e91e8c;
}
.story__when { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.story__actor { font-weight: 600; }
.story__detail { flex-basis: 100%; margin: 2px 0 0; font-size: 0.76rem; color: var(--text-muted); }

/* ============================================================================
   PORTÉE DES PERMISSIONS — décrire un droit sur plusieurs axes, et pouvoir
   révoquer tout un ensemble. Les boutons sont volontairement en style DANGER :
   le seul geste offert ici retire du privilège.
   ========================================================================== */
.perm-scopes { display: flex; flex-direction: column; gap: var(--sp-3); }
.perm-scopes__empty { margin: 0; font-size: 0.86rem; color: var(--text-muted); font-style: italic; }
.perm-scopes__axes { padding: var(--sp-4) var(--sp-5); }
.perm-scopes__axes-title { margin: 0 0 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.perm-scopes__axes-row { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-scopes__axis { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.perm-scopes__axis-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}
.perm-scopes__note {
  margin: var(--sp-3) 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.16));
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.perm-scopes__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.perm-scopes__item { padding: var(--sp-3) var(--sp-4); }
.perm-scopes__item-head { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; flex-wrap: wrap; }
.perm-scopes__item-cap { font-weight: 600; font-size: 0.88rem; }
.perm-scopes__item-exp { font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.perm-scopes__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.perm-scopes__chip {
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}
/* Une couleur par axe : on repère d'un coup d'œil « tout ce qui touche à cet agent ». */
.perm-scopes__chip--agent { background: rgba(233, 30, 140, 0.14); color: #c2185b; }
.perm-scopes__chip--domain { background: rgba(59, 130, 246, 0.14); color: #2563eb; }
.perm-scopes__chip--level { background: var(--warn-bg, rgba(180, 83, 9, 0.14)); color: var(--warn); }

/* ============================================================================
   NAVIGATION GROUPÉE — 29 écrans en 6 familles repliables. Une liste plate de
   29 items oblige à relire tout le sidebar pour trouver un écran ; les familles
   ramènent la recherche à « quel type de chose je veux faire ? ».
   ========================================================================== */
.app-nav__group { list-style: none; }
.app-nav__details { margin-bottom: 2px; }
.app-nav__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-radius: 8px;
  user-select: none;
}
.app-nav__summary::-webkit-details-marker { display: none; }
/* Chevron maison : il tourne à l'ouverture. Aucune image, aucune police d'icônes. */
.app-nav__summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
  flex: none;
}
.app-nav__details[open] > .app-nav__summary::before { transform: rotate(90deg); }
.app-nav__summary:hover { background: var(--surface-2, rgba(127, 127, 127, 0.08)); color: inherit; }
.app-nav__summary:focus-visible { outline: 3px solid #e91e8c; outline-offset: 2px; }
.app-nav__sublist { list-style: none; margin: 0 0 4px; padding: 0; }
/* Léger retrait + filet vertical : on voit d'un coup d'œil ce qui appartient à la famille. */
.app-nav__sublist > li { position: relative; padding-left: 10px; }
.app-nav__sublist::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 1px;
  top: 2px;
  bottom: 6px;
  background: var(--border, rgba(127, 127, 127, 0.18));
}
.app-nav__sublist { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .app-nav__summary::before { transition: none; }
}

/* ============================================================================
   ORACLE — l'écran qui manquait à une source qui existait déjà.
   ========================================================================== */
.oracle-note {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  background: var(--surface-2, rgba(127, 127, 127, 0.06));
  color: var(--text-muted);
}
.oracle-analyses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-3);
}
.oracle-analysis { padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: 6px; }
.oracle-analysis__head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.oracle-analysis__name { font-weight: 600; font-size: 0.9rem; }
/* Une analyse sensible se repère AVANT de cliquer, pas après. */
.oracle-analysis__pii {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--crit-bg, rgba(200, 30, 30, 0.1));
  color: var(--crit);
}
.oracle-analysis__desc { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.oracle-analysis__src {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.oracle-result { margin-top: var(--sp-4); }
.oracle-result__card { padding: var(--sp-4) var(--sp-5); }
.oracle-result__title { margin: 0; font-weight: 700; }
.oracle-result__meta { margin: 4px 0 var(--sp-3); font-size: 0.78rem; color: var(--text-muted); }
.oracle-result__err { margin: 0; font-size: 0.86rem; color: var(--crit); }
.oracle-result__empty { margin: 0; font-size: 0.84rem; color: var(--text-muted); font-style: italic; }
.oracle-result__scroll { overflow-x: auto; }
.oracle-result__table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.oracle-result__table th,
.oracle-result__table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border, rgba(127, 127, 127, 0.16));
  white-space: nowrap;
}
.oracle-result__table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.oracle-watch { margin-top: var(--sp-3); }

/* ============================================================================
   SOURCES EXPLIQUÉES — le lien, puis POURQUOI il est là, puis sa limite.
   La justification est en retrait sous le lien : on lit d'abord la source,
   on comprend ensuite. La limite est visuellement distincte pour qu'on ne
   la confonde pas avec un argument en faveur de la source.
   ========================================================================== */
.radar-src__intro {
  margin: 2px 0 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
}
.radar-src__item--explained {
  padding: 8px 0;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.14));
}
.radar-src__item--explained:first-child { border-top: 0; padding-top: 0; }
.radar-src__head { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.radar-src__ext { font-size: 0.72rem; color: var(--text-muted); flex: none; }
.radar-src__plain { font-size: 0.86rem; }
.radar-src__why {
  margin: 3px 0 0 var(--sp-4);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}
/* La limite ne doit PAS se lire comme un argument : filet d'avertissement à gauche. */
.radar-src__caveat {
  margin: 4px 0 0 var(--sp-4);
  padding-left: 8px;
  border-left: 2px solid var(--warn);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--warn);
}

/* ============================================================================
   FLUX DE RÉFLEXION DE L'ECIP — les étapes réelles pendant l'attente.
   ========================================================================== */
.ecip-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ecip-step { display: flex; align-items: baseline; gap: 8px; font-size: 0.82rem; flex-wrap: wrap; }
.ecip-step__icon { width: 14px; flex: none; text-align: center; color: var(--text-muted); }
.ecip-step--done .ecip-step__icon { color: var(--ok); }
.ecip-step--failed .ecip-step__icon { color: var(--crit); }
/* L'étape en cours pulse doucement : on voit que le système travaille, sans animation agressive. */
.ecip-step--running .ecip-step__icon { color: #e91e8c; animation: ecip-step-pulse 1.1s ease-in-out infinite; }
@keyframes ecip-step-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.ecip-step__label { font-weight: 600; }
.ecip-step--failed .ecip-step__label { color: var(--crit); }
.ecip-step__detail { color: var(--text-muted); font-size: 0.78rem; }
.ecip-step--elapsed { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ecip-step--elapsed .ecip-step__label { font-weight: 400; font-size: 0.76rem; }
@media (prefers-reduced-motion: reduce) {
  .ecip-step--running .ecip-step__icon { animation: none; }
}

/* ============================================================================
   RAYON D'IMPACT — le nœud au centre, un anneau par distance.
   ========================================================================== */
.blast__wrap { margin-top: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
.blast__title { margin: 0 0 var(--sp-3); font-size: 0.88rem; font-weight: 600; }
.blast { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.blast__ring { fill: none; stroke: var(--border, rgba(127, 127, 127, 0.28)); stroke-dasharray: 3 5; }
.blast__ring-label { font-size: 11px; fill: var(--text-muted); }
.blast__link { stroke: var(--border, rgba(127, 127, 127, 0.35)); stroke-width: 1; }
.blast__node { stroke: var(--surface, #fff); stroke-width: 1.5; cursor: help; }
.blast__root { fill: #e91e8c; stroke: var(--surface, #fff); stroke-width: 3; }
.blast__root-label { font-size: 13px; font-weight: 700; fill: currentColor; }
.blast__note { margin: var(--sp-3) 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================================================
   LABORATOIRE D'INNOVATION — des initiatives qui portent leur preuve.
   ========================================================================== */
.lab-note {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  background: var(--surface-2, rgba(127, 127, 127, 0.06));
  color: var(--text-muted);
}
.lab-list { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.lab-item { padding: var(--sp-4) var(--sp-5); border-left: 4px solid #e91e8c; }
.lab-item__head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.lab-item__score {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 2.2em;
}
.lab-item__name { font-weight: 600; flex: 1 1 240px; }
.lab-item__domain { font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
/* La preuve est le cœur de l'initiative : filet à gauche pour qu'on la lise comme un constat. */
.lab-item__evidence {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--border, rgba(127, 127, 127, 0.3));
  font-size: 0.84rem;
  line-height: 1.5;
}
.lab-item__metrics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lab-item__metric {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1));
  color: var(--text-muted);
}
.lab-item__metric-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.lab-item__go { display: inline-block; margin-top: 8px; }

/* ── Taux d'approbation par agent : « pas d'avis » se distingue de « mauvais ». ── */
.agent-card__quality {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2, rgba(127, 127, 127, 0.1));
  color: var(--text-muted);
  cursor: help;
}
.agent-card__quality-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.agent-card__quality--good { background: var(--ok-bg, rgba(46, 125, 50, 0.12)); color: var(--ok); }
.agent-card__quality--mid { background: var(--warn-bg, rgba(180, 83, 9, 0.12)); color: var(--warn); }
.agent-card__quality--bad { background: var(--crit-bg, rgba(200, 30, 30, 0.1)); color: var(--crit); }
/* Aucun taux : gris neutre, jamais rouge — une absence de mesure n'est pas un échec. */
.agent-card__quality--none { opacity: 0.75; }
.agent-quality__caveat {
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--border, rgba(127, 127, 127, 0.3));
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ============================================================================
   BULLE « POINTER & EXPLIQUER » — détail repliable + accès à l'aide complète.
   La bulle reste courte par défaut ; le détail se déplie à la demande, sinon
   elle deviendrait un panneau d'aide bis et perdrait son intérêt.
   ========================================================================== */
.inspect-pop__act {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
}
.inspect-pop__act .btn { font-size: 0.78rem; padding: 5px 12px; }
.inspect-pop__detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.2));
}
.inspect-detail__list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(70px, auto) 1fr;
  gap: 3px var(--sp-3);
  font-size: 0.78rem;
}
.inspect-detail__k { margin: 0; color: var(--text-muted); }
.inspect-detail__v { margin: 0; overflow-wrap: anywhere; }
.inspect-detail__h { margin: 10px 0 4px; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); }
.inspect-detail__points { margin: 0; padding-left: 16px; font-size: 0.78rem; line-height: 1.5; }
.inspect-detail__more { margin: 8px 0 0; font-size: 0.74rem; color: var(--text-muted); font-style: italic; }

/* ============================================================================
   RECHERCHE GLOBALE — repliée en bouton tant qu'on ne s'en sert pas, pour ne
   pas encombrer un en-tête déjà chargé.
   ========================================================================== */
.gsearch { position: relative; display: flex; align-items: center; gap: 6px; }
.gsearch__btn { display: inline-flex; align-items: center; gap: 6px; }
.gsearch__field {
  width: 230px;
  max-width: 42vw;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #1f1330;
  font: inherit;
  font-size: 0.86rem;
}
.gsearch__field:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.gsearch__results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 240;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gsearch__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.gsearch__item:hover,
.gsearch__item--active { background: var(--surface-2, rgba(127, 127, 127, 0.1)); }
.gsearch__item:focus-visible { outline: 3px solid #e91e8c; outline-offset: -2px; }
.gsearch__item-head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.gsearch__item-label { font-weight: 600; font-size: 0.88rem; }
.gsearch__item-family {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.gsearch__item-lead { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
/* Sur petit écran, le libellé du bouton disparaît : l'icône suffit. */
@media (max-width: 900px) {
  .gsearch__btn-label { display: none; }
  .gsearch__field { width: 150px; }
}

/* Note et repli ECIP dans les résultats de recherche. */
.gsearch__note {
  margin: 4px 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border, rgba(127, 127, 127, 0.16));
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.gsearch__item--ecip { border: 1px dashed var(--border, rgba(127, 127, 127, 0.3)); }
.gsearch__item--ecip .gsearch__item-label { color: #e91e8c; }

/* Section trouvée par la recherche : soulignée brièvement, sinon on atterrit sur un écran
   long sans savoir où regarder. */
.search-hit {
  outline: 3px solid #e91e8c;
  outline-offset: 6px;
  border-radius: 6px;
  transition: outline-color 0.4s ease;
}
@media (prefers-reduced-motion: reduce) { .search-hit { transition: none; } }
.help-panel__sub { margin: 10px 0 4px; font-weight: 600; font-size: 0.86rem; }
.help-panel__screen-title { margin: 0 0 6px; font-size: 0.98rem; font-weight: 700; }
.help-panel__detail { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.55; }

/* Boîte de réception de constats — présente sur plusieurs écrans, même objet affiché plusieurs
   fois. La barre de gauche porte la gravité ; le badge, l'avancement du traitement. */
.findings-inbox[hidden] { display: none; }
.finding-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.finding-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  background: var(--surface);
}
.finding-card--crit,
.finding-card--critical { border-left-color: var(--crit); }
.finding-card--high { border-left-color: var(--warn); }
.finding-card--warn { border-left-color: var(--warn); }
.finding-card--low,
.finding-card--info { border-left-color: var(--text-muted); }
.finding-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.finding-card__title { font-weight: 600; flex: 1; }
.finding-card__occ {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}
.finding-card__body {
  margin: var(--sp-2) 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.finding-card__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}
.finding-card__tag {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}
.finding-card__tag--soft { border-style: dashed; }
.finding-card__note {
  margin: var(--sp-2) 0 0;
  font-size: 13px;
  color: var(--text);
}

/* Planificateur des audits — une ligne par contrôle : ce qu'il fait, ce qu'il coûte, sa cadence. */
.plan-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}
.plan-row__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-row__label { font-weight: 600; }
.plan-row__last { font-size: 12px; color: var(--text-muted); }
/* « Jamais exécuté » doit se distinguer d'un résultat vide, pas s'y fondre. */
.plan-row__never {
  font-size: 12px;
  color: var(--warn);
  font-weight: 600;
}
.plan-row__err { font-size: 12px; color: var(--crit); }
.plan-row__cost { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.plan-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}
.plan-cost { font-size: 13px; color: var(--text-muted); }
