/* MHS Energy · feuille de style unique, mobile-first, sans police externe */

:root {
  --sapin: #0F3D3E;
  --sapin-2: #0A2E2F;
  --sapin-soft: #1C5354;
  --ambre: #F59E0B;
  --ambre-fonce: #A85A06;   /* ambre lisible sur fond clair (contraste AA) */
  --creme: #FAF7F2;
  --creme-2: #F1ECE2;
  --encre: #1F2937;
  --gris: #4B5563;
  --ligne: #E3DDD1;
  --blanc: #fff;
  --erreur: #B42318;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 14px;
  --header-h: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--creme);
  padding-bottom: 4.75rem; /* place pour la barre mobile */
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0; color: var(--sapin); }
p { margin: 0 0 1rem; }
ul, ol { padding: 0; margin: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ambre); color: var(--encre); padding: .6rem 1rem; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .75rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ambre); color: var(--encre); }
.btn-primary:hover { background: #FBB33A; }
.btn-ghost { color: var(--blanc); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: var(--blanc); background: rgba(255,255,255,.06); }
.btn-ghost-dark { color: var(--sapin); border-color: var(--sapin); background: var(--blanc); }
.btn-small { min-height: 2.6rem; padding: .5rem 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--ligne); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--sapin); }
.logo-mark { width: 2rem; height: 2rem; color: var(--sapin); }
.logo-text { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.01em; }
.logo-text strong { font-weight: 700; letter-spacing: .02em; }

.nav-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; border-radius: 10px; color: var(--sapin); }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

.nav { position: absolute; inset: var(--header-h) 0 auto 0; background: var(--creme); border-bottom: 1px solid var(--ligne); display: none; }
.nav.is-open { display: block; }
.nav ul { padding: .5rem var(--pad) 1.25rem; }
.nav a { display: block; padding: .85rem 0; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ligne); }
.nav li:last-child a { border: 0; }
.nav .nav-cta { color: var(--ambre-fonce); font-weight: 700; }

/* ---------- Hero ---------- */
.hero { background: var(--sapin); color: var(--creme); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -20% -60% auto; width: 38rem; height: 38rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245,158,11,.16), transparent);
}
.hero-inner { position: relative; display: grid; gap: 2.5rem; padding-block: clamp(3rem, 10vw, 6.5rem) clamp(3rem, 8vw, 5.5rem); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ambre); margin-bottom: 1rem; }
.eyebrow-dark { color: var(--ambre-fonce); }
.hero h1 { color: var(--blanc); font-size: clamp(2.6rem, 9vw, 4.75rem); max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--ambre); }
.lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: rgba(250,247,242,.86); max-width: 36rem; margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .btn { flex: 1 1 100%; }
.hero-note { margin: 1.25rem 0 0; font-size: .95rem; color: rgba(250,247,242,.7); }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.5rem; font-size: .95rem; color: rgba(250,247,242,.85); }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points li::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ambre); flex: none; }
.hero-art { display: none; width: 100%; max-width: 26rem; justify-self: center; }
.hero-curve { stroke-dasharray: 430; stroke-dashoffset: 430; animation: draw 1.6s .2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Chiffres ---------- */
.figures { background: var(--sapin-2); color: var(--creme); }
.figures-list { display: grid; grid-template-columns: 1fr; }
.figures-list li { padding: 1.6rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.figures-list li:first-child { border-top: 0; }
.fig { display: block; font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.1rem); color: var(--ambre); line-height: 1.15; }
.fig-label { display: block; margin-top: .3rem; color: rgba(250,247,242,.78); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 11vw, 7rem); }
.section-tint { background: var(--creme-2); }
.section-head { max-width: 40rem; margin-bottom: clamp(2.25rem, 6vw, 3.5rem); }
.section h2 { font-size: clamp(2rem, 6vw, 3rem); }
h3 { font-size: 1.35rem; }

/* Services */
.cards { display: grid; gap: 1rem; }
.card { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius); padding: 1.75rem 1.5rem; }
.card-num { display: inline-block; font-family: var(--serif); font-size: 1rem; color: var(--ambre-fonce); border-bottom: 2px solid var(--ambre); padding-bottom: .2rem; margin-bottom: 1.25rem; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--gris); margin: 0; }

