/* Chauffage Malin — feuille de style unique (police Nunito hébergée sur le site : rien n'est chargé chez Google) */
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-latin.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }
:root {
  --navy: #12355b;
  --navy-2: #0c2742;
  --orange: #f08a0c;
  --orange-dark: #b9560f;
  --cream: #fff8ec;
  --cream-2: #fbeed6;
  --ink: #1d2733;
  --muted: #566170;
  --line: #e9dcc4;
  --green: #1d8a57;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(18, 53, 91, .10);
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 900; font-size: 1.3rem; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; font-weight: 700; color: var(--navy); font-size: 1rem; white-space: nowrap; }
.nav a:hover { color: var(--orange-dark); }
.menu { display: none; }
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--navy); border: 2px solid var(--navy); border-radius: 999px; padding: 6px 16px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .drop { display: flex; }
  .drop { display: none; position: absolute; right: 0; top: 48px; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; min-width: 240px; }
  .drop a { padding: 10px 12px; text-decoration: none; font-weight: 700; color: var(--navy); border-radius: 10px; }
  .drop a:hover { background: var(--cream); }
}

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--orange); color: var(--navy-2); font-weight: 900; text-decoration: none; border: 0; border-radius: 999px; padding: 16px 28px; font-size: 1.08rem; cursor: pointer; box-shadow: 0 6px 18px rgba(240, 138, 12, .35); transition: transform .15s ease, box-shadow .15s ease; font-family: inherit; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(240, 138, 12, .45); color: var(--navy-2); }
.btn.alt { background: transparent; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; }
.btn.small { padding: 10px 18px; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* Bandeau d'ouverture */
.hero { position: relative; color: var(--white); overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 65%; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 39, 66, .92) 0%, rgba(12, 39, 66, .78) 45%, rgba(12, 39, 66, .25) 100%); }
.hero .wrap { position: relative; padding-top: 84px; padding-bottom: 90px; }
.hero h1 { color: var(--white); max-width: 680px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 1.25rem; max-width: 620px; color: #e9f0f8; }
.kicker { display: inline-block; background: var(--orange); color: var(--navy-2); font-weight: 900; font-size: .9rem; letter-spacing: .02em; text-transform: uppercase; border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding: 0; list-style: none; color: #e9f0f8; font-weight: 700; font-size: .98rem; }
.trust li::before { content: "✓"; color: var(--orange); font-weight: 900; margin-right: 8px; }
@media (max-width: 700px) {
  .hero .bg::after { background: linear-gradient(180deg, rgba(12, 39, 66, .82) 0%, rgba(12, 39, 66, .9) 100%); }
  .hero .wrap { padding-top: 56px; padding-bottom: 64px; }
}

/* Sections */
section { padding: 76px 0; }
section.tint { background: var(--cream); }
section.navy { background: var(--navy); color: #e9f0f8; }
section.navy h2, section.navy h3 { color: var(--white); }
.sec-head { max-width: 760px; margin-bottom: 36px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.eyebrow { color: var(--orange-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; margin-bottom: 8px; }
section.navy .eyebrow { color: var(--orange); }

.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .grid2, .grid3, .split { grid-template-columns: 1fr; } .split { gap: 28px; } }
.grid2 > *, .grid3 > *, .split > *, .steps > *, .cta-band > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .tag { align-self: flex-start; background: var(--cream-2); color: var(--orange-dark); font-weight: 900; font-size: .82rem; border-radius: 999px; padding: 5px 12px; margin-bottom: 12px; }
.card ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.card li { padding-left: 28px; position: relative; margin-bottom: 6px; }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card.offer { border-top: 6px solid var(--orange); }
.price { font-weight: 900; color: var(--navy); font-size: 1.15rem; margin-bottom: 14px; }
.price b { color: var(--orange-dark); font-size: 1.6rem; }

.photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.legend { counter-reset: n; list-style: none; padding: 0; margin: 18px 0 0; }
.legend li { counter-increment: n; position: relative; padding-left: 48px; margin-bottom: 14px; }
.legend li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 900; display: grid; place-items: center; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--white); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--navy-2); font-weight: 900; margin-bottom: 12px; }
.step h3 { font-size: 1.08rem; }
.step p { font-size: .98rem; margin: 0; color: var(--muted); }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.note { background: var(--cream); border-left: 5px solid var(--orange); border-radius: 12px; padding: 18px 20px; }
section.tint .note { background: var(--white); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 26px 0; }
.fact { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 20px; }
.fact b { display: block; color: var(--orange); font-size: 1.5rem; font-weight: 900; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; } }

/* Tableau */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 1rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--navy); color: var(--white); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 800; color: var(--navy); padding: 16px 0; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.6rem; color: var(--orange-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-bottom: 16px; }

