/* ===== Jetons de design ===== */
:root {
  --navy-950: #06132a;
  --navy-900: #0b2140;
  --navy-800: #12305c;
  --blue-600: #2e6bff;
  --blue-500: #4b82ff;
  --blue-100: #e6eeff;
  --gold: #b79a5b;
  --gold-soft: #f4efe2;
  --paper: #ffffff;
  --mist: #f3f5f9;
  --line: #dce3ee;
  --ink: #0e1b2e;
  --muted: #566580;
  --ok: #17835b;   --ok-bg: #e4f5ee;
  --warn: #9a6408; --warn-bg: #fdf1dc;
  --bad: #b4322f;  --bad-bg: #fbe8e7;
  --info: #1d55c9; --info-bg: #e6eeff;
  --neutral: #4a5870; --neutral-bg: #eaeef4;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(11, 33, 64, .06), 0 8px 24px rgba(11, 33, 64, .07);
  --header-h: 68px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--navy-900); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 200; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ===== Boutons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .95rem/1 var(--sans); padding: 14px 22px; min-height: 46px; border-radius: var(--r-md); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .18s, border-color .18s, transform .18s, color .18s; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: #2358d6; }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-800); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-900); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { border-color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 9px 14px; min-height: 36px; font-size: .85rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-600); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Formulaires ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-weight: 700; font-size: .875rem; color: var(--navy-900); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .err { font-size: .8rem; color: var(--bad); min-height: 0; }
.input, select.input, textarea.input { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 110px; resize: vertical; }
.input:hover { border-color: #b9c5d8; }
.input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(46, 107, 255, .15); }
.input:user-invalid { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue-600); flex: none; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }   /* pot de miel anti-bot */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--blue-600) var(--fill, 0%), #d5dcea var(--fill, 0%)); outline-offset: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-600); box-shadow: 0 2px 8px rgba(11,33,64,.25); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-600); cursor: grab; }

/* ===== Badges & alertes ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--mist); font-size: .92rem; }
.alert.warn { background: var(--warn-bg); border-color: #f0d9a8; color: #5c3c04; }
.alert.bad { background: var(--bad-bg); border-color: #f0c4c2; color: #7d1f1d; }
.alert.ok { background: var(--ok-bg); border-color: #b9e3d2; color: #0d5a3d; }
.alert.info { background: var(--info-bg); border-color: #c3d5fb; color: #163e92; }
.alert svg { flex: none; margin-top: 2px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card.raised { box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-bottom: .4em; }

/* ===== En-tête du site ===== */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-900); font: 500 1.35rem/1 var(--serif); letter-spacing: -.01em; }
.logo svg { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 10px 12px; border-radius: var(--r-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue-600); background: var(--blue-100); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { font: inherit; font-size: .85rem; font-weight: 700; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; padding: 8px 8px; color: var(--navy-900); cursor: pointer; }
.burger { display: none; background: none; border: 1.5px solid var(--line); border-radius: var(--r-sm); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--navy-900); }
@media (max-width: 1020px) {
  .burger { display: inline-flex; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s; max-height: calc(100dvh - var(--header-h)); overflow: auto; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 1rem; }
  .header-actions .btn-ghost { display: none; }
}
main#app { padding-top: var(--header-h); min-height: 70vh; }
body.app-mode main#app { padding-top: 0; }
body.app-mode .site-header, body.app-mode .site-footer { display: none; }