/* Offres */
.section-intro { margin: 1.25rem 0 0; color: var(--gris); font-size: 1.05rem; }
.offers { display: grid; gap: 1.25rem; max-width: 52rem; }
.offer { position: relative; display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--ligne); border-radius: calc(var(--radius) + 4px); padding: 2rem 1.75rem; }
.offer h3 { font-size: 1.5rem; }
.offer-price { font-family: var(--serif); font-size: 2.5rem; line-height: 1.1; color: var(--sapin); margin: .5rem 0 1.5rem; }
.offer-price span { font-family: var(--sans); font-size: .95rem; color: var(--gris); }
.offer-list { display: grid; gap: .7rem; margin-bottom: 2rem; flex: 1; }
.offer-list li { position: relative; padding-left: 1.75rem; color: var(--encre); }
.offer-list li::before { content: ""; position: absolute; left: .1rem; top: .45rem; width: .8rem; height: .45rem; border-left: 2px solid var(--ambre-fonce); border-bottom: 2px solid var(--ambre-fonce); transform: rotate(-45deg); }
.offer-featured { background: var(--sapin); border-color: var(--sapin); color: var(--creme); }
.offer-featured h3, .offer-featured .offer-price { color: var(--blanc); }
.offer-featured .offer-price span { color: rgba(250,247,242,.75); }
.offer-featured .offer-list li { color: rgba(250,247,242,.9); }
.offer-featured .offer-list li::before { border-color: var(--ambre); }
.offer-badge { position: absolute; top: -.8rem; right: 1.5rem; margin: 0; background: var(--ambre); color: var(--encre); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 999px; }

/* Étapes */
.steps { counter-reset: step; display: grid; gap: 0; }
.step { counter-increment: step; position: relative; padding: 0 0 2.25rem 4rem; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: -.2rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--sapin); color: var(--ambre); font: 600 1.15rem var(--serif);
}
.step::after { content: ""; position: absolute; left: 1.35rem; top: 2.8rem; bottom: .3rem; width: 2px; background: var(--ligne); }
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--gris); margin: 0; }

/* Pourquoi */
.why { display: grid; gap: 2.5rem; }
.why-head h2 { font-size: clamp(2rem, 6vw, 3rem); }
.why-list { margin: 0; display: grid; gap: 0; }
.why-list > div { padding: 1.5rem 0; border-top: 1px solid var(--ligne); }
.why-list > div:last-child { border-bottom: 1px solid var(--ligne); }
.why-list dt { font-family: var(--serif); font-size: 1.35rem; color: var(--sapin); margin-bottom: .4rem; }
.why-list dd { margin: 0; color: var(--gris); }

/* ---------- Contact ---------- */
.contact { background: var(--sapin); color: var(--creme); }
.contact h2 { color: var(--blanc); }
.contact-inner { display: grid; gap: 2.5rem; }
.contact-intro > p:not(.eyebrow) { color: rgba(250,247,242,.86); margin-top: 1rem; max-width: 30rem; }
.contact-direct { margin: 2rem 0; display: grid; gap: 1rem; }
.contact-direct li { display: grid; gap: .1rem; }
.cd-label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,247,242,.65); }
.contact-direct a { color: var(--blanc); font-size: 1.15rem; font-weight: 600; text-decoration-color: var(--ambre); text-underline-offset: 4px; word-break: break-word; }

