/* motion.css — Plages & Lagunes — polish & micro-interactions
   Chargé après site.css. Toute transition est neutralisée si
   prefers-reduced-motion: reduce (non-négociable). */

/* ─── Scroll reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.55s ease calc(var(--i, 0) * 90ms),
    transform 0.55s ease calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Hover cards (step, service, testimonial, value) ─ */
.step-item,
.testimonial-card,
.value-card,
.faq-item,
.lot-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.step-item:hover,
.testimonial-card:hover,
.value-card:hover,
.faq-item:hover,
.lot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(13,10,43,0.13);
}

/* ─── Service cards image zoom ────────────────────── */
.service-card { overflow: hidden; }
.service-card .sc-bg {
  transition: transform 0.5s ease;
}
.service-card:hover .sc-bg {
  transform: scale(1.06);
}

/* ─── Zoom images lazy sections ───────────────────── */
.section-visual,
.location-visual,
.map-visual,
.gamma-visual {
  overflow: hidden;
  border-radius: 12px;
}
.section-visual img,
.location-visual img,
.map-visual img,
.gamma-visual img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s ease;
}
.section-visual:hover img,
.location-visual:hover img,
.map-visual:hover img,
.gamma-visual:hover img {
  transform: scale(1.04);
}

/* ─── Buttons ─────────────────────────────────────── */
.btn-navy,
.btn-search,
.btn-service {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn-navy:hover,
.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5,64,173,0.28);
}
.btn-navy:active,
.btn-search:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ─── Nav link underline animated ────────────────── */
.main-nav a {
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}
/* La bordure statique est gérée par site.css — on neutralise ici pour éviter doublon */
.main-nav a { border-bottom: none !important; }
.nav-cta::after { display: none !important; }

/* ─── Sticky header ───────────────────────────────── */
.site-header {
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(13,10,43,0.12);
}
.site-header.scrolled .container {
  height: 54px;
}
.site-header .container {
  transition: height 0.3s ease;
}

/* ─── Hero text cascade ───────────────────────────── */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.6s ease 0.05s forwards;
}
.hero h1 {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.65s ease 0.18s forwards;
}
.hero .lead {
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeUp 0.6s ease 0.32s forwards;
}
.hero-search {
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.6s ease 0.46s forwards;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Page-hero cascade (autres pages) ──────────── */
.page-eyebrow {
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.55s ease 0.05s forwards;
}
.page-hero h1 {
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeUp 0.6s ease 0.18s forwards;
}
.page-hero p {
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.6s ease 0.3s forwards;
}

/* ─── Stats bar counter fade-in ──────────────────── */
.stat-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease calc(var(--i, 0) * 120ms),
              transform 0.5s ease calc(var(--i, 0) * 120ms);
}
.stat-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Keyboard focus outlines ─────────────────────── */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Traits dégradés adaptés au fond ────────────── */
/* Sur fond sombre : trait clair (sauge → bleu → violet) */
.section-dark .section-title::after {
  background: linear-gradient(90deg, #85AE9A 0%, #0540AD 55%, #4A2C85 100%);
}
.section-dark .prose-block h2::after {
  background: linear-gradient(90deg, #85AE9A 0%, #0540AD 100%);
}
/* Sur fond sauge/beige : trait sombre (navy → violet) */
.section-sage .section-title::after,
.section-tan  .section-title::after {
  background: linear-gradient(90deg, #0D0A2B 0%, #4A2C85 60%, #0D0A2B 100%);
}
.section-sage .prose-block h2::after,
.section-tan  .prose-block h2::after {
  background: linear-gradient(90deg, #0D0A2B 0%, #4A2C85 100%);
}

/* ─── Card glow adapté au fond ────────────────────── */
/* Sur fond sombre : glow lumineux */
.section-dark .lot-card,
.section-dark .value-card,
.section-dark .faq-item,
.section-dark .contact-info-card,
.section-dark .form-card {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 18px rgba(0,0,0,0.3);
}
.section-dark .lot-card:hover,
.section-dark .value-card:hover,
.section-dark .faq-item:hover,
.section-dark .contact-info-card:hover,
.section-dark .form-card:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 14px 36px rgba(0,0,0,0.4);
}

/* ─── Blobs subtils sur sections claires ──────────── */
.section-sage .aurora-blob { opacity: 0.13 !important; }
.section-tan  .aurora-blob { opacity: 0.16 !important; }

/* ─── Aurora blobs (sections sombres) ────────────── */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  will-change: transform;
  animation: blobFloat 14s ease-in-out infinite alternate;
}

/* Blobs derrière le contenu dans chaque section */
.hero .aurora-blob          { z-index: 1; }   /* au-dessus overlay (auto), sous container (z:2) */
.page-hero .aurora-blob     { z-index: 0; }   /* au-dessus ::before (z:0 DOM order), sous container (z:1) */
.cta-band .aurora-blob      { z-index: 0 !important; } /* site.css .cta-band > * { z-index:1 } → override */

/* Taille / couleur / position — 3 blobs */
.aurora-blob.b1 {
  width: 420px; height: 420px;
  background: #4A2C85;
  top: -15%; left: 5%;
  opacity: 0.5;
}
.aurora-blob.b2 {
  width: 340px; height: 340px;
  background: #0540AD;
  top: 25%; right: -8%;
  opacity: 0.4;
  animation-delay: -4s;
}
.aurora-blob.b3 {
  width: 300px; height: 300px;
  background: #85AE9A;
  bottom: -12%; left: 30%;
  opacity: 0.3;
  animation-delay: -9s;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -25px) scale(1.08); }
}

