/* Lux' Valley — Design System (PEV-aligned: navy + orange) */
:root {
  /* Color tokens — navy primary, orange accent */
  --forest-900: oklch(0.18 0.05 255);
  --forest-800: oklch(0.24 0.07 255);
  --forest-700: oklch(0.32 0.09 255);
  --forest-500: oklch(0.48 0.12 255);
  --forest-300: oklch(0.78 0.05 250);
  --forest-100: oklch(0.93 0.02 250);

  --orange-600: oklch(0.65 0.16 55);
  --orange-500: oklch(0.72 0.16 55);
  --orange-400: oklch(0.8 0.12 60);
  --orange-300: oklch(0.86 0.09 60);
  --orange-200: oklch(0.92 0.06 60);
  --orange-100: oklch(0.95 0.04 60);
  --orange-50:  oklch(0.97 0.02 60);

  --forest-200: oklch(0.88 0.03 250);

  --cream-50:  oklch(0.99 0.004 250);
  --cream-100: oklch(0.97 0.006 250);
  --cream-200: oklch(0.93 0.008 250);
  --sand-300:  oklch(0.88 0.02 250);
  --sand-500:  oklch(0.72 0.03 250);

  --ink-900: oklch(0.18 0.04 255);
  --ink-700: oklch(0.34 0.03 255);
  --ink-500: oklch(0.52 0.02 255);

  --bg: var(--cream-50);
  --fg: var(--ink-900);
  --rule: oklch(0.85 0.01 250 / 0.6);

  /* Type — clean sans-serif, no editorial italic */
  --serif: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --r-pill: 999px;
  --r-blob-1: 62% 38% 46% 54% / 58% 44% 56% 42%;
  --r-blob-2: 38% 62% 64% 36% / 50% 64% 36% 50%;
  --r-blob-3: 54% 46% 36% 64% / 42% 60% 40% 58%;

  --shadow-soft: 0 1px 2px rgba(20,30,25,0.04), 0 8px 24px rgba(20,30,25,0.06);
  --shadow-blob: 0 20px 60px -20px rgba(20,40,30,0.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* Type scale */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest-700);
  font-weight: 500;
}
.display {
  font-family: var(--sans);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.h1 { font-size: clamp(44px, 6.5vw, 96px); }
.h2 { font-size: clamp(32px, 4.4vw, 60px); }
.h3 { font-size: clamp(22px, 2.4vw, 36px); }
.lede {
  font-family: var(--sans);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink-700);
  max-width: 60ch;
  text-wrap: pretty;
}
p { text-wrap: pretty; }

