:root {
  --purple: #662483;
  --purple-dark: #4c1b61;
  --orange: #f9b233;
  --text: #111827;
  --muted: #6b7280;
  --line: #eadff2;
  --paper: #f8f5fb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.55;
}
a { color: var(--purple); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 24px; }
.narrow { max-width: 720px; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}
header .wrap, footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--purple);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.brand img { width: 36px; height: 36px; }
.brand .accent { color: var(--orange); }

nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; flex-wrap: wrap; align-items: center; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a.active { color: var(--purple); }
nav .nav-cta { background: var(--purple); color: #fff; padding: 8px 14px; border-radius: 999px; }
nav .nav-cta:hover { color: #fff; background: var(--purple-dark); }

h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.045em; margin: 0 0 14px; line-height: 1.08; }
h2 { font-size: 18px; margin: 28px 0 8px; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.04em; margin: 0 0 10px; line-height: 1.15; }
.section-lead { font-size: 17px; color: var(--muted); max-width: 38rem; margin: 0 0 28px; }
p, li { color: #374151; }
.kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3e8c4;
  color: var(--purple-dark);
  font-size: 13px;
  font-weight: 700;
}
.updated { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.meta { color: var(--muted); margin: 0 0 6px; }

.hero-band {
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(249, 178, 51, 0.28), transparent 28%),
    radial-gradient(circle at 10% 80%, rgba(102, 36, 131, 0.12), transparent 36%),
    linear-gradient(180deg, #f8f5fb 0%, #fff 72%);
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 48px 0 20px;
}
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34rem; margin: 0; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.store-badge {
  height: 48px;
  width: auto;
  transition: transform 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); }

.apk-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.apk-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  background: #3ddc84;
  color: #0b3d22;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
  transition: transform 0.15s ease;
}
.apk-btn:hover { transform: translateY(-2px); }
.apk-btn small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}
.apk-btn-light { background: #fff; color: var(--purple); }
.apk-help {
  color: var(--purple);
  font-weight: 600;
  font-size: 14px;
}

.phones {
  position: relative;
  height: 560px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.phone {
  position: absolute;
  width: 270px;
  background: #0b0b0d;
  border: 3px solid #1a1a1e;
  border-radius: 38px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(17, 24, 39, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-screen {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  aspect-ratio: 9 / 19.5;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.phone-front {
  z-index: 2;
  transform: translate(18px, 0) rotate(-4deg);
}
.phone-back {
  z-index: 1;
  width: 236px;
  opacity: 0.96;
  transform: translate(138px, -28px) rotate(11deg);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 0 64px;
}
.card {
  background: var(--paper);
  border-radius: 18px;
  padding: 18px;
  min-width: 0;
}
.card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 8px; }
.card p { margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px 0 36px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
}
.stat strong { display: block; font-size: 22px; color: var(--purple); letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 14px; }

.section { padding: 28px 0 56px; }
.section-alt { background: var(--paper); padding: 12px 0 28px; }
.section-alt .card { background: #fff; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  background: var(--paper);
  border-radius: 18px;
  padding: 22px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 14px;
}
.step h3, .split-copy h3, .who h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  padding: 20px 0 40px;
}
.split-rev { grid-template-columns: 1.1fr 0.9fr; }
.split-rev .split-copy { order: 2; }
.mini-phone {
  width: min(280px, 100%);
  margin: 0 auto;
  background: #0b0b0d;
  border: 3px solid #1a1a1e;
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.18);
}
.mini-phone .phone-screen { aspect-ratio: 9 / 19.5; }
.checklist { margin: 16px 0 0; padding: 0; list-style: none; }
.checklist li {
  position: relative;
  padding: 7px 0 7px 26px;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 800;
}

.who {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.who article {
  background: var(--paper);
  border-radius: 18px;
  padding: 24px;
}
.who ul { margin: 12px 0 0; padding-left: 18px; }

.faq { max-width: 760px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 4px; }

.cta-band {
  background: linear-gradient(135deg, var(--purple) 0%, #3d1652 100%);
  color: #fff;
  border-radius: 24px;
  padding: 36px 32px;
  margin: 12px 0 48px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; margin: 0 0 8px; }
.cta-band p { opacity: 0.88; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  width: 100%;
  padding: 12px 0 8px;
}
.footer-grid h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; margin: 6px 0; }
.footer-grid a:hover { color: var(--purple); }

.page { padding: 36px 0 56px; }
.hidden { display: none !important; }
.activity-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  margin: 12px 0 16px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 14px;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-secondary { background: #fff; color: var(--purple); border: 1px solid #e5d4f0; }

@media (max-width: 900px) {
  .hero, .split, .split-rev, .steps, .who, .stats, .features, .footer-grid { grid-template-columns: 1fr; }
  .split-rev .split-copy { order: 0; }
  .hero { padding-bottom: 0; }
  .phones { height: 500px; margin: 8px auto 0; }
  .phone-front { transform: translate(-40px, 0) rotate(-4deg); }
  .phone-back { transform: translate(70px, -24px) rotate(11deg); }
  nav { gap: 12px; }
}

@media (max-width: 520px) {
  .phones { height: 430px; }
  .phone-front { width: 210px; }
  .phone-back { width: 180px; transform: translate(58px, -16px) rotate(11deg); }
  .store-badge { height: 42px; }
  .apk-btn { height: 42px; font-size: 14px; }
}

/* ==========================================================================
   Motion design — sobre et fluide. Uniquement des propriétés GPU
   (transform, translate, rotate, scale, opacity). Actif seulement quand
   <html> porte .motion : désactivé pour « réduire les animations » et sans JS.
   ========================================================================== */

:root { --ease: cubic-bezier(0.16, 1, 0.3, 1); }

header { transition: box-shadow 0.3s ease; }
header.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(17, 24, 39, 0.05); }

/* --- Halos du hero (parallaxe légère) --- */
.hero-band { position: relative; }
.hero-band > .wrap { position: relative; z-index: 1; }
.hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  transform: translate3d(
    calc(var(--mx, 0) * var(--px, 0) * 1px),
    calc(var(--sy, 0) * var(--py, 0) * 1px + var(--my, 0) * var(--px, 0) * 1px),
    0
  );
}
.orb-1 {
  --px: -12; --py: 0.15;
  width: 460px; height: 460px; left: -160px; top: 38%;
  background: radial-gradient(circle, rgba(102, 36, 131, 0.12), transparent 68%);
}
.orb-2 {
  --px: 16; --py: -0.1;
  width: 340px; height: 340px; right: 2%; top: -110px;
  background: radial-gradient(circle, rgba(249, 178, 51, 0.26), transparent 66%);
}
.motion .orb { will-change: transform; }

/* --- Hero : entrée du texte --- */
@keyframes rise-in {
  from { opacity: 0; translate: 0 16px; }
}
.motion .hero > div:first-child > * { animation: rise-in 0.9s var(--ease) both; }
.motion .hero > div:first-child > :nth-child(2) { animation-delay: 0.06s; }
.motion .hero > div:first-child > :nth-child(3) { animation-delay: 0.12s; }
.motion .hero > div:first-child > :nth-child(4) { animation-delay: 0.18s; }
.motion .hero > div:first-child > :nth-child(5) { animation-delay: 0.24s; }

/* --- Hero : téléphones en 3D --- */
@keyframes phones-in {
  from { opacity: 0; translate: 0 24px; }
}
.motion .phones {
  transform-style: preserve-3d;
  transform: perspective(1600px) rotateX(var(--hx, 2deg)) rotateY(var(--hy, -6deg));
  transition: transform 1s var(--ease);
  animation: phones-in 1.2s var(--ease) 0.2s both;
  will-change: transform;
}
.motion .phone-front { translate: 0 0 40px; animation: float 9s ease-in-out infinite; }
.motion .phone-back { translate: 0 0 -40px; }
@keyframes float {
  0%, 100% { translate: 0 0 40px; }
  50% { translate: 0 -8px 40px; }
}

/* --- Apparitions au scroll ---
   Même liste de sélecteurs que REVEAL dans js/motion.js. */
.motion :is(.section-title, .section-lead, .step, .stat, .card, .who article,
            .faq details, .split-copy, .mini-phone, .cta-band) {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.9s var(--ease) var(--d, 0s),
    translate 0.9s var(--ease) var(--d, 0s),
    rotate 1.2s var(--ease) var(--d, 0s),
    transform 0.6s var(--ease),
    box-shadow 0.3s ease;
}
.motion :is(.section-title, .section-lead, .step, .stat, .card, .who article,
            .faq details, .split-copy, .mini-phone, .cta-band).in {
  opacity: 1;
  translate: 0 0;
  rotate: none;
}

/* Les téléphones des fonctionnalités se redressent légèrement en entrant */
.motion .split { perspective: 1400px; }
.motion .mini-phone { rotate: y -12deg; }
.motion .split-rev .mini-phone { rotate: y 12deg; }

/* --- Survol (souris uniquement) --- */
@media (hover: hover) and (pointer: fine) {
  .motion :is(.step, .card, .who article, .stat):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.07);
  }
  .motion .mini-phone {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
}

@media (max-width: 900px) {
  .orb-1 { width: 320px; height: 320px; }
  .orb-2 { width: 240px; height: 240px; }
}
