/* =========================================================================
   Voice Agent · Numih France — Assistant IA
   --------------------------------------------------------------------------
   Direction : éditorial raffiné aux couleurs de la marque NumihFrance.
   Bleu marine institutionnel + corail brique de la charte, sur fond crème
   chaleureux. Typographie Fraunces (serif optique variable, titres) +
   DM Sans (sans-serif géométrique, corps) + JetBrains Mono (labels système).
   Le visualizer de l'agent prend 4 identités chromatiques selon l'état :
   sage (Prêt), corail (Écoute), safran (Réflexion), marine (Parole).
   ========================================================================= */

:root {
  /* ── Palette NumihFrance ──────────────────────────────────────────── */
  --nf-navy-900:       #1B2851;   /* bleu marine très foncé (logo) */
  --nf-navy-800:       #233063;   /* bleu marine charte (CTA, fond bandeau) */
  --nf-navy-700:       #2F3C72;
  --nf-navy-500:       #4A5680;   /* indigo doux */
  --nf-navy-300:       #8E97B6;   /* support, hover */
  --nf-navy-100:       #DDE0EC;

  --nf-coral-700:      #A82F2F;
  --nf-coral-600:      #C13D3D;   /* rouge corail charte */
  --nf-coral-500:      #D14B4B;
  --nf-coral-300:      #E89999;
  --nf-coral-100:      #F4D9D9;

  /* États du visualizer — accents harmoniques élargis */
  --nf-sage-500:       #6E8E7B;   /* idle / Prêt */
  --nf-sage-300:       #A6BFB1;
  --nf-saffron-500:    #BC823A;   /* thinking / Réflexion */
  --nf-saffron-300:    #DCBA88;

  /* Surfaces */
  --app-bg:            #F4F1EC;   /* crème chaude charte */
  --app-bg-warm:       #EFEAE1;
  --app-surface:       #FFFFFF;
  --app-surface-soft:  #FAF7F1;

  /* Texte */
  --app-fg:            var(--nf-navy-900);
  --app-fg-strong:     rgba(27, 40, 81, 0.92);
  --app-fg-soft:       rgba(27, 40, 81, 0.72);
  --app-fg-muted:      rgba(27, 40, 81, 0.56);
  --app-fg-subtle:     rgba(27, 40, 81, 0.36);
  --app-fg-faint:      rgba(27, 40, 81, 0.18);

  /* Borders */
  --app-border:        rgba(27, 40, 81, 0.10);
  --app-border-strong: rgba(27, 40, 81, 0.16);
  --app-border-hover:  rgba(27, 40, 81, 0.28);

  /* Hover surfaces */
  --app-hover-2:       rgba(27, 40, 81, 0.025);
  --app-hover-4:       rgba(27, 40, 81, 0.045);
  --app-hover-6:       rgba(27, 40, 81, 0.075);

  /* Status colors — strict, charte-aligned */
  --app-success:       var(--nf-sage-500);
  --app-danger-bg:     rgba(193, 61, 61, 0.08);
  --app-danger-border: rgba(193, 61, 61, 0.32);
  --app-danger-fg:     var(--nf-coral-600);
  --app-danger-fg-hover: var(--nf-coral-700);

  /* État visualizer (var pilotée par body[data-state]) */
  --viz-color:         var(--app-fg);
  --viz-glow:          transparent;

  /* Typo */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    'JetBrains Mono', 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --topbar-h:    72px;
  --bar-h:       54px;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 20px);

  /* Motion */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'ss02';
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--app-fg);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }

.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;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'zero', 'ss01';
}

/* Tous les labels système : mono uppercase tracking ouvert. */
.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

/* ─── Fond crème + pattern décoratif (toile éditoriale) ───────────────── */
.bg-base {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-color: var(--app-bg);
  background-image:
    /* tache douce bleu marine en haut à droite */
    radial-gradient(900px 600px at calc(100% + 100px) -100px, rgba(35, 48, 99, 0.06), transparent 60%),
    /* tache corail discrète en bas à gauche */
    radial-gradient(700px 500px at -120px calc(100% + 100px), rgba(193, 61, 61, 0.05), transparent 60%),
    /* grille de points NumihFrance */
    radial-gradient(circle, rgba(27, 40, 81, 0.16) 0.6px, transparent 0.6px);
  background-size: auto, auto, 18px 18px;
  background-position: 0 0, 0 0, 0 0;
  /* Atténuation globale du pattern de points (preserve les radials) */
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
          mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
}

/* Les anciennes couches ambiance (aurora/grid/grain) sont masquées si
   présentes dans le DOM. On garde la rule par sécurité. */
.bg-aurora, .bg-grid, .bg-grain { display: none !important; }

/* ─── Header ─────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  height: var(--topbar-h);
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(244, 241, 236, 0.92) 0%, rgba(244, 241, 236, 0.6) 80%, rgba(244, 241, 236, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: none;
}

.topbar-left, .topbar-right {
  display: flex; align-items: center; gap: 14px; min-width: 0;
}
.topbar-right { gap: 12px; }

/* Logo NumihFrance — image PNG officielle (600×87 → ratio ~7:1). */
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  user-select: none;
}

.brand-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--app-border-strong);
  flex-shrink: 0;
}

/* L'ancien carré "N" est définitivement remplacé par le logo. */
.brand-mark { display: none !important; }

.brand-label {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nf-navy-800);
  white-space: nowrap;
  line-height: 1.1;
}
.brand-context {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--app-fg-muted);
  white-space: nowrap;
  line-height: 1.1;
}

.topnav { display: none; } /* navigation rangée hors écran principal */

.engine-tag {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-right: 14px;
  white-space: nowrap;
}
.engine-tag-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nf-navy-800);
  line-height: 1.1;
}
.engine-tag-subtitle {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--app-fg-muted);
  line-height: 1.1;
}
.engine-tag::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 1px; height: 22px;
  background: var(--app-border-strong);
  transform: translateY(-50%);
}

