/* Style général */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Conteneur de la galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: 90%;
  max-width: 1200px;
}

/* Miniatures */
.thumbnail {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Carré */
  background: gray;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.thumbnail img.active {
  filter: grayscale(0%);
}

/* Animation pour la suppression */
.thumbnail.removing {
  opacity: 0;
  transform: scale(0.8);
}

/* Plein écran */
.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fullscreen img {
  max-width: 90%;
  max-height: 90%;
}

.fullscreen.active {
  visibility: visible;
  opacity: 1;
}

/* Boîte de dialogue pour le mot de passe */
.password-prompt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.password-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.password-box h2 {
  margin-bottom: 15px;
}

.password-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.password-box button {
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.password-box button:hover {
  background: #0056b3;
}

.error-message {
  color: red;
  font-size: 14px;
  margin-top: 10px;
}
