/* ==========================================================================
   HABREM — Landing page styles
   Design system strictement dérivé de docs/design/DESIGN.md
   Source unique de vérité : tokens ci-dessous. Aucun style en dur ailleurs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens (Design System)
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs — Palette (Strict) */
  --primary: #b026ff;
  --bg: #ffffff;
  --accent: #ffae03;
  --text: #1a1523;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Couleurs secondaires (optionnelles) */
  --primary-dark: #8d1ecc;
  --primary-soft: #f6e8ff;
  --on-primary: #ffffff;
  --surface: #f8f9fa;
  --surface-strong: #f1f0f5;
  --border: #e7e5ec;
  --text-secondary: #6b6577;
  --text-disabled: #a8a2b3;
  --success-soft: #e9f9ef;
  --warning-soft: #fef3dc;
  --error-soft: #fdecec;
  --error-dark: #c81e1e;
  --info-soft: #eaf2fe;
  --scrim: rgba(26, 21, 35, 0.48);

  /* Typographie */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-sans);
  --font-arabic: "Readex Pro", "Noto Sans Arabic", var(--font-sans);

  /* Échelle d'espacement (base 4) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Rayons — 8 · 12 · 16 · 999 uniquement */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Layout */
  --container: 1200px;
  --gutter: var(--sp-5);

  /* Ombres — uniquement pour éléments flottants */
  --shadow-float: 0 12px 40px rgba(26, 21, 35, 0.12);
  --shadow-nav: 0 4px 30px rgba(26, 21, 35, 0.08);

  /* Motion */
  --t-fast: 160ms ease;
  --t-base: 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Base / Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Locale arabe : police globale Readex Pro (cf. DESIGN.md §3) */
html[lang="ar"] body { font-family: var(--font-arabic); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

/* Décalage d'ancrage sous la navbar fixe */
[id] { scroll-margin-top: 96px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   3. Typographie (échelle DESIGN.md)
   -------------------------------------------------------------------------- */
.t-display { font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: -0.02em; }
.t-h1 { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.01em; }
.t-h2 { font-size: 22px; line-height: 30px; font-weight: 700; }
.t-h3 { font-size: 18px; line-height: 26px; font-weight: 700; }
.t-body { font-size: 16px; line-height: 24px; font-weight: 400; }
.t-body-sm { font-size: 14px; line-height: 20px; font-weight: 400; }
.t-label-lg { font-size: 16px; line-height: 24px; font-weight: 600; }
.t-label { font-size: 14px; line-height: 20px; font-weight: 600; }
.t-caption { font-size: 12px; line-height: 16px; font-weight: 500; }

/* Titres marketing (mise à l'échelle de l'échelle existante, mêmes poids) */
.t-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.t-hero {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
html[lang="ar"] .t-section,
html[lang="ar"] .t-hero { font-family: var(--font-arabic); }

.muted { color: var(--text-secondary); }
.accent { color: var(--accent); }

/* Marque HABREM — Poppins, figée (toujours latine) */
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-16); }
.section--tight { padding-block: var(--sp-16); }
.section--surface { background: var(--surface); }

.section-head { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--sp-3); }
.section-head p { margin-top: var(--sp-4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   5. Composants — Boutons (cf. DESIGN.md §7)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;
  padding-inline: var(--sp-6);
  border-radius: var(--r-md);
  border: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 44px; font-size: 14px; padding-inline: var(--sp-5); }

.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-dark); }

.btn--secondary { background: var(--primary-soft); color: var(--primary-dark); }
.btn--secondary:hover { background: #efd9ff; }

.btn--neutral { background: var(--surface-strong); color: var(--text); }
.btn--neutral:hover { background: #e7e5ee; }

.btn--ghost { background: transparent; color: var(--primary-dark); }
.btn--ghost:hover { background: var(--primary-soft); }

.btn[disabled],
.btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* --------------------------------------------------------------------------
   6. Badge (cf. DESIGN.md §7)
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 24px;
  padding-inline: 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}
.badge--neutral { background: var(--surface-strong); color: var(--text-secondary); }
.badge--primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge--promo { background: var(--accent); color: var(--text); }
.badge--soon { background: var(--surface-strong); color: var(--text-secondary); }
.badge--live { background: var(--success-soft); color: #15803d; }
.badge--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--success);
}