.status-pill {
  display: none; /* statut produit remplacé par le state-pill principal */
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--app-fg-muted);
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.icon-btn:hover {
  color: var(--nf-navy-800);
  background: var(--app-hover-4);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 2px;
}

/* ─── Stage central ──────────────────────────────────────────────────── */
.stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 36px) 24px calc(var(--bar-h) + var(--safe-bottom) + 100px);
}

/* ─── Visualizer en barres — couleur par état ───────────────────────── */

/* Liaison état → couleur des barres + halo. */
body[data-state="idle"],
body[data-state="disconnected"] {
  --viz-color: var(--nf-sage-500);
  --viz-glow:  rgba(110, 142, 123, 0.18);
}
body[data-state="listening"] {
  --viz-color: var(--nf-coral-600);
  --viz-glow:  rgba(193, 61, 61, 0.22);
}
body[data-state="thinking"] {
  --viz-color: var(--nf-saffron-500);
  --viz-glow:  rgba(188, 130, 58, 0.20);
}
body[data-state="speaking"] {
  --viz-color: var(--nf-navy-800);
  --viz-glow:  rgba(35, 48, 99, 0.20);
}

/* Quand déconnecté, on désature volontairement. */
body[data-state="disconnected"] {
  --viz-color: var(--app-fg-subtle);
  --viz-glow:  transparent;
}

.orb-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 260px;
  height: 160px;
}
.orb-stage .orb-canvas,
.orb-stage .orb-svg { display: none !important; }

/* Halo coloré sous le visualizer — réagit à l'état. */
.orb-stage::before {
  content: "";
  position: absolute;
  inset: -40px -30px;
  background: radial-gradient(ellipse at center, var(--viz-glow), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  transition: background 0.5s var(--ease);
  pointer-events: none;
}

.bar-viz {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
}

.bar-viz .bar {
  display: block;
  height: calc(var(--h, var(--rest, 1)) * 100%);
  background: var(--viz-color);
  border-radius: 999px;
  flex-shrink: 0;
  transition: height 0.08s linear, background 0.35s var(--ease);
  will-change: height;
}

.bar-viz .bar[data-pos="0"] { width: 22px; --rest: 0.40; }
.bar-viz .bar[data-pos="1"] { width: 26px; --rest: 0.70; }
.bar-viz .bar[data-pos="2"] { width: 30px; --rest: 1.00; }
.bar-viz .bar[data-pos="3"] { width: 26px; --rest: 0.70; }
.bar-viz .bar[data-pos="4"] { width: 22px; --rest: 0.40; }

/* Animation de respiration lente au repos (idle + disconnected). */
@keyframes bar-rest {
  0%, 100% { height: calc(var(--rest) * 100%); }
  50%      { height: calc(var(--rest) * 1.08 * 100%); }
}
body[data-state="idle"] .bar-viz .bar,
body[data-state="disconnected"] .bar-viz .bar {
  animation: bar-rest 4s ease-in-out infinite;
}
body[data-state="idle"] .bar-viz .bar[data-pos="1"] { animation-delay: 0.4s; }
body[data-state="idle"] .bar-viz .bar[data-pos="2"] { animation-delay: 0.8s; }
body[data-state="idle"] .bar-viz .bar[data-pos="3"] { animation-delay: 1.2s; }
body[data-state="idle"] .bar-viz .bar[data-pos="4"] { animation-delay: 1.6s; }

/* Animation "thinking" : pulse rapide cycle 0.8s — couleur safran. */
@keyframes bar-think {
  0%, 100% { height: calc(var(--rest) * 100%); }
  50%      { height: calc(min(var(--rest) * 1.6, 1) * 100%); }
}
body[data-state="thinking"] .bar-viz .bar {
  animation: bar-think 0.8s ease-in-out infinite;
}
body[data-state="thinking"] .bar-viz .bar[data-pos="1"] { animation-delay: 0.1s; }
body[data-state="thinking"] .bar-viz .bar[data-pos="2"] { animation-delay: 0.2s; }
body[data-state="thinking"] .bar-viz .bar[data-pos="3"] { animation-delay: 0.3s; }
body[data-state="thinking"] .bar-viz .bar[data-pos="4"] { animation-delay: 0.4s; }

/* Listening / speaking : l'amplitude est pilotée par JS via --h, animation off */
body[data-state="listening"] .bar-viz .bar,
body[data-state="speaking"]  .bar-viz .bar {
  animation: none;
  height: calc(min(var(--h, var(--rest)), 1) * 100%);
}

/* ─── Hero & State pill ──────────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  gap: 32px;
  max-width: 680px;
  text-align: center;
  width: 100%;
}

.state-pill {
  display: inline-flex; align-items: center; gap: 9px;
  height: 30px;
  padding: 0 16px 0 13px;
  background: var(--app-surface);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 999px;
  color: var(--app-fg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(27, 40, 81, 0.03);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

/* Dot du state-pill aux mêmes couleurs que le visualizer. */
.state-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--nf-sage-500);
  flex-shrink: 0;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
