/* Carte des régions (embarquée dans l'app Flutter web via HtmlElementView).
   Reproduit RegionsMap.svelte de l'ancien site : mêmes pins, même habillage
   MapLibre, et le preflight Tailwind 4.2.2 qui s'appliquait à l'intérieur. */

@font-face {
  font-family: 'Fraunces';
  src: url('assets/assets/fonts/Fraunces.ttf') format('truetype');
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/assets/fonts/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: block;
}

/* Preflight Tailwind (portée limitée à la carte), en couche : comme sur le
   site, le CSS de MapLibre (hors couche) l'emporte en cas de conflit. */
@layer base {
  .rmap-host *, .rmap-host ::after, .rmap-host ::before {
    box-sizing: border-box; margin: 0; padding: 0; border: 0 solid;
  }
  .rmap-host a { color: inherit; text-decoration: inherit; }
  .rmap-host img, .rmap-host svg, .rmap-host canvas { display: block; vertical-align: middle; }
  .rmap-host img { max-width: 100%; height: auto; }
  .rmap-host button {
    font: inherit; font-feature-settings: inherit; font-variation-settings: inherit;
    letter-spacing: inherit; color: inherit; border-radius: 0; background-color: transparent;
    opacity: 1; appearance: button;
  }
  .rmap-host ol, .rmap-host ul { list-style: none; }
}

/* Hôte : contexte typographique HÉRITÉ, comme le <body> du site (la règle
   .maplibregl-map { font: 12px/20px } de MapLibre l'emporte donc dessous). */
.rmap-host {
  position: relative; width: 100%; height: 100%;
  font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  color: #1A1614; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.rmap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rmap-canvas.maplibregl-map { position: absolute; background: #FBF7F0; font-family: inherit; }
.rmap-canvas .maplibregl-ctrl-group {
  border-radius: 9999px; overflow: hidden; box-shadow: 0 2px 8px rgba(26, 22, 20, 0.15);
}

.rmap-pin { display: flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none; }
.rmap-pin__dot {
  width: 14px; height: 14px; border-radius: 9999px; background: #C83E3E;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 2px 6px rgba(26, 22, 20, 0.3);
  transition: transform 0.2s;
}
.rmap-pin__label {
  font-family: 'Fraunces', 'Georgia', serif; font-weight: 600; font-size: 13px; color: #1A1614;
  background: rgba(255, 255, 255, 0.92); padding: 2px 8px; border-radius: 9999px;
  border: 1px solid #E8E2DA; white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.rmap-pin:hover .rmap-pin__dot, .rmap-pin.is-active .rmap-pin__dot { transform: scale(1.3); }
.rmap-pin:hover .rmap-pin__label, .rmap-pin.is-active .rmap-pin__label {
  background: #1A1614; color: white; border-color: #1A1614;
}
.rmap-pin.is-active { z-index: 2; }
@media (max-width: 640px) {
  .rmap-pin__label { display: none; }
  .rmap-pin.is-active .rmap-pin__label { display: block; }
}

/* Fond de la fiche région (RegionMap.svelte décoratif + .hero-region__map). */
.region-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }
.region-map-canvas.maplibregl-map { position: absolute; background: #FBF7F0; font-family: inherit; }
.region-map-canvas--decorative,
.region-map-canvas--decorative .maplibregl-canvas-container,
.region-map-canvas--decorative .maplibregl-canvas,
.region-map-canvas--decorative .maplibregl-control-container,
.region-map-canvas--decorative .maplibregl-marker {
  pointer-events: none !important; touch-action: none !important; user-select: none; cursor: default !important;
}
.region-map-pin { position: relative; width: 22px; height: 22px; pointer-events: none; }
.region-map-pin__dot {
  position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 9999px; background: #C83E3E;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(26, 22, 20, 0.25);
}
.region-map-pin__pulse {
  position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 9999px; background: rgba(200, 62, 62, 0.35);
  animation: region-map-pulse 2.4s ease-out infinite;
}
@keyframes region-map-pulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}