/* --------------------------------------------------------------------------
   7. Navbar — Glassmorphism (css.glass) + sticky
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: var(--sp-3);
  inset-inline: 0;
  z-index: 1000;
  transition: top var(--t-base), padding var(--t-base);
}
.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: 64px;
  padding-inline: var(--sp-3) var(--sp-3);
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: var(--shadow-nav);
  transition: background var(--t-base), box-shadow var(--t-base), height var(--t-base);
}
.nav.is-scrolled .nav__inner {
  height: 58px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 30px rgba(26, 21, 35, 0.12);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding-inline-start: var(--sp-2);
}
.nav__logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.nav__title { width: 110px; height: auto; object-fit: contain; }
.nav__wordmark { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline: auto;
}
.nav__link {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: var(--text); background: rgba(26, 21, 35, 0.05); }
.nav__link.is-active { color: var(--primary-dark); background: var(--primary-soft); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }

/* Sélecteur de langue */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
}
.lang__btn {
  min-width: 34px;
  height: 30px;
  padding-inline: var(--sp-2);
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active { background: var(--bg); color: var(--primary-dark); box-shadow: 0 1px 3px rgba(26, 21, 35, 0.1); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-fast), background var(--t-fast);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-fast);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(64px + var(--sp-16));
  padding-bottom: var(--sp-24);
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(176, 38, 255, 0.06), transparent 60%),
    var(--bg);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--sp-16);
}
.hero__copy { max-width: 560px; }
.hero__title { margin-top: var(--sp-5); }
.hero__title .brand-word {
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-3);
}
.hero__lead { margin-top: var(--sp-5); font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.6; color: var(--text-secondary); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-8); color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.hero__meta span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hero__meta svg { width: 18px; height: 18px; color: var(--primary); }

/* Visuel hero + halo */
.hero__visual { position: relative; display: grid; place-items: center; min-height: 480px; }

.halo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(520px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.halo i {
  position: absolute;
  border-radius: var(--r-pill);
  background: var(--accent);
  opacity: 0.05;
}
.halo i:nth-child(1) { width: 100%; height: 100%; opacity: 0.055; }
.halo i:nth-child(2) { width: 72%; height: 72%; opacity: 0.06; }
.halo i:nth-child(3) { width: 46%; height: 46%; opacity: 0.07; }
.halo i:nth-child(4) { width: 24%; height: 24%; opacity: 0.1; }

.hero__logo {
  position: relative;
  width: clamp(180px, 34%, 240px);
  filter: drop-shadow(0 24px 48px rgba(176, 38, 255, 0.18));
}

/* Phone mockup */
.phone {
  position: relative;
  width: 300px;
  max-width: 82vw;
  aspect-ratio: 9 / 19;
  padding: 12px;
  border-radius: 44px;
  background: var(--text);
  box-shadow: var(--shadow-float);
}
.phone__screen {
  height: 100%;
  border-radius: 34px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone__bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--sp-5);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.phone__notch {
  width: 84px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--text);
  opacity: 0.85;
}
.phone__body { flex: 1; padding: var(--sp-4); display: grid; gap: var(--sp-3); align-content: start; }

.pcard { border-radius: var(--r-md); padding: var(--sp-3); background: var(--surface); display: grid; gap: var(--sp-3); }
.pcard__row { display: flex; align-items: center; gap: var(--sp-3); }
.pcard__thumb { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--primary-soft); display: grid; place-items: center; color: var(--primary-dark); }
.pcard__lines { flex: 1; display: grid; gap: 6px; }
.pcard__line { height: 8px; border-radius: var(--r-pill); background: var(--surface-strong); }
.pcard__line--sm { width: 55%; height: 6px; }
.pcard__line--lg { width: 78%; }
.pcard--primary { background: var(--primary); color: var(--on-primary); }
.pcard--primary .pcard__line { background: rgba(255, 255, 255, 0.35); }
.pcard__label { font-size: 12px; font-weight: 700; }
.pcard__amount { font-size: 20px; font-weight: 800; }

.track { display: grid; gap: var(--sp-3); }
.track__step { display: flex; align-items: center; gap: var(--sp-3); font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.track__dot { width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--surface-strong); flex: none; }
.track__step.is-done { color: var(--text); }
.track__step.is-done .track__dot { background: var(--success); }
.track__step.is-active .track__dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.track__step.is-active { color: var(--primary-dark); }

/* --------------------------------------------------------------------------
   9. Séparateurs SVG (wavy) — formes générées via app.haikei.app
   -------------------------------------------------------------------------- */
