
.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}

.overlayPopup {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 500ms;
  visibility:  hidden;
  opacity: 0;
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: center;
} 

/*
 .overlayPopup:target {
  visibility: visible;
  opacity: 1;
} 
*/

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  width: 50%;
  position: relative;
 /* transition: all 5s ease-in-out; */
  /* margin-top: 8%; */

  /* Effet de zoom */
  transform: scale(0.8); /* Réduction initiale */
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;

  max-height: 72vh; /* Hauteur maximale à 80% de la hauteur de l'écran */
  overflow: auto; /* Ajoute un défilement si le contenu dépasse */
}

.popup.show { /* Effet de zoom */
  transform: scale(1); /* Retour à la taille normale */
  opacity: 1;
} 

.popup.hide {
  transform: scale(0.8); /* Réduction progressive */
  opacity: 0;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  pointer-events: none; /* Empêche l'interaction pendant l'animation */
}

.popup h2 {
  margin-top: 0;
  color: #333;
}
.popup .close {
  position: absolute;
  top: 0px;
  right: 20px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: dimgrey;
  cursor: pointer;
}
.popup .contenuPopup {
  max-height: 50%;
  overflow: auto;
  text-align: left;
  margin-left: 20px; /* Réduction pour petits écrans */
  margin-right: 20px;

}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}