/* ===== Hero ===== */
.hero { background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 85% 20%, rgba(46,107,255,.28), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(183,154,91,.14), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-block: 72px 88px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero .lead { color: #c5d2e8; }
.hero .cta { margin-top: 32px; }
.hero .trust { margin-top: 36px; display: flex; gap: 22px; flex-wrap: wrap; color: #9fb3d3; font-size: .875rem; }
.hero .trust span { display: inline-flex; gap: 8px; align-items: center; }
.hero .trust svg { color: var(--gold); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 44px 56px; gap: 36px; } }

.quote { background: #fff; color: var(--ink); border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.quote .figure { font: 500 clamp(2.8rem, 6vw, 3.9rem)/1 var(--serif); color: var(--navy-900); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.quote .figure small { font: 600 1rem var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.quote .kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; margin-top: 18px; border-top: 1px solid var(--line); }
.quote .kv dt { font-size: .75rem; color: var(--muted); }
.quote .kv dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.amount-line output { font: 700 1.05rem var(--sans); font-variant-numeric: tabular-nums; }
.disclaimer { font-size: .8rem; color: var(--muted); line-height: 1.5; margin-top: 14px; }

/* ===== Sections ===== */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.tint { background: var(--mist); }
.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.page-hero { background: var(--mist); padding-block: 56px 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .3em; }

.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rule-list li { display: grid; grid-template-columns: 44px 1fr 1.4fr; gap: 20px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rule-list .ico { color: var(--blue-600); }
.rule-list h3 { font: 700 1.05rem var(--sans); margin: 0; color: var(--navy-900); }
.rule-list p { margin: 0; color: var(--muted); }
@media (max-width: 720px) { .rule-list li { grid-template-columns: 36px 1fr; } .rule-list p { grid-column: 2; } }

.product-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; }
.product-card:hover { border-color: var(--blue-500); box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .pico { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; }
.product-card h3 { margin: 6px 0 0; }
.product-card p { color: var(--muted); font-size: .93rem; margin: 0; flex: 1; }
.product-card .range { font-size: .85rem; font-weight: 700; color: var(--navy-900); }

.steps { counter-reset: s; display: grid; gap: 0; grid-template-columns: repeat(4, 1fr); }
.steps li { list-style: none; position: relative; padding: 0 20px 0 0; }
.steps li::before { counter-increment: s; content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: #fff; font: 500 1.15rem var(--serif); margin-bottom: 16px; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 52px; right: 12px; border-top: 1px dashed #aab7cd; }
.steps li:last-child::after { display: none; }
.steps h3 { font: 700 1.02rem var(--sans); }
.steps p { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; gap: 28px; } .steps li::after { display: none; } }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy-900); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--serif); color: var(--blue-600); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); max-width: 70ch; }

.cta-band { background: var(--navy-900); color: #fff; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose li { margin-bottom: .4em; }

/* ===== Auth ===== */
.auth { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; background: var(--mist); }
.auth .card { width: min(100%, 480px); padding: 36px; box-shadow: var(--shadow); border: 0; }
.auth.wide .card { width: min(100%, 640px); }
.auth h1 { font-size: 2rem; }
.pw-meter { height: 4px; border-radius: 4px; background: #e2e8f2; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }

/* ===== Pied de page ===== */
.site-footer { background: var(--navy-950); color: #9fb3d3; padding-block: 56px 28px; font-size: .9rem; }
.site-footer h4 { font: 700 .9rem var(--sans); color: #fff; margin-bottom: 14px; }
.site-footer a { color: #c5d2e8; text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer .legal-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .8rem; line-height: 1.6; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ===== Toasts, modales, cookies ===== */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.toast { background: var(--navy-900); color: #fff; padding: 14px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: .92rem; animation: pop .2s ease-out; }
.toast.ok { background: var(--ok); } .toast.bad { background: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(92vw, 520px); box-shadow: 0 30px 80px rgba(6,19,42,.4); }
dialog::backdrop { background: rgba(6, 19, 42, .55); }
dialog .dlg { padding: 26px; }
dialog .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 250; max-width: 720px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(6,19,42,.25); padding: 20px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d5dcea; border-top-color: var(--blue-600); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px 0; }
.err-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.err-page .code { font: 500 clamp(4rem, 12vw, 8rem)/1 var(--serif); color: var(--blue-600); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.divider-space { height: 20px; }
.amount-input { width: 150px; text-align: right; font-weight: 700; padding: 8px 12px; min-height: 40px; }
.quote .field > label { font-size: .82rem; }
