.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 810px;
  height: 83vh;
  background-color: aliceblue;
  border-radius: 3px;
  z-index: 1;
  display: none;
  transform: translate(-50%, -50%);
  animation: slideDown 0.3s ease-in;
}

p {
  width: 90%;
}

@keyframes slideDown {
  0% {
    transform: translate(-50%, -100%);
  }
  100% {
    transform: translate(-50%, -50%);
  }
}

.modal_img {
  height: 49vh;
  width: 460px;
  border-radius: 10px;
  margin: 2vh auto;
  background-size: cover;
  background-position: center;
}

.modal_close {
  position: absolute;
  top: 9px;
  right: 9px;
  background-color: red;
  color: white;
  height: 30px;
  width: 30px;
  cursor: pointer;
  border: none;
}

#nom_plat {
  margin-top: 20px;
  font-size: 40px;
}

.fermer {
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 3px;
  background-color: #3f51b5;
  border: none;
  color: white;
  margin-top: 20px;
}

.fermer:hover {
  background-color: #303f9f;
}

/*responsive*/

@media screen and (max-width: 800px) and (max-height: 1025px) {
  .fermer {
    padding: 15px 50px;
    font-size: 20px;
  }
  .modal_close {
    width: 20px;
    height: 20px;
  }

  .modal {
    height: 80vh;
  }
}

@media screen and (max-width: 720px) {
  .modal {
    width: 500px;
    height: 70vh;
  }

  .modal_img {
    width: 400px;
  }
}

@media screen and (max-height: 1368px) and (max-width: 1025px) {
  .modal_img {
    width: 600px;
  }
  .modal_close {
    width: 55px;
    height: 55px;
  }
  .fermer {
    padding: 25px 90px;
    font-size: 20px;
  }
  p {
    font-size: 28px;
  }

  #nom_plat {
    font-size: 45px;
  }

  .modal {
    height: 79vh;
  }
}

@media screen and (max-width: 1025px) and (max-height: 601px) {
  .modal_close {
    width: 35px;
    height: 35px;
  }
  p {
    font-size: 18px;
  }

  #nom_plat {
    font-size: 38px;
  }

  .modal {
    height: 85vh;
  }
  .fermer {
    padding: 10px 60px;
    font-size: 16px;
  }
}

@media screen and (max-width: 600px) {
  .fermer {
    padding: 8px 30px;
    font-size: 20px;
  }
  .modal_img {
    width: 400px;
  }
  .modal_close {
    width: 30px;
    height: 30px;
  }
  .modal {
    height: 91vh;
  }
  #nom_plat {
    font-size: 40px;
  }

  p {
    font-size: 20px;
  }
}

@media screen and (max-width: 450px) {
  .modal {
    width: 360px;
    height: 88vh;
  }
  .modal_img {
    max-width: 360px;
    border-radius: 0;
  }
}
@media screen and (max-width: 380px) {
  .modal {
    height: 97vh;
  }
}

@media screen and (max-width: 360px) {
  .modal {
    width: 350px;
    height: 94vh;
  }

  .modal_img {
    max-width: 350px;
  }
}

@media screen and (max-width: 280px) {
  .modal {
    width: 270px;
    height: 96vh;
  }
  .modal_img {
    max-width: 270px;
  }
  #nom_plat {
    font-size: 35px;
  }

  p {
    font-size: 16px;
  }
}
