/* CrushScan · landing liste d'attente */

:root {
  color-scheme: light;
  --ink: #16121a;
  --ink-2: #2b2431;
  --muted: #6b6370;
  --line: #ece3db;
  --cream: #fff7f0;
  --sand: #f8efe7;
  --paper: #ffffff;
  --red: #ff4a3d;
  --red-ink: #c8281c;
  --red-soft: #ffe4e0;
  --green: #12b76a;
  --green-ink: #067647;
  --green-soft: #dcfae6;

  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 1px 2px rgba(22, 18, 26, .05), 0 14px 34px -12px rgba(22, 18, 26, .16);
  --shadow-lg: 0 2px 6px rgba(22, 18, 26, .06), 0 34px 70px -24px rgba(22, 18, 26, .32);

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 64px;

  --flag-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 21V3.5' stroke='black' stroke-width='2.2' stroke-linecap='round' fill='none'/%3E%3Cpath d='M6 5c3-1.6 5.2 1.4 8.2 0 1.6-.7 2.8-.8 3.8-.5V13c-1-.3-2.2-.2-3.8.5-3 1.4-5.2-1.6-8.2 0z'/%3E%3C/svg%3E");
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img, svg { display: block; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 8px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn .ico { width: 18px; height: 18px; }
.btn-sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-red { background: var(--red); color: var(--paper); }
.btn-red:hover { background: #ff3527; }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-light:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Navigation + barre de lecture */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--nav-h);
  background: rgba(255, 247, 240, .78);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(236, 227, 219, .7);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--page-p, 0));
  background: linear-gradient(90deg, var(--red), #ff8a5c 60%, var(--green));
}
.logo {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font: 800 23px/1 var(--font-display); letter-spacing: -0.04em;
}
.logo-accent { color: var(--red); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--ink);
  display: grid; place-items: center; color: var(--paper); transform: rotate(-6deg);
}
.logo-mark svg { width: 22px; height: 22px; fill: var(--red); }
.logo-sm { font-size: 21px; }
.logo-sm .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
.logo-sm .logo-mark svg { width: 18px; height: 18px; }
.nav-links { display: none; gap: 28px; font-weight: 500; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + 36px) 0 64px;
  background: var(--cream);
}
.blobs { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero .blobs { transform: translateY(calc(var(--p, 0) * 140px)); }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .8;
  will-change: transform; animation: drift 14s ease-in-out infinite;
}
.blob-1 { width: 460px; height: 460px; left: -170px; top: -130px; background: #ffc2ab; }
.blob-2 { width: 380px; height: 380px; right: -150px; top: 40px; background: #bfeed4; animation-duration: 11s; animation-direction: reverse; }
.blob-3 { width: 560px; height: 320px; left: 15%; bottom: -220px; background: #ffd9c7; animation-duration: 17s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(46px, 34px) scale(1.08); }
  66% { transform: translate(-34px, 22px) scale(.94); }
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy {
  text-align: center;
  transform: translateY(calc(var(--p, 0) * -70px));
  opacity: calc(1 - var(--p, 0) * .8);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px -6px rgba(22, 18, 26, .45);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(18, 183, 106, .6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .55); }
  70% { box-shadow: 0 0 0 8px rgba(18, 183, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); }
}
.hero h1 {
  margin: 22px auto 0; max-width: 11ch;
  font-size: clamp(2.7rem, 11vw, 5.4rem); font-weight: 800; line-height: .96; letter-spacing: -0.045em;
}
.hl {
  display: inline-block; padding: 0 .16em .04em; margin: 0 .02em;
  background: var(--red); color: var(--paper); border-radius: .16em; transform: rotate(-2.5deg);
  box-shadow: 0 10px 24px -10px rgba(255, 74, 61, .8);
}
.lead { margin: 22px auto 0; max-width: 34em; color: var(--muted); font-size: 17px; }

/* Barre de recherche */
.search {
  display: flex; align-items: center; gap: 4px;
  width: 100%; max-width: 540px; margin: 28px auto 0; padding: 6px;
  background: var(--paper); border-radius: 999px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(22, 18, 26, .04);
  transition: box-shadow .2s;
}
.search:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255, 74, 61, .35); }
.search-at { padding-left: 14px; font: 700 19px/1 var(--font-body); color: var(--muted); }
.search input {
  flex: 1; width: 0; min-width: 0; height: 52px; padding: 0 6px 0 2px;
  border: 0; background: transparent; outline: none;
  font: 500 17px var(--font-body); color: var(--ink);
}
.search input::placeholder { color: #a39aa6; }
.hero .search {
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) backwards .35s, attention 1.6s ease-out 1.6s 2;
}
@keyframes attention {
  0% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(255, 74, 61, .5); }
  80%, 100% { box-shadow: var(--shadow-lg), 0 0 0 18px rgba(255, 74, 61, 0); }
}
.search.is-nudged, .hero .search.is-nudged { animation: nudge .4s; }
@keyframes nudge {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.checks {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.checks li { display: inline-flex; align-items: center; gap: 6px; }
.checks svg {
  width: 18px; height: 18px; padding: 3px; border-radius: 50%;
  background: var(--green); color: var(--paper);
}

/* Rapport d'exemple */
.hero-visual {
  position: relative; max-width: 420px; width: 100%; margin: 0 auto;
  transform: translateY(calc(var(--p, 0) * 110px)) rotate(calc(var(--p, 0) * 6deg));
}
.report {
  position: relative; z-index: 1; margin: 0;
  background: var(--paper); border-radius: 28px; padding: 22px 20px 20px;
  box-shadow: var(--shadow-lg);
}
.report-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px; background: var(--sand);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}
.report-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--paper);
  font: 800 19px var(--font-display);
  background: linear-gradient(135deg, #ff9a7a, #c46bff);
}
.report-id { flex: 1; min-width: 0; }
.report-handle { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-meta { font-size: 13px; color: var(--muted); }
.score { font-family: var(--font-display); color: var(--red-ink); line-height: 1; text-align: right; }
.score b { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.score span { font-size: 14px; font-weight: 700; color: var(--muted); }
.meter { height: 8px; margin: 14px 0 16px; border-radius: 99px; background: #f3ece6; overflow: hidden; }
.meter span {
  display: block; height: 100%; width: var(--v); border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff8a5c);
}
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flag {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.35;
}
.flag svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.flag b { display: block; font-weight: 700; }
.flag span { color: var(--muted); font-size: 13px; }
.flag.is-red { background: var(--red-soft); }
.flag.is-red svg { fill: var(--red); color: var(--red-ink); }
.flag.is-green { background: var(--green-soft); }
.flag.is-green svg { fill: var(--green); color: var(--green-ink); }
.advice {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--sand); font-size: 14px;
}
.sticker {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px; font: 700 14px var(--font-display);
  box-shadow: var(--shadow); animation: float 5s ease-in-out infinite;
}
.sticker svg { width: 16px; height: 16px; }
.sticker-red { top: -24px; right: 6px; background: var(--red); color: var(--paper); --r: 6deg; }
.sticker-red svg { fill: var(--paper); }
.sticker-green {
  bottom: -18px; left: 14px; background: var(--paper); color: var(--green-ink); --r: -5deg;
  animation-delay: -2.5s;
}
.sticker-green svg { fill: var(--green); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50% { transform: translateY(-8px) rotate(var(--r)); }
}

/* Chiffres */
.stats { background: var(--paper); border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; padding-top: 40px; padding-bottom: 40px; }
.stat { text-align: center; }
.stat-num {
  display: inline-block;
  font: 800 clamp(2.5rem, 10vw, 3.6rem)/1 var(--font-display); letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.stat-num em { margin-left: 3px; font-style: normal; font-size: .62em; color: var(--red); }
.stat-label { max-width: 19ch; margin: 8px auto 0; font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding: 84px 0; }
.section-white { background: var(--paper); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink);
}
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head h2 {
  margin-top: 10px; font-size: clamp(2rem, 6.5vw, 3.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.04em;
}
.section-lead { margin-top: 16px; font-size: 17px; color: var(--muted); }

/* Titres découpés mot par mot (créés par app.js) */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.split-word > span { display: inline-block; }

/* Démo animée */
.demo-section { overflow: hidden; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.demo-head { margin-bottom: 0; }
.demo-stage { position: relative; display: grid; justify-items: center; }
.demo-stage::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 46%; translate: -50% -50%;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, #ffcab6 0%, rgba(255, 202, 182, 0) 68%);
}
.phone {
  position: relative; width: 272px; height: 560px; padding: 10px;
  border-radius: 46px; background: var(--ink);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #3a3240;
  transform: perspective(1200px)
    rotateY(calc((1 - var(--p, 1)) * -22deg))
    rotateX(calc((1 - var(--p, 1)) * 10deg))
    translateY(calc((1 - var(--p, 1)) * 60px));
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; translate: -50% 0; z-index: 3;
  width: 86px; height: 24px; border-radius: 20px; background: var(--ink);
}
.phone-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--cream); }
.app-bar {
  display: flex; align-items: center; gap: 8px; padding: 50px 18px 0;
  font: 800 19px/1 var(--font-display); letter-spacing: -0.04em;
}
.app-bar .logo-mark { width: 26px; height: 26px; border-radius: 8px; }
.app-bar .logo-mark svg { width: 16px; height: 16px; }
.screen {
  position: absolute; left: 16px; right: 16px; top: 92px; bottom: 18px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1);
}
.phone[data-phase="1"] .screen-1,
.phone[data-phase="2"] .screen-2,
.phone[data-phase="3"] .screen-3 { opacity: 1; transform: none; }
.screen-title { font: 800 22px/1.15 var(--font-display); letter-spacing: -0.03em; }