.state-pill-dot[data-state="idle"] {
  background: var(--nf-sage-500);
  box-shadow: 0 0 0 3px rgba(110, 142, 123, 0.16);
}
.state-pill-dot[data-state="listening"] {
  background: var(--nf-coral-600);
  box-shadow: 0 0 0 3px rgba(193, 61, 61, 0.18);
  animation: dot-blink 1.2s ease-in-out infinite;
}
.state-pill-dot[data-state="thinking"] {
  background: var(--nf-saffron-500);
  box-shadow: 0 0 0 3px rgba(188, 130, 58, 0.18);
  animation: dot-blink 0.8s ease-in-out infinite;
}
.state-pill-dot[data-state="speaking"] {
  background: var(--nf-navy-800);
  box-shadow: 0 0 0 3px rgba(35, 48, 99, 0.18);
  animation: dot-blink 0.55s ease-in-out infinite;
}
.state-pill-dot[data-state="disconnected"] {
  background: var(--app-fg-subtle);
  box-shadow: none;
}
@keyframes dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* Bordure subtilement teintée selon l'état. */
body[data-state="listening"] .state-pill { border-color: rgba(193, 61, 61, 0.32); color: var(--nf-coral-700); }
body[data-state="thinking"]  .state-pill { border-color: rgba(188, 130, 58, 0.32); color: #8E5F26; }
body[data-state="speaking"]  .state-pill { border-color: rgba(35, 48, 99, 0.32);   color: var(--nf-navy-800); }

/* ─── Mini indicateur d'état flottant ─────────────────────────────────────
   Visible uniquement quand un drawer ou une modale couvre le visualizer
   principal — permet de voir d'un coup d'œil si l'agent réfléchit. */
.agent-status-mini {
  position: fixed;
  top: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 16px 0 13px;
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  color: var(--app-fg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 24px -12px rgba(27, 40, 81, 0.20);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
  transition:
    opacity 0.22s var(--ease),
    transform 0.22s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease);
  z-index: 500;
}

/* Apparition : un drawer ou une modale est ouvert. */
body:has(.transcript-panel.open) .agent-status-mini,
body:has(.settings-drawer.open) .agent-status-mini,
body:has(.otis-modal[aria-hidden="false"]) .agent-status-mini,
body:has(.rag-modal[aria-hidden="false"]) .agent-status-mini {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Libellé piloté par data-state — pas de JS à modifier. */
body[data-state="idle"]         .agent-status-mini-label::before { content: "Prêt"; }
body[data-state="listening"]    .agent-status-mini-label::before { content: "À l'écoute"; }
body[data-state="thinking"]     .agent-status-mini-label::before { content: "Réflexion"; }
body[data-state="speaking"]     .agent-status-mini-label::before { content: "Réponse en cours"; }
body[data-state="disconnected"] .agent-status-mini-label::before { content: "Déconnecté"; }

/* Pastille — mêmes couleurs et animations que le state-pill principal. */
.agent-status-mini-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--nf-sage-500);
  flex-shrink: 0;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
body[data-state="idle"] .agent-status-mini-dot {
  background: var(--nf-sage-500);
  box-shadow: 0 0 0 3px rgba(110, 142, 123, 0.16);
}
body[data-state="listening"] .agent-status-mini-dot {
  background: var(--nf-coral-600);
  box-shadow: 0 0 0 3px rgba(193, 61, 61, 0.18);
  animation: dot-blink 1.2s ease-in-out infinite;
}
body[data-state="thinking"] .agent-status-mini-dot {
  background: var(--nf-saffron-500);
  box-shadow: 0 0 0 3px rgba(188, 130, 58, 0.18);
  animation: dot-blink 0.8s ease-in-out infinite;
}
body[data-state="speaking"] .agent-status-mini-dot {
  background: var(--nf-navy-800);
  box-shadow: 0 0 0 3px rgba(35, 48, 99, 0.18);
  animation: dot-blink 0.55s ease-in-out infinite;
}
body[data-state="disconnected"] .agent-status-mini-dot {
  background: var(--app-fg-subtle);
  box-shadow: none;
}

/* Teinte de bordure / texte selon l'état. */
body[data-state="listening"] .agent-status-mini { border-color: rgba(193, 61, 61, 0.32); color: var(--nf-coral-700); }
body[data-state="thinking"]  .agent-status-mini { border-color: rgba(188, 130, 58, 0.32); color: #8E5F26; }
body[data-state="speaking"]  .agent-status-mini { border-color: rgba(35, 48, 99, 0.32);   color: var(--nf-navy-800); }

/* Hero titre & subtitle masqués (l'interface = outil). */
.hero-title,
.hero-subtitle { display: none; }

/* ─── Cartes d'agents (écran d'accueil) ──────────────────────────────── */
.agents-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 640px;
}
body[data-session="active"] .agents-grid { display: none; }

.agent-card {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--app-surface);
  border: 0.5px solid var(--app-border);
  border-radius: 12px;
  color: var(--app-fg);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition:
    color 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.12s var(--ease),
    box-shadow 0.18s var(--ease);
}
.agent-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--app-surface-soft);
  color: var(--nf-coral-600);
}
.agent-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.agent-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--nf-navy-800);
  line-height: 1.2;
}
.agent-card-desc {
  font-size: 11.5px;
  color: var(--app-fg);
  opacity: 0.65;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agent-card:hover {
  background: var(--app-surface-soft);
  border-color: var(--nf-navy-300);
  box-shadow: 0 2px 8px rgba(35, 48, 99, 0.05);
  transform: translateY(-1px);
}
.agent-card:hover .agent-card-icon {
  background: rgba(193, 61, 61, 0.08);
}
.agent-card:active { transform: scale(0.99); }
.agent-card:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 2px;
}

/* Bouton supprimer (croix en haut à droite) — visible au hover seulement
   pour les agents user-defined (pas système, pas seed). */
.agent-card-delete {
  position: absolute;
  top: 6px; right: 6px;
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-fg);
  opacity: 0.55;
  cursor: pointer;
  border-radius: 6px;
  transition: opacity 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.agent-card:hover .agent-card-delete { opacity: 0.85; }
.agent-card-delete:hover {
  opacity: 1 !important;
  background: rgba(193, 61, 61, 0.12);
  border-color: rgba(193, 61, 61, 0.35);
  color: var(--nf-coral-700);
}

/* Bouton Home : caché à l'accueil (on y est déjà), visible pendant la session. */
body[data-session="idle"] #btn-home { display: none; }

