
/* Container principal */
.pics-grids-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

html {
  background-color: black;
}

/* Grille principale */
.pics-grids {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 5px;
  grid-auto-flow: dense;
}

/* Items de la grille */
.pics-grid-item {
  position: relative;
  border-radius: 5px; /* 16px */
  aspect-ratio: 2 / 2; /* Carré */
  grid-row: span 1 / span 1;
}

/* Item qui prend 2 colonnes */
.pics-grid-item-large {
  position: relative;
  border-radius: 5px;
  aspect-ratio: 2 / 2;
  grid-column: span 2 / span 2;
  grid-row: span 2 / span 2;
}

/* Image Next.js */
.pics-grid-image {
  border-radius: 5px;
  object-fit: cover;
  height: 100%;
  width: 100%;
}

/* Bouton retour */
.pics-back-button {
  background-color: white;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  position: fixed;
  top: 5rem;
  right: 2rem;
  transform: translateY(-50%);
  color: white;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.pics-back-button svg {
  width: 24px;
  height: 24px;
}

.pics-back-button:hover {
  background-color: white;
  transform: translateY(-50%) scale(1.05);
}

.pics-back-button:active {
  transform: translateY(-50%) scale(0.98);
}

.pics-title-badge {
  background-color: rgba(255, 255, 255, 0.7); /* bg-black/40 */
  border-radius: 2rem; /* rounded-4xl */
  height: 50px;
  width: 300px;
  position: fixed;
  bottom: 1rem; /* top-20 (80px) */
  left: 50%; /* left-1/2 */
  transform: translate(-50%, -50%); /* -translate-x-1/2 -translate-y-1/2 */
  color: black;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #fff;
  border: 2px solid #ffffffcd;
}

.pics-title-badge h1 {
  font-size: 1.125rem; /* text-lg */
  padding: 1rem; /* p-4 */
  font-weight: bold;
}

/* Modale */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Image dans la modale */
.modal-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Bouton de fermeture */
.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
  color: #bbb;
}

/* Boutons de navigation */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 30px;
  padding: 16px 20px;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
  z-index: 1001;
}

.modal-nav:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Légende de l'image */
.modal-caption {
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 1rem;
  margin-top: 10px;
  max-width: 90%;
}

/* Curseur pointer sur les images cliquables */
.pics-grid-image {
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (min-width: 640px) {
  .pics-grids {
    gap: 10px;
  }
  .pics-grid-item-large {
    border-radius: 1rem;
  }
  .pics-grid-item {
    border-radius: 1rem;
  }
  .pics-grid-image {
    border-radius: 1rem;
  }
  .pics-title-badge {
    bottom: none;
    top: 5rem;
  }
}