/* =========================================================
   SELISS ENGINEERING — Site vitrine
   Thème clair par défaut ; thème sombre quand on « éteint la lumière »
   (attribut data-theme="dark" posé par l'interrupteur).
   Palette issue du logo : graphite + orange énergie.
   ========================================================= */

:root {
  color-scheme: light;

  /* Marque */
  --orange: #F97316;
  --orange-hot: #FB923C;
  --orange-deep: #EA580C;
  --orange-ink: #C2410C;
  --accent-text: #EA580C;          /* orange des mots en italique, lisible sur fond clair */
  --graphite: #3A3F47;

  /* Surfaces */
  --bg: #FFFFFF;
  --paper: #F7F6F3;
  --tint: #FFF6EE;
  --surface: #FFFFFF;
  --surface-glass: rgba(255,255,255,.92);
  --line: #E7E4DF;
  --line-strong: #D3CFC9;
  --text: #1B1E23;
  --muted: #5A606A;
  --hero-bg: #F7F6F3;
  --grid-line: rgba(58,63,71,.07);

  /* Schéma électrique */
  --circuit: rgba(234,88,12,.3);
  --circuit-comp: rgba(234,88,12,.62);

  /* Emplacements d'images */
  --ph-bg: #ECEDEF;
  --ph-grid: rgba(234,88,12,.12);
  --ph-grad: linear-gradient(135deg, #F2F3F5, #E2E5E9);
  --ph-label-bg: rgba(255,255,255,.9);
  --ph-label: #3A3F47;

  /* Illustrations */
  --ill-backdrop: #FFF0E3;
  --ill-line: #3A3F47;
  --ill-surface: #FFFFFF;
  --ill-soft: #EEF0F3;
  --ill-window: #E3E8EF;
  --ill-green: #65A30D;
  --room-off: #F1F2F4;
  --room-on: #FEF3C7;

  /* Typo */
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Rythme */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --slant: 12%;
  --ease: cubic-bezier(.2,.7,.2,1);
  --shadow: 0 1px 2px rgba(16,18,22,.05), 0 12px 32px -14px rgba(16,18,22,.18);
  --shadow-lg: 0 24px 60px -24px rgba(16,18,22,.35);

  --z-nav: 50;
  --z-skip: 60;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-text: #FB923C;
  --orange-ink: #FB923C;
  --bg: #111316;
  --paper: #16191D;
  --tint: #1A1816;
  --surface: #1C1F24;
  --surface-glass: rgba(28,31,36,.9);
  --line: #2A2E35;
  --line-strong: #3A3F47;
  --text: #EEF0F2;
  --muted: #A3A9B2;
  --hero-bg: #14171B;
  --grid-line: rgba(255,255,255,.06);
  --circuit: rgba(249,115,22,.34);
  --circuit-comp: rgba(249,115,22,.65);
  --ph-bg: #23272E;
  --ph-grid: rgba(249,115,22,.10);
  --ph-grad: linear-gradient(135deg, #2A2F37, #1A1D22);
  --ph-label-bg: rgba(22,25,29,.82);
  --ph-label: #D6DAE0;
  --ill-backdrop: #1B1F25;
  --ill-line: #A9B0BA;
  --ill-surface: #252930;
  --ill-soft: #2C3138;
  --ill-window: #323843;
  --ill-green: #4D7C0F;
  --room-off: #22262C;
  --room-on: #4A3C1C;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.08; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic--lg { width: 28px; height: 28px; stroke-width: 1.75; }

.skip { position: fixed; left: 16px; top: -60px; z-index: var(--z-skip); background: var(--orange-deep); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Titres ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-ink); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--orange); transform: skewX(-20deg); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; font-stretch: 112%; color: var(--text); margin-bottom: 20px; text-wrap: balance; }
.h2 em, .hero__title em, .slide__title em { font-style: italic; color: var(--accent-text); font-weight: 900; }
.lead { font-size: 1.18rem; color: var(--text); }

/* ---------- Boutons ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 24px; border-radius: 10px; border: 2px solid transparent;
  font: 600 .98rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn--primary { background: var(--orange-deep); color: #fff; box-shadow: 0 10px 24px -12px rgba(234,88,12,.8); }
.btn--primary:hover { background: var(--orange-ink); }
.btn--ghost, .btn--outline { color: var(--text); border-color: var(--line-strong); background: var(--surface); }
.btn--ghost:hover, .btn--outline:hover { border-color: var(--orange); color: var(--accent-text); }
.btn--lg { --h: 58px; padding: 0 32px; font-size: 1.05rem; }
.btn--sm { --h: 44px; padding: 0 18px; font-size: .92rem; }
.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .92rem; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--orange); line-height: 1.2; }
.link-arrow:hover { color: var(--accent-text); }

/* ---------- Emplacements d'images ----------
   Pour insérer une photo : décommentez la balise <img> dans le bloc .media.
   L'image recouvre automatiquement l'emplacement. */
.media {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius);
  background-color: var(--ph-bg);
  background-image:
    linear-gradient(var(--ph-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-grid) 1px, transparent 1px),
    var(--ph-grad);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.media::before {
  content: attr(data-ph) "\A" attr(data-size) " px";
  white-space: pre-wrap; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0;
  max-width: calc(100% - 24px); padding: 14px 18px 14px 50px; border: 1px dashed rgba(234,88,12,.55); border-radius: 10px;
  font: 500 .72rem/1.6 var(--f-mono); letter-spacing: .04em; color: var(--ph-label); text-align: left;
  background: var(--ph-label-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EA580C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.09-3.09a2 2 0 0 0-2.82 0L6 21'/%3E%3C/svg%3E") 16px 50% / 22px no-repeat;
}
.media::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(249,115,22,.10) 50%, transparent 60%);
  transform: translateX(-100%); animation: sweep 5s var(--ease) infinite;
}
.media > img, .media > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; z-index: 1; transition: transform .8s var(--ease); }
.media--slant { clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%); border-radius: 0; }
/* Dès qu'une vraie photo est en place, on retire l'étiquette et le balayage de l'emplacement */
.media:has(> img, > iframe)::before, .media:has(> img, > iframe)::after { content: none; }
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }

