/* Aether HUD — AWEL Jarvis orb + panel (stitch_jarvis_hud_interface) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --aj-hull: #03070e;
  --aj-plate: #0b0f19;
  --aj-glass: rgba(11, 15, 25, 0.78);
  --aj-glass-hi: rgba(15, 23, 42, 0.88);
  --aj-cyan: #00f0ff;
  --aj-cyan-dim: #00dbe9;
  --aj-cobalt: #0266ff;
  --aj-amber: #ffb703;
  --aj-text: #edf8ff;
  --aj-muted: rgba(180, 220, 240, 0.65);
  --aj-edge: rgba(0, 240, 255, 0.22);
  --aj-edge-hot: rgba(0, 240, 255, 0.5);
  --aj-font-display: "Space Grotesk", system-ui, sans-serif;
  --aj-font-body: Inter, system-ui, sans-serif;
  --aj-font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* —— Orb FAB —— */
.awel-jarvis-orb {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  border: 1px solid var(--aj-edge-hot);
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 240, 255, 0.35), transparent 55%),
    radial-gradient(circle at 50% 60%, rgba(2, 102, 255, 0.35), var(--aj-hull) 70%);
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.35),
    inset 0 0 12px rgba(0, 240, 255, 0.12);
  color: var(--aj-cyan);
  overflow: visible;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease-out;
}

.awel-jarvis-orb:hover {
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.55),
    inset 0 0 14px rgba(0, 240, 255, 0.18);
}

.awel-jarvis-orb:active {
  transform: scale(0.96);
}

.awel-jarvis-orb:focus-visible {
  outline: 2px solid var(--aj-cyan);
  outline-offset: 3px;
}

.awel-jarvis-orb__ring {
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 1.5px dashed rgba(0, 240, 255, 0.45);
  pointer-events: none;
  animation: awel-jarvis-spin 14s linear infinite;
}

.awel-jarvis-orb__ring--inner {
  inset: 4px;
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 219, 233, 0.35);
  border-top-color: var(--aj-cyan);
  border-right-color: transparent;
  animation-duration: 7s;
  animation-direction: reverse;
}

.awel-jarvis-orb__core {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.awel-jarvis-orb__pulse {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.2);
  animation: awel-jarvis-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

.awel-jarvis-orb[aria-expanded="true"] {
  box-shadow:
    0 0 32px rgba(0, 240, 255, 0.65),
    inset 0 0 16px rgba(0, 240, 255, 0.25);
}

@keyframes awel-jarvis-spin {
  to { transform: rotate(360deg); }
}

@keyframes awel-jarvis-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .awel-jarvis-orb__ring,
  .awel-jarvis-orb__ring--inner,
  .awel-jarvis-orb__pulse {
    animation: none;
  }
}

/* —— HUD panel chrome —— */
.awel-jarvis-panel {
  font-family: var(--aj-font-body);
  color: var(--aj-text);
  background: var(--aj-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--aj-edge);
  border-radius: 0.5rem;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.55),
    inset 0 0 24px rgba(0, 240, 255, 0.05);
  overflow: hidden;
}

.awel-jarvis-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.08), transparent);
  border-bottom: 1px dashed rgba(0, 240, 255, 0.18);
}

.awel-jarvis-panel__header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  font-family: var(--aj-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aj-cyan);
  margin-left: auto;
  margin-right: 0.25rem;
}

.awel-jarvis-panel__eyebrow {
  font-family: var(--aj-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aj-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.awel-jarvis-panel__eyebrow::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--aj-cyan);
  box-shadow: 0 0 8px var(--aj-cyan);
  animation: awel-jarvis-pulse 2s ease-out infinite;
}

.awel-jarvis-panel__title {
  font-family: var(--aj-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aj-text);
  margin: 0.15rem 0 0;
}

.awel-jarvis-panel__meta {
  font-family: var(--aj-font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aj-muted);
}

.awel-jarvis-panel__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(3, 7, 14, 0.55);
  color: var(--aj-cyan-dim);
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}

.awel-jarvis-panel__icon-btn:hover {
  color: var(--aj-cyan);
  border-color: var(--aj-edge-hot);
  background: rgba(0, 240, 255, 0.1);
}

.awel-jarvis-panel__body {
  background: rgba(3, 7, 14, 0.55);
}

.awel-jarvis-panel__body iframe {
  background: transparent;
}

/* Panel body — pas de scroll : contenu compact */
.awel-jarvis-brief {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(78dvh, 36rem);
  overflow: hidden;
}

