/* Aneonymat — design system "light premium" */
:root {
  --white: #ffffff;
  --bg-alt: #f7f8fa;
  --navy-900: #0f1e3d;
  --navy-800: #1a2b4a;
  --accent: #2e5bff;
  --accent-hover: #2249d8;
  --accent-soft: #eef2ff;
  --success: #12b76a;
  --success-soft: #ecfdf3;
  --warn: #f79009;
  --warn-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --text: #101828;
  --muted: #475467;
  --line: #eaecf0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.04);
  --shadow-md: 0 4px 16px rgba(16,24,40,.06), 0 2px 6px rgba(16,24,40,.04);
  --shadow-lg: 0 18px 48px rgba(15,30,61,.10), 0 6px 16px rgba(16,24,40,.05);
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--white); line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }

/* Nav */
/* ---- Barre de navigation foncée (premium) ---- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; height: 66px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.24rem; letter-spacing: -.03em; color: #fff; display: inline-flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.brand-logo { display: block; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; flex-wrap: nowrap; }
.nav-links > * { margin-left: 22px; }
.nav-links > *:first-child { margin-left: 0; }
.nav-links a { color: #cbd5e1; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-auth { display: inline-flex; align-items: center; }
.nav-auth > * { margin-left: 16px; }
.nav-auth > *:first-child { margin-left: 0; }
.nav-email { font-size: .85rem; color: #94a3b8; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* boutons dans la barre foncée */
.nav .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.nav .btn-ghost:hover { border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.08); color: #fff; box-shadow: none; }
/* sélecteur de langue (liens) */
.lang-switch { display: inline-flex; align-items: center; gap: 1px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 2px; flex-shrink: 0; }
.lang-switch a { font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #94a3b8; padding: 4px 7px; border-radius: 6px; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { color: #fff; background: var(--accent); }
@media (max-width: 980px) { .nav-links .hide-sm { display: none; } }
@media (max-width: 560px) { .nav-inner { gap: 12px; } .nav-links > * { margin-left: 12px; } .nav-auth > * { margin-left: 9px; } .lang-switch a { padding: 4px 5px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--font); font-weight: 600; font-size: .96rem; padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all .16s ease; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: #d0d5dd; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-800); color: #fff; transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Hero */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1200px 400px at 50% -120px, rgba(46,91,255,.07), transparent 70%),
  linear-gradient(180deg, #fbfcff 0%, #ffffff 60%); z-index: -1; }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero .lead { font-size: 1.22rem; max-width: 62ch; margin: 1.2rem auto 2rem; color: var(--muted); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }

/* Trust badges */
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 40px; }
.badge { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: .88rem; font-weight: 500; color: var(--navy-800); box-shadow: var(--shadow-sm); }

/* Grid & cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow-md); }
.icon-badge { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.icon-badge svg { width: 22px; height: 22px; }
.step-num { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--accent); background: var(--accent-soft); width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }

/* Section heading */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.sec-head p { font-size: 1.06rem; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 980px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative; }
.price-card.popular { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.price-card.popular::after { content: "Populaire"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; letter-spacing: .02em; }
.price-name { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.price-amt { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 2px; }
.price-amt small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price-feat { list-style: none; padding: 0; margin: 20px 0; flex: 1; }
.price-feat li { display: flex; gap: .6rem; align-items: flex-start; padding: 7px 0; font-size: .92rem; color: var(--navy-800); }
.price-feat svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* Forms */
.field { margin-bottom: 18px; text-align: left; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy-800); margin-bottom: 7px; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; font-family: var(--font); font-size: .98rem; color: var(--text);
  background: #fff; border: 1px solid #d0d5dd; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-wrap { max-width: 440px; margin: 64px auto; padding: 40px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }

/* Dropzone */
.drop { border: 2px dashed #cfd6e4; border-radius: var(--radius); padding: 48px 24px; text-align: center; background: var(--bg-alt); transition: all .18s ease; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }

/* Entity review list */
.entity { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 10px; transition: border-color .15s; }
.entity:hover { border-color: #d0d5dd; }
.entity input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.tag { font-family: var(--font-head); font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); letter-spacing: .02em; }
.token-chip { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82rem; background: var(--navy-900); color: #fff; padding: 3px 8px; border-radius: 6px; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: .92rem; margin: 14px 0; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: var(--success-soft); color: #05603a; }
.alert-warn { background: var(--warn-soft); color: #b54708; }
.alert-danger { background: var(--danger-soft); color: #912018; }
.alert-info { background: var(--accent-soft); color: #1e40af; }

/* Stat tiles */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--font-head); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.stat .l { font-size: .86rem; color: var(--muted); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Steps container */
.steps { counter-reset: s; }

/* Footer */
.footer { background: var(--navy-900); color: #cdd5e4; padding: 64px 0 32px; }
.footer a { color: #cdd5e4; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 820px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 5px 0; }
.footer-bot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #94a3b8; }

/* Legal / prose */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 2.2rem; margin-bottom: .3em; }
.prose h2 { font-size: 1.35rem; margin: 1.6em 0 .4em; }
.prose p, .prose li { color: #344054; }
.prose ul { padding-left: 1.2em; }
.prose code { background: var(--bg-alt); padding: 2px 6px; border-radius: 5px; font-size: .9em; }

/* ---- Responsive mobile ---- */
.respcol { display: grid; }
@media (max-width: 680px) {
  section { padding: 56px 0; }
  .container { padding: 0 18px; }
  .nav-inner { height: 60px; }
  .brand { font-size: 1.15rem; }
  .hero { padding: 60px 0 44px; }
  .hero .lead { font-size: 1.06rem; }
  .btn-lg { padding: 13px 20px; font-size: .98rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .sec-head { margin-bottom: 36px; }
  .card { padding: 22px; }
  .auth-wrap { margin: 32px 14px; padding: 26px 20px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bot { flex-direction: column; gap: 8px; }
  .price-amt { font-size: 2.1rem; }
  .respcol { grid-template-columns: 1fr !important; }
  .drop { padding: 34px 16px; }
  h1 { font-size: 2rem; }
}
@media (max-width: 400px) {
  .footer-cols { grid-template-columns: 1fr; }
  .nav-email { display: none; }
}

.hidden { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { opacity: 0; transform: translateY(12px); animation: reveal .6s ease forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---- Section démo produit (animation embarquée) ---- */
.demo-section { background: var(--navy-900); }
.demo-section .sec-head h2 { color: #fff; }
.demo-section .sec-head p { color: #cbd5e1; }
.demo-frame {
  position: relative; width: 100%; max-width: 1000px; margin-inline: auto;
  aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  background: #0a1730; border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.6), 0 8px 24px -12px rgba(0,0,0,.5);
}
.demo-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@supports not (aspect-ratio: 1) {
  .demo-frame { height: 0; padding-bottom: 56.25%; aspect-ratio: auto; }
}
@media (max-width: 680px) {
  .demo-frame { border-radius: 12px; }
}

/* ---- Nav mobile : évite le débordement horizontal (≤560px) ---- */
@media (max-width: 560px) {
  /* Logo seul (on masque le mot-symbole dans la barre, pas dans le footer) */
  .nav .brand-name { display: none; }
  /* CTA du nav redondant sur mobile (hero + footer l'ont déjà).
     Cible l'ancre uniquement -> ne masque pas le bouton Déconnexion (<button>) des connectés. */
  .nav-auth a.btn-primary { display: none; }
  /* Compacte les boutons restants (ex. Compte/Déconnexion en connecté) */
  .nav .btn { padding: 9px 14px; font-size: .9rem; }
  /* Masque « Tarifs » dans la barre (toujours présent dans le footer) */
  .nav-links > a:not(.hide-sm) { display: none; }
}
