* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

.galleryDom {
  max-width: 1400px;
  margin: 0 auto;
}

/* REMPLACEMENT DE `.row` PAR `.gallery-row` */
.gallery-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  margin-top:25px;
}

.gallery-row.bottom-row {
  justify-content: space-around;
  margin-top: 60px;
}

/* IMAGE BOX */
.image-box {
  position: relative;
  width: 440px;
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  background-color: #fff;
}

.image-box:hover {
  transform: translateY(-6px);
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* TEXT OVERLAY */
.text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 78px;
  padding: 30px 20px;
  background-color: #357361B2; /* Vert foncé transparent */
  color: #fff;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 18px;
  font-weight: 550;
  pointer-events: none;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.text-overlay .short {
  opacity: 1;
  position: absolute;
  left: 0;
  right: 0;
  transition: opacity 0.5s ease-in-out;
    display: flex;
  justify-content: center;
  align-items: center;
}

.text-overlay .full {
  opacity: 0;
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 20px;
  text-align: left;
  max-width: 90%;
  margin: 0 auto;
  transition: opacity 0.5s ease-in-out;
}


/* EFFET DE SURVOL */
.image-box:hover .text-overlay .short {
  opacity: 0;
}

.image-box:hover .text-overlay .full {
  opacity: 1;
}

/* RESPONSIVE TABLETTES */
@media (max-width: 1024px) {
  .image-box {
    width: 45%;
    height: auto;
    aspect-ratio: 1/1;
  }
}

/* RESPONSIVE MOBILES */
@media (max-width: 768px) {
  .image-box {
    width: 100%;
    max-width: 400px;
  }

  .gallery-row {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
  }

  .gallery-row.bottom-row {
    margin-top: 30px;
  }

  .text-overlay {
    font-size: 16px;
    padding: 16px 8px;
  }
}