/* Layout */
.shell {
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
}
.section {
  padding: clamp(80px, 10vw, 160px) 0;
  position: relative;
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transition: backdrop-filter 0.4s ease, background 0.4s ease;
}
.nav.scrolled {
  background: oklch(0.985 0.008 95 / 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav > * { pointer-events: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-900);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  background: oklch(0.985 0.008 95 / 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: 5px;
  flex-shrink: 1;
}
.nav-links a {
  text-decoration: none;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  color: var(--ink-700);
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
}
.nav-links a:hover { background: var(--cream-200); color: var(--ink-900); }
.nav-links a.active { background: var(--forest-800); color: var(--cream-50); }

.nav-cta {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  background: var(--forest-800);
  color: var(--cream-50);
  text-decoration: none;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { background: var(--forest-900); transform: translateY(-1px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--forest-800); color: var(--cream-50); }
.btn-primary:hover { background: var(--forest-900); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-900);
}
.btn-ghost:hover { background: var(--ink-900); color: var(--cream-50); }
.btn-arrow svg { transition: transform 0.3s ease; }
.btn-arrow:hover svg { transform: translateX(4px); }

/* Blob shapes */
.blob {
  position: absolute;
  background: var(--forest-500);
  filter: blur(0px);
  pointer-events: none;
  z-index: 0;
}
.blob-1 { border-radius: var(--r-blob-1); }
.blob-2 { border-radius: var(--r-blob-2); }
.blob-3 { border-radius: var(--r-blob-3); }

@keyframes morph {
  0%, 100% { border-radius: var(--r-blob-1); transform: rotate(0deg) scale(1); }
  33% { border-radius: var(--r-blob-2); transform: rotate(8deg) scale(1.04); }
  66% { border-radius: var(--r-blob-3); transform: rotate(-6deg) scale(0.98); }
}
.morph { animation: morph 18s ease-in-out infinite; }
.morph-slow { animation: morph 28s ease-in-out infinite; }
.morph-fast { animation: morph 12s ease-in-out infinite; }

/* Drift — continuous slow translation, layered with morph */
@keyframes drift-a {
  0%, 100% { translate: 0 0; }
  25% { translate: 32px -28px; }
  50% { translate: -18px 36px; }
  75% { translate: -42px -12px; }
}
@keyframes drift-b {
  0%, 100% { translate: 0 0; }
  33% { translate: -28px 18px; }
  66% { translate: 24px -32px; }
}
@keyframes drift-c {
  0%, 100% { translate: 0 0; }
  50% { translate: 36px 24px; }
}
.bg-blob-decor {
  will-change: transform, translate, border-radius;
  transform: translate3d(var(--par-x, 0), var(--par-y, 0), 0) translate(0, var(--par-my, 0));
  transition: transform 0.08s linear;
}
.bg-blob-decor.morph { animation: morph 22s ease-in-out infinite, drift-a 26s ease-in-out infinite; }
.bg-blob-decor.morph-slow { animation: morph 34s ease-in-out infinite, drift-b 40s ease-in-out infinite; }
.bg-blob-decor.morph-fast { animation: morph 14s ease-in-out infinite, drift-c 18s ease-in-out infinite; }

/* Float — subtle bobbing for cards/decor */
@keyframes float-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
.float { animation: float-1 6s ease-in-out infinite; }
.float-slow { animation: float-2 9s ease-in-out infinite; }

/* Spin — gentle 360 rotation for accent shapes */
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.spin-slow { animation: spin-slow 60s linear infinite; }

/* Pulse — for dots / status indicators */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--orange-500); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 8px transparent; }
}
.pulse-dot { animation: pulse-dot 2.4s ease-in-out infinite; }

/* Aurora — slow gradient drift behind hero */
@keyframes aurora-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 30%, var(--orange-200) 0%, transparent 60%),
    radial-gradient(50% 70% at 80% 60%, var(--forest-200) 0%, transparent 60%),
    radial-gradient(40% 60% at 50% 80%, var(--orange-100) 0%, transparent 60%);
  background-size: 200% 200%;
  animation: aurora-shift 28s ease-in-out infinite;
  opacity: 0.7;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* Parallax containers — JS reads --par-y */
.parallax { transform: translateY(var(--par-y, 0)); will-change: transform; transition: transform 0.05s linear; }

/* Marquee accent on hover */
.marquee:hover { animation-play-state: paused; }

/* Stat number tick on viewport entry */
@keyframes tick-in {
  from { opacity: 0; transform: translateY(20px); letter-spacing: -0.06em; }
  to { opacity: 1; transform: translateY(0); letter-spacing: -0.04em; }
}
.stat-number { animation: tick-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Buttons : magnetic shimmer */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, oklch(1 0 0 / 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.btn:hover::before { transform: translateX(100%); }

/* Card hover lift */
.card { will-change: transform; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--orange-300); }

/* Nav underline indicator */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--orange-500);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { background: transparent !important; }
.nav-links a.active::after { background: var(--orange-500); transform: scaleX(1); }