/* ---------- Navigation ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: var(--z-nav); padding: 0 var(--gutter); pointer-events: none; }
.nav__inner {
  pointer-events: auto; max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px; padding: 0 10px 0 14px; border-radius: 16px;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 30px -16px rgba(0,0,0,.3);
  transition: height .3s var(--ease), box-shadow .3s, background-color .3s;
}
.nav.is-scrolled .nav__inner { height: 60px; box-shadow: 0 12px 34px -14px rgba(0,0,0,.35); }
.nav__logo { display: flex; align-items: center; border-radius: 10px; }
.nav__logo img { height: 46px; width: auto; mix-blend-mode: multiply; transition: height .3s var(--ease); }
.nav.is-scrolled .nav__logo img { height: 40px; }
[data-theme="dark"] .nav__logo { background: #fff; padding: 3px 8px; }
[data-theme="dark"] .nav__logo img { mix-blend-mode: normal; height: 38px; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* Bouton soleil / lune à côté de « Nous contacter » */
.theme-toggle { flex-shrink: 0; display: grid; place-items: center; width: 66px; height: 44px; margin-left: -6px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 999px; }
.theme-toggle__track { position: relative; display: flex; align-items: center; justify-content: space-between; width: 64px; height: 34px; padding: 0 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); transition: background-color .3s, border-color .3s; }
.theme-toggle__knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange-deep); box-shadow: 0 2px 8px rgba(234,88,12,.5); transition: transform .4s cubic-bezier(.5,1.6,.5,1), background-color .3s, box-shadow .3s; }
.theme-toggle .ic { position: relative; width: 16px; height: 16px; transition: color .3s, transform .5s var(--ease); }
.theme-toggle__sun { color: #fff; }
.theme-toggle__moon { color: var(--muted); }
.theme-toggle:hover .theme-toggle__track { border-color: var(--orange); }
.theme-toggle:hover .theme-toggle__sun { transform: rotate(90deg); }
.theme-toggle:hover .theme-toggle__moon { transform: rotate(-20deg); }
[data-theme="dark"] .theme-toggle__knob { transform: translateX(32px); background: #F1F5F9; box-shadow: 0 0 12px rgba(241,245,249,.35); }
[data-theme="dark"] .theme-toggle__sun { color: var(--muted); }
[data-theme="dark"] .theme-toggle__moon { color: #1B1E23; }
.nav__links a { position: relative; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: .94rem; color: var(--text); transition: color .2s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--orange);
  transform: scaleX(0) skewX(-20deg); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--accent-text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1) skewX(-20deg); }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; background: var(--graphite); color: #fff !important; padding: 12px 18px !important; transition: background-color .2s !important; }
.nav__cta:hover { background: var(--orange-deep); }
.nav__burger { display: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--graphite); color: #fff; cursor: pointer; align-items: center; justify-content: center; }

@media (max-width: 960px) {
  .nav__burger { display: inline-flex; }
  .theme-toggle { margin-left: auto; }
  .nav__links {
    position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
  .nav__links a { padding: 14px 16px; font-size: 1rem; }
  .nav__links a::after { display: none; }
  .nav__cta { margin: 6px 0 0; justify-content: center; }
}

/* Barre de progression « courant » */
.current { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: var(--z-skip); pointer-events: none; }
.current span { position: relative; display: block; height: 100%; width: calc(var(--sp, 0) * 100%); background: linear-gradient(90deg, var(--orange-deep), var(--orange-hot)); }
.current span::after { content: ""; position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #FFF7ED; box-shadow: 0 0 10px 3px rgba(249,115,22,.85); }

/* =========================================================
   CARROUSEL — transitions en plusieurs temps
   1. la carte de texte sortante s'efface   2. l'image entrante est révélée
   (lame inclinée, lamelles ou rideau)      3. zoom lent (Ken Burns)
   4. la carte se déplie, puis ses textes entrent couche par couche
   ========================================================= */
.slider { --delay: 7s; position: relative; height: 100vh; height: 100svh; min-height: 600px; max-height: 1000px; overflow: hidden; background: var(--ph-bg); }
.slider__stage { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; visibility: hidden; z-index: 1; }
.slide.is-shown { visibility: visible; }
.slide.is-entering { z-index: 2; }

.slide__visual { position: absolute; inset: 0; overflow: hidden; }
.slide__visual::after { content: ""; position: absolute; inset: 0; z-index: 2; background: #0E1013; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.slide.is-leaving .slide__visual::after { opacity: .45; }
.slide__bg { position: absolute; inset: 0; border-radius: 0; transform-origin: 30% 50%; }
.slide[data-kb="right"] .slide__bg { transform-origin: 75% 40%; }
.slide[data-kb="center"] .slide__bg { transform-origin: 50% 65%; }
.slide.is-shown .slide__bg { animation: kb 10s cubic-bezier(.2,.6,.3,1) forwards; }
.slide__bg::before { top: 34%; z-index: 2; }
@keyframes kb { from { transform: scale(1.18); } to { transform: scale(1.02); } }
.slide__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(12,14,17,.3) 0%, rgba(12,14,17,0) 40%); }

/* Révélations de l'image */
.slide.t-slant .slide__visual { animation: fx-slant 1.1s cubic-bezier(.77,0,.18,1) both; }
@keyframes fx-slant {
  from { clip-path: polygon(112% 0, 140% 0, 128% 100%, 100% 100%); }
  to   { clip-path: polygon(-28% 0, 140% 0, 128% 100%, -40% 100%); }
}
.slider__blade {
  position: absolute; z-index: 3; top: -5%; bottom: -5%; left: 0; width: 12vw; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange) 60%, var(--orange-hot));
  box-shadow: 0 0 80px 10px rgba(249,115,22,.45);
}
.slider.fx-slant .slider__blade { animation: blade 1.1s cubic-bezier(.77,0,.18,1) both; }
@keyframes blade {
  from { opacity: 1; transform: translateX(94vw) skewX(-12deg); }
  to   { opacity: 1; transform: translateX(-46vw) skewX(-12deg); }
}
.slide.t-curtain .slide__visual { animation: fx-curtain 1.3s cubic-bezier(.77,0,.18,1) both; }
@keyframes fx-curtain { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
.slide.t-slices .slide__visual > .slide__bg, .slide.t-slices .slide__visual > .slide__shade { opacity: 0; }
.slices { position: absolute; inset: 0; z-index: 1; }
.slices__band { position: absolute; inset: 0; overflow: hidden; clip-path: var(--clip); animation: band 1s cubic-bezier(.77,0,.18,1) both; animation-delay: calc(var(--i) * 75ms); }
.slices__band:nth-child(even) { animation-name: band-down; }
@keyframes band { from { transform: translateY(100%); } to { transform: none; } }
@keyframes band-down { from { transform: translateY(-100%); } to { transform: none; } }

/* Carte de texte compacte, en bas à gauche : l'image garde toute la place */
.slide__content { position: absolute; left: 0; right: 0; bottom: 116px; z-index: 4; pointer-events: none; }
.slide__card {
  position: relative; width: min(440px, 100%); padding: 24px 26px 20px 30px; pointer-events: auto;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  clip-path: inset(0 100% 0 0 round 16px);
}
.slide__card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--orange); }
.slide__kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 .74rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); }
.slide__kicker span { display: inline-block; opacity: 0; }
.slide__sym { width: 26px; height: 26px; flex-shrink: 0; fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.slide__title { font-size: clamp(1.55rem, 2.4vw, 2.2rem); font-weight: 800; font-stretch: 110%; line-height: 1.08; letter-spacing: -.015em; margin-bottom: 10px; color: var(--text); }
.slide__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .08em 0; margin-bottom: -.08em; }
.slide__title .w > span { display: inline-block; transform: translateY(115%) rotate(6deg); transform-origin: left bottom; }
.slide__text { font-size: .95rem; line-height: 1.55; color: var(--muted); margin-bottom: 14px; opacity: 0; }
.slide__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; opacity: 0; }

.slide.is-active .slide__card { animation: card-in .75s cubic-bezier(.77,0,.18,1) forwards; }
.slide.is-active .slide__sym { animation: draw-sym 1.6s var(--ease) .45s forwards; }
.slide.is-active .slide__kicker span { animation: kick-in .6s var(--ease) .5s forwards; }
.slide.is-active .slide__title .w > span { animation: word-in .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.6s + var(--i) * .06s); }
.slide.is-active .slide__text { animation: text-in .8s var(--ease) 1s forwards; }
.slide.is-active .slide__ctas { animation: up-in .7s var(--ease) 1.15s forwards; }
.slide.is-leaving .slide__card { opacity: 0; transform: translateY(24px); transition: opacity .35s ease, transform .4s cubic-bezier(.7,0,.84,0); }
@keyframes card-in { to { clip-path: inset(0 0 0 0 round 16px); } }
@keyframes draw-sym { to { stroke-dashoffset: 0; } }
@keyframes kick-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes word-in { to { transform: none; } }
@keyframes text-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes up-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Commandes : onglets avec minuterie, flèches, pause (sous la carte) */
.slider__ui { position: absolute; z-index: 5; left: 0; right: 0; bottom: 40px; pointer-events: none; }
.slider__panel {
  display: flex; align-items: center; gap: 14px; width: min(440px, 100%); padding: 8px 8px 8px 22px; pointer-events: auto;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 999px; box-shadow: var(--shadow-lg);
}
.slider__tabs { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slider__tab {
  display: flex; flex-direction: column-reverse; justify-content: center; gap: 6px; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--muted); text-align: left; cursor: pointer;
  font: 600 .74rem/1.1 var(--f-body); transition: color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slider__tab:hover, .slider__tab[aria-selected="true"] { color: var(--text); }
.slider__bar { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.slider__bar i { position: absolute; inset: 0; background: var(--orange); transform: scaleX(0); transform-origin: left; }
.slider__tab.is-running .slider__bar i { animation: progress var(--delay) linear forwards; }
.slider.is-paused .slider__bar i, .slider.is-hover .slider__bar i, .slider.is-offscreen .slider__bar i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.slider__nav { display: flex; align-items: center; gap: 4px; }
.slider__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: background-color .2s, border-color .2s, color .2s;
}
.slider__btn .ic { width: 18px; height: 18px; }
.slider__btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }

