:root {
  /* Layout : une colonne centrée, carte de simulation au premier plan, mobile d'abord (trafic réseaux sociaux). */
  --navy: #0a2d6e;
  --navy-deep: #061d4a;
  --green: #72b91e;
  --green-dark: #4f8a0f;
  --ink: #16233f;
  --muted: #5a6680;
  --line: #dbe3ee;
  --paper: #f3f6fa;
  --card: #ffffff;
  --tint-green: #eef7e2;
  --tint-navy: #e8eef8;
  --warn: #9a5b00;
  --warn-tint: #fff4e0;
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* En-tête */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 980px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.topbar img { height: 52px; width: auto; }
.topbar-badge {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--navy); background: var(--tint-green);
  border: 1px solid #cfe8b0; border-radius: 999px; padding: 5px 12px;
}

/* Accroche */
.hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #11528f);
  color: #fff;
}
.hero-inner { max-width: 980px; margin: 0 auto; padding: 28px 16px 84px; display: grid; gap: 14px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; margin: 0;
  font-size: clamp(26px, 5vw, 42px); line-height: 1.15; text-wrap: balance; max-width: 22ch;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero p { margin: 0; font-size: 18px; max-width: 60ch; color: #dbe6f7; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 4px 0 0; list-style: none; font-weight: 600; font-size: 15px; }
.hero-points li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 6px; }

/* Carte du simulateur */
main { max-width: 760px; margin: -64px auto 0; padding: 0 16px 40px; display: grid; gap: 20px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(6, 29, 74, .14);
  padding: 22px 20px 24px;
}
.progress { display: grid; gap: 6px; margin-bottom: 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); font-weight: 600; }
.progress-track { height: 8px; background: var(--tint-navy); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .3s ease; }

.step h2 {
  font-family: var(--font-display); font-weight: 700; color: var(--navy);
  font-size: clamp(21px, 3.6vw, 26px); line-height: 1.25; margin: 0 0 6px; text-wrap: balance;
}
.step .help { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tile {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: 12px;
  padding: 14px 16px; min-height: 58px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color .15s, background .15s, transform .1s;
}
.tile:hover { border-color: var(--green); background: var(--tint-green); }
.tile:active { transform: scale(.99); }
.tile.selected { border-color: var(--green); background: var(--tint-green); }
.tile .ico {
  flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--tint-navy); color: var(--navy);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.tile strong { display: block; font-weight: 700; }
.tile small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field input {
  font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus { border-color: var(--navy); outline: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row .field { flex: 1 1 200px; }

.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--green); color: #0b2a05; }
.btn-primary:hover { background: #82c92f; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #12408f; }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; padding: 6px 0; text-decoration: underline; }
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
.error { color: #b42318; font-size: 15px; font-weight: 600; margin: 8px 0 0; min-height: 1em; }

.notice {
  border-radius: 12px; padding: 14px 16px; font-size: 15.5px;
  background: var(--tint-navy); border-left: 5px solid var(--navy);
}
.notice.warn { background: var(--warn-tint); border-left-color: #e0a100; }
.notice.ok { background: var(--tint-green); border-left-color: var(--green); }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }

/* Résultat */
.result-head { display: grid; gap: 4px; margin-bottom: 14px; }
.result-head .kicker { font-family: var(--font-display); font-weight: 600; color: var(--green-dark); font-size: 15px; }
.big-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.figure { border-radius: 12px; padding: 16px; display: grid; gap: 2px; }
.figure.aides { background: var(--navy); color: #fff; }
.figure.rac { background: var(--tint-green); color: var(--ink); border: 2px solid var(--green); }
.figure .label { font-size: 14.5px; font-weight: 600; opacity: .9; }
.figure .value { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 6vw, 40px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.figure.aides .value { color: var(--green); }
.figure .sub { font-size: 14px; opacity: .85; }

table.detail { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
table.detail td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.detail td:last-child { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 12px; }
table.detail td small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 400; }
table.detail tr.total td { border-bottom: 0; border-top: 2px solid var(--navy); font-weight: 700; color: var(--navy); }
table.detail tr.minus td:last-child { color: var(--green-dark); }

.cta-block { display: grid; gap: 10px; margin-top: 20px; }
.cta-block h3 { font-family: var(--font-display); color: var(--navy); font-size: 20px; margin: 0; }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cta-grid .btn { width: 100%; }
.contact-text { font-size: 14.5px; color: var(--muted); margin: 0; }

.form-panel { display: grid; gap: 12px; margin-top: 14px; padding: 16px; border: 2px solid var(--line); border-radius: 12px; }
.form-panel h4 { margin: 0; font-family: var(--font-display); color: var(--navy); font-size: 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.consent input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--green); }

.mentions { font-size: 13.5px; color: var(--muted); display: grid; gap: 6px; margin-top: 18px; }
.mentions p { margin: 0; }

/* Réassurance */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.trust div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.trust strong { display: block; font-family: var(--font-display); color: var(--navy); font-size: 16px; }
.trust span { font-size: 14.5px; color: var(--muted); }

/* Pied de page */
footer { background: var(--navy-deep); color: #c9d6ee; font-size: 14px; }
.footer-inner { max-width: 980px; margin: 0 auto; padding: 24px 16px 32px; display: grid; gap: 10px; }
footer a { color: #fff; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer button.linkish { background: none; border: 0; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Fenêtres d'information */
.modal { position: fixed; inset: 0; background: rgba(6, 29, 74, .55); display: none; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; z-index: 20; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); max-width: 680px; width: 100%; padding: 22px 20px; display: grid; gap: 10px; font-size: 15.5px; }
.modal-box h2 { font-family: var(--font-display); color: var(--navy); margin: 0; font-size: 22px; }
.modal-box h3 { font-family: var(--font-display); color: var(--navy); margin: 8px 0 0; font-size: 16px; }
.modal-box p { margin: 0; }

.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 420px) {
  .card { padding: 18px 14px 20px; }
  .topbar img { height: 44px; }
}

/* Mention obligatoire France Rénov' (arrêté du 7 juillet 2026) */
.france-renov{background:#fff;border-top:3px solid #000091;padding:18px 20px}
.france-renov a{max-width:1180px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;text-decoration:none;color:#161616;font-size:16px;line-height:1.45}
.france-renov .fr-tag{flex:none;background:#000091;color:#fff;font-weight:700;padding:6px 12px;border-radius:6px;font-size:15px}
.france-renov .fr-msg{flex:1 1 320px;font-weight:600}
.france-renov a:hover .fr-msg,.france-renov a:focus-visible .fr-msg{text-decoration:underline}
.fr-encart{display:block;max-width:740px;margin:24px auto 0;padding:0 20px}
.fr-encart img{display:block;width:100%;max-width:700px;height:auto;margin:0 auto}
@media (max-width:700px){.fr-encart{padding:0}}
.fr-encart + main{margin-top:24px}
.hero + .fr-encart{position:relative;z-index:2;margin-top:-48px}
