/* ==========================================================================
   TRTP — Studio d'architecture & de design intérieur
   Charte graphique : BLEU TRTP · ROUGE TRTP · BLANC (couleurs du logo).
   Mise en page éditoriale et épurée. Contrastes vérifiés WCAG 2.1 AA.
   ========================================================================== */

:root {
  /* Couleurs de marque */
  --blue: #1d4f9c;         /* bleu TRTP — 7,9:1 sur blanc */
  --blue-deep: #0b1f3f;    /* bleu nuit — 16,4:1 sur blanc */
  --red: #c41e3a;          /* rouge TRTP — 5,8:1 sur blanc */
  --red-light: #ff8a9b;    /* rouge sur fonds bleu nuit — 7,3:1 */
  --white: #ffffff;

  --paper: #ffffff;        /* fond principal : blanc */
  --paper-2: #eef3fa;      /* fond alterné : blanc bleuté */
  --surface: #ffffff;      /* cartes, formulaires */
  --ink: var(--blue-deep); /* texte principal */
  --muted: #4a5a75;        /* texte secondaire — 7:1 sur blanc */
  --line: #d6deea;         /* filets */
  --accent: var(--red);    /* accents rouges */
  --accent-ink: #ffffff;
  --night: var(--blue-deep); /* sections sombres : bleu nuit */
  --on-night: #ffffff;
  --on-night-muted: #b9c6dc; /* 9,5:1 sur bleu nuit */
  --brand-red: var(--red);
  --wa: var(--blue);       /* WhatsApp aux couleurs de la charte */
  --line-night: #23406c;   /* filets sur bleu nuit */
  --focus: var(--blue);    /* anneau de focus : bleu de la charte */

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #07152b; --paper-2: #0c1f3d; --surface: #0f2547; --ink: #f2f5fa; --muted: #a9b8d0;
  --line: #1e3a63; --accent: var(--red-light); --accent-ink: #07152b; --blue: #8fb6ff;
  --night: #040d1c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper: #07152b; --paper-2: #0c1f3d; --surface: #0f2547; --ink: #f2f5fa; --muted: #a9b8d0;
    --line: #1e3a63; --accent: var(--red-light); --accent-ink: #07152b; --blue: #8fb6ff;
    --night: #040d1c;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; font-size: calc(100% * var(--font-scale, 1)); }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--paper); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: 1.35rem; font-weight: 400; letter-spacing: -.01em; }
.h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
em, .hl { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 1000; padding: .8rem 1.2rem; background: var(--ink); color: var(--paper); transition: top .2s; }
.skip-link:focus { top: 1rem; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--ink); color: var(--paper); }
::placeholder { color: var(--muted); opacity: 1; }

/* Libellés éditoriaux */
.eyebrow { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem; font-size: .75rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 2.5rem; height: 1px; background: currentColor; }