.agent-card-empty {
  list-style: none;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: var(--app-fg);
  opacity: 0.5;
  padding: 24px;
}

/* Bannière "Agent actif" affichée pendant la session sur un agent custom. */
.active-agent-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 12px;
  background: var(--app-surface-soft);
  border: 0.5px solid var(--app-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--font-mono);
}
body[data-session="idle"] .active-agent-banner { display: none; }
.active-agent-label {
  color: var(--app-fg);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.active-agent-name {
  color: var(--nf-navy-800);
  font-weight: 500;
}

/* ─── Transcript inline (2 derniers tours pendant la session) ────────── */
.inline-transcript {
  display: none;
  width: 100%;
  max-width: 580px;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin: 0 auto;
}
body[data-session="active"] .inline-transcript {
  display: flex;
}

.inline-transcript-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--app-fg-subtle);
}

.inline-transcript-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.inline-transcript-list li {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--app-fg-soft);
}
.inline-transcript-list li.empty {
  color: var(--app-fg-subtle);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 14px;
}
.inline-transcript-list li[data-role="agent"] { color: var(--app-fg-strong); }
.inline-transcript-list li .speaker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--nf-navy-800);
  margin-right: 8px;
}
.inline-transcript-list li[data-role="agent"] .speaker { color: var(--nf-coral-600); }

/* L'ancien live-status est masqué (remplacé par le state-pill). */
.live-status { display: none !important; }

/* ─── Camera preview (PIP) ───────────────────────────────────────────── */
.cam-preview {
  position: fixed;
  left: 28px;
  bottom: calc(var(--bar-h) + var(--safe-bottom) + 28px);
  width: 208px;
  height: 138px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--app-border-strong);
  background: var(--app-surface);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  box-shadow: 0 12px 32px -16px rgba(27, 40, 81, 0.25);
}
.cam-preview.visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ─── Pièces jointes : tray au-dessus de la control bar ───────────────── */
.attach-tray {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 60px);
  transform: translateX(-50%);
  z-index: 5;
  max-width: min(720px, calc(100vw - 32px));
  padding: 6px 8px;
  background: var(--app-surface);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(27, 40, 81, 0.04),
    0 8px 24px -12px rgba(27, 40, 81, 0.18);
}
.attach-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: var(--app-hover-2);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 999px;
  color: var(--nf-navy-800);
  font-size: 12px;
  line-height: 1.2;
  max-width: 280px;
}
.attach-chip[data-kind="pdf"] { background: rgba(255, 140, 90, 0.10); }
.attach-chip[data-state="uploading"] { opacity: 0.7; }
.attach-chip[data-state="error"] {
  background: rgba(220, 40, 40, 0.10);
  color: #a01818;
}
.attach-chip-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  opacity: 0.8;
}
.attach-chip-name {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.attach-chip-meta {
  flex: 0 0 auto;
  color: var(--app-fg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.attach-chip-remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 2px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--app-fg-muted);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.attach-chip-remove:hover {
  color: var(--nf-navy-800);
  background: var(--app-hover-6);
}
.attach-chip-remove:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 1px;
}

/* ─── Control bar (pill blanche en bas) ──────────────────────────────── */
.control-bar {
  position: fixed; left: 50%; bottom: var(--safe-bottom);
  transform: translateX(-50%);
  z-index: 6;
  display: flex; align-items: center; gap: 4px;
  padding: 6px;
  background: var(--app-surface);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(27, 40, 81, 0.04),
    0 8px 24px -12px rgba(27, 40, 81, 0.18);
}

.ctrl-group { display: flex; align-items: center; gap: 4px; }

.ctrl-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--app-fg-muted);
  cursor: pointer;
  transition:
    color 0.18s var(--ease),
    background 0.18s var(--ease),
    transform 0.12s var(--ease);
}
.ctrl-btn:hover:not(:disabled) {
  color: var(--nf-navy-800);
  background: var(--app-hover-4);
}
.ctrl-btn:active:not(:disabled) { transform: scale(0.94); }
.ctrl-btn:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 2px;
}
.ctrl-btn:disabled { color: var(--app-fg-faint); opacity: 0.7; cursor: not-allowed; }
.ctrl-btn[aria-pressed="true"]:not(#btn-mic),
.ctrl-btn[aria-expanded="true"] {
  color: var(--nf-navy-800);
  background: var(--app-hover-6);
}

/* Mic actif = neutre, mic muté = corail. */
#btn-mic .icon-mic-off { display: none; }
#btn-mic[aria-pressed="true"] .icon-mic-on  { display: none; }
#btn-mic[aria-pressed="true"] .icon-mic-off { display: block; }
#btn-mic[aria-pressed="true"] {
  color: var(--app-danger-fg);
  background: var(--app-danger-bg);
}

.ctrl-sep {
  display: inline-block;
  width: 0.5px; height: 22px;
  background: var(--app-border-strong);
  margin: 0 4px;
}

/* CTA principal — bleu marine NumihFrance, puis corail au raccrochage. */
.ctrl-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px;
  padding: 0 20px;
  background: var(--nf-navy-800);
  border: none;
  border-radius: 999px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    transform 0.14s var(--ease),
    box-shadow 0.18s var(--ease);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.ctrl-cta:hover {
  background: var(--nf-navy-900);
}
.ctrl-cta:active { transform: scale(0.97); }
.ctrl-cta:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 2px;
}
.ctrl-cta .icon-cta-stop { display: none; }
.ctrl-cta[data-active="true"] {
  background: var(--app-danger-bg);
  color: var(--app-danger-fg);
  border: 0.5px solid var(--app-danger-border);
  padding: 0 19.5px;
  box-shadow: none;
}
.ctrl-cta[data-active="true"]:hover {
  background: rgba(193, 61, 61, 0.14);
  color: var(--app-danger-fg-hover);
}
.ctrl-cta[data-active="true"] .icon-cta-start { display: none; }
.ctrl-cta[data-active="true"] .icon-cta-stop  { display: inline-block; }

