/* ==========================================================================
   Suada — Dynamic Chromatic Halo & Peripheral Vision HUD (50 FPS)
   Standard Souverain Antigravity Lab • Zéro Emoji • Lucide SVG Local
   ========================================================================== */

:root {
  --halo-rouge: 239, 68, 68;      /* #EF4444 - SYNTHÉTISE */
  --halo-bleu: 59, 130, 246;      /* #3B82F6 - PRÉCISE */
  --halo-vert: 16, 185, 129;      /* #10B981 - RASSURE */
  --halo-jaune: 245, 158, 11;     /* #F59E0B - PROJETTE */
  --halo-gris: 107, 114, 128;     /* #6B7280 - ÉCOUTE */

  --current-halo-r: 107;
  --current-halo-g: 114;
  --current-halo-b: 128;
  --current-halo-alpha: 0.22;
}

/* Fullscreen Background & Container */
.halo-cockpit-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #060913;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  user-select: none;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Peripheral Halo Canvas */
#haloCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Vignette CSS Fallback Layer */
.halo-vignette-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 120px 40px rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), var(--current-halo-alpha));
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Top Bar / Header */
.halo-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(6, 9, 19, 0.85) 0%, rgba(6, 9, 19, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.halo-brand-logo {
  height: 32px;
  width: auto;
}

.halo-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.halo-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b));
  box-shadow: 0 0 8px rgb(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b));
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

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

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.telemetry-item i {
  width: 14px;
  height: 14px;
}

.telemetry-val {
  color: #f8fafc;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Center HUD Display */
.halo-center-hud {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hud-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  background: rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), 0.15);
  border: 1px solid rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), 0.4);
  color: rgb(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b));
  transition: all 0.3s ease;
}

.hud-reflex-word {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 40px rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), 0.6),
               0 0 80px rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), 0.3);
  transition: text-shadow 0.3s ease;
}

.hud-archetype {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: #cbd5e1;
  font-weight: 500;
  max-width: 680px;
  line-height: 1.5;
}

.hud-rationale {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #94a3b8;
  max-width: 600px;
  font-style: italic;
}

