* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #fff;
  font-family: sans-serif;
}

.grid {
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

/* Image container */
.image-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 10 / 12;

}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.image-container:hover img {
  transform: scale(1.05);
}

/* Overlay text */
.overlay-text {
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  height: 60px;
  padding: 0 15px;

  position: absolute;
  top: 0;
  left: 0;

  background: white;
  color: black;
  font-size: 1.2rem;
  font-weight: bold;

  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;

  border-top: 2px solid black;
  border-bottom: 2px solid black;
}

.image-container:hover .overlay-text {
  opacity: 1;
  transform: scale(1);
}

/* Optional: spacing tweak */
.explanation h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: bold;

}


/* Lightbox full screen */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1050;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  animation: zoom 0.6s;
  border-radius: 10px;
}

@keyframes zoom {
  from { transform: scale(0.1); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1060;
}

.close:hover {
  color: #bbb;
}


.container-photographie {
  padding-top: 90px;
  margin: 100px;
  margin-bottom: 200px;
  position: relative;
  overflow: hidden;
}


@media (max-width: 768px) {


  .grid {
    grid-template-columns: 1fr; /* une seule colonne */
    padding: 1rem;
  }

  .image-container {
    width: 100%;
    aspect-ratio: auto; /* permet une hauteur naturelle */
  }

  .image-container img {
    width: 100%;
    height: auto; /* empêche le rognage vertical */
    object-fit: contain; /* montre l’image entière */
    display: block;
    margin: 0 auto; /* centre l’image horizontalement */
  }

  .container-photographie{
    margin: 50px;
  }

  .acceuil_container{
    margin-top: 100px;
  }
}
