/**
 * ============================================================================
 * AEROSUP v2.0 — FEUILLE DE STYLE TACTIQUE DARK MODE (Air, Mer, Terre, Espace)
 * ============================================================================
 */

:root {
  --bg-obsidian: #060b16;
  --bg-panel: rgba(11, 19, 36, 0.94);
  --border-hud: rgba(56, 189, 248, 0.22);
  --cyan-radar: #38bdf8;
  --emerald-sensor: #10b981;
  --amber-warn: #f59e0b;
  --rose-alert: #f43f5e;
  --violet-sat: #a855f7;
  --teal-ship: #14b8a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-obsidian);
  color: #e2e8f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  user-select: none;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

#map {
  width: 100%;
  height: 100%;
  background: #040811;
  z-index: 1;
}

/* Tuiles OpenStreetMap converties en mode radar aéronautique sombre */
.leaflet-tile-pane {
  filter: invert(100%) hue-rotate(192deg) brightness(90%) contrast(94%) saturate(75%);
}

.leaflet-container {
  background: #040811 !important;
}

/* Vue Globe 3D Orbital */
#globeContainer {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(circle at 50% 50%, #09152b 0%, #030712 75%, #010308 100%);
}

#globeCanvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  display: block;
}

#globeCanvas:active {
  cursor: grabbing;
}

/* Marqueurs d'avions, navires, satellites et véhicules */
.aircraft-marker-wrapper {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aircraft-icon-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.65));
}

.aircraft-icon-inner.is-vehicle {
  filter: drop-shadow(0 0 7px rgba(16, 185, 129, 0.8));
}

.aircraft-icon-inner.is-heli {
  filter: drop-shadow(0 0 7px rgba(245, 158, 11, 0.8));
}

.aircraft-icon-inner.is-ship {
  filter: drop-shadow(0 0 7px rgba(20, 184, 166, 0.85));
}

.aircraft-icon-inner.is-satellite {
  filter: drop-shadow(0 0 9px rgba(168, 85, 247, 0.95));
}

.aircraft-icon-inner.is-eol {
  filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.95));
}

.aircraft-icon-inner.is-selected svg {
  transform: scale(1.32);
}

.aircraft-callsign-tag {
  margin-top: 2px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f8fafc;
  background: rgba(6, 11, 22, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.aircraft-callsign-tag.tag-vehicle {
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}

.aircraft-callsign-tag.tag-heli {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fcd34d;
}

.aircraft-callsign-tag.tag-ship {
  border-color: rgba(20, 184, 166, 0.7);
  color: #5eead4;
}

.aircraft-callsign-tag.tag-satellite {
  border-color: rgba(168, 85, 247, 0.75);
  color: #e9d5ff;
  background: rgba(30, 10, 60, 0.9);
}

.aircraft-callsign-tag.tag-eol {
  border-color: rgba(244, 63, 94, 0.85);
  color: #fecdd3;
  background: rgba(69, 10, 26, 0.92);
}

/* Marqueur de Sonde au sol */
.sensor-station-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #052e16;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.28), 0 0 12px #10b981;
}

/* Marqueur d'Impact / Perte de signal Crash */
@keyframes crashPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.85); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 18px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.crash-impact-badge {
  background: rgba(136, 19, 55, 0.95);
  border: 2px solid #f43f5e;
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  animation: crashPulse 1.6s infinite;
}

/* Animation pulse pour le bouton Microphone actif */
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.75); }
  70% { box-shadow: 0 0 0 14px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.mic-listening {
  animation: micPulse 1.5s infinite;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  border-color: #fda4af !important;
  color: #ffffff !important;
}

/* Panneaux flottants verre dépoli (Glassmorphism) */
.hud-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-hud);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.75);
}

/* Personnalisation du Time-Slider */
input[type="range"].time-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  outline: none;
}

input[type="range"].time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #0f172a;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
  cursor: pointer;
}

/* Scrollbar fine */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 999px;
}

/* Popups Leaflet Dark */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8) !important;
}

/* ============================================================================
   MODULE RSSI & CYBERDEFENSE CTV-SIC (ARCS D'ATTAQUES LASER & BOUCLIERS SERVEURS)
   ============================================================================ */
@keyframes cyberArcFlow {
  0% {
    stroke-dashoffset: 48;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.cyber-attack-arc {
  stroke-dasharray: 8 6;
  animation: cyberArcFlow 1.1s linear infinite;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.9));
}

.cyber-attack-arc-amber {
  stroke-dasharray: 8 6;
  animation: cyberArcFlow 1.3s linear infinite;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.9));
}

@keyframes shieldPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.8), 0 0 16px rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 14px rgba(6, 182, 212, 0), 0 0 22px rgba(16, 185, 129, 0.9);
  }
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0), 0 0 16px rgba(16, 185, 129, 0.7);
  }
}

.cyber-server-shield {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(6, 24, 44, 0.94);
  border: 2px solid #06b6d4;
  color: #ecfeff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  animation: shieldPulse 2s infinite;
}

@keyframes ipLocatePulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.9);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 20px rgba(250, 204, 21, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

.ip-locate-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(24, 16, 4, 0.95);
  border: 2px solid #facc15;
  color: #fef08a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  animation: ipLocatePulse 1.6s infinite;
}
