/* ============================================================
   MesLacets — Bloc "Vos Inspirations"
   Style calqué sur bloc "Exemples de customisation"
   ============================================================ */

/* ── Masque le widget CE (et son gap) quand renderWidget() retourne '' ── */
/* Méthode 1 : attribut posé par le JS (universel) */
.elementor-widget-ps-widget-module[data-insp-empty="1"] {
  display: none !important;
}
/* Méthode 2 : :has() CSS natif — Chrome 105+, Firefox 121+, Safari 15.4+ */
/* Le container ne contient qu'un commentaire HTML → pas d'enfant visible */
.elementor-widget-ps-widget-module:not([data-insp-empty]):has(> .elementor-widget-container > :only-child:empty) {
  display: none !important;
}

.bloc-insp {
  /* Pas de bordure ni fond — le style de conteneur est géré par la section CE */
}

.bloc-insp__header {
  margin-bottom: 1.5rem;
}

.bloc-insp__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1a1a1a;
  margin: 0 0 .4rem 0;
}

.bloc-insp__intro {
  font-size: .875rem;
  color: #777;
  margin: 0;
}

/* Grille : 2 cols mobile → 3 tablette → 4 desktop */
.bloc-insp__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 576px) {
  .bloc-insp__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
  .bloc-insp__grid { grid-template-columns: repeat(4, 1fr); }
}

.bloc-insp__item {
  margin: 0;
  padding: 0;
}

/* Wrapper image — ratio 1:1, débordement masqué */
.bloc-insp__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  cursor: pointer;
}

.bloc-insp__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .28s ease;
}

.bloc-insp__item:hover .bloc-insp__img {
  transform: scale(1.05);
}

/* ── Overlay rollover ─────────────────────────────────────── */
.bloc-insp__overlay {
  position: absolute;
  inset: 0;
  /* Dégradé du bas : lisibilité du texte sans obscurcir le haut */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, .78) 0%,
    rgba(0, 0, 0, .22) 50%,
    transparent 100%
  );
  border-radius: 8px;
  opacity: 0;
  transition: opacity .22s ease;
  display: flex;
  align-items: flex-end;
  padding: .75rem;
}

.bloc-insp__item:hover .bloc-insp__overlay,
.bloc-insp__item:focus-within .bloc-insp__overlay {
  opacity: 1;
}

.bloc-insp__overlay-inner {
  width: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.bloc-insp__overlay-prenom {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bloc-insp__overlay-marque {
  font-size: .78rem;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bloc-insp__overlay-pointure {
  font-size: .72rem;
  opacity: .75;
}

.bloc-insp__overlay-texte {
  font-size: .72rem;
  opacity: .82;
  font-style: italic;
  margin: .15rem 0 0;
  /* Clamp à 2 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bouton "Agrandir" */
.bloc-insp__overlay-zoom {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .45rem;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 4px;
  padding: .22rem .55rem;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: background .15s, border-color .15s;
  cursor: pointer;
  width: fit-content;
  line-height: 1;
}

.bloc-insp__overlay-zoom:hover,
.bloc-insp__overlay-zoom:focus {
  background: rgba(255, 255, 255, .30);
  border-color: rgba(255, 255, 255, .6);
  color: #fff;
  text-decoration: none;
}

/* ── Lightbox façon visionneuse produits PS ───────────────── */
.bloc-insp-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: inspLbFadeIn .18s ease;
}

@keyframes inspLbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bloc-insp-lb__content {
  max-width: min(92vw, 940px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.bloc-insp-lb__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 56px rgba(0, 0, 0, .55);
  transition: opacity .15s ease;
  display: block;
}

.bloc-insp-lb__img.insp-loading {
  opacity: .25;
}

.bloc-insp-lb__caption {
  color: rgba(255, 255, 255, .72);
  font-size: .85rem;
  text-align: center;
  margin: 0;
  max-width: 600px;
}

/* Bouton fermer */
.bloc-insp-lb__close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .15s;
  z-index: 1;
}

.bloc-insp-lb__close:hover {
  background: rgba(255, 255, 255, .26);
}

/* Boutons navigation */
.bloc-insp-lb__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .15s;
  z-index: 1;
}

.bloc-insp-lb__nav:hover {
  background: rgba(255, 255, 255, .26);
}

.bloc-insp-lb__prev { left: 1rem; }
.bloc-insp-lb__next { right: 1rem; }

@media (max-width: 576px) {
  .bloc-insp-lb__prev { left: .3rem; }
  .bloc-insp-lb__next { right: .3rem; }
  .bloc-insp { margin: 0 0 1.5rem; }
}