.screen-1 { justify-content: center; gap: 14px; text-align: center; }
.demo-input {
  display: flex; align-items: center; gap: 3px; height: 50px; padding: 0 16px;
  border-radius: 16px; background: var(--paper); box-shadow: var(--shadow);
  font-weight: 600; text-align: left;
}
.demo-input > span { color: var(--muted); font-weight: 700; }
.demo-input b { font-weight: 600; white-space: nowrap; }
.caret { width: 2px; height: 18px; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-btn {
  position: relative; overflow: hidden; display: grid; place-items: center;
  height: 48px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700;
}
.phone.is-pressed .demo-btn { animation: press .4s ease; }
.phone.is-pressed .demo-btn::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px;
  border-radius: 50%; background: rgba(255, 255, 255, .45); animation: ripple .6s ease-out forwards;
}
@keyframes press { 40% { transform: scale(.94); } }
@keyframes ripple { to { transform: scale(14); opacity: 0; } }
.screen-hint { font-size: 12px; color: var(--muted); }

.screen-2 { align-items: center; gap: 14px; padding-top: 6px; text-align: center; }
.screen-2 .screen-title { font-size: 17px; }
.radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.radar .avatar { position: relative; z-index: 1; width: 64px; height: 64px; font-size: 26px; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); opacity: 0; }
.phone[data-phase="2"] .radar i { animation: ring 1.8s ease-out infinite; }
.phone[data-phase="2"] .radar i:nth-of-type(2) { animation-delay: .6s; }
.phone[data-phase="2"] .radar i:nth-of-type(3) { animation-delay: 1.2s; }
@keyframes ring {
  from { transform: scale(.55); opacity: .7; }
  to { transform: scale(1.25); opacity: 0; }
}
.demo-progress { width: 100%; height: 6px; border-radius: 6px; background: #f1e7df; overflow: hidden; }
.demo-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--red), #ff8a5c); }
.phone[data-phase="2"] .demo-progress span { animation: progress 3.1s cubic-bezier(.4, 0, .2, 1) forwards .2s; }
@keyframes progress { to { width: 100%; } }
.demo-checks { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: left; }
.demo-checks li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--paper); font-size: 14px; font-weight: 600;
}
.demo-checks li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #e3d9d0;
}
.phone[data-phase="2"] .demo-checks li {
  animation: flag-in .45s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 650ms + 300ms);
}
.phone[data-phase="2"] .demo-checks li::before {
  animation: tick-on .3s ease-out forwards; animation-delay: calc(var(--i) * 650ms + 750ms);
}
@keyframes tick-on { to { border-color: var(--green); background: var(--green) var(--check-icon) center / 11px no-repeat; } }

