/* Nord Dépannage Plomberie — styles custom (complète Tailwind CDN) */

:root {
  --navy: #0B192C;
  --navy-light: #1E293B;
  --accent: #DC2626;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Poppins', sans-serif;
}

/* ---------- Bandeau marques défilant en infini ---------- */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Slider Avant / Après ---------- */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  user-select: none;
  touch-action: pan-y;
}

.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-slider .ba-after {
  clip-path: inset(0 0 0 var(--pos, 50%));
}

.ba-slider .ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 4px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.ba-slider .ba-handle::after {
  content: "\f337";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #fff;
  color: var(--navy);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.ba-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}

.ba-label {
  position: absolute;
  top: 12px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9999px;
  color: #fff;
  z-index: 2;
}

/* ---------- Carrousel avis clients ---------- */
.reviews-track {
  display: flex;
  transition: transform 0.5s ease;
}

.reviews-slide {
  flex: 0 0 100%;
}

@media (min-width: 768px) {
  .reviews-slide {
    flex: 0 0 33.3333%;
  }
}

/* ---------- Barre d'action mobile fixe ---------- */
.mobile-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
  .mobile-action-bar { display: none; }
}

body {
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

/* ---------- Menu mobile ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu.open {
  max-height: 480px;
}

/* ---------- Fade-in simple au scroll ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Galerie filtre ---------- */
.gallery-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.hidden-item {
  display: none;
}

/* ---------- Filtre catégorie boutons actifs ---------- */
.filter-btn.active {
  background-color: var(--navy);
  color: #fff;
}

/* ---------- Lightbox : forcer l'affichage/masquage (priorité sur l'ordre des utilitaires Tailwind CDN) ---------- */
#lightbox.hidden {
  display: none;
}

/* ---------- Lightbox : bouton de fermeture toujours cliquable au-dessus de l'image ---------- */
#lightbox [data-lightbox-close] {
  z-index: 9999;
  pointer-events: auto;
}

#lightbox [data-lightbox-close] * {
  pointer-events: none;
}