/* —— Module vocal : carte + cercle complet + micro/mute —— */
.awel-jarvis-sphere {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 0.5rem 0.5rem 0.6rem;
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 50% 28%, rgba(2, 102, 255, 0.14), transparent 52%),
    rgba(3, 7, 14, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.16);
  box-shadow: inset 0 0 28px rgba(0, 240, 255, 0.06);
  overflow: visible;
}

.awel-jarvis-sphere__telemetry {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 0.65rem;
  font-family: var(--aj-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aj-cyan-dim);
  z-index: 1;
}

.awel-jarvis-sphere__stage {
  position: relative;
  width: 9.25rem;
  height: 9.25rem;
  min-height: 9.25rem;
  margin: 0.25rem 0 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.awel-jarvis-sphere__ripple {
  position: absolute;
  inset: 0.5rem;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.06);
  animation: awel-jarvis-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

.awel-jarvis-sphere__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--aj-cyan);
  pointer-events: none;
}

.awel-jarvis-sphere__rings--cw {
  animation: awel-jarvis-spin 16s linear infinite;
}

.awel-jarvis-sphere__rings--ccw {
  animation: awel-jarvis-spin 10s linear infinite reverse;
}

.awel-jarvis-sphere__core {
  position: relative;
  z-index: 1;
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(2, 102, 255, 0.75), rgba(0, 240, 255, 0.25) 45%, rgba(11, 15, 25, 0.95));
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.45);
}

.awel-jarvis-sphere__core-inner {
  width: 4.65rem;
  height: 4.65rem;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.25rem;
  background: rgba(3, 7, 14, 0.92);
  backdrop-filter: blur(8px);
}

.awel-jarvis-sphere__logo {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  border-radius: 0.3rem;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35));
}

.awel-jarvis-sphere__name {
  font-family: var(--aj-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--aj-cyan);
}

.awel-jarvis-sphere__pct {
  font-family: var(--aj-font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aj-muted);
}

.awel-jarvis-progress {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0 0.35rem;
  flex-shrink: 0;
}

.awel-jarvis-progress.hidden {
  display: none !important;
}

.awel-jarvis-progress__label {
  margin: 0 0 0.3rem;
  font-family: var(--aj-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--aj-cyan);
}

.awel-jarvis-progress__track {
  position: relative;
  width: 100%;
  height: 0.28rem;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.awel-jarvis-progress__bar {
  display: block;
  height: 100%;
  width: 36%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--aj-cobalt), var(--aj-cyan));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
  animation: awel-jarvis-progress-slide 1.15s ease-in-out infinite;
}

.awel-jarvis-progress.is-determinate .awel-jarvis-progress__bar {
  animation: none;
  transition: width 220ms ease-out;
}

@keyframes awel-jarvis-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .awel-jarvis-progress__bar {
    animation: none;
    width: 70%;
    opacity: 0.85;
  }
}

.awel-jarvis-voice-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.awel-jarvis-mic,
.awel-jarvis-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.4rem;
  border: none;
  font-size: 1.05rem;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms ease-out;
}

.awel-jarvis-mic {
  background: var(--aj-cyan);
  color: var(--aj-hull);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.awel-jarvis-mic:hover {
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.65);
}

.awel-jarvis-mic.is-recording {
  background: #ff5c5c;
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 92, 92, 0.55);
  transform: scale(1.06);
}