/* ─── Transcript panel (slide-in à droite) ───────────────────────────── */
.transcript-panel {
  position: fixed; z-index: 50;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  background: var(--app-surface);
  border-left: 0.5px solid var(--app-border-strong);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px -24px rgba(27, 40, 81, 0.18);
}
.transcript-panel.open { transform: translateX(0); }

.transcript-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px;
  border-bottom: 0.5px solid var(--app-border);
}
.transcript-heading { display: flex; flex-direction: column; gap: 6px; }
.transcript-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nf-navy-900);
}
.transcript-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-fg-subtle);
}

.transcript {
  flex: 1; min-height: 0;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--app-border-strong) transparent;
}
.transcript::-webkit-scrollbar { width: 6px; }
.transcript::-webkit-scrollbar-thumb { background: var(--app-border-strong); border-radius: 3px; }

.bubble {
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--app-fg-soft);
  animation: bubble-in 0.22s var(--ease);
  display: block;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bubble::before {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bubble.user::before  { content: "Vous"; color: var(--nf-navy-800); }
.bubble.agent::before { content: "Assistant"; color: var(--nf-coral-600); }
.bubble.user  { color: var(--app-fg-soft); }
.bubble.agent { color: var(--app-fg-strong); }
.bubble.tool {
  color: var(--app-fg-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.bubble.tool::before { content: "Outil"; color: var(--nf-saffron-500); }
.bubble.partial { opacity: 0.55; font-style: italic; }
.bubble.file-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.bubble.file-ready::before { content: "Fichier"; color: var(--nf-saffron-500); }
.file-ready-link {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--app-border-strong);
  border-radius: 4px;
  color: var(--nf-coral-600);
  text-decoration: none;
  font-weight: 600;
}
.file-ready-link:hover { background: var(--app-surface-hover, rgba(0,0,0,0.04)); }

/* ─── Bulle d'ingestion RAGFab (dans transcript-panel) ──────────────────── */
.bubble.ingestion::before { content: "Ingestion RAG"; color: var(--nf-saffron-500); }
.bubble.ingestion { display: flex; flex-direction: column; gap: 8px; }
.bubble.ingestion .ingestion-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.bubble.ingestion .ingestion-icon { font-size: 16px; }
.bubble.ingestion .ingestion-title { color: var(--app-fg-strong); flex: 1; }
.bubble.ingestion .ingestion-close {
  background: transparent; border: none; cursor: pointer;
  color: var(--app-fg-muted); font-size: 18px; line-height: 1;
  padding: 0 4px;
}
.bubble.ingestion .ingestion-status {
  font-size: 12px;
  color: var(--app-fg-muted);
}
.bubble.ingestion .ingestion-bar {
  height: 4px;
  background: var(--app-border-soft, rgba(0,0,0,0.08));
  border-radius: 2px;
  overflow: hidden;
}
.bubble.ingestion .ingestion-bar-fill {
  height: 100%;
  background: var(--nf-coral-600);
  transition: width 0.3s ease;
}
.bubble.ingestion[data-status="completed"] .ingestion-bar-fill {
  background: #22a06b;
}
.bubble.ingestion[data-status="failed"] .ingestion-status {
  color: var(--nf-coral-600);
}

/* ─── Toast d'ingestion RAGFab (visible bottom-right) ──────────────────── */
.ingestion-toasts-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 260;
  pointer-events: none;
}
.ingestion-toast {
  pointer-events: auto;
  width: min(360px, 92vw);
  padding: 12px 14px;
  background: var(--nf-navy-800);
  color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 12px 32px -12px rgba(27, 40, 81, 0.4);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: ingestion-toast-in 0.25s ease-out;
}
@keyframes ingestion-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ingestion-toast .ingestion-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.ingestion-toast .ingestion-icon { font-size: 16px; }
.ingestion-toast .ingestion-title { flex: 1; }
.ingestion-toast .ingestion-close {
  background: transparent; border: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.7); font-size: 18px; line-height: 1;
  padding: 0 4px;
}
.ingestion-toast .ingestion-close:hover { color: #FFFFFF; }
.ingestion-toast .ingestion-status {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}
.ingestion-toast .ingestion-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.ingestion-toast .ingestion-bar-fill {
  height: 100%;
  background: var(--nf-saffron-300, #F8B26A);
  transition: width 0.3s ease;
}
.ingestion-toast[data-status="completed"] {
  background: #1a6e4d;
}
.ingestion-toast[data-status="completed"] .ingestion-bar-fill { background: #6ee7b7; }
.ingestion-toast[data-status="failed"] {
  background: var(--nf-coral-600, #c0392b);
}

/* ─── Settings drawer ────────────────────────────────────────────────── */
.settings-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 11;
  width: min(440px, 92vw);
  background: var(--app-surface);
  border-left: 0.5px solid var(--app-border-strong);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px -24px rgba(27, 40, 81, 0.18);
}
.settings-drawer.open { transform: translateX(0); }

.settings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px;
  border-bottom: 0.5px solid var(--app-border);
}
.settings-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nf-navy-900);
}

.settings-section {
  padding: 22px 24px;
  border-bottom: 0.5px solid var(--app-border);
}
.settings-section:last-child { border-bottom: none; }
.settings-section-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nf-navy-800);
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--app-border);
}

.meta-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  gap: 12px;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-fg-muted);
  flex-shrink: 0;
}
.meta-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--nf-navy-800);
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.field {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.field > span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--app-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 8px;
  color: var(--nf-navy-900);
  font-size: 13px;
  font-family: var(--font-sans);
  resize: vertical;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--nf-navy-800);
  background: var(--app-surface);
  box-shadow: 0 0 0 3px rgba(35, 48, 99, 0.10);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23233063' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ─── Toggle (checkbox stylé en switch) ─────────────────────────── */
