/* Introduction de la galerie */
.gallery-intro {
  max-width: 72ch;
}

/* Zone principale qui contient les photos */
.gallery-grid {
  position: relative;
  min-height: 640px;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

/* Carte photo style polaroid */
.gallery-item {
  position: absolute;
  width: clamp(150px, 22vw, 245px);
  background: #ffffff;
  border: 8px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

/* Effet de ruban adhésif décoratif */
.gallery-item::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  width: 24px;
  height: 18px;
  transform: translateX(-50%);
  background: rgba(255, 145, 95, 0.8);
  border-radius: 2px;
}

/* Image d'une carte */
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Description masquée (affichage visuel uniquement) */
.gallery-item p {
  display: none;
}

/* Positionnement aléatoire des photos sur grand écran */
.gallery-item:nth-child(1) {
  top: 58px;
  left: 9%;
  transform: rotate(-6deg);
}

.gallery-item:nth-child(2) {
  top: 38px;
  right: 11%;
  transform: rotate(7deg);
}

.gallery-item:nth-child(3) {
  top: 180px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  z-index: 2;
}

.gallery-item:nth-child(4) {
  bottom: 78px;
  left: 14%;
  transform: rotate(3deg);
}

.gallery-item:nth-child(5) {
  bottom: 62px;
  right: 14%;
  transform: rotate(-8deg);
}

/* Version tablette: passage en grille simple */
@media (max-width: 960px) {
  .gallery-grid {
    min-height: unset;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .gallery-item {
    position: static;
    width: 100%;
    transform: none !important;
  }

  .gallery-item:nth-child(3) {
    z-index: auto;
  }

  .gallery-item::before {
    display: none;
  }
}

/* Version mobile: une seule colonne */
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}