@import url('../part.css');

body {
    background-color: rgba(19, 29, 40, 1);
}

header, footer {
    background: fixed;
    background-color: rgba(19, 29, 40, 1);
  }

header {
clip-path:none;
}

footer {
	margin-top: 0;
}

.container {
    max-width: 1235px;
    padding-top: .7rem;
}

#images-list {
  display: grid;
  column-gap: 40px;
  row-gap: 30px;
  grid-template-columns: repeat(5, 215px);
  justify-content: center;
  margin: auto;
  margin-top: .5rem;
}

#images-list a {
    display: flex;
    justify-content: center;
    line-height: 0;
}

#images-list img { 
  border-radius: 15px;
  cursor: pointer;
  width: 215px; /* Forcer la largeur exacte */
  max-width: 215px; /* S'assurer que l'image ne dépasse pas */
}

#images-list img, #popupContent button {
    transition: transform 0.3s ease;
}
  
#images-list img:hover, #popupContent button:hover {
    transform: scale(1.05);
}

/* ------------------ Modal ------------------- */

.fullheight-card {
    display: flex;
    flex-direction: column;
    height: 90vh;
  }
  
  .fullheight-card #modalContent {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .fullheight-card #modalContent img {
    max-height: calc(90vh - 60px);
    object-fit: contain;
  }
  
  #modalButtons {
    padding: 10px 0 0;
    display: flex;
    justify-content: center;
  }

  /* ///////////////////////////////////////////////////////////////////////////////////////////////////// RESPONSIVE /////////*/
@media (max-width: 1300px) {
  #images-list {
    grid-template-columns: repeat(4, 1fr);
    max-width: 90%;
    gap: 30px;
  }
  #images-list img {
    max-width: 220px;
  }
}

@media (max-width: 1000px) {
  #images-list {
    grid-template-columns: repeat(3, 1fr);
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  #images-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: 80%;
    gap: 25px;
  }
  .fullheight-card {
    height: 80vh;
  }
  
  .fullheight-card #modalContent img {
    max-height: calc(80vh - 60px);
  }
}

@media (max-width: 510px) {
  main {
    padding-right: 0;
    padding-left: 0;
  }
  
  #images-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: 95%;
    gap: 20px;
    margin-top: 0;
  }
  
  #images-list img {
    max-width: 100%;
    border-radius: 10px;
  }
  
  #images-list img:hover {
    transform: none;
  }
}