/* -------- Personnalisation libre -------- */
:root {
  --overlay-bg: rgba(255, 255, 255, 0.461);
}

/* Corps */
body {
  margin: 0;
  overflow: hidden;
  background: #fff;
  font-family: "Times New Roman", serif; /* change ici la police */
  touch-action: none;
}

/* Boîtes */
.box {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0);
  text-shadow: #f7ca04d0 1px 1px 20px, #ffde05 0 0 1em, #e77919c8 0 0 0.2em;
  border-radius: 6px;
  user-select: none;
  cursor: pointer;
  font-size: 28px;          /* taille du texte personnalisable */
  color: #000000;
  transition: transform 140ms ease;
}
.box:hover { transform: scale(1.05); }
.box img {
  width: 100px;             /* taille image modifiable */
  height: 100px;
  object-fit: contain;
  pointer-events: none;
}
.box:active { cursor: grabbing; }


/* life on mars box */
#box5 {
  width: 400px;   /* largeur de la boîte (change ici) */
  height: 400px;  /* hauteur de la boîte (change ici) */
}

/* HORLOGE */
#box2 img {
  width: 150px;   /* largeur personnalisée */
  height: 150px;  /* hauteur personnalisée */
  object-fit: contain; /* garde le ratio */
}

/* VIDÉO */
#box3 img {
  width: 200px;   /* largeur personnalisée */
  height: 200px;  /* hauteur personnalisée */
  object-fit: contain; /* garde le ratio */
}

/* PORTE */
#box4 img {
  width: 300px;   /* largeur personnalisée */
  height: 300px;  /* hauteur personnalisée */
  object-fit: contain; /* garde le ratio */
}

/* LIFE ON MARS */
#box5 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--overlay-bg);
  z-index: 9999;
}
#overlayContent {
  background: rgba(159, 255, 249, 0);
  padding: 0px;
  border-radius: 0px;
  max-width: 86vw;
  max-height: 86vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Overlay actif pour Cosmo Parisi : fond blanc vide */
#overlayContent.empty { background: white; }

/* Insta box style */
#instaBox {
  position: fixed; /* pour rester au-dessus */
  font-size: 40px;          /* taille du texte personnalisable */
  color: #00ff4c;
  z-index: 10000;  /* au-dessus de l’overlay (9999) */
}

#bandcampBox {
  position: fixed; /* pour rester au-dessus */
  font-size: 40px;          /* taille du texte personnalisable */
  color: #ffcd03;
  text-shadow: #044df7d0 1px 1px 20px, #ff05ee 0 0 1em, #5506a9c8 0 0 0.2em;
  z-index: 10000;  /* au-dessus de l’overlay (9999) */
}

/* === 📱 VERSION MOBILE : boîtes plus petites === */
@media (max-width: 900px) {
  #box { font-size: 16px; }
  #box2 {
    width: 30vw;   /* 30% de 140px */
    height: 30vw;
  }

  #box3 {
    width: 40vw;   /* 30% de 140px */
    height: 40vw;
  }

  #box4 {
    width: 40vw;   /* 30% de 140px */
    height: 50vw;
  }

  #box5 {
    width: 50vw;   /* 30% de 140px */
    height: 50vw;
  }

  #box2 img, #box3 img, #box4 img, #box5 img {
    width: 100%;
    height: 100%;
  }
}

/* Gallerie des portes */
#overlayBox1 img {
  width: 20vw;
  height: 20vw;
  object-fit: contain;  /* ou cover selon ton effet */
}

#overlayBox2 img {
  width: 20vw;
  height: 20vw;
  object-fit: contain;
}


/* === Effet de zoom sur les images d’overlay === */
.zoomed-image {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(1.8);
  z-index: 10001 !important;
  transition: transform 0.4s ease, top 0.4s ease, left 0.4s ease;
  cursor: zoom-out;
}

/* === Écran d’accueil / chargement === */
body.loading .box:not(#box1) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

body.loaded .box {
  opacity: 1;
  pointer-events: auto;
}

/* Centrer la box1 au début */
body.loading #box1 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Option : petite animation de fade-in */
.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
