:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-50: #eef2ff;
  --accent: #0d9488;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --todo: #b45309;
  --todo-bg: #fef3c7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #818cf8; --brand-600: #6366f1; --brand-50: #1e1b4b; --accent: #2dd4bf;
    --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --line: #1e293b;
    --bg: #0b1120; --bg-soft: #0f172a; --card: #111a2e; --todo: #fbbf24; --todo-bg: #3a2a06;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.todo { background: var(--todo-bg); color: var(--todo); border-radius: 4px; padding: 0 .25em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 10px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .25); }
.btn-primary:hover { background: var(--brand-600); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: .55em 1em; font-size: .92rem; }
.btn-block { width: 100%; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55em; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.08rem; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current] { color: var(--brand); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }
@media (max-width: 920px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; }
  .nav-open .nav-links { display: flex; }
}

/* Sections */
section { padding: 84px 0; }
.soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .8em; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Hero */
.hero { padding: 88px 0 72px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-50), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .95rem; }
.ticks li::before, .check-list li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: .5em; }
.hero-visual { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.term { font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; background: #0f172a; color: #cbd5e1; border-radius: 10px; padding: 16px 18px; overflow-x: auto; }
.term .g { color: #5eead4; } .term .p { color: #a5b4fc; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.meter { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.meter b { display: block; color: var(--ink); font-size: 1.15rem; }
.meter span { font-size: .8rem; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

/* Grilles & cartes */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { color: var(--muted); margin: 0; }
.card a.more { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }
.icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 5px 0; }

/* Tarifs */
.cycle-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--card); margin-bottom: 36px; }
.cycle-toggle button { border: 0; background: none; padding: .55em 1.2em; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.cycle-toggle button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.save { font-size: .75rem; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan .tag { position: absolute; top: -13px; left: 30px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan .desc { color: var(--muted); min-height: 3em; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; margin: 8px 0 2px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-note { font-size: .82rem; color: var(--muted); margin-bottom: 20px; }
.plan .check-list { flex: 1; margin-bottom: 24px; font-size: .95rem; }

/* Tableau */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .95rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--ink); background: var(--bg-soft); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Étapes */
.steps { counter-reset: s; }
.step { position: relative; padding-left: 0; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 20px; margin-bottom: 12px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
details[open] summary::after { content: "–"; }
details > div { padding-bottom: 18px; color: var(--muted); }

/* CTA */
.cta { background: linear-gradient(135deg, var(--brand), #312e81); color: #e0e7ff; border-radius: 22px; padding: 56px; text-align: center; }
.cta h2 { color: #fff; }
.cta .btn-primary { background: #fff; color: #312e81; box-shadow: none; }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
@media (max-width: 640px) { .cta { padding: 36px 22px; } }

/* Page intérieure & pages légales */
.page-hero { padding: 64px 0 40px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 720px; }
.legal { padding: 56px 0 80px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; padding-top: .4em; scroll-margin-top: 80px; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: .35em; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 28px; }
.toc ol { margin: 0; columns: 2; font-size: .93rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.box { border-left: 4px solid var(--brand); background: var(--brand-50); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.2em 0; }
.box.warn { border-color: #d97706; background: var(--todo-bg); }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; color: var(--ink); font-size: .93rem; }
.form input, .form select, .form textarea {
  font: inherit; padding: .75em .9em; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.check { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .92rem; color: var(--text) !important; margin: 10px 0; }
.check input { margin-top: 4px; flex: none; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-top: 56px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; color: var(--text); text-decoration: none; font-size: .93rem; padding: 4px 0; }
.footer-grid a:not(.brand):hover { color: var(--brand); }
.footer-grid .brand { margin-bottom: 12px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 0; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Cookies */
.cookie-banner { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.18); padding: 20px 22px; display: grid; gap: 14px; }
.cookie-banner p { margin: 0; font-size: .93rem; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-actions .btn { min-width: 150px; }

/* Modale commande */
.order-modal { border: 0; border-radius: 18px; padding: 0; width: min(520px, 100% - 32px); background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.order-modal::backdrop { background: rgba(15, 23, 42, .55); }
.order-form { padding: 28px; }
.order-sum { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: 14px; color: var(--ink); }
.order-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.notice { background: var(--todo-bg); color: var(--todo); padding: 10px 14px; border-radius: 10px; font-size: .9rem; }

/* Additions (English site) */
.nav-login { font-weight: 600 !important; }
.plans.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .plans.four { grid-template-columns: repeat(2, 1fr); max-width: none; } }
@media (max-width: 640px) { .plans.four { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.stat { text-align: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stat b { display: block; font-size: 1.6rem; color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: .88rem; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: .85rem; font-weight: 600; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 8px; vertical-align: middle; }
.from { font-size: .95rem; color: var(--muted); }
.from b { color: var(--ink); font-size: 1.2rem; }
.kb-article { scroll-margin-top: 90px; }

/* Animated hero word */
.rotator {
  display: inline-block; white-space: nowrap;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
.rotator.out { animation: shine 6s linear infinite, wordOut .35s ease-in forwards; }
.rotator.in { animation: shine 6s linear infinite, wordIn .45s cubic-bezier(.2,.8,.2,1) forwards; }
.rotator::after { content: ""; display: inline-block; width: 3px; height: .9em; margin-left: 4px; vertical-align: -.08em; background: var(--accent); border-radius: 2px; animation: blink 1s steps(1) infinite; }
@keyframes shine { to { background-position: 200% center; } }
@keyframes wordOut { to { opacity: 0; transform: translateY(-.35em); filter: blur(4px); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(.35em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rotator, .rotator.in, .rotator.out, .rotator::after { animation: none; } }

/* Client area auth pages */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 56px 16px; background: radial-gradient(900px 400px at 50% -10%, var(--brand-50), transparent 70%), var(--bg-soft); }
.auth-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 36px 32px; }
.auth-card h1 { font-size: 1.7rem; margin: 6px 0 4px; }
.auth-card .eyebrow { margin-bottom: 0; }
.auth-sub { color: var(--muted); margin-bottom: 24px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth-row .check { margin: 0; }
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--brand); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 6px; }
.auth-links { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: .93rem; display: grid; gap: 8px; }
.auth-links p { margin: 0; }
@media (max-width: 480px) { .auth-card { padding: 28px 20px; } }
