/* carte.css — styles du composant de carte commun (outils/communs/carte/carte.js), après maplibre-gl.css.
   Fenêtres, infobulles et contrôles gardent les classes et la structure de Leaflet, pour que le CSS des sites
   (ex. .leaflet-popup-content-wrapper) s'applique sans changement. Règles reprises de Leaflet 1.9.4 :
   Copyright (c) 2010-2023, Volodymyr Agafonkin ; Copyright (c) 2010-2011, CloudMade.
   Licence BSD à 2 clauses (https://github.com/Leaflet/Leaflet/blob/main/LICENSE). */
.leaflet-tooltip-pane {z-index: 650; }
.leaflet-popup-pane {z-index: 700; }
.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-right .leaflet-control {float: right; }
.leaflet-top .leaflet-control {margin-top: 10px; }
.leaflet-bottom .leaflet-control {margin-bottom: 10px; }
.leaflet-left .leaflet-control {margin-left: 10px; }
.leaflet-right .leaflet-control {margin-right: 10px; }
.leaflet-interactive {cursor: pointer; }
.leaflet-popup-pane {cursor: auto; }
.leaflet-container { background: #ddd; outline-offset: 1px; font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; font-size: 0.75rem; line-height: 1.5; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; float: left; clear: both; }
.leaflet-bar {box-shadow: 0 1px 5px rgba(0,0,0,0.65); border-radius: 4px; }
.leaflet-bar a {background-color: #fff; border-bottom: 1px solid #ccc; width: 26px; height: 26px; line-height: 26px; display: block; text-align: center; text-decoration: none; color: black; }
.leaflet-bar a {background-position: 50% 50%; background-repeat: no-repeat; display: block; }
.leaflet-bar a:hover,
.leaflet-bar a:focus {background-color: #f4f4f4; }
.leaflet-bar a:first-child {border-top-left-radius: 4px; border-top-right-radius: 4px; }
.leaflet-bar a:last-child {border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom: none; }
.leaflet-bar a.leaflet-disabled {cursor: default; background-color: #f4f4f4; color: #bbb; }
.leaflet-touch .leaflet-bar a {width: 30px; height: 30px; line-height: 30px; }
.leaflet-touch .leaflet-bar a:first-child {border-top-left-radius: 2px; border-top-right-radius: 2px; }
.leaflet-touch .leaflet-bar a:last-child {border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; }
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {font: bold 18px 'Lucida Console', Monaco, monospace; text-indent: 1px; }
.leaflet-touch .leaflet-control-zoom-in,
.leaflet-touch .leaflet-control-zoom-out {font-size: 22px; }
.leaflet-container .leaflet-control-attribution {background: #fff; background: rgba(255, 255, 255, 0.8); margin: 0; }
.leaflet-control-attribution {padding: 0 5px; color: #333; line-height: 1.4; }
.leaflet-control-attribution a {text-decoration: none; }
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {text-decoration: underline; }
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-bar {box-shadow: none; }
.leaflet-touch .leaflet-bar {border: 2px solid rgba(0,0,0,0.2); background-clip: padding-box; }
.leaflet-popup {position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper {padding: 1px; text-align: left; border-radius: 12px; }
.leaflet-popup-content {margin: 13px 24px 13px 20px; line-height: 1.3; font-size: 13px; font-size: 1.08333em; min-height: 1px; }
.leaflet-popup-content p {margin: 17px 0; margin: 1.3em 0; }
.leaflet-popup-tip-container {width: 40px; height: 20px; position: absolute; left: 50%; margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip {width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; pointer-events: auto; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {background: white; color: #333; box-shadow: 0 3px 14px rgba(0,0,0,0.4); }
.leaflet-container a.leaflet-popup-close-button {position: absolute; top: 0; right: 0; border: none; text-align: center; width: 24px; height: 24px; font: 16px/24px Tahoma, Verdana, sans-serif; color: #757575; text-decoration: none; background: transparent; }
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {color: #585858; }
.leaflet-popup-scrolled {overflow: auto; }
.leaflet-tooltip {position: absolute; padding: 6px; background-color: #fff; border: 1px solid #fff; border-radius: 3px; color: #222; white-space: nowrap; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.leaflet-tooltip.leaflet-interactive {cursor: pointer; pointer-events: auto; }
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {position: absolute; pointer-events: none; border: 6px solid transparent; background: transparent; content: ""; }
.leaflet-tooltip-bottom {margin-top: 6px; }
.leaflet-tooltip-top {margin-top: -6px; }
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {left: 50%; margin-left: -6px; }
.leaflet-tooltip-top:before {bottom: 0; margin-bottom: -12px; border-top-color: #fff; }
.leaflet-tooltip-bottom:before {top: 0; margin-top: -12px; margin-left: -6px; border-bottom-color: #fff; }
.leaflet-tooltip-left {margin-left: -6px; }
.leaflet-tooltip-right {margin-left: 6px; }
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {top: 50%; margin-top: -6px; }
.leaflet-tooltip-left:before {right: 0; margin-right: -12px; border-left-color: #fff; }
.leaflet-tooltip-right:before {left: 0; margin-left: -12px; border-right-color: #fff; }

/* --- Leaflet : choix de calques, icônes, échelle --- */
.leaflet-control-layers { box-shadow: 0 1px 5px rgba(0,0,0,0.4); background: #fff; border-radius: 5px; }
.leaflet-control-layers-toggle { width: 36px; height: 36px; display: block; background: center / 20px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 8l10 5 10-5z'/%3E%3Cpath d='m2 13 10 5 10-5'/%3E%3C/svg%3E"); }
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle { display: none; }
.leaflet-control-layers-expanded .leaflet-control-layers-list { display: block; position: relative; }
.leaflet-control-layers-expanded { padding: 6px 10px 6px 6px; color: #333; background: #fff; }
.leaflet-control-layers-selector { margin-top: 2px; position: relative; top: 1px; }
.leaflet-control-layers label { display: block; font-size: 1.08333em; }
.leaflet-control-layers-separator { height: 0; border-top: 1px solid #ddd; margin: 5px -10px 5px -6px; }
.leaflet-div-icon { background: #fff; border: 1px solid #666; }
.leaflet-control-scale-line { border: 2px solid #777; border-top: none; line-height: 1.1; padding: 2px 5px 1px; white-space: nowrap; box-sizing: border-box; background: rgba(255, 255, 255, 0.8); text-shadow: 1px 1px #fff; }

/* --- Propre au composant (MapLibre) --- */
.leaflet-container { overflow: hidden; }
/* Volets de Leaflet : éléments HTML posés sur la carte, pour les couches sur mesure (L.Layer.extend) ; les tracés sont dans le canevas */
.carte-volets, .carte-volets > .leaflet-pane { position: absolute; inset: 0; pointer-events: none; }
.carte-volets { z-index: 2; }
/* Marqueurs : conteneur placé par MapLibre, icône placée comme dans Leaflet (marges selon iconAnchor) */
.carte-marqueur { line-height: 0; }
.carte-marqueur > .leaflet-marker-icon { display: block; position: relative; line-height: normal; }
.carte-marqueur > .leaflet-marker-shadow { position: absolute; }
.leaflet-marker-icon.non-interactif { pointer-events: none; }
.leaflet-marker-icon:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 50%; }
.leaflet-container .maplibregl-canvas { outline: none; }
.maplibregl-marker.leaflet-popup, .maplibregl-marker.leaflet-tooltip { will-change: transform; }
.leaflet-popup { cursor: auto; }
.leaflet-tooltip { pointer-events: none; }
.leaflet-tooltip.leaflet-interactive { pointer-events: auto; }
/* Crédit du fond : complet ; sur une carte étroite (.carte-etroite, moins de 600 px), « ⓘ © OpenStreetMap », complet au clic */
.leaflet-control-attribution .attr-bouton { display: none; }
.carte-etroite .leaflet-control-attribution .attr-bouton { display: inline-grid; place-items: center; width: 16px; height: 16px; margin: 0 4px 0 -2px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font: italic 700 11px/1 Georgia, serif; cursor: pointer; vertical-align: -3px; }
.carte-etroite .leaflet-control-attribution:not(.attr-ouvert) .attr-plein { display: none; }
