/* Utiliser une hauteur dynamique basée sur 100dvh pour occuper toute
   la hauteur visible de l'écran, en particulier sur mobile. */
html, body {
  height: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}
/* Fallback pour les navigateurs ne supportant pas 100dvh */
@supports not (height: 100dvh) {
  html, body {
    min-height: 100vh;
  }
}

/* Fiabiliser la hauteur visible sur iOS/Android en utilisant svh.
   Le bloc ci‑dessus reste comme fallback pour les navigateurs qui ne
   prennent pas en charge svh. */
html, body {
  height: 100%;
  min-height: 100svh;
}
@supports not (height: 100svh) {
  html, body {
    min-height: 100dvh;
  }
}
/* Empêcher le scroll/overscroll et les gestes navigateur pendant le jeu */
html, body {
  overflow: hidden;
  overscroll-behavior: none;
}

canvas{ touch-action:none; display:block; margin:0 auto; }

/* HUD (solo) : respecter encoche / safe-area top quand présent */
#hudBar{ top: max(10px, env(safe-area-inset-top, 0px) + 6px) !important; }

@supports (padding: max(0px)) {
  body{ padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
.button, .btn, .hud-item{ min-height:44px; min-width:44px; }
@media (min-width: 768px){ .hud-bar{ display:flex; gap:8px; } }
