#lightbox .caption {
  white-space: normal;
}

/* Logo sidebar : responsive + centré */
#main-sidebar > img {
  display: block;
  margin: 20px auto;
  width: min(250px, 90%);  /* taille max + s’adapte aux petits écrans */
  max-width: 300px;
  height: auto;
}
@media (max-width: 992px) {
  #main-sidebar > img {
    width: min(140px, 55%);
    max-width: 140px;
    margin: 10px auto;
  }
}

@media screen and (min-width: 992px) {
  #main-sidebar .main-nav {
    position: relative;   /* au lieu de absolute */
    bottom: auto;
    top: 0;
    left: auto;
    right: auto;
    margin-top: 30px;     /* espace sous le logo */
  }
}

/* This stylesheet is meant for custom styles, on top of The Sylk Template */
/* Quand le lightbox affiche une vidéo : ne pas bloquer les clics sur le lecteur */
#lightbox.is-video .controls .galleryNext,
#lightbox.is-video .controls .galleryPrev {
  pointer-events: none;   /* laisse passer les clics vers la vidéo */
}

/* MAIS on garde le bouton fermer cliquable */
#lightbox.is-video .controls .galleryClose {
  pointer-events: auto;
}

/* Base item */
.img-grid .item {
  position: relative;
  overflow: hidden;
}

/* Overlay */
.img-grid .item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Texte centré */
.img-grid .item::after {
  content: attr(data-caption);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 20px;

  font-family: "Poppins", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.3em;
  font-weight: 500;
  color: #fff;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

/* Hover */
.img-grid .item:hover::before {
  opacity: 1;
}

.img-grid .item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

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