/* Thème Dark Matter & Animations Tactiques */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: #f1f5f9;
  overflow-x: hidden;
}

/* Scrollbars sombres et discrètes */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Carte Leaflet en plein écran */
#map {
  width: 100%;
  height: 100%;
  background: #090d16;
}

/* Thème sombre tactique appliqué aux tuiles OpenStreetMap (100% gratuit, 0 API key) */
.leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.28) brightness(0.75);
}

/* Attribution discrète */
.leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #64748b !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a {
  color: #94a3b8 !important;
}

/* Personnalisation popups Leaflet */
.leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}
.leaflet-popup-tip {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
}
.leaflet-container a.leaflet-popup-close-button {
  color: #94a3b8 !important;
  padding: 6px !important;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  color: #f8fafc !important;
}

/* Balise Radar Pulsante (Dernière position connue) */
.beacon-container {
  position: relative;
  width: 32px;
  height: 32px;
}

.beacon-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #ef4444;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444, 0 0 20px #ef4444;
  z-index: 2;
}

.beacon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border: 2px solid #ef4444;
  border-radius: 50%;
  animation: radar-pulse 1.8s ease-out infinite;
  opacity: 0;
  z-index: 1;
}

@keyframes radar-pulse {
  0% {
    width: 14px;
    height: 14px;
    opacity: 0.9;
  }
  100% {
    width: 60px;
    height: 60px;
    opacity: 0;
  }
}

/* Marqueurs personnalisés */
.marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.marker-pin-inner {
  transform: rotate(45deg);
  font-size: 11px;
  font-weight: bold;
}

/* Animations et transitions */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.2s ease;
}
.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

/* Adaptation Mobile & Safe Areas iOS/Android */
.safe-area-bottom {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Animations & Icones pour la Chronologie */
.custom-beacon-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.direction-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ========================================================= */
/* STYLES COUCHES TACTIQUES & OSINT                          */
/* ========================================================= */

/* Radars Vitesse & Feux Rouges */
.radar-feu-marker {
  width: 26px;
  height: 26px;
  background: #dc2626;
  border: 2px solid #fecaca;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.radar-feu-marker:hover {
  transform: scale(1.25);
}

.radar-speed-marker {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border: 2.5px solid #ef4444;
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace, monospace;
  font-weight: 900;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.radar-speed-marker:hover {
  transform: scale(1.25);
  border-color: #dc2626;
}

/* Caméras de Surveillance Direct */
.cctv-marker {
  width: 26px;
  height: 26px;
  background: #0284c7;
  border: 2px solid #bae6fd;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.cctv-marker:hover {
  transform: scale(1.25);
}

/* Péages Autoroutiers & Barrières Pleine Voie */
.toll-marker {
  width: 26px;
  height: 26px;
  background: #ea580c;
  border: 2px solid #fed7aa;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.toll-marker:hover {
  transform: scale(1.25);
}

/* Avions en direct (ADS-B) */
.plane-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  transition: transform 0.25s linear;
}
.plane-marker:hover {
  transform: scale(1.3);
}

/* Antennes & Relais ANTARES / TDF */
.antenna-marker {
  width: 26px;
  height: 26px;
  background: #7c3aed;
  border: 2px solid #ddd6fe;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.antenna-marker:hover {
  transform: scale(1.25);
}

/* Clusters Leaflet adaptés au thème sombre */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(15, 23, 42, 0.75) !important;
}
.marker-cluster-small div {
  background-color: rgba(16, 185, 129, 0.85) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-family: monospace;
}
.marker-cluster-medium div {
  background-color: rgba(245, 158, 11, 0.85) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-family: monospace;
}
.marker-cluster-large div {
  background-color: rgba(239, 68, 68, 0.85) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-family: monospace;
}

/* Égaliseur sonore Radio Scanner */
.sound-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.sound-equalizer .eq-bar {
  width: 3px;
  background-color: #10b981;
  border-radius: 1px;
  animation: eq-bounce 1s ease-in-out infinite alternate;
}
.sound-equalizer .eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.sound-equalizer .eq-bar:nth-child(2) { height: 80%; animation-delay: 0.3s; }
.sound-equalizer .eq-bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.sound-equalizer .eq-bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }

@keyframes eq-bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Simulateur de Fuite & Rayon d'Interception */
.escape-center-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Patrouille Mobile GPS Tracker Pulse */
@keyframes tracker-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}


