body {
  margin: 0;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.scene {
  width: 800px;
  height: 300px;
  perspective: 1000px;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.carousel img {
  position: absolute;
  width: 300px;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  left: 50%;
  top: 50%;
  margin-left: -150px; /* moitié de 300px */
  margin-top: -130px;  /* moitié de 260px */
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  cursor: pointer;
}

/* ── Overlay ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.overlay.actif {
  display: flex;
}

.overlay-contenu {
  position: relative;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  max-width: 90vw;
  align-items: start;
}

.fermer {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.overlay-images {
  display: contents;
}

.img-principale {
  width: 340px;
  height: 500px;
  object-fit: cover;
  border-radius: 12px;
  grid-row: 1;
  grid-column: 1;
}

/* Grille 2x3 pour les 6 images liées */
.imgs-liees {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  grid-template-rows: repeat(3, 140px);
  gap: 10px;
}

.img-liee {
  width: 150px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.85;
  transition: opacity 0.3s;
  cursor: pointer;
}

.img-liee:hover {
  opacity: 1;
}
