.border-transparent{border-color:#0000}
.bottom-space-xs{bottom:var(--spacing-space-xs)}
.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}
.disabled\:opacity-50:disabled{opacity:.5}
.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}
.focus-visible\:outline-accent:focus-visible{outline-color:var(--color-accent)}
.hover\:bg-surface-muted:hover{background-color:var(--color-surface-muted)}
.left-space-md{left:var(--spacing-space-md)}
.left-space-sm{left:var(--spacing-space-sm)}
.max-h-full{max-height:100%}
.min-h-0{min-height:0}
.min-h-4{min-height:calc(var(--spacing) * 4)}
.p-space-xs{padding:var(--spacing-space-xs)}
.placeholder\:text-ink-faint::placeholder{color:var(--color-ink-faint)}
.text-right{text-align:right}
.top-space-md{top:var(--spacing-space-md)}
.w-8{width:calc(var(--spacing) * 8)}
.whitespace-nowrap{white-space:nowrap}
.z-10{z-index:10}
.min-h-screen{min-height:100vh}

/* ── Mode carte (/carte) : masquer le footer applicatif pour dédier 100% de la hauteur au canvas ── */
body:has(#map) > footer,
body:has(#map-3d-host) > footer,
body.carte-3d-immersive > footer {
  display: none !important;
}
body:has(#map),
body:has(#map-3d-host) {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}
body.carte-3d-immersive > header {
  display: none !important;
}
/* Main = viewport utile 100 % ; seule la barre outils 3D (iframe) + Fermer */
body.carte-3d-immersive > main {
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 10;
  padding: 0 !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: 100vh !important;
}
body.carte-3d-immersive > main > .relative {
  position: absolute !important;
  inset: 0;
  top: 0;
  height: 100% !important;
}
/* Host 3D remplit le viewport utile */
body.carte-3d-immersive #map-3d-host {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 5;
}
body.carte-3d-immersive #map-3d-frame {
  width: 100% !important;
  height: 100% !important;
}
/* Rail + facettes 2D masqués en 3D (le HUD iframe porte les calques) */
body.carte-3d-immersive #carte-rail,
body.carte-3d-immersive #panneau-fonds,
body.carte-3d-immersive #panneau-archives,
body.carte-3d-immersive #panneau-dessin,
body.carte-3d-immersive #carte-attribution-extra {
  display: none !important;
}
/* Fermer (revenir à la carte) : sticky, toujours visible au-dessus de l'iframe */
body.carte-3d-immersive #btn-fermer-3d {
  display: block !important;
  position: fixed !important;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
/* Panneau parcelle = seul panneau parent en 3D, semi-opaque, étroit (F4) */
body.carte-3d-immersive #carte-controls {
  z-index: 40;
  top: 0.5rem;
  left: 0.5rem;
  max-height: calc(100% - 1rem);
}
body.carte-3d-immersive #panneau-parcelle:not(.hidden) {
  display: flex !important;
  width: min(18rem, 88vw);
  max-height: min(65vh, 28rem);
  background: rgba(250, 245, 234, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
/* Attribution MapLibre sous l'iframe : inutile en 3D */
body.carte-3d-immersive .maplibregl-ctrl-bottom-left,
body.carte-3d-immersive .maplibregl-ctrl-bottom-right,
body.carte-3d-immersive .maplibregl-ctrl-attrib {
  display: none !important;
}
