/* Styles Glassmorphism haut de gamme et animations pour Protec Live - Gestion de la Protection Civile */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --pc-blue: #002E6D;
  --pc-blue-light: #0B4EA2;
  --pc-blue-dark: #001A3D;
  --pc-orange: #FF6600;
  --pc-orange-light: #FF8533;
  --pc-orange-soft: #FFF3EB;
  --pc-cyan: #0284C7;
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 8px 32px 0 rgba(0, 46, 109, 0.08), 0 2px 8px rgba(0, 0, 0, 0.02), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  --glass-shadow-lg: 0 16px 48px 0 rgba(0, 46, 109, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04), inset 0 1px 1.5px rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  overflow: hidden !important;
  overflow-x: hidden !important;
  position: fixed;
  inset: 0;
  background-color: #f1f5f9;
  color: #1e293b;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}

/* Glassmorphism Classes Haut de Gamme */
.glass-panel {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 8px 32px 0 rgba(0, 46, 109, 0.1), 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.glass-panel-heavy {
  background: #f8fafc !important;
  backdrop-filter: blur(26px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(190%) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 20px 48px -12px rgba(0, 46, 109, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
}

/* Désactivation stricte du module de publicité pour les joueurs */
#ad-reward-widget, #ad-reward-separator, #ad-btn-mobile, #ad-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.glass-card {
  background: #ffffff !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px 0 rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover,
.glass-card:focus-within,
.glass-card:has(.group\/skill:hover) {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 6px 20px 0 rgba(15, 23, 42, 0.12) !important;
  position: relative !important;
  z-index: 60 !important;
}

.group\/skill {
  position: relative;
}

.group\/skill:hover {
  z-index: 999 !important;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px 0 rgba(0, 46, 109, 0.06) !important;
}

/* Infobulle de compétences : fond sombre profond et contraste maximal */
#global-skills-tooltip {
  background-color: #0b1120 !important;
  color: #f8fafc !important;
  border: 2px solid #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  border-radius: 1rem !important;
  z-index: 99999 !important;
}

.glass-button {
  background: #ffffff !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-button:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

.glass-button:active {
  transform: translateY(0);
}

.glass-input {
  background: #ffffff !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s ease;
}

.glass-input:focus {
  background: #ffffff !important;
  border-color: #002E6D !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 46, 109, 0.15) !important;
}

.glass-card-blue {
  background: rgba(0, 46, 109, 0.05) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(0, 46, 109, 0.15) !important;
  box-shadow: 0 4px 16px 0 rgba(0, 46, 109, 0.04), inset 0 1px 0.5px rgba(255, 255, 255, 0.9) !important;
}

.glass-card-orange {
  background: rgba(255, 102, 0, 0.06) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(255, 102, 0, 0.22) !important;
  box-shadow: 0 4px 16px 0 rgba(255, 102, 0, 0.05), inset 0 1px 0.5px rgba(255, 255, 255, 0.9) !important;
}

.glass-card-emerald {
  background: rgba(16, 185, 129, 0.06) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(16, 185, 129, 0.22) !important;
  box-shadow: 0 4px 16px 0 rgba(16, 185, 129, 0.04), inset 0 1px 0.5px rgba(255, 255, 255, 0.9) !important;
}

.glass-card-amber {
  background: rgba(245, 158, 11, 0.06) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  box-shadow: 0 4px 16px 0 rgba(245, 158, 11, 0.04), inset 0 1px 0.5px rgba(255, 255, 255, 0.9) !important;
}

.glass-card-purple {
  background: rgba(147, 51, 234, 0.06) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(147, 51, 234, 0.2) !important;
  box-shadow: 0 4px 16px 0 rgba(147, 51, 234, 0.04), inset 0 1px 0.5px rgba(255, 255, 255, 0.9) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 46, 109, 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 46, 109, 0.3);
}

/* Radar Pulse Animations for Mission Markers */
.radar-ping-orange {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: rgba(255, 102, 0, 0.35);
  animation: radar-pulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

.radar-ping-blue {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: rgba(0, 46, 109, 0.3);
  animation: radar-pulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

.radar-ping-red {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: rgba(239, 68, 68, 0.45);
  animation: radar-pulse 1.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

.radar-ping-purple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: rgba(147, 51, 234, 0.35);
  animation: radar-pulse 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

/* Marker Base Styling */
.custom-leaflet-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-leaflet-marker:hover {
  transform: scale(1.15) translateY(-3px);
  z-index: 9999 !important;
}

.marker-inner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 30, 80, 0.22);
  border: 2.5px solid #ffffff;
  color: white;
  position: relative;
  z-index: 2;
}

.marker-inner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}

.badge-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff6600;
  color: white;
  font-size: 10px;
  font-weight: 800;
  border-radius: 9999px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 3;
}

/* Slide Drawer animation */
.drawer-slide-in {
  animation: slideDrawer 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.drawer-slide-out {
  animation: slideDrawerOut 0.25s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes slideDrawer {
  from {
    transform: translateX(105%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideDrawerOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(105%);
    opacity: 0;
  }
}

/* Modal scale animation */
.modal-fade-in {
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Subtle Shimmer for progress bars */
.shimmer-bar {
  position: relative;
  overflow: hidden;
}

.shimmer-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Leaflet map custom override for clean minimalist view */
.leaflet-container {
  font-family: inherit;
  background-color: #e9eef2 !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--glass-shadow) !important;
  border-radius: 14px !important;
  overflow: hidden;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8) !important;
}

.leaflet-control-zoom a {
  background: transparent !important;
  color: #002e6d !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  transition: background 0.15s ease;
}

.leaflet-control-zoom a:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #ff6600 !important;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(4px);
  font-size: 10px !important;
  color: #64748b !important;
  border-top-left-radius: 8px;
  padding: 2px 8px !important;
}

/* Leaflet Layers Control Styling */
.leaflet-control-layers {
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(14px) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #002e6d !important;
  padding: 8px 12px !important;
}

.leaflet-control-layers-toggle {
  background-size: 18px 18px !important;
}

.leaflet-control-layers-expanded {
  padding: 10px 14px !important;
}

/* Number ticker animation helper */
.mono-num {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: 'tnum';
}

/* --- GYROPHARE & VÉHICULES EN ROUTE --- */
.vehicle-marker-container {
  position: relative;
  transition: transform 0.25s linear;
}

.beacon-flash {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #0284c7;
  box-shadow: 0 0 12px 4px #0284c7;
  animation: beacon-pulse 0.4s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes beacon-pulse {
  0% {
    opacity: 0.2;
    transform: scale(0.7);
    background-color: #0284c7;
    box-shadow: 0 0 4px 1px #0284c7;
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
    background-color: #38bdf8;
    box-shadow: 0 0 16px 6px #38bdf8;
  }
  100% {
    opacity: 0.4;
    transform: scale(0.9);
    background-color: #ffffff;
    box-shadow: 0 0 8px 3px #ffffff;
  }
}

/* Trajet routier animé */
.route-line-animated {
  stroke-dasharray: 8, 12;
  animation: dash-animation 1.4s linear infinite;
}

@keyframes dash-animation {
  to {
    stroke-dashoffset: -20;
  }
}

/* Overlay Jour / Nuit progressif et naturel sur la carte */
#map-night-filter {
  pointer-events: none;
  transition: background-color 2.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background-color;
}

/* Statuts Opérationnels Radio Protection Civile */
.status-badge-1 { background-color: #10b981; color: #ffffff; } /* Dispo Antenne */
.status-badge-2 { background-color: #0284c7; color: #ffffff; } /* Départ / En route */
.status-badge-3 { background-color: #f59e0b; color: #ffffff; } /* Sur les lieux */
.status-badge-4 { background-color: #ef4444; color: #ffffff; } /* Transport CHU */
.status-badge-5 { background-color: #8b5cf6; color: #ffffff; } /* Arrivée CHU / Bilan */
.status-badge-6 { background-color: #64748b; color: #ffffff; } /* Retour Antenne */

/* Main Courante Radio Feed Item */
.radio-log-item {
  position: relative;
  border-left: 3px solid #002e6d;
  transition: all 0.2s ease;
}
.radio-log-item:hover {
  background-color: rgba(0, 46, 109, 0.04);
}

/* --- UTILITAIRES RESPONSIVES & DOCK GLASSMORPHISM --- */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Dock tactile et fluide */
.dock-container {
  max-width: calc(100vw - 1.5rem);
  box-shadow: 0 20px 50px -10px rgba(0, 46, 109, 0.18), inset 0 1px 1.5px rgba(255, 255, 255, 0.95) !important;
}

/* Modales glassmorphism aérées */
#main-modal .modal-fade-in {
  max-width: min(920px, calc(100vw - 1.5rem));
  max-height: min(88vh, 850px);
}

@media (max-width: 768px) {
  #context-drawer {
    width: 100% !important;
    max-width: 100vw !important;
    top: auto !important;
    bottom: 0 !important;
    height: 85vh !important;
    max-height: 88vh !important;
    left: 0 !important;
    right: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
    margin: 0 !important;
  }

  .drawer-slide-in {
    animation: slideDrawerBottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  .drawer-slide-out {
    animation: slideDrawerBottomOut 0.25s cubic-bezier(0.7, 0, 0.84, 0) forwards !important;
  }

  #main-modal {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }

  #main-modal .modal-fade-in {
    max-width: 100vw !important;
    max-height: 90vh !important;
    width: 100% !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
  }

  /* Repositionnement des contrôles Leaflet sur mobile pour ne pas chevaucher le dock */
  .leaflet-bottom.leaflet-right {
    bottom: 5.25rem !important;
    right: 0.75rem !important;
    z-index: 15 !important;
  }

  .leaflet-top.leaflet-left {
    top: 6.5rem !important;
    left: 0.75rem !important;
  }

  /* Toasts de notifications mobiles sans déborder */
  #toast-container {
    top: 5.5rem !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    max-width: calc(100vw - 1.5rem) !important;
  }

  .dock-container {
    max-width: calc(100vw - 1rem) !important;
    padding: 0.35rem 0.5rem !important;
    gap: 0.25rem !important;
  }

  .dock-btn {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }

  /* Safe area pour les téléphones modernes (iPhone notch / home bar) */
  .safe-bottom {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }

  /* Amélioration des zones tactiles */
  button, select, input {
    touch-action: manipulation;
  }

  /* Scroll fluide horizontal pour les filtres et widgets */
  .mobile-scroll-x {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0.4rem;
  }

  .mobile-scroll-x > * {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

@keyframes slideDrawerBottom {
  from {
    transform: translateY(105%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDrawerBottomOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(105%);
    opacity: 0;
  }
}

/* ==========================================================================
   COMPOSANT BOTTOM SHEET UNIVERSEL & GESTION TACTILE (SMARTPHONE / TABLETTE)
   ========================================================================== */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-container {
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  background: #f8fafc;
  border-top-left-radius: 1.75rem;
  border-top-right-radius: 1.75rem;
  border: 1.5px solid #cbd5e1;
  border-bottom: none;
  box-shadow: 0 -12px 40px -10px rgba(0, 46, 109, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bottomSheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

@media (min-width: 769px) {
  .bottom-sheet-overlay {
    align-items: center;
    padding: 1.5rem;
  }
  .bottom-sheet-container {
    border-radius: 1.75rem;
    border-bottom: 1.5px solid #cbd5e1;
    max-height: 88vh;
  }
}

.bottom-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 9999px;
  background: #cbd5e1;
  margin: 10px auto 4px auto;
  cursor: grab;
  flex-shrink: 0;
  transition: background 0.2s ease, width 0.2s ease;
}

.bottom-sheet-handle:hover,
.bottom-sheet-handle:active {
  background: #94a3b8;
  width: 52px;
}

@keyframes bottomSheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bottomSheetSlideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.bottom-sheet-slide-down {
  animation: bottomSheetSlideDown 0.22s cubic-bezier(0.7, 0, 0.84, 0) forwards !important;
}

/* ==========================================================================
   PANNEAU D'ACTION RAPIDE (QUICK DISPATCH / ACTION SHEET D'URGENCE)
   ========================================================================== */
.quick-dispatch-sheet {
  background: linear-gradient(180deg, #0f172a 0%, #001a3d 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 -16px 50px -10px rgba(0, 0, 0, 0.5) !important;
}

.quick-dispatch-btn-urgent {
  background: linear-gradient(135deg, #ff6600 0%, #ea580c 100%);
  box-shadow: 0 4px 18px 0 rgba(234, 88, 12, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-dispatch-btn-urgent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px 0 rgba(234, 88, 12, 0.6);
}

.quick-dispatch-btn-urgent:active {
  transform: translateY(1px);
}

.quick-dispatch-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.quick-dispatch-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Badge de statut RNMSC et Recyclage */
.badge-rnmsc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-recycled {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Grille modale mobile rapide */
.mobile-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(0, 46, 109, 0.05);
  transition: all 0.2s ease;
}
.mobile-grid-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.95);
}

/* Gyrophare d'urgence clignotant bleu/rouge éclatant pour véhicules en transit d'urgence */
.beacon-flash {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 10px #2563eb, 0 0 20px #3b82f6;
  animation: beaconPulse 0.35s infinite alternate ease-in-out;
  flex-shrink: 0;
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.7;
    background: #1d4ed8;
    box-shadow: 0 0 6px #1d4ed8, 0 0 12px #3b82f6;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    background: #60a5fa;
    box-shadow: 0 0 14px #60a5fa, 0 0 24px #3b82f6, 0 0 35px #93c5fd;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.85;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444, 0 0 18px #f87171;
  }
}

/* Styles Plan d'Architecte 2D, Bâtiments & Sécurité */
.blueprint-paper {
  background-color: #0b192c;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
}

.construction-ribbon {
  background: repeating-linear-gradient(
    45deg,
    #eab308,
    #eab308 10px,
    #1e293b 10px,
    #1e293b 20px
  );
  animation: constructionSlide 1.5s linear infinite;
  background-size: 28px 28px;
}

@keyframes constructionSlide {
  0% { background-position: 0 0; }
  100% { background-position: 28px 0; }
}

.architect-wall-outer {
  border: 4px solid #0f172a;
}

/* --- SOUS-MENUS FLOTTANTS DU DOCK & NAVIGATION HIÉRARCHIQUE --- */
.dock-menu-wrapper {
  position: relative;
}

.dock-submenu {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.96);
  min-width: 210px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 48px -10px rgba(0, 46, 109, 0.22), 0 4px 16px rgba(0, 0, 0, 0.05), inset 0 1px 1.5px rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 60;
}

.dock-submenu.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dock-submenu-header {
  padding: 0.4rem 0.6rem 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dock-submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.dock-submenu-item:hover {
  background: rgba(0, 46, 109, 0.08);
  color: #002E6D;
  transform: translateX(2px);
}

.dock-submenu-item:active {
  transform: scale(0.98);
}

/* Indicateur flèche vers le bas pour le popover */
.dock-submenu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.88) transparent transparent transparent;
}

/* Styles pour les abréviations & infobulles du glossaire */
#global-abbr-tooltip {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  pointer-events: none;
}

abbr.protec-abbr, [data-abbr], .protec-abbr {
  text-decoration: underline dotted rgba(2, 132, 199, 0.5);
  text-underline-offset: 2.5px;
  cursor: help;
}

/* ==========================================================================
   TABLEAU EN LIÈGE ET ÉCUSSONS BRODÉS DE COLLECTION (MYPROTEC)
   ========================================================================== */
.cork-board-frame {
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.7),
    0 24px 50px -15px rgba(0, 0, 0, 0.6),
    0 0 0 8px #452410,
    0 0 0 12px #261105;
  background-size: cover;
  position: relative;
}

.patch-embroidered {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.patch-embroidered:hover {
  transform: translateY(-5px) scale(1.08);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55));
}

.patch-pin {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   TIMELINE MULTI-ÉTAPES & MARQUEURS LEAFLET DYNAMIQUES
   ========================================================================== */
.timeline-leaflet-icon {
  background: transparent !important;
  border: none !important;
}

.timeline-marker {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.timeline-marker:hover {
  transform: scale(1.06);
  z-index: 9999 !important;
}

/* ==========================================================================
   CLUSTERING DE MARQUEURS DE MISSIONS (PROTECTION CIVILE)
   ========================================================================== */
.custom-mission-cluster {
  background: transparent !important;
  border: none !important;
}

.mission-cluster-badge {
  background: linear-gradient(135deg, #002E6D 0%, #1e40af 100%);
  color: #ffffff;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 46, 109, 0.45), 0 0 0 3px rgba(255, 102, 0, 0.6);
  border-radius: 9999px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.mission-cluster-badge:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(0, 46, 109, 0.6), 0 0 0 4px rgba(255, 102, 0, 0.9);
}

/* ==========================================================================
   REFLET SPÉCULAIRE DE L'ÉCUSSON MEMBRE FONDATEUR (MASQUÉ VIA CALQUE)
   ========================================================================== */
.ecusson-fondateur-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  vertical-align: middle;
}

.ecusson-fondateur-wrapper:hover {
  transform: scale(1.08) translateY(-3px);
  filter: drop-shadow(0 10px 22px rgba(0, 46, 109, 0.45));
}

.ecusson-fondateur-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  
  /* Masque de découpe utilisant le calque utilisateur (zones opaques = reflet actif) */
  -webkit-mask-image: url('images/badges/membre_fondateur_mask.png');
  mask-image: url('images/badges/membre_fondateur_mask.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  
  /* Mode de fusion spéculaire / éclaircissant */
  mix-blend-mode: screen;
}

/* Faisceau lumineux oblique traversant le blason */
.ecusson-fondateur-shimmer {
  position: absolute;
  top: -60%;
  left: -130%;
  width: 280%;
  height: 220%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.25) 42%,
    rgba(255, 255, 255, 0.85) 48%,
    rgba(255, 240, 200, 0.95) 50%,
    rgba(255, 255, 255, 0.85) 52%,
    rgba(180, 220, 255, 0.35) 58%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(0deg);
  animation: ecusson-fondateur-sweep 4.2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  opacity: 0.88;
  filter: blur(1px);
}

/* Léger halo pulsant au sommet pour rehausser la texture mate */
.ecusson-fondateur-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 45% 30%,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 220, 120, 0.12) 30%,
    transparent 65%
  );
  animation: ecusson-fondateur-pulse 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes ecusson-fondateur-sweep {
  0% {
    transform: translateX(-45%) translateY(-15%);
  }
  32% {
    transform: translateX(45%) translateY(15%);
  }
  100% {
    transform: translateX(45%) translateY(15%);
  }
}

@keyframes ecusson-fondateur-pulse {
  0% {
    opacity: 0.25;
  }
  100% {
    opacity: 0.75;
  }
}

.ecusson-fondateur-wrapper:hover .ecusson-fondateur-shimmer {
  animation: ecusson-fondateur-sweep 2.2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  opacity: 1;
}