.field-toggle {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.field-toggle > span {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--nf-navy-900);
  text-transform: none;
  letter-spacing: 0;
}
.field-toggle input[type="checkbox"] {
  appearance: none;
  width: 38px;
  height: 22px;
  padding: 0;
  background: var(--app-border);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.field-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--app-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s var(--ease);
}
.field-toggle input[type="checkbox"]:checked {
  background: var(--nf-navy-800);
  border-color: var(--nf-navy-800);
}
.field-toggle input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}
.field-toggle input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 2px;
}

/* ─── Slider (input range) ──────────────────────────────────────── */
.field input[type="range"] {
  width: 100%;
  height: 6px;
  padding: 0;
  background: var(--app-border);
  border: none;
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
}
.field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nf-navy-800);
  border: 2px solid var(--app-surface);
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.14s var(--ease);
}
.field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nf-navy-800);
  border: 2px solid var(--app-surface);
  cursor: pointer;
}
.field input[type="range"]:hover::-webkit-slider-thumb { background: var(--nf-navy-900); }
.field input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.1); }
.field input[type="range"]:focus-visible { outline: 2px solid var(--nf-navy-800); outline-offset: 2px; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--nf-navy-800);
  border: none;
  border-radius: 999px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.14s var(--ease);
}
.btn-primary:hover  { background: var(--nf-navy-900); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid var(--nf-navy-800); outline-offset: 2px; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 0.5px solid var(--app-border-strong);
  border-radius: 999px;
  color: var(--app-fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.btn-secondary:hover {
  color: var(--nf-navy-800);
  border-color: var(--nf-navy-300);
  background: var(--app-hover-2);
}
.btn-secondary:focus-visible { outline: 2px solid var(--nf-navy-800); outline-offset: 2px; }

/* ─── Voice recorder (Settings → Configuration) ────────────────────── */
.voice-recorder { display: flex; flex-direction: column; gap: 10px; }
.voice-recorder .field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-fg-muted);
}
.voice-recorder .field-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--app-fg-subtle);
}
.voice-recorder .field-inline {
  display: flex; flex-direction: column; gap: 4px;
}
.voice-recorder .field-inline > span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--app-fg-subtle);
}
.voice-recorder .field-inline input {
  padding: 8px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--nf-navy-900);
}
.voice-recorder .field-inline input:focus {
  outline: 2px solid var(--nf-navy-800);
  outline-offset: 1px;
}
.rec-controls { display: flex; flex-direction: column; gap: 8px; }
.rec-controls .btn-secondary { width: 100%; }
.rec-controls .btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }
.rec-status {
  font-family: var(--font-mono);
  font-size: 11px;
  min-height: 14px;
  color: var(--app-fg-muted);
}
.rec-status[data-kind="recording"] { color: var(--nf-coral-600); font-weight: 500; }
.rec-status[data-kind="error"]     { color: var(--nf-coral-700); }
.rec-status[data-kind="success"]   { color: var(--nf-sage-500); }

/* ─── RAGFab : statut « Tester la connexion » ───────────────────────── */
.ragfab-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  font-family: var(--font-display);
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  color: var(--nf-navy-900);
}
.ragfab-status.pending {
  color: var(--app-fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.ragfab-status.success {
  background: rgba(110, 142, 123, 0.10);
  border-color: rgba(110, 142, 123, 0.30);
  color: var(--nf-sage-500);
}
.ragfab-status.error {
  background: rgba(193, 61, 61, 0.08);
  border-color: rgba(193, 61, 61, 0.30);
  color: var(--nf-coral-600);
}
.ragfab-status ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--nf-navy-900);
}
.ragfab-status em {
  font-style: normal;
  color: var(--app-fg-muted);
  font-size: 11px;
}
.ragfab-status small {
  display: inline-block;
  margin-top: 4px;
  color: var(--app-fg-muted);
  font-size: 11px;
}

/* ─── Contacts Medimail ─────────────────────────────────────────────── */
.contacts-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contacts-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--nf-navy-900);
}
.contacts-list li.empty {
  color: var(--app-fg-subtle);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 13px;
  justify-content: center;
}
.contacts-list .contact-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contacts-list .contact-alias {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--nf-navy-900);
}
.contacts-list .contact-mxid {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contacts-list .contact-display {
  font-size: 11px;
  color: var(--app-fg-muted);
}
.contacts-list .contact-delete {
  background: transparent;
  border: 0.5px solid var(--app-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-display);
  color: var(--nf-coral-600);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.contacts-list .contact-delete:hover {
  background: rgba(193, 61, 61, 0.08);
}
.contacts-add {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 8px;
}
.contacts-add summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--nf-navy-900);
  list-style: none;
  user-select: none;
}
.contacts-add summary::-webkit-details-marker { display: none; }
.contacts-add summary::before {
  content: "+ ";
  color: var(--nf-saffron-500);
  font-weight: 600;
}
.contacts-add[open] summary::before { content: "− "; }
.contacts-add .field { margin-top: 10px; }
.contacts-status {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-display);
}
.contacts-status.success {
  background: rgba(110, 142, 123, 0.10);
  border: 0.5px solid rgba(110, 142, 123, 0.30);
  color: var(--nf-sage-500);
}
.contacts-status.error {
  background: rgba(193, 61, 61, 0.08);
  border: 0.5px solid rgba(193, 61, 61, 0.30);
  color: var(--nf-coral-600);
}

