/*
Theme Name: Piémontesi Savagnier
Theme URI: https://www.piemontesi-sa.ch
Author: Nathanaël Schmocker — Repair Hub
Author URI: https://www.repairhub.ch
Description: Maquette de refonte pour Piémontesi Savagnier SA, entreprise générale à Savagnier depuis 1908. Réalisations réelles avec avant / après animés, scènes 3D légères en three.js (chantier qui se construit au défilement, maison animée) avec repli statique sur mobile et en mouvement réduit. Aucune dépendance externe : polices système, scripts et médias embarqués. À l'activation, le thème crée les pages nécessaires si elles n'existent pas.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: piemontesi-savagnier
Tags: one-column, custom-menu, full-width-template, threaded-comments
*/

:root {
	--red: #EA3425;
	--red-dark: #c4271a;
	--gray: #69686D;
	--gray-light: #8A8A8D;
	--ink: #1F1E22;
	--ink-2: #2a292e;
	--logo-bg: #56555A; /* fond du logo officiel */
	--paper: #F3F1EC;
	--line: #d9d5cc;
	--white: #fff;
	--pad: clamp(16px, 5.5vw, 88px);
	--title: "Avenir Next Condensed", "Avenir Next", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--text: "Avenir Next", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tech: "DIN Alternate", "DIN Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--text); overflow-x: hidden; }
img, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
a[x-apple-data-detectors], a[href^="tel"], a[href^="mailto"] { color: inherit; text-decoration: none; }
a[x-apple-data-detectors] { font: inherit !important; }
button { -webkit-appearance: none; appearance: none; border-radius: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--white); padding: 10px 16px; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.02; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(44px, 7vw, 104px); text-transform: uppercase; }
h2 { font-size: clamp(32px, 4.4vw, 62px); text-transform: uppercase; }
h3 { font-size: clamp(22px, 2vw, 28px); }
p { max-width: 68ch; }
.eyebrow { font: 600 13px/1.3 var(--tech); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin: 0 0 20px; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: #4a494e; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 14px 26px; background: var(--red); color: var(--white); border: 1px solid var(--red); font: 600 14px/1 var(--tech); letter-spacing: .12em; text-transform: uppercase; transition: background .2s, color .2s; }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button.small { min-height: 42px; padding: 10px 18px; }
.button.outline { background: transparent; border-color: rgba(243,241,236,.6); color: var(--paper); }
.button.outline:hover { background: var(--paper); color: var(--ink); }
.button.outline-dark { background: transparent; border-color: var(--ink); color: var(--ink); }
.text-link { display: inline-block; font: 600 13px/1.3 var(--tech); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--red); padding-bottom: 5px; }
.text-link::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .55em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-.08em) rotate(45deg); }
.text-link.light { color: var(--paper); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 4px var(--pad); background: var(--logo-bg); color: var(--paper); border-bottom: 1px solid rgba(0,0,0,.18); box-shadow: 0 6px 24px rgba(0,0,0,.18); transition: padding .25s; }
.site-header.scrolled { padding-top: 0; padding-bottom: 0; }
.brand img { display: block; width: 170px; height: auto; transition: width .25s; }
.site-header.scrolled .brand img { width: 120px; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font: 600 13px/1 var(--tech); letter-spacing: .12em; text-transform: uppercase; }
.site-nav li { list-style: none; }
.site-nav a:not(.button) { padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"], .site-nav .current-menu-item > a, .site-nav a:not(.button):hover { border-color: var(--red); }
.header-phone { font: 600 14px/1 var(--tech); letter-spacing: .08em; color: #e4e1db; }
.header-phone:hover { color: var(--white); }
.menu-toggle { display: none; margin-left: auto; color: var(--paper); background: none; border: 1px solid rgba(255,255,255,.3); padding: 10px 14px; font: 600 13px/1 var(--tech); letter-spacing: .12em; text-transform: uppercase; }

/* Hero */
.hero { position: relative; min-height: calc(100svh - 70px); display: flex; flex-direction: column; color: var(--paper); background: var(--ink); overflow: hidden; isolation: isolate; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .95; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(31,30,34,.72) 0%, rgba(31,30,34,.32) 50%, rgba(31,30,34,0) 85%), linear-gradient(0deg, rgba(31,30,34,.6), transparent 30%); }
.hero-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(243,241,236,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(243,241,236,.05) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(90deg, #000, transparent 70%); }
.hero-inner { flex: 1; display: grid; grid-template-columns: minmax(0, 760px); align-items: center; gap: 40px; padding: 60px var(--pad) 40px; }
.hero h1 { text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero h1 span { color: #c9c7c3; }
.hero-intro { text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-intro { font-size: clamp(17px, 1.4vw, 20px); color: #d9d6cf; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-foot { display: flex; align-items: center; gap: 30px; padding: 18px var(--pad); border-top: 1px solid rgba(243,241,236,.15); font: 600 12px/1.3 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--gray-light); }
.hero-foot a { color: var(--paper); margin-left: auto; }
.video-toggle { background: none; border: 1px solid rgba(243,241,236,.3); color: var(--paper); padding: 8px 12px; font: inherit; letter-spacing: inherit; text-transform: inherit; }

/* Logo détouré en calques */
.logo-3d { position: relative; margin: 0; aspect-ratio: 1.3; width: 100%; max-width: 560px; justify-self: end; }
.logo-3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-3d-fallback { position: absolute; inset: 12%; display: grid; place-items: center; border: 1px solid rgba(138,138,141,.6); }
.logo-3d-fallback::before, .logo-3d-fallback::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--red); }
.logo-3d-fallback::before { top: -6px; left: -6px; border-top-width: 3px; border-left-width: 3px; }
.logo-3d-fallback::after { bottom: -6px; right: -6px; border-bottom-width: 3px; border-right-width: 3px; }
.logo-3d-fallback img { width: min(334px, 78%); height: auto; }
.logo-3d.is-3d .logo-3d-fallback { display: none; }
.logo-3d figcaption { position: absolute; bottom: 0; right: 0; font: 600 11px/1 var(--tech); letter-spacing: .18em; text-transform: uppercase; color: var(--gray-light); }

/* Bandeau de preuves */
.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink-2); color: var(--paper); }
.proof-strip p { margin: 0; padding: 30px var(--pad) 30px 30px; border-left: 1px solid rgba(255,255,255,.08); max-width: none; }
.proof-strip p:first-child { padding-left: var(--pad); border-left: 0; }
.proof-strip strong { display: block; font: 700 clamp(30px, 3vw, 44px)/1 var(--title); color: var(--paper); margin-bottom: 8px; }
.proof-strip p:first-child strong { color: var(--red); }
.proof-strip span { font-size: 14px; color: #bcb9b2; }

/* Sections */
.section { padding: clamp(64px, 9vw, 130px) var(--pad); }
.section.dark { background: var(--ink); color: var(--paper); }
.section.paper { background: #e9e6df; }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 26px; }
.intro-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 50px; }
.intro-grid p { color: inherit; opacity: .8; font-size: 18px; }
.reveal-on .section, .reveal-on .heritage, .reveal-on .cta-band { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal-on .is-in { opacity: 1 !important; transform: none !important; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.service-tile { position: relative; display: flex; flex-direction: column; padding: 30px; background: var(--paper); min-height: 300px; overflow: hidden; }
.service-tile img { width: calc(100% + 60px); max-width: none; margin: -30px -30px 24px; aspect-ratio: 16/10; object-fit: cover; transition: transform .6s; }
.service-tile:hover img { transform: scale(1.04); }
.service-tile > span { font: 600 13px/1 var(--tech); letter-spacing: .16em; color: var(--red); margin-bottom: 10px; }
.service-tile p { color: #55545a; margin: 0 0 20px; }
.service-tile strong { margin-top: auto; font: 600 12px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; }
.service-tile strong::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .5em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-.08em) rotate(45deg); color: var(--red); }
.service-grid.plain .service-tile { min-height: 0; }

/* Chantier au défilement */
.build { position: relative; height: 420vh; background: var(--ink); color: var(--paper); }
.build-sticky { position: sticky; top: var(--hh, 80px); height: calc(100vh - var(--hh, 80px)); display: grid; grid-template-columns: minmax(320px, 0.8fr) 1.4fr; overflow: hidden; }
.build-copy { padding: 50px 30px 40px var(--pad); display: flex; flex-direction: column; justify-content: center; z-index: 2; background: linear-gradient(90deg, var(--ink) 75%, transparent); }
.build-copy h2 { font-size: clamp(32px, 3.6vw, 54px); margin-bottom: 28px; }
.build-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.build-steps li { display: grid; grid-template-columns: 46px 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.1); opacity: .42; transition: opacity .4s; }
.build-steps .step-num { font: 700 15px/1.6 var(--tech); color: var(--gray-light); letter-spacing: .1em; }
.build-steps h3 { font-size: 20px; margin: 0; text-transform: uppercase; }
.build-steps p, .build-steps .step-proof { display: none; }
.build-steps li.is-active { opacity: 1; }
.build-steps li.is-active .step-num { color: var(--red); }
.build-steps li.is-active p { display: block; margin: 6px 0 12px; color: #cfccc5; font-size: 15px; }
.build-steps li.is-active .step-proof { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--gray-light); text-transform: uppercase; letter-spacing: .1em; }
.step-proof img { width: 64px; height: 64px; object-fit: cover; border: 1px solid rgba(255,255,255,.2); }
.step-proof strong { color: var(--paper); text-transform: none; letter-spacing: 0; font: 600 14px/1.3 var(--text); }
.step-proof:hover strong { text-decoration: underline; text-decoration-color: var(--red); }
.build-stage { position: relative; }
#build-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.build-fallback { display: none; }
.build-hud { position: absolute; top: 30px; right: var(--pad); width: 220px; font: 600 12px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--gray-light); display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.build-hud strong { color: var(--paper); font-size: 20px; }
.build-hud i { grid-column: 1 / -1; height: 3px; background: rgba(255,255,255,.12); }
.build-hud b { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }
.build-note { position: absolute; bottom: 20px; right: var(--pad); margin: 0; font: 600 11px/1.3 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--gray-light); }

/* Repli statique du chantier : pas de défilement long */
.no-3d .build { height: auto; }
.no-3d .build-sticky { position: static; height: auto; grid-template-columns: 1fr 1fr; }
.no-3d #build-canvas, .no-3d .build-hud { display: none; }
.no-3d .build-fallback { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.no-3d .build-steps li { opacity: 1; }
.no-3d .build-steps li p { display: block; margin: 4px 0 10px; color: #cfccc5; font-size: 15px; }
.no-3d .build-steps li .step-proof { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--gray-light); text-transform: uppercase; letter-spacing: .1em; }
.no-3d .build-steps li .step-num { color: var(--red); }

/* Réalisations */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }
.project-card a { display: block; }
.project-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--ink-2); }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s, filter .4s; }
.project-card:hover .project-image img { transform: scale(1.05); }
.project-image video { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-image.is-video .ba-label { top: 12px; left: 12px; }

/* Avant / après animé sur les cartes */
.ba-card img { position: absolute; inset: 0; }
.ba-card .ba-after { clip-path: inset(0 0 0 100%); }
.ba-line { position: absolute; top: 0; bottom: 0; left: 100%; width: 3px; margin-left: -1px; background: var(--red); box-shadow: 0 0 0 1px rgba(0,0,0,.15); opacity: 0; pointer-events: none; }
.ba-label { position: absolute; top: 12px; padding: 6px 9px; background: rgba(31,30,34,.82); color: var(--paper); font: 600 10px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; pointer-events: none; }
.ba-l1 { left: 12px; }
.ba-l2 { right: 12px; background: var(--red); opacity: 0; }
.ba-card.is-playing .ba-after { animation: ba-wipe 9s cubic-bezier(.65,0,.35,1) infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
.ba-card.is-playing .ba-line { animation: ba-line 9s cubic-bezier(.65,0,.35,1) infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
.ba-card.is-playing .ba-l2 { animation: ba-l2 9s linear infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
.ba-card.is-playing .ba-l1 { animation: ba-l1 9s linear infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
@keyframes ba-wipe { 0%, 18% { clip-path: inset(0 0 0 100%); } 46%, 82% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 100%); } }
@keyframes ba-line { 0%, 16% { left: 100%; opacity: 0; } 19% { left: 100%; opacity: 1; } 46% { left: 0; opacity: 1; } 49%, 100% { left: 0; opacity: 0; } }
@keyframes ba-l2 { 0%, 40% { opacity: 0; } 46%, 82% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes ba-l1 { 0%, 30% { opacity: 1; } 40%, 88% { opacity: 0; } 96%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.ba-card .ba-after { clip-path: none; }
	.ba-card .ba-l1 { opacity: 0; } .ba-card .ba-l2 { opacity: 1; }
}

/* Curseur avant / après (fiche) */
.ba-section .section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.ba-hint { font: 600 11px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--gray); }
.ba-slider { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--ink-2); user-select: none; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider .ba-top { clip-path: inset(0 0 0 var(--pos)); }
.ba-slider .ba-line { left: var(--pos); opacity: 1; }
.ba-slider .ba-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: var(--white); font-size: 18px; }
.ba-slider .ba-l2 { opacity: 1; }
.ba-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-slider:has(input:focus-visible) .ba-line::after { outline: 3px solid var(--paper); outline-offset: 2px; }
.ba-note { margin-top: 12px; font-size: 13px; color: var(--gray); }

/* Rail réseaux sociaux */
.social-rail { position: fixed; z-index: 45; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; background: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.social-rail .rail-label { writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 10px; font: 600 10px/1 var(--tech); letter-spacing: .22em; text-transform: uppercase; color: var(--gray-light); }
.social-rail a { width: 38px; height: 38px; display: grid; place-items: center; color: var(--paper); transition: background .2s; }
.social-rail a:hover, .social-rail a:focus-visible { background: var(--red); }
.social-rail svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.social-rail a > span { font: 700 16px/1 var(--title); }
.project-view { position: absolute; left: 0; bottom: 0; padding: 10px 14px; background: var(--red); color: var(--white); font: 600 11px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; transform: translateY(100%); transition: transform .3s; }
.project-card:hover .project-view, .project-card a:focus-visible .project-view { transform: none; }
.play-badge { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(31,30,34,.75); color: var(--paper); font-size: 14px; }
.project-meta { display: flex; justify-content: space-between; margin: 14px 0 6px; font: 600 12px/1 var(--tech); letter-spacing: .16em; color: var(--red); }
.project-meta span { color: var(--gray); }
.dark .project-meta span { color: var(--gray-light); }
.project-card h3 { font-size: 22px; text-transform: none; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 40px; }
.filters button { background: transparent; border: 1px solid var(--ink); padding: 10px 16px; font: 600 12px/1 var(--tech); letter-spacing: .14em; text-transform: uppercase; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters .search input { border: 1px solid var(--line); background: var(--white); padding: 10px 14px; min-width: 260px; }
#filter-status { margin-left: auto; font: 600 12px/1 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--gray); }
.group-title { display: flex; align-items: baseline; gap: 16px; font-size: clamp(24px, 2.6vw, 36px); margin: 60px 0 26px; padding-top: 22px; border-top: 2px solid var(--ink); }
.group-title:first-of-type { margin-top: 0; }
.group-title span { color: var(--red); font-family: var(--tech); font-size: .6em; letter-spacing: .1em; }
.empty { padding: 40px 0; font-size: 18px; }

/* Maison animée (Réalisations) */
.house-stage { position: relative; height: min(72vh, 680px); min-height: 420px; background: #efece5; border-bottom: 1px solid var(--line); overflow: hidden; }
#house-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.house-fallback { display: none; }
.no-3d .house-fallback { display: block; width: 100%; height: 100%; object-fit: cover; }
.no-3d #house-canvas { display: none; }
.house-caption { position: absolute; left: var(--pad); bottom: 34px; max-width: 360px; }
.house-caption .eyebrow { margin-bottom: 8px; }
.house-phase { font: 700 clamp(26px, 3vw, 42px)/1 var(--title); text-transform: uppercase; margin: 0 0 12px; min-height: 1em; }
.house-caption small { color: var(--gray); font-size: 13px; }
.no-3d .house-phase { display: none; }

/* Détail de réalisation */
.breadcrumb { padding: 26px var(--pad) 0; font: 600 12px/1 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--gray); }
.breadcrumb a { color: var(--red); }
.breadcrumb span { margin: 0 10px; }
.project-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; padding: 40px var(--pad) 70px; }
.project-hero h1 { font-size: clamp(38px, 5vw, 76px); }
.project-hero figure { margin: 0; }
.project-hero figure img, .project-hero figure video { width: 100%; max-height: 74vh; object-fit: cover; }
.project-hero .vertical-video { width: auto; max-width: 100%; height: min(74vh, 680px); margin: 0 auto; background: #000; }
.project-hero figcaption { margin-top: 10px; font-size: 13px; color: var(--gray); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 30px; }
.tag-list span { padding: 7px 12px; border: 1px solid var(--line); font: 600 12px/1 var(--tech); letter-spacing: .1em; text-transform: uppercase; }
.steps-strip { padding-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--red); z-index: -1; }
.timeline li { background: var(--paper); padding: 8px; border: 1px solid var(--line); }
.timeline img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.timeline span { display: block; margin-top: 10px; font: 600 12px/1 var(--tech); color: var(--red); letter-spacing: .14em; }
.timeline strong { font-size: 15px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gallery-thumb { position: relative; padding: 0; border: 0; background: var(--ink); overflow: hidden; aspect-ratio: 4/3; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.gallery-thumb:hover img { transform: scale(1.05); opacity: .85; }
.gallery-thumb span { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; background: rgba(31,30,34,.8); color: var(--paper); font: 600 11px/1 var(--tech); letter-spacing: .1em; }
.source-block { padding-top: 30px; padding-bottom: 30px; }
.source-note { font-size: 14px; color: var(--gray); }
.source-note a { color: var(--red); }
.next-project { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 60px var(--pad); background: var(--ink); color: var(--paper); align-items: center; }
.next-project > span { font: 600 12px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--gray-light); }
.next-project h2 { margin: 0 0 8px; transition: color .2s; }
.next-project a:hover h2 { color: var(--red); }

.lightbox { width: min(1200px, 94vw); max-height: 94vh; padding: 0; border: 0; background: var(--ink); color: var(--paper); }
.lightbox::backdrop { background: rgba(10,10,12,.86); }
.lightbox-stage img { width: 100%; max-height: 80vh; object-fit: contain; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.gallery-controls button, .dialog-close { background: none; border: 1px solid rgba(255,255,255,.3); color: var(--paper); padding: 10px 16px; }
.dialog-close { position: absolute; top: 10px; right: 10px; background: rgba(31,30,34,.8); z-index: 2; }
.gallery-controls p { margin: 0; font: 600 13px/1 var(--tech); letter-spacing: .14em; }

/* Récents (accueil) */
.recent .project-card h3 { color: var(--paper); }

/* Héritage */
.heritage { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(30px, 6vw, 100px); padding: clamp(64px, 9vw, 130px) var(--pad); background: var(--paper); }
.heritage-number { display: block; font: 700 clamp(100px, 16vw, 230px)/.85 var(--title); color: var(--ink); letter-spacing: -.03em; }
.heritage-number span { color: var(--red); }
.heritage-year p:last-child { color: var(--gray); }
.team-photo { margin: 30px 0; }
.team-photo img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.team-photo figcaption { margin-top: 10px; font-size: 13px; color: var(--gray); }

/* Moyens */
.fleet-teaser { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.fleet-film { position: relative; }
.fleet-film video { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--ink); }
.fleet-film span, .clip figcaption span { display: block; margin-top: 10px; font: 600 11px/1.3 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--gray); }
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 0; }
.clip { margin: 0; }
.clip video { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--ink); }
.clip figcaption { margin-top: 12px; }
.clip figcaption strong { font: 700 22px/1.1 var(--title); text-transform: uppercase; }
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-row img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.social-section { text-align: left; }
.social-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); margin-top: 30px; }
.social-cards a { display: grid; gap: 8px; padding: 30px; background: var(--paper); }
.social-cards a > svg, .social-cards a > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; font: 700 22px/1 var(--title); fill: none; stroke: var(--red); stroke-width: 1.6; color: var(--red); }
.social-cards a > span:nth-child(2) { font: 700 24px/1 var(--title); text-transform: uppercase; }
.social-cards small { color: var(--gray); }

