/* Home motion: foreground surfaces, native scroll and a fully readable fallback.
   Depth 0: approved images, 1: light, 3: products/cards, 4: reading, 5: chapter edge. */
/* Lenis's pinned stylesheet is loaded before this file. No transformed wrapper
   or custom scrollbar: native sticky coordinates stay unchanged. */
.sg-home .sg-chapter {position:relative}
.sg-home .sg-chapter-anchor {height:0;pointer-events:none}
.sg-home .sg-chapter-shade {display:none}
.sg-home .sg-motion-toggle {width:44px;min-width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--champagne);border-radius:50%;color:var(--champagne);margin-left:0;flex:none;font-size:16px}
.sg-home .sg-motion-toggle[aria-pressed=true] {background:var(--champagne);color:var(--carbon)}
.sg-home.sg-motion-active,.sg-home.sg-motion-active.v2-scrolled {--sg-header-height:72px}
.sg-home.sg-motion-active #sg-main-content {position:relative;z-index:1}
.sg-home.sg-motion-active .sg-chapter {position:sticky;top:var(--chapter-stop,0px);z-index:var(--chapter-index);isolation:isolate}
.sg-home.sg-motion-active .sg-chapter-surface {position:relative;transform-origin:50% 100%;background:var(--carbon)}
.sg-home .sg-chapter--role .sg-chapter-surface,.sg-home .sg-chapter--decider .sg-chapter-surface,.sg-home .sg-chapter--accompagnement .sg-chapter-surface {background:var(--ivory)}
.sg-home.sg-motion-active .sg-chapter-shade {display:block;position:absolute;inset:0;pointer-events:none;background:#0a1013;opacity:0;z-index:100}
.sg-home.sg-motion-active .sg-chapter-surface:before {content:'';position:absolute;top:0;left:0;right:0;height:1px;z-index:10;background:rgba(206,178,124,.5);pointer-events:none}
.sg-home.sg-measuring .sg-chapter,.sg-home.sg-measuring .sg-trust-sticky,.sg-home.sg-measuring .sg-product-sticky,.sg-home.sg-measuring .v2-document {position:relative!important;top:0!important}
.sg-home.sg-measuring .sg-chapter-surface {transform:none!important}
.sg-home.sg-motion-active .v2-hero {position:sticky;top:var(--hero-stop,72px);z-index:1;transform-origin:50% 100%}
.sg-home .sg-hero-depth {position:absolute;inset:0;background:var(--carbon);opacity:0;z-index:4;pointer-events:none}
.sg-home.sg-motion-active .v2-house {border-radius:20px 20px 0 0}
.sg-home.sg-motion-active [data-chapter="6"] {position:relative;top:auto}
.sg-home .sg-tail-anchor {height:0;pointer-events:none}
.sg-home .sg-tail-scene {position:sticky;top:var(--tail-stop,72px);z-index:var(--tail-index);isolation:isolate}
.sg-home .sg-tail-surface {position:relative;display:flow-root;background:var(--ivory);transform-origin:50% 100%}
.sg-home [data-tail-scene="1"] .sg-tail-surface {background:var(--petrol)}
.sg-home .sg-tail-shade {position:absolute;inset:0;opacity:0;pointer-events:none;background:var(--carbon);z-index:10}
.sg-home .sg-depth-moving>.sg-chapter-surface,.sg-home .sg-depth-moving>.sg-tail-surface {will-change:transform}
/* Fully covered surfaces no longer need a large transformed compositor layer.
   Restore the timeline's transform on reverse before any part becomes visible. */
.sg-home .sg-depth-covered>.sg-chapter-surface,.sg-home .sg-depth-covered>.sg-tail-surface,.sg-home .v2-hero.sg-depth-covered {transform:none!important}
.sg-home .sg-depth-covered>.sg-chapter-shade,.sg-home .sg-depth-covered>.sg-tail-shade {visibility:hidden}
.sg-home.sg-measuring .v2-hero,.sg-home.sg-measuring .sg-tail-scene {position:relative!important;top:0!important}
.sg-home.sg-measuring [data-sg-motion-owner],.sg-home.sg-measuring .sg-house-width,.sg-home.sg-measuring .sg-realisations-grid,.sg-home.sg-measuring .v2-gallery,.sg-home.sg-measuring .v2-budget-row,.sg-home.sg-measuring .sg-tail-surface {transform:none!important}
.sg-home.sg-motion-active .v2-house {position:relative;z-index:2;box-shadow:0 -24px 64px #0a101333}
.sg-home.sg-motion-active .v2-hero h1,.sg-home.sg-motion-active .v2-hero-picture img,.sg-home.sg-motion-active .v2-gallery img.v2-changed {animation:none}
.sg-home .sg-title-line {display:block}
.sg-home.sg-motion-active .sg-title-line {overflow:clip}
.sg-home .sg-title-line>span {display:block}
.sg-home .sg-heading-mask {overflow:clip}
.sg-home .sg-heading-copy {display:block;text-wrap:balance}
.sg-home.sg-motion-active .v2-budget-row {background:var(--ivory)}
.sg-home.sg-measuring .sg-heading-copy {transform:none!important}
.sg-home .sg-roof-reflection {position:absolute;inset:0;z-index:-1;overflow:clip;pointer-events:none}
.sg-home .sg-roof-mask {position:absolute;clip-path:polygon(47.5% 39.5%,57.5% 26%,82% 17%,78.3% 31%);overflow:clip}
.sg-home .sg-roof-beam {position:absolute;inset:-50%;background:linear-gradient(105deg,transparent 38%,rgba(242,232,207,.08) 44%,rgba(247,236,209,.52) 50%,rgba(242,232,207,.08) 56%,transparent 64%);mix-blend-mode:screen;opacity:0}
.sg-home.sg-motion-active .sg-line-reveal {position:relative}
.sg-home.sg-motion-active .sg-line-reveal:after {content:'';position:absolute;left:0;right:0;top:0;height:1px;background:currentColor;opacity:.25;transform:scaleX(var(--line-progress,1));transform-origin:left;pointer-events:none}
.sg-home.sg-motion-active .v2-reading-links a:after {transition:transform .35s cubic-bezier(.22,1,.36,1)}
.sg-home.sg-motion-active .v2-reading-links a:is(:hover,:focus-visible):after {transform:translate(5px,-4px)}
.sg-home.sg-motion-active .v2-proof-grid a {transition:background .3s,color .3s;outline-offset:8px}
.sg-home.sg-motion-active .v2-proof-grid a:is(:hover,:focus-visible) {background:rgba(47,107,115,.06);color:var(--accent)}
/* Voluntary, six-state preview. Images retain their original projection. */
.sg-home .sg-energy-controls {display:flex;flex-wrap:wrap;gap:10px 24px;padding:16px 0 0;align-items:center}
.sg-home .sg-energy-controls fieldset {border:0;padding:0;margin:0;min-width:0;display:flex;gap:6px;flex-wrap:wrap}
.sg-home .sg-energy-controls legend {font:11px/1.6 'IBM Plex Mono',monospace;letter-spacing:.03em;margin-bottom:7px;color:#d0dddb}
.sg-home .sg-energy-controls label {position:relative;display:flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #62787b;border-radius:4px;font-size:12px;cursor:pointer}
.sg-home .sg-energy-controls input {position:absolute;inset:0;opacity:0;cursor:pointer}
.sg-home .sg-energy-controls label:has(input:checked) {background:var(--champagne);color:var(--carbon);border-color:var(--champagne)}
.sg-home .sg-energy-controls label:has(input:focus-visible) {outline:3px solid var(--champagne);outline-offset:3px}
.sg-home .sg-energy-pause {align-self:end;background:transparent;color:var(--ivory);border:1px solid #62787b;border-radius:4px;padding:8px 12px;min-height:40px;font-size:12px}
.sg-home .sg-energy-visual {position:absolute;overflow:clip;pointer-events:none;isolation:isolate}
.sg-home .sg-energy-visual svg {display:block;width:100%;height:100%}
.sg-home .sg-energy-flow {fill:none;stroke:var(--champagne);stroke-width:3;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-dasharray:7 10;filter:drop-shadow(0 0 3px #ceb27c80)}
.sg-home .sg-energy-route {fill:none;stroke:var(--champagne);stroke-width:1;opacity:.45}
.sg-home .sg-energy-flow--import {stroke:#f0ede5}
.sg-home .sg-energy-contract {fill:none;stroke:#b8c9c8;stroke-width:1.5;stroke-dasharray:2 6}
.sg-home .sg-energy-node {fill:#142d35;stroke:#ceb27c;stroke-width:1.2}
.sg-home .sg-energy-visual text {fill:#f0ede5;font:16px Manrope,sans-serif;paint-order:stroke;stroke:#142d35;stroke-width:4px;stroke-linejoin:round}
.sg-home .sg-energy-state {font-size:13px;line-height:1.6;color:#d0dddb;margin:10px 0 0;max-width:90ch}
.sg-home .sg-energy-state strong {color:var(--champagne);font-weight:500}
.sg-home .sg-energy-night {position:absolute;inset:0;background:#071b35;mix-blend-mode:multiply;opacity:0;pointer-events:none}
/* Cards use native sticky tracks. No nested GSAP pin or internal scrollbar. */
.sg-home.sg-motion-active .v2-editorial-body.sg-trust-enhanced {display:block}
.sg-home .sg-scene-controls {display:flex;gap:8px;margin:0 0 18px;flex-wrap:wrap}
.sg-home .sg-scene-controls button {min-height:44px;border:1px solid var(--line);padding:9px 15px;background:transparent;color:inherit;border-radius:4px;font-size:13px;line-height:1.4;text-align:left}
.sg-home .sg-scene-controls button[aria-pressed=true] {background:var(--petrol);color:var(--ivory);border-color:var(--petrol)}
.sg-home .sg-trust-track,.sg-home .sg-product-track {position:relative}
.sg-home .sg-trust-sticky,.sg-home .sg-product-sticky {position:sticky;top:var(--scene-top,90px)}
.sg-home .sg-trust-cards {display:grid;padding-bottom:40px;perspective:1200px;clip-path:inset(0 -40px -40px)}
.sg-home.sg-motion-active .sg-trust-cards .v2-editorial-row {grid-area:1/1;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr);gap:0;align-items:stretch;align-content:stretch;background:var(--petrol);color:var(--ivory);border:1px solid #4c6468;padding:0;box-shadow:0 14px 36px #142d3512;border-radius:8px;margin:0;min-width:0;min-height:288px;overflow:clip;transform-origin:50% 100%}
.sg-home.sg-motion-active .sg-trust-cards .v2-editorial-row:nth-child(2) {background:var(--carbon)}
.sg-home .sg-trust-copy {align-self:center;min-width:0;padding:32px 40px}
.sg-home .sg-trust-photo {position:relative;min-width:0;min-height:288px;background:#e9e7de;overflow:clip}
.sg-home .sg-trust-photo img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sg-home .sg-trust-cards .v2-editorial-row:first-child .sg-trust-photo img {object-fit:contain;padding:10px 10px 40px}
.sg-home .sg-trust-cards .v2-editorial-row:nth-child(2) .sg-trust-photo {background:#10191e}
.sg-home .sg-trust-cards .v2-editorial-row:nth-child(2) .sg-trust-photo img {object-fit:cover;object-position:50% 45%}
.sg-home .sg-trust-cards .v2-editorial-row:last-child .sg-trust-photo img {object-position:50% 32%}
.sg-home .sg-trust-photo figcaption {position:absolute;bottom:0;left:0;right:0;background:#10191ef2;color:var(--ivory);padding:9px 16px;font-size:11px;line-height:1.5}
.sg-home .sg-trust-cards .v2-editorial-row:not(.is-current) .sg-trust-photo figcaption {visibility:hidden}
.sg-home.sg-motion-active .sg-trust-cards .v2-kicker {color:var(--champagne);margin-bottom:14px}
.sg-home.sg-motion-active .sg-trust-cards .sg-trust-copy h3 {color:var(--ivory);margin:0 0 18px;font-size:30px;max-width:22ch}
.sg-home.sg-motion-active .sg-trust-cards .sg-trust-copy p {color:var(--ivory)}
.sg-home.sg-motion-active .sg-trust-cards .v2-editorial-row>.v2-kicker {grid-column:1/-1;margin:0}
.sg-home.sg-motion-active .sg-trust-cards .v2-step-heading {grid-column:1;margin:0}
.sg-home.sg-motion-active .sg-trust-cards h3 {font-size:29px;margin:0}
.sg-home.sg-motion-active .sg-trust-cards .v2-step-copy {grid-column:2;grid-row:2}
.sg-home.sg-motion-active .sg-trust-cards .v2-editorial-row:last-child .v2-step-copy {grid-row:1/3}
.sg-home.sg-motion-active .sg-trust-cards .v2-step-heading .v2-kicker {margin-bottom:10px}
.sg-home.sg-motion-active .sg-trust-enhanced .v2-roles-note {margin-top:22px}
.sg-home .sg-product-sticky {color:var(--ivory)}
.sg-home .sg-product-sticky .sg-scene-controls {border-bottom:1px solid var(--line);padding-bottom:14px}
.sg-home .sg-product-sticky .sg-scene-controls button[aria-pressed=true] {background:var(--champagne);color:var(--carbon);border-color:var(--champagne)}
.sg-home .sg-product-panels {display:grid;isolation:isolate}
.sg-home.sg-motion-active .sg-product-panels .produit-card {grid-area:1/1;display:grid;grid-template-columns:1.2fr 1fr;gap:18px 48px;align-items:center;padding:20px 32px 26px;border:1px solid rgba(206,178,124,.2);background:radial-gradient(ellipse at 25% 45%,#244149 0,#101c22 35%,#0a1013 75%);border-radius:8px;box-shadow:none}
/* The global link transition must not add a second delay to GSAP's scroll
   position, opacity and visibility on these full-card links. */
.sg-home.sg-motion-active .sg-product-panels .produit-card {transition:none}
.sg-home.sg-motion-active .sg-product-panels .v2-product-object {grid-column:1;grid-row:1/3;margin:0;height:340px;background:none}
.sg-home.sg-motion-active .sg-product-panels .v2-product-object>img,.sg-home.sg-motion-active .sg-product-panels .v2-product-object>picture>img {height:320px;max-width:100%;width:100%;object-fit:contain}
.sg-home.sg-motion-active .sg-product-panels .produit-content {grid-column:2;align-self:end}
.sg-home.sg-motion-active .sg-product-panels .produit-nom {font-size:30px;min-height:0;margin-bottom:16px}
.sg-home.sg-motion-active .sg-product-panels .produit-desc {font-size:17px}
.sg-home.sg-motion-active .sg-product-panels .produit-benefits {font-size:15px;gap:12px;margin-bottom:0}
.sg-home.sg-motion-active .sg-product-panels .v2-product-link {grid-column:2;align-self:start;font-size:14px;margin:0}
.sg-home .sg-mobile-product-nav {margin-bottom:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.sg-home .sg-mobile-product-nav button[aria-pressed=true] {background:var(--champagne);color:var(--carbon)}
.sg-home.sg-motion-active .v2-timeline {position:relative}
.sg-home.sg-motion-active .v2-timeline:before {content:'';position:absolute;left:0;top:0;bottom:20px;width:1px;background:var(--accent);transform:scaleY(var(--timeline-progress,0));transform-origin:top}
.sg-home.sg-motion-active .v2-timeline-step {border-left-color:transparent}
.sg-home.sg-motion-active .v2-timeline-step.is-current h3 {color:var(--accent)}
.sg-home .sg-gallery-flight {position:fixed;z-index:100000;pointer-events:none;object-fit:cover;max-width:none;background:var(--carbon)}
.sg-home.sg-motion-active .v2-lightbox::backdrop {animation:sg-backdrop-in .5s ease both}
@keyframes sg-backdrop-in {from{background:rgba(10,16,19,0)}to{background:rgba(10,16,19,.94)}}
/* Short desktop windows retain the four-panel sequence. Size the illustration
   to available height instead of replacing the whole scene by a grid. */
@media(min-width:1101px) and (max-height:649px){
 .sg-home.sg-motion-active .sg-product-panels .produit-card {padding:16px 28px 20px;gap:14px 36px}
 .sg-home.sg-motion-active .sg-product-panels .v2-product-object {height:clamp(180px,calc(100svh - 350px),260px)}
 .sg-home.sg-motion-active .sg-product-panels .v2-product-object>img,.sg-home.sg-motion-active .sg-product-panels .v2-product-object>picture>img {height:100%;max-height:260px}
}
@media(max-width:1100px){.sg-home .sg-energy-controls {gap:12px}.sg-home .sg-energy-controls label {padding:8px 10px}}
@media(max-width:760px){
 .sg-home.sg-motion-active,.sg-home.sg-motion-active.v2-scrolled {--sg-header-height:64px}
 .sg-home .sg-motion-toggle {width:40px;min-width:40px;height:40px}
 .sg-home .sg-energy-controls {display:grid;grid-template-columns:1fr}
 .sg-home .sg-energy-controls label {min-height:44px;font-size:12px}
 .sg-home .sg-energy-pause {justify-self:start;min-height:44px}
 .sg-home .sg-energy-state {font-size:13px}
 .sg-home .sg-energy-visual text {font-size:20px}
 .sg-home .sg-scene-controls button {font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 .sg-home .sg-chapter {position:relative!important;top:auto!important}
 .sg-home .sg-chapter-shade,.sg-home .sg-roof-reflection {display:none!important}
}
