/* Budease — landing. Tokens repris du design system de l'app (OKLCH), aucune valeur arbitraire hors-thème. */

/* Inter variable auto-hébergée (RGPD : pas d'appel Google Fonts) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  /* Marque (alignés src/styles.css de l'app) */
  --background: oklch(1 0 0);
  --foreground: oklch(0.129 0.042 264.695);
  --card: oklch(1 0 0);
  --muted: oklch(0.968 0.007 247.896);
  --muted-foreground: oklch(0.505 0.046 257.417); /* assombri vs app (0.554) : AA 4.5:1 sur --muted */
  --border: oklch(0.929 0.013 255.508);
  --primary: oklch(0.208 0.042 265.755);
  --primary-foreground: oklch(0.984 0.003 247.858);

  /* Familles sémantiques (catégories de l'app) */
  --income: oklch(0.62 0.16 152);
  --income-soft: oklch(0.95 0.05 152);
  --needs: oklch(0.5 0.09 250);
  --needs-soft: oklch(0.96 0.025 250);
  --wants: oklch(0.55 0.13 350);
  --wants-soft: oklch(0.96 0.03 350);
  --savings: oklch(0.49 0.11 180); /* assombri vs app (0.55) : AA 4.5:1 sur --savings-soft */
  --savings-soft: oklch(0.95 0.04 180);
  --success: oklch(0.62 0.14 158);
  --warning: oklch(0.7 0.15 70);
  --danger: oklch(0.66 0.17 20);
  --info: oklch(0.7 0.1 240);

  --radius: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px oklch(0.129 0.042 264.695 / 0.06);
  --shadow-md: 0 8px 30px oklch(0.129 0.042 264.695 / 0.08);
  --shadow-lg: 0 24px 60px oklch(0.129 0.042 264.695 / 0.12);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip rogne sans créer de conteneur de scroll : le body volait le défilement de la page,
     cassant scroll fluide et ancres (le menu Tarifs atterrissait une section trop haut) */
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
section { padding-block: clamp(3.5rem, 8vw, 7rem); }
/* Ancres du menu : compense le header sticky pour atterrir en haut de la section visée */
section[id] { scroll-margin-top: 4.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--needs); background: var(--needs-soft);
  padding: 0.35rem 0.75rem; border-radius: 999px;
}