/* Reveal — staggered slide */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Display headline — letter reveal */
@keyframes letter-rise {
  from { opacity: 0; transform: translateY(40%); }
  to { opacity: 1; transform: translateY(0); }
}
.h1 > span, .display.h1 > span {
  display: inline-block;
}
.reveal.in .h1 > span,
.reveal.in.h1 > span,
.h1.reveal.in > span {
  animation: letter-rise 0.85s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.h1.reveal.in > span:nth-child(1) { animation-delay: 0.05s; }
.h1.reveal.in > span:nth-child(2) { animation-delay: 0.18s; }
.h1.reveal.in > span:nth-child(3) { animation-delay: 0.31s; }
.h1.reveal.in > span:nth-child(4) { animation-delay: 0.44s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* Cards */
.card {
  background: var(--cream-100);
  border: 1px solid var(--rule);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-blob); }

.card-blob { border-radius: 36% 64% 56% 44% / 50% 38% 62% 50%; }

/* Footer */
.footer {
  background: var(--forest-900);
  color: var(--cream-100);
  padding: 100px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer .eyebrow { color: var(--forest-300); }
.footer a { color: var(--cream-200); text-decoration: none; opacity: 0.85; }
.footer a:hover { opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-grid h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--forest-300); margin: 0 0 20px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid oklch(0.5 0.04 145 / 0.3);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--forest-300);
  font-family: var(--mono);
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-transition .pt-blob {
  width: 140vmax;
  height: 140vmax;
  background: var(--forest-800);
  border-radius: var(--r-blob-1);
  transform: scale(0);
  transform-origin: center;
}
.page-transition.entering .pt-blob {
  animation: pt-enter 0.9s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}
.page-transition.exiting .pt-blob {
  animation: pt-exit 0.9s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}
@keyframes pt-enter {
  0% { transform: scale(0) rotate(0deg); border-radius: var(--r-blob-1); }
  100% { transform: scale(1.2) rotate(40deg); border-radius: var(--r-blob-2); }
}
@keyframes pt-exit {
  0% { transform: scale(1.2) rotate(40deg); border-radius: var(--r-blob-2); }
  100% { transform: scale(0) rotate(80deg); border-radius: var(--r-blob-3); }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Marquee */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 64px);
  color: var(--forest-700);
  letter-spacing: -0.02em;
  align-items: center;
}
.marquee .dot {
  width: 14px; height: 14px;
  background: var(--forest-500);
  border-radius: var(--r-blob-2);
  display: inline-block;
  animation: morph 12s ease-in-out infinite;
}

/* Utility */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
/* Tablet — hide non-essential nav items, then full collapse on mobile */
@media (max-width: 1180px) {
  .nav-links a[href="/partenaires/"],
  .nav-links a[href="/simulateur/"] { display: none; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* Number/stat */
.stat-number {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(48px, 6.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--forest-800);
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--forest-300);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest-800);
  background: var(--cream-100);
}

/* Glass panel */
.glass {
  background: oklch(0.985 0.008 95 / 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule);
}

/* Image placeholder */
.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.85 0.04 80 / 0.5) 0,
      oklch(0.85 0.04 80 / 0.5) 8px,
      oklch(0.92 0.02 90 / 0.5) 8px,
      oklch(0.92 0.02 90 / 0.5) 16px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest-700);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Forest section (dark) */
.forest-section {
  background: var(--forest-900);
  color: var(--cream-100);
}
.forest-section .eyebrow { color: var(--forest-300); }
.forest-section .lede { color: var(--cream-200); }
.forest-section .display { color: var(--cream-50); }

/* Hero */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Process step */
.step-num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--orange-600);
}

/* Specific blob bg helpers */
.bg-blob-decor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.55;
}

/* Product hero */
.product-hero {
  padding-top: 160px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}
.product-hero .acronym {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(140px, 22vw, 340px);
  line-height: 0.85;
  color: var(--forest-800);
  letter-spacing: -0.06em;
  user-select: none;
}

/* Comparator table */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.compare th, .compare td {
  text-align: left;
  padding: 18px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.compare th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
  background: var(--cream-100);
}
.compare tr:hover td { background: var(--cream-100); }

/* Triangle illustration */
.triangle-fig {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

/* FAQ */
details.faq {
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--ink-900);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: 28px;
  color: var(--orange-600);
  transition: transform 0.3s ease;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p {
  margin: 16px 0 0;
  color: var(--ink-700);
  max-width: 70ch;
}

/* SR only */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
