/* ==========================================================================
   Page Zones d'intervention — carte Leaflet (charte sombre + or)
   ========================================================================== */

.zones-map {
  position: relative;
  width: 100%;
  height: 540px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  background: var(--color-bg-card);
}

.zones-map__caption {
  margin-top: var(--spacing-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .zones-map { height: 420px; }
}

@media (max-width: 480px) {
  .zones-map { height: 360px; }
}

/* Leaflet container */
.leaflet-container {
  background: #0a0a0a;
  font-family: 'Open Sans', Arial, sans-serif;
}

/* Contrôles zoom */
.leaflet-control-zoom a {
  background: var(--color-bg-card) !important;
  color: var(--color-gold) !important;
  border: 1px solid var(--color-border) !important;
  transition: background 0.2s, color 0.2s;
}
.leaflet-control-zoom a:hover {
  background: var(--color-gold) !important;
  color: var(--color-bg) !important;
}

/* Attribution */
.leaflet-control-attribution {
  background: rgba(13, 13, 13, 0.85) !important;
  color: var(--color-text-muted) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a {
  color: var(--color-gold) !important;
  text-decoration: none;
}
.leaflet-control-attribution a:hover {
  text-decoration: underline;
}

/* Popups */
.leaflet-popup-content-wrapper {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-gold);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}
.leaflet-popup-tip {
  background: var(--color-gold);
}
.leaflet-popup-content {
  margin: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.leaflet-popup-content strong {
  display: block;
  margin-bottom: 4px;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-gold-light);
  font-size: 14px;
  letter-spacing: 0.5px;
}
.leaflet-popup-close-button {
  color: var(--color-gold) !important;
}

/* Marker siège SCIEZ — étoile dorée pulsante */
.marker-hq {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, var(--color-gold-light) 0%, var(--color-gold) 60%, transparent 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--color-gold), 0 0 40px rgba(201, 168, 76, 0.5);
  animation: marker-pulse 2.4s infinite ease-in-out;
}
.marker-hq svg {
  width: 18px;
  height: 18px;
  fill: var(--color-bg);
}
@keyframes marker-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px var(--color-gold), 0 0 40px rgba(201, 168, 76, 0.5);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 30px var(--color-gold-light), 0 0 60px rgba(232, 201, 122, 0.7);
  }
}

/* Markers villes secondaires */
.marker-city {
  width: 22px;
  height: 22px;
  background: var(--color-bg-card);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.marker-city::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
}

/* Légende sous la carte */
.zones-legend {
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.zones-legend__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.zones-legend__swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}
.zones-legend__swatch--zone {
  background: var(--color-gold);
  opacity: 0.35;
}
.zones-legend__swatch--hq {
  background: radial-gradient(circle, var(--color-gold-light), var(--color-gold));
  border-radius: 50%;
  border-color: var(--color-gold);
}
.zones-legend__swatch--city {
  background: var(--color-bg-card);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
}

/* Respect du paramètre OS prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .marker-hq { animation: none; }
}