/* ─── Card glow (couleur palette) ────────────────── */
.lot-card,
.value-card,
.testimonial-card,
.faq-item,
.contact-info-card,
.form-card {
  box-shadow:
    0 0 0 1px rgba(74,44,133,0.1),
    0 4px 18px rgba(5,64,173,0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.lot-card:hover,
.value-card:hover,
.testimonial-card:hover,
.faq-item:hover,
.contact-info-card:hover,
.form-card:hover {
  box-shadow:
    0 0 0 1px rgba(74,44,133,0.18),
    0 14px 36px rgba(5,64,173,0.14);
}

/* ─── Section title — trait dégradé ──────────────── */
.section-title {
  position: relative;
  padding-bottom: 18px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #4A2C85 0%, #0540AD 60%, #85AE9A 100%);
  border-radius: 2px;
}

/* Prose pages (acd, apropos) — trait gauche aligné */
.prose-block h2 {
  padding-bottom: 14px;
  position: relative;
}
.prose-block h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #4A2C85 0%, #0540AD 100%);
  border-radius: 2px;
}

/* ─── Bouton principal — dégradé ──────────────────── */
.btn-navy {
  background: linear-gradient(135deg, #4A2C85 0%, #0540AD 100%) !important;
}
.btn-navy:hover {
  background: linear-gradient(135deg, #3D2272 0%, #032A8A 100%) !important;
  box-shadow: 0 6px 20px rgba(5,64,173,0.32);
}

/* ─── Chips — bordures saturées ──────────────────── */
.chip-disponible  { border: 1px solid rgba(13, 10,  43, 0.22); }
.chip-reservation { border: 1px solid rgba( 5, 64, 173, 0.28); }
.chip-vendu       { border: 1px solid rgba(30,123,  77, 0.28); }

/* ─── prefers-reduced-motion (non-négociable) ─────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  .hero-eyebrow,
  .hero h1,
  .hero .lead,
  .hero-search,
  .page-eyebrow,
  .page-hero h1,
  .page-hero p,
  .stat-item {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  /* Blobs : immobiles (toujours visibles, juste figés) */
  .aurora-blob {
    animation: none !important;
  }
}
