:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --ink: #13233a;
  --muted: #5b6677;
  --line: #dde2ea;
  --brand: #1d3557;
  --brand-ink: #ffffff;
  --brand-soft: #e6ecf4;
  --amber: #d9603b;          /* accent terracotta (la tuile du toit) */
  --amber-soft: #fbe8e0;
  --accent-ink: #a8432a;
  --good: #2a7a52;
  --bad: #c23a2b;
  --bad-soft: #fbe5e2;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(19 35 58 / .06), 0 4px 16px rgb(19 35 58 / .05);
  --serif: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.6 var(--sans); }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.good { color: var(--good); }
.bad { color: var(--bad); }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 1.35rem var(--serif); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.logo svg { width: 30px; height: 30px; }

/* Boutons & formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); padding: 10px 18px; border-radius: 8px; font: 700 .95rem var(--sans);
  cursor: pointer; text-decoration: none; transition: transform .08s, background .15s; white-space: nowrap; }
.btn:hover { background: #142847; }
.btn:active { transform: translateY(1px); }
.btn.amber { background: var(--amber); color: #fff; }
.btn.amber:hover { background: #c2502d; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--bad); border-color: #efc5bd; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.linkbtn.bad { color: var(--bad); }

label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
input, select { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 42px; }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
input[type=checkbox] { width: auto; min-height: 0; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.grid-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.grid-form .wide { grid-column: span 2; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.25rem; }

/* Messages */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--amber-soft); color: #8a3b22; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
td input, td select { min-height: 36px; padding: 6px 10px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.revenu { background: #e2f1e7; color: var(--good); }
.pill.epargne { background: var(--amber-soft); color: var(--accent-ink); }
.pill.premium { background: var(--amber); color: #fff; }

.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.over > span { background: var(--bad); }
.bar.gold > span { background: var(--amber); }

/* ---------- Site public ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(244 246 249 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.site-header nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.site-header nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
@media (max-width: 640px) { .site-header nav .hide-sm { display: none; } }
/* Petits téléphones : libellé court du bouton d'en-tête (« Commencer gratuitement » débordait à 375 px) */
.site-header .show-xs { display: none; }
@media (max-width: 420px) { .site-header .hide-xs { display: none; } .site-header .show-xs { display: inline; } .site-header nav { gap: 14px; } }
@media (max-width: 350px) { .site-header .hide-xxs { display: none; } }

.hero { padding: 64px 0 40px; display: grid; gap: 40px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--accent-ink); background: var(--amber-soft); border-radius: 99px; padding: 4px 12px; font-size: .82rem; margin-bottom: 16px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } }

.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgb(19 35 58 / .14); padding: 18px; }
.mock .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.mock .kpi { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.mock .kpi b { display: block; font: 700 1.2rem var(--serif); }
.mock .line { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: .9rem; }

section.block { padding: 56px 0; }
section.alt { background: var(--surface-2); }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .ico { font-size: 1.6rem; margin-bottom: 8px; }
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.steps > div { counter-increment: s; }
.steps > div::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }

.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 28px; max-width: 820px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; position: relative; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font: 700 2.2rem var(--serif); }
.plan ul { padding: 0; list-style: none; margin: 16px 0 22px; }
.plan li { padding: 5px 0 5px 26px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.plan .tag { position: absolute; top: -12px; right: 20px; }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--muted); }

