/* ABR Électricité : projet de démonstration AM Studio
   Palette d'origine « le tableau » : blanc appareillage, gris coffret, graphite,
   bleu neutre, rayure vert/jaune de terre. Composition éditoriale, photos réelles. Voir DESIGN.md. */

:root {
  --paper: #F6F7F4;          /* blanc appareillage */
  --white: #FFFFFF;
  --enclosure: #D8DCD5;      /* gris coffret, RAL 7035 */
  --enclosure-soft: #E8EBE5;
  --line: #C9CEC6;
  --ink: #1C242C;            /* graphite, gaine de câble */
  --ink-2: #2A333D;
  --ink-line: #36424D;
  --ink-soft: #46515C;
  --on-ink-soft: #C9CFD3;
  --neutral: #1F47B0;        /* bleu neutre : actions, liens */
  --neutral-deep: #163683;
  --earth-green: #2F9A4A;
  --earth-yellow: #F2C21B;
  --pilot: #3BB54A;          /* voyant sous tension */
  --error: #B42318;

  --earth-stripe: repeating-linear-gradient(-45deg, var(--earth-green) 0 10px, var(--earth-yellow) 10px 20px);

  --font-display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Segoe UI", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 9vw, 120px);
  --radius: 4px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

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

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { font-size: 0.78rem; color: var(--ink-soft); margin-top: 8px; }

a { color: var(--neutral); text-underline-offset: 3px; }
a:hover { color: var(--neutral-deep); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

:focus-visible { outline: 3px solid var(--neutral); outline-offset: 3px; }

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

.skip { position: absolute; left: 16px; top: -100px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* Repère « fil de terre » au-dessus des titres de section */
.section-head h2::before,
.process-intro h2::before,
.faq h2::before,
.quote-contact h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 5px;
  margin-bottom: 20px;
  border-radius: 3px;
  background: var(--earth-stripe);
  background-size: 18px 18px;
}

/* ---------- Bandeau démo ---------- */
.demo-ribbon { background: var(--ink); color: #E6E9E4; font-size: 0.8125rem; text-align: center; padding: 7px var(--gutter); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 244, 0.95);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 72px; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 7px;
  margin: 0;
}
.wordmark:hover { color: var(--ink); }
.wordmark::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 4px;
  background: var(--earth-stripe);
  background-size: 28px 28px;
}
.wordmark-abr { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; letter-spacing: 0.02em; line-height: 1; }
.wordmark-sub { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1; color: var(--ink-soft); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  border-radius: 3px;
}
.site-nav a:hover { background: var(--enclosure); color: var(--ink); }

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--neutral);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 3px;
}
.header-call:hover { background: var(--neutral-deep); color: #fff; }

.menu-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .2s ease, background-color .2s;
}
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  min-height: 52px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--neutral); color: #fff; }
.btn-primary:hover { background: var(--neutral-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--earth-yellow); color: var(--ink); }