/* L'en-tête sous le carrousel ne s'anime qu'une fois visible */
.js .hero:not(.is-visible) *, .js .hero:not(.is-visible) *::before, .js .hero:not(.is-visible) *::after { animation-play-state: paused !important; }

/* =========================================================
   EN-TÊTE
   ========================================================= */
.hero {
  position: relative; overflow: hidden; color: var(--text);
  background: radial-gradient(1000px 560px at 76% 40%, rgba(249,115,22,.10), transparent 62%), var(--hero-bg);
  padding: 150px 0 44px;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}

/* Schéma électrique en fond */
.hero__circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__circuit .traces path { fill: none; stroke: var(--circuit); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: var(--len, 5000); stroke-dashoffset: var(--len, 5000); animation: draw 2.6s var(--ease) .3s forwards; }
.hero__circuit .flow { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 22; opacity: 0; animation: pop .8s ease 2.6s forwards, flow 1.4s linear infinite; }
.hero__circuit .comps { fill: none; stroke: var(--circuit-comp); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; animation: pop .8s ease 1.6s forwards; }
.hero__circuit .comps text { fill: var(--circuit-comp); stroke: none; font: 600 14px var(--f-mono); }
.hero__circuit .switch-lever { transform-box: fill-box; transform-origin: 0% 50%; transform: rotate(-30deg); animation: close-switch .35s cubic-bezier(.5,0,.6,1.6) 2.2s forwards; }
.hero__circuit .switch-spark { opacity: 0; animation: spark .6s ease-out 2.5s; }
.hero__circuit .ac-wave { transform-box: fill-box; transform-origin: center; animation: ac 1.2s ease-in-out infinite; }
.hero__circuit .led, .hero__circuit .lamp { fill: var(--hero-bg); }
.hero__circuit .pulses { opacity: 0; animation: pop .6s ease 2.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -23; } }
@keyframes close-switch { to { transform: rotate(0); } }
@keyframes spark { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ac { 50% { transform: scaleY(-1); } }

.hero__inner { position: relative; display: grid; gap: 48px; align-items: center; grid-template-columns: 1.05fr .95fr; }
.hero__title { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 800; font-stretch: 110%; line-height: 1.02; letter-spacing: -.02em; margin-bottom: 28px; color: var(--text); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .1s; }
.hero__title .line:nth-child(3) > span { animation-delay: .2s; }
.hero__title .line:nth-child(4) > span { animation-delay: .3s; }
@keyframes rise { to { transform: none; } }
.hero__lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero__visual { position: relative; }
.hero__badge {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.hero__badge .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--orange-deep); color: #fff; }
.hero__badge strong { display: block; font: 700 .98rem/1.2 var(--f-display); }
.hero__badge span { font-size: .84rem; color: var(--muted); }
.hero__badge--a { right: -2%; top: 4%; }
.hero__badge--b { left: 2%; top: 44%; animation-delay: -3s; }
.hero__badge .zap { animation: flicker 4s steps(1) infinite; }
.hero__badge .gauge .needle { transform-box: view-box; transform-origin: 12px 14px; animation: needle 3.5s cubic-bezier(.5,0,.3,1.4) infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 8% { opacity: .35; } 10% { opacity: 1; } 12% { opacity: .5; } 14% { opacity: 1; } }
@keyframes needle { 0%, 100% { transform: rotate(-95deg); } 45%, 70% { transform: rotate(0); } 80% { transform: rotate(-12deg); } }

.hero__strip { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border-top: 1px solid var(--line); }
.hero__strip li { display: flex; align-items: baseline; gap: 12px; padding: 22px 18px 4px 0; font: 600 1.02rem/1.3 var(--f-display); font-stretch: 105%; }
.hero__strip li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.hero__strip .mono { color: var(--orange-ink); }

/* =========================================================
   ILLUSTRATIONS (scène solaire, maison, ingénieurs)
   ========================================================= */
.scene { margin: 0; }
.scene svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Jour / nuit : le thème sombre affiche la lune et coupe les rayons du soleil */
.s-sun, .s-beams, .s-flow--day, .s-glint { transition: opacity .6s; }
.s-night { opacity: 0; transition: opacity .6s; }
[data-theme="dark"] .s-sun, [data-theme="dark"] .s-beams, [data-theme="dark"] .s-flow--day, [data-theme="dark"] .s-glint { opacity: 0; }
[data-theme="dark"] .s-night { opacity: 1; }
.s-moon { fill: #FDE68A; }
.s-stars path { fill: #FDE68A; animation: twinkle 2.4s ease-in-out infinite; }
.s-stars path:nth-child(2) { animation-delay: .6s; }
.s-stars path:nth-child(3) { animation-delay: 1.2s; }
.s-stars path:nth-child(4) { animation-delay: 1.8s; }
@keyframes twinkle { 50% { opacity: .3; } }

.s-back, .h-back { fill: var(--ill-backdrop); }
.s-sun__halo { fill: rgba(253,186,116,.35); transform-box: fill-box; transform-origin: center; animation: halo 3s ease-in-out infinite; }
.s-sun__rays, .h-sun__rays { fill: none; stroke: #F59E0B; stroke-width: 5; stroke-linecap: round; transform-box: view-box; animation: spin 18s linear infinite; }
.s-sun__rays { transform-origin: 110px 100px; }
.h-sun__rays { transform-origin: 780px 70px; stroke-width: 4; }
.s-beams path { fill: none; stroke: #FBBF24; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 14; animation: dash 1s linear infinite; }
@keyframes halo { 50% { transform: scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -18; } }

.s-ground, .h-ground { stroke: var(--ill-line); stroke-width: 2.5; stroke-linecap: round; opacity: .45; fill: none; }
.s-leg { stroke: var(--ill-line); stroke-width: 4; stroke-linecap: round; fill: none; }
.s-face { fill: url(#panelFace); stroke: #1E3A5F; stroke-width: 2; stroke-linejoin: round; }
.s-grid { fill: none; stroke: rgba(191,219,254,.6); stroke-width: 1.5; }
.s-glint { fill: rgba(255,255,255,.55); transform-box: view-box; transform: translateX(178px) skewX(-25deg); animation: glint 3.6s ease-in-out infinite; }
@keyframes glint { 0% { transform: translateX(178px) skewX(-25deg); } 45%, 100% { transform: translateX(420px) skewX(-25deg); } }
.s-cable, .s-riser, .h-cable { fill: none; stroke: var(--ill-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
.s-flow { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 12; animation: dash .8s linear infinite; }
.s-inv__box { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 2; }
.s-inv__bolt { fill: var(--orange); }
.s-bars rect { fill: var(--orange); opacity: .2; animation: charge 2.4s steps(1) infinite; }
.s-bars rect:nth-child(2) { animation-delay: .3s; }
.s-bars rect:nth-child(3) { animation-delay: .6s; }
.s-bars rect:nth-child(4) { animation-delay: .9s; }
@keyframes charge { 0%, 15% { opacity: .2; } 20%, 85% { opacity: 1; } 90%, 100% { opacity: .2; } }
.s-bldg__body { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 2.5; }
.s-bldg__roof { fill: var(--ill-line); }
.s-bldg__ac, .s-bldg__door { fill: var(--ill-soft); stroke: var(--ill-line); stroke-width: 2; }
.s-wins rect { fill: var(--ill-window); stroke: var(--ill-line); stroke-width: 1.5; animation: win-on .5s ease forwards; animation-delay: calc(1.6s + var(--i) * .18s); }
@keyframes win-on { 0% { fill: var(--ill-window); } 30% { fill: #FDE68A; } 45% { fill: var(--ill-window); } 100% { fill: #FDE68A; } }
[data-theme="dark"] .s-wins rect { filter: drop-shadow(0 0 6px rgba(253,224,71,.55)); }
.s-bush circle { fill: var(--ill-green); }

/* Ingénieure de la scène solaire */
.e-skin { fill: #8D5524; }
.e-pants { fill: #334155; }
.e-shoe { fill: #1F2937; }
.e-shirt { fill: #2563EB; }
.e-vest { fill: var(--orange); }
.e-stripe { fill: none; stroke: #FEF3C7; stroke-width: 2.5; }
.e-sleeve { fill: none; stroke: #2563EB; stroke-width: 9; stroke-linecap: round; }
.e-hair { fill: #1F1410; }
.e-hat { fill: #FACC15; }
.e-brim { fill: none; stroke: #EAB308; stroke-width: 4; stroke-linecap: round; }
.e-eyes circle { fill: #1B1E23; }
.e-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
.e-smile { fill: none; stroke: #1B1E23; stroke-width: 1.5; stroke-linecap: round; }
.e-tablet rect { fill: #1F2937; }
.e-screen { fill: none; stroke: #34D399; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.e-arm { transform-box: view-box; transform-origin: 277px 393px; animation: point 3s ease-in-out infinite; }
@keyframes point { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* Maison « Pour qui ? » : éteinte jusqu'à ce que l'ingénieur abaisse le disjoncteur (.is-powered) */
.scene--house { position: relative; }
.h-roof { fill: #C2410C; }
[data-theme="dark"] .h-roof { fill: #9A3412; }
.h-panels rect, .hs-collector { fill: url(#panelFace); stroke: #1E3A5F; stroke-width: 2; stroke-linejoin: round; }
.h-panels__grid { fill: none; stroke: rgba(191,219,254,.6); stroke-width: 1.5; }
.h-walls { fill: none; stroke: var(--ill-line); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; }
.h-room { fill: var(--room-off); }
.h-obj, .h-shade { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.h-shade { fill: var(--orange); }
.h-line { fill: none; stroke: var(--ill-line); stroke-width: 2; stroke-linecap: round; }
.h-sofa { fill: var(--orange); opacity: .85; }
.h-pillow { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 1.5; }
.h-blanket { fill: #3B82F6; opacity: .8; }
.h-tv, .h-mw, .hs-inv { fill: #1F2937; }
.h-led, .h-display, .hs-ev { fill: #9CA3AF; }
.h-screen { fill: var(--ill-soft); stroke: var(--ill-line); stroke-width: 2; }
.h-charge, .hs-bat { fill: #22C55E; transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); }
.hs-carbat { fill: #22C55E; transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.h-fan { fill: var(--ill-line); transform-box: fill-box; transform-origin: center; }
.h-cone { fill: #FDE68A; opacity: 0; }
.h-air path { fill: none; stroke: #60A5FA; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 3 7; opacity: 0; }
.h-cable { fill: none; stroke: var(--ill-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .45; }
.h-flow { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 12; opacity: 0; }
.hs-slab { fill: var(--ill-line); }
.hs-tank { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 2; }
.hs-steam path { fill: none; stroke: var(--ill-line); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.hs-acring { fill: none; stroke: var(--ill-line); stroke-width: 1.5; }
.hs-acfan { fill: none; stroke: var(--ill-line); stroke-width: 2; stroke-linecap: round; transform-box: view-box; transform-origin: 602px 410px; }
.hs-post { fill: none; stroke: var(--ill-line); stroke-width: 4; stroke-linecap: round; }
.hs-meter { fill: var(--ill-soft); stroke: var(--ill-line); stroke-width: 1.5; }
.hs-digits { fill: none; stroke: var(--ill-line); stroke-width: 3; stroke-dasharray: 3 2; opacity: .5; }
.hs-slot { fill: var(--ill-soft); stroke: var(--ill-line); stroke-width: 1.5; }
.hs-lever { fill: #DC2626; stroke: rgba(0,0,0,.25); stroke-width: 1.5; }
.hs-spark { opacity: 0; }
.hs-beam { fill: #FDE68A; opacity: 0; }
.hs-fence { fill: none; stroke: var(--ill-line); stroke-width: 2.5; stroke-linecap: round; opacity: .45; }
.hs-trunk { fill: #8B5E3C; }
.hs-leaf { fill: var(--ill-green); }
.hs-glow { fill: url(#lampGlow); opacity: 0; }
.hs-stem { fill: none; stroke: #4D7C0F; stroke-width: 2; }
.hs-petal { fill: #F472B6; }
.hs-petal--y { fill: #FACC15; }
.hs-car { fill: #3B82F6; stroke: rgba(0,0,0,.25); stroke-width: 1.5; }
.hs-carwin { fill: var(--ill-window); }
.hs-wheel { fill: #1F2937; }
.hs-grass { fill: #9BD47A; }
[data-theme="dark"] .hs-grass { fill: #3F6212; }
.hs-skin { fill: #6B3E26; }
.hs-eng { opacity: 0; }
.hs-pull { transform-box: view-box; transform-origin: 108px 390px; }
.hs-wave { transform-box: view-box; transform-origin: 96px 390px; }
.hs-burst path { fill: #FBBF24; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0); }


/* Séquence de mise sous tension */
.scene--house.is-powered .hs-eng { animation: eng-in .25s ease forwards; }
.scene--house.is-powered .hs-pull { animation: pull .35s cubic-bezier(.6,0,.4,1) .45s forwards; }
.scene--house.is-powered .hs-lever { animation: lever-down .35s cubic-bezier(.6,0,.4,1) .45s forwards; }
.scene--house.is-powered .hs-spark { animation: spark .6s ease-out .75s; }
.scene--house.is-powered .h-flow { animation: pop .3s ease forwards, dash .8s linear infinite; animation-delay: var(--t), 0s; }
.scene--house.is-powered .hs-meter { animation: fill-to .3s ease .7s forwards; --to: #FDBA74; }
.scene--house.is-powered .hs-digits { opacity: 1; animation: dash 1s linear .7s infinite; stroke: #C2410C; }
.scene--house.is-powered .hs-inv { animation: fill-to .3s ease .8s forwards; --to: #F97316; }
.scene--house.is-powered .hs-bat { animation: grow-y 1.2s ease .85s forwards; }
.scene--house.is-powered .h-room { animation: room-on .6s ease forwards; animation-delay: var(--t); }
.scene--house.is-powered .h-cone { animation: cone-on .6s ease forwards; animation-delay: var(--t); }
.scene--house.is-powered .h-tv { animation: tv 2.4s steps(1) infinite; animation-delay: var(--t); }
.scene--house.is-powered .h-led { animation: fill-to .3s ease forwards; animation-delay: var(--t); --to: #22C55E; }
.scene--house.is-powered .h-mw { animation: fill-to .4s ease forwards; animation-delay: var(--t); --to: #FDBA74; }
.scene--house.is-powered .h-display { animation: blink-display 1s steps(1) infinite; animation-delay: var(--t); }
.scene--house.is-powered .h-screen { animation: fill-to .4s ease forwards; animation-delay: var(--t); --to: #93C5FD; }
.scene--house.is-powered .h-charge { animation: charging 2.2s ease-in-out infinite; animation-delay: var(--t); }
.scene--house.is-powered .h-fan { animation: fan .32s linear infinite; animation-delay: var(--t); }
.scene--house.is-powered .h-air path { animation: pop .4s ease forwards, dash 1s linear infinite; animation-delay: var(--t), 0s; }
.scene--house.is-powered .hs-acfan { animation: spin .5s linear 2.1s infinite; }
.scene--house.is-powered .hs-steam path { animation: steam 2s ease-in-out 1.4s infinite; }
.scene--house.is-powered .hs-steam path:nth-child(2) { animation-delay: 2.2s; }
.scene--house.is-powered .hs-glow { animation: pop .5s ease 2.3s forwards; }
.scene--house.is-powered .hs-beam { animation: beam-on .5s ease 2.4s forwards; }
.scene--house.is-powered .hs-ev { animation: fill-to .3s ease 2.5s forwards; --to: #22C55E; }
.scene--house.is-powered .hs-carbat { animation: grow-x 1.6s ease 2.6s forwards; }
.scene--house.is-powered .hs-burst path { animation: burst .9s cubic-bezier(.34,1.56,.64,1) 2.8s forwards; }
.scene--house.is-powered .hs-burst g:nth-child(2n) path { animation-delay: 2.9s; }
.scene--house.is-powered .hs-wave { animation: wave 1.6s ease-in-out 2.9s 2; }
@keyframes eng-in { to { opacity: 1; transform: none; } }
@keyframes pull { to { transform: rotate(37deg); } }
@keyframes lever-down { to { transform: translateY(28px); fill: #16A34A; } }
@keyframes fill-to { to { fill: var(--to); } }
@keyframes grow-y { to { transform: scaleY(1); } }
@keyframes grow-x { to { transform: scaleX(1); } }
@keyframes room-on { 0% { fill: var(--room-off); } 40% { fill: var(--room-on); } 55% { fill: var(--room-off); } 100% { fill: var(--room-on); } }
@keyframes cone-on { to { opacity: .5; } }
@keyframes beam-on { to { opacity: .35; } }
@keyframes tv { 0% { fill: #60A5FA; } 25% { fill: #F97316; } 50% { fill: #34D399; } 75% { fill: #A78BFA; } }
@keyframes blink-display { 0% { fill: #F97316; } 50% { fill: #9CA3AF; } }
@keyframes charging { 0% { transform: scaleY(.1); } 80%, 100% { transform: scaleY(1); } }
@keyframes fan { 50% { transform: scaleX(-1); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes burst { 0% { opacity: 0; transform: scale(0); } 50% { opacity: 1; transform: scale(1.4) rotate(45deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(140deg); } 40%, 80% { transform: rotate(115deg); } }

/* =========================================================
   PARCOURS DANS LA MARGE : échelle à part, passerelles avec
   installations, fil unique jusqu'à la maison (positions : main.js)
   ========================================================= */
main { position: relative; }
.journey { position: absolute; top: 0; left: 0; width: 120px; height: 0; z-index: 4; pointer-events: none; --jfill: 0; }
.journey__lawn {
  position: absolute; left: -8px; top: var(--lawn-top, 0); width: var(--lawn-w, 0); height: var(--lawn-h, 8px);
  background: #9BD47A; border-top: var(--lawn-line, 2px) solid rgba(58,63,71,.45);
}
[data-theme="dark"] .journey__lawn { background: #3F6212; border-top-color: rgba(169,176,186,.45); }
.journey__ladder {
  position: absolute; left: 6px; width: 20px; top: 0; bottom: 0; opacity: .75;
  background:
    linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px calc(100% - 3px), var(--line-strong) calc(100% - 3px)),
    repeating-linear-gradient(180deg, transparent 0 13px, var(--line-strong) 13px 16px);
}

/* Le fil : vertical le long des installations, puis horizontal jusqu'au coffret de la maison */
.journey__cable { position: absolute; left: 116.2px; top: var(--wtop, 0); width: 1.6px; height: var(--wlen, 0); background: var(--circuit); }
.journey__cable--h { top: var(--wend, 0); height: 1.6px; width: var(--hlen, 0); }
.journey__current {
  position: absolute; left: -2.2px; top: 0; width: 6px; height: calc(var(--jfill) * 1px);
  background: radial-gradient(circle, var(--orange) 0 1.5px, transparent 2.1px) 50% 0 / 6px 23px repeat-y;
  animation: dots-down 1.4s linear infinite;
}
.journey__cable--h .journey__current { left: 0; top: -2.2px; width: 0; height: 6px; background: radial-gradient(circle, var(--orange) 0 1.5px, transparent 2.1px) 0 50% / 23px 6px repeat-x; animation: dots-right 1.4s linear infinite; transition: width .45s linear; }
.journey.is-done .journey__cable--h .journey__current { width: 100%; }
@keyframes dots-down { to { background-position: 50% 23px; } }
@keyframes dots-right { to { background-position: 23px 50%; } }

/* Passerelles et installations */
.journey__stage { position: absolute; left: 26px; width: 92px; height: 72px; }
.journey__platform { position: absolute; inset: 0; width: 92px; height: 72px; overflow: visible; }
.pf-deck { fill: var(--ill-line); opacity: .55; }
.pf-rail, .pf-brace { fill: none; stroke: var(--ill-line); stroke-width: 2.5; stroke-linecap: round; opacity: .45; }
.pf-stub { fill: none; stroke: var(--circuit); stroke-width: 1.6; transition: stroke .4s; }
.journey__art { position: absolute; left: 22px; top: 6px; width: 64px; height: 52px; overflow: visible; fill: none; stroke: var(--ill-line); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: filter .4s; }
.journey__check { position: absolute; left: 78px; top: -6px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #22C55E; color: #fff; transform: scale(0); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.journey__check .ic { width: 11px; height: 11px; stroke-width: 3.5; }

.in-box { fill: var(--ill-surface); }
.in-soft, .in-pv, .in-ins, .in-sun circle { fill: var(--ill-soft); }
.in-grid { stroke-width: 1.2; }
.in-beam { stroke: #FBBF24; stroke-dasharray: 3 4; opacity: 0; }
.in-screen { fill: #2B3038; }
.in-wave { stroke: #6B7280; stroke-width: 1.6; }
.in-led, .in-bar, .in-disk { stroke: none; }
.in-led { fill: #9CA3AF; }
.in-bar { fill: var(--ill-soft); }
.in-disk { fill: var(--ill-line); transform-box: fill-box; }
.in-warn { fill: #FACC15; stroke: #1F2937; stroke-width: 1.2; }
.in-boltmark { stroke: #1F2937; stroke-width: 1.4; }
.in-hum { stroke: var(--orange); opacity: 0; }
.in-wire { stroke-width: 1.6; }
.in-digits { stroke: #6B7280; stroke-width: 3; stroke-dasharray: 2.5 1.5; }
.in-rays { transform-box: view-box; transform-origin: 55px 8px; }

.journey__stage.is-on .journey__art { filter: drop-shadow(0 0 8px rgba(249,115,22,.35)); }
.journey__stage.is-on .journey__check { transform: scale(1); }
.journey__stage.is-on .pf-stub { stroke: var(--orange); }
.journey__stage.is-on .in-pv { fill: url(#panelFace); stroke: #1E3A5F; }
.journey__stage.is-on .in-grid { stroke: rgba(191,219,254,.85); }
.journey__stage.is-on .in-sun circle { fill: #FDBA74; stroke: #F59E0B; }
.journey__stage.is-on .in-rays { stroke: #F59E0B; animation: spin 6s linear infinite; }
.journey__stage.is-on .in-beam { opacity: 1; animation: dash .8s linear infinite; }
.journey__stage.is-on .in-screen { fill: #1F2937; }
.journey__stage.is-on .in-wave { stroke: var(--orange); stroke-dasharray: 4 3; animation: dash .7s linear infinite; }
.journey__stage.is-on .in-led { fill: #22C55E; animation: led-blink 1.2s steps(1) infinite; }
.journey__stage.is-on .in-bar { fill: #22C55E; animation: bar-in .3s ease both; animation-delay: calc(var(--i) * .15s); }
.journey__stage.is-on .in-ins { fill: var(--orange-hot); filter: drop-shadow(0 0 3px rgba(249,115,22,.9)); }
.journey__stage.is-on .in-hum { animation: hum 1s ease-in-out infinite; }
.journey__stage.is-on .in-wire { stroke: var(--orange); stroke-dasharray: 3 4; animation: dash .6s linear infinite; }
.journey__stage.is-on .in-digits { stroke: #34D399; animation: dash 1s linear infinite; }
.journey__stage.is-on .in-disk { fill: var(--orange); animation: disk 1.2s ease-in-out infinite alternate; }
@keyframes led-blink { 50% { fill: #9CA3AF; } }
@keyframes bar-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hum { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes disk { to { transform: translateX(14px); } }

/* L'ingénieur : de dos sur l'échelle, de profil sur la passerelle, jamais de visage */
.journey__eng { position: absolute; left: 0; top: 0; width: 32px; height: 52px; will-change: transform; }
.journey__pose { position: relative; width: 32px; height: 52px; transition: transform .35s var(--ease), opacity .6s; }
.journey__eng.is-platform .journey__pose { transform: translateX(22px); }
.jm-back, .jm-side { position: absolute; inset: 0; width: 32px; height: 52px; overflow: visible; }
.jm-side, .jm-head { display: none; }
.journey__eng.is-platform .jm-back { display: none; }
.journey__eng.is-platform .jm-side { display: block; }
.jm-skin, .jm-hand, .jm-arm circle { fill: #6B3E26; }
.jm-hair { fill: #1F1410; }
.jm-hat { fill: #FACC15; }
.jm-brim { fill: none; stroke: #EAB308; stroke-width: 2.6; stroke-linecap: round; }
.jm-shirt { fill: #2563EB; }
.jm-vest { fill: var(--orange); }
.jm-stripe { fill: none; stroke: #FEF3C7; stroke-width: 1.6; }
.jm-leg path { fill: none; stroke: #334155; stroke-width: 4.5; stroke-linecap: round; }
.jm-shoe { fill: #1F2937; }
.jm-arm path, .jm-sleeve { fill: none; stroke: #2563EB; stroke-width: 4; stroke-linecap: round; }
.jm-arm, .jm-leg, .jm-reach { transform-box: fill-box; }
.journey__eng.is-climbing .jm-arm--l, .journey__eng.is-climbing .jm-leg--r { animation: climb .32s steps(2) infinite; }
.journey__eng.is-climbing .jm-arm--r, .journey__eng.is-climbing .jm-leg--l { animation: climb .32s steps(2) infinite reverse; }
.journey__eng.is-platform .jm-reach { animation: press .45s ease-in-out .35s 2; }
@keyframes climb { 0% { transform: translateY(-3px); } 100% { transform: translateY(3px); } }
@keyframes press { 50% { transform: translateX(2px); } }
/* Sur la pelouse : de profil, il marche jusqu'au coffret de la maison (à l'échelle du dessin) */
.jm-swing { display: none; }
.journey__eng.is-lawn .jm-back, .journey__eng.is-lawn .jm-reach { display: none; }
.journey__eng.is-lawn .jm-side { display: block; }
.journey__eng.is-lawn .jm-swing { display: inline; }
.journey__eng.is-lawn .journey__pose { transform: scale(var(--ws, 1)); transform-origin: 50% 100%; }
.jm-step--a, .jm-step--b { transform-box: view-box; transform-origin: 15.5px 33px; }
.jm-swing { transform-box: view-box; transform-origin: 17px 22px; }
.journey__eng.is-walking .jm-step--a { animation: step .36s ease-in-out infinite alternate; }
.journey__eng.is-walking .jm-step--b { animation: step .36s ease-in-out infinite alternate-reverse; }
.journey__eng.is-walking .jm-swing { animation: swing .36s ease-in-out infinite alternate; }
@keyframes step { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes swing { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
/* Arrivé au coffret, il laisse la place à l'ingénieur dessiné dans la maison */
.journey.is-done .journey__pose { opacity: 0; transition: opacity .25s; }

/* Écrans étroits : fil au bord, pastilles rondes avec le dessin, casque vu de dos */
.journey.is-compact { width: 0; }
.journey.is-compact .journey__ladder, .journey.is-compact .journey__platform, .journey.is-compact .jm-back, .journey.is-compact .jm-side { display: none; }
.journey.is-compact .journey__cable { left: -0.8px; }
.journey.is-compact .journey__cable--h { left: 0; }
.journey.is-compact .journey__stage { left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow); transition: border-color .4s; }
.journey.is-compact .journey__stage.is-on { border-color: var(--orange); }
.journey.is-compact .journey__art { left: 3px; top: 5px; width: 24px; height: 20px; stroke-width: 3.2; }
.journey.is-compact .journey__check { left: 20px; top: -6px; width: 14px; height: 14px; }
.journey.is-compact .journey__check .ic { width: 9px; height: 9px; }
.journey.is-compact .journey__eng { left: -12px; width: 24px; height: 24px; }
.journey.is-compact .journey__pose { width: 24px; height: 24px; }
.journey.is-compact .journey__eng.is-platform .journey__pose, .journey.is-compact .journey__eng.is-lawn .journey__pose { transform: none; }
.journey.is-compact .journey__eng .jm-back, .journey.is-compact .journey__eng .jm-side { display: none; }
.journey.is-compact .jm-head { display: block; width: 24px; height: 24px; }
.journey.is-static .journey__eng { display: none; }
html:not(.js) .journey { display: none; }

/* Ingénieurs qui jettent un œil (injectés par main.js, les yeux suivent la souris) */
.peek { position: absolute; bottom: 100%; z-index: 2; width: 110px; height: 77px; overflow: hidden; pointer-events: none; }
.peek svg { display: block; width: 100%; height: auto; transform: translateY(105%); transition: transform .8s cubic-bezier(.34,1.56,.64,1); }
.peek.is-in svg { transform: none; transition-delay: .35s; }
.peek[data-hat="yellow"] { --pk-hat: #FACC15; --pk-brim: #EAB308; }
.peek[data-hat="white"] { --pk-hat: #F8FAFC; --pk-brim: #CBD5E1; }
.peek[data-hat="orange"] { --pk-hat: #F97316; --pk-brim: #EA580C; }
.peek[data-hat="blue"] { --pk-hat: #3B82F6; --pk-brim: #2563EB; }
.peek[data-skin="1"] { --pk-skin: #C68642; }
.peek[data-skin="2"] { --pk-skin: #8D5524; }
.peek[data-skin="3"] { --pk-skin: #6B3E26; }
.peek[data-skin="4"] { --pk-skin: #A0663F; }
.pk__head, .pk__ear, .pk__hand { fill: var(--pk-skin, #8D5524); }
.pk__hand { stroke: rgba(0,0,0,.18); stroke-width: 1.5; }
.pk__finger { fill: none; stroke: rgba(0,0,0,.25); stroke-width: 1.5; stroke-linecap: round; }
.pk__white { fill: #fff; }
.pk__pupil { fill: #1B1E23; }
.pk__brow { fill: none; stroke: #2B1A10; stroke-width: 2.5; stroke-linecap: round; }
.pk__mouth { fill: none; stroke: #2B1A10; stroke-width: 2; stroke-linecap: round; }
.pk__hat { fill: var(--pk-hat, #FACC15); stroke: rgba(0,0,0,.12); stroke-width: 1.5; }
.pk__brim { fill: none; stroke: var(--pk-brim, #EAB308); stroke-width: 7; stroke-linecap: round; }
.pk__ridge { fill: none; stroke: rgba(0,0,0,.12); stroke-width: 3; stroke-linecap: round; }
.pk__hair { fill: #1F1410; display: none; }
.pk__glasses { fill: none; stroke: #1F2937; stroke-width: 2.2; display: none; }
.peek[data-look="hair"] .pk__hair, .peek[data-look="glasses"] .pk__glasses { display: inline; }
.pk__eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.peek:nth-of-type(2n) .pk__eyes { animation-duration: 6.2s; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section--paper { background: var(--paper); }
.section--tint { background: var(--tint); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 60px; margin-bottom: 56px; }
.section__head .h2 { margin-bottom: 0; max-width: 16ch; }
.section__intro { max-width: 440px; color: var(--muted); font-size: 1.06rem; margin: 0; }

/* Présentation */
.about { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.about__media { position: relative; height: clamp(440px, 52vw, 640px); }
.about__img1 { position: absolute; inset: 0 18% 12% 0; }
.about__img2 { position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 7/5; border: 6px solid var(--bg); box-shadow: var(--shadow); }
.about__stamp { position: absolute; left: 6%; bottom: 2%; z-index: 2; display: grid; gap: 6px; padding: 18px 22px; background: var(--orange-deep); color: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.about__stamp strong { font: 800 1.5rem/1 var(--f-display); font-stretch: 115%; text-transform: uppercase; }
.about__stamp .mono { opacity: .9; font-size: .68rem; }
.about__copy > p:not(.eyebrow):not(.lead) { color: var(--muted); }
.mv { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 76px; }
.mv__card { padding: 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.mv__card .ic { color: var(--orange); margin-bottom: 14px; }
.mv__card h3 { font-size: 1.2rem; font-stretch: 108%; margin-bottom: 8px; }
.mv__card p { margin: 0; font-size: .95rem; color: var(--muted); }
.mv__card--dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.mv__card--dark p { color: #CDD2D9; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpis li { padding: 28px 24px 0 0; }
.kpis li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.kpis strong { display: block; font: 800 clamp(2.6rem, 5vw, 4rem)/1 var(--f-display); font-stretch: 115%; color: var(--accent-text); letter-spacing: -.03em; }
.kpis span { display: block; margin-top: 10px; color: var(--muted); font-size: .95rem; max-width: 18ch; }

/* Fil électrique décoratif */
.wire { display: flex; align-items: center; margin-top: clamp(64px, 8vw, 110px); margin-bottom: 8px; }
.wire--gallery { margin: -24px 0 32px; }
.wire__line { position: relative; flex: 1; height: 2px; background: var(--line); overflow: hidden; transform: scaleX(0); transform-origin: right; transition: transform 1s var(--ease) .1s; }
.wire__line--r { transform-origin: left; }
.wire__line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 90px; background: linear-gradient(90deg, transparent, var(--orange), transparent); animation: zip 3.2s linear infinite; }
.wire__line--r::after { animation-delay: 1.6s; }
.wire__sym { width: 80px; height: 24px; flex-shrink: 0; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wire.is-in .wire__line, html:not(.js) .wire__line { transform: none; }
@keyframes zip { from { transform: translateX(-100px); } to { transform: translateX(100vw); } }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.svc { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .3s; }
.svc::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(249,115,22,.08), transparent 60%); }
.svc:hover { border-color: rgba(249,115,22,.5); }
.svc:hover::before { opacity: 1; }
.svc__media { height: 220px; border-radius: 0; }
.svc:hover .svc__media > img { transform: scale(1.05); }
.svc__body { position: relative; z-index: 2; padding: 28px 30px 32px; }
.svc__body::before { content: ""; position: absolute; top: 0; left: 30px; width: 60px; height: 4px; background: var(--orange); transform: skewX(-24deg) scaleX(.5); transform-origin: left; transition: transform .4s var(--ease); }
.svc:hover .svc__body::before { transform: skewX(-24deg) scaleX(1.6); }
.svc__sym { position: absolute; z-index: 2; right: 18px; top: 236px; width: 96px; height: 96px; pointer-events: none; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .12; stroke-dasharray: 420; transition: opacity .3s; }
.svc:hover .svc__sym { opacity: .5; animation: redraw 1.2s var(--ease); }
@keyframes redraw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
.svc__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--orange-ink); }
.svc__num { font-size: .85rem; color: var(--muted); }
.svc h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-stretch: 110%; color: var(--text); margin-bottom: 12px; }
.svc p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Approche : câble, fiche, prise et ampoule */
.process { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.process__line { position: absolute; left: 28px; right: 72px; top: 27px; height: 2px; background: var(--line); }
.process__fill {
  position: relative; display: block; height: 100%; width: calc(var(--p, 0) * 100%); transition: width .2s linear;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, var(--orange-hot) 10px 14px); background-size: 14px 100%; animation: current .6s linear infinite;
}
@keyframes current { to { background-position: 14px 0; } }
.process__plug { position: absolute; left: calc(100% - 20px); top: 50%; width: 34px; height: 22px; margin-top: -11px; fill: var(--graphite); stroke: var(--graphite); stroke-width: 3; stroke-linecap: round; }
.process__end { position: absolute; left: 100%; top: 50%; width: 60px; height: 0; }
.process__socket { position: absolute; left: 2px; top: -18px; width: 36px; height: 36px; fill: var(--surface); stroke: var(--line-strong); stroke-width: 2.5; stroke-linecap: round; transition: stroke .3s, filter .3s; }
.process__bulb { position: absolute; left: 0; top: -82px; width: 40px; height: 52px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.process__glass { transition: fill .3s; }
.process__rays { opacity: 0; stroke: var(--orange); transition: opacity .3s; }
.process.is-plugged .process__socket { stroke: var(--orange); filter: drop-shadow(0 0 8px rgba(249,115,22,.6)); }
.process.is-plugged .process__bulb { stroke: var(--orange); }
.process.is-plugged .process__glass { fill: rgba(253,224,71,.6); }
.process.is-plugged .process__rays { opacity: 1; }
.process.is-plugged .process__bulb { animation: bulb-flicker .6s steps(1); }
.step { position: relative; }
.step__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 14px; background: var(--bg); border: 2px solid var(--line); color: var(--muted); transition: background-color .4s, border-color .4s, color .4s; }
.step.is-on .step__dot { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; box-shadow: 0 0 0 6px rgba(249,115,22,.12), 0 0 26px rgba(249,115,22,.45); }
.step .mono { color: var(--orange-ink); }
.step h3 { font-size: 1.35rem; font-stretch: 108%; margin: 6px 0 10px; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Pourquoi nous */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.why .h2 { max-width: 14ch; }
.checklist { display: grid; gap: 4px; margin-top: 12px; }
.checklist li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.checklist .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--line); color: var(--muted); stroke-width: 3; margin-top: 1px; transition: background-color .3s, color .3s, box-shadow .5s; transition-delay: calc(var(--d, 0s) + .45s); }
.checklist li.is-in .ic, html:not(.js) .checklist .ic { background: var(--orange-deep); color: #fff; box-shadow: 0 0 0 4px rgba(249,115,22,.14), 0 0 16px rgba(249,115,22,.5); }
.expertise { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); position: sticky; top: 140px; margin-top: 60px; }
.expertise__title { font-size: 1.3rem; font-stretch: 108%; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .92rem; font-weight: 500; transition: border-color .2s; }
.chips li .ic { width: 17px; height: 17px; color: var(--orange-ink); }
.chips li:hover { border-color: var(--orange); }
.chips li:hover .ic { color: var(--orange); filter: drop-shadow(0 0 4px rgba(249,115,22,.8)); }
.expertise__media { aspect-ratio: 16/9; }

/* Valeurs */
.values { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.val { position: relative; padding: 30px 24px 28px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; transition: background-color .35s, color .35s, border-color .35s; }
.val::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; background: var(--orange); opacity: .08; transform: skewX(-20deg); transition: opacity .35s; }
.val .ic { color: var(--orange); margin-bottom: 40px; }
.val h3 { font-size: 1.2rem; font-stretch: 108%; margin-bottom: 10px; }
.val p { margin: 0; font-size: .93rem; color: var(--muted); transition: color .35s; }
.val:hover { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.val:hover p { color: #CDD2D9; }
.val:hover::after { opacity: .9; }

/* Clients + maison */
.clients { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 5vw, 70px); align-items: center; }
.clients__copy .section__intro { margin-bottom: 30px; }
.clients__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.clients__grid li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font: 700 1rem/1.25 var(--f-display); font-stretch: 106%; transition: border-color .3s; }
.clients__grid .ic { color: var(--orange); }
.clients__grid li:hover { border-color: var(--orange); }

/* Réalisations */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 18px; }
.proj { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.proj .media { position: absolute; inset: 0; border-radius: 0; }
.proj--wide { grid-column: span 2; }
.proj--tall { grid-row: span 2; }
.proj figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 12px; padding: 50px 22px 20px; color: #fff; background: linear-gradient(transparent, rgba(12,14,17,.82)); }
.proj figcaption .mono { grid-column: 1; color: var(--orange-hot); }
.proj figcaption strong { grid-column: 1; font: 700 1.15rem/1.2 var(--f-display); }
.proj figcaption .ic { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--orange-deep); transition: transform .3s var(--ease); }
.proj:hover figcaption .ic { transform: rotate(45deg); }
.proj:hover .media > img { transform: scale(1.06); }

/* CTA + ampoule */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(90px, 12vw, 150px) 0; background: var(--tint); }
.cta__bg { position: absolute; inset: 0; border-radius: 0; opacity: .5; }
.cta__bg::before { top: auto; left: 24px; bottom: 24px; transform: none; z-index: 3; }
.cta__bg::after { background: linear-gradient(180deg, transparent, var(--tint)); transform: none; animation: none; z-index: 2; }
.cta__inner { position: relative; z-index: 3; }
.cta::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 20%; width: 900px; height: 600px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(249,115,22,.3), transparent); opacity: 0; transition: opacity .8s; pointer-events: none; }
.cta.is-lit::before { opacity: 1; }
.cta .h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 20ch; margin: 0 auto 20px; }
.cta p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 36px; }
.bulb { display: inline-grid; place-items: center; width: 84px; height: 110px; margin-bottom: 18px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; border-radius: 12px; }
.bulb svg { width: 64px; height: 88px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: stroke .3s; }
.bulb__glass { transition: fill .3s; }
.bulb__filament { transition: stroke .3s; }
.bulb__rays { opacity: 0; stroke: var(--orange); transform-origin: 40px 44px; transform: scale(.8); transition: opacity .3s, transform .4s var(--ease); }
.cta.is-lit .bulb svg { stroke: var(--orange-deep); }
.cta.is-lit .bulb__glass { fill: rgba(253,224,71,.5); }
.cta.is-lit .bulb__filament { stroke: var(--orange); filter: drop-shadow(0 0 6px #F97316); }
.cta.is-lit .bulb__rays { opacity: 1; transform: none; }
.cta.is-flicker .bulb svg { animation: bulb-flicker .7s steps(1); }
@keyframes bulb-flicker { 0% { opacity: .4; } 20% { opacity: 1; } 35% { opacity: .5; } 50%, 100% { opacity: 1; } }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__info > p:not(.eyebrow) { color: var(--muted); }
.contact__list { display: grid; gap: 14px; margin: 30px 0; }
.contact__list li { display: flex; gap: 16px; align-items: center; }
.contact__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--orange-ink); flex-shrink: 0; }
.contact__list small { display: block; font: 500 .7rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact__list a { text-decoration: none; font-weight: 600; transition: color .2s; }
.contact__list a:hover { color: var(--accent-text); }
.contact__map { aspect-ratio: 16/9; }
.form { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); display: grid; gap: 20px; margin-top: 60px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .9rem; padding: 0; }
.field legend { margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.15); }
.field .is-invalid { border-color: #DC2626; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.pills span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: .92rem; font-weight: 500; transition: all .2s; }
.pills input:checked + span { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.pills input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.form__error { margin: 0; color: #DC2626; font-size: .9rem; min-height: 1em; }
.form__error:empty { display: none; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form__actions .btn { flex: 1 1 200px; }

/* Pied de page */
.footer { position: relative; background: var(--paper); color: var(--muted); padding: 120px 0 30px; font-size: .95rem; border-top: 1px solid var(--line); }
.powerline { position: absolute; top: 0; left: 0; width: 100%; height: 90px; pointer-events: none; }
.powerline__wires path { fill: none; stroke: rgba(234,88,12,.45); stroke-width: 1.4; }
.powerline__pylons { fill: none; stroke: var(--ill-line); stroke-width: 1.4; stroke-linejoin: round; opacity: .4; }
.pl-house__body { fill: var(--ill-surface); stroke: var(--ill-line); stroke-width: 1.5; stroke-linejoin: round; }
.pl-house__drop { stroke: rgba(234,88,12,.45); stroke-width: 1.4; }
.pl-house__win { fill: #FBBF24; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.footer__logo { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 18px; }
.footer__logo img { height: 64px; width: auto; }
.footer__brand p { max-width: 30ch; }
.footer h4 { color: var(--text); font-size: 1rem; font-stretch: 108%; margin-bottom: 16px; }
.footer li { padding: 5px 0; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--accent-text); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; font-size: .85rem; }
.footer__up { display: inline-flex; align-items: center; gap: 8px; }
.footer__up .ic { width: 16px; height: 16px; transform: rotate(-90deg); }

/* Transition du thème : la nuit s'étend depuis le bouton soleil/lune (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* Navigateurs sans View Transitions : petit clignotement de lampe */
html.is-flickering body { animation: room-flicker .5s steps(1); }
@keyframes room-flicker { 0% { filter: brightness(.35); } 25% { filter: brightness(1); } 45% { filter: brightness(.3); } 70%, 100% { filter: none; } }

/* ---------- Révélation au scroll ---------- */
[data-anim="fade"] { opacity: 0; transform: translateY(18px); animation: in .9s var(--ease) var(--d, 0s) forwards; }
@keyframes in { to { opacity: 1; transform: none; } }
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .values { grid-template-columns: repeat(3, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero { padding-top: 130px; }
  .hero__inner, .about, .why, .clients, .contact { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .hero__strip { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .hero__strip li:nth-child(3) { padding-left: 0; border-left: 0; }
  .services { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
  .process__line { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis li:nth-child(3) { padding-left: 0; border-left: 0; }
  .expertise { position: relative; top: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .proj--tall { grid-row: span 1; }
  .scene--house { max-width: 640px; margin: 0 auto; width: 100%; order: 2; }
}
@media (max-width: 640px) {
  .nav { top: 10px; }
  .nav__inner { height: 62px; }
  .nav__logo img { height: 40px; }
  .slider { min-height: 620px; }
  .slide__bg::before { top: 26%; }
  .slide__content { bottom: 84px; }
  .slide__card { padding: 20px 20px 16px 24px; }
  .slide__text { font-size: .9rem; }
  .slider__ui { bottom: 16px; }
  .slider__panel { padding-left: 16px; gap: 10px; }
  .slider__label { display: none; }
  .slider__tab { min-height: 44px; }
  .hero__title { font-size: clamp(2.2rem, 10vw, 2.9rem); }
  .hero__badge--a { right: 0; top: 0; }
  .hero__badge--b { display: none; }
  .hero__circuit { opacity: .45; }
  .hero__circuit .traces path, .hero__circuit .flow, .hero__circuit .comps { stroke-width: 6; }
  .mv, .form__row, .process, .clients__grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .values .val:last-child { grid-column: span 2; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .proj--wide { grid-column: span 1; }
  .footer__top { grid-template-columns: 1fr; }
  .about__media { height: 420px; }
  .svc__sym { width: 72px; height: 72px; }
  .cta__bg::before { display: none; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero__circuit .traces path { stroke-dashoffset: 0; }
  .hero__circuit .comps, .hero__circuit .flow { opacity: 1; }
  .hero__circuit .switch-lever { transform: none; }
  .hero__circuit .pulses, .powerline__pulse, .wire__line::after { display: none; }
}
