/* ══════════════════════════════════════════════════════
   ANIMATIONS APPLE-STYLE — BATIMM RENOV
   Scroll Reveal · Stagger · Counters · Hovers Premium
   ══════════════════════════════════════════════════════ */

/* ── Variables d'easing ─────────────────────────────── */
:root {
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth:   cubic-bezier(.25, .1, .25, 1);
}

/* ═══════════════════════════════════════════════════════
   1. PAGE LOAD — Hero apparaît en douceur
   ═══════════════════════════════════════════════════════ */
@keyframes appleReveal {
  from { opacity: 0; transform: translateY(28px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0px); }
}

.hero-tag {
  animation: appleReveal .9s var(--ease-out-expo) .05s both;
}
.hero-accroche {
  animation: appleReveal 1s var(--ease-out-expo) .2s both;
}
#hero-desc {
  animation: appleReveal .9s var(--ease-out-expo) .38s both;
}
.hero-btns {
  animation: appleReveal .9s var(--ease-out-expo) .52s both;
}
.ht-wrap {
  animation: appleReveal .9s var(--ease-out-expo) .68s both;
}

/* ═══════════════════════════════════════════════════════
   2. SCROLL REVEAL — Qualité Apple
   ═══════════════════════════════════════════════════════ */
.rv, .rv-l, .rv-r {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity  .95s var(--ease-out-expo),
    transform .95s var(--ease-out-expo),
    filter   .95s var(--ease-out-expo);
}

.rv   { transform: translateY(52px); filter: blur(2px); }
.rv-l { transform: translateX(-52px); filter: blur(2px); }
.rv-r { transform: translateX(52px);  filter: blur(2px); }

.rv.on,
.rv-l.on,
.rv-r.on {
  opacity: 1;
  transform: none;
  filter: blur(0px);
}

/* Délais de stagger pour éléments consécutifs */
.rv-d1 { transition-delay: .08s !important; }
.rv-d2 { transition-delay: .16s !important; }
.rv-d3 { transition-delay: .24s !important; }
.rv-d4 { transition-delay: .32s !important; }
.rv-d5 { transition-delay: .40s !important; }
.rv-d6 { transition-delay: .48s !important; }

/* ═══════════════════════════════════════════════════════
   3. CARDS — Hover premium (lift + glow doré)
   ═══════════════════════════════════════════════════════ */

/* Cartes services */
.svc-card {
  transition:
    transform  .55s var(--ease-out-expo),
    box-shadow .55s var(--ease-out-expo) !important;
}
.svc-card:hover {
  transform: translateY(-10px) !important;
  box-shadow:
    0 28px 64px rgba(0,0,0,.55),
    0 0 0 1px rgba(189,147,99,.22) !important;
}

/* Cartes réalisations */
.rl-item {
  transition:
    transform  .55s var(--ease-out-expo),
    box-shadow .55s var(--ease-out-expo) !important;
}
.rl-item:hover {
  transform: translateY(-7px) scale(1.018) !important;
  box-shadow: 0 22px 56px rgba(0,0,0,.55) !important;
}

/* Cartes garanties */
.gar-card {
  transition:
    transform  .55s var(--ease-out-expo),
    box-shadow .55s var(--ease-out-expo),
    border-color .4s ease !important;
}
.gar-card:hover {
  transform: translateY(-8px) !important;
  box-shadow:
    0 24px 56px rgba(0,0,0,.4),
    0 0 0 1px rgba(189,147,99,.2) !important;
}

/* Cartes FAQ */
.faq-item {
  transition:
    transform .45s var(--ease-out-expo),
    box-shadow .45s var(--ease-out-expo) !important;
}
.faq-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.35) !important;
}

/* ═══════════════════════════════════════════════════════
   4. STATS — Animation d'entrée avec pop
   ═══════════════════════════════════════════════════════ */