.screen-3 { gap: 10px; }
.gauge { position: relative; width: 116px; height: 116px; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 10; }
.gauge-bg { stroke: #f1e7df; }
.gauge-fg { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; }
.phone[data-phase="3"] .gauge-fg { animation: gauge 1.4s cubic-bezier(.2, .8, .2, 1) forwards .3s; }
@keyframes gauge { to { stroke-dashoffset: 202.6; } }
.gauge p {
  position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 40px;
  font-family: var(--font-display); line-height: 1;
}
.gauge b { font-size: 34px; font-weight: 800; color: var(--red-ink); letter-spacing: -0.04em; }
.gauge span { font-size: 12px; font-weight: 700; color: var(--muted); }
.gauge-label { text-align: center; font-size: 13px; font-weight: 700; color: var(--red-ink); }
.demo-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.demo-flags li {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 12px; font-size: 12.5px; font-weight: 600; line-height: 1.25;
}
.demo-flags li::before {
  content: ""; flex: none; width: 14px; height: 14px;
  -webkit-mask: var(--flag-mask) center / contain no-repeat; mask: var(--flag-mask) center / contain no-repeat;
}
.demo-flags .is-red { background: var(--red-soft); }
.demo-flags .is-red::before { background: var(--red); }
.demo-flags .is-green { background: var(--green-soft); }
.demo-flags .is-green::before { background: var(--green); }
.phone[data-phase="3"] .demo-flags li {
  animation: flag-in .45s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 380ms + 1.3s);
}
.demo-advice {
  margin-top: auto; padding: 10px 12px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600;
}
.phone[data-phase="3"] .demo-advice { animation: flag-in .45s cubic-bezier(.2, .8, .2, 1) backwards 3s; }
.demo-caption { margin-top: 14px; font-size: 12px; color: var(--muted); }