.wave { line-height: 0; }
.wave svg { display: block; width: 100%; height: clamp(70px, 9vw, 120px); }
.wave--flip svg { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   10. Services
   -------------------------------------------------------------------------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-12);
}
.service {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-4);
  align-content: start;
  transition: background var(--t-fast), transform var(--t-base);
}
.service:hover { background: var(--surface-strong); }
.service--feature { background: var(--primary-soft); }
.service--feature:hover { background: #efd9ff; }

.service__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.service--feature .service__icon { background: var(--primary); color: var(--on-primary); }
.service__icon svg { width: 26px; height: 26px; }
.service__title { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.service p { color: var(--text-secondary); font-size: 14px; line-height: 20px; }

/* Bandeau statistiques */
.stat { text-align: center; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-16);
}
.stat__num { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; color: var(--primary-dark); letter-spacing: -0.02em; }
.stat__label { margin-top: var(--sp-2); color: var(--text-secondary); font-size: 14px; font-weight: 500; }

/* --------------------------------------------------------------------------
   11. Comment ça marche
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
  counter-reset: step;
}
.step { display: grid; gap: var(--sp-4); align-content: start; }
.step__index {
  counter-increment: step;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.step__index::before { content: counter(step); }
.step h3 { font-size: 18px; line-height: 26px; font-weight: 700; }
.step p { color: var(--text-secondary); font-size: 14px; line-height: 20px; }

/* --------------------------------------------------------------------------
   12. Partenaires
   -------------------------------------------------------------------------- */
.grid-partners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-12);
}
.partner {
  position: relative;
  border-radius: var(--r-lg);
  padding: var(--sp-10);
  overflow: hidden;
  display: grid;
  gap: var(--sp-4);
  align-content: start;
  min-height: 300px;
}
.partner--merchant { background: var(--primary); color: var(--on-primary); }
.partner--driver { background: var(--surface); }
.partner__icon { width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); color: var(--on-primary); }
.partner--driver .partner__icon { background: var(--primary-soft); color: var(--primary-dark); }
.partner__icon svg { width: 28px; height: 28px; }
.partner h3 { font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 700; }
.partner p { font-size: 15px; line-height: 23px; }
.partner--merchant p { color: rgba(255, 255, 255, 0.85); }
.partner--driver p { color: var(--text-secondary); }
.partner__list { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
.partner__list li { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: 14px; font-weight: 500; }
.partner__list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.partner--merchant .partner__list svg { color: var(--on-primary); }
.partner--driver .partner__list svg { color: var(--primary); }
.partner__cta { margin-top: auto; }
.partner--merchant .btn--neutral { background: var(--on-primary); color: var(--primary-dark); }
.partner--merchant .btn--neutral:hover { background: #f4eafd; }

/* --------------------------------------------------------------------------
   13. Téléchargement / QR
   -------------------------------------------------------------------------- */
.download__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--sp-16);
}
.download__copy { max-width: 520px; }
.download__copy p { margin-top: var(--sp-4); }
.stores { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
.store {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding-inline: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--text);
  color: var(--on-primary);
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; }
.store__txt { display: grid; line-height: 1.15; }
.store__txt small { font-size: 10px; opacity: 0.75; letter-spacing: 0.06em; text-transform: uppercase; }
.store__txt strong { font-size: 15px; font-weight: 700; }
.store.is-soon { opacity: 0.55; cursor: not-allowed; }
.store.is-soon:hover { transform: none; }

.qr-card {
  justify-self: center;
  width: min(340px, 100%);
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  display: grid;
  gap: var(--sp-5);
  justify-items: center;
  text-align: center;
  box-shadow: var(--shadow-float);
}
.qr-card__frame {
  width: 200px;
  height: 200px;
  border-radius: var(--r-md);
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}
.qr-card__frame img,
.qr-card__frame canvas { width: 100%; height: 100%; }
.qr-card__hint { font-size: 13px; color: var(--text-secondary); line-height: 18px; }

/* --------------------------------------------------------------------------
   14. CTA final
   -------------------------------------------------------------------------- */
.cta-band {
  border-radius: var(--r-lg);
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--sp-16);
  display: grid;
  gap: var(--sp-6);
  justify-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.25rem); line-height: 1.2; font-weight: 700; max-width: 20ch; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 52ch; }
.cta-band .btn--neutral { background: var(--on-primary); color: var(--primary-dark); }
.cta-band .btn--neutral:hover { background: #f4eafd; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--surface); padding-block: var(--sp-16) var(--sp-8); }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-10);
}
.footer__brand { display: grid; gap: var(--sp-4); align-content: start; max-width: 320px; }
.footer__brand .nav__brand { padding: 0; }
.footer__brand p { color: var(--text-secondary); font-size: 14px; }
.footer__col { display: grid; gap: var(--sp-3); align-content: start; }
.footer__col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.footer__col a { font-size: 14px; font-weight: 500; color: var(--text); transition: color var(--t-fast); }
.footer__col a:hover { color: var(--primary-dark); }

