/* À conserver */
main.single {
  display: flex;
  flex-direction: column;
  gap: 2.5vw;
  padding-block: 5vw;
}

main.single .container {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 2.5vw;
  justify-content: space-between;
  padding-inline: 0;
}

main.single .categories {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

main.single .categories .categorie {
  font-size: 14px;
  line-height: 16px;
  color: var(--primary);
  border-radius: 25px;
  border: solid 1px #b6becb;
  padding: 8px 24px;
  text-align: center;
}

main.single .single__date {
  font-size: 17px;
  line-height: 21px;
  color: var(--primary);
}

.single__content .article {
  margin-bottom: 0;
}

/* Styles pour la galerie en mosaïque (3+ images) */
.article__gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

/* Style standard pour 1-2 images */
.article__gallery .article__illustrationContainer {
  flex: 0 0 100%;
  cursor: pointer;
  overflow: hidden;
}

/* Style en mosaïque pour 3+ images */
.article__gallery.mosaic .article__illustrationContainer {
  flex: 0 0 calc(50% - 0.5rem);
  position: relative;
  height: 200px;
}

.article__gallery.mosaic .article__illustrationContainer:first-child {
  flex: 0 0 100%;
  height: 300px;
}

.article__gallery.mosaic .article__illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article__gallery.mosaic
  .article__illustrationContainer:hover
  .article__illustration {
  transform: scale(1.05);
}

/* Modale */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal__content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.gallery-modal__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.gallery-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: background-color 0.3s;
}

.gallery-modal__nav:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.gallery-modal__prev {
  bottom: -25vw;
  left: 1.25rem;
  position: absolute;
  top: unset;
}

.gallery-modal__next {
  bottom: -25vw;
  position: absolute;
  right: 1.25rem;
  top: unset;
}

.article__illustration {
  width: 100%;
}

@media (min-width: 991.98px) {
  main.single {
    padding-block: 2.5vw;
  }
  .gallery-modal__prev {
    bottom: 45%;
    left: -9vw;
  }

  .gallery-modal__next {
    bottom: 45%;
    right: -9vw;
  }
}
/* Media query à conserver */
@media (min-width: 1920px) {
  body > .single {
    gap: 1.5vw;
    padding-inline: 25vw;
  }
  .article__content {
    flex: 0 0 100%;
  }
}