/* ---------- Onglets persona (hero) : 1 cible = 1 URL ?pour=… ---------- */
.persona-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.persona-tab {
  font-size: 0.8125rem; font-weight: 600; line-height: 1;
  padding: 0.6rem 0.95rem; border-radius: 999px;
  color: var(--muted-foreground); background: var(--muted);
  border: 1px solid var(--border); text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.persona-tab:hover { color: var(--foreground); transform: translateY(-1px); }
.persona-tab[aria-current="true"] {
  background: var(--primary); color: var(--primary-foreground); border-color: var(--primary);
}

.section-head { max-width: 42rem; margin-inline: auto; text-align: center; margin-bottom: 3rem; }
.section-head-tight { margin-bottom: 0; }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin-block: 0.75rem; }
.section-head p { color: var(--muted-foreground); font-size: 1.075rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.35rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  will-change: transform;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn-ghost:hover { background: var(--muted); transform: translateY(-1px); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.0625rem; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(12px);
  background: oklch(1 0 0 / 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
header.nav.scrolled { border-bottom-color: var(--border); background: oklch(1 0 0 / 0.86); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand .logo { width: 1.85rem; height: 1.85rem; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { color: var(--muted-foreground); font-size: 0.925rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--foreground); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
@media (max-width: 800px) { .nav-links { display: none; } }
@media (max-width: 560px) { .nav-cta .btn-ghost { display: none; } .brand { font-size: 1.05rem; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.aurora {
  position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -1;
  background:
    radial-gradient(40% 50% at 18% 12%, oklch(0.62 0.16 152 / 0.18), transparent 70%),
    radial-gradient(38% 45% at 82% 8%, oklch(0.55 0.11 180 / 0.20), transparent 70%),
    radial-gradient(45% 50% at 60% 35%, oklch(0.5 0.09 250 / 0.16), transparent 70%),
    radial-gradient(35% 40% at 30% 45%, oklch(0.55 0.13 350 / 0.12), transparent 70%);
  filter: blur(8px); animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(0,-3%,0) scale(1.06); } }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.85rem); }
.hero h1 .grad { background: linear-gradient(100deg, var(--needs), var(--savings) 45%, var(--income)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 1.25rem; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted-foreground); max-width: 34rem; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.hero-note { margin-top: 1.1rem; font-size: 0.85rem; color: var(--muted-foreground); display: flex; gap: 1.1rem; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: var(--success); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { order: -1; } }

/* ---------- Mockups produit (visuels CSS, tokens réels) ---------- */
.device {
  position: relative; border-radius: var(--radius-xl); background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg); transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}
.hero-visual:hover .device { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.device-bar { display: flex; gap: 0.4rem; padding: 0.7rem 0.9rem; background: var(--muted); border-bottom: 1px solid var(--border); }
.device-bar i { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--border); }
.device-body { padding: 1.1rem; display: grid; gap: 0.9rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.kpi { padding: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.kpi .lbl { font-size: 0.7rem; color: var(--muted-foreground); font-weight: 600; }
.kpi .val { font-size: 1.25rem; font-weight: 700; margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.kpi.in .val { color: var(--income); }
.kpi.out .val { color: var(--danger); }
.kpi.net .val { color: var(--needs); }
.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; }
.panel-title { font-size: 0.8rem; color: var(--muted-foreground); margin-bottom: 0.7rem; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 0.55rem; height: 90px; }
.bars .bar { flex: 1; border-radius: 5px 5px 0 0; background: var(--needs); transform: scaleY(0); transform-origin: bottom; transition: transform 1s var(--ease); }
.bars .bar:nth-child(2) { background: var(--wants); }
.bars .bar:nth-child(3) { background: var(--savings); }
.bars .bar:nth-child(4) { background: var(--income); }
.bars .bar:nth-child(5) { background: var(--needs); }
.bars .bar:nth-child(6) { background: var(--wants); }
.ring-wrap { display: flex; align-items: center; gap: 1rem; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 999px; flex: none;
  background: conic-gradient(var(--income) calc(var(--p) * 1%), var(--muted) 0);
  display: grid; place-items: center; transition: --p 1.1s var(--ease); }
.ring::after { content: ""; width: 58px; height: 58px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
.ring-legend { display: grid; gap: 0.45rem; font-size: 0.78rem; }
.ring-legend span { display: flex; align-items: center; gap: 0.45rem; color: var(--muted-foreground); }
.ring-legend i { width: 0.6rem; height: 0.6rem; border-radius: 3px; }
.lg-needs { background: var(--needs); }
.lg-wants { background: var(--wants); }
.lg-savings { background: var(--savings); }

/* badge devises flottant sur le hero */
.fx-badge {
  position: absolute; right: -0.6rem; bottom: 1.5rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 0.7rem 0.9rem; display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.85rem;
  animation: float 5s ease-in-out infinite;
}
.fx-badge .chip { font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 0.4rem; background: var(--savings-soft); color: var(--savings); font-weight: 700; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- Bandeau banques ---------- */
.banks { padding-block: 1.5rem; }
.banks-label { text-align: center; color: var(--muted-foreground); font-size: 0.85rem; font-weight: 600; margin-bottom: 1.25rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: scroll 28s linear infinite; opacity: 0.75; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-weight: 700; color: var(--muted-foreground); font-size: 1.05rem; white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 880px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: oklch(0.5 0.09 250 / 0.4); }
.feature .ficon { width: 2.75rem; height: 2.75rem; border-radius: 0.85rem; display: grid; place-items: center; margin-bottom: 1rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.feature p { color: var(--muted-foreground); font-size: 0.95rem; }
.i-needs { background: var(--needs-soft); color: var(--needs); }
.i-income { background: var(--income-soft); color: var(--income); }
.i-savings { background: var(--savings-soft); color: var(--savings); }
.i-wants { background: var(--wants-soft); color: var(--wants); }

/* ---------- Showcase (grandes captures) ---------- */
.showcase { display: grid; gap: 2.5rem; }
.shot { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.shot:nth-child(even) .shot-text { order: 2; }
.shot-text .eyebrow { margin-bottom: 1rem; }
.shot-text h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.75rem; }
.shot-text p { color: var(--muted-foreground); font-size: 1.02rem; }
.shot-text ul { list-style: none; margin-top: 1rem; display: grid; gap: 0.5rem; }
.shot-text li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.shot-text li svg { flex: none; margin-top: 0.15rem; color: var(--success); }
.shot-media { position: relative; }
.screenshot-slot {
  border: 1px dashed var(--border); border-radius: var(--radius-lg); aspect-ratio: 16/10;
  display: grid; place-items: center; color: var(--muted-foreground); font-size: 0.85rem; background: var(--muted);
}
.screenshot { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
@media (max-width: 880px) { .shot { grid-template-columns: 1fr; } .shot:nth-child(even) .shot-text { order: 0; } }

/* Sankey mini animé */
.sankey { width: 100%; height: auto; }
.sankey path { fill: none; stroke-width: 10; opacity: 0.55; stroke-linecap: round; }
.sankey .flow { stroke-dasharray: 1; stroke-dashoffset: 1; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.75rem; border-radius: var(--radius-lg); background: var(--muted); }
.step .num { width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; font-weight: 700; margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted-foreground); font-size: 0.95rem; }

/* ---------- Trust ---------- */
.trust { background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius-xl); padding: clamp(2rem, 5vw, 3.5rem); }
.trust .section-head h2 { color: var(--primary-foreground); }
.trust .section-head p { color: oklch(0.984 0.003 247.858 / 0.7); }
.eyebrow-inverse { background: oklch(0.984 0.003 247.858 / 0.12); color: var(--primary-foreground); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-item { text-align: center; }
.trust-item .tic { width: 3rem; height: 3rem; margin: 0 auto 0.75rem; border-radius: 0.85rem; display: grid; place-items: center; background: oklch(0.984 0.003 247.858 / 0.1); color: var(--primary-foreground); }
.trust-item h3 { font-size: 0.98rem; margin-bottom: 0.25rem; }
.trust-item p { font-size: 0.84rem; color: oklch(0.984 0.003 247.858 / 0.65); }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; max-width: 760px; margin-inline: auto; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; background: var(--card); }
.price-card.feat { border-color: var(--needs); box-shadow: var(--shadow-md); position: relative; }
.price-card.feat::before { content: "Beta · gratuit"; position: absolute; top: -0.8rem; left: 2rem; background: var(--needs); color: var(--primary-foreground); font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; }
.price-card h3 { font-size: 1.2rem; }
.price-card .amount { font-size: 2.4rem; font-weight: 800; margin-block: 0.6rem 0.1rem; letter-spacing: -0.03em; }
.price-card .amount small { font-size: 0.95rem; font-weight: 500; color: var(--muted-foreground); }
.price-card .sub { color: var(--muted-foreground); font-size: 0.9rem; margin-bottom: 1.25rem; }
.price-card ul { list-style: none; display: grid; gap: 0.6rem; margin-bottom: 1.5rem; }
.price-card li { display: flex; gap: 0.55rem; font-size: 0.92rem; align-items: flex-start; }
.price-card li svg { flex: none; margin-top: 0.15rem; color: var(--success); }
.price-card .btn { width: 100%; justify-content: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 0.6rem; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform 0.25s var(--ease); flex: none; color: var(--muted-foreground); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .ans { padding: 0 1.25rem 1.2rem; color: var(--muted-foreground); font-size: 0.95rem; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .card { background: linear-gradient(135deg, var(--needs-soft), var(--savings-soft) 50%, var(--income-soft)); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-final p { color: var(--muted-foreground); margin-block: 0.85rem 1.75rem; font-size: 1.075rem; }
.cta-final .cta-actions { margin-top: 1.25rem; }
.cta-final .cta-note { font-size: 0.85rem; margin-top: 0.75rem; }
.cta-final .cta-legal { font-size: 0.8rem; margin-top: 1rem; }
.link-u { text-decoration: underline; }

/* ---------- Footer ---------- */
footer.foot { border-top: 1px solid var(--border); padding-block: 3rem; }
.foot-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: center; }
.foot .brand { margin-bottom: 0.5rem; }
.foot-meta { color: var(--muted-foreground); font-size: 0.85rem; max-width: 22rem; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot-links a { color: var(--muted-foreground); font-size: 0.9rem; }
.foot-links a:hover { color: var(--foreground); }
.foot-copy { color: var(--muted-foreground); font-size: 0.8rem; margin-top: 1.5rem; }

/* ---------- Animations d'apparition (JS-driven) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* Accessibilité : on coupe tout mouvement si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .device { transform: none; }
  .bars .bar { transform: scaleY(1); }
}
