.galerie-souvenirs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 60px 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Le polaroid */
.polaroid {
  background: #fff;
  padding: 15px 15px 12px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center center;
}

/* Rotations aléatoires pour l'effet éparpillé */
.polaroid:nth-child(1) {
  transform: rotate(-20deg);
}
.polaroid:nth-child(2) {
  transform: rotate(5deg);
}
.polaroid:nth-child(3) {
  transform: rotate(-12deg);
}
.polaroid:nth-child(4) {
  transform: rotate(4deg);
}
.polaroid:nth-child(5) {
  transform: rotate(-15deg);
}
.polaroid:nth-child(6) {
  transform: rotate(10deg);
}
.polaroid:nth-child(7) {
  transform: rotate(-4deg);
}
.polaroid:nth-child(8) {
  transform: rotate(2deg);
}
.polaroid:nth-child(9) {
  transform: rotate(-3deg);
}
.polaroid:nth-child(10) {
  transform: rotate(6deg);
}
.polaroid:nth-child(11) {
  transform: rotate(-2deg);
}
.polaroid:nth-child(12) {
  transform: rotate(4deg);
}
.polaroid:nth-child(13) {
  transform: rotate(-15deg);
}
.polaroid:nth-child(14) {
  transform: rotate(19deg);
}
.polaroid:nth-child(15) {
  transform: rotate(-1deg);
}
.polaroid:nth-child(16) {
  transform: rotate(5deg);
}
.polaroid:nth-child(17) {
  transform: rotate(-4deg);
}

/* Effet au survol 
.polaroid:hover {
  transform: rotate(0deg) scale(1.15) translateY(-10px);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 25px 50px rgba(0, 0, 0, 0.2);
  z-index: 100;
}*/

/* Container de l'image */
.polaroid-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.polaroid:hover .polaroid-image img {
  transform: scale(1.05);
}

/* Légende manuscrite en bas du polaroid */
.polaroid-caption {
  min-height: 3.2em;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.1em;
  color: #333;
  font-family: "Handlee", cursive, "Atma", cursive;
  line-height: 1.4;
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Petit scotch en haut pour l'effet "collé" */
.polaroid::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 25px;
  background: rgba(255, 248, 220, 0.7);
  border: 1px solid rgba(218, 197, 145, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: -1;
}

/* Variantes de scotch pour plus de réalisme */
.polaroid:nth-child(odd)::before {
  transform: translateX(-50%) rotate(-5deg);
}

.polaroid:nth-child(even)::before {
  transform: translateX(-50%) rotate(3deg);
}

/* Punaise optionnelle (commentée par défaut) */
.polaroid::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #cd5c5c 40%, #8b3a3a 100%);
  border-radius: 50%;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3);
  display: none; /* Mettre à "block" pour afficher les punaises */
}

/* Effet vintage sur les photos */
.effet-vintage .polaroid-image img {
  filter: sepia(0.5) contrast(1.1) brightness(0.95); /*sepia(0.3) contrast(1.1) brightness(1.05);*/
}

/* Animation d'apparition au chargement */
@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(0deg) scale(0.8);
  }
  to {
    opacity: 1;
  }
}

.polaroid {
  animation: apparition 0.6s ease-out backwards;
}

/* Décalage des animations */
.polaroid:nth-child(1) {
  animation-delay: 0.1s;
}
.polaroid:nth-child(2) {
  animation-delay: 0.15s;
}
.polaroid:nth-child(3) {
  animation-delay: 0.2s;
}
.polaroid:nth-child(4) {
  animation-delay: 0.25s;
}
.polaroid:nth-child(5) {
  animation-delay: 0.3s;
}
.polaroid:nth-child(6) {
  animation-delay: 0.35s;
}
.polaroid:nth-child(7) {
  animation-delay: 0.4s;
}
.polaroid:nth-child(8) {
  animation-delay: 0.45s;
}
.polaroid:nth-child(9) {
  animation-delay: 0.5s;
}
.polaroid:nth-child(10) {
  animation-delay: 0.55s;
}
.polaroid:nth-child(11) {
  animation-delay: 0.6s;
}
.polaroid:nth-child(12) {
  animation-delay: 0.65s;
}
.polaroid:nth-child(13) {
  animation-delay: 0.7s;
}
.polaroid:nth-child(14) {
  animation-delay: 0.75s;
}
.polaroid:nth-child(15) {
  animation-delay: 0.8s;
}
.polaroid:nth-child(16) {
  animation-delay: 0.85s;
}
.polaroid:nth-child(17) {
  animation-delay: 0.9s;
}

.galerie-souvenirs{overflow-x:clip}
@media (max-width:640px){.galerie-souvenirs{gap:44px 24px;padding:32px 12px}}