.footer__social { display: flex; gap: var(--sp-3); }
.social {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.social:hover { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.social svg { width: 20px; height: 20px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.footer__legal a:hover { color: var(--primary-dark); }

/* --------------------------------------------------------------------------
   16. Pages légales
   -------------------------------------------------------------------------- */
.legal { padding-top: calc(64px + var(--sp-16)); padding-bottom: var(--sp-24); }
.legal__head { max-width: 720px; }
.legal__head .t-hero { font-size: clamp(2rem, 5vw, 3rem); }
.legal__meta { margin-top: var(--sp-4); color: var(--text-secondary); font-size: 14px; }
.legal__body { max-width: 760px; margin-top: var(--sp-12); display: grid; gap: var(--sp-10); }
.legal__body section { display: grid; gap: var(--sp-3); }
.legal__body h2 { font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 700; }
.legal__body p, .legal__body li { color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.legal__body ul { display: grid; gap: var(--sp-2); padding-inline-start: var(--sp-5); list-style: disc; }
.legal__body a { color: var(--primary-dark); font-weight: 600; }
.legal__toc {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-6);
  background: var(--surface);
  border-radius: var(--r-md);
}
.legal__toc a { font-size: 14px; font-weight: 600; color: var(--primary-dark); }

/* --------------------------------------------------------------------------
   17. Animations d'apparition (thread UI, désactivables)
   -------------------------------------------------------------------------- */
/* Sans JS, le contenu reste visible ; l'animation n'est activée que si .js est présent */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--t-base), transform 600ms var(--t-base); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-12); }
  .hero__visual { min-height: 380px; }
  .hero__copy { text-align: center; margin-inline: auto; max-width: 640px; }
  .hero__lead { margin-inline: auto; }
  .hero__cta, .hero__meta { justify-content: center; }

  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  /*.stats { grid-template-columns: repeat(2, 1fr); display: flex; justify-content: space-between;  }*/
  .stats { grid-template-columns: repeat(2, 1fr); } /* Juste ça, c'est parfait */
  .download__grid { grid-template-columns: 1fr; gap: var(--sp-12); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: calc(64px + var(--sp-12)); }
  .download__copy { text-align: center; margin-inline: auto; }
  .stores { justify-content: center; }
}


/* Menu compact dès 992px : en dessous, les liens de la navbar débordent à droite */
@media (max-width: 992px) {
  /* --- Ton code existant pour le menu mobile --- */
  .nav__links {
    position: absolute;
    top: calc(100% + var(--sp-3));
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    margin: 0;
    padding: var(--sp-3);
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); }
  .nav__toggle { display: inline-flex; }
  .nav__actions .btn { display: none; }

  /* --- LE FIX POUR L'ALIGNEMENT --- */
  /* On passe le inner en grid pour maîtriser les 3 zones */
  .nav__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--sp-2);
  }

  /* Le logo reste calé à gauche */
  .nav__brand { grid-column: 1; }

  /* Le conteneur des actions prend la place du milieu et de la droite */
  .nav__actions {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  /* La langue est centrée mathématiquement, le burger est poussé à droite */
  .lang { justify-self: center; }
  .nav__toggle { justify-self: end; }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr auto;
    gap: var(--sp-16); 
    padding-inline: var(--sp-6);
    align-items: start;
  }
  .footer__col {
    min-width: 120px; 
  }

  .footer, .container { margin: auto; }
}

@media (min-width: 1025px) { 
  .download__copy {
    margin-left: auto; /* Pousse le bloc vers la gauche */
    justify-self: start; 
  }
}

@media (max-width: 760px) {
  .grid-services,
  .grid-partners,
  .steps,
  .stats { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-12); }
  .footer__top { display:flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-8); padding-inline: var(--sp-4); }
  .footer { text-align: center; }
  .footer__brand {
    max-width: 100%;
    align-items: center; 
    flex: 1 1 100%;
  }
  .footer__social { justify-content: center; }
  .footer__col { flex: 1 1 110px; }
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--sp-3);
    margin-top: var(--sp-8);
  }
  .nav__brand { justify-self: center; }
  .cta-band { padding: var(--sp-10) var(--sp-6); }
  .partner { padding: var(--sp-8); }
  .hero { padding-bottom: var(--sp-8); /* Réduit le bas du hero */ }
  .step { text-align: center; justify-items: center; }
}

@media (max-width: 480px) {
  .nav__title {
    width: 90px; /* Un peu plus petit sur mobile pour pas que ça déborde */
  }
}