/* ============================================================
   PROGRESSIVE BLUR — overlay flou progressif + caption au hover
   --------------------------------------------------------
   Réplique vanilla du composant React "ProgressiveBlur".
   Utilisé sur les galeries des pages livraison.
   ============================================================ */

.pb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  will-change: opacity;
}

.pb-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* mask-image + backdrop-filter sont injectés en JS pour chaque couche.
     Pas de transform ici : ça créerait un stacking context qui casserait
     le backdrop-filter (l'image en arrière-plan ne serait plus visible). */
}

/* Dégradé sombre en bas pour garantir la lisibilité du texte blanc
   par-dessus des images claires (bouquets). Pas dans le composant
   React d'origine mais nécessaire ici. */
.pb-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 27, 44, 0.72) 0%,
    rgba(15, 27, 44, 0.45) 35%,
    rgba(15, 27, 44, 0.10) 65%,
    rgba(15, 27, 44, 0) 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* Caption — texte unique long en bas */
.pb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 26px 24px;
  z-index: 3;
  color: #fff;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  will-change: opacity, transform;
}

/* Variante texte long (data-caption) */
.pb-caption-text {
  /* petit indicateur jaune en haut du texte pour signaler que c'est un commentaire */
}

.pb-caption-body {
  position: relative;
  margin: 0;
  padding-top: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(0.88rem, 0.95vw, 1rem);
  line-height: 1.55;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.005em;
}

/* Petit trait jaune décoratif au-dessus du texte */
.pb-caption-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: #D49100;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(212, 145, 0, 0.55);
}

/* Ancien layout (fallback alt parsing) — gardé pour compat */
.pb-caption-title {
  display: block;
  margin: 0 0 2px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.pb-caption-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.pb-caption-location::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D49100;
  box-shadow: 0 0 0 3px rgba(212, 145, 0, 0.25);
}

/* Reveal au hover de la card */
.livraison-gallery-item:hover .pb-overlay,
.livraison-gallery-item:focus-within .pb-overlay {
  opacity: 1;
}

.livraison-gallery-item:hover .pb-caption,
.livraison-gallery-item:focus-within .pb-caption {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Tactile : pas de hover → on affiche en permanence (opacité réduite) */
@media (hover: none) {
  .pb-overlay {
    opacity: 1;
  }
  .pb-caption {
    opacity: 1;
    transform: none;
  }
}

/* Respect du prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .pb-overlay,
  .pb-caption {
    transition: opacity 0.2s linear;
    transform: none;
  }
}
