@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ═══ Doodle Jump — design system jeux.html ═══ */
.jeu-v-wrap { max-width: 480px; margin: 0 auto; }
#game-content { overflow: hidden; }

.jvdoodle-shell,
.jvdoodle-shell * { box-sizing: border-box; }

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

.jvdoodle-shell .hidden { display: none !important; }

/* ── Board ── */
.jvdoodle-board {
  width: 100%;
  display: grid;
  place-items: center;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

/* ── Stars background ── */
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  from { opacity: .2; }
  to   { opacity: .85; }
}

/* ── Bouton toggle mode clair ── */
.dj-icon-btn {
  padding: 4px 9px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .03em;
  opacity: .6;
  transition: opacity .15s, background .15s, border-color .15s, color .15s;
}

.dj-icon-btn.active {
  opacity: 1;
  background: var(--a1s, rgba(109,92,255,.12));
  border-color: rgba(109,92,255,.4);
  color: var(--a1);
}

/* ── Canvas wrapper ── */
#wrapper {
  position: relative;
  z-index: 1;
  width: 380px;
  height: 620px;
  max-width: 100%;
  font-family: 'Press Start 2P', monospace;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid #7c3aed;
  border-radius: 16px;
  box-shadow: 0 0 40px #7c3aed66, 0 0 80px #7c3aed22;
  background: #120b26;
}

/* ── In-canvas overlay ── */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,5,30,.88);
  border-radius: 13px;
  gap: 18px;
  z-index: 10;
  padding: 18px;
}

#overlay h1 {
  margin: 0;
  font-size: 22px;
  color: #a78bfa;
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 0 20px #7c3aed, 3px 3px 0 #4c1d95;
  animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { text-shadow: 0 0 10px #7c3aed, 3px 3px 0 #4c1d95; }
  to   { text-shadow: 0 0 30px #a78bfa, 3px 3px 0 #6d28d9; }
}

#overlay p {
  margin: 0;
  color: #c4b5fd;
  font-size: 8px;
  text-align: center;
  line-height: 2;
}

#overlay .btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #1a0a2e;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  box-shadow: 0 10px 24px rgba(124,58,237,.22);
  transition: transform .18s ease;
  font-family: 'Press Start 2P', monospace;
}

#overlay .btn:hover { transform: translateY(-1px); }

/* ── Controls hint (inside canvas) ── */
#controls-hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #a78bfa;
  font-size: 7px;
  text-shadow: 0 0 10px rgba(167,139,250,.25);
  pointer-events: none;
  z-index: 3;
}

/* ── HTML Overlays (démarrage / fin) ── */
.jvdoodle-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;
}

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

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

.jvdoodle-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; }
  #overlay h1 { font-size: 18px; }
  #overlay .btn { padding: 10px 16px; font-size: 10px; }
}