.auth { max-width: 420px; margin: 48px auto; padding: 0 16px; }
.prose { max-width: 760px; padding: 40px 16px 60px; margin: 0 auto; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* ---------- Application ---------- */
.app-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { margin: 0 8px 18px; }
.sidebar a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sidebar a.nav:hover { background: var(--surface-2); }
.sidebar a.nav.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.sidebar .bottom { margin-top: auto; }
.main { padding: 28px clamp(16px, 3vw, 40px) 100px; min-width: 0; max-width: 1150px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.8rem; margin: 0; }
.monthnav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.monthnav a { text-decoration: none; padding: 4px 10px; border-radius: 7px; color: var(--ink); }
.monthnav a:hover { background: var(--surface-2); }
.monthnav strong { padding: 0 8px; text-transform: capitalize; min-width: 9em; text-align: center; }

.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi-card .label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-card .value { font: 700 1.55rem var(--serif); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-card.hl { background: var(--brand); color: #fff; border-color: var(--brand); }
.kpi-card.hl .label { color: #cfdff0; }
.two-col { display: grid; gap: 16px; grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .two-col { grid-template-columns: 1fr; } }

.trial-banner { background: var(--amber-soft); color: #8a3b22; padding: 10px 16px; border-radius: 10px; margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.locked { text-align: center; padding: 40px 20px; }
.locked .ico { font-size: 2.4rem; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

.mobile-nav { display: none; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding-top: 16px; }
  .mobile-top { display: flex !important; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { text-align: center; text-decoration: none; color: var(--muted); font-size: .7rem; padding: 4px 0; }
  .mobile-nav a span { display: block; font-size: 1.25rem; }
  .mobile-nav a.active { color: var(--brand); font-weight: 700; }
  .grid-form .wide { grid-column: auto; }
}
.mobile-top { display: none; }

/* ---------- Pages de contenu (v2) ---------- */
.center { text-align: center; }
.h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.warn { color: #b2532f; }
.narrow { max-width: 860px; }
.page-hero { text-align: center; padding: 36px 0 28px; }
.page-hero.left { text-align: left; padding: 20px 0 20px; }
.page-hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 40em; margin-left: auto; margin-right: auto; }
.page-hero.left .lead { margin-left: 0; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }

.footer-grid { display: grid; gap: 24px; grid-template-columns: 1.4fr repeat(4, 1fr); align-items: start; }
.footer-grid h4 { margin: 0 0 8px; color: var(--ink); font-size: .9rem; }
.footer-grid a { display: block; padding: 3px 0; text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.mock .kpi.hl { background: var(--brand); color: #fff; }
.pains { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
.pain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pain .quote { font: 600 1.15rem/1.3 var(--serif); margin-bottom: 8px; }
.turn { margin-top: 28px; font-size: 1.15rem; font-weight: 600; color: var(--brand); max-width: 40em; }
.steps .pill { margin-top: 4px; }

table.compare th, table.compare td { text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare .us { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
table.compare thead .us { color: var(--brand); font-size: .85rem; }

a.link-card { color: inherit; text-decoration: none; transition: transform .1s, box-shadow .15s; }
a.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d8e8; }

.billing-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-top: 10px; }
.billing-toggle button { border: 0; background: transparent; font: 700 .9rem var(--sans); padding: 8px 16px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.billing-toggle button.active { background: var(--brand); color: #fff; }

/* Calculateurs */
.tool { margin-bottom: 24px; }
.calc fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.calc legend { font-weight: 700; margin-bottom: 8px; color: var(--brand); }
.result { margin-top: 18px; padding: 18px; background: var(--surface-2); border-radius: 12px; }
.result-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.result-grid > div { background: var(--surface); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.result-grid .label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.result-grid b { font: 700 1.35rem var(--serif); font-variant-numeric: tabular-nums; }
.result-grid .big b { font-size: 1.7rem; }
.result-grid .big.good b { color: var(--good); }
.result-grid .big.bad b { color: var(--bad); }
.result-grid .big.warn b { color: #b2532f; }
.stack-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin-bottom: 14px; background: var(--line); }
.stack-bar .seg0 { background: var(--brand); } .stack-bar .seg1 { background: var(--amber); } .stack-bar .seg2 { background: var(--good); }
.gain { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #e2f1e7; }

.cta-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--amber-soft);
  border: 1px solid #f3cdbd; border-radius: var(--radius); padding: 18px 20px; margin: 28px 0; }
.prose-content { font-size: 1.02rem; line-height: 1.7; }
.prose-content h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose-content li { margin-bottom: 6px; }
.related { padding: 32px 0 60px; }
.related h2 { font-size: 1.3rem; }

.download { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.download .dl-icon { font-size: 2.4rem; }
.download .btn { margin-left: auto; }
ul.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
ul.checklist li { padding: 5px 0 5px 28px; position: relative; }
ul.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

/* Prise en main (appli) */
.onboard { border: 2px solid var(--brand-soft); }
.onboard ol { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.onboard li { display: flex; gap: 10px; align-items: center; }
.onboard .tick { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; border: 2px solid var(--line); font-size: .75rem; flex: none; }
.onboard li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.onboard li.done span.txt { color: var(--muted); text-decoration: line-through; }
.progress-txt { font-size: .85rem; color: var(--muted); }

/* ---------- Ajout rapide (v5) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 820px) { .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); } }
.toast { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .2); animation: toast-in .2s ease-out; pointer-events: auto; }
.toast span { flex: 1; }
.toast.leaving { opacity: 0; transition: opacity .4s; }
.toast-action { background: none; border: 0; color: var(--amber); font: 700 .9rem var(--sans); cursor: pointer; padding: 4px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.mobile-menu { position: relative; }
.mobile-menu summary { list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 210px; display: grid; }
.mobile-menu-panel a, .mobile-menu-panel .linkbtn { padding: 10px 12px; text-decoration: none; color: var(--ink); text-align: left; border-radius: 8px; }
.mobile-menu-panel a:hover { background: var(--surface-2); }

/* Assistant de démarrage */
.setup { max-width: 640px; margin: 0 auto; padding: 0 16px 60px; }
.setup-head { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.setup-steps { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.setup-steps li { display: grid; justify-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.setup-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.setup-steps .current { color: var(--ink); font-weight: 700; }
.setup-steps .current .n { border-color: var(--brand); color: var(--brand); }
.setup-steps .done .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.setup-card h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.setup-card .lead { color: var(--muted); }
.setup-rows { display: grid; gap: 4px; margin: 18px 0; }
.setup-row { display: grid; grid-template-columns: 1fr 210px; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setup-row > label:first-child { margin: 0; font-size: 1rem; font-weight: 600; }
.setup-input { display: flex; align-items: center; gap: 8px; }
.setup-input input { text-align: right; font-weight: 600; font-size: 1.05rem; }
.setup-input span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.setup-row .paid { grid-column: 1 / -1; justify-self: end; font-size: .85rem; margin: 0; color: var(--muted); }
@media (max-width: 520px) { .setup-row { grid-template-columns: 1fr; } .setup-row .paid { justify-self: start; } }
.setup-goal { border: 1px dashed var(--line); border-radius: 14px; padding: 14px 16px; margin: 18px 0 0; }
.setup-goal legend { font-weight: 700; padding: 0 6px; }
.setup-live { display: flex; justify-content: space-between; align-items: baseline; background: var(--brand-soft); color: var(--brand);
  border-radius: 12px; padding: 12px 16px; margin: 20px 0 0; font-weight: 600; }
.setup-live strong { font: 700 1.4rem var(--serif); }
.setup-live.over { background: var(--bad-soft); color: var(--bad); }
.setup-live.muted-live { opacity: .6; }
.setup-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.setup-actions.center { justify-content: center; }
.setup-owl { font-size: 3rem; }
.setup-summary { display: grid; margin: 20px auto; max-width: 360px; text-align: left; }
.setup-summary div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.setup-summary dt { color: var(--muted); }
.setup-summary dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.setup-summary .total { border-bottom: 0; font-size: 1.1rem; }
.setup-summary .total dt { color: var(--ink); font-weight: 700; }
/* Mobile : les colonnes de grille ne doivent jamais dépasser l'écran */
.two-col > *, .kpi-grid > * { min-width: 0; }

/* Champ piège anti-robots (invisible pour les humains, y compris lecteurs d'écran) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.verify-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); color: var(--brand);
  padding: 10px 16px; border-radius: 10px; margin-bottom: 12px; }
.verify-banner span { flex: 1 1 220px; }

/* Bandeau de consentement aux cookies */
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 520px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgb(19 35 58 / .22); padding: 16px 18px;
  animation: consent-in .4s cubic-bezier(.2,.8,.2,1); }
.consent[hidden], .consent [hidden] { display: none !important; }
.consent p { margin: 0 0 10px; }
.consent-title { font: 700 1.05rem var(--serif); }
.consent-details { border-top: 1px solid var(--line); margin: 6px 0 12px; }
.consent-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.consent-row input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 480px) { .consent { left: 8px; right: 8px; bottom: 8px; } .consent-actions .spacer { display: none; }
  .consent-actions .btn { flex: 1 1 40%; } }
@keyframes consent-in { from { opacity: 0; transform: translateY(20px); } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

/* Fenêtre de sortie (tableau budget par e-mail) */
.exit-offer { border: 0; border-radius: 14px; padding: 28px 24px 20px; width: min(420px, calc(100vw - 32px)); text-align: center;
  box-shadow: 0 30px 80px rgb(0 0 0 / .25); color: var(--ink); background: var(--surface); }
.exit-offer::backdrop { background: rgb(19 35 58 / .5); }
.exit-offer h2 { font-size: 1.5rem; margin: 0 0 8px; }
.exit-offer p { margin: 0 0 14px; }
.exit-offer form { display: grid; gap: 10px; margin: 6px 0 12px; }
.exit-offer input[type=email] { width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; }
.exit-offer input[type=email]:focus { outline: none; border-color: var(--brand); }
.exit-icon { font-size: 2.4rem; line-height: 1; margin: 0 0 10px !important; }
.exit-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: 6px; }
.exit-error { color: var(--bad); margin: 0 !important; }


/* ---------- Loyski ---------- */
textarea { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 84px; resize: vertical; }
textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.field .hint { margin: 4px 0 0; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; }
fieldset.box legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
.errors { margin: 0 0 16px; padding: 12px 16px 12px 34px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); }
.errors li { margin: 2px 0; }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.paid { background: #e2f1e7; color: var(--good); }
.status.partial { background: var(--amber-soft); color: var(--accent-ink); }
.status.late { background: var(--bad-soft); color: var(--bad); }
.status.due { background: var(--brand-soft); color: var(--brand); }
.status.upcoming { background: var(--surface-2); color: var(--muted); }

.rent-list { display: grid; gap: 10px; }
.rent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rent-row.late { border-color: #efc5bd; }
.rent-main { display: grid; gap: 3px; min-width: 0; }
.rent-main strong { overflow-wrap: anywhere; }
.rent-main a { color: inherit; text-decoration: none; }
.rent-main a:hover { text-decoration: underline; }
.rent-amount { font: 700 1.15rem var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.rent-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rent-actions form { display: contents; }
.pay-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-form input[type=date] { width: auto; min-height: 36px; padding: 5px 8px; }
.pay-form select { width: auto; min-height: 36px; padding: 5px 8px; }
details.pay-more summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.month-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kpi-card .sub { font-size: .8rem; color: var(--muted); }
.kpi-card.hl .sub { color: #cfdff0; }
.panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-title h2 { margin: 0; font-size: 1.15rem; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.list-plain li:last-child { border-bottom: 0; }
.pill.premium-lock { background: var(--amber-soft); color: var(--accent-ink); }
.prop-card { display: grid; gap: 10px; }
.prop-card .row { justify-content: space-between; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; }
.locked-card { opacity: .65; }
.calc-table td:last-child, .calc-table th:last-child { text-align: right; white-space: nowrap; }
.calc-table td.wrap { white-space: normal; }   /* période « du … au … » : passe à la ligne sur mobile */
.big-number { font: 700 2rem var(--serif); color: var(--brand); font-variant-numeric: tabular-nums; }
.charge-lines { display: grid; gap: 8px; margin-bottom: 10px; }
.charge-line { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; }
@media (max-width: 520px) { .charge-line { grid-template-columns: minmax(0, 1fr) 110px auto; } }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.irl-table td, .irl-table th { text-align: right; }
.irl-table td:first-child, .irl-table th:first-child { text-align: left; }
.badge-new { display: inline-block; font-size: .7rem; font-weight: 700; background: var(--amber); color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.steps-check li a { color: inherit; }
.receipt-preview { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-size: .92rem; box-shadow: var(--shadow); }
.receipt-preview h3 { font-family: var(--sans); color: var(--brand); letter-spacing: .02em; text-transform: uppercase; font-size: 1rem; }
.mock-receipt { position: relative; }
.confirm-box { text-align: center; }
.confirm-box .big { font-size: 2.6rem; }

/* Accueil : bandeau bleu nuit, quadrillage de plan d'architecte */
.hero-zone { position: relative; overflow: hidden; isolation: isolate; background: var(--brand); color: #fff;
  background-image: linear-gradient(rgb(255 255 255 / .06) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .06) 1px, transparent 1px);
  background-size: 28px 28px; }
.hero-zone::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; z-index: -1;
  background: radial-gradient(closest-side, rgb(217 96 59 / .35), transparent); pointer-events: none; }
.hero-zone h1 { color: #fff; }
.hero-zone .lead, .hero-zone .trust { color: #c9d5e6; }
.hero-zone .eyebrow { background: rgb(255 255 255 / .1); color: #fff; border: 1px solid rgb(255 255 255 / .18); }
.hero-zone .btn { background: var(--amber); }
.hero-zone .btn:hover { background: #c2502d; }
.hero-zone .btn.ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.hero-zone .btn.ghost:hover { background: rgb(255 255 255 / .08); }
.hero-zone .flash { color: var(--brand); }
.blobs { display: none; }
.hero h1 .hl { color: #ffb59c; }
.hero-visual { position: relative; display: grid; gap: 14px; }
.mail-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgb(19 35 58 / .14); padding: 16px 18px; }
.mail-mock .from { font-size: .8rem; color: var(--muted); }
.mail-mock .subject { font-weight: 700; margin: 2px 0 10px; }
.mail-mock .rentline { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.receipt-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 20px 60px rgb(19 35 58 / .12); padding: 18px; margin-left: 28px; position: relative; }
.receipt-mock::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--amber); border-radius: 6px 6px 0 0; }
.receipt-mock h3 { font: 700 1.05rem var(--sans); color: var(--brand); text-transform: uppercase; letter-spacing: .03em; margin: 4px 0 2px; }
.receipt-mock .lines { margin-top: 10px; font-size: .9rem; }
.receipt-mock .lines div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.receipt-mock .lines .tot { border: 0; background: var(--brand-soft); color: var(--brand); font-weight: 700; padding: 8px 10px; border-radius: 8px; margin-top: 6px; }
.sent-chip { position: absolute; right: -6px; bottom: -14px; background: var(--good); color: #fff; font-weight: 700; font-size: .82rem; padding: 6px 12px; border-radius: 99px; box-shadow: 0 8px 20px rgb(46 125 79 / .35); }
@media (max-width: 520px) { .receipt-mock { margin-left: 0; } .sent-chip { right: 8px; } }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .88rem; margin-top: 6px; }
/* Boutons longs (adresse e-mail du locataire…) : retour à la ligne plutôt que débordement sur mobile */
.doc-actions .btn, .rent-actions .btn, .card .btn.block { white-space: normal; text-align: center; overflow-wrap: anywhere; }
.kpi-card.hl.over { background: var(--bad); border-color: var(--bad); }
.kpi-card.hl.over .label, .kpi-card.hl.over .sub { color: #fde3dd; }
.two-col > aside, .two-col > section { min-width: 0; }
.site-footer .footer-grid { display: grid; }   /* plus spécifique que .site-footer .wrap (flex) */

/* Pictogrammes au trait (macro icon) */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }
.feature .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft);
  color: var(--brand); font-size: 1rem; margin-bottom: 12px; }
.feature .ico .i { width: 22px; height: 22px; }
a.link-card:hover .ico { background: var(--brand); color: #fff; }
.sidebar a.nav .i { color: var(--muted); }
.sidebar a.nav.active .i { color: var(--brand); }
.mobile-nav a span .i { width: 22px; height: 22px; }
.panel-title .i { color: var(--amber); }
.steps > div::before { border-radius: 8px; background: var(--amber); }
.kpi-card .value, .result-grid b, .plan .price, .big-number, .rent-amount { font-family: var(--serif); letter-spacing: -.02em; }
.site-header { border-bottom-color: var(--line); }
section.alt { background: #e9edf3; }
.cta-box { background: var(--brand); color: #fff; border: 0; }
.cta-box .muted { color: #c9d5e6; }
.final-cta { background: var(--brand); color: #fff; }
.final-cta .muted { color: #c9d5e6; }
.hero-zone .hero-visual { color: var(--ink); }
.hero-zone .hero-visual .muted { color: var(--muted); }

/* Sélecteur de langue (pied de page du site public) */
.lang-switch { margin: 10px 0 0; }
.lang-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.lang-switch a:hover { border-color: var(--brand); color: var(--brand); }
