/* ============================================
   BG PLOMBERIE CHAUFFAGE — premium-fx.css (v1)
   Couche d'amélioration "wouhaou" par-dessus
   style.css + hero-fx.css. Ne remplace rien.
   ============================================ */

/* ─────────────────────────────────────────────
   1. UNDERLINE CUIVRÉ TRACÉ SOUS LES "em"
   Les mots en italique des H2 (excellence, équipe,
   réalisations, travailler…) reçoivent un fin trait
   cuivre qui se trace de gauche à droite quand le
   bloc apparaît au scroll.
   ───────────────────────────────────────────── */
.sh em,
.real-top em {
  position: relative;
  display: inline-block;
  padding-bottom: 0.08em;
}
.sh em::after,
.real-top em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(184,115,51,0.0) 5%,
    var(--c4) 30%,
    var(--c6) 50%,
    var(--c4) 70%,
    rgba(184,115,51,0.0) 95%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.6s cubic-bezier(0.22, 0.68, 0, 1.1) 0.5s;
}
.rv.on .sh em::after,
.rv.on em::after,
.rv.on.real-top em::after {
  transform: scaleX(1);
}
/* Pour les H2 qui ne sont pas eux-mêmes dans un .rv parent direct */
.rv .sh em::after { transform-origin: left center; }


/* ─────────────────────────────────────────────
   2. CARTES SERVICES — affinement premium
   - Trait cuivre en HAUT au hover
   - Élévation -4px + ombre cuivrée subtile
   - Icône qui respire en boucle au hover
   ───────────────────────────────────────────── */
.svc-card {
  transition:
    background 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 0.68, 0, 1.1),
    box-shadow 0.7s ease,
    border-color 0.5s ease;
}
.svc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--c3) 25%,
    var(--c5) 50%,
    var(--c3) 75%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.22, 0.68, 0, 1.1);
  z-index: 2;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 60px -25px rgba(0,0,0,0.7),
    0 0 0 1px rgba(184,115,51,0.12),
    0 0 80px -20px rgba(184,115,51,0.25);
}
.svc-card:hover::before {
  transform: scaleX(1);
}
.svc-card .svc-ico {
  transition: transform 0.5s cubic-bezier(0.22, 0.68, 0, 1.1), filter 0.5s ease;
  transform-origin: center center;
}
.svc-card:hover .svc-ico {
  animation: svc-breath 3.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 16px rgba(184,115,51,0.35));
}
@keyframes svc-breath {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.07) rotate(-1deg); }
}


/* ─────────────────────────────────────────────
   3. SECTION MÉTHODE — TIMELINE CUIVRE
   Ligne verticale gradient cuivre qui se remplit
   à mesure que l'on scrolle dans la section.
   Chaque étape passe de "off" à "active" quand
   son point passe la ligne de trigger.
   ───────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 70px;
}
@media (max-width: 640px) {
  .timeline { padding-left: 44px; }
}

.tl-track {
  position: absolute;
  left: 22px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(184,115,51,0.12);
}
@media (max-width: 640px) {
  .tl-track { left: 14px; }
}
.tl-fill {
  position: absolute;
  left: -0.5px;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(
    180deg,
    var(--c2) 0%,
    var(--c3) 25%,
    var(--c5) 50%,
    var(--c4) 75%,
    var(--c2) 100%
  );
  box-shadow:
    0 0 8px rgba(184,115,51,0.6),
    0 0 18px rgba(184,115,51,0.3);
  will-change: height;
}

.tl-steps { position: relative; }

.tl-step {
  position: relative;
  margin-bottom: 2.4rem;
  padding: 2.2rem 2.5rem;
  background: rgba(15,15,15,0.45);
  border: 1px solid rgba(184,115,51,0.08);
  border-radius: 2px;
  transition:
    border-color 0.7s ease,
    background 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 0.68, 0, 1.1),
    box-shadow 0.7s ease;
  opacity: 0;
  transform: translateX(24px);
}
@media (max-width: 640px) {
  .tl-step { padding: 1.6rem 1.4rem; margin-bottom: 1.8rem; }
}
.tl-step.tl-reveal {
  opacity: 1;
  transform: translateX(0);
}
.tl-step.active {
  border-color: rgba(184,115,51,0.32);
  background: rgba(22,17,13,0.6);
  box-shadow:
    0 20px 50px -25px rgba(0,0,0,0.6),
    0 0 60px -20px rgba(184,115,51,0.18);
}

.tl-dot {
  position: absolute;
  left: -56px;
  top: 2.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--black);
  border: 1px solid rgba(184,115,51,0.3);
  transition:
    background 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 0.68, 0, 1.1);
  z-index: 2;
}
@media (max-width: 640px) {
  .tl-dot { left: -36px; width: 12px; height: 12px; top: 1.9rem; }
}
.tl-step.active .tl-dot {
  background: var(--c3);
  border-color: var(--c4);
  box-shadow:
    0 0 0 4px rgba(184,115,51,0.12),
    0 0 18px rgba(184,115,51,0.55);
  transform: scale(1.08);
}

.tl-num {
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--c4);
  margin-bottom: 0.8rem;
  font-weight: 500;
  font-family: var(--fb);
}
.tl-txt {
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(250,247,244,0.92);
  line-height: 1.7;
  font-family: var(--fb);
}


/* ─────────────────────────────────────────────
   4. RÉALISATIONS — MASONRY + FILTRES + SLIDER
   ───────────────────────────────────────────── */

