/* Annecy 3D — interface minimale posée sur la carte. Police système, aucun webfont.
   Palette d'interface tranchée par le bot design : disque sombre, anneau clair, accent vermillon. */
:root {
  --ui-bg: #101A1E;
  --ui-fg: #FFFFFF;
  --ui-accent: #F03A17;
  --ui-border: #F4F3EE;
  --earth: #E6E7E2;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--earth);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

#map { position: fixed; inset: 0; }

/* Boutons ronds 44 px, colonne à portée du pouce, au-dessus de l'attribution */
.ctl {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(56px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}
.ctl button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--ui-border);
  background: var(--ui-bg);
  color: var(--ui-fg);
  display: grid;
  place-items: center;
  font: 800 15px/1 var(--font);
  letter-spacing: .02em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ctl button[aria-pressed="true"] { background: var(--ui-accent); }
.ctl button:active { transform: scale(.94); }
.ctl button:focus-visible { outline: 3px solid var(--ui-accent); outline-offset: 2px; }
.ctl svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ctl svg .fill { fill: currentColor; stroke: none; }
#b-north .n { fill: var(--ui-accent); stroke: var(--ui-accent); }

#toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  max-width: calc(100vw - 32px);
  border-radius: 22px;
  background: var(--ui-bg);
  color: var(--ui-fg);
  font: 600 14px/1.35 var(--font);
  z-index: 3;
}
#toast[hidden] { display: none; }

/* Attribution : toujours visible (obligation OSM), compacte, lisible au soleil */
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib {
  margin: 0 0 calc(6px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left));
  max-width: calc(100vw - 76px);
  padding: 3px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .9);
  color: var(--ui-bg);
  font: 500 11px/1.4 var(--font);
}
.maplibregl-ctrl-attrib a { color: inherit; }
/* Bouton natif de géolocalisation masqué : piloté par #b-geo */
.maplibregl-ctrl-top-right { display: none; }

.fallback {
  position: fixed;
  inset: auto 16px 50% 16px;
  margin: 0;
  font: 600 16px/1.4 var(--font);
  text-align: center;
  color: var(--ui-bg);
}
