/* ═══ NeonSlither — design system jeux.html ═══ */
.jeu-v-wrap { max-width: 480px; margin: 0 auto; }

#game-content { overflow: hidden; }

.nsl-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Utility */
.nsl-shell .hidden { display: none !important; }

/* ── Stage (canvas area) ── */
.nsl-stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(57,199,255,.34);
  background:
    radial-gradient(circle at center, rgba(46,230,166,.08), transparent 56%),
    linear-gradient(180deg, #07131f, #081826 54%, #07111a);
  box-shadow: 0 0 34px rgba(57,199,255,.12), inset 0 0 80px rgba(0,0,0,.5);
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.nsl-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,.012) 2px,
    rgba(255,255,255,.012) 4px
  );
  z-index: 2;
}

#nsl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* ── In-stage overlays ── */
.nsl-overlay,
.nsl-pause {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4,10,18,.72);
  backdrop-filter: blur(6px);
}

.nsl-pause {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.nsl-pause.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.nsl-overlay.hidden { display: none; }

/* ── Overlay content ── */
.nsl-overlay-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}

.nsl-overlay-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ── Menu form fields (inside light gp-overlay-box card) ── */
.nsl-menu-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 14px;
  text-align: left;
}

.nsl-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--tx3);
  text-transform: uppercase;
}

.nsl-field input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--bg2);
  color: var(--tx);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.dk .nsl-field input {
  background: var(--cd3);
  border-color: var(--bd2);
}

.nsl-field input:focus {
  border-color: rgba(57,199,255,.65);
  box-shadow: 0 0 0 3px rgba(57,199,255,.12);
}

/* ── Skin picker ── */
.nsl-skins {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.nsl-skin {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 0 0 1px var(--bd);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.nsl-skin:hover { transform: translateY(-1px); }

.nsl-skin.is-active {
  border-color: var(--a1);
  transform: scale(1.1);
  box-shadow: 0 0 0 1px var(--bd), 0 0 10px rgba(109,92,255,.2);
}

/* ── Best score hint in menu overlay ── */
.nsl-mini {
  margin-top: 10px;
  font-size: 11px;
  color: var(--tx3);
}

/* ── HTML page overlays (démarrage / fin) ── */
.jvnsl-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: var(--cd, #fff);
  border-radius: var(--r2, 14px);
  overflow: hidden;
}

.jvnsl-overlay.hidden { display: none; }

.jvnsl-overlay > .snk-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.jvnsl-overlay .snk-screen {
  justify-content: center;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .jeu-v-wrap { max-width: none; }
  .nsl-stage { width: min(100%, calc(100vw - 56px)); border-radius: 14px; }
}
