/* ==========================================================================
   Clim&Confort — base : couleurs du logo, reset, typographie, composants communs
   ========================================================================== */

:root {
  /* Couleurs exactes du logo */
  --bleu: #005493;
  --rouge: #C00000;
  --encre: #19171C;

  /* Nuances dérivées uniquement de ces trois couleurs (mélange avec blanc ou encre) */
  --bleu-fonce: #05487B;
  --rouge-fonce: #A20405;
  --bleu-pale: #EDF3F7;
  --rouge-pale: #FBF0F0;
  --gris: #59585C;
  --trait: #DADADB;
  --trait-leger: rgba(25, 23, 28, 0.055);
  --papier: #F7F6F4;
  --blanc: #FFFFFF;

  --police-titre: "Alegreya Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  --police-texte: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --rayon: 8px;
  --hauteur-entete: 70px;
  --conteneur: 1160px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hauteur-entete) + 12px);
}

body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.7rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul { margin: 0; }

a { color: var(--bleu); text-underline-offset: 0.18em; }
a:hover { color: var(--bleu-fonce); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Utilitaires ---------- */
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.lien-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--encre); color: var(--blanc); padding: 10px 16px; border-radius: var(--rayon);
}
.lien-evitement:focus { top: 12px; color: var(--blanc); }

.conteneur { width: 100%; max-width: var(--conteneur); margin: 0 auto; padding: 0 20px; }
.conteneur--etroit { max-width: 880px; }
@media (min-width: 640px) { .conteneur { padding: 0 32px; } }

.bleu { color: var(--bleu); }
.rouge { color: var(--rouge); }

/* Repère visuel des contenus provisoires — à supprimer une fois le contenu réel en place */
mark.a-remplacer {
  background: var(--rouge-pale);
  color: var(--encre);
  outline: 1.5px dashed var(--rouge);
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 0.2em;
}

/* ---------- Icônes « ligne claire » (sprite SVG en haut de index.html) ---------- */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Surtitre de section ---------- */
.surtitre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rouge);
}
.surtitre::before { content: ""; width: 28px; height: 3px; background: currentColor; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.bouton--grand { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }

.bouton--rouge { background: var(--rouge); color: var(--blanc); }
.bouton--rouge:hover { background: var(--rouge-fonce); color: var(--blanc); }

.bouton--bleu { background: var(--bleu); color: var(--blanc); }
.bouton--bleu:hover { background: var(--bleu-fonce); color: var(--blanc); }

.bouton--contour { background: transparent; border-color: var(--encre); color: var(--encre); }
.bouton--contour:hover { background: var(--encre); color: var(--blanc); }

.bouton:disabled { opacity: 0.6; cursor: wait; }

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}
.lien-fleche .ico { transition: transform 0.15s; }
.lien-fleche:hover .ico { transform: translateX(3px); }

.lien-bouton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--bleu);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.lien-bouton:hover { color: var(--bleu-fonce); }

/* ---------- Champs de formulaire (simulateur + contact) ---------- */
.champ { margin-bottom: 18px; }

.champ__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}
.champ__label small { font-weight: 400; color: var(--gris); }

.champ__saisie {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 1.0625rem; /* ≥ 16px : pas de zoom automatique sur iPhone */
  background: var(--blanc);
  border: 2px solid var(--trait);
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.champ__saisie { min-height: 130px; resize: vertical; }
select.champ__saisie { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--encre) 50%), linear-gradient(135deg, var(--encre) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.champ__saisie:hover { border-color: var(--gris); }
.champ__saisie:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-pale); }
.champ__saisie[aria-invalid="true"] { border-color: var(--rouge); }

.champ__aide { margin: 6px 0 0; font-size: 0.9375rem; color: var(--gris); }

.erreur {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--rouge);
}
.erreur::before { content: "!"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 2px solid currentColor; border-radius: 50%; font-size: 0.75rem; line-height: 1; }

/* Case à cocher (consentement) */
.case {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.45;
  cursor: pointer;
}
.case input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--bleu);
  cursor: pointer;
}

/* Piège à robots : invisible pour les humains */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-statut { margin: 14px 0 0; font-weight: 700; }
.form-statut:empty { display: none; }
.form-statut--ok { color: var(--bleu); }
.form-statut--erreur { color: var(--rouge); }
