/* Devis PAC — feuille de style commune */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --nuit: #0e3442;      /* bandeau, pied de page */
  --fjord: #17657e;     /* froid : liens, accents */
  --givre: #8fd3e3;     /* froid clair */
  --braise: #ee8a2e;    /* chaud : actions */
  --ambre: #f6b45c;     /* chaud clair */
  --papier: #f2f6f7;    /* fond de page */
  --encre: #15232b;     /* texte */
  --gris: #5b6b73;      /* texte secondaire */
  --trait: #d6e1e4;
  --blanc: #ffffff;
  --thermique: linear-gradient(90deg, var(--givre), #b9c9a8 45%, var(--ambre) 75%, var(--braise));
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --texte: "Figtree", system-ui, sans-serif;
  --r-s: 8px;
  --r-l: 18px;
  --largeur: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1.0625rem/1.65 var(--texte);
  font-feature-settings: "tnum" 0;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--fjord); text-underline-offset: 3px; }
a:hover { color: var(--nuit); }
:focus-visible { outline: 3px solid var(--braise); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }

/* ---------- En-tête ---------- */
.entete { background: var(--nuit); color: var(--blanc); position: relative; z-index: 2; }
.entete .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--blanc); text-decoration: none; font: 800 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.logo:hover { color: var(--blanc); }
.logo-pastille { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 200deg, var(--givre), var(--ambre), var(--braise), var(--givre)); box-shadow: inset 0 0 0 7px var(--nuit); }
.nav { display: flex; align-items: center; gap: 26px; font-size: .97rem; }
.nav a { color: #cfe3e8; text-decoration: none; }
.nav a:hover { color: var(--blanc); }
.nav .btn { color: var(--nuit); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- Boutons ---------- */
.btn {
  --fond: var(--braise);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border: 0; border-radius: 999px;
  background: var(--fond); color: var(--nuit);
  font: 700 1rem/1.1 var(--texte); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease;
}
/* au survol, la chaleur "monte" dans le bouton */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--braise), var(--ambre));
  transform: translateY(101%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover { color: var(--nuit); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(238,138,46,.8); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-petit { padding: 10px 18px; font-size: .93rem; }
.btn-plein { width: 100%; padding-block: 16px; font-size: 1.06rem; }
.btn .fleche { width: 18px; height: 18px; transition: transform .25s ease; }
.btn:hover .fleche { transform: translateX(4px); }

/* ---------- Bandeau thermique ---------- */
.bandeau {
  position: absolute; left: 0; right: 0; top: 0; height: var(--bandeau-h, 600px);
  background: var(--nuit); overflow: hidden; z-index: 0;
}
.isothermes { position: absolute; inset: auto -5% -2% -5%; width: 110%; height: 78%; opacity: .55; }
.isothermes path { fill: none; stroke: url(#grad-thermique); stroke-width: 1.4; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .isothermes path { stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: tracer 2.4s cubic-bezier(.3,.6,.2,1) forwards; }
  .isothermes path:nth-child(2) { animation-delay: .12s; }
  .isothermes path:nth-child(3) { animation-delay: .24s; }
  .isothermes path:nth-child(4) { animation-delay: .36s; }
  .isothermes path:nth-child(5) { animation-delay: .48s; }
  .isothermes path:nth-child(6) { animation-delay: .6s; }
  .isothermes path:nth-child(7) { animation-delay: .72s; }
  .isothermes .derive { animation: derive 14s ease-in-out infinite alternate; transform-origin: center; }
}
@keyframes tracer { to { stroke-dashoffset: 0; } }
@keyframes derive { to { transform: translateY(14px) scaleY(1.05); } }

/* ---------- Gabarit : contenu + formulaire à droite ---------- */
.page { position: relative; }
.grille {
  position: relative; z-index: 1;
  display: grid; gap: 40px 56px;
  grid-template-columns: minmax(0, 1fr) 372px;
  grid-template-areas: "hero form" "contenu form";
  padding-top: 56px;
}
.hero { grid-area: hero; color: var(--blanc); padding-bottom: 72px; min-height: calc(var(--bandeau-h, 600px) - 56px); display: flex; flex-direction: column; justify-content: center; }
.colonne-form { grid-area: form; }
.colonne-form .collant { position: sticky; top: 24px; }
.contenu { grid-area: contenu; min-width: 0; padding-bottom: 80px; }

@media (max-width: 980px) {
  .grille { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "form" "contenu"; gap: 32px; padding-top: 36px; }
  .hero { min-height: 0; padding-bottom: 8px; }
  .colonne-form .collant { position: static; }
  .bandeau { height: var(--bandeau-h-mobile, 520px); }
}

.hero p.chapo { font-size: 1.2rem; color: #d4e6eb; max-width: 52ch; }
.hero h1 { max-width: 15ch; }

/* relevé de températures : dehors -> dedans */
.releve { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.releve .mesure { display: grid; }
.releve .valeur { font: 700 2.4rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.releve .froid .valeur { color: var(--givre); }
.releve .chaud .valeur { color: var(--ambre); }
.releve .legende { font-size: .9rem; color: #a9c6ce; }
.releve .flux { flex: 0 1 140px; height: 4px; border-radius: 4px; background: var(--thermique); position: relative; overflow: hidden; min-width: 60px; }
@media (prefers-reduced-motion: no-preference) {
  .releve .flux::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); animation: flux 2.8s ease-in-out 1.6s infinite; }
}
@keyframes flux { from { transform: translateX(-100%); } to { transform: translateX(380%); } }

/* fil d'Ariane */
.ariane { font-size: .92rem; color: #a9c6ce; margin-bottom: 22px; }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.ariane li + li::before { content: "/"; margin-right: 6px; color: #5f8792; }
.ariane a { color: #d4e6eb; text-decoration: none; }
.ariane a:hover { color: var(--blanc); text-decoration: underline; }

/* ---------- Formulaire ---------- */
.carte-form {
  position: relative; background: var(--blanc); border-radius: var(--r-l);
  padding: 30px 28px 26px; box-shadow: 0 30px 60px -30px rgba(14,52,66,.55);
}
/* liseré thermique qui s'anime quand on remplit le formulaire */
.carte-form::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: calc(var(--r-l) + 2px);
  background: conic-gradient(from var(--angle, 0deg), var(--givre), var(--ambre), var(--braise), var(--fjord), var(--givre));
  opacity: .0; transition: opacity .4s ease;
}
.carte-form:focus-within::before { opacity: 1; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  .carte-form::before { animation: tourne 6s linear infinite; }
}
@keyframes tourne { to { --angle: 360deg; } }

.carte-form h2 { font-size: 1.75rem; margin-bottom: 6px; }
.carte-form .intro { color: var(--gris); font-size: .97rem; margin-bottom: 20px; }
.champ { position: relative; margin-bottom: 14px; }
.champ input {
  width: 100%; padding: 22px 14px 8px; border: 1.5px solid var(--trait); border-radius: var(--r-s);
  background: #f8fbfb; color: var(--encre); font: 500 1rem/1.3 var(--texte);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.champ label {
  position: absolute; left: 15px; top: 15px; color: var(--gris); font-size: 1rem; pointer-events: none;
  transform-origin: left top; transition: transform .2s ease, color .2s ease;
}
.champ input:focus { outline: none; border-color: var(--fjord); background: var(--blanc); box-shadow: 0 0 0 4px rgba(143,211,227,.45); }
.champ input:focus + label,
.champ input:not(:placeholder-shown) + label { transform: translateY(-9px) scale(.78); color: var(--fjord); }
.champ.erreur input { border-color: #c2412d; background: #fff6f4; }
.champ.erreur input:focus { box-shadow: 0 0 0 4px rgba(194,65,45,.18); }
.champ .message { display: block; font-size: .85rem; color: #b13a27; margin-top: 4px; min-height: 0; }
.champ.ok input { border-color: #3f9b7a; }
@media (prefers-reduced-motion: no-preference) { .champ.secoue { animation: secoue .35s ease; } }
@keyframes secoue { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.duo { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0 10px; }
.duo .champ { min-width: 0; }
.cache { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mention { font-size: .8rem; color: var(--gris); margin: 14px 0 0; line-height: 1.5; }
.form-etat { display: none; text-align: center; padding: 18px 0 6px; }
.form-etat svg { margin: 0 auto 12px; width: 64px; height: 64px; }
.form-etat svg circle { stroke: url(#grad-ok); }
.carte-form.envoye form { display: none; }
.carte-form.envoye .form-etat { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .carte-form.envoye .form-etat path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tracer .5s .3s ease forwards; }
  .carte-form.envoye .form-etat circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: tracer .6s ease forwards; }
}
.btn[aria-busy="true"] { pointer-events: none; opacity: .8; }
.btn[aria-busy="true"] .fleche { animation: tourne-svg 1s linear infinite; }
@keyframes tourne-svg { to { transform: rotate(360deg); } }
.erreur-envoi { color: #b13a27; font-size: .9rem; margin: 10px 0 0; }

/* ---------- Sections de contenu ---------- */
.section { padding-top: 56px; }
.section:first-child { padding-top: 64px; }
.section > p, .section .texte p { color: #2b3a42; }
.section .note { color: var(--gris); font-size: .95rem; }

/* Régions → départements → villes */
.regions { display: grid; gap: 22px; margin-top: 24px; }
.region { background: var(--blanc); border-radius: var(--r-l); padding: 26px 28px; border: 1px solid var(--trait); }
.region h3 { font-size: 1.45rem; margin-bottom: 14px; }
.region h3 a { color: inherit; text-decoration: none; }
.depts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dept { padding: 18px 0 20px; border-top: 1px solid var(--trait); }
.dept-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; border-radius: var(--r-s); background: #dfe9ec; margin-bottom: 14px; transition: transform .4s ease, box-shadow .4s ease; }
.dept:hover .dept-photo { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(14,52,66,.6); }
.dept-titre { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.dept-num { font: 700 1.5rem/1.1 var(--display); color: var(--fjord); font-variant-numeric: tabular-nums; }
.dept-nom { font-weight: 700; font-size: 1.08rem; }
@media (max-width: 640px) { .dept-photo { aspect-ratio: 3 / 1; } }
@media (prefers-reduced-motion: reduce) { .dept-photo { transition: none; } .dept:hover .dept-photo { transform: none; } }
.villes { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.villes a, .villes span {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .93rem;
  background: #eaf3f5; color: var(--nuit); text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.villes a { background: var(--nuit); color: var(--blanc); }
.villes a:hover { background: var(--braise); color: var(--nuit); transform: translateY(-1px); }
.villes span { color: var(--gris); }

/* étapes (vraie séquence) */
.etapes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: etape; border-top: 2px solid var(--encre); }
.etapes li { counter-increment: etape; padding: 18px 22px 6px 0; }
.etapes li::before { content: counter(etape); display: block; font: 800 2.6rem/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--fjord); margin-bottom: 10px; }
.etapes p { font-size: .98rem; color: #2b3a42; }
@media (max-width: 640px) { .etapes { grid-template-columns: 1fr; } .etapes li { padding-right: 0; } }

/* texte ville */
.bloc-ville { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 26px; padding: 34px 0; border-top: 1px solid var(--trait); }
.bloc-ville:first-of-type { border-top: 0; }
.bloc-ville .picto { width: 5.5rem; height: 5.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--blanc); border: 1px solid var(--trait); }
.bloc-ville .picto svg { width: 40px; height: 40px; }
@media (max-width: 640px) { .bloc-ville { grid-template-columns: 1fr; } .bloc-ville .picto { width: 4rem; height: 4rem; margin-bottom: 14px; } .bloc-ville .picto svg { width: 30px; } }

/* tableau des prix */
.prix { width: 100%; border-collapse: collapse; margin: 8px 0 18px; background: var(--blanc); border-radius: var(--r-s); overflow: hidden; font-size: .98rem; }
.prix th, .prix td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--trait); }
.prix thead th { background: #e3eef1; font-weight: 700; color: var(--nuit); }
.prix td:last-child, .prix th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prix tr:last-child td { border-bottom: 0; }

.voisines { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.voisines span, .voisines a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--trait); background: var(--blanc); color: var(--nuit); text-decoration: none; font-size: .95rem; }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: #a9c6ce; font-size: .93rem; }
.pied .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 26px; }
.pied a { color: #d4e6eb; }
.pied::before { content: ""; display: block; height: 4px; background: var(--thermique); }

/* bouton mobile qui ramène au formulaire */
.cta-mobile { display: none; }
@media (max-width: 980px) {
  .cta-mobile { display: flex; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 5; box-shadow: 0 12px 30px -10px rgba(14,52,66,.6); transition: transform .3s ease, opacity .3s ease; }
  .cta-mobile.masque { transform: translateY(140%); opacity: 0; }
  .pied .wrap { padding-bottom: 90px; }
}
@media (max-width: 520px) {
  .releve { flex-wrap: nowrap; gap: 12px; }
  .releve .valeur { font-size: 1.9rem; }
  .releve .flux { min-width: 36px; }
}

/* ---------- Photos ---------- */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-l); background: #dfe9ec; }
.photo figcaption { margin-top: 10px; font-size: .9rem; color: var(--gris); max-width: 68ch; }
.contenu > .photo:first-child { margin-top: -48px; }
.contenu > .photo:first-child img { box-shadow: 0 24px 50px -28px rgba(14,52,66,.6); }
.texte .photo, .section .photo { margin: 22px 0 8px; }
.texte .photo img, .section .photo img { border-radius: var(--r-s); aspect-ratio: 3 / 2; }
@media (max-width: 980px) { .contenu > .photo:first-child { margin-top: 0; } }
.texte .bandeau-ville { margin: 6px 0 20px; }
.texte .bandeau-ville img { aspect-ratio: 4 / 1; border-radius: var(--r-s); }
@media (max-width: 640px) { .texte .bandeau-ville img { aspect-ratio: 3 / 1; } }

/* ---------- Page merci ---------- */
.merci { position: relative; z-index: 1; padding: 64px 0 80px; max-width: 760px; }
.merci-tete { color: var(--blanc); padding-bottom: 40px; }
.merci-tete .chapo { font-size: 1.2rem; color: #d4e6eb; }
.merci-ok { width: 64px; height: 64px; margin-bottom: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .merci-ok circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: tracer .7s ease forwards; }
  .merci-ok path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tracer .45s .55s ease forwards; }
}
.merci-carte { background: var(--blanc); border-radius: var(--r-l); padding: 32px 34px; box-shadow: 0 30px 60px -30px rgba(14,52,66,.5); }
.merci-carte section + section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--trait); }
.merci-carte h2 { font-size: 1.4rem; }
.merci-liste { margin: 0 0 4px; padding-left: 1.2em; }
.merci-liste li { margin-bottom: 6px; }
.merci-liste li::marker { color: var(--braise); }
.merci-alerte { background: #fff6ec; border-radius: var(--r-s); padding: 20px 22px !important; border-top: 0 !important; margin-top: 26px; }
.merci-alerte p:last-child, .merci-bonus p { margin-bottom: 0; }
.merci-retour { margin-top: 28px; }
@media (max-width: 640px) { .merci { padding-top: 40px; } .merci-carte { padding: 24px 20px; } }

/* case à cocher du formulaire */
.champ.case { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; align-items: center; margin: 6px 0 16px; }
.champ.case input {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; padding: 0; margin: 0;
  border: 1.5px solid var(--trait); border-radius: 6px; background: #f8fbfb; cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.champ.case input::after { content: ""; width: 6px; height: 11px; border: solid var(--blanc); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform .2s ease; }
.champ.case input:checked { background: var(--fjord); border-color: var(--fjord); }
.champ.case input:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.champ.case input:active { transform: scale(.92); }
.champ.case input:focus-visible { outline: 3px solid var(--braise); outline-offset: 2px; }
.champ.case label { position: static; transform: none !important; color: var(--encre) !important; font-size: .97rem; cursor: pointer; pointer-events: auto; }
.champ.case .message { grid-column: 1 / -1; }
.champ.case.erreur input { border-color: #c2412d; background: #fff6f4; }
.champ.case.ok input { border-color: var(--fjord); }

/* ---------- Mentions légales ---------- */
.legal .merci-tete { padding-bottom: 28px; }
.texte-legal h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.texte-legal h2:first-of-type { margin-top: 22px; }
.texte-legal p, .texte-legal li { color: #2b3a42; font-size: 1rem; }
.texte-legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.texte-legal li { margin-bottom: 6px; }
.texte-legal li::marker { color: var(--fjord); }
.texte-legal ul ul { margin-top: 6px; }

/* page département : cartes des villes */
.cartes-villes { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.carte-ville { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--trait); border-radius: var(--r-s); background: var(--blanc); color: var(--nuit); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
a.carte-ville:hover { transform: translateY(-3px); border-color: var(--braise); box-shadow: 0 14px 28px -18px rgba(14,52,66,.55); }
.cv-nom { font: 700 1.12rem/1.2 var(--display); }
.cv-temp { font-size: .9rem; color: var(--fjord); font-variant-numeric: tabular-nums; }
.cv-lien { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .93rem; }
.cv-lien .fleche { width: 16px; height: 16px; transition: transform .25s ease; }
a.carte-ville:hover .cv-lien .fleche { transform: translateX(3px); }
.carte-ville.vide { color: var(--gris); background: transparent; }
a.dept-nom { color: inherit; text-decoration: underline; text-decoration-color: var(--braise); text-underline-offset: 4px; }
a.dept-nom:hover { color: var(--fjord); }
.retour-dept { margin: 18px 0 0; }
.retour-dept a { color: var(--fjord); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .carte-ville, .cv-lien .fleche { transition: none; } a.carte-ville:hover { transform: none; } }
