@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('assets/fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #172f36;
  --green: #285c4d;
  --green-dark: #1f4438;
  --pale: #f3f6f2;
  --muted: #56625f;
  --line: #d9e1db;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #7fb08f; outline-offset: 3px; }

.container { width: min(1180px, 100% - 64px); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: #fff;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Boutons et liens */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--green); border-radius: 4px;
  background: var(--green); color: #fff;
  font-size: 1rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button-small { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.button-outline { background: transparent; color: var(--green); }
.button-outline:hover { background: #e8efe9; color: var(--green-dark); }
.text-link { color: var(--green); font-weight: 500; text-underline-offset: 4px; }
.text-link:hover { color: var(--green-dark); }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.0625rem; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: .9375rem; }
.main-nav > a:not(.button) { text-decoration: none; }
.main-nav > a:not(.button):hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle {
  display: none; padding: 8px 14px; background: none;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}

/* Accueil */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding-block: 64px 80px;
}
.hero-copy { max-width: 36rem; }
.lead { margin-top: 24px; font-size: 1.1875rem; color: #33464a; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.hero-for { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.hero-visual img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 4px; }

/* Sections */
.section { padding-block: 88px; }
.band { background: var(--pale); padding-block: 88px; }
.section-intro { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; margin-bottom: 40px; }
.section-intro p { color: var(--muted); max-width: 38rem; }

/* Prestations : lignes plutôt que cartes */
.services { border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px;
  padding-block: 32px; border-bottom: 1px solid var(--line);
}
.service p { max-width: 38rem; }
.service p + p { margin-top: 12px; }
.service-output { color: var(--muted); }
.service-output strong { color: var(--ink); font-weight: 600; }

/* Situations */
.situations { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 28px 0 32px; border-bottom: 1px solid #ccd6cf; }
.tabs button {
  padding: 10px 0; margin-bottom: -1px; background: none; border: 0;
  border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-size: 1rem;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); font-weight: 600; }
.tab-panel h3 { font-size: 1.4rem; margin-bottom: 12px; }
.tab-panel > p { max-width: 34rem; color: #33464a; }
.list { margin: 20px 0 32px; padding-left: 1.2em; }
.list li { padding-left: 4px; }
.list li + li { margin-top: 6px; }
.list li::marker { color: var(--green); }

/* Étiquette DPE */
.dpe { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.dpe figcaption strong { display: block; font-size: 1.0625rem; }
.dpe figcaption span { display: block; margin-top: 4px; font-size: .9375rem; color: var(--muted); }
.dpe-scale { list-style: none; padding: 0; margin: 24px 0 16px; display: grid; gap: 6px; }
.dpe-scale li { display: flex; align-items: center; gap: 12px; }
.dpe-letter, .dpe-range { height: 34px; display: flex; align-items: center; }
.dpe-letter {
  width: calc(var(--w) * 1%); min-width: 48px; padding-left: 12px;
  color: #fff; font-weight: 600; font-size: 1.125rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  background: var(--c);
}
.dpe-range { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.dpe-flag {
  margin-left: auto; padding: 3px 10px; border-radius: 3px;
  font-size: .8125rem; font-weight: 600; white-space: nowrap;
}
.is-current .dpe-flag { background: #fbe4d6; color: #8a3a10; }
.is-target .dpe-flag { background: #dff0de; color: #1f4f2c; }
.is-current .dpe-letter, .is-target .dpe-letter { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.dpe-a { --c: #00894f; --w: 22; }
.dpe-b { --c: #3aa250; --w: 30; }
.dpe-c { --c: #8ec63f; --w: 38; }
.dpe-d { --c: #e2c400; --w: 46; }
.dpe-e { --c: #f0a514; --w: 54; }
.dpe-f { --c: #e8702a; --w: 62; }
.dpe-g { --c: #d42c1d; --w: 70; }
.dpe-c .dpe-letter, .dpe-d .dpe-letter { color: #1d2b1f; }
.dpe-note { font-size: .875rem; color: var(--muted); }

/* Étapes : vraie séquence, donc numérotée */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { counter-increment: step; border-top: 2px solid var(--green); padding-top: 20px; }
.steps li::before { content: counter(step); display: block; font-weight: 600; color: var(--green); margin-bottom: 8px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: #33464a; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; }
.faq-list { border-top: 1px solid #ccd6cf; }
.faq-list details { border-bottom: 1px solid #ccd6cf; }
.faq-list summary { padding: 18px 32px 18px 0; cursor: pointer; font-weight: 500; position: relative; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 1.3rem; color: var(--green); }
.faq-list details[open] summary::after { content: '–'; }
.faq-list details p { padding: 0 32px 20px 0; color: #33464a; max-width: 40rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; }
.contact-intro p { margin-top: 16px; color: #33464a; max-width: 24rem; }
.contact-intro address { margin-top: 28px; font-style: normal; color: var(--muted); font-size: .9375rem; }
.contact-form { display: grid; gap: 20px; max-width: 40rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; font-size: .9375rem; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; background: #fff;
  border: 1px solid #b9c6bd; border-radius: 4px; font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--green); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.contact-form .button { justify-self: start; }
.form-note { font-size: .875rem; color: var(--muted); }
.form-error { color: #b3261e; font-size: .9375rem; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: .875rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; gap: 20px; }
.footer-links button { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.footer-links button:hover { color: var(--ink); }

/* Mentions légales */
.dialog {
  width: min(640px, 100% - 32px); max-height: 88dvh; overflow: auto;
  padding: 36px; border: 0; border-radius: 6px; color: var(--ink);
}
.dialog::backdrop { background: rgba(23, 47, 54, .6); }
.dialog h2 { font-size: 1.5rem; margin-bottom: 16px; padding-right: 32px; }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  background: none; border: 1px solid var(--line); border-radius: 4px;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
#legal-content p { margin-bottom: 12px; font-size: .9375rem; color: #33464a; }

/* Tablette */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 40px 64px; }
  .hero-copy { max-width: none; }
  .situations { grid-template-columns: 1fr; gap: 48px; }
  .section-intro, .service, .faq, .contact { grid-template-columns: 1fr; gap: 16px; }
  .faq, .contact { gap: 32px; }
}

/* Mobile */
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .menu-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 20px 20px; background: #fff; border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a:not(.button) { padding: 10px 0; }
  .main-nav .button { margin-top: 8px; }
  .section, .band { padding-block: 64px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
  .dpe { padding: 20px; }
  .dpe-range { display: none; }
  .dpe-letter { width: calc(var(--w) * 1.1%); }
  .dialog { padding: 28px 20px; }
}