/* Partenaires */
.partners-strip { padding-top: 60px; padding-bottom: 60px; }
.partners-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); }
.partners-grid a { display: grid; gap: 6px; padding: 30px; background: var(--paper); transition: background .2s; }
.partners-grid a:hover { background: var(--white); }
.partners-grid span { font: 600 12px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.partners-grid strong { font: 700 clamp(26px, 2.6vw, 36px)/1 var(--title); text-transform: uppercase; }
.partners-grid small { color: var(--gray); font-size: 14px; }

/* Appel à l'action */
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: clamp(50px, 7vw, 90px) var(--pad); background: var(--red); color: var(--white); }
.cta-band h2 { margin: 0; }
.cta-band .eyebrow { color: var(--white); opacity: .8; }
.cta-band .button { background: var(--ink); border-color: var(--ink); }
.cta-band .button:hover { background: var(--white); color: var(--ink); }

/* En-têtes de page */
.page-head { padding: clamp(60px, 8vw, 120px) var(--pad) clamp(40px, 5vw, 70px); background: var(--ink); color: var(--paper); background-image: linear-gradient(rgba(243,241,236,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(243,241,236,.05) 1px, transparent 1px); background-size: 64px 64px; }
.page-head .lead { color: #cfccc5; }
.dark-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.logo-3d-small { max-width: 460px; }

/* Métiers */
.metier { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.metier.reverse > figure { order: 2; }
.metier-photo { margin: 0; }
.metier-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.metier-photo figcaption { margin-top: 10px; font: 600 12px/1.3 var(--tech); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.lined-list { list-style: none; padding: 0; margin: 24px 0 30px; border-top: 1px solid var(--line); }
.lined-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.lined-list li::before { content: "— "; color: var(--red); }
.domain-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 30px; }
.domain-list li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); font: 700 20px/1.2 var(--title); text-transform: uppercase; }
.note-band { margin-top: 30px; padding: 26px 30px; border-left: 4px solid var(--red); background: var(--paper); }
.note-band a { color: var(--red); font-weight: 700; }

/* Entreprise */
.company-intro { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(30px, 6vw, 90px); }
.history-line { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--red); }
.history-line li { position: relative; padding: 0 0 26px; }
.history-line li::before { content: ""; position: absolute; left: -31px; top: 8px; width: 12px; height: 12px; background: var(--red); }
.history-line strong { display: block; font: 700 34px/1 var(--title); }
.history-line span { color: #55545a; }

/* Contact */
.contact-head { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.contact-head h1 { font-size: clamp(40px, 5.2vw, 84px); }
.contact-head-phone { display: inline-block; margin-top: 26px; font: 700 clamp(30px, 3.4vw, 46px)/1 var(--title); color: var(--paper); border-bottom: 3px solid var(--red); padding-bottom: 6px; }
.contact-head-phone:hover { color: var(--red); }
.contact-film { position: relative; margin: 0; justify-self: end; width: 100%; max-width: 520px; }
.contact-film video { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--ink-2); }
.contact-film::before { content: ""; position: absolute; top: -10px; left: -10px; width: 26px; height: 26px; border: 0 solid var(--red); border-top-width: 3px; border-left-width: 3px; }
.contact-film figcaption { margin-top: 10px; font: 600 11px/1.4 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--gray-light); }
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 90px); }
.phone { display: block; font: 700 clamp(40px, 5vw, 70px)/1 var(--title); margin: 0 0 16px; }
.phone:hover { color: var(--red); }
.contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 30px 0; }
.contact-details small { color: var(--gray); }
.form-panel { background: var(--white); padding: clamp(24px, 4vw, 50px); border-top: 4px solid var(--red); }
.form-panel h2 { font-size: clamp(28px, 3vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
form label input, form label select, form label textarea { display: block; margin-top: 6px; }
form label span { color: var(--red); }
form label small { font-weight: 400; color: var(--gray); }
input, select, textarea { width: 100%; border: 1px solid #cfcbc2; background: var(--paper); padding: 12px 14px; border-radius: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(234,52,37,.18); }
.privacy-note, .form-note { font-size: 13px; color: var(--gray); }
#quote-result { margin-top: 20px; padding: 20px; background: var(--paper); border-left: 4px solid var(--red); }
.faq details { border-bottom: 1px solid #cfcbc2; padding: 18px 0; }
.faq summary { cursor: pointer; font: 700 20px/1.2 var(--title); text-transform: uppercase; }
.faq summary::marker { color: var(--red); }

.legal h2 { font-size: 24px; margin-top: 40px; }
.entry-content, .entry-list { max-width: 900px; }
.entry-content img { height: auto; }
.entry { padding: 24px 0; border-bottom: 1px solid var(--line); }

/* Pied de page */
.site-footer { background: var(--ink); color: #cfccc5; padding: 70px var(--pad) 26px; font-size: 15px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand img { width: 150px; height: auto; margin-bottom: 16px; }
.footer-label { font: 600 12px/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav li { list-style: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; padding-top: 22px; font-size: 13px; color: var(--gray-light); }
.footer-social { display: flex; gap: 18px; }

/* Responsive */
@media (max-width: 1100px) {
	.header-phone { display: none; }
	.project-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-top { grid-template-columns: 1fr 1fr; }
	.domain-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
	.menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 10px var(--pad) 24px; background: var(--logo-bg); border-bottom: 1px solid rgba(0,0,0,.2); }
	.site-nav.open { display: flex; }
	.site-nav a:not(.button) { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
	.site-nav .button { margin-top: 16px; }
	.brand img, .site-header.scrolled .brand img { width: 110px; }
	.hero-inner, .intro-grid, .heritage, .fleet-teaser, .metier, .company-intro, .contact-layout, .project-hero, .dark-head, .next-project { grid-template-columns: 1fr; }
	.metier.reverse > figure { order: 0; }
	.hero-inner { padding-top: 40px; }
	.hero::before { background: linear-gradient(0deg, rgba(31,30,34,.7), rgba(31,30,34,.45) 60%, rgba(31,30,34,.3)); }
	.logo-3d { justify-self: start; max-width: 360px; }
	.dark-head .logo-3d { display: none; }
	.hero-foot { flex-wrap: wrap; gap: 12px; }
	.hero-foot a { margin-left: 0; }
	.proof-strip { grid-template-columns: 1fr 1fr; }
	.proof-strip p, .proof-strip p:first-child { padding: 22px 16px; border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
	.no-3d .build-sticky { grid-template-columns: 1fr; }
	.build-copy { padding: 50px var(--pad) 30px; background: var(--ink); }
	.service-grid, .clips, .social-cards, .partners-grid { grid-template-columns: 1fr; }
	.cta-band { flex-direction: column; align-items: flex-start; }
	.filters .search, .filters .search input { width: 100%; min-width: 0; }
	#filter-status { margin-left: 0; }
	.form-row, .contact-details { grid-template-columns: 1fr; }
	.house-stage { height: 56vw; min-height: 240px; }
	.house-caption { position: static; padding: 20px var(--pad); max-width: none; background: var(--paper); }
	.house-stage { height: auto; }
	.house-stage .house-fallback { height: 60vw; }
	.contact-head { grid-template-columns: 1fr; }
	.contact-film { max-width: 420px; }
	.social-rail { top: auto; bottom: 14px; right: 14px; transform: none; flex-direction: row; padding: 6px; }
	.social-rail .rail-label { display: none; }
	.social-rail a { width: 40px; height: 40px; }
	.ba-hint { display: none; }
}
@media (max-width: 520px) {
	.project-grid, .photo-row { grid-template-columns: 1fr; }
	.footer-top, .domain-list { grid-template-columns: 1fr; }
	.proof-strip { grid-template-columns: 1fr; }
	.photo-grid { grid-template-columns: 1fr 1fr; }
}

/* Flèches et icônes dessinées en CSS (aucun caractère susceptible de s'afficher en emoji) */
.arr { display: inline-block; width: .5em; height: .5em; margin-left: .15em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-.1em) rotate(45deg); font-style: normal; vertical-align: middle; }
.arr-out { transform: translateY(-.1em); }
.arr-down { transform: translateY(-.25em) rotate(135deg); }
.arr-left { transform: rotate(-135deg); }
.burger { display: inline-block; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; vertical-align: middle; margin-left: 4px; }
.ba-slider .ba-line::after { background: var(--red) no-repeat center / 22px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 1 1 6l5 5M16 1l5 5-5 5'/%3E%3C/svg%3E"); }

/* Mobile */
@media (max-width: 820px) {
	.menu-toggle:active, .menu-toggle[aria-expanded="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
	/* sans 3D (mouvement réduit, pas de WebGL) : parcours simple avec les vraies photos */
	.no-3d .build { height: auto; }
	.no-3d .build-sticky { position: static; height: auto; display: block; }
	.no-3d .build-stage { display: none; }
	.no-3d .build-copy { padding: 56px var(--pad) 40px; background: var(--ink); }
	.no-3d .build-steps { gap: 0; }
	.no-3d .build-steps li { opacity: 1; grid-template-columns: 40px 1fr; padding: 22px 0; }
	html.no-3d .build .build-steps li .step-proof { display: grid; gap: 10px; font-size: 11px; }
	html.no-3d .build .build-steps li .step-proof img { width: 100%; height: auto; aspect-ratio: 16/10; border: 0; }
	.no-3d .house-stage { display: none; }
	/* avec 3D : chantier en haut, étape active en bas, construit au défilement */
	.has-3d .build { height: 360vh; }
	.has-3d .build-sticky { position: sticky; top: var(--hh, 64px); height: calc(100svh - var(--hh, 64px)); display: flex; flex-direction: column; }
	.has-3d .build-stage { order: -1; flex: 1 1 auto; min-height: 0; }
	.has-3d .build-copy { flex: 0 0 auto; padding: 16px var(--pad) 22px; background: var(--ink); justify-content: flex-start; }
	.has-3d .build-copy .eyebrow { margin-bottom: 6px; font-size: 11px; }
	.has-3d .build-copy h2 { font-size: 26px; margin-bottom: 10px; }
	.has-3d .build-steps li { display: none; grid-template-columns: 34px 1fr; padding: 10px 0 0; }
	.has-3d .build-steps li.is-active { display: grid; animation: step-in .45s ease both; }
	.has-3d .build-steps li.is-active p { margin: 4px 0 10px; font-size: 14px; }
	.has-3d .build-steps .step-proof img { width: 48px; height: 48px; }
	.has-3d .build-hud { top: 14px; width: 130px; }
	.has-3d .build-hud strong { font-size: 16px; white-space: nowrap; }
	.has-3d .build-copy { padding-bottom: 74px; }
	.has-3d .house-stage { height: auto; min-height: 0; }
	.has-3d #house-canvas { position: relative; height: 92vw; max-height: 60vh; }
	.has-3d .house-caption { position: static; padding: 18px var(--pad) 22px; background: var(--paper); max-width: none; }
	.has-3d .house-phase { display: block; font-size: 26px; }
	/* avant / après : fondu enchaîné, plus doux qu'un volet sur petit écran */
	.ba-card .ba-after { clip-path: none; opacity: 0; }
	.ba-card .ba-line { display: none; }
	.ba-card.is-playing .ba-after { animation: ba-fade 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1s); }
	.ba-card.is-playing .ba-l1 { animation: ba-l1f 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1s); }
	.ba-card.is-playing .ba-l2 { animation: ba-l2f 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1s); }
}
@keyframes ba-fade { 0%, 30% { opacity: 0; } 45%, 80% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes ba-l1f { 0%, 30% { opacity: 1; } 45%, 80% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes ba-l2f { 0%, 30% { opacity: 0; } 45%, 80% { opacity: 1; } 95%, 100% { opacity: 0; } }
@media (max-width: 820px) and (prefers-reduced-motion: reduce) { .ba-card .ba-after { opacity: 1; } .ba-card .ba-l1 { opacity: 0; } .ba-card .ba-l2 { opacity: 1; } }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