/* DISC 4-Color Ambient Mini Gauge */
.disc-quadrant-gauge {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gauge-quadrant {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.gauge-quadrant.active {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.quadrant-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.gauge-quadrant.rouge .quadrant-indicator { background: #ef4444; }
.gauge-quadrant.bleu .quadrant-indicator { background: #3b82f6; }
.gauge-quadrant.vert .quadrant-indicator { background: #10b981; }
.gauge-quadrant.jaune .quadrant-indicator { background: #f59e0b; }

/* Bottom Control Deck */
.halo-control-deck {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem 2rem;
  background: linear-gradient(0deg, rgba(6, 9, 19, 0.95) 0%, rgba(6, 9, 19, 0) 100%);
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.halo-input-group {
  display: flex;
  gap: 0.75rem;
}

.halo-input-field {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.halo-input-field:focus {
  border-color: rgb(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b));
  box-shadow: 0 0 15px rgba(var(--current-halo-r), var(--current-halo-g), var(--current-halo-b), 0.25);
}

.halo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.halo-btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.halo-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.halo-btn-mic {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.halo-btn-mic.active {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  animation: pulse-mic 1.5s infinite;
}

@keyframes pulse-mic {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Quick Scenarios Bar */
.halo-scenarios-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.scenario-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.scenario-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.18s ease;
}

.scenario-chip:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  transform: translateY(-1px);
}

.scenario-chip i {
  width: 14px;
  height: 14px;
}

.scenario-chip.rouge:hover { border-color: #ef4444; }
.scenario-chip.bleu:hover { border-color: #3b82f6; }
.scenario-chip.vert:hover { border-color: #10b981; }
.scenario-chip.jaune:hover { border-color: #f59e0b; }


/* ==========================================================================
   Suada In-Situ Integration — Unified PWA (Option Romain Caméléon Feutré)
   ========================================================================== */

/* 1. Voyant discret dans le Header entre Logo et En Ligne */
.disc-header-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--disc-color-hex, #6B7280);
  box-shadow: 0 0 10px var(--disc-color-glow, rgba(107, 114, 128, 0.5));
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease, box-shadow 0.5s ease;
  flex-shrink: 0;
  margin: 0 18px;
  display: inline-block;
  opacity: 0;
  pointer-events: none;
}

.disc-header-dot.active {
  opacity: 0.9 !important;
  animation: discPulse 2.8s infinite ease-in-out;
}

@keyframes discPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
    box-shadow: 0 0 6px var(--disc-color-hex, rgba(107, 114, 128, 0.4));
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 14px var(--disc-color-hex, rgba(107, 114, 128, 0.8));
  }
}

/* 2. Harmonisation bouton micro avec le profil DISC */
.record-btn.recording {
  border-color: var(--disc-color-hex, #ef4444) !important;
  color: var(--disc-color-hex, #ef4444) !important;
  box-shadow: 0 0 30px var(--disc-color-glow, rgba(239, 68, 68, 0.4)) !important;
  transition: border-color 0.6s ease, color 0.6s ease, box-shadow 0.6s ease;
}

/* 3. Statut réflexe discret sous le timer */
.status-label {
  transition: color 0.5s ease;
}

/* 4. Canvas d ambiance peripherique sur l application principale */
#haloCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   AI Reflex Trigger & Studio Drawer (Hendrik Design System)
   ========================================================================== */

.btn-ai-sparkles {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted, #94a3b8);
}

.btn-ai-sparkles:hover {
  color: var(--suada-gold, #CC9F33);
  background: rgba(204, 159, 51, 0.1);
  border-color: rgba(204, 159, 51, 0.3);
}

.btn-ai-sparkles.recording-active {
  color: var(--disc-color-hex, #EF4444) !important;
  border-color: var(--disc-color-hex, #EF4444) !important;
  box-shadow: 0 0 14px var(--disc-color-glow, rgba(239, 68, 68, 0.4)) !important;
  animation: discPulse 2.8s infinite ease-in-out;
}

/* Scenario Chips & Dojo Studio */
.ai-scenario-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
}

.ai-scenario-chip i {
  width: 13px;
  height: 13px;
}

.ai-scenario-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.ai-scenario-chip.rouge:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}

.ai-scenario-chip.bleu:hover {
  border-color: #3B82F6;
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.12);
}

.ai-scenario-chip.vert:hover {
  border-color: #10B981;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
}

.ai-scenario-chip.jaune:hover {
  border-color: #F59E0B;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
}

/* Showroom Grand Ecran */
.btn-showroom:hover {
  background: linear-gradient(135deg, rgba(204, 159, 51, 0.25) 0%, rgba(204, 159, 51, 0.10) 100%) !important;
  box-shadow: 0 0 16px rgba(204, 159, 51, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   Bouton Actualiser (Desktop Header / Mobile Floating FAB — Standard Hendrik)
   ========================================================================== */

.btn-refresh-app {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted, #94a3b8);
}

.btn-refresh-app:hover {
  color: var(--suada-gold, #CC9F33);
  background: rgba(204, 159, 51, 0.1);
  border-color: rgba(204, 159, 51, 0.3);
}

.btn-refresh-app:active {
  transform: scale(0.92);
}

/* Règle mobile #btnRefreshApp unifiée avec dinia_features.css */
@media (max-width: 640px) {
  #btnRefreshApp {
    position: relative !important;
    z-index: 10 !important;
  }
  #btnRefreshApp i,
  #btnRefreshApp svg {
    color: var(--text-main, #f8fafc) !important;
  }
}

/* ==========================================================================
   Point Vert Pulsant Vivant (Radar Beacon — Standard Dinia Lab / Atlas)
   ========================================================================== */

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
  animation: beaconCore 2s ease-in-out infinite;
}

.pulse-dot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.55);
  animation: beaconPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes beaconCore {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.45);
    opacity: 1;
    box-shadow: 0 0 16px rgba(16, 185, 129, 1);
  }
}

@keyframes beaconPing {
  0% {
    transform: scale(0.85);
    opacity: 0.95;
  }
  75%, 100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* ==========================================================================
   Animation Cascade Ondes Wi-Fi « En ligne » (du bas vers le haut)
   ========================================================================== */

#onlineStatus .lucide-wifi path {
  transition: opacity 0.25s ease, filter 0.25s ease;
  animation: wifiAscendingWave 2s ease-in-out infinite;
}

/* 1. Point central à la base (y=20) */
#onlineStatus .lucide-wifi path:nth-child(1) {
  animation-delay: 0s;
}

/* 2. Petit arc intérieur (y=16.4, rayon 5) */
#onlineStatus .lucide-wifi path:nth-child(4) {
  animation-delay: 0.25s;
}

/* 3. Arc moyen intermédiaire (y=12.8, rayon 10) */
#onlineStatus .lucide-wifi path:nth-child(3) {
  animation-delay: 0.5s;
}

/* 4. Grand arc supérieur (y=8.8, rayon 15) */
#onlineStatus .lucide-wifi path:nth-child(2) {
  animation-delay: 0.75s;
}

@keyframes wifiAscendingWave {
  0%, 100% {
    opacity: 0.30;
  }
  25%, 55% {
    opacity: 1;
    filter: drop-shadow(0 0 3px #10B981);
  }
}

.pulse-dot.offline {
  background-color: #EF4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9) !important;
  animation: beaconCoreRed 2s ease-in-out infinite !important;
}

.pulse-dot.offline::before {
  background-color: rgba(239, 68, 68, 0.55) !important;
}

@keyframes beaconCoreRed {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.45);
    opacity: 1;
    box-shadow: 0 0 16px rgba(239, 68, 68, 1);
  }
}

