:root {
  --ink: #0f1a28;
  --ink-2: #143258;
  --yellow: #d19530;
  --yellow-d: #8a5a0c;
  --yellow-h: #b87d22;
  --blue: #2e7bca;
  --bg: #ffffff;
  --soft: #eef2f6;
  --text: #1f2a3a;
  --muted: #55657a;
  --line: #d5dde6;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 80px;
  --header-h: 76px;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --serif: "DM Serif Text", "Iowan Old Style", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; font-size: 1rem; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.container { width: min(1200px, 100% - 2 * var(--s3)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--s2); color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.8rem); max-width: 22ch; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 var(--s2); }
.eyebrow { display: flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .78rem; color: var(--ink); margin-bottom: var(--s2); }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--yellow); flex: none; }
.lead { font-size: 1.1rem; max-width: 56ch; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 0; background: var(--ink); color: #fff; text-decoration: none; border: 2px solid var(--ink); cursor: pointer; font: inherit; font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: #fff; color: var(--ink); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .burger:focus-visible, .arrow:focus-visible, .dot:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--sm svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.slide .btn, .section--dark .btn { background: #fff; border-color: #fff; color: var(--ink); }
.slide .btn:hover, .section--dark .btn:hover { background: transparent; color: #fff; border-color: #fff; }
.slide .btn--light { background: transparent; color: #fff; border-color: #fff; }
.slide .btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* En-tête */
.header { position: sticky; top: 0; z-index: 50; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.header.is-solid { box-shadow: 0 2px 14px rgba(0, 0, 0, .1); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.4rem; letter-spacing: .02em; color: var(--ink); font-style: italic; }
.logo b { color: var(--yellow-d); }
.logo__img { display: block; height: 60px; width: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.footer .logo__img { height: 64px; }
.nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 700; color: var(--ink); position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav a:hover::after { transform: scaleX(1); }
.header__actions { display: flex; align-items: center; gap: var(--s1); }
.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Diaporama */
.slider { position: relative; height: calc(100svh - var(--header-h)); min-height: 600px; max-height: 840px; background: var(--ink); color: #fff; overflow: hidden; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 16, 28, .78) 0%, rgba(8, 16, 28, .45) 50%, rgba(8, 16, 28, .1) 100%), linear-gradient(0deg, rgba(8, 16, 28, .55) 0%, rgba(8, 16, 28, 0) 40%); }
.slide__in { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 70px; }
.slide__in > * { max-width: 680px; opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.slide.is-active .slide__in > * { opacity: 1; transform: none; }
.slide.is-active .slide__in > :nth-child(2) { transition-delay: .12s; }
.slide.is-active .slide__in > :nth-child(3) { transition-delay: .2s; }
.slide.is-active .slide__in > :nth-child(4) { transition-delay: .28s; }
.slide.is-active .slide__in > :nth-child(5) { transition-delay: .36s; }
.slide h1, .slide h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 17ch; }
.slide .eyebrow { color: #fff; }
.slide .lead { color: #eef3f8; }
.rule { display: block; width: 56px; height: 3px; background: var(--yellow); margin: 0 0 var(--s3); }
.slide__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.slider__ctrl { position: absolute; left: 0; right: 0; bottom: var(--s3); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.dots { display: flex; gap: 8px; }
.dot { width: 44px; height: 4px; padding: 0; border: 0; border-radius: 0; background: rgba(255, 255, 255, .4); cursor: pointer; position: relative; overflow: hidden; }
.dot::before { content: ""; position: absolute; inset: 0; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.dot.is-active::before { transform: scaleX(1); }
.dot.is-active.is-running::before { animation: none; transition: transform var(--dur, 6s) linear; }
.arrows { display: flex; gap: 8px; }
.arrow { width: 46px; height: 46px; border-radius: 0; border: 1px solid #fff; background: rgba(8, 16, 28, .35); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.arrow:hover { background: #fff; color: var(--ink); }
.arrow svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.arrow .i-play { display: none; fill: currentColor; stroke: none; }
.arrow.is-paused .i-play { display: block; }
.arrow.is-paused .i-pause { display: none; }

/* Apparitions au défilement */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Sections */
.section { padding: var(--s5) 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--ink); color: #cfd8e3; }
.section--dark h2 { color: #fff; }
.section--dark .eyebrow { color: #fff; }
.grid3, .grid4 { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: var(--s4); }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center; }
.split--form { align-items: start; }

/* Chiffres clés */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--soft); padding: var(--s3); display: grid; gap: 6px; align-content: start; color: var(--muted); font-size: .92rem; }
.stat b { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1.1; color: var(--ink); }
.stat--accent { grid-column: 1 / -1; background: var(--ink); color: #cfd8e3; }
.stat--accent b { color: var(--yellow); }

/* Cartes */
.card, .mini, .feature { background: #fff; padding: var(--s4) var(--s3); }
.section--soft .mini { background: #fff; }
.card { display: flex; flex-direction: column; }
.card:hover, .feature:hover { background: var(--soft); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); margin-bottom: var(--s3); }
.card__top .ico { margin-bottom: 0; }
.chip { border: 1px solid var(--ink); color: var(--ink); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; white-space: nowrap; }
.card ul { list-style: none; padding: 0; margin: 0 0 var(--s2); display: grid; gap: 8px; font-size: .94rem; }
.card li { padding-left: 18px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--ink); }
.card__img { margin: auto 0 var(--s2); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; background: var(--soft); }
.card__img + .card__link { margin-top: 0; }
.card__link { margin-top: auto; padding-top: var(--s2); font-weight: 700; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.card__link:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.card p, .mini p, .feature p { color: var(--muted); }
.feature p, .mini p { margin: 0; font-size: .95rem; }
.feature h3, .mini h3 { margin-bottom: 10px; }
.ico { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: var(--s2); }
.ico svg { width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.num { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--ink); display: block; margin-bottom: var(--s2); padding-bottom: 12px; border-bottom: 3px solid var(--yellow); width: 56px; }

/* Étapes Enedis */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; border-top: 1px solid rgba(255, 255, 255, .2); }
.steps li { counter-increment: s; border-bottom: 1px solid rgba(255, 255, 255, .2); padding: 22px 0 22px 64px; position: relative; display: grid; gap: 2px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 18px; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--yellow); }
.steps b { color: #fff; }
.steps span { font-size: .93rem; }

/* Bandeau d'appel */
.cta { background: var(--ink-2); color: #fff; padding: var(--s4) 0; }
.cta__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.cta h2 { margin: 0; max-width: none; color: #fff; }
.cta .btn { background: #fff; border-color: #fff; color: var(--ink); }
.cta .btn:hover { background: transparent; color: #fff; }

/* FAQ */
.faq { max-width: 860px; }
.faq h2 { margin-bottom: var(--s3); }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; padding: 20px 0; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--ink); flex: none; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); }

/* Formulaire */
.contact-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: 10px; font-weight: 600; }
.contact-list a { color: var(--ink); overflow-wrap: anywhere; }
.form { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--yellow); padding: var(--s4) var(--s3) var(--s3); display: grid; gap: var(--s2); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
label { display: grid; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--ink); }
input, select, textarea { font: inherit; font-weight: 400; padding: 13px 14px; border: 1px solid #7d8da1; border-radius: 0; background: #fff; color: var(--text); width: 100%; }
textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { margin: 0; min-height: 1.4em; font-weight: 600; font-size: .95rem; }
.form__msg.ok { color: #137a3a; }
.form__msg.err { color: #c0262d; }

/* Pied de page */
.footer { background: var(--ink); color: #b4c0cf; padding: var(--s4) 0 var(--s3); }
.footer .logo { color: #fff; }
.footer .logo b { color: var(--yellow); }
.footer__in { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; align-items: start; }
.footer__in p { margin: 10px 0 0; font-size: .92rem; }
.footer nav { display: flex; gap: var(--s3); flex-wrap: wrap; }
.footer nav a { text-decoration: none; font-weight: 600; }
.footer nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.footer__copy { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid rgba(255, 255, 255, .15); font-size: .82rem; }

/* Tablette / mobile */
@media (max-width: 960px) {
  .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .burger { display: block; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--s3) var(--s3); display: none; border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px rgba(0, 0, 0, .08); }
  .nav.open { display: flex; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .slide__shade { background: linear-gradient(0deg, rgba(8, 16, 28, .9) 0%, rgba(8, 16, 28, .6) 60%, rgba(8, 16, 28, .4) 100%); }
}
@media (max-width: 560px) {
  :root { --s5: 56px; }
  .grid4, .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .slider { min-height: 640px; }
  .slide__in { justify-content: flex-end; padding-bottom: 96px; }
  .slide__cta .btn { width: 100%; }
  .slide .lead { font-size: 1rem; }
  .dot { width: 30px; }
  .form { padding: var(--s3) var(--s2) var(--s2); }
  .cta .btn { width: 100%; }
}
@media (max-width: 440px) {
  .js-phone-text { display: none; }
  .header__actions .btn--sm { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
