/* ============================================================
   NÉODRIVE — style.css  (habillage synthwave spatial)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;   /* pas de pull-to-refresh sur mobile */
  background: #05010f;         /* évite les bords blancs (zones sûres / letterbox) en PWA */
}

body {
  background: #05010f;
  color: #eafcff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cadre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#titre {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #00f0ff;
  text-shadow: 0 0 8px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.5);
}

#titre span {
  color: #ff00c8;
  text-shadow: 0 0 8px #ff00c8, 0 0 20px rgba(255, 0, 200, 0.5);
  font-weight: 400;
  letter-spacing: 2px;
}

#jeu {
  display: block;
  /* Le canvas garde sa résolution interne 960×600 et se met à l'échelle
     de l'écran en conservant ses proportions (comme une image). */
  max-width: 100vw;
  max-height: 100dvh;
  border: 1px solid rgba(160, 32, 240, 0.5);
  border-radius: 4px;
  box-shadow:
    0 0 20px rgba(160, 32, 240, 0.4),
    inset 0 0 60px rgba(5, 1, 15, 0.8);
  touch-action: none;   /* pas de scroll/zoom au toucher */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Overlay « tourne ton téléphone » (affiché en portrait sur tactile) */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #05010f;
  color: #eafcff;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(20px, 6vw, 32px);
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  padding: 24px;
}
@media (orientation: portrait) and (pointer: coarse) {
  #rotate { display: flex; }
}

/* Petits écrans / tactile : on masque le titre pour donner tout l'espace au jeu */
@media (max-width: 820px), (pointer: coarse) {
  #titre { display: none; }
  #cadre { gap: 0; }
  #jeu {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}
