/*
 * NEXUS — Sous-ensemble du CSS de Leaflet 1.9.4 (licence BSD-2-Clause, © Vladimir Agafonkin)
 * ---------------------------------------------------------------------------
 * Seules les règles structurelles nécessaires à NEXUS sont reprises (panes,
 * contrôles, animations de zoom, infobulles, gestes tactiles). L'habillage
 * visuel est redéfini dans nexus.css.
 * En déploiement standard, on peut lui substituer le leaflet.css officiel
 * auto-hébergé (éviter un CDN tiers pour les feuilles de style : intégrité/CSP).
 */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container {
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Le squelette de page impose img{max-width:100%} : à neutraliser pour les tuiles. */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: auto;
  padding: 0;
}

.leaflet-tile { filter: inherit; visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }

.leaflet-container.leaflet-touch-zoom { touch-action: pan-x pan-y; }
.leaflet-container.leaflet-touch-drag { touch-action: none; touch-action: pinch-zoom; }
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { touch-action: none; }

.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }

.leaflet-zoom-box { width: 0; height: 0; box-sizing: border-box; z-index: 800; }

/* Contrôles */
.leaflet-control { position: relative; z-index: 800; pointer-events: visiblePainted; pointer-events: auto; }
.leaflet-top,
.leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 12px; }
.leaflet-bottom .leaflet-control { margin-bottom: 12px; }
.leaflet-left .leaflet-control { margin-left: 12px; }
.leaflet-right .leaflet-control { margin-right: 12px; }

/* Animations de zoom */
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity 0.2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
.leaflet-zoom-animated { transform-origin: 0 0; }
svg.leaflet-zoom-animated { will-change: transform; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1); }
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }

/* Curseurs */
.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; }
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive { cursor: crosshair; }
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable { cursor: move; cursor: grabbing; }

.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container { pointer-events: none; }
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive { pointer-events: visiblePainted; pointer-events: auto; }

/* Zoom : structure (l'habillage est dans nexus.css) */
.leaflet-bar a { display: block; text-align: center; text-decoration: none; }
.leaflet-control-zoom-in,
.leaflet-control-zoom-out { font-weight: 600; }

/* Attribution */
.leaflet-control-attribution { margin: 0; }
.leaflet-control-attribution a { text-decoration: none; }

/* Infobulles : positionnement (l'offset directionnel est calculé par Leaflet) */
.leaflet-tooltip {
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.leaflet-tooltip.leaflet-interactive { cursor: pointer; pointer-events: auto; }
