/* Styles pour les images en effet Polaroid */

.polaroid-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin: 3rem 0;
  perspective: 1000px; /* Effet 3D pour une meilleure animation */
}

.polaroid {
  background-color: white;
  padding: 1rem 1rem 2.5rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  max-width: 280px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotate(var(--rotation, 0deg)) translateZ(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
  
  /* Effet de "vieux polaroid" */
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.5), rgba(255, 255, 240, 0));
    z-index: -1;
    pointer-events: none;
    border-radius: 3px;
  }
  
  /* Effet de l'ombre portée pour plus de réalisme */
  &::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0;
    height: 1.5rem;
    transform: translateY(0.75rem);
    filter: blur(10px);
    opacity: 0.3;
    background: #000;
    border-radius: 50%;
    z-index: -2;
    transition: all 0.4s ease;
  }
}

.polaroid:nth-child(odd) {
  --rotation: -2deg;
}

.polaroid:nth-child(even) {
  --rotation: 2deg;
}

.polaroid:hover {
  transform: rotate(0) scale(1.05) translateZ(20px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
  
  &::after {
    opacity: 0.4;
    filter: blur(12px);
    transform: translateY(0.85rem);
  }
}

.polaroid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background-color: #f5f5f5;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  filter: contrast(1.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.polaroid-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-family: 'Caveat', cursive, 'Inter', sans-serif;
  font-size: 1.25rem;
  color: #333;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
  transform: rotate(var(--caption-rotation, -0.5deg));
  transition: transform 0.3s ease;
}

.polaroid:hover .polaroid-caption {
  transform: rotate(0);
}

/* Effet d'épinglage */
.polaroid::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.polaroid:hover::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .polaroid-gallery {
    gap: 1.5rem;
  }
  
  .polaroid {
    max-width: 250px;
  }
  
  .polaroid-caption {
    font-size: 1.1rem;
  }
} 