/* ── Mémoire long-terme : encadré profil + liste de faits ──────────────── */
.memory-profile {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-left: 3px solid var(--nf-saffron-500);
  border-radius: 8px;
}
.memory-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.memory-profile-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-fg-muted);
}
.memory-profile-text {
  font-size: 12px;
  color: var(--nf-navy-900);
  line-height: 1.5;
}
.memory-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.memory-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--nf-navy-900);
}
.memory-list li.empty {
  color: var(--app-fg-subtle);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 13px;
  justify-content: center;
}
.memory-list .fact-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.memory-list .fact-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--app-fg-muted);
}
.memory-list .fact-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(110, 142, 123, 0.10);
  border: 0.5px solid rgba(110, 142, 123, 0.25);
  font-weight: 500;
  color: var(--nf-sage-500);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.memory-list .fact-tag.preference { background: rgba(133, 102, 168, 0.10); border-color: rgba(133, 102, 168, 0.30); color: #6b4d8e; }
.memory-list .fact-tag.identity   { background: rgba(60, 110, 160, 0.10); border-color: rgba(60, 110, 160, 0.30); color: #345e85; }
.memory-list .fact-tag.task_history { background: rgba(110, 142, 123, 0.10); border-color: rgba(110, 142, 123, 0.30); color: var(--nf-sage-500); }
.memory-list .fact-tag.note { background: rgba(213, 158, 53, 0.10); border-color: rgba(213, 158, 53, 0.30); color: #8a6418; }
.memory-list .fact-tag.contact_context { background: rgba(193, 110, 61, 0.10); border-color: rgba(193, 110, 61, 0.30); color: #8a4d20; }
.memory-list .fact-importance {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--app-fg-subtle);
}
.memory-list .fact-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--nf-navy-900);
}
.memory-list .fact-delete {
  flex-shrink: 0;
  background: transparent;
  border: 0.5px solid var(--app-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-display);
  color: var(--nf-coral-600);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.memory-list .fact-delete:hover {
  background: rgba(193, 61, 61, 0.08);
}
.memory-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.memory-actions .btn-secondary {
  flex: 1;
  min-width: 120px;
}
.btn-secondary.btn-danger {
  color: var(--nf-coral-600);
  border-color: rgba(193, 61, 61, 0.30);
}
.btn-secondary.btn-danger:hover {
  background: rgba(193, 61, 61, 0.06);
}

.tools-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tools-list li {
  padding: 10px 12px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--nf-navy-900);
}
.tools-list li.empty {
  color: var(--app-fg-subtle);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 13px;
}

/* ─── Tool toast ─────────────────────────────────────────────────────── */
.tool-toast {
  position: fixed;
  bottom: calc(var(--bar-h) + var(--safe-bottom) + 28px);
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 8;
  pointer-events: none;
  background: var(--app-surface);
  border: 0.5px solid var(--app-border-strong);
  border-radius: 10px;
  padding: 11px 15px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  max-width: 440px;
  box-shadow: 0 12px 32px -16px rgba(27, 40, 81, 0.22);
}
.tool-toast.visible {
  opacity: 1; visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s;
}
.tool-toast-inner { display: flex; align-items: center; gap: 12px; }
.tool-toast-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nf-saffron-500);
  border-radius: 7px;
  color: #FFFFFF;
  flex-shrink: 0;
}
.tool-toast-body { min-width: 0; flex: 1; }
.tool-toast-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--nf-navy-900);
}
.tool-toast-args {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--app-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* ─── Scrim ──────────────────────────────────────────────────────────── */
.scrim {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.25s var(--ease);
}
.scrim.visible {
  background: rgba(27, 40, 81, 0.22);
  pointer-events: auto;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .topbar { padding: 0 18px; }
  .brand-logo { height: 26px; }
  .brand-context { display: none; }
  .engine-tag { display: none; }
  .stage {
    gap: 28px;
    padding: calc(var(--topbar-h) + 24px) 16px calc(var(--bar-h) + var(--safe-bottom) + 76px);
  }
  .orb-stage { width: 190px; height: 110px; }
  .bar-viz { gap: 10px; }
  .bar-viz .bar[data-pos="0"], .bar-viz .bar[data-pos="4"] { width: 16px; }
  .bar-viz .bar[data-pos="1"], .bar-viz .bar[data-pos="3"] { width: 20px; }
  .bar-viz .bar[data-pos="2"] { width: 24px; }
  .agents-grid { grid-template-columns: 1fr; max-width: 360px; }
  .control-bar { gap: 2px; padding: 5px; }
  .ctrl-btn { width: 34px; height: 34px; }
  .ctrl-cta { height: 34px; padding: 0 16px; font-size: 10.5px; }
  .ctrl-cta[data-active="true"] { padding: 0 15.5px; }
  .ctrl-cta-text { display: inline; }
  .cam-preview { width: 132px; height: 88px; left: 16px; }
  .inline-transcript { max-width: 100%; }
}

@media (max-width: 480px) {
  .brand-divider,
  .brand-label { display: none; }
}

/* ─── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 8s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .bar-viz .bar { animation-duration: 12s !important; }
}

/* ═════════════════════════════════════════════════════════════════════════
   OTIS — indicateur d'enregistrement + modale transcription
   ═════════════════════════════════════════════════════════════════════════ */

/* Indicateur REC flottant en haut centre. */
.rec-indicator {
  position: fixed;
  top: calc(var(--topbar-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-danger-border);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 200;
  box-shadow: 0 8px 24px -12px rgba(193, 61, 61, 0.25);
}
.rec-indicator[data-active="true"] { display: inline-flex; }
.rec-indicator[data-mode="active"] {
  border-color: rgba(188, 130, 58, 0.45);
  background: rgba(254, 244, 224, 0.85);
}
.rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--app-danger-fg);
  animation: rec-blink 1.1s ease-in-out infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}
.rec-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--app-fg-strong);
}
.rec-timer {
  font-size: 11px;
  color: var(--app-fg-muted);
  font-weight: 500;
}
.rec-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  margin-left: 4px;
  border: none;
  background: var(--nf-navy-800);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease);
}
.rec-stop:hover { background: var(--nf-navy-900); }
.rec-stop:active { transform: scale(0.96); }
.rec-stop svg { display: block; }