/* Formulaire */
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend, .form label.q { font-weight: 800; color: var(--navy); margin-bottom: 10px; display: block; font-size: 1.05rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; background: var(--white); }
.choice input:checked + span { border-color: var(--navy); background: var(--cream); }
.choice input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } .form { padding: 22px; } }
.form input[type=text], .form input[type=tel], .form input[type=email], .form select, .form textarea { width: 100%; font: inherit; padding: 13px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--navy); }
.form label.f { display: block; font-weight: 700; color: var(--navy); font-size: .95rem; margin-bottom: 6px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--muted); margin: 6px 0 20px; }
.consent input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.hp { position: absolute; left: -9999px; }
.result { display: none; border-radius: 14px; padding: 20px; margin-top: 18px; font-weight: 700; }
.result.ok { display: block; background: #e8f6ee; color: #145c3a; border: 1px solid #b9e2cb; }
.result.ko { display: block; background: #fff4e5; color: #7a3d06; border: 1px solid #f5d3a6; }
.result.err { display: block; background: #fdecec; color: #8a1f1f; border: 1px solid #f3c2c2; }

/* Pages de texte */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.page-head { background: var(--cream); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head p { max-width: 760px; font-size: 1.15rem; color: var(--muted); margin: 0; }

/* Bandeau final */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #e9f0f8; border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 30px; } }

/* Pied de page */
footer { background: var(--navy-2); color: #b8c6d6; padding: 56px 0 30px; font-size: .95rem; }
footer a { color: #dfe8f2; text-decoration: none; }
footer a:hover { color: var(--orange); }
footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
footer .brand { color: var(--white); margin-bottom: 12px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 8px; }
footer .legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 800px) { footer .cols { grid-template-columns: 1fr; } }

/* Test d'éligibilité une question par écran (public/test.js) */
.tf-sec { background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%); padding: 44px 0 64px; }
.tf-head { max-width: 760px; margin: 0 auto 22px; text-align: center; }
.tf-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.tf { max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px 34px 34px; min-height: 470px; }
.tf-step { animation: tf-in .3s ease; }
@keyframes tf-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tf-step { animation: none; } }
.tf-top { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-direction: row-reverse; }
.tf-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.tf-bar span { display: block; height: 100%; background: var(--orange); border-radius: 99px; transition: width .4s ease; }
.tf-back { border: 0; background: none; font: inherit; font-weight: 800; color: var(--navy); cursor: pointer; padding: 6px 0; white-space: nowrap; }
.tf-back:hover { color: var(--orange-dark); }
.tf-q { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 900; margin-bottom: 10px; }
.tf-aide { color: var(--muted); font-size: 1rem; margin: 0 0 18px; }
.tf-opts { display: grid; gap: 12px; margin-top: 20px; }
.tf-opts.grille { grid-template-columns: repeat(3, 1fr); }
.tf-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; font-weight: 800; font-size: 1.08rem; color: var(--navy);
  background: var(--white); border: 2px solid var(--line); border-radius: 14px; padding: 15px 18px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
@media (hover: hover) { .tf-opt:hover { border-color: var(--navy); background: var(--cream); } }   /* au doigt, le survol resterait collé sur l'écran suivant */
.tf-opt:active { transform: scale(.99); }
.tf-opt:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tf-opt.sel { border-color: var(--navy); background: var(--navy); color: var(--white); }
.tf-opt kbd { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 2px solid currentColor; font: inherit; font-size: .8rem; opacity: .75; }
.tf-opts.grille .tf-opt { justify-content: center; font-size: 1.25rem; padding: 18px 10px; }
.tf-opts.grille .tf-opt kbd { display: none; }
.tf-res { border-radius: 16px; padding: 22px 24px; background: var(--cream); border: 1px solid var(--line); margin-bottom: 20px; }
.tf-res.ok { background: #e8f6ee; border-color: #b9e2cb; }
.tf-res p { margin: 0; }
.tf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 8px; }
.tf-fields label { display: block; font-weight: 800; color: var(--navy); font-size: .95rem; }
.tf-fields label.large { grid-column: 1 / -1; }
.tf-fields input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 1.1rem; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--white); }
.tf-fields input:focus { outline: none; border-color: var(--navy); }
.tf-consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--muted); margin: 14px 0 6px; }
.tf-consent input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
.tf-err { color: #8a1f1f; font-weight: 800; min-height: 1.4em; margin: 6px 0 10px; font-size: .98rem; }
.tf-fin { text-align: center; padding: 30px 0 10px; }
.tf-ico { font-size: 3rem; line-height: 1; margin-bottom: 14px; }
@media (max-width: 640px) {
  .tf-sec { padding: 16px 0 44px; }
  .tf-head { margin-bottom: 14px; }
  .tf-head .eyebrow { margin-bottom: 4px; }
  .tf-head h1 { font-size: 1.45rem; margin-bottom: 0; }
  .tf-head p { display: none; }
  .tf-top { margin-bottom: 18px; }
  .tf-opts { gap: 10px; margin-top: 14px; }
  .tf { padding: 20px 18px 24px; border-radius: 18px; min-height: 440px; }
  .tf-fields { grid-template-columns: 1fr; }
  .tf-opt { font-size: 1rem; padding: 14px 14px; }
  .tf-opts.grille { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
.tf { scroll-margin-top: 90px; }
