/* carte.css - DLR Multi-Services : module carte "zone d'intervention" (js/carte.js).
   Utilise --noir, --or, --blanc (definis sur :root par style.css). */

/* ---------------------------------------------------------------- reperes (calque au-dessus du canevas) */
.zone-carte__calque {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
  contain: strict;
}
.zone-carte__repere {
  position: absolute; top: 0; left: 0;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  will-change: transform;
}
.zone-carte__point {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--or, #E3A82B);
  box-shadow: 0 0 0 2px var(--noir, #0D0D0D), 0 0 10px 2px rgba(227, 168, 43, .55);
}
.zone-carte__nom {
  position: absolute; top: 50%;
  white-space: nowrap;
  font-family: var(--police);
  font-weight: 600; font-size: 13px; line-height: 1.1; letter-spacing: .02em;
  color: var(--blanc, #F7F7F5);
  text-shadow: 0 0 2px var(--noir, #0D0D0D), 0 0 6px rgba(13, 13, 13, .95), 0 1px 10px rgba(13, 13, 13, .9);
}
.zone-carte__repere--d .zone-carte__nom { left: calc(100% + 8px); transform: translateY(-50%); }
.zone-carte__repere--g .zone-carte__nom { right: calc(100% + 8px); transform: translateY(-50%); text-align: right; }
.zone-carte__repere--b .zone-carte__nom { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); text-align: center; }
.zone-carte__repere--h .zone-carte__nom { top: auto; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); text-align: center; }

/* siege : point plus grand, etiquette plus forte, onde doree */
.zone-carte__repere--siege { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.zone-carte__repere--siege .zone-carte__point {
  box-shadow: 0 0 0 3px var(--noir, #0D0D0D), 0 0 0 4.5px var(--or, #E3A82B), 0 0 18px 6px rgba(227, 168, 43, .6);
}
.zone-carte__repere--siege .zone-carte__nom { font-weight: 800; font-size: 16px; }
.zone-carte__repere--siege.zone-carte__repere--d .zone-carte__nom { left: calc(100% + 11px); }
/* etiquette sans place libre au cadrage final (placerEtiquettes) : le point reste seul */
.zone-carte__repere--muet .zone-carte__nom { visibility: hidden; }
.zone-carte__repere--efface { visibility: hidden; }

/* ---------------------------------------------------------------- liste des communes du panneau sur petit ecran */
@media (max-width: 899px) {
  .zone__panneau .communes { display: flex; gap: 5px; margin-top: 12px; }
  .zone__panneau .communes li { padding: 3px 9px; font-size: .8rem; }
}
.zone-carte__surtitre {
  display: block;
  font-family: var(--police);
  font-weight: 600; font-size: 11.5px; letter-spacing: .02em;
  color: var(--or, #E3A82B);
  margin-bottom: 1px;
}
.zone-carte__onde {
  position: absolute; left: 50%; top: 50%;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 1.5px solid var(--or, #E3A82B);
  opacity: 0;
  transform: scale(.3);
  animation: zone-carte-onde 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
@keyframes zone-carte-onde {
  0% { opacity: .9; transform: scale(.3); }
  100% { opacity: 0; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .zone-carte__onde { animation: none; opacity: .45; transform: scale(.6); }
}

/* ---------------------------------------------------------------- attribution (noir et or, compacte) */
.maplibregl-map .maplibregl-ctrl.maplibregl-ctrl-attrib {
  margin: 0 8px 8px 0;
  background-color: rgba(13, 13, 13, .72);
  color: rgba(247, 247, 245, .7);
  font: 500 10.5px/1.45 var(--police);
  letter-spacing: .02em;
  border-radius: 12px;
}
.maplibregl-map .maplibregl-ctrl-attrib a { color: rgba(247, 247, 245, .82); text-decoration: none; }
.maplibregl-map .maplibregl-ctrl-attrib a:hover { color: var(--or, #E3A82B); text-decoration: underline; }
.maplibregl-map .maplibregl-ctrl-attrib a:focus-visible,
.maplibregl-map .maplibregl-ctrl-attrib-button:focus-visible { outline: 2px solid var(--or, #E3A82B); outline-offset: 2px; }
.maplibregl-map .maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 2px 28px 2px 10px; border-radius: 12px; }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 24px; background-color: rgba(13, 13, 13, .72); }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button { background-color: var(--or, #E3A82B); }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button:hover { background-color: #f0bb48; }
