/* Page du test PAC : rendu lumineux, premium, lisible. Aucune ressource externe. */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #17212B;
  --muted: #55606C;
  --line: #E7E1D6;
  --accent: #1D5C45;
  --accent-hover: #164A37;
  --accent-soft: #E9F2EC;
  --gold: #A27A2E;
  --gold-soft: #FBF3E2;
  --danger: #B42318;
  --wa: #128C4A;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(23, 33, 43, .04), 0 8px 28px rgba(23, 33, 43, .07);
  --fr-h: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: Fraunces, Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ─── Barre du haut ─── */
.barre { background: rgba(250, 248, 244, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.2) blur(6px); }
.barre-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo img { height: 40px; width: auto; }
.essai-badge { display: none; font-size: 12px; font-weight: 600; color: #7A5300; background: var(--gold-soft); border: 1px solid #EBD7A8; border-radius: 999px; padding: 3px 10px; }
body.mode-essai .essai-badge { display: inline-block; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ─── Accueil ─── */
.hero { display: grid; gap: 22px; padding: 22px 0 8px; }
.surtitre { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: clamp(30px, 8.4vw, 52px); line-height: 1.08; margin: 8px 0 10px; }
.sous-titre { font-size: 19px; margin: 0 0 8px; color: var(--ink); font-weight: 500; }
.petite { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.45; }
.urgence { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-soft); border: 1px solid #EFDDB4; border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin: 0 0 18px; color: #4D3A12; }
.urgence .point { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: #D48A00; box-shadow: 0 0 0 4px rgba(212, 138, 0, .16); }
.cta { display: grid; gap: 8px; justify-items: stretch; }
.reassurance { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink); }
.points li::before { content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%231D5C45' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.hero-image { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #EDE7DC; }
.hero-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ─── Boutons ─── */
.btn { font: inherit; font-weight: 600; border-radius: 14px; border: 1px solid transparent; padding: 14px 20px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .opt:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(29, 92, 69, .35); outline-offset: 2px; }
.btn-principal { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(29, 92, 69, .22); }
.btn-principal:hover { background: var(--accent-hover); }
.btn-principal:disabled { background: #9DB5AA; box-shadow: none; cursor: not-allowed; }
.btn-grand { width: 100%; font-size: 18px; min-height: 58px; }
.btn-secondaire { background: var(--surface); color: var(--accent); border-color: #C9D9CF; }
.btn-secondaire:hover { background: var(--accent-soft); }
.btn-lien { background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 8px; font-weight: 500; }
.btn-whatsapp { background: var(--surface); color: var(--wa); border: 1.5px solid #9FD3B5; width: 100%; }
.btn-whatsapp:hover { background: #EFF9F3; }
.btn.en-cours { opacity: .85; }

/* ─── Test ─── */
.zone-test, .zone-resultat { padding: 18px 0 8px; max-width: 640px; margin: 0 auto; }
.carte-test { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 20px; }
.test-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.btn-retour { font: inherit; font-size: 15px; background: none; border: 0; color: var(--muted); padding: 8px 4px; min-height: 44px; cursor: pointer; }
.test-nom { font-size: 13px; color: var(--muted); }
.progression { height: 6px; background: #EFEAE1; border-radius: 99px; overflow: hidden; margin: 4px 0 18px; }
.progression span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #2F7D5F); border-radius: 99px; transition: width .35s ease; }
.question.entree { animation: entree .28s ease both; }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .question.entree { animation: none; } .progression span { transition: none; } html { scroll-behavior: auto; } }
.q-num { margin: 0; font-size: 13px; font-weight: 600; color: var(--gold); letter-spacing: .03em; }
.q-titre { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.18; margin: 6px 0 16px; outline: none; }
.q-aide { color: var(--muted); margin: -6px 0 14px; }
.options { display: grid; gap: 10px; }
.options-grille { grid-template-columns: repeat(4, 1fr); }
.opt { font: inherit; text-align: left; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; padding: 15px 16px; min-height: 60px; cursor: pointer; display: grid; gap: 2px; transition: border-color .15s, background .15s, box-shadow .15s; }
.opt:hover { border-color: #B9CFC3; background: #FBFDFB; }
.opt.choisi { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt-t { font-weight: 600; font-size: 17px; }
.opt-s { font-size: 14px; color: var(--muted); }
.opt-court { text-align: center; justify-items: center; padding: 14px 6px; }
.opt-court:last-child { grid-column: span 4; }
.q-form { display: grid; gap: 12px; margin-top: 14px; }
.q-form label:not(.sr) { font-weight: 600; font-size: 15px; }
.select { position: relative; }
.select::after { content: ''; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select, input[type=text], input[type=tel], input[type=email], input[type=number], textarea {
  font: inherit; font-size: 17px; width: 100%; color: var(--ink); background: var(--surface);
  border: 1.5px solid #D9D2C5; border-radius: 12px; padding: 13px 14px; min-height: 52px; -webkit-appearance: none; appearance: none;
}
select { padding-right: 40px; }
input[aria-invalid=true] { border-color: var(--danger); background: #FFF8F7; }
.champ-euros { position: relative; }
.champ-euros input { padding-right: 40px; font-size: 20px; font-weight: 600; }
.champ-euros span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.ou-trouver { background: #F7F4EE; border-radius: 12px; padding: 10px 14px; }
.ou-trouver summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 15px; }
.ou-trouver p { margin: 8px 0 2px; font-size: 15px; color: var(--muted); }
.erreur { color: var(--danger); font-size: 14px; margin: 2px 0 0; }
.btn-final { width: 100%; margin-top: 16px; font-size: 18px; }

/* ─── Résultat ─── */
.carte-resultat { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px 18px; position: relative; overflow: hidden; }
.carte-resultat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); }
.carte-resultat h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.12; margin: 6px 0 10px; outline: none; }
.carte-resultat p { margin: 0 0 10px; font-size: 17px; }
.carte-resultat .petite { font-size: 13.5px; margin-top: 12px; }
.carte-bleu::before { background: #2D5BD7; }
.carte-jaune::before { background: #D9A400; }
.carte-violet::before { background: #7048C8; }
.carte-rose::before { background: #C2457A; }
.carte-non_adapte::before { background: #9AA3AD; }
.pastille { display: inline-flex; align-items: center; line-height: 1.3; gap: 8px; font-size: 13.5px; font-weight: 600; border-radius: 999px; padding: 5px 12px 5px 8px; margin: 0 0 6px !important; }
.pastille span { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.pastille-bleu { background: #EAF0FF; color: #1F3F99; } .pastille-bleu span { background: #2D5BD7; }
.pastille-jaune { background: #FFF5D6; color: #6E5200; } .pastille-jaune span { background: #E0AA00; }
.pastille-violet { background: #F1EBFF; color: #4B2E91; } .pastille-violet span { background: #7048C8; }
.pastille-rose { background: #FDEBF3; color: #8C2853; } .pastille-rose span { background: #C2457A; }

.bloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin-top: 16px; box-shadow: var(--shadow); }
.bloc h3 { font-size: 23px; line-height: 1.2; margin: 0 0 8px; }
.bloc p { margin: 0 0 10px; }
.bloc-locataire textarea { font-size: 15px; line-height: 1.5; min-height: 220px; resize: vertical; background: #FBFAF7; margin: 4px 0 12px; }
.bloc-locataire .btn { width: 100%; }
.delai { background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 10px 12px; margin: 0 0 16px !important; }
.champs { display: grid; gap: 14px; }
.champ { display: grid; gap: 6px; }
.champ label { font-weight: 600; font-size: 15px; }
.facultatif { font-weight: 400; color: var(--muted); }
.mention-tel { font-size: 13px; color: var(--muted); margin: 0 !important; line-height: 1.45; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.case { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 6px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #FBFAF7; font-size: 15.5px; }
.case input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
#envoyer { margin-top: 12px; }
.envoi-statut { color: var(--danger); background: #FFF4F2; border: 1px solid #F5C9C3; border-radius: 12px; padding: 10px 12px; margin: 10px 0 0 !important; font-size: 15px; }
.sous-bouton { font-size: 13.5px; color: var(--muted); margin: 12px 0 6px !important; text-align: center; }
.donnees { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.bloc-whatsapp { text-align: center; }
.bloc-whatsapp .petite { margin: 10px 0 0; }
.modifier { text-align: center; margin: 10px 0 0; }

/* ─── Mentions et pied ─── */
.mentions { max-width: 760px; margin: 28px auto 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mentions p { margin: 0 0 6px; }
.pied { max-width: 760px; margin: 18px auto 0; padding: 0 16px 20px; font-size: 13px; color: var(--muted); text-align: center; }
.pied p { margin: 6px 0; }
.encart-fr { display: block; border: 2px solid #000; background: #fff; margin: 0 auto 12px; max-width: 700px; }
.encart-fr img { width: 100%; }

/* ─── Bandeau France Rénov' fixe (toutes les pages) ─── */
.fr-bandeau { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; box-shadow: 0 -4px 16px rgba(23, 33, 43, .08); padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); }
.fr-bandeau a { display: block; max-width: 640px; margin: 0 auto; }
.fr-bandeau img { width: 100%; }

/* ─── Bandeau cookies (au-dessus du bandeau France Rénov') ─── */
.bandeau-cookies { position: fixed; left: 8px; right: 8px; bottom: calc(var(--fr-h) + 6px); z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 36px rgba(23, 33, 43, .18); padding: 10px 12px; max-width: 640px; margin: 0 auto; }
.bandeau-cookies p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.bandeau-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bandeau-boutons .btn { min-height: 44px; padding: 8px 12px; }

/* ─── Page merci et notice ─── */
.page-simple { max-width: 680px; margin: 0 auto; padding: 26px 0 8px; }
.merci-carte { text-align: left; }
.merci-carte h1 { font-size: clamp(30px, 8vw, 42px); line-height: 1.1; margin: 0 0 12px; }
.merci-carte .btn { width: 100%; margin-top: 6px; font-size: 17px; padding: 14px 12px; }
.coche { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 12px; }
.essai-note { font-size: 13px; background: var(--gold-soft); border: 1px solid #EBD7A8; border-radius: 10px; padding: 8px 10px; color: #6A4A00; }
.apercu { font-size: 12px; background: #F6F4EF; border-radius: 10px; padding: 10px; overflow: auto; max-height: 280px; white-space: pre-wrap; word-break: break-word; }
.notice h1 { font-size: clamp(28px, 7vw, 38px); line-height: 1.12; margin: 0 0 12px; }
.notice h2 { font-size: 21px; margin: 28px 0 8px; }
.notice p, .notice li { font-size: 16px; }
.notice ul { padding-left: 1.2em; }
.notice .intro { color: var(--muted); }

/* ─── Grand écran ─── */
@media (min-width: 900px) {
  body { font-size: 18px; }
  .logo img { height: 46px; }
  .hero { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding: 48px 0 24px; min-height: calc(100vh - 220px); }
  .cta { justify-items: start; }
  .cta .btn-grand { width: auto; min-width: 320px; }
  .reassurance { text-align: left; padding-left: 4px; }
  .hero-image img { aspect-ratio: 4 / 3.4; }
  .zone-test, .zone-resultat { padding-top: 40px; }
  .carte-test { padding: 22px 32px 32px; }
  .carte-resultat, .bloc { padding: 28px 32px; }
  .champs { grid-template-columns: 1fr 1fr; }
  .champ-large { grid-column: span 2; }
  .bandeau-cookies { left: 50%; right: auto; transform: translateX(-50%); width: 640px; }
  .bandeau-cookies p { font-size: 14px; }
}
@media (min-width: 900px) and (max-height: 760px) { .hero { min-height: 0; } }
sup { font-size: .62em; line-height: 0; vertical-align: super; }