.awel-jarvis-mic.is-busy,
.awel-jarvis-mic:disabled {
  opacity: 0.38;
  filter: grayscale(0.55);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.awel-jarvis-mute {
  background: rgba(3, 7, 14, 0.9);
  color: var(--aj-amber);
  border: 1px solid rgba(255, 183, 3, 0.45);
  box-shadow: 0 0 12px rgba(255, 183, 3, 0.2);
}

.awel-jarvis-mute:hover {
  border-color: var(--aj-amber);
  background: rgba(255, 183, 3, 0.12);
}

.awel-jarvis-mic:active,
.awel-jarvis-mute:active {
  transform: scale(0.96);
}

.awel-jarvis-mic--ghost {
  background: transparent;
  color: var(--aj-cyan);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: none;
}

.awel-jarvis-mic__caption {
  margin: 0.3rem 0 0;
  font-family: var(--aj-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aj-cyan);
}

.awel-jarvis-mic__caption--muted {
  color: var(--aj-muted);
}

/* Iframe AWEL hors écran pour la voix du centre ops (chat classic fermé).
   Pas de display:none / visibility:hidden — sinon l’audio iframe est tué. */
.awel-ops-audio-host {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 2px;
  opacity: 0.02;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.awel-ops-audio-host .awel-jarvis-stage,
.awel-ops-audio-host [data-cobeautyflow-rag-widget-target="stage"] {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 720px !important;
}

.awel-ops-audio-host iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.awel-jarvis-panel__eyebrow.is-online::before {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.awel-jarvis-eq {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.85rem;
  z-index: 1;
}

.awel-jarvis-eq span {
  flex: 1;
  height: var(--eq-h, 40%);
  border-radius: 2px 2px 0 0;
  background: var(--aj-cyan);
  opacity: 0.75;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.35);
  animation: awel-jarvis-eq-bar 1.15s ease-in-out infinite;
  transform-origin: bottom center;
}

.awel-jarvis-eq span:nth-child(odd) { background: var(--aj-cyan-dim); }
.awel-jarvis-eq span:nth-child(4n) {
  background: var(--aj-cobalt);
  box-shadow: 0 0 8px rgba(2, 102, 255, 0.55);
}

@keyframes awel-jarvis-eq-bar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.awel-jarvis-eq__labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0.15rem 0.85rem 0.35rem;
  font-family: var(--aj-font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--aj-muted);
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .awel-jarvis-sphere__rings--cw,
  .awel-jarvis-sphere__rings--ccw,
  .awel-jarvis-sphere__ripple,
  .awel-jarvis-sphere__eq-icon,
  .awel-jarvis-eq span {
    animation: none;
  }
  .awel-jarvis-eq span { transform: none; }
}

/* —— KPI RDV —— */
.awel-jarvis-kpis {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem;
  border-radius: 0.35rem;
  background: rgba(28, 31, 42, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.14);
  flex-shrink: 1;
  min-height: 0;
}

.awel-jarvis-kpis__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.awel-jarvis-kpis__title {
  font-family: var(--aj-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aj-text);
}

.awel-jarvis-kpis__live {
  font-family: var(--aj-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0b1a12;
  background: #34d399;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
}

.awel-jarvis-kpis__scope {
  margin: 0;
  font-family: var(--aj-font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--aj-muted);
}

.awel-jarvis-kpis__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.awel-jarvis-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.45rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(3, 7, 14, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.1);
}

.awel-jarvis-kpi--alert {
  border-color: rgba(255, 183, 3, 0.45);
  grid-column: 1 / -1;
}

.awel-jarvis-kpi__label {
  font-family: var(--aj-font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aj-muted);
}

.awel-jarvis-kpi__value {
  font-family: var(--aj-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--aj-cyan);
  line-height: 1;
}

.awel-jarvis-kpi--alert .awel-jarvis-kpi__value {
  color: var(--aj-amber);
}

.awel-jarvis-next {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.25rem;
  border-left: 2px solid var(--aj-cyan);
  background: rgba(0, 240, 255, 0.06);
}

.awel-jarvis-next__label {
  font-family: var(--aj-font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aj-cyan);
}

.awel-jarvis-next__when {
  font-family: var(--aj-font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aj-text);
}

.awel-jarvis-next__detail {
  font-size: 0.75rem;
  color: var(--aj-muted);
}

.awel-jarvis-kpis__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--aj-muted);
}

.awel-jarvis-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.35rem;
  border: none;
  font-family: var(--aj-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--aj-cyan);
  color: var(--aj-hull);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms ease-out;
}

.awel-jarvis-cta:hover {
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.55);
}

.awel-jarvis-cta:active {
  transform: scale(0.98);
}

.awel-jarvis-cta.is-busy,
.awel-jarvis-cta:disabled {
  opacity: 0.4;
  filter: grayscale(0.5);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.awel-jarvis-cta--ghost {
  background: transparent;
  color: var(--aj-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: none;
}

.awel-jarvis-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.awel-jarvis-chip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem;
  border-radius: 0.35rem;
  background: rgba(28, 31, 42, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: var(--aj-text);
  text-align: left;
  transition: border-color 160ms ease-out, background 160ms ease-out;
}

.awel-jarvis-chip:hover {
  border-color: var(--aj-edge-hot);
  background: rgba(0, 240, 255, 0.08);
}

.awel-jarvis-chip__label {
  font-family: var(--aj-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aj-muted);
}

.awel-jarvis-chip__value {
  font-family: var(--aj-font-display);
  font-size: 0.8rem;
  font-weight: 600;
}

body.landing-motion-body.lm-immersive-mode .awel-jarvis-root {
  display: none !important;
}