/* ── 4a. Filtres en chips ── */
.real-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 3.5rem 0;
  justify-content: flex-start;
}
.rf-chip {
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(184,115,51,0.22);
  color: var(--white-60);
  font-family: var(--fb);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition:
    color 0.4s ease,
    border-color 0.4s ease,
    background 0.5s ease,
    transform 0.4s cubic-bezier(0.22, 0.68, 0, 1.1);
  user-select: none;
}
.rf-chip:hover {
  color: var(--c5);
  border-color: var(--c4);
  transform: translateY(-1px);
}
.rf-chip.active {
  background: linear-gradient(135deg, var(--c2) 0%, var(--c3) 50%, var(--c4) 100%);
  border-color: var(--c3);
  color: var(--black);
  font-weight: 700;
  box-shadow: 0 6px 24px -8px rgba(184,115,51,0.5);
}

/* ── 4b. Slider AVANT / APRÈS (featured) ── */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 620px;
  overflow: hidden;
  margin-bottom: 3rem;
  user-select: none;
  border: 1px solid var(--copper-line);
  border-radius: 2px;
  cursor: ew-resize;
  background: var(--d1);
  --clip: 50%;
  box-shadow:
    0 30px 70px -20px rgba(0,0,0,0.7),
    0 0 0 1px rgba(184,115,51,0.06);
}
@media (max-width: 640px) {
  .ba-slider { aspect-ratio: 4 / 5; }
}
.ba-side {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ba-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.ba-before { z-index: 1; }
.ba-after {
  z-index: 2;
  clip-path: inset(0 0 0 var(--clip));
  -webkit-clip-path: inset(0 0 0 var(--clip));
}
.ba-label {
  position: absolute;
  top: 1.4rem;
  padding: 0.5rem 1.1rem;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(184,115,51,0.32);
  color: var(--c5);
  font-family: var(--fb);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 4;
  pointer-events: none;
}
.ba-before .ba-label { left: 1.4rem; }
.ba-after  .ba-label { right: 1.4rem; }

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--clip);
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--c4) 20%,
    var(--c5) 50%,
    var(--c4) 80%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(184,115,51,0.7);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.ba-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--c4);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 8px 24px rgba(0,0,0,0.6),
    0 0 30px rgba(184,115,51,0.45);
  transition: transform 0.4s cubic-bezier(0.22, 0.68, 0, 1.4);
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 14px;
  background:
    linear-gradient(90deg, var(--c5) 0%, var(--c5) 30%, transparent 30%, transparent 70%, var(--c5) 70%, var(--c5) 100%);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'><path d='M9 3 L4 7 L9 11 M15 3 L20 7 L15 11' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'><path d='M9 3 L4 7 L9 11 M15 3 L20 7 L15 11' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>") center / contain no-repeat;
}
.ba-slider:hover .ba-handle::before {
  transform: translate(-50%, -50%) scale(1.1);
}
.ba-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.45rem 1rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--copper-line);
  color: var(--c4);
  font-family: var(--fb);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: ba-cue-pulse 2.6s ease-in-out 1s 3;
}
.ba-slider.ba-touched .ba-cue { opacity: 0 !important; animation: none; }
@keyframes ba-cue-pulse {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  30%, 70% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── 4c. Grille masonry (CSS columns) ── */
.real-grid {
  display: block !important;  /* écrase l'ancien display:grid */
  column-count: 3;
  column-gap: 1.4rem;
  grid-template-rows: none !important;
  grid-template-columns: none !important;
}
@media (max-width: 1100px) { .real-grid { column-count: 2 !important; } }
@media (max-width: 640px)  { .real-grid { column-count: 1 !important; } }

/* On override l'ancien .real-item (qui était en grid avec absolute) */
.real-grid > .real-item {
  position: relative;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: block;
  width: 100%;
  margin: 0 0 1.4rem 0;
  overflow: hidden;
  border: 1px solid var(--copper-line);
  border-radius: 2px;
  background: var(--d1);
  transition:
    border-color 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 0.68, 0, 1.1),
    box-shadow 0.7s ease,
    opacity 0.45s ease;
  /* Annule les anciennes règles potentielles */
  height: auto;
  aspect-ratio: auto;
}
.real-grid > .real-item img {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.22, 0.68, 0, 1.1);
}
.real-grid > .real-item:hover {
  border-color: rgba(184,115,51,0.45);
  transform: translateY(-3px);
  box-shadow:
    0 30px 60px -25px rgba(0,0,0,0.7),
    0 0 60px -20px rgba(184,115,51,0.2);
}
.real-grid > .real-item:hover img { transform: scale(1.06); }