@keyframes statPop {
  0%   { opacity: 0; transform: translateY(24px) scale(.9); }
  60%  { transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.st-item {
  opacity: 0;
  transition: opacity .01s; /* sera géré par JS */
}
.st-item.stat-in {
  animation: statPop .75s var(--ease-spring) both;
}

/* ═══════════════════════════════════════════════════════
   5. AB-FEATS — Apparition en cascade
   ═══════════════════════════════════════════════════════ */
.ab-feat {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity  .8s var(--ease-out-expo),
    transform .8s var(--ease-out-expo);
}
.ab-feat.feat-in {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════
   6. SECTION TAGS — Glisse depuis la gauche
   ═══════════════════════════════════════════════════════ */
.sec-tag {
  display: inline-flex;
  overflow: hidden;
}
.sec-tag::before {
  content: '';
  display: inline-block;
  width: 0;
  transition: width .6s var(--ease-out-expo) .2s;
}

/* ═══════════════════════════════════════════════════════
   7. PHOTO — Zoom subtil au hover
   ═══════════════════════════════════════════════════════ */
.ab-photo-frame {
  overflow: hidden;
}
.ab-img {
  transition: transform .9s var(--ease-out-expo) !important;
}
.ab-photo-frame:hover .ab-img {
  transform: scale(1.04) !important;
}

.rl-item picture img,
.rl-item .rl-img {
  transition: transform .7s var(--ease-out-expo) !important;
}
.rl-item:hover picture img,
.rl-item:hover .rl-img {
  transform: scale(1.07) !important;
}

/* ═══════════════════════════════════════════════════════
   8. BOUTONS — Réponse tactile améliorée
   ═══════════════════════════════════════════════════════ */
.btn-p {
  transition:
    transform .4s var(--ease-out-expo),
    box-shadow .4s var(--ease-out-expo),
    background-position .4s ease !important;
}
.btn-p:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 40px rgba(189,147,99,.35) !important;
}
.btn-p:active {
  transform: translateY(-1px) scale(.98) !important;
  transition-duration: .1s !important;
}

/* ═══════════════════════════════════════════════════════
   9. NAV — Transitions douces
   ═══════════════════════════════════════════════════════ */
.nav-links a {
  transition: color .3s var(--ease-smooth) !important;
}
.nav-cta {
  transition:
    transform .4s var(--ease-out-expo),
    box-shadow .4s var(--ease-out-expo),
    background .3s ease !important;
}

/* ═══════════════════════════════════════════════════════
   10. FOOTER COLS — layout natif conservé (pas d'animation)
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   11. CURSOR — Ligne de progression section
   ═══════════════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #bd9363, #d4aa7a, #bd9363);
  z-index: 99999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   12. REDUCED MOTION — Respect accessibilité
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .rv, .rv-l, .rv-r,
  .hero-tag, .hero-accroche, #hero-desc, .hero-btns, .ht-wrap,
  .ab-feat, .st-item, .ft-brand, .ft-col {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   13. DROPDOWN NAV — Mega menu Services Apple-style
   ═══════════════════════════════════════════════════════ */

/* ── Trigger bouton ─── */
.nav-has-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  background: none;
  border: none;
  color: var(--blanc);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color .3s ease;
  position: relative;
}
.nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--or);
  transition: width .3s ease;
}
.nav-dropdown-trigger:hover,
.nav-has-dropdown.open .nav-dropdown-trigger {
  color: var(--or);
}
.nav-dropdown-trigger:hover::after,
.nav-has-dropdown.open .nav-dropdown-trigger::after {
  width: 100%;
}
.nav-chevron {
  transition: transform .4s var(--ease-out-expo);
  flex-shrink: 0;
  color: inherit;
}
.nav-has-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

/* ── Panneau dropdown ─── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: 560px;
  background: rgba(8, 14, 26, 0.97);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(189, 147, 99, 0.2);
  border-radius: 20px;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity  .4s var(--ease-out-expo),
    transform .4s var(--ease-out-expo);
  z-index: 9999;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(189, 147, 99, 0.08) inset;
}
/* petite flèche décorative */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(8, 14, 26, 0.97);
  border-left: 1px solid rgba(189, 147, 99, 0.2);
  border-top: 1px solid rgba(189, 147, 99, 0.2);
  border-radius: 3px 0 0 0;
}
.nav-has-dropdown.open .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── Grille 3 colonnes ─── */
.nav-drop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* ── Items ─── */
.nav-drop-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(234, 226, 215, 0.72);
  transition:
    background .25s ease,
    color      .25s ease;
}
.nav-drop-item:hover {
  background: rgba(189, 147, 99, 0.1);
  color: var(--or);
}
.nav-drop-ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(189, 147, 99, 0.09);
  border: 1px solid rgba(189, 147, 99, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--or);
  transition: background .25s ease, border-color .25s ease;
}
.nav-drop-item:hover .nav-drop-ic {
  background: rgba(189, 147, 99, 0.2);
  border-color: rgba(189, 147, 99, 0.3);
}
.nav-drop-label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

/* ── Pied de dropdown ─── */
.nav-drop-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(189, 147, 99, 0.12);
  text-align: center;
}
.nav-drop-footer a {
  color: rgba(189, 147, 99, 0.8);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s ease;
}
.nav-drop-footer a:hover {
  color: var(--or);
}

/* ── Mobile : liste déroulante inline ─── */
@media (max-width: 768px) {
  .nav-dropdown {
    position: static;
    transform: none !important;
    width: 100%;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(189, 147, 99, 0.15);
    box-shadow: none;
    backdrop-filter: none;
    /* animation en hauteur */
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    transition: max-height .45s var(--ease-out-expo), padding .3s ease;
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-dropdown::before { display: none; }
  .nav-has-dropdown.open .nav-dropdown {
    max-height: 600px;
    padding: 12px;
    pointer-events: all;
  }
  .nav-drop-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .nav-drop-label { font-size: 11.5px; }
  .nav-drop-ic { width: 28px; height: 28px; border-radius: 7px; }
  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    letter-spacing: 1.5px;
  }
}
