*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #122216;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Couche 1 : image de fond pleine page */
.layer-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  z-index: 1;
  user-select: none;
  -webkit-user-drag: none;
}

/* Conteneur des couches superposées au-dessus du fond */
.overlay-layers {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 2.4vh, 28px) clamp(16px, 4vw, 48px) clamp(14px, 3vh, 32px);
  pointer-events: none;
}

/* Couche 2 : image du titre "Aventures d'Eurêka" */
.layer-title {
  display: block;
  width: min(500px, 78vw);
  max-height: 27vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.58));
  animation: title-entrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  user-select: none;
  -webkit-user-drag: none;
}

/* Couche 3 : image de la mention "bientôt disponible !!" */
.layer-coming-soon {
  display: block;
  width: min(440px, 76vw);
  max-height: 15.5vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.58));
  animation: badge-entrance 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both,
             gentle-float 4.5s ease-in-out 1.2s infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes title-entrance {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes badge-entrance {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 640px) {
  .layer-background {
    object-position: center center;
  }

  .layer-title {
    width: 92vw;
    max-height: 24vh;
  }

  .layer-coming-soon {
    width: 86vw;
    max-height: 16vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer-title,
  .layer-coming-soon {
    animation: none;
  }
}
