/* Fond global */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #8e44ad, #3498db);
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Conteneur avec effet glass */
.container {
  width: 90%;
  max-width: 600px; 
  min-height: 70%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  padding : 20px; 
}

.unblur {
  filter: blur(10px);
  opacity: 0;
  animation: clearIn 1.2s ease forwards;
}

@keyframes clearIn {
  to {
    filter: blur(0);
    opacity: 1;
  }
}



/* Titres */
h1, h2 {
  text-align: center;
  color: white;
  margin-bottom: 20px;
}

/* Formulaire */
form {
  display: flex;
  flex-direction: column;

}

label {
  margin-top: 15px;
  font-weight: bold;
  color: #f0f0f0;
}

input, button {
  padding: 12px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  outline: none;
  box-sizing: border-box; 
  width: 100%;
}


input::placeholder {
  color: #ccc;
}

button {
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.photo-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  overflow: hidden;
  text-align: center;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.photo-card .legend {
  font-size: 14px;
  padding: 8px;
  color: #eee;
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* Popup */
.modal {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: rgba(255, 255, 255, 0.08);
  margin: 10px;
  padding: 30px 20px;
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  width: 90%;
  max-width: 420px;
  text-align: center;
  color: white;
}

.modal-content img {
  max-width: 80px;
  margin: 8px;
  border-radius: 10px;
}



.home-buttons {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-top: 40px;
      align-items: center;
    }

    .home-buttons a button {
      padding: 14px 30px;
      font-size: 18px;
      border: none;
      border-radius: 12px;
      color: white;
      background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
      border: 1px solid rgba(255, 255, 255, 0.2);

      cursor: pointer;
      transition: background 0.3s;
    }

    .home-buttons a button:hover {
      background: rgba(255,255,255,0.35);
    }

    .home-title {
      text-align: center;
      font-size: 24px;
      color: white;
      margin-bottom: 10px;
    }

    @media (max-width: 500px) {
      .home-buttons a button {
        width: 100%;
        font-size: 16px;
      }
    }



.footer {
  text-align: center;
  color: white;
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 20px;

}


html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}


.back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.3);
}





@media (max-width: 600px) {
  .container {
    margin: 20px;
    padding: 20px 15px;

  }

  input[type="text"],
  input[type="password"],
  input[type="file"],
  button {
    width: 100%;
    font-size: 16px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .back-link {
    font-size: 14px;
    padding: 10px;
    margin-bottom: 20px;
  }
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 30px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  text-align: center;
  color: white;
  max-width: 90%;
  width: 400px;
  margin: 10px 0px 10px 0px;
  box-sizing: border-box;
  max-height: 90vh;         /* ✅ ajouté ici */
  overflow-y: auto;         /* ✅ ajouté ici */
}


/* Adaptation de la popup pour les petits écrans */
@media (max-width: 600px), (max-height: 600px) {
  .popup {
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 15px;
  }

  .popup h1 {
    font-size: 1.3em;
  }

  .popup p,
  .popup li {
    font-size: 0.95em;
    text-align: left;
  }

  .popup button {
    font-size: 14px;
    padding: 10px 20px;
  }
}