/* ---------- Boutons ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 48px; padding: .85rem 1.6rem; border: 1px solid var(--b); background: transparent; color: var(--ink); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.btn::after { content: "→"; font-size: 1rem; letter-spacing: 0; transition: transform .3s var(--ease); }
.btn:hover::after { transform: translateX(4px); }
.btn-sm { min-height: 42px; padding: .6rem 1.1rem; font-size: .72rem; }
.btn-sm::after, .btn-whatsapp::after { content: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-outline, .btn-ghost-dark { background: transparent; color: var(--ink); }
.btn-outline:hover, .btn-ghost-dark:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { --b: rgb(255 255 255 / .75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--blue-deep); }
.btn-light { --b: #fff; background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: transparent; color: #fff; }
.btn-whatsapp { --b: var(--wa); background: var(--wa); color: #fff; }
.icon-btn { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .55rem; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; font-size: .8rem; font-weight: 600; text-decoration: none; transition: border-color .2s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: currentColor; }

/* ---------- En-tête ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); color: #fff; background: linear-gradient(rgb(7 21 43 / .6), rgb(7 21 43 / 0)); transition: background .35s, color .35s, box-shadow .35s; }
.site-header.is-solid { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 100%; }
.brand { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-mark rect { fill: currentColor; stroke: none; }
.brand-mark rect:nth-child(2) { fill: var(--brand-red); }
.brand-mark path { stroke: currentColor; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; font-weight: 600; letter-spacing: .3em; }
.brand-text small { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; }
.main-nav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { position: relative; display: block; padding: .6rem .85rem; color: inherit; text-decoration: none; font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.main-nav a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: .3rem; }
.a11y-tools { display: flex; }
[data-theme-toggle] .moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .moon { display: block; }
.site-header:not(.is-solid) .btn-primary { --b: #fff; background: #fff; color: var(--blue-deep); }
.site-header:not(.is-solid) .btn-primary:hover { background: transparent; color: #fff; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.scroll-progress span { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: var(--accent); }

@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .hide-mobile { display: none; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); transform: translateY(-110%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s; }
  .main-nav.is-open { transform: none; visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
  .main-nav ul { flex-direction: column; padding: 1rem var(--gutter) 2rem; }
  .main-nav a { padding: 1.1rem 0; font-size: 1.5rem; font-weight: 300; letter-spacing: -.01em; text-transform: none; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
}
@media (max-width: 560px) { .a11y-tools, .brand-text small { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; padding: calc(var(--header-h) + 4rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-slides { position: absolute; inset: 0; z-index: -2; background: var(--night); }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.8s ease, transform 9s linear; }
.hero-slides img.is-active { opacity: 1; transform: scale(1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(7 21 43 / .85) 0%, rgb(7 21 43 / .5) 45%, rgb(7 21 43 / .2) 100%), linear-gradient(90deg, rgb(7 21 43 / .5), transparent 70%); }
.hero-grid { display: none; }
.hero .eyebrow { color: rgb(255 255 255 / .88); }
.hero h1 { font-size: clamp(2.8rem, 7.6vw, 7rem); max-width: 14ch; margin-bottom: 1.5rem; letter-spacing: -.04em; }
.hl.typing::after { content: ""; display: inline-block; width: 2px; height: .8em; margin-left: .08em; background: currentColor; animation: blink 1s steps(1) infinite; vertical-align: -.05em; }
@keyframes blink { 50% { opacity: 0; } }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 54ch; color: rgb(255 255 255 / .9); font-weight: 300; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero-cta .btn-primary { --b: #fff; background: #fff; color: var(--blue-deep); }
.hero-cta .btn-primary:hover { background: transparent; color: #fff; }
.hero-caption { position: absolute; right: var(--gutter); bottom: clamp(3rem, 7vw, 5.5rem); display: flex; align-items: center; gap: 1rem; max-width: 340px; color: #fff; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.hero-caption .count { font-variant-numeric: tabular-nums; }
.hero-caption .bar { flex: none; width: 48px; height: 1px; background: rgb(255 255 255 / .7); }
.hero-caption:hover .t { text-decoration: underline; }
@media (max-width: 1000px) { .hero-caption { display: none; } }
.scroll-cue { display: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 11vw, 9rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { --ink: var(--on-night); --muted: var(--on-night-muted); --line: var(--line-night); --paper: var(--night); background: var(--night); color: var(--on-night); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 1rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.section-head h2 { margin: 0; }
.section-head > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Studio (manifeste + chiffres) ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.studio-statement { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.6rem); font-weight: 300; line-height: 1.28; letter-spacing: -.02em; }
.studio-statement em { color: var(--accent); }
.hero-stats { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hero-stats li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.hero-stats strong { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 200; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats span { color: var(--muted); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; text-align: right; }
@media (max-width: 860px) { .studio { grid-template-columns: 1fr; } }

/* ---------- Expertises (onglets) ---------- */
.tabs { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.tab-list { display: grid; border-top: 1px solid var(--line); counter-reset: tab; }
.tab-list button { counter-increment: tab; display: grid; grid-template-columns: 2.6rem 1fr auto; align-items: center; gap: .5rem; width: 100%; min-height: 48px; padding: 1.2rem 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; font-family: var(--font-display); font-size: 1.2rem; font-weight: 300; color: var(--muted); transition: color .25s, padding .35s var(--ease); }
.tab-list button::before { content: counter(tab, decimal-leading-zero); font-family: var(--font); font-size: .72rem; font-weight: 600; letter-spacing: .14em; }
.tab-list button::after { content: "→"; opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .3s var(--ease); }
.tab-list button svg { display: none; }
.tab-list button:hover, .tab-list button[aria-selected="true"] { color: var(--ink); }
.tab-list button[aria-selected="true"] { padding-left: .6rem; }
.tab-list button[aria-selected="true"]::after { opacity: 1; transform: none; }
.tab-panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; animation: fadeUp .6s var(--ease); }
.tab-panel img { order: 2; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.panel-text h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; }
.panel-text p { color: var(--muted); }
.checklist { margin: 1.5rem 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.checklist li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  .tabs, .tab-panel { grid-template-columns: 1fr; }
  .tab-list { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--line); scroll-snap-type: x mandatory; }
  .tab-list button { grid-template-columns: auto auto; padding: .9rem 1.2rem .9rem 0; border-bottom: 2px solid transparent; font-size: 1.05rem; scroll-snap-align: start; }
  .tab-list button::after { display: none; }
  .tab-list button[aria-selected="true"] { padding-left: 0; border-bottom-color: var(--ink); }
  .tab-panel img { order: -1; aspect-ratio: 16 / 10; }
}

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.chip-group { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: .4rem 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.chip::after { content: ""; position: absolute; left: 0; right: 0; bottom: .25rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.chip:hover, .chip[aria-pressed="true"] { color: var(--ink); }
.chip[aria-pressed="true"]::after, .chip:hover::after { transform: scaleX(1); }
.chip .n { margin-left: .35rem; font-size: .68rem; letter-spacing: 0; vertical-align: super; }
.search { display: flex; align-items: center; gap: .6rem; min-width: min(100%, 300px); border-bottom: 1px solid var(--ink); }
.search svg { width: 18px; flex: none; }
.search input { width: 100%; padding: .7rem 0; border: 0; background: transparent; outline: none; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 4px; }
.results-count { margin: 0 0 2.5rem; color: var(--muted); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 4vw, 4rem) clamp(1.25rem, 2.5vw, 2.5rem); margin: 0; padding: 0; list-style: none; }
.project-card { position: relative; display: flex; flex-direction: column; animation: fadeUp .7s var(--ease) both; }
.project-card[data-featured] { grid-column: span 2; }
.project-card .media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.project-card[data-featured] .media { flex: 1; aspect-ratio: auto; min-height: 320px; }
.project-card .media::before { content: "TRTP"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--line); font-size: 2rem; font-weight: 600; letter-spacing: .3em; }
.project-card .media img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project-card[data-featured] .media img { position: absolute; inset: 0; }
.project-card:hover .media img { transform: scale(1.04); }
.project-card .badge { position: absolute; left: 0; top: 0; z-index: 1; padding: .45rem .8rem; background: var(--paper); color: var(--ink); font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.project-card .has-video { position: absolute; right: .8rem; bottom: .8rem; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgb(7 21 43 / .7); color: #fff; }
.project-card .has-video svg { width: 14px; margin-left: 2px; fill: currentColor; stroke: none; }
.project-card .body { padding-top: 1.1rem; }
.project-card .meta { margin-top: .35rem; color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.project-card .meta:empty { display: none; }
.project-card .body { display: flex; flex-direction: column; }
.project-card .body h3 { order: -1; }
.project-card h3 { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.45rem); }
.project-card[data-featured] h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.project-card h3 a { text-decoration: none; }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.project-card:hover h3 a { text-decoration: underline; }
.project-card p { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card .zoom { position: absolute; z-index: 2; top: .8rem; right: .8rem; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; opacity: 0; transition: opacity .3s; }
.project-card .zoom svg { width: 18px; }
.project-card:hover .zoom, .project-card .zoom:focus-visible { opacity: 1; }
.project-card:focus-within { outline: 2px solid var(--focus); outline-offset: 6px; }
.empty { grid-column: 1 / -1; padding: 3rem 0; list-style: none; color: var(--muted); }
.more-wrap { margin-top: 3.5rem; text-align: center; }
@media (max-width: 1000px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card[data-featured] { grid-column: auto; }
  .project-card[data-featured] .media { flex: none; min-height: 0; aspect-ratio: 4 / 5; }
}

/* ---------- Estimation ---------- */
.simulator { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .9fr) minmax(0, .95fr); border: 1px solid var(--line); background: var(--surface); }
.simu-form, .simu-visual, .simu-result { padding: clamp(1.5rem, 3vw, 2.5rem); }
.simu-form { border-right: 1px solid var(--line); }
.simu-form fieldset { margin: 0 0 1.8rem; padding: 0; border: 0; }
.simu-form legend, .field label { display: block; margin-bottom: .7rem; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: .5rem .85rem; border: 1px solid var(--line); font-size: .88rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.seg input:hover + span { border-color: var(--ink); }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.field { margin-bottom: 1.6rem; }
input[type="range"] { width: 100%; height: 28px; accent-color: var(--ink); cursor: pointer; }
output { font-family: var(--font-display); font-size: 1.05rem; font-weight: 400; color: var(--accent); letter-spacing: 0; text-transform: none; }
.switch { position: relative; display: flex; align-items: center; gap: .8rem; margin-top: .9rem; cursor: pointer; font-size: .95rem; }
.switch input { position: absolute; width: 46px; height: 26px; margin: 0; opacity: 0; cursor: pointer; }
.switch-ui { position: relative; flex: none; width: 46px; height: 26px; border: 1px solid var(--ink); border-radius: 13px; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .25s var(--ease), background .2s; }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); background: var(--paper); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Maquette blanche isométrique */
.simu-visual { display: grid; place-items: end center; min-height: 380px; overflow: hidden; border-right: 1px solid var(--line); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, var(--line) 23px 24px); }
.iso-scene { padding-bottom: 3rem; perspective: 1400px; }
.iso-building { --w: 150px; --d: 110px; --fh: 30px; position: relative; width: var(--w); height: var(--d); transform-style: preserve-3d; transform: rotateX(60deg) rotateZ(-40deg); transition: width .45s var(--ease), height .45s var(--ease); }
.iso-building::before { content: ""; position: absolute; inset: -30px; background: #d7e2f1; box-shadow: 0 0 0 1px #b9c8de; transform: translateZ(-1px); }
.face { position: absolute; display: block; }
.face.front { left: 0; bottom: 0; width: 100%; height: var(--fh); transform-origin: bottom; transform: translateZ(var(--z)) rotateX(-90deg); background-color: #f7f9fc; background-image: repeating-linear-gradient(90deg, #f7f9fc 0 10px, #1d4f9c 10px 22px, #f7f9fc 22px 30px); background-size: 100% 52%; background-position: 0 40%; background-repeat: no-repeat; box-shadow: inset 0 -2px 0 #d6deea; animation: rise-front .55s var(--ease) both; }
.face.side { top: 0; right: 0; width: var(--fh); height: 100%; transform-origin: right; transform: translateZ(var(--z)) rotateY(90deg); background-color: #dfe6f1; background-image: repeating-linear-gradient(0deg, #dfe6f1 0 10px, #163d7a 10px 18px, #dfe6f1 18px 26px); background-size: 52% 100%; background-position: 40% 0; background-repeat: no-repeat; box-shadow: inset 2px 0 0 #b9c8de; animation: rise-side .55s var(--ease) both; }
.face.ground.front { background-image: linear-gradient(90deg, #f7f9fc 0 10%, #1d4f9c 10% 40%, #f7f9fc 40% 55%, #1d4f9c 55% 85%, #f7f9fc 85%); background-size: 100% 75%; background-position: 0 100%; }
.face.roof { inset: 0; transform: translateZ(var(--z)); background: #ffffff; box-shadow: inset 0 0 0 3px #c41e3a; animation: rise-roof .55s var(--ease) both; }
.face.static { animation: none; }
@keyframes rise-front { from { transform: translateZ(calc(var(--z) + 90px)) rotateX(-90deg); } }
@keyframes rise-side { from { transform: translateZ(calc(var(--z) + 90px)) rotateY(90deg); } }
@keyframes rise-roof { from { transform: translateZ(calc(var(--z) + 90px)); } }

.simu-result { display: flex; flex-direction: column; background: var(--night); color: var(--on-night); }
.simu-label { margin-bottom: .6rem; color: var(--on-night-muted); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.simu-total { margin-bottom: 1.6rem; font-family: var(--font-display); font-size: clamp(1.8rem, 2.8vw, 2.5rem); font-weight: 200; line-height: 1.1; letter-spacing: -.02em; }
.simu-details { display: grid; margin: 0 0 1.4rem; border-top: 1px solid var(--line-night); }
.simu-details div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line-night); font-size: .92rem; }
.simu-details dt { color: var(--on-night-muted); }
.simu-details dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.simu-note { margin-top: auto; color: var(--on-night-muted); font-size: .82rem; }
.simu-result .btn-primary { --b: var(--on-night); background: var(--on-night); color: var(--night); }
.simu-result .btn-primary:hover { background: transparent; color: var(--on-night); }
@media (max-width: 1100px) { .simulator { grid-template-columns: 1fr 1fr; } .simu-visual { order: 3; grid-column: 1 / -1; min-height: 300px; border-right: 0; border-top: 1px solid var(--line); } }
@media (max-width: 700px) { .simulator { grid-template-columns: 1fr; } .simu-form { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Démarche ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.timeline li { padding: 2.2rem 2rem 2.4rem 0; border-bottom: 1px solid var(--line); }
.timeline li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.timeline li:not(:nth-child(3n + 1)) { padding-left: 2rem; }
.timeline .step { display: block; margin-bottom: 2.5rem; font-family: var(--font-display); font-size: 3rem; font-weight: 200; line-height: 1; color: var(--muted); transition: color .3s; }
.timeline li:hover .step { color: var(--ink); }
.timeline h3 { font-size: 1.3rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li, .timeline li:not(:nth-child(3n + 1)) { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1rem; padding: 1.6rem 0; border-right: 0; }
  .timeline .step { grid-row: span 2; margin: 0; font-size: 2.2rem; }
}

/* ---------- Vidéos ---------- */
.video-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.video-player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--night); }
.video-player iframe, .video-player .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-player .poster { display: grid; place-items: center; padding: 0; background: var(--night); cursor: pointer; }
.video-player .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .4s, transform 1s var(--ease); }
.video-player .poster:hover img { opacity: .85; transform: scale(1.02); }
.video-player .play { position: relative; display: grid; place-items: center; width: 88px; height: 88px; border: 1px solid #fff; border-radius: 50%; color: #fff; transition: background .3s; }
.video-player .poster:hover .play { background: rgb(255 255 255 / .15); }
.video-player .play svg { width: 26px; margin-left: 4px; fill: currentColor; stroke: none; }
.video-player .poster-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1.5rem 1.2rem; color: #fff; text-align: left; font-family: var(--font-display); font-size: 1.2rem; font-weight: 300; background: linear-gradient(transparent, rgb(7 21 43 / .85)); }
.video-list { display: grid; align-content: start; max-height: 520px; margin: 0; padding: 0 .3rem 0 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--line); }
.video-list button { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: center; width: 100%; padding: .9rem 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--muted); text-align: left; cursor: pointer; transition: color .2s; }
.video-list button:hover, .video-list button[aria-current="true"] { color: var(--ink); }
.video-list img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; filter: grayscale(.6); transition: filter .3s; }
.video-list button:hover img, .video-list button[aria-current="true"] img { filter: none; }
.video-list span { font-size: .95rem; line-height: 1.35; }
@media (max-width: 900px) { .video-layout { grid-template-columns: 1fr; } .video-list { max-height: none; } }

/* ---------- Bandeau d'appel ---------- */
.cta-band { padding: clamp(4.5rem, 9vw, 7.5rem) 0; background: var(--night); color: var(--on-night); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; align-items: end; gap: 2rem 4rem; }
.cta-inner h2 { margin: 0 0 1rem; font-size: clamp(2.2rem, 5vw, 4.4rem); }
.cta-inner p { margin: 0; color: var(--on-night-muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; } }

/* ---------- Contact & devis ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact-info h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); }
.contact-info > p { color: var(--muted); }
.contact-list { margin: 2rem 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list svg { width: 20px; flex: none; margin-top: .2rem; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.map { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.map-consent { position: absolute; inset: 0; display: grid; place-content: center; gap: .6rem; width: 100%; border: 0; cursor: pointer; color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, var(--line) 23px 24px); }
.map-consent span { padding: .8rem 1.4rem; background: var(--ink); color: var(--paper); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.map-consent small { padding: .2rem .5rem; background: var(--paper); color: var(--muted); }
.contact-form { padding: clamp(1.5rem, 3.5vw, 3rem); border: 1px solid var(--line); background: var(--surface); }
.contact-form fieldset { margin: 0; padding: 0; border: 0; }
.contact-form > fieldset > legend { margin-bottom: 1.8rem; font-family: var(--font-display); font-size: 1.7rem; font-weight: 300; letter-spacing: -.01em; }
.form-step.is-active { animation: fadeUp .45s var(--ease); }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: 2rem; }
.stepper span { height: 2px; background: var(--line); transition: background .3s; }
.stepper span.is-active { background: var(--ink); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: .8rem 0; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; background: transparent; font-size: 1.05rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { padding: .8rem; border: 1px solid var(--muted); resize: vertical; }
.field select { cursor: pointer; }
.field select option { background: var(--surface); color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 2px 0 0 var(--ink); }
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field [aria-invalid="true"] { border-color: var(--accent); }
.error { margin: .45rem 0 0; color: var(--accent); font-size: .86rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.checks label { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; margin: 0; padding: .4rem .9rem; border: 1px solid var(--line); cursor: pointer; font-size: .92rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.checks label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.checks input, .consent input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.consent { display: flex; gap: .7rem; align-items: flex-start; min-height: 28px; margin-top: .5rem; color: var(--muted); font-size: .9rem; cursor: pointer; }
.consent input { margin-top: .2rem; }
.help { margin: .45rem 0 0; color: var(--muted); font-size: .82rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-nav { display: flex; justify-content: flex-end; gap: .8rem; margin-top: 2rem; }
.form-nav [data-prev] { margin-right: auto; }
.form-nav [data-prev]::after { content: none; }
.form-nav [data-prev]::before { content: "←"; font-size: 1rem; }
.form-status { margin-bottom: 1.2rem; }
.form-status .ok, .form-status .ko { padding: 1.1rem 1.3rem; border-left: 3px solid; background: var(--surface); }
.form-status .ok { border-color: var(--wa); }
.form-status .ko { border-color: var(--accent); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* Formulaire SPIP : neutralise les styles par défaut */
.formulaire_devis_trtp { margin: 0; }
.formulaire_devis_trtp fieldset { margin: 0; padding: 0; border: 0; background: none; }
.formulaire_devis_trtp legend { padding: 0; }
.formulaire_devis_trtp .field input, .formulaire_devis_trtp .field select { max-width: none; border-radius: 0; background: transparent; color: var(--ink); }

/* ---------- Pied de page ---------- */
.site-footer { padding: clamp(4rem, 8vw, 6rem) 0 2rem; background: var(--night); color: var(--on-night-muted); }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-night); }
.footer-brand { color: var(--on-night); font-family: var(--font-display); font-size: 1.6rem; font-weight: 300; }
.footer-brand strong { font-weight: 600; letter-spacing: .25em; }
.footer-title { margin-bottom: 1.2rem; color: var(--on-night); font-family: var(--font); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.site-footer li a, .to-top { display: inline-block; padding-block: .3rem; }
.socials { display: flex !important; gap: .5rem !important; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-night); transition: border-color .2s, background .2s, color .2s; }
.socials a:hover { border-color: var(--on-night); background: var(--on-night); color: var(--night); }
.socials svg { width: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.fab-whatsapp { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 10px 30px -8px rgb(7 21 43 / .45); transition: transform .2s; }
.fab-whatsapp:hover { transform: scale(1.06); }
.fab-whatsapp svg { width: 28px; }

/* ---------- Visionneuse ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(4 13 28 / .97); color: #fff; }
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .3s; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { max-width: min(92vw, 1500px); margin: 0; text-align: center; }
.lightbox img { width: auto; max-height: 84vh; margin: 0 auto; user-select: none; }
.lightbox figcaption { margin-top: 1rem; color: var(--on-night-muted); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.lb-close, .lb-nav { position: fixed; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .4); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; font-size: 1.6rem; line-height: 1; transition: background .2s, color .2s; }
.lb-close:hover, .lb-nav:hover { background: #fff; color: var(--blue-deep); }
.lb-close { top: 1.2rem; right: 1.2rem; width: 48px; height: 48px; }
.lb-nav { top: 50%; translate: 0 -50%; width: 56px; height: 56px; }
.lb-prev { left: 1.2rem; }
.lb-next { right: 1.2rem; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Pages internes ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero img.bg { display: none; }
.page-hero h1 { max-width: 18ch; font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -.035em; }
.page-hero .lead { color: var(--muted); }
.page-hero .lead p { margin: 0; }
.page-hero .btn-ghost { --b: var(--ink); color: var(--ink); }
.page-hero .btn-ghost:hover { background: var(--ink); color: var(--paper); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; padding: 0; list-style: none; color: var(--muted); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; }
.breadcrumb a { display: inline-block; padding-block: .25rem; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.gallery-main { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.gallery-thumbs button { padding: 0; border: 0; background: none; cursor: pointer; opacity: .55; transition: opacity .2s; }
.gallery-thumbs button[aria-current="true"], .gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button[aria-current="true"] { box-shadow: 0 3px 0 0 var(--ink); }
.gallery-thumbs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.fact-card { position: sticky; top: calc(var(--header-h) + 1.5rem); padding-top: 1.2rem; border-top: 1px solid var(--ink); }
.fact-card h2 { margin-bottom: 1.2rem; font-family: var(--font); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.fact-card dl { display: grid; margin: 0 0 2rem; }
.fact-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.fact-card dt { color: var(--muted); font-size: .9rem; }
.fact-card dd { margin: 0; text-align: right; }
.fact-card dd a { display: inline-block; padding-block: .25rem; }
.fact-card .btn-primary { width: 100%; }
.share { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
@media (max-width: 900px) { .project-layout { grid-template-columns: 1fr; } .fact-card { position: static; } }
.prose { max-width: 68ch; margin-top: 3rem; line-height: 1.8; }
.prose h2 { margin-top: 3rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.prose h3, .prose .spip { margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 2em 0; padding: 0 0 0 1.5rem; border-left: 1px solid var(--ink); font-family: var(--font-serif); font-size: 1.3rem; font-style: italic; }
.prose table { width: 100%; margin: 2em 0; border-collapse: collapse; }
.prose th, .prose td { padding: .6em .8em; border-bottom: 1px solid var(--line); text-align: left; }
.prose .chapo { font-family: var(--font-display); font-size: 1.35rem; font-weight: 300; line-height: 1.5; }
.downloads { display: grid; margin: 0 0 2rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.downloads a { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s var(--ease); }
.downloads a:hover { padding-left: .6rem; }
.downloads svg { width: 22px; flex: none; }
.downloads span { display: grid; }
.downloads small { color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.pagination { margin-top: 4rem; }
.pagination ul, .pagination .pagination-items { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination .on, .pagination strong { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .7rem; border: 1px solid var(--line); text-decoration: none; }
.pagination .on, .pagination strong { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search-big { max-width: 680px; margin-top: 2rem; padding: 0; border-bottom: 1px solid var(--ink); }
.search-big input { font-size: 1.4rem; font-weight: 300; }
.search-big .btn::after { content: none; }
.sous-rubriques { margin-bottom: 3rem; }
.plan-site h2 { font-size: 1.6rem; }
.plan-site h2 a { text-decoration: none; }

/* ---------- Apparitions ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.no-js .hero-slides img:first-child { opacity: 1; transform: none; }

/* Focus visible sur fonds sombres et images */
.site-header:not(.is-solid) :focus-visible, .hero :focus-visible, .section-dark :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible, .simu-result :focus-visible { outline-color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .btn, .chip, .icon-btn, .tab-list button, .seg span { border: 1px solid ButtonText; }
  .hero::before { background: Canvas; opacity: .7; }
  .hl, em { color: CanvasText; }
}
@media print {
  .site-header, .fab-whatsapp, .hero-slides, .simu-visual, .video-layout, .map, .contact-form, .lightbox { display: none !important; }
  .hero, .section-dark, .cta-band, .site-footer { background: none !important; color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
.switch.is-disabled { opacity: .45; cursor: not-allowed; }

/* Recadrage du hero : masque les filigranes incrustés dans les coins des rendus */
.hero-slides img[data-mode="auto"] { object-position: 50% 55%; transform: scale(1.24); }
.hero-slides img[data-mode="auto"].is-active { transform: scale(1.16); }
.hero-caption { min-height: 44px; padding-block: .6rem; }

/* ==========================================================================
   CHARTE GRAPHIQUE TRTP — bleu · rouge · blanc
   (surcharges des composants ; les couleurs se règlent en haut du fichier)
   ========================================================================== */
:root { --btn-bg: var(--blue); --btn-fg: #ffffff; }
:root[data-theme="dark"] { --btn-bg: #8fb6ff; --btn-fg: #07152b; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --btn-bg: #8fb6ff; --btn-fg: #07152b; } }
.section-dark, .cta-band, .simu-result, .site-footer { --accent: var(--red-light); }

/* Titres : mot en italique rouge, libellés rouges */
h1 em, h2 em, .hl, .studio-statement em { color: var(--accent); }
.hero .hl, .hero em { color: #fff; }
.eyebrow { color: var(--accent); }
.eyebrow::before { background: var(--accent); }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--red); height: 2px; }

/* Boutons */
.btn-primary { --b: var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { --b: var(--red); background: var(--red); color: #fff; }
.btn-outline, .btn-ghost-dark { --b: var(--blue); color: var(--blue); }
.btn-outline:hover, .btn-ghost-dark:hover { background: var(--btn-bg); color: var(--btn-fg); }
.hero-cta .btn-primary, .site-header:not(.is-solid) .btn-primary { --b: #fff; background: #fff; color: var(--blue-deep); }
.hero-cta .btn-primary:hover, .site-header:not(.is-solid) .btn-primary:hover { --b: var(--red); background: var(--red); color: #fff; }
.btn-light { color: var(--blue-deep); }
.btn-whatsapp { --b: var(--red); background: var(--red); color: #fff; }
.btn-whatsapp:hover { --b: #fff; background: #fff; color: var(--blue-deep); }
.simu-result .btn-primary { --b: #fff; background: #fff; color: var(--blue-deep); }
.simu-result .btn-primary:hover { --b: var(--red); background: var(--red); color: #fff; }

/* En-tête et logo */
.site-header.is-solid { box-shadow: 0 1px 0 var(--line), 0 6px 24px -18px rgb(11 31 63 / .35); }
.site-header.is-solid .brand-mark rect { fill: var(--blue); }
.site-header.is-solid .brand-mark rect:nth-child(2) { fill: var(--red); }
.site-header.is-solid .brand-text strong { color: var(--blue); }
.main-nav a::after { height: 2px; background: var(--red); }
.site-header.is-solid .main-nav a[aria-current="true"] { color: var(--blue); }
.scroll-progress { height: 3px; }
.scroll-progress span { background: linear-gradient(90deg, var(--red), var(--blue)); }
.site-header:not(.is-solid) { background: linear-gradient(rgb(7 21 43 / .78), rgb(7 21 43 / .3) 70%, rgb(7 21 43 / 0)); }

/* Hero : voile bleu nuit */
.hero::before { background: linear-gradient(0deg, rgb(7 21 43 / .9) 0%, rgb(11 31 63 / .55) 45%, rgb(11 31 63 / .2) 100%), linear-gradient(90deg, rgb(7 21 43 / .55), transparent 70%); }
.hero-caption .bar { height: 2px; background: var(--red); }

/* Studio, expertises */
.hero-stats strong { color: var(--blue); }
.tab-list button[aria-selected="true"] { color: var(--blue); }
.tab-list button[aria-selected="true"]::before, .tab-list button[aria-selected="true"]::after { color: var(--accent); }
.checklist li { position: relative; padding-left: 1.2rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 6px; height: 6px; background: var(--accent); }
@media (max-width: 960px) { .tab-list button[aria-selected="true"] { border-bottom-color: var(--red); } }

/* Portfolio */
.chip[aria-pressed="true"], .chip:hover { color: var(--blue); }
.chip::after { height: 2px; background: var(--red); }
.search { border-bottom-color: var(--blue); }
.project-card .badge { background: var(--btn-bg); color: var(--btn-fg); }
.project-card .has-video { background: var(--red); }
.project-card:hover h3 a { color: var(--blue); }

/* Estimation */
.simulator { border-top: 3px solid var(--blue); }
.seg input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.seg input:hover + span { border-color: var(--blue); }
input[type="range"] { accent-color: var(--red); }
.switch-ui { border-color: var(--blue); }
.switch-ui::after { background: var(--blue); }
.switch input:checked + .switch-ui { background: var(--btn-bg); border-color: var(--btn-bg); }
.switch input:checked + .switch-ui::after { background: var(--btn-fg); }
.simu-total { color: #fff; }
.simu-label { color: var(--red-light); }
/* Maquette : vitrages bleus, toiture blanche liserée de rouge */
.face.ground.front { background-image: linear-gradient(90deg, #f7f9fc 0 10%, #c41e3a 10% 18%, #f7f9fc 18% 30%, #1d4f9c 30% 85%, #f7f9fc 85%); }

/* Démarche (bleu nuit) */
.timeline .step { color: var(--on-night-muted); }
.timeline li:hover .step { color: var(--red-light); }

/* Vidéos */
.video-list button[aria-current="true"] { padding-left: .8rem; color: var(--blue); box-shadow: inset 3px 0 0 var(--red); }
.video-player .play { border-color: #fff; background: rgb(196 30 58 / .9); }
.video-player .poster:hover .play { background: var(--red); }

/* Contact */
.stepper span.is-active { background: var(--blue); }
.stepper span.is-active:last-child { background: var(--red); }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 2px 0 0 var(--blue); }
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.checks label:has(input:checked) { border-color: var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
.checks input, .consent input { accent-color: var(--blue); }
.contact-list svg { color: var(--accent); }
.contact-list a { color: var(--blue); }
.map-consent span { background: var(--btn-bg); color: var(--btn-fg); }
.form-status .ok { border-color: var(--blue); }
.contact-form { border-top: 3px solid var(--red); }

/* Bandeau d'appel et pied de page */
.cta-band { background: linear-gradient(115deg, var(--blue-deep) 0%, var(--blue-deep) 55%, #12346a 100%); }
:root[data-theme="dark"] .cta-band { background: var(--night); }
.site-footer { border-top: 3px solid var(--red); }
.footer-brand strong { color: #fff; }
.socials a:hover { border-color: var(--red); background: var(--red); color: #fff; }
.fab-whatsapp { background: var(--red); box-shadow: 0 10px 30px -8px rgb(196 30 58 / .55); }

/* Pages internes */
.page-hero { background: var(--paper-2); }
.breadcrumb a { color: var(--blue); }
.fact-card { border-top: 3px solid var(--red); }
.fact-card dd a, .prose a { color: var(--blue); }
.gallery-thumbs button[aria-current="true"] { box-shadow: 0 3px 0 0 var(--red); }
.downloads svg { color: var(--accent); }
.downloads a:hover { color: var(--blue); }
.pagination .on, .pagination strong { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.lightbox { background: rgb(4 13 28 / .97); }
.lb-close:hover, .lb-nav:hover { border-color: var(--red); background: var(--red); color: #fff; }
::selection { background: var(--blue); color: #fff; }

/* ==========================================================================
   ACCUEIL — HABILLAGE ARCHITECTURAL (4.0.1)
   Trames de calque, cotes, numérotation des sections, cadrages.
   ========================================================================== */
:root { --grid: rgb(29 79 156 / .07); --grid-night: rgb(143 182 255 / .07); }
:root[data-theme="dark"] { --grid: rgb(143 182 255 / .06); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --grid: rgb(143 182 255 / .06); } }

/* Papier quadrillé : sections alternées et sombres */
.section-alt { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; background-position: -1px -1px; }
.section-dark { background-image: linear-gradient(var(--grid-night) 1px, transparent 1px), linear-gradient(90deg, var(--grid-night) 1px, transparent 1px); background-size: 48px 48px; }

/* ---------- Hero : cadre de calque, rail de coordonnées ---------- */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent calc(25% - .5px), rgb(255 255 255 / .07) calc(25% - .5px) calc(25% + .5px), transparent calc(25% + .5px) calc(50% - .5px), rgb(255 255 255 / .07) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px) calc(75% - .5px), rgb(255 255 255 / .07) calc(75% - .5px) calc(75% + .5px), transparent calc(75% + .5px)); }
.hero-frame { position: absolute; inset: calc(var(--header-h) + 1.2rem) calc(var(--gutter) * .5) 1.2rem; pointer-events: none; }
.hero-frame i { position: absolute; width: 26px; height: 26px; border: 0 solid rgb(255 255 255 / .7); }
.hero-frame i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.hero-frame i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.hero-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.hero-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; border-color: var(--red); }
.hero-rail { position: absolute; top: 50%; right: calc(var(--gutter) * .5 + .5rem); display: flex; align-items: center; gap: 1rem; margin: 0; color: rgb(255 255 255 / .78); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; writing-mode: vertical-rl; transform: translateY(-50%); }
.hero-rail .sep { width: 1px; height: 48px; background: var(--red); }
.hero .scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; color: rgb(255 255 255 / .82); font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; text-decoration: none; transform: translateX(-50%); }
.scroll-cue i { position: relative; width: 1px; height: 44px; overflow: hidden; background: rgb(255 255 255 / .25); }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 50%; background: #fff; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(200%); } }
.hero h1 { text-wrap: balance; }
.hero .lead { padding-left: 1.2rem; border-left: 2px solid var(--red); }
@media (max-width: 1000px) { .hero-rail, .hero .scroll-cue { display: none; } }
@media (max-width: 700px) { .hero-frame { display: none; } }

/* ---------- Numérotation des sections ---------- */
.eyebrow .idx { color: var(--ink); font-variant-numeric: tabular-nums; }
.eyebrow .idx::after { content: "/"; margin-left: .7rem; color: var(--muted); font-weight: 400; }
.section-dark .eyebrow .idx { color: #fff; }
.section-head[data-num] { position: relative; isolation: isolate; }
.section-head[data-num]::before { content: attr(data-num); position: absolute; right: -.04em; top: -.42em; z-index: -1; font-family: var(--font-display); font-size: clamp(6rem, 15vw, 13rem); font-weight: 200; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--line); opacity: .75; pointer-events: none; }
.section-head h2 { text-wrap: balance; }
@supports not (-webkit-text-stroke: 1px black) { .section-head[data-num]::before { color: var(--line); opacity: .5; } }
@media (max-width: 860px) { .section-head[data-num]::before { top: -.25em; font-size: 6.5rem; } }

/* ---------- Studio : composition, cotes, principes ---------- */
.section-studio { position: relative; overflow: hidden; }
.studio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center; }
.studio-figure { position: relative; margin: 0; padding: 2.2rem 3.2rem 0 2.6rem; }
.studio-img { position: relative; overflow: hidden; background: var(--paper-2); }
.studio-img img { width: 100%; height: 100%; object-fit: cover; }
.studio-img-main { aspect-ratio: 4 / 5; }
/* recadrage : écarte le logo incrusté (haut gauche) et le bandeau de contact (bas) des rendus */
.studio-img-main img { transform: scale(1.4); transform-origin: 52% 8%; transition: transform 1.6s var(--ease); }
.studio-figure:hover .studio-img-main img { transform: scale(1.46); }
.studio-img-sub { position: absolute; right: 0; bottom: 2.8rem; width: 52%; aspect-ratio: 4 / 3; border: 8px solid var(--paper); box-shadow: 0 24px 48px -24px rgb(11 31 63 / .45); }
.studio-figure figcaption { display: flex; align-items: center; gap: 1.2rem; height: 1.2rem; margin-top: 1rem; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.studio-figure figcaption span + span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 1.2rem; background: var(--accent); vertical-align: middle; }
/* Lignes de cote (traits d'attache aux extrémités) */
.cote { position: absolute; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.cote::before, .cote::after { content: ""; position: absolute; opacity: .65; }
.cote::before { background: currentColor; }
.cote span { position: relative; padding: .2rem .5rem; background: var(--paper); font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.cote-h { top: .3rem; left: 2.6rem; right: 3.2rem; height: 14px; }
.cote-h::before { left: 0; right: 0; top: 50%; height: 1px; }
.cote-h::after { inset: 0; background: linear-gradient(currentColor, currentColor) left / 1px 100% no-repeat, linear-gradient(currentColor, currentColor) right / 1px 100% no-repeat; }
.cote-v { top: 2.2rem; bottom: 2.2rem; left: .4rem; width: 14px; }
.cote-v::before { top: 0; bottom: 0; left: 50%; width: 1px; }
.cote-v::after { inset: 0; background: linear-gradient(currentColor, currentColor) top / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) bottom / 100% 1px no-repeat; }
.cote-v span { padding: .5rem .2rem; writing-mode: vertical-rl; transform: rotate(180deg); }
.studio-text .eyebrow { margin-bottom: 1.8rem; }
.studio-statement { font-size: clamp(1.5rem, 2.6vw, 2.35rem); }
.principes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 2.6rem 0 0; padding: 1.6rem 0 0; list-style: none; border-top: 1px solid var(--line); }
.principes strong { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.principes strong::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--accent); }
.principes span { display: block; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.studio .hero-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 2.2rem; border-top: 0; }
.studio .hero-stats li { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .7rem; padding: .3rem 1.4rem; border-bottom: 0; border-left: 1px solid var(--line); }
.studio .hero-stats li:first-child { padding-left: 0; border-left: 0; }
.studio .hero-stats span { text-align: left; font-size: .68rem; }
@media (max-width: 960px) {
  .studio { grid-template-columns: 1fr; }
  .studio-figure { width: 100%; max-width: 560px; }
}
@media (max-width: 560px) {
  .principes { grid-template-columns: 1fr; gap: 1rem; }
  .studio .hero-stats li { padding: .3rem 1rem; }
}

/* ---------- Bandeau des métiers (ligne fixe, dans la largeur du contenu) ---------- */
.metiers { padding: clamp(1.6rem, 3vw, 2.6rem) 0; border-block: 1px solid var(--line); background: var(--paper); }
.metiers-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; margin-block: 0; padding: 0; list-style: none; }
.metiers-list li { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.5rem); font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 3rem); font-weight: 200; line-height: 1.15; letter-spacing: -.03em; white-space: nowrap; color: var(--ink); }
.metiers-list li:nth-child(even) { color: var(--blue); font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.metiers-list li + li::before { content: ""; flex: none; width: .3rem; height: .3rem; margin-right: clamp(0rem, 1vw, 1rem); background: var(--red); transform: rotate(45deg); }
@media (max-width: 700px) {
  .metiers-list { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
  .metiers-list li { justify-content: center; font-size: clamp(1.25rem, 5.6vw, 1.6rem); white-space: normal; text-align: center; }
  .metiers-list li + li::before { display: none; }
}

/* ---------- Expertises : cadre décalé ---------- */
.tab-panel { padding: 0 1.1rem 1.1rem 0; }
.panel-media { order: 2; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); box-shadow: 1.1rem 1.1rem 0 -1px var(--paper-2), 1.1rem 1.1rem 0 0 var(--blue); }
/* recadrage par image (variables dans le squelette) : écarte logos et coordonnées incrustés */
.tab-panel .panel-media img { order: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--crop, 1)); transform-origin: var(--crop-at, 50% 50%); }
@media (max-width: 960px) { .panel-media { order: -1; aspect-ratio: 16 / 10; } }
.panel-text h3 { text-wrap: balance; }

/* ---------- Portfolio : cartes au format des rendus (16:10) ---------- */
.project-grid { grid-auto-flow: dense; gap: clamp(2.2rem, 3.5vw, 3.4rem) clamp(1.25rem, 2.2vw, 2.2rem); }
.project-card .media { aspect-ratio: 16 / 10; }
.project-card[data-featured] { grid-row: span 2; }
.project-card[data-featured] .media { min-height: 360px; }
/* recadrage : écarte le bandeau de contact incrusté en bas des rendus */
.project-card .media img { transform: scale(1.25); transform-origin: 50% 4%; transition: transform 1.4s var(--ease); }
.project-card:hover .media img { transform: scale(1.3); }
.project-card .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(7 21 43 / .72), rgb(7 21 43 / 0) 55%); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.project-card:hover .media::after { opacity: 1; }
.project-card .corners { position: absolute; inset: 1.4rem; z-index: 1; opacity: 0; pointer-events: none; transition: inset .5s var(--ease), opacity .4s; background:
  linear-gradient(#fff, #fff) left top / 18px 1.5px no-repeat, linear-gradient(#fff, #fff) left top / 1.5px 18px no-repeat,
  linear-gradient(#fff, #fff) right top / 18px 1.5px no-repeat, linear-gradient(#fff, #fff) right top / 1.5px 18px no-repeat,
  linear-gradient(#fff, #fff) left bottom / 18px 1.5px no-repeat, linear-gradient(#fff, #fff) left bottom / 1.5px 18px no-repeat,
  linear-gradient(#c41e3a, #c41e3a) right bottom / 18px 2px no-repeat, linear-gradient(#c41e3a, #c41e3a) right bottom / 2px 18px no-repeat; }
.project-card:hover .corners { inset: .8rem; opacity: 1; }
.project-card .view { position: absolute; left: 1.4rem; bottom: 1.3rem; z-index: 1; display: flex; align-items: center; gap: .7rem; color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none; }
.project-card .view::after { content: "→"; font-size: 1rem; letter-spacing: 0; }
.project-card:hover .view { opacity: 1; transform: none; }
.project-card .badge { left: .8rem; top: .8rem; }
.project-card .body { position: relative; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.project-card .body::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.project-card:hover .body::before { transform: scaleX(1); }
.project-card .meta { display: flex; flex-wrap: wrap; gap: .6rem; }
.project-card .meta span + span::before { content: "—"; margin-right: .6rem; }
.project-card h3 { text-wrap: balance; }
.project-card:hover h3 a { text-decoration: none; }
@media (max-width: 1000px) {
  .project-card[data-featured] { grid-row: auto; }
  .project-card[data-featured] .media { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 620px) { .project-card[data-featured] .media { aspect-ratio: 16 / 10; } }
@media (hover: none) { .project-card .view, .project-card .corners { display: none; } }

/* ---------- Démarche : frise horizontale ---------- */
@media (min-width: 1101px) {
  .timeline { position: relative; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 3.4rem; border-top: 0; }
  .timeline::before, .timeline::after { content: ""; position: absolute; left: 0; right: 0; top: 1.1rem; height: 1px; background: var(--line); }
  .timeline::after { height: 2px; margin-top: -.5px; background: linear-gradient(90deg, var(--red-light), #8fb6ff); transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform 2.6s var(--ease); }
  .timeline li, .timeline li:not(:nth-child(3n)), .timeline li:not(:nth-child(3n + 1)) { position: relative; padding: 0 1.6rem 0 0; border: 0; }
  .timeline li::before { content: ""; position: absolute; left: 0; top: calc(-2.3rem - 6px); z-index: 1; width: 11px; height: 11px; border: 1px solid var(--red-light); background: var(--night); transform: rotate(45deg); transition: background .3s; }
  .timeline li:hover::before { background: var(--red-light); }
  .timeline .step { margin-bottom: 1.4rem; font-size: 2.6rem; }
}

/* ---------- Bandeau d'appel : élévation dessinée ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-elevation { position: absolute; left: 50%; bottom: 0; z-index: -1; width: max(1200px, 100%); height: auto; max-height: 85%; fill: none; stroke: rgb(255 255 255 / .13); stroke-width: 1.2; transform: translateX(-50%); pointer-events: none; }
.cta-elevation path { vector-effect: non-scaling-stroke; }
.cta-inner h2, .contact-info h2 { text-wrap: balance; }
.contact-form { box-shadow: 0 30px 60px -40px rgb(11 31 63 / .35); }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after { animation: none; }
}
@media print { .metiers, .hero-frame, .hero-rail, .scroll-cue, .cta-elevation { display: none !important; } }

/* Hero : recadrage resserré (bandeau de contact en bas, logo en haut à gauche des rendus) */
.hero-slides img[data-mode="auto"] { transform: scale(1.32); transform-origin: 62% 20%; }
.hero-slides img[data-mode="auto"].is-active { transform: scale(1.24); }

/* En-tête : réseaux sociaux (à la place des boutons A− / A+) */
.header-socials { display: flex; align-items: center; margin: 0 .35rem 0 0; padding: 0 .45rem 0 0; list-style: none; border-right: 1px solid rgb(127 140 160 / .4); }
.header-socials .icon-btn { min-width: 38px; height: 38px; padding: 0; transition: color .2s, background .2s; }
.header-socials svg { width: 18px; height: 18px; }
.header-socials .icon-btn:hover { border-color: transparent; color: var(--red); }
.site-header:not(.is-solid) .header-socials .icon-btn:hover { background: var(--red); color: #fff; }
@media (max-width: 560px) { .header-socials { display: none; } }


/* ==========================================================================
   Menu principal : sous-menus des rubriques (4.0.2)
   ========================================================================== */
.main-nav > ul > li { position: relative; }
.main-nav .has-sub { display: flex; align-items: center; }
.main-nav .has-sub > a { padding-right: .2rem; }
.main-nav .has-sub > a::after { right: .2rem; }
.sub-toggle { display: inline-grid; place-items: center; width: 28px; height: 36px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.sub-toggle svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.has-sub.is-open > .sub-toggle svg { transform: rotate(180deg); }
.main-nav .sub-menu { display: block; position: absolute; top: calc(100% + .4rem); left: .4rem; z-index: 5; min-width: 230px; margin: 0; padding: .5rem 0; list-style: none; background: var(--surface); color: var(--ink); border-top: 2px solid var(--red); box-shadow: 0 18px 40px -18px rgb(11 31 63 / .45); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .25s var(--ease), visibility .25s; }
.main-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -.7rem; height: .7rem; } /* pont de survol */
.main-nav .sub-menu a { padding: .65rem 1.2rem; font-size: .95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.main-nav .sub-menu a::after { display: none; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu a:focus-visible, .main-nav .sub-menu a[aria-current="page"] { background: var(--paper-2); color: var(--blue); }
.main-nav .sub-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); }
.has-sub.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease), visibility 0s; }
@media (min-width: 1101px) and (hover: hover) {
  .has-sub:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; }
  .has-sub:hover > .sub-toggle svg { transform: rotate(180deg); }
}
@media (max-width: 1100px) {
  .main-nav { max-height: calc(100svh - var(--header-h)); overflow-y: auto; }
  .main-nav .has-sub { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .main-nav .has-sub > a { flex: 1; border-bottom: 0; }
  .sub-toggle { width: 48px; height: 48px; }
  .sub-toggle svg { width: 22px; height: 22px; }
  .main-nav .sub-menu { position: static; display: none; flex-basis: 100%; min-width: 0; margin: 0 0 .8rem; padding: 0 0 0 1rem; border-top: 0; border-left: 2px solid var(--red); box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .main-nav .sub-menu::before { display: none; }
  .has-sub.is-open > .sub-menu { display: block; }
  .main-nav .sub-menu a { padding: .7rem .5rem; font-size: 1.1rem; border-bottom: 0; }
}

/* Barre de menu : jamais sur deux lignes */
.main-nav a, .header-tools .btn { white-space: nowrap; }
@media (min-width: 1101px) {
  .main-nav > ul { gap: 0; }
  .main-nav > ul > li > a { padding-inline: .7rem; letter-spacing: .12em; }
  .main-nav .has-sub > a { padding-right: .1rem; }
}
@media (min-width: 1101px) and (max-width: 1400px) { .header-socials { display: none; } }
@media (min-width: 1101px) and (max-width: 1240px) { .header-tools .btn-primary.hide-mobile { display: none; } .brand-text small { display: none; } }


/* ==========================================================================
   Diaporama d'accueil (4.0.3) : commandes, légende, fond de secours
   Images choisies (mot-clé « Diaporama accueil ») : affichées sans recadrage ;
   images automatiques (data-mode="auto") : recadrées pour masquer les filigranes.
   ========================================================================== */
.hero-controls { position: absolute; z-index: 2; right: calc(var(--gutter) * .5 + 5.6rem); bottom: 2.1rem; display: flex; align-items: center; gap: .35rem; }
.hero-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgb(255 255 255 / .55); border-radius: 50%; background: rgb(7 21 43 / .35); color: #fff; cursor: pointer; backdrop-filter: blur(4px); transition: background .2s, border-color .2s; }
.hero-btn:hover { border-color: var(--red); background: var(--red); }
.hero-btn svg { width: 18px; height: 18px; stroke-width: 2; }
.hero-pause .i-play { display: none; fill: currentColor; stroke: none; margin-left: 2px; }
.hero-controls.is-paused .i-pause { display: none; }
.hero-controls.is-paused .i-play { display: block; }
.hero-dots { display: flex; align-items: center; gap: .1rem; padding: 0 .35rem; }
.hero-dot { position: relative; width: 28px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dot::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: rgb(255 255 255 / .5); transition: background .2s, height .2s; }
.hero-dot:hover::before { background: #fff; }
.hero-dot[aria-current="true"]::before { height: 4px; margin-top: -2px; background: var(--red); }
.hero-caption { right: calc(var(--gutter) * .5 + 5.6rem); bottom: calc(2.1rem + 56px); }
@media (max-width: 1000px) {
  .hero { padding-bottom: 5.5rem; }
  .hero-controls { left: var(--gutter); right: auto; bottom: 1.4rem; }
}
@media (max-width: 420px) { .hero-dot { width: 22px; } }

/* Fond de secours si aucune image ne convient : plan d'architecte sur bleu nuit */
.hero-blueprint { position: absolute; inset: 0; background-color: var(--blue-deep);
  background-image:
    linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px),
    radial-gradient(120% 90% at 80% 20%, rgb(29 79 156 / .55), transparent 60%);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px, 100% 100%; }
.hero-caption .count { white-space: nowrap; }