/* Overlay et label : ajustements pour le masonry */
.real-grid > .real-item .real-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  opacity: 0.65;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.real-grid > .real-item:hover .real-ov { opacity: 0.85; }
.real-grid > .real-item .real-lb {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.4rem;
  z-index: 2;
  pointer-events: none;
}
.real-grid > .real-item .real-lb span {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c4);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.real-grid > .real-item .real-lb h4 {
  font-family: var(--fs);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
}

/* Filtrage : items cachés */
.real-grid > .real-item.is-hidden {
  display: none;
}


/* ─────────────────────────────────────────────
   5. CURSEUR CUIVRÉ CUSTOM (desktop uniquement)
   Le curseur natif reste (UX préservée), on
   superpose un disque cuivré qui suit avec lerp.
   ───────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(212,149,106,0.85);
  box-shadow:
    0 0 12px rgba(184,115,51,0.5),
    0 0 28px rgba(184,115,51,0.25);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s cubic-bezier(0.22, 0.68, 0, 1.4),
    height 0.3s cubic-bezier(0.22, 0.68, 0, 1.4),
    background 0.3s ease,
    border 0.3s ease,
    opacity 0.3s ease;
  mix-blend-mode: screen;
  opacity: 0;
}
.cursor-dot.cd-visible { opacity: 1; }
.cursor-dot.cd-over {
  width: 44px;
  height: 44px;
  background: rgba(184,115,51,0.08);
  border: 1px solid rgba(212,149,106,0.8);
  box-shadow:
    0 0 22px rgba(184,115,51,0.45),
    0 0 60px rgba(184,115,51,0.18);
}
.cursor-dot.cd-press {
  width: 8px;
  height: 8px;
  background: var(--c5);
}
/* On désactive le curseur custom sur tactile ou si user préfère reduced motion */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-dot { display: none !important; }
}


/* ─────────────────────────────────────────────
   6. REVEAL .rv — easing un cran plus chic
   On override légèrement la courbe de transition
   sans toucher au délai d1/d2/d3 existant.
   ───────────────────────────────────────────── */
.rv {
  transition:
    opacity 1.1s cubic-bezier(0.22, 0.68, 0, 1.05),
    transform 1.1s cubic-bezier(0.22, 0.68, 0, 1.05);
}


/* ─────────────────────────────────────────────
   7. REDUCED MOTION — respect utilisateur
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sh em::after,
  .real-top em::after,
  .svc-card::before,
  .tl-fill,
  .tl-step,
  .real-grid > .real-item img,
  .svc-card .svc-ico {
    transition: none !important;
    animation: none !important;
  }
  .tl-step { opacity: 1; transform: none; }
  .sh em::after, .real-top em::after { transform: scaleX(1); }
}