.form-card { background: var(--creme); color: var(--encre); border-radius: calc(var(--radius) + 4px); padding: clamp(1.5rem, 5vw, 2.25rem); box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.opt { font-weight: 400; color: var(--gris); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--encre);
  background: var(--blanc); border: 1.5px solid #CFC7B8; border-radius: 10px; padding: .8rem .9rem; min-height: 3rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 6rem; }
input:focus, textarea:focus { outline: none; border-color: var(--sapin); box-shadow: 0 0 0 3px rgba(15,61,62,.18); }
input[aria-invalid="true"] { border-color: var(--erreur); }
.err { margin: 0; font-size: .875rem; color: var(--erreur); min-height: 0; }
.err:empty { display: none; }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .4rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: grid; place-items: center; min-height: 3rem; padding: .5rem; text-align: center;
  border: 1.5px solid #CFC7B8; border-radius: 10px; background: var(--blanc); font-weight: 500; font-size: .95rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.choice input:checked + span { background: var(--sapin); border-color: var(--sapin); color: var(--blanc); }
.choice input:focus-visible + span { outline: 3px solid var(--ambre); outline-offset: 2px; }

.plans { display: grid; gap: .6rem; margin-top: .4rem; }
.plan { position: relative; }
.plan input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.plan span {
  display: grid; gap: .1rem; padding: .85rem 1rem .85rem 3rem; position: relative;
  border: 1.5px solid #CFC7B8; border-radius: 12px; background: var(--blanc);
  transition: border-color .15s ease, background-color .15s ease;
}
.plan span::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 1.2rem; height: 1.2rem; margin-top: -.6rem; border-radius: 50%; border: 2px solid #A8A091; background: var(--blanc); }
.plan strong { font-size: 1rem; }
.plan small { font-size: .9rem; color: var(--gris); }
.plan input:checked + span { border-color: var(--sapin); background: #EEF4F3; }
.plan input:checked + span::before { border-color: var(--sapin); box-shadow: inset 0 0 0 4px var(--blanc); background: var(--sapin); }
.plan input:focus-visible + span { outline: 3px solid var(--ambre); outline-offset: 2px; }
.hint { margin: -.15rem 0 .15rem; font-size: .875rem; color: var(--gris); }
.field .file { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 3.25rem; padding: .5rem; border: 1.5px dashed #B9B09F; border-radius: 10px; background: var(--blanc); cursor: pointer; font-weight: 400; }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-btn { flex: none; padding: .5rem .9rem; border-radius: 8px; background: var(--sapin); color: var(--blanc); font-weight: 600; font-size: .9rem; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gris); font-size: .9rem; }
.file.has-file { border-style: solid; border-color: var(--sapin); background: #EEF4F3; }
.file.has-file .file-name { color: var(--encre); font-weight: 500; }
.file:focus-within { outline: 3px solid var(--ambre); outline-offset: 2px; }
.file input[aria-invalid="true"] ~ .file-btn { background: var(--erreur); }
.offers-note { margin: 1.5rem 0 0; font-size: .95rem; color: var(--gris); }
.express-note { margin: 0; font-size: .9rem; color: var(--gris); }
.pro-note { font-size: .95rem; border-left: 3px solid var(--ambre); padding-left: .9rem; color: rgba(250,247,242,.86); }

.consent { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
.consent input { width: 1.35rem; height: 1.35rem; margin: .15rem 0 0; accent-color: var(--sapin); }
.consent label { font-weight: 400; font-size: .9rem; color: var(--gris); }
.consent label a { color: var(--sapin); }
.consent .err { grid-column: 1 / -1; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.is-error { color: var(--erreur); }
.form-success { text-align: center; padding: 2rem 0; }
.form-success:focus { outline: none; }
.form-success h3 { font-size: 1.6rem; margin-bottom: .75rem; }
.form-success p { color: var(--gris); margin: 0; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--sapin-2); color: rgba(250,247,242,.78); font-size: .95rem; padding-top: 3.5rem; }
.footer-inner { display: grid; gap: 2rem; }
.logo-footer { color: var(--blanc); margin-bottom: .75rem; }
.site-footer a { color: rgba(250,247,242,.9); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ambre); }
.site-footer nav li { margin-bottom: .6rem; }
.copy { padding-block: 1.75rem 1.5rem; margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: rgba(250,247,242,.6); }

/* ---------- Barre mobile fixe ---------- */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; grid-template-columns: 1fr;
  padding: .65rem var(--pad) calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(250,247,242,.96); border-top: 1px solid var(--ligne);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mobile-bar .btn { min-height: 3.1rem; }
.mobile-bar { transition: transform .25s ease; }
.mobile-bar.is-hidden { transform: translateY(110%); }

/* ---------- Pages légales ---------- */
.legal { padding-block: clamp(3rem, 8vw, 5rem); max-width: 46rem; }
.legal h1 { font-size: clamp(2.2rem, 7vw, 3rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
.legal a { color: var(--sapin); }
.legal .back { display: inline-block; margin-bottom: 2rem; font-weight: 600; text-decoration: none; color: var(--ambre-fonce); }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.legal .note { background: var(--creme-2); border-left: 3px solid var(--ambre); padding: 1rem 1.25rem; border-radius: 6px; font-size: .95rem; }
.page-simple { padding-bottom: 0; }

/* ---------- Tablette et ordinateur ---------- */
@media (min-width: 40rem) {
  .figures-list { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem; }
  .figures-list li { border-top: 0; border-left: 1px solid rgba(255,255,255,.1); padding: 2.25rem 0 2.25rem 1.5rem; }
  .figures-list li:first-child { border-left: 0; padding-left: 0; }
  .cards { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .offers { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 56rem) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .nav-toggle { display: none; }
  .nav { position: static; display: block; background: none; border: 0; }
  .nav ul { display: flex; align-items: center; gap: 2rem; padding: 0; }
  .nav a { padding: .4rem 0; border: 0; font-size: .98rem; }
  .nav a:hover { color: var(--ambre-fonce); }
  .nav .nav-cta { background: var(--sapin); color: var(--blanc); padding: .6rem 1.2rem; border-radius: 999px; }
  .nav .nav-cta:hover { background: var(--sapin-soft); color: var(--blanc); }

  .hero-inner { grid-template-columns: 1.25fr 1fr; align-items: center; }
  .hero-art { display: block; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .step { padding: 4.25rem 0 0; }
  .step::before { top: 0; }
  .step::after { left: 3.5rem; right: -1.5rem; top: 1.35rem; bottom: auto; width: auto; height: 2px; }
  .why { grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: start; }
  .why-head { position: sticky; top: calc(var(--header-h) + 2rem); }
  .contact-inner { grid-template-columns: 1fr 1.15fr; gap: 5rem; align-items: start; }
  .footer-inner { grid-template-columns: 2fr 1fr; }
}

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