/* ---------- Héros ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 8px minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero-kicker { font-weight: 600; color: var(--ink-soft); margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.hero-lead { margin-top: 24px; font-size: 1.12rem; max-width: 52ch; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.rating { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.rating:hover { color: var(--ink); }
.rating-score { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.rating-max { font-size: 1.05rem; color: var(--ink-soft); font-weight: 600; }
.rating-body { display: grid; gap: 4px; }
.rating-stars { color: var(--earth-yellow); }
.rating-text { font-weight: 600; font-size: .95rem; }
.rating-text small { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-soft); }
.rating:hover .rating-text { color: var(--neutral); text-decoration: underline; text-underline-offset: 3px; }

.hero-badges { display: flex; gap: 12px; margin-left: auto; }
.hero-badges img,
.footer-badges img,
.legrand-badges img { object-fit: contain; background: #fff; border-radius: 50%; }
.hero-badges img {
  width: 80px; height: 80px;
  padding: 4px;
  box-shadow: 0 0 0 1px var(--line);
}

/* Le fil de terre vertical */
.earth-wire {
  display: block;
  align-self: stretch;
  width: 8px;
  background: var(--earth-stripe);
  border-radius: 4px;
  transform-origin: top;
  animation: draw-wire 1.1s cubic-bezier(.6, 0, .2, 1) .15s both;
}
@keyframes draw-wire { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw-wire-h { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-art img {
  width: 100%;
  aspect-ratio: 9 / 11;
  max-height: 640px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- En-têtes de section ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head p { color: var(--ink-soft); max-width: 46ch; }

/* ---------- Prestations : le tableau ---------- */
.services { padding-block: var(--section); border-top: 1px solid var(--line); }

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.board {
  position: relative;
  background:
    radial-gradient(circle, #A9AEA6 0 3px, var(--enclosure-soft) 3.5px 5px, transparent 5.5px) 10px 10px / 12px 12px no-repeat,
    radial-gradient(circle, #A9AEA6 0 3px, var(--enclosure-soft) 3.5px 5px, transparent 5.5px) calc(100% - 10px) 10px / 12px 12px no-repeat,
    radial-gradient(circle, #A9AEA6 0 3px, var(--enclosure-soft) 3.5px 5px, transparent 5.5px) 10px calc(100% - 10px) / 12px 12px no-repeat,
    radial-gradient(circle, #A9AEA6 0 3px, var(--enclosure-soft) 3.5px 5px, transparent 5.5px) calc(100% - 10px) calc(100% - 10px) / 12px 12px no-repeat,
    var(--enclosure);
  border-radius: 8px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.06),
    inset 0 2px 0 rgba(255,255,255,.6),
    0 1px 0 #C3C8C0,
    0 24px 40px -28px rgba(28, 36, 44, .45);
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.board-row {
  background: var(--enclosure-soft);
  border-radius: 5px;
  padding: 10px clamp(10px, 1.6vw, 18px) 14px;
  box-shadow: inset 0 1px 3px rgba(28,36,44,.12);
}
.board-row-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }

.rail { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rail::before {
  content: "";
  position: absolute;
  left: -6px; right: -6px; top: 50%;
  height: 22px;
  transform: translateY(-50%);
  background: linear-gradient(#B9BEB7, #E3E6E0 30%, #A9AEA7 70%, #C7CBC4);
  border-radius: 2px;
}

.breaker {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 64px auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 8px 6px 10px;
  background: linear-gradient(180deg, #FFFFFF, #FBFBF9 60%, #EEEFEB);
  border: 1px solid #C6CAC3;
  border-radius: 4px;
  box-shadow: 0 2px 0 #B8BCB4, 0 4px 8px -4px rgba(28,36,44,.25);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .15s;
}
.breaker:hover { border-color: var(--ink-soft); }
.breaker:active { transform: translateY(1px); box-shadow: 0 1px 0 #B8BCB4; }

.breaker-ref { display: flex; align-items: center; justify-content: center; height: 12px; }
.breaker-ref::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #B7BBB3;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.25);
  transition: background-color .2s, box-shadow .2s;
}

.breaker-lever {
  position: relative;
  width: 26px; height: 60px;
  background: #2A3138;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.5);
}
.breaker-lever::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; bottom: 3px;
  height: 26px;
  background: linear-gradient(#F4F5F2, #D9DCD5);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
  transition: transform .28s cubic-bezier(.5, 1.6, .5, 1);
}

.breaker-name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 4px;
  background: #fff;
  border: 1px solid #E1E3DE;
  border-radius: 2px;
  width: 100%;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  hyphens: auto;
}

.breaker[aria-selected="true"] { border-color: var(--neutral); box-shadow: 0 2px 0 var(--neutral), 0 6px 14px -6px rgba(31,71,176,.45); }
.breaker[aria-selected="true"] .breaker-lever::after { transform: translateY(-28px); }
.breaker[aria-selected="true"] .breaker-ref::after { background: var(--pilot); box-shadow: 0 0 0 3px rgba(59,181,74,.22), 0 0 8px rgba(59,181,74,.8); }

.blank {
  position: relative;
  z-index: 1;
  min-height: 150px;
  background: linear-gradient(180deg, #F3F4F1, #E4E6E1);
  border: 1px solid #C6CAC3;
  border-radius: 4px;
  box-shadow: 0 2px 0 #B8BCB4;
}

.panels { position: relative; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--neutral);
  border-radius: 3px;
  padding: clamp(24px, 3vw, 36px);
}
html:not(.js) .panel + .panel { margin-top: 16px; }
.panel h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 14px; }
.panel p { color: var(--ink-soft); }
.panel ul { list-style: none; margin: 22px 0 26px; padding: 0; border-top: 1px solid var(--line); }
.panel li { padding: 11px 0 11px 22px; border-bottom: 1px solid var(--line); position: relative; }
.panel li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 10px; height: 2px;
  background: var(--neutral);
}
.panel-cta { font-weight: 600; }
.panel.is-entering { animation: panel-in .3s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-back { display: none; }
@media (min-width: 960px) { .panels { position: sticky; top: 104px; } }

/* ---------- Déroulement ---------- */
.process { padding-block: var(--section); background: #fff; border-block: 1px solid var(--line); }
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.process-intro p { margin-top: 20px; color: var(--ink-soft); max-width: 46ch; }
.process-art { margin-top: 36px; }
.process-art img { border-radius: var(--radius); width: 100%; aspect-ratio: 9 / 7; object-fit: cover; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  left: 23px; top: 24px; bottom: 24px;
  width: 3px;
  background: var(--neutral);
  border-radius: 2px;
}
.steps li { position: relative; counter-increment: step; padding: 0 0 clamp(32px, 4vw, 48px) 76px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 3px solid var(--neutral);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--neutral);
}
.steps h3 { padding-top: 9px; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); max-width: 50ch; }

/* ---------- Legrand (graphite, liste éditoriale) ---------- */
.legrand {
  position: relative;
  padding-block: var(--section);
  background: var(--ink);
  color: #E9ECE7;
}
.legrand::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 6px;
  background: var(--earth-stripe);
  background-size: 24px 24px;
}
.legrand-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.legrand-badges { display: flex; gap: 16px; margin-bottom: 32px; }
.legrand-badges img { width: 120px; height: 120px; padding: 6px; }
.legrand h2 { color: #fff; max-width: 20ch; }
.legrand-text p { margin-top: 20px; max-width: 52ch; color: var(--on-ink-soft); }
.legrand-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.text-link { color: #fff; font-weight: 600; text-decoration-color: var(--earth-yellow); text-decoration-thickness: 2px; }
.text-link:hover { color: var(--earth-yellow); }
.legrand :focus-visible { outline-color: var(--earth-yellow); }

.catalog { margin: 0; border-top: 1px solid var(--ink-line); align-self: center; }
.catalog div {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--ink-line);
}
.catalog dt { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: #fff; }
.catalog dd { margin: 0; color: var(--on-ink-soft); }

/* ---------- Zone (photo de Gex) ---------- */
.zone { padding-bottom: var(--section); }
.zone-art img { width: 100%; height: clamp(260px, 38vw, 520px); object-fit: cover; object-position: center 55%; }
.zone-art { position: relative; }
.zone-art figcaption.wrap {
  position: absolute;
  right: var(--gutter);
  top: 14px;
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.zone-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(48px, 6vw, 80px);
  align-items: start;
}
.zone-text { align-self: start; }
.zone-text::before {
  content: "";
  display: block;
  width: 48px;
  height: 5px;
  margin-bottom: 20px;
  border-radius: 3px;
  background: var(--earth-stripe);
  background-size: 18px 18px;
}
.zone-text > p { margin-top: 20px; color: var(--ink-soft); max-width: 50ch; }
.zone-text .zone-ask { font-size: 0.95rem; }
.zone-list { padding-top: 6px; }
.communes { list-style: none; margin: 0; padding: 0; columns: 3 150px; column-gap: 24px; }
.communes li {
  break-inside: avoid;
  padding: 8px 0 8px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.communes li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--pilot);
}
.communes li:first-child { font-weight: 700; color: var(--neutral); }

/* ---------- FAQ ---------- */
.faq { padding-block: var(--section); background: var(--enclosure); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.faq-list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid #B9BEB6; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  margin-top: 6px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--neutral); }
.faq details p { padding: 0 0 22px; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Devis ---------- */
.quote { padding-block: var(--section); }
.quote-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.quote-contact > p { margin-top: 20px; color: var(--ink-soft); max-width: 40ch; }

.big-phone {
  display: block;
  margin-top: 36px;
  padding: 20px 24px;
  background: var(--neutral);
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
}
.big-phone:hover { background: var(--neutral-deep); color: #fff; }
.big-phone-label { display: block; font-size: 0.9rem; opacity: .85; }
.big-phone .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 3.2vw, 2.4rem); line-height: 1.1; }

.contact-list { margin: 28px 0 0; }
.contact-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list dt { color: var(--ink-soft); font-size: 0.92rem; padding-top: 1px; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list address { font-style: normal; }

.quote-form {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--ink);
  border-radius: 3px;
  padding: clamp(20px, 3.4vw, 40px);
  display: grid;
  gap: 20px;
}
.form-demo-note { font-size: 0.9rem; padding: 12px 14px; background: #FFF8DB; border-left: 4px solid var(--earth-yellow); color: #4A3F12; }

.field-group { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.field-group legend { font-weight: 600; margin-bottom: 8px; padding: 0; width: 100%; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > label { font-weight: 600; }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #AEB4AB;
  border-radius: 3px;
  padding: 12px 14px;
  min-height: 50px;
  transition: border-color .15s, background-color .15s;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
textarea { resize: vertical; min-height: 130px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--neutral); outline: 2px solid var(--neutral); outline-offset: 0; }

.choice { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.choice input { width: 20px; height: 20px; accent-color: var(--neutral); margin: 0; flex: none; }
.consent { align-items: flex-start; font-size: 0.95rem; }
.consent input { margin-top: 3px; }

.field-hint { font-size: 0.85rem; color: var(--ink-soft); }
.field-error { font-size: 0.88rem; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--error) !important; background: #FFF6F5; }

.form-summary { padding: 12px 14px; border-left: 4px solid var(--error); background: #FFF6F5; color: var(--error); font-weight: 600; }
.btn-submit { justify-self: start; }

.form-success { padding: 24px; background: #EEF6EF; border-left: 6px solid var(--pilot); border-radius: 3px; display: grid; gap: 14px; justify-items: start; }
.form-success h3 { font-size: 1.6rem; }
.form-success p { color: var(--ink-soft); max-width: 56ch; }
.form-success .btn { min-height: 46px; }
.quote-form.is-done > :not(.form-success):not(.form-demo-note) { display: none; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #AEB6BC; padding-block: 56px 40px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--earth-yellow); }
.site-footer :focus-visible { outline-color: var(--earth-yellow); }
.wordmark-footer { color: #fff; margin-bottom: 18px; }
.wordmark-footer .wordmark-abr { font-size: 2.2rem; }
.wordmark-footer .wordmark-sub { font-size: 1.4rem; color: #AEB6BC; }
.footer-badges { display: flex; gap: 10px; margin-top: 22px; }
.footer-badges img { width: 64px; height: 64px; padding: 3px; }
.footer-legal { max-width: 70ch; }
.footer-legal p + p { margin-top: 12px; }
.footer-legal strong { color: #E9ECE7; }

/* ---------- Barre d'appel mobile ---------- */
.call-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav a { padding: 8px 8px; font-size: 0.94rem; }
  .header-inner { gap: 20px; }
}

@media (max-width: 959px) {
  .menu-toggle { display: inline-flex; }
  .header-call { display: none; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(28,36,44,.4);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 20px; gap: 0; }
  .site-nav a { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  html:not(.js) .site-nav { position: static; display: block; box-shadow: none; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .earth-wire { width: 100%; height: 6px; transform-origin: left; animation-name: draw-wire-h; }
  .hero-art img { aspect-ratio: 4 / 3.4; max-height: 520px; }
  .hero-badges { margin-left: 0; }

  .section-head,
  .board-layout,
  .process-grid,
  .legrand-grid,
  .zone-grid,
  .faq-grid,
  .quote-grid,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .zone-grid { margin-top: 40px; }

  .panels { scroll-margin-top: 96px; }
  .board { scroll-margin-top: 88px; }
  .panel-back {
    display: block;
    margin-top: 12px;
    background: none;
    border: 0;
    padding: 10px 0;
    font: inherit;
    font-weight: 600;
    color: var(--neutral);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  .call-bar {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--ink);
  }
  .call-bar a { display: grid; place-items: center; min-height: 56px; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
  .call-bar-phone { background: var(--neutral); color: #fff; }
  .call-bar-quote { color: #fff; }
  .call-bar a:hover { color: #fff; }
  body { padding-bottom: 56px; }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }
  .wordmark-abr { font-size: 1.55rem; }
  .wordmark-sub { font-size: 1.02rem; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .hero-lead { font-size: 1.04rem; }
  .hero-actions .btn { width: 100%; }
  .hero-badges img { width: 70px; height: 70px; }

  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
  .rail::before { display: none; }
  .blank { display: none; }
  .breaker { min-height: 0; grid-template-rows: auto 52px auto; }
  .breaker-lever { height: 48px; width: 24px; }
  .breaker-lever::after { height: 21px; }
  .breaker[aria-selected="true"] .breaker-lever::after { transform: translateY(-21px); }

  .legrand-badges img { width: 104px; height: 104px; }
  .catalog div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .communes { columns: 2; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .btn-submit { width: 100%; justify-self: stretch; }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .demo-ribbon, .site-header, .call-bar, .quote-form { display: none; }
  body { background: #fff; }
}
