/* ==========================================================================
   KWM — styles partagés (toutes pages)
   ========================================================================== */

html { scroll-behavior: smooth; }
a, button, [role="button"], input[type="submit"] { cursor: pointer; }

.fade-in { visibility: hidden; }

/* Hero homepage (image dédiée) */
.hero-bg {
  background-image: url('../optimized/SKA_1321.webp');
  background-size: cover;
  background-position: center 30%;
}

/* Hero des pages secondaires (chaque page définit sa propre image inline ou via classe) */
.page-hero {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.30) 40%, rgba(29,89,89,0.85));
}
.page-hero > .page-hero__content {
  position: relative;
  z-index: 10;
}

/* Nav scrollée */
.nav-scrolled {
  background-color: rgba(29, 89, 89, 0.95) !important;
  backdrop-filter: blur(8px);
}

/* Animation hover boutons */
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.pulse-hover:hover { animation: pulse-soft 0.6s ease-in-out; }

/* Lightbox (galerie photo zoom) */
#kwm-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#kwm-lightbox.is-open { display: flex; opacity: 1; }

.kwm-lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.kwm-lightbox__btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.75rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-family: inherit;
  padding: 0;
}
.kwm-lightbox__btn:hover,
.kwm-lightbox__btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
  outline: none;
}
.kwm-lightbox__close { top: 1.25rem; right: 1.25rem; }
.kwm-lightbox__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.kwm-lightbox__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.kwm-lightbox__prev:hover,
.kwm-lightbox__prev:focus-visible { transform: translateY(-50%) scale(1.05); }
.kwm-lightbox__next:hover,
.kwm-lightbox__next:focus-visible { transform: translateY(-50%) scale(1.05); }

.kwm-lightbox__caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  max-width: calc(100% - 8rem);
  text-align: center;
}

@media (max-width: 640px) {
  #kwm-lightbox { padding: 1rem; }
  .kwm-lightbox__btn { width: 2.5rem; height: 2.5rem; font-size: 1.35rem; }
  .kwm-lightbox__close { top: 0.75rem; right: 0.75rem; }
  .kwm-lightbox__prev { left: 0.5rem; }
  .kwm-lightbox__next { right: 0.5rem; }
  .kwm-lightbox__caption { font-size: 0.75rem; bottom: 0.75rem; max-width: calc(100% - 6rem); }
}

[data-lightbox] { cursor: zoom-in; }

/* Placeholder visuels en attente */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #f1f5f9,
    #f1f5f9 12px,
    #e2e8f0 12px,
    #e2e8f0 24px
  );
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
  min-height: 200px;
  border-radius: 1rem;
}
