/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background-color: #000;
  font-family: 'Arial Black', sans-serif;
  overflow: hidden;
  color: white;
}

/* ================= VIDEO 1 ================= */
#video1 {
  display: block; /* visible dès le départ */
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  background: black;
}

/* ================= OVERLAY NUMPAD ================= */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* caché tant que video1 pas terminée */
  justify-content: center;
  align-items: center;
  z-index: 2;
}

#overlay.visible {
  display: flex;
  animation: fadeIn 1s ease forwards;
}

#numpad-container {
  background: rgba(0,0,0,0.85);
  padding: 20px 25px;
  border-radius: 20px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

#code-display {
  font-size: 26px;
  letter-spacing: 10px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #0f0;
}

#numpad {
  display: grid;
  grid-template-columns: repeat(4, 70px);
  grid-gap: 12px;
  justify-content: center;
}

.num-btn {
  background: linear-gradient(145deg, #111, #222);
  border: 2px solid #333;
  border-radius: 12px;
  color: #eee;
  font-size: 22px;
  font-weight: bold;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.num-btn:hover {
  background: #0f0;
  color: black;
  transform: scale(1.05);
}

/* ================= VIDEO 2 ================= */
#video2 {
  display: none;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  background: black;
}

/* Fondu vidéo 2 à la fin */
#video2.fade-out {
  animation: fadeToBlack 1.5s ease forwards;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeToBlack {
  from { opacity: 1; }
  to { opacity: 0; }
}