.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demo-step button {
  width: 100%; display: grid; gap: 4px; padding: 16px 18px; text-align: left;
  border: 0; border-radius: 20px; background: transparent; color: var(--ink); cursor: pointer;
  opacity: .55; transition: background-color .3s, box-shadow .3s, opacity .3s;
}
.demo-step button:hover { opacity: .85; }
.demo-step.is-active button { opacity: 1; background: var(--paper); box-shadow: var(--shadow); }
.demo-step b { font: 800 19px/1.2 var(--font-display); letter-spacing: -0.02em; }
.demo-desc { color: var(--muted); font-size: 15px; }
.demo-bar { display: block; height: 4px; margin-bottom: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.demo-bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }
.demo-step.is-done .demo-bar i { transform: scaleX(1); }
.demo-step.is-active .demo-bar i { animation: bar var(--dur, 4s) linear forwards; }
@keyframes bar { to { transform: scaleX(1); } }

/* Bandeau qui défile */
.ribbon { padding: 84px 0 80px; overflow: hidden; }
.ribbon .section-head { padding: 0 16px; }
.marquee {
  display: flex; gap: 12px; overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  transform: skewX(calc(var(--vel, 0) * -.7deg));
}
.marquee + .marquee { margin-top: 10px; }
.marquee-track {
  flex: none; display: flex; gap: 12px; min-width: max-content;
  margin: 0; padding: 0; list-style: none;
  animation: marquee 40s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - 12px)); } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.chip::before {
  content: ""; flex: none; width: 16px; height: 16px;
  -webkit-mask: var(--flag-mask) center / contain no-repeat; mask: var(--flag-mask) center / contain no-repeat;
}
.chip.is-red { background: var(--red-soft); color: #7a1f17; }
.chip.is-red::before { background: var(--red); }
.chip.is-green { background: var(--green-soft); color: #05502f; }
.chip.is-green::before { background: var(--green); }

/* Cartes « ce qu'on vérifie » */
.cards { display: grid; gap: 14px; }
.card {
  position: relative; padding: 22px; border-radius: var(--radius); background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
}
.card-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--paper); font-size: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 16px; font-size: 21px; font-weight: 800; }
.card p { margin-top: 6px; color: var(--muted); }

