
/* =========================
   MAIN SPACING
========================= */

main {
  padding-top: 0px; /*vérifié sur ordi*/
}


/* =========================
   ORGANIGRAMME
========================= */

.orga-full-view {
  padding: 10px 20px;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.orga-container {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.orga-container img {
  width: 100%;
  height: auto;
  border-radius: 15px; /* Coins arrondis pour adoucir l'image */
  box-shadow: 0 20px 50px rgba(58, 13, 58, 0.12); /* Ombre douce pour du relief */
}


/* =========================
   IMAGE OVERLAY
========================= */

.image-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.viewer-content {
  max-width: 90%;
  max-height: 90%;
}

.close-viewer {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  cursor: pointer;
}

/* =========================
   CAROUSEL 3D
========================= */

/* =============================================
   CAROUSEL 3D (rotation automatique des photos)
   ============================================= */

.carousel img {
  max-width: 100%;
  border-radius: 7px;
  box-shadow: 0px 0px 20px 0px #ffd000; /* Halo jaune autour des images */
}

/* Conteneur du carousel : crée l'espace 3D */
.container {
  position: relative;
  margin: 0 auto;
  width: 200px;
  height: 400px;
  perspective: 1500px; /* Distance de l'œil virtuel — plus la valeur est grande, moins l'effet 3D est prononcé */
}

.carousel {
  position: absolute;
  height: 100%;
  width: 100%;
  transform-style: preserve-3d; /* Permet aux enfants d'exister dans l'espace 3D */
  transition: transform 1s;
  animation: rotation 15s infinite linear; /* Rotation continue toutes les 15 secondes */
}

/* Pause de l'animation au survol */
.carousel:hover {
  animation-play-state: paused;
  cursor: pointer;
}

/* Zoom + halo bleu sur l'image survolée */
.carousel img:hover {
  transform: scale(1.2);
  transition: all 300ms;
  box-shadow: 0 0 20px 0 #192ecf;
}

/* Keyframe : rotation Y de 0° à 360° = tour complet */
@keyframes rotation {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Chaque item est positionné en absolu et tourné d'un angle fixe autour de l'axe Y.
   translateZ(350px) = rayon du cercle = distance au centre */
.item {
  display: block;
  position: absolute;
  width: 200px;
  opacity: 0.95;
}

/* 9 items espacés de 40° chacun (360° / 9 = 40°) */
.item:nth-child(1) { transform: rotateY(0deg)   translateZ(300px); }
.item:nth-child(2) { transform: rotateY(40deg)  translateZ(300px); }
.item:nth-child(3) { transform: rotateY(80deg)  translateZ(300px); }
.item:nth-child(4) { transform: rotateY(120deg) translateZ(300px); }
.item:nth-child(5) { transform: rotateY(160deg) translateZ(300px); }
.item:nth-child(6) { transform: rotateY(200deg) translateZ(300px); }
.item:nth-child(7) { transform: rotateY(240deg) translateZ(300px); }
.item:nth-child(8) { transform: rotateY(280deg) translateZ(300px); }
.item:nth-child(9) { transform: rotateY(320deg) translateZ(300px); }


/* =========================
   FOOTER
========================= */

.footer {
  background: var(--footer-bg);
  padding: 40px 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-label {
  font-size: 12px;
  opacity: 0.6;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .container {
    width: 180px;
    height: 250px;
  }

  .item:nth-child(n) {
    transform: rotateY(calc(var(--i) * 40deg)) translateZ(220px);
  }

}

@media (max-width: 480px) {
  .container {
    width: 250px;
    height: 220px;
  }

  .carousel {
  position: absolute;
  height: auto;
  width: 55%;
  transform-style: preserve-3d; /* Permet aux enfants d'exister dans l'espace 3D */
  transition: transform 1s;
  animation: rotation 15s infinite linear; /* Rotation continue toutes les 15 secondes */
}

  .carousel img {
  max-width: 65%;
  border-radius: 7px;
  box-shadow: 0px 0px 20px 0px #ffd000; /* Halo jaune autour des images */
}


/* 9 items espacés de 40° chacun (360° / 9 = 40°) */
.item:nth-child(1) { transform: rotateY(0deg)   translateZ(180px); }
.item:nth-child(2) { transform: rotateY(40deg)  translateZ(180px); }
.item:nth-child(3) { transform: rotateY(80deg)  translateZ(180px); }
.item:nth-child(4) { transform: rotateY(120deg) translateZ(180px); }
.item:nth-child(5) { transform: rotateY(160deg) translateZ(180px); }
.item:nth-child(6) { transform: rotateY(200deg) translateZ(180px); }
.item:nth-child(7) { transform: rotateY(240deg) translateZ(180px); }
.item:nth-child(8) { transform: rotateY(280deg) translateZ(180px); }
.item:nth-child(9) { transform: rotateY(320deg) translateZ(180px); }


}

