:root {
  --pixel-font: "Courier New", monospace; /* Remplacez par une Google Font Pixel */
}

body {
  margin: 0;
  overflow: hidden; /* Pas de scroll */
  background: #000;
  font-family: var(--pixel-font);
  user-select: none; /* Empêche de sélectionner le texte/images */
}

/* GESTION PIXEL ART */
img {
  image-rendering: pixelated;
  pointer-events: none; /* Pour cliquer à travers l'image de fond si besoin */
}

/* SYSTÈME DE SCÈNES */
.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none; /* On ne peut pas cliquer si c'est caché */
  transition: opacity 0.5s ease;
}

.scene.active {
  opacity: 1;
  pointer-events: all;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Remplit l'écran */
}

/* HITBOXES (Zones interactives) */
.hitbox {
  position: absolute;
  /* border: 1px solid red;  <-- DECOMMENTER POUR LE DEBUG */
  cursor: pointer;
  transition: transform 0.1s;
}
/* Positionnement spécifique (A ajuster par le Web 1) */
#item-flyer {
  bottom: 10%;
  left: 20%;
  width: 50px;
  height: 50px;
}
#door-zone {
  top: 30%;
  right: 15%;
  width: 120px;
  height: 250px;
}

.hidden {
  display: none !important;
}

/* --- SCÈNE 2 : LE STUDIO --- */

/* Le rack en bas où sont stockés les sons au début */
#tracks-rack {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #555;
}

/* Les objets qu'on déplace (Les pistes) */
.draggable-item {
  width: 100px;
  height: 60px;
  background: linear-gradient(to bottom, #444, #222);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #888;
  border-radius: 5px;
  cursor: grab;
  user-select: none;
  font-size: 14px;
  touch-action: none; /* Indispensable pour Interact.js sur tactile/mobile */
  z-index: 100; /* Doit être au-dessus de tout */
}

/* Couleurs spécifiques par instrument */
.track-drums {
  border-color: #e74c3c;
} /* Rouge */
.track-bass {
  border-color: #3498db;
} /* Bleu */
.track-melody {
  border-color: #f1c40f;
} /* Jaune */

/* --- LES ZONES CIBLES (SUR L'ÉCRAN) --- */

/* Style de base des zones de dépôt */
.dropzone {
  position: absolute;
  width: 150px; /* Ajuste selon ton image */
  height: 40px; /* Ajuste selon ton image */
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Positionnement précis sur l'écran de l'ordi (À ajuster !) */
#drop-drums {
  top: 25%;
  right: 25%;
}
#drop-bass {
  top: 35%;
  right: 25%;
}
#drop-melody {
  top: 45%;
  right: 25%;
}

.draggable-item {
  /* ... tes autres styles ... */

  position: relative; /* Ou absolute selon ton layout */
  z-index: 9999 !important; /* <--- AJOUTE ÇA */
  touch-action: none; /* <--- OBLIGATOIRE pour Interact.js sur Chrome */
}

/* Vérifie aussi que le conteneur est au-dessus */
#tracks-rack {
  z-index: 9990;
}

#scene-accueil {
  min-width: 110vw;
  min-height: 110vh;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.skip-text {
  position: absolute;
  bottom: 20px;
  color: white;
  font-family: monospace;
  opacity: 0.7;
  pointer-events: none; /* Le clic passe au travers vers la vidéo */
  animation: blink 2s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.8;
  }
}