/* Section sombre : s'agrandit en entrant, le titre s'allume mot par mot */
.section-ink {
  background: var(--ink); color: var(--cream);
  clip-path: inset(calc((1 - var(--p, 1)) * 36px) calc((1 - var(--p, 1)) * 5vw) round calc((1 - var(--p, 1)) * 48px));
}
.section-ink .eyebrow { color: #ff8b80; }
.section-ink .section-lead { color: #c9bfc7; }
.hw { opacity: clamp(.16, calc(var(--p, 1) * (var(--n, 1) + 1) - var(--w, 0)), 1); }
.compare {
  max-width: 820px; margin: 0 auto; border-radius: var(--radius);
  background: #211b26; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); overflow: hidden;
}
.compare table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 15px 12px; text-align: left; vertical-align: top; }
.compare thead th { font: 800 17px var(--font-display); letter-spacing: -0.02em; color: #c9bfc7; }
.compare tbody tr + tr th, .compare tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, .07); }
.compare tbody th { font-weight: 600; color: #a99fa8; width: 30%; }
.compare tbody td { color: #c9bfc7; }
.compare .col-us { background: rgba(255, 74, 61, .12); color: var(--paper); font-weight: 600; }
.compare thead .col-us { color: var(--red); }

/* Tarifs */
.plans { display: grid; gap: 16px; max-width: 980px; margin: 0 auto; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 22px 22px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.plan h3 { font-size: 20px; font-weight: 700; }
.price { margin-top: 8px; font: 800 44px/1 var(--font-display); letter-spacing: -0.045em; }
.price small { font-size: 17px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.plan-desc { margin: 12px 0 22px; color: var(--muted); flex: 1; }
.plan-featured { background: var(--ink); color: var(--cream); }
.plan-featured .plan-desc, .plan-featured .price small { color: #c9bfc7; }
.plan-badge {
  position: absolute; top: -12px; left: 22px; z-index: 1; padding: 5px 12px; border-radius: 999px;
  background: var(--red); color: var(--paper); font-size: 12px; font-weight: 700;
}
.fineprint { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: 20px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s;
}
.faq details[open] { background: var(--sand); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; cursor: pointer; list-style: none;
  font: 700 17px/1.3 var(--font-display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%2316121a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: var(--shadow); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

/* CTA final : grandit en arrivant */
.final { padding-top: 0; }
.final-panel {
  position: relative; overflow: hidden; isolation: isolate;
  text-align: center; padding: 52px 12px; border-radius: 34px;
  background: #ffe9dc;
  transform: scale(calc(.88 + var(--p, 1) * .12));
}
.final-panel .blob-1 { width: 340px; height: 340px; left: -120px; top: -140px; background: #ffb59c; }
.final-panel .blob-2 { width: 320px; height: 320px; right: -110px; top: auto; bottom: -150px; background: #b9eccf; }
.final-panel h2 { font-size: clamp(2.1rem, 7.5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.final-panel > p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }

/* Pied de page + grand logo qui remonte */
.footer { padding: 40px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); overflow: hidden; }
.footer-inner { display: grid; gap: 14px; justify-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.footer-links a:hover { text-decoration: underline; }
.footer-mark {
  margin: 28px 0 0; padding-bottom: 90px; text-align: center; user-select: none;
  font: 800 clamp(3.6rem, 18.5vw, 13rem)/.8 var(--font-display); letter-spacing: -0.06em;
  background: linear-gradient(180deg, #f3d7c8, var(--cream) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(calc((1 - var(--p, 1)) * 45%));
}

/* Barre collante */
.dock {
  position: fixed; z-index: 30; left: 0; right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  padding: 0 12px; pointer-events: none;
  transform: translateY(150%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.dock.is-visible { transform: none; pointer-events: auto; }
.search-dock { margin: 0 auto; }
.search-dock input { height: 46px; }
.search-dock .btn { height: 46px; padding: 0 18px; }

/* Fenêtre liste d'attente */
.sheet {
  width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 0; border-radius: 28px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
}
.sheet::backdrop { background: rgba(22, 18, 26, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet[open] { animation: pop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--sand); color: var(--ink);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.sheet-body { padding: 34px 24px 24px; text-align: center; }
.sheet-ico {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
  background: var(--ink); transform: rotate(-6deg);
}
.sheet-ico svg { width: 30px; height: 30px; fill: var(--red); color: var(--paper); }
.sheet-ico.is-green { background: var(--green); }
.sheet-ico.is-green svg { fill: none; color: var(--paper); }
.sheet h2 { margin-top: 16px; font-size: 28px; font-weight: 800; letter-spacing: -0.035em; }
.sheet-lead { margin: 10px 0 20px; color: var(--muted); }
.sheet-lead b { color: var(--ink); }
.field {
  width: 100%; height: 54px; padding: 0 18px; margin-bottom: 10px;
  border: 0; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line);
  font: 500 17px var(--font-body); color: var(--ink); outline: none;
}
.field:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.field[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--red-ink); }
.fine { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.fine a { font-weight: 600; }
.btn[aria-busy="true"] { opacity: .65; pointer-events: none; }

/* ---------- Animations ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes flag-in { from { opacity: 0; transform: translateX(-16px) scale(.97); } }

/* Entrée du haut de page, en cascade */
.enter { animation: rise .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
.hl { animation: stamp .7s cubic-bezier(.34, 1.56, .64, 1) backwards .6s; }
@keyframes stamp { from { opacity: 0; transform: rotate(-16deg) scale(1.9); } }

/* Apparition au défilement */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-in {
  opacity: 1;
  animation: rise .75s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
/* Les titres : le bloc apparaît en fondu, les mots montent un par un */
.js .section-head.is-in { animation-name: fade; }
.js .is-in .split-word > span {
  animation: word-up .8s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--w, 0) * 65ms + 120ms);
}
@keyframes word-up { from { transform: translateY(110%) rotate(6deg); } }
/* Les cartes basculent en 3D */
.js .card.is-in { animation-name: flip-in; animation-duration: .9s; }
@keyframes flip-in { from { opacity: 0; transform: perspective(900px) rotateX(32deg) translateY(70px) scale(.92); } }
/* Les offres arrivent en zoom */
.js .plan.is-in { animation-name: zoom-in; }
@keyframes zoom-in { from { opacity: 0; transform: translateY(40px) scale(.86); } }

/* Rapport d'exemple : scan, jauge, flags un par un */
.report-scan { position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden; pointer-events: none; }
.report-scan span {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 74, 61, 0) 0 78%, rgba(255, 74, 61, .10) 94%, rgba(255, 74, 61, .65) 100%);
  transform: translateY(-100%); opacity: 0;
  animation: laser 3.8s cubic-bezier(.45, 0, .55, 1) infinite 2s;
}
@keyframes laser {
  0% { transform: translateY(-100%); opacity: 0; }
  8% { opacity: 1; }
  60% { transform: translateY(0); opacity: 1; }
  70%, 100% { transform: translateY(0); opacity: 0; }
}
.meter span { animation: fill 1.3s cubic-bezier(.2, .8, .2, 1) backwards .9s; }
@keyframes fill { from { width: 0; } }
.flags .flag { animation: flag-in .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 170ms + 1.05s); }
.advice { animation: flag-in .55s cubic-bezier(.2, .8, .2, 1) backwards 1.8s; }

/* Chiffres : petit rebond quand ils arrivent */
.stat-num.is-done, .score.is-done { animation: bump .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bump { 50% { transform: scale(1.14); } }

/* Survol : les cartes et les offres s'inclinent vers la souris */
.card, .plan {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.card::after, .plan::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.plan-featured::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .14), transparent 60%); }
@media (hover: hover) {
  .card:hover, .plan:hover { --lift: -6px; box-shadow: var(--shadow-lg); }
  .card:hover::after, .plan:hover::after { opacity: 1; }
  .card:hover .card-ico { animation: wiggle .5s ease; }
}
@keyframes wiggle {
  25% { transform: rotate(-10deg) scale(1.1); }
  75% { transform: rotate(8deg) scale(1.1); }
}

/* Reflet qui passe sur les boutons principaux */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .3) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shine 3.6s ease-in-out infinite 2.4s;
}
@keyframes shine {
  0% { transform: translateX(-100%); }
  35%, 100% { transform: translateX(100%); }
}

/* Offre mise en avant : halo qui respire */
.plan-featured { animation: glow 3.2s ease-in-out 1s infinite; }
.js .plan-featured[data-reveal].is-in {
  animation: zoom-in .75s cubic-bezier(.2, .8, .2, 1) backwards calc(var(--i, 0) * 90ms), glow 3.2s ease-in-out 1s infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(255, 74, 61, 0); }
  50% { box-shadow: var(--shadow), 0 22px 60px -14px rgba(255, 74, 61, .55); }
}

/* Comparatif : lignes une par une */
.js .compare tbody tr { opacity: 0; }
.js .compare.is-in tbody tr { opacity: 1; animation: row-in .5s ease-out backwards; }
.js .compare.is-in tbody tr:nth-child(1) { animation-delay: .3s; }
.js .compare.is-in tbody tr:nth-child(2) { animation-delay: .42s; }
.js .compare.is-in tbody tr:nth-child(3) { animation-delay: .54s; }
.js .compare.is-in tbody tr:nth-child(4) { animation-delay: .66s; }
.js .compare.is-in tbody tr:nth-child(5) { animation-delay: .78s; }
@keyframes row-in { from { opacity: 0; transform: translateX(-14px); } }

/* FAQ */
.faq details[open] p { animation: faq-in .35s ease-out; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Tablette et ordinateur ---------- */
@media (min-width: 720px) {
  .wrap { padding: 0 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 48px; padding-bottom: 48px; }
  .compare { font-size: 15px; }
  .compare th, .compare td { padding: 18px 22px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .logo:not(.logo-sm) { font-size: 25px; }
  .hero { padding: calc(var(--nav-h) + 64px) 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .hero-copy { text-align: left; }
  .hero h1, .lead { margin-left: 0; }
  .hero .search { margin-left: 0; }
  .checks { justify-content: flex-start; }
  .report { transform: rotate(1.5deg); }
  .sticker-red { right: -18px; }
  .sticker-green { left: -14px; }
  .demo-grid {
    grid-template-columns: 1fr 1fr; grid-template-areas: "head stage" "steps stage";
    column-gap: 72px; row-gap: 28px; align-items: start;
  }
  .demo-head { grid-area: head; align-self: end; margin: 0; text-align: left; }
  .demo-stage { grid-area: stage; align-self: center; }
  .demo-steps { grid-area: steps; }
  .phone { width: 290px; height: 596px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .section { padding: 112px 0; }
  .final { padding-top: 0; }
  .final-panel { padding: 80px 40px; }
}

@media (max-width: 400px) {
  .search .btn .ico { display: none; }
}
@media (max-width: 359px) {
  .search .btn { padding: 0 14px; }
  .search-at { padding-left: 10px; }
  .phone { width: 256px; height: 530px; }
}

/* ---------- Mode calme ----------
   L'appareil demande moins d'animations (réglage système) : on garde les fondus,
   les chiffres, le texte qui s'écrit et la démo, on coupe les grands mouvements.
   Ajouter ?anim à l'adresse affiche la version complète. */
.calm { scroll-behavior: auto; }
.calm [data-scroll] { --p: 1 !important; }
.calm .hero[data-scroll] { --p: 0 !important; }
.calm .marquee { transform: none; overflow-x: auto; scrollbar-width: none; }
.calm .blob, .calm .sticker, .calm .marquee-track, .calm .btn-shine::after { animation: none; }
.calm .report-scan { display: none; }
.calm .enter, .calm [data-reveal].is-in, .calm .flags .flag, .calm .advice,
.calm .compare.is-in tbody tr, .calm .hl, .calm .faq details[open] p,
.calm .is-in .split-word > span { animation-name: fade; }
.calm .hero .search { animation: fade .8s ease-out backwards .35s, attention 1.6s ease-out 1.6s 2; }
.calm .hero .search.is-nudged { animation: nudge .4s; }
.calm .plan-featured[data-reveal].is-in { animation-name: fade, glow; }
.calm .screen { transform: none; }
