/* ════════════════════════════════════════════════════════════════
   MÉCAREMAP — fx.css
   • Fond Supra FIXE (parallax) derrière toute la page
   • Sections = cartes flottantes gris foncé translucides, coins arrondis
   • Micro-interactions (barre de progression, magnétique, tilt 3D)
   Scopé sur body.home-fx -> n'affecte que la page d'accueil.
   ════════════════════════════════════════════════════════════════ */

/* ── Fond Supra fixe (effet parallax : reste pendant que le contenu défile) ── */
.page-bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,6,9,0.52) 0%, rgba(6,6,9,0.72) 55%, rgba(6,6,9,0.88) 100%),
    var(--page-bg-img, url('../images/supra.webp')) center 28% / cover no-repeat;
}

/* Pages internes (services, e85, villes…) : hero transparent + image masquée
   -> le fond fixe parallax prend le relais, look cohérent partout */
body.home-fx .page-hero { background: transparent; border-bottom: none; }
body.home-fx .page-hero-bg { display: none; }

/* ── Barre de progression de lecture ── */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red), #ff6b35 60%, var(--gold));
  box-shadow: 0 0 14px var(--red-glow);
  z-index: 99991; pointer-events: none;
}

/* ── HERO transparent : montre le fond fixe, supprime la coupure noire nette ── */
body.home-fx .hero { background: transparent; }
body.home-fx .hero::after { display: none; }

/* ── SECTIONS = cartes flottantes translucides arrondies ── */
body.home-fx .page-content-wrap { background: none !important; }

body.home-fx .section,
body.home-fx .fx-horizon {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 48px));
  margin: 28px auto;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(18,18,22,0.55) !important;
  backdrop-filter: blur(13px) saturate(1.1);
  -webkit-backdrop-filter: blur(13px) saturate(1.1);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}

/* Pas de carte dans une carte : une .section imbriquée redevient un bloc simple
   (corrige la déformation, ex. ancienne « vehicles-section » de la page services) */
body.home-fx .section .section {
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  border: none;
  border-radius: 0;
  background: transparent !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
}

/* Première carte : un peu d'air sous le hero/ticker */
body.home-fx #why { margin-top: 44px; }
/* CTA finale : légèrement plus opaque pour le contraste */
body.home-fx .cta-section { background: rgba(14,14,18,0.7) !important; }

/* ── SHOWCASE "L'ATELIER" — grille fixe (plus de scroll horizontal) ── */
.fx-horizon { padding: clamp(48px, 7vw, 90px) clamp(20px, 4vw, 56px); }
.fx-horizon-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  align-items: stretch;
  width: auto;
  padding: 0;
}
.fx-horizon-intro { grid-column: 1 / -1; padding: 0 0 8px; }
.fx-horizon-intro .heading-lg { margin: 14px 0 12px; }
.fx-horizon-hint { display: none; }

.fx-panel {
  display: flex; flex-direction: column;
  min-height: 300px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  position: relative; overflow: hidden;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}
.fx-panel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(227,6,19,0.10), transparent 55%);
  opacity: 0; transition: opacity 0.4s ease;
}
.fx-panel:hover { border-color: rgba(227,6,19,0.4); background: rgba(255,255,255,0.05); }
.fx-panel:hover::before { opacity: 1; }
.fx-panel-num { font-family: var(--font-tech); font-size: 3.4rem; font-weight: 900; color: rgba(227,6,19,0.16); line-height: 0.9; }
.fx-panel-icon { font-size: 1.8rem; margin-bottom: 4px; }
.fx-panel-title { font-family: var(--font-tech); font-size: 1.25rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin: 6px 0 10px; color: var(--white); }
.fx-panel-desc { color: var(--white-dim); font-size: 0.92rem; line-height: 1.65; flex: 1; }
.fx-panel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.fx-panel-price { font-family: var(--font-tech); font-weight: 900; font-size: 1.5rem; color: var(--white); }
.fx-panel-price small { font-size: 0.55em; color: var(--titanium); font-weight: 600; }
.fx-panel-cta { font-family: var(--font-tech); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: 6px; transition: gap 0.25s ease; }
.fx-panel:hover .fx-panel-cta { gap: 12px; }

/* ── Tilt 3D des cartes ── */
.fx-tilt { transform-style: preserve-3d; }

/* ── Mobile ── */
@media (max-width: 600px) {
  body.home-fx .section,
  body.home-fx .fx-horizon { border-radius: 20px; margin: 16px auto; width: calc(100% - 24px); }
}

/* ── Mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
  .fx-progress { display: none; }
}