/* Modale transcription : backdrop + carte scrollable. */
.otis-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 400;
}
.otis-modal[aria-hidden="false"] { display: flex; }
.otis-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 40, 81, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.otis-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(840px, 100%);
  max-height: 86vh;
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px -32px rgba(27, 40, 81, 0.45);
  animation: otis-slide-in 0.26s var(--ease-out);
}
@keyframes otis-slide-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.otis-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--app-border);
}
.otis-modal-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nf-navy-900);
}
.otis-modal-meta {
  margin: 0;
  font-size: 10.5px;
  color: var(--app-fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.otis-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.otis-modal-summary,
.otis-modal-body {
  padding: 16px 24px;
}
.otis-modal-summary {
  border-bottom: 1px solid var(--app-border);
  background: var(--app-bg-warm);
}
.otis-modal-section-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nf-coral-600);
}
.otis-modal-content {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--app-fg);
}
.otis-modal-content .otis-segment {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--app-border);
}
.otis-modal-content .otis-segment:last-child {
  border-bottom: none;
}
.otis-modal-content .otis-speaker {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nf-navy-800);
}
.otis-modal-footer {
  flex: 0 0 auto;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--app-border);
  background: var(--app-bg-warm);
}
.otis-modal-footer small {
  font-size: 11.5px;
  color: var(--app-fg-muted);
  font-style: italic;
  font-family: var(--font-display);
}

/* ─── Modale RAG : variante de .otis-modal avec accent bleu ──────────── */
.rag-modal .otis-modal-section-title {
  color: var(--nf-navy-700, var(--nf-navy-900));
}
.rag-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rag-mode-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--app-border-strong);
  background: var(--app-bg-warm);
  color: var(--app-fg-strong);
}
.rag-mode-badge[data-mode="approfondi"] {
  background: var(--nf-coral-100, #fde6df);
  border-color: var(--nf-coral-600, #c0392b);
  color: var(--nf-coral-700, #962f24);
}
.rag-modal .rag-modal-question {
  background: var(--app-bg-cold, var(--app-bg-warm));
}
.rag-modal-question .otis-markdown {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--app-fg-strong);
  white-space: pre-wrap;
  word-break: break-word;
}
.rag-sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rag-sources-list li {
  padding: 8px 10px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--app-fg-strong);
}
.rag-sources-list .rag-source-doc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-fg-muted);
  letter-spacing: 0.04em;
  display: block;
  margin-top: 2px;
}
.rag-sources-list .rag-source-excerpt {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--app-border);
  font-style: italic;
  color: var(--app-fg);
}
.rag-sources-list .rag-source-tokens {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  background: var(--app-bg-warm);
  color: var(--app-fg-muted);
}
.rag-sources-list .rag-source-truncated {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  background: var(--nf-coral-100, #fde6df);
  color: var(--nf-coral-700, #962f24);
}
.rag-followups-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rag-followups-list li {
  padding: 8px 12px;
  border: 1px dashed var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-bg-warm);
  font-size: 13px;
  line-height: 1.4;
  color: var(--app-fg-strong);
}
.rag-followups-list li::before {
  content: "›";
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  color: var(--nf-coral-600, var(--app-fg-muted));
  font-weight: 700;
}

/* ─── Rendu Markdown (résumé + transcription) ─────────────────────────── */
.otis-markdown {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--app-fg-strong);
}
.otis-markdown > *:first-child { margin-top: 0; }
.otis-markdown > *:last-child { margin-bottom: 0; }
.otis-markdown h1,
.otis-markdown h2,
.otis-markdown h4,
.otis-markdown h5,
.otis-markdown h6 {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nf-navy-900);
}
.otis-markdown h1 { font-size: 19px; }
.otis-markdown h2 { font-size: 16px; }
.otis-markdown h3 {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--nf-coral-600);
  font-weight: 600;
  margin: 18px 0 8px;
}
.otis-markdown h4 { font-size: 14px; color: var(--app-fg-strong); }
.otis-markdown p {
  margin: 0 0 10px;
}
.otis-markdown strong { font-weight: 600; color: var(--nf-navy-900); }
.otis-markdown em { font-style: italic; color: var(--app-fg-soft); }
.otis-markdown code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  background: var(--app-bg-warm);
  border: 0.5px solid var(--app-border);
  border-radius: 4px;
  color: var(--nf-navy-800);
}
.otis-markdown hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid var(--app-border-strong);
}
.otis-markdown ul,
.otis-markdown ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.otis-markdown li {
  margin: 4px 0;
}
.otis-markdown li::marker { color: var(--nf-coral-600); }
.otis-markdown li > strong:first-child { color: var(--nf-navy-900); }
.otis-markdown blockquote {
  margin: 0 0 10px;
  padding: 6px 14px;
  border-left: 2px solid var(--nf-coral-600);
  color: var(--app-fg-soft);
  background: var(--app-bg-warm);
  font-style: italic;
  font-family: var(--font-display);
}

/* Petit indicateur de "OTIS traite l'audio…" pendant terminer_enregistrement. */
.otis-processing-toast {
  position: fixed;
  top: calc(var(--topbar-h) + 64px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--nf-navy-800);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  z-index: 250;
  box-shadow: 0 12px 32px -16px rgba(27, 40, 81, 0.35);
}
.otis-processing-toast[data-active="true"] { display: inline-flex; }
.otis-processing-toast::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--nf-saffron-300);
  animation: rec-blink 1.1s ease-in-out infinite;
}

/* ── User menu (header) ───────────────────────────────────────────────── */
.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--app-border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--app-fg-muted);
}
.user-menu-username {
  text-transform: uppercase;
}
.user-menu-link {
  background: transparent;
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--app-fg);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
}
.user-menu-link:hover {
  background: var(--app-hover-4);
}
