/* Zoom + drag pour la carte fournie, version 20261015. */
.m-map { position:relative; overflow:hidden!important; }
.m-map #m-svg {
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1672/941;
  display:block;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.m-map[data-can-pan="true"] #m-svg { cursor:grab; }
.m-map[data-dragging="true"] #m-svg,
.m-map[data-dragging="true"] .m-zone polygon { cursor:grabbing!important; }
.m-zoom-controls {
  position:absolute;
  top:12px;left:12px;z-index:6;
  display:flex;align-items:center;gap:5px;
  padding:5px;
  color:#f7f6ef;
  border:1px solid rgba(236,213,153,.43);
  border-radius:12px;
  background:rgba(0,0,0,.95);
  box-shadow:0 6px 22px rgba(0,0,0,.34);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
.m-zoom-controls button {
  display:grid;place-items:center;
  width:42px;height:42px;min-width:42px;
  padding:0;margin:0;
  border:1px solid rgba(236,213,153,.26);
  border-radius:9px;
  background:#000000;color:#f8e8c1;
  font:600 24px/1 system-ui,sans-serif;
  cursor:pointer;
}
.m-zoom-controls button:hover:not(:disabled),
.m-zoom-controls button:focus-visible {
  background:#000000;
  border-color:#ecd599;
}
.m-zoom-controls button:focus-visible { outline:2px solid white;outline-offset:2px; }
.m-zoom-controls button:disabled {opacity:.36;cursor:not-allowed;}
.m-zoom-level {
  min-width:62px;
  padding:0 4px;
  text-align:center;
  color:#f9f5eb;
  font:600 12px/1.3 system-ui,sans-serif;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.m-map polygon:focus-visible {stroke:#f9dfa1;stroke-width:4;}
.m-map[data-dragging="true"] #m-svg * {user-select:none;}
@media(max-width:600px) {
  .m-zoom-controls {top:8px;left:8px;gap:3px;padding:3px;border-radius:10px;}
  .m-zoom-controls button {height:34px;width:34px;min-width:34px;font-size:19px;border-radius:8px;}
  .m-zoom-controls button svg {width:16px;height:16px;}
  .m-zoom-level{min-width:43px;font-size:10px;padding:0 2px;}
}
@media(prefers-reduced-motion:reduce) {
  .m-map .m-zone polygon {transition:none!important;}
}

/* Labels remain at the exact visual size of the 100% view, regardless of viewBox zoom.
   Their map coordinates continue to follow the image and the district contours. */
.m-map #m-svg {
  --ire-base-label-size:14px;
  --ire-base-label-outline:3.5px;
}
.m-map #m-svg .m-zone text {
  font-size:calc(var(--ire-base-label-size) * var(--ire-label-scale, 1));
  stroke-width:calc(var(--ire-base-label-outline) * var(--ire-label-scale, 1));
}

/* SVG polygon focus must follow the real polygon path, not draw a square bounding box.
   Keep a high-contrast contour for keyboard navigation and selected districts. */
.m-map #m-svg .m-zone polygon:focus,
.m-map #m-svg .m-zone polygon:focus-visible {
  outline:none!important;
  stroke:#f6d999;
  stroke-width:4px;
}
@media(max-width:600px) {
  /* Conserver la carte complete dans la largeur du mobile; le zoom permet ensuite d'explorer. */
  .m-map #m-svg {--ire-base-label-size:12px;width:100%!important;min-width:0!important;}
}
/* Icônes vectorielles des commandes de zoom */
.m-zoom-controls button svg {
  width:19px;height:19px;display:block;pointer-events:none;
  stroke:currentColor;flex:none;
}
