/* CAP RT — feuille de style principale
   Concept : bureau d'études du bâtiment durable. Fond blanc, gamme de verts,
   photos généreuses et cartes arrondies. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/sourcesans3.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/sourcesans3-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Palette « bâtiment durable » : une seule gamme de verts sur fond blanc */
  --ink: #1b2a1f;          /* texte principal, vert très sombre */
  --ink-2: #56655a;        /* texte secondaire */
  --paper: #ffffff;        /* fond */
  --surface: #ffffff;      /* cartes, formulaires */
  --tint: #f3f8ef;         /* sections alternées */
  --line: #e0e9da;         /* filets */
  --green-deep: #2f6e1f;         /* vert profond : titres, liens, repères */
  --accent: #4a8a26;       /* vert feuille : boutons d'action */
  --accent-ink: #ffffff;
  --band: #1f3f1b;         /* bandeaux vert forêt */
  --band-fg: #f4f9f1;
  --band-muted: #bdd4b2;
  --danger: #b4321f;
  --glow: #e5f1dc;
  --glow-2: #f6faf3;
  --shadow: 0 18px 40px -22px rgba(31, 63, 27, .28);

  --dpe-a: #009c6d; --dpe-b: #52b153; --dpe-c: #a5cc74; --dpe-d: #f4e70f;
  --dpe-e: #f0b40f; --dpe-f: #eb8235; --dpe-g: #d7221f;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);
  --wrap: 1200px; --radius: 999px; --card: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecf4e8; --ink-2: #aebfa8; --paper: #0e1a10; --surface: #142416; --tint: #122014; --line: #24392a;
    --green-deep: #9fd27a; --accent: #7cc24f; --accent-ink: #0b1a10; --band: #173018; --band-fg: #f1f8ee; --band-muted: #a9c49c;
    --danger: #ff7a66; --glow: #1b3420; --glow-2: #132516; --shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ecf4e8; --ink-2: #aebfa8; --paper: #0e1a10; --surface: #142416; --tint: #122014; --line: #24392a;
  --green-deep: #9fd27a; --accent: #7cc24f; --accent-ink: #0b1a10; --band: #173018; --band-fg: #f1f8ee; --band-muted: #a9c49c;
  --danger: #ff7a66; --glow: #1b3420; --glow-2: #132516; --shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::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 { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--step-0); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); font-weight: 500; }
.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 62ch; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* En-tête */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 3px rgba(20,66,10,.25)); }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; line-height: 1; color: #4b5150; }
:root[data-theme="dark"] .brand-name { color: #e6ebe7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: #e6ebe7; } }
.brand-name b { font-weight: 800; font-style: italic; display: inline-block; transform: skewX(-8deg); color: #4caf24; margin-left: .14em; letter-spacing: 0; }
.site-footer .brand-name b { color: #9fd27a; }
.brand-sub { display: block; font-family: var(--f-body); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green-deep); margin-top: 5px; white-space: nowrap; }
@media (max-width: 400px) { .brand-sub { font-size: .62rem; letter-spacing: .08em; } }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; padding: .55rem .8rem; font-weight: 600; font-size: .98rem; border-radius: var(--radius); }
.nav a[aria-current="page"] { color: var(--green-deep); }
.nav .btn { margin-left: .5rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); padding: .5rem .7rem; font: 600 .95rem var(--f-body); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem max(20px, env(safe-area-inset-right, 0px)) 1rem max(20px, env(safe-area-inset-left, 0px)); display: none; }
  .nav.open { display: flex; }
  .nav .btn { margin: .5rem 0 0; text-align: center; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--accent); color: var(--accent-ink) !important; text-decoration: none; font-weight: 700; padding: .8rem 1.25rem; border-radius: var(--radius); border: 2px solid var(--accent); font-size: 1rem; cursor: pointer; font-family: var(--f-body); transition: transform .15s ease, filter .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green-deep) !important; border-color: var(--green-deep); }
.band .btn-ghost { color: var(--band-fg) !important; border-color: color-mix(in srgb, var(--band-fg) 35%, transparent); }

/* Héro : texte à gauche, maquette 3D qui déborde à droite */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 72% 55%, var(--glow), transparent 70%), linear-gradient(180deg, var(--glow-2), var(--paper) 80%); }
.hero .hero-text { max-width: none; margin: 0; padding-block: clamp(3rem, 6vw, 5rem); padding-left: max(20px, env(safe-area-inset-left, 0px), calc((100vw - var(--wrap)) / 2 + 20px)); padding-right: 0; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem); font-weight: 800; margin-block: .9rem 1.4rem; }
.hero h1 em { font-style: normal; color: var(--green-deep); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 1.2rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero-facts div { display: grid; gap: .1rem; }
.hero-facts strong { font-family: var(--f-display); font-size: 1.08rem; }
.hero-facts span { font-size: var(--step--1); color: var(--ink-2); }
.hero-visual { position: relative; margin: 0; height: clamp(420px, 40vw, 600px); border-radius: 28px 0 0 28px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(15, 34, 48, .35); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; animation: breathe 24s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.hero-caption { position: absolute; left: 1.4rem; bottom: 1.2rem; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(15, 34, 48, .55); backdrop-filter: blur(6px); padding: .35rem .7rem; border-radius: 999px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .hero-text { padding-right: max(20px, env(safe-area-inset-right, 0px)); padding-bottom: 0; }
  .hero-visual { height: clamp(260px, 62vw, 440px); order: -1; border-radius: 0; }
  .hero .hero-text { padding-top: 2rem; }
}

/* Visuels 3D des expertises */
.service-img { margin: 0 0 .4rem; aspect-ratio: 3 / 2; max-width: 100%; border-radius: 6px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, var(--glow), var(--glow-2) 75%); }
.service-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.service:hover .service-img img { transform: scale(1.07); }
.detail-img { margin-top: 1.4rem; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: radial-gradient(ellipse at 50% 60%, var(--glow), var(--glow-2) 75%); }

/* Échelle énergétique */
.scale { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; display: grid; gap: 1rem; }
.scale-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--f-mono); font-size: .78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.scale ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.scale li { display: flex; align-items: center; gap: .6rem; }
.scale .bar { height: 30px; display: flex; align-items: center; justify-content: space-between; padding-inline: .7rem; color: #10202a; font: 700 .95rem var(--f-display); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.scale .bar small { font: 400 .72rem var(--f-mono); opacity: .85; }
.scale li:nth-child(1) .bar { width: 34%; background: var(--dpe-a); color: #fff; }
.scale li:nth-child(2) .bar { width: 43%; background: var(--dpe-b); }
.scale li:nth-child(3) .bar { width: 52%; background: var(--dpe-c); }
.scale li:nth-child(4) .bar { width: 61%; background: var(--dpe-d); }
.scale li:nth-child(5) .bar { width: 70%; background: var(--dpe-e); }
.scale li:nth-child(6) .bar { width: 79%; background: var(--dpe-f); }
.scale li:nth-child(7) .bar { width: 88%; background: var(--dpe-g); color: #fff; }
.scale .pin { font: 500 .75rem var(--f-mono); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; padding: .15rem .4rem; white-space: nowrap; }
.scale-foot { font-size: var(--step--1); color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: .9rem; }

/* Sections */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 4rem; align-items: end; margin-bottom: 3rem; }
.section-head h2 { font-size: var(--step-3); margin-top: .6rem; }
.section-head .lead { font-size: var(--step-0); }
@media (max-width: 800px) { .section-head { grid-template-columns: minmax(0, 1fr); } }

.page-hero { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: var(--step-4); margin-block: .8rem 1.2rem; max-width: 20ch; }

/* Expertises */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.service { padding: 1.8rem 1.6rem 2rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .8rem; align-content: start; }
.service:not(:nth-child(3n+1)) { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.service .code { font-family: var(--f-mono); font-size: .8rem; color: var(--accent); font-weight: 500; letter-spacing: .04em; }
.service h3 { font-size: var(--step-1); }
.service p { color: var(--ink-2); }
.service a.more { font-weight: 700; text-decoration: none; color: var(--ink); margin-top: .3rem; }
.service a.more:hover { color: var(--accent); }
@media (max-width: 900px) {
  .services { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .service:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(2n) { padding-left: 1.4rem; border-left: 1px solid var(--line); }
}
@media (max-width: 600px) { .services { grid-template-columns: minmax(0, 1fr); } .service:nth-child(2n) { padding-left: 0; border-left: 0; } }

/* Détails d'expertise */
.detail { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 1.5rem 4rem; padding-block: 3rem; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.detail:first-child { border-top: 1px solid var(--ink); }
.detail h2 { font-size: var(--step-2); margin-top: .5rem; }
.detail .body { display: grid; gap: 1.1rem; max-width: 68ch; }
.detail ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.detail li::marker { color: var(--accent); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.5rem; margin: 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
.kv dt { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-2); padding-top: .15rem; text-transform: uppercase; letter-spacing: .04em; }
.kv dd { margin: 0; }
@media (max-width: 800px) { .detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { margin-bottom: .4rem; } }

/* Méthode */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { padding: 1.4rem 1.4rem 0 0; border-top: 3px solid var(--line); counter-increment: s; display: grid; gap: .5rem; align-content: start; position: relative; }
.steps li::before { content: "Étape " counter(s); font-family: var(--f-mono); font-size: .78rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.steps li:first-child { border-top-color: var(--accent); }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 2rem; } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Références */
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.ref { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.ref-visual { aspect-ratio: 16 / 9; max-width: 100%; position: relative; background: var(--band); color: var(--band-fg); overflow: hidden; }
.ref-visual svg { width: 100%; height: 100%; display: block; }
.ref-visual .tag { position: absolute; left: 1rem; bottom: .9rem; font: 500 .74rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: .25rem .5rem; border-radius: 3px; }
.ref-body { padding: 1.4rem 1.5rem 1.6rem; display: grid; gap: .9rem; align-content: start; }
.ref-body h3 { font-size: var(--step-1); }
.ref-body .where { font-size: .95rem; color: var(--ink-2); margin-top: -.5rem; }
.ref-body p { color: var(--ink-2); font-size: .98rem; }
.ref .kv { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .9rem 0 0; font-size: .92rem; }
.ref.featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto; }
.ref.featured .ref-visual { aspect-ratio: auto; min-height: 320px; }
@media (max-width: 860px) { .refs { grid-template-columns: minmax(0, 1fr); } .ref.featured { grid-template-columns: minmax(0, 1fr); } .ref.featured .ref-visual { aspect-ratio: 16 / 9; min-height: 0; } }

.ref-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.ref-strip a { text-decoration: none; padding: 1.3rem 1.2rem 1.4rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .3rem; }
.ref-strip a strong { font-family: var(--f-display); font-size: 1.15rem; }
.ref-strip a span { font-size: .92rem; color: var(--ink-2); }
.ref-strip a .mono { font-size: .76rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }

/* Bandeau sombre */
.band { background: var(--band); color: var(--band-fg); }
.band .lead, .band p { color: var(--band-muted); }
.band .eyebrow { color: #9fd27a; }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; padding-block: clamp(3rem, 6vw, 5rem); }
.cta h2 { font-size: var(--step-3); color: var(--band-fg); margin-top: .6rem; }
.cta .actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: flex-end; }
@media (max-width: 800px) { .cta .wrap { grid-template-columns: minmax(0, 1fr); } .cta .actions { justify-content: flex-start; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.3rem, 3vw, 2.2rem); display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .85rem; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.consent input { margin-top: .3rem; accent-color: var(--accent); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.notice.error { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.coords { display: grid; gap: 1.6rem; }
.coords h3 { font-size: 1rem; font-family: var(--f-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: .3rem; }
.coords p, .coords a { font-size: 1.1rem; }
.coords a { font-weight: 600; }

/* Texte courant (mentions légales) */
.prose { max-width: 72ch; display: grid; gap: 1rem; }
.prose h2 { font-size: var(--step-1); margin-top: 1.5rem; }

/* Pied de page */
.site-footer { background: var(--band); color: var(--band-muted); font-size: .95rem; }
.site-footer .wrap { padding-block: 3rem 2rem; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer h4 { font-family: var(--f-mono); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--band-fg); margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { text-decoration: none; color: var(--band-muted); }
.site-footer a:hover { color: var(--band-fg); }
.site-footer .brand-name { color: var(--band-fg); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--band-fg) 15%, transparent); padding-top: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: .85rem; }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } }

.reveal { transition: transform .5s ease; }
.js .reveal.pending { transform: translateY(10px); }

/* ---- Sections inspirées « bâtiment durable » ---- */
.section.tint { background: var(--tint); border-top: 0; }
.section + .section { border-top: 0; }
.center { text-align: center; }
.section-head.center { display: block; text-align: center; max-width: 760px; margin-inline: auto; }
.section-head.center h2 { color: var(--ink); }
.section-head h2 { color: var(--ink); }

/* Cartes « Vous êtes » */
.aud-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.aud { display: grid; gap: .6rem; align-content: start; padding: 1.8rem 1.6rem; border: 1px solid var(--line); border-radius: var(--card); background: var(--surface); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.aud:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.aud h3 { font-size: 1.2rem; color: var(--green-deep); }
.aud p { color: var(--ink-2); }
.aud .more, .real .more { font-weight: 700; color: var(--accent); margin-top: .3rem; text-decoration: none; }
.ico { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: var(--glow); fill: none; stroke: var(--green-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .aud-grid { grid-template-columns: minmax(0, 1fr); } }

/* Expertises en cartes */
.services { border-top: 0; gap: 1.25rem; }
.service, .service:not(:nth-child(3n+1)), .service:nth-child(2n) { padding: 1rem 1rem 1.6rem; border: 0; border-radius: var(--card); background: var(--surface); box-shadow: var(--shadow); }
.service .code { color: var(--green-deep); }
.service-img { border-radius: 12px; }
.service a.more { color: var(--accent); }

/* Engagement : rangées image / texte alternées */
.engage { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
.engage-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.engage-row:nth-child(even) img { order: 2; }
.engage-row img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
.engage-row > div { display: grid; gap: .9rem; justify-items: start; max-width: 54ch; }
.engage-row h3 { font-size: var(--step-2); color: var(--ink); }
.engage-row p { color: var(--ink-2); }
.engage-row strong { color: var(--ink); }
@media (max-width: 800px) { .engage-row { grid-template-columns: minmax(0, 1fr); } .engage-row:nth-child(even) img { order: 0; } }

/* Chiffres clés */
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; text-align: center; }
.keys div { display: grid; gap: .2rem; padding: 1rem; }
.keys strong { font-family: var(--f-display); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); color: var(--green-deep); line-height: 1; }
.keys span { color: var(--ink-2); }
@media (max-width: 700px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Réalisations */
.real-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.real { border-radius: var(--card); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr; }
.real-body { padding: 1.4rem 1.5rem 1.6rem; display: grid; gap: .7rem; align-content: start; }
.real-body h3 { font-size: 1.2rem; color: var(--green-deep); }
.real-body .where { color: var(--ink-2); font-size: .95rem; margin-top: -.3rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .95rem; }
.ticks li { padding-left: 1.6rem; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
@media (max-width: 900px) { .real-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } }
.ref { border-radius: var(--card); border: 0; box-shadow: var(--shadow); }
.ref-body h3 { color: var(--green-deep); }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 2rem 4rem; align-items: start; }
.faq { display: grid; gap: .8rem; }
.qa { background: var(--surface); border-radius: 14px; padding: 0 1.3rem; box-shadow: var(--shadow); }
.qa summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; font-weight: 700; font-size: 1.05rem; position: relative; color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 400 1.6rem var(--f-display); color: var(--green-deep); }
.qa[open] summary::after { content: "–"; }
.qa p { padding-bottom: 1.2rem; color: var(--ink-2); }
@media (max-width: 800px) { .faq-wrap { grid-template-columns: minmax(0, 1fr); } }

/* Bandeau d'appel final en carte bleue */
.cta { background: transparent; padding-block: 0 clamp(3rem, 6vw, 5rem); }
.cta .wrap { background: linear-gradient(120deg, var(--band), color-mix(in srgb, var(--band) 70%, var(--accent))); border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem); max-width: calc(var(--wrap) - 40px); }
@media (max-width: 1240px) { .cta .wrap { margin-inline: max(20px, env(safe-area-inset-left, 0px)); } }
.cta .btn-ghost { color: var(--band-fg) !important; border-color: color-mix(in srgb, var(--band-fg) 50%, transparent); }
.hero { background: radial-gradient(ellipse 60% 70% at 72% 55%, var(--glow), transparent 70%), var(--paper); border-bottom: 0; }
.page-hero { background: var(--tint); border-bottom: 0; }
.page-hero h1 { color: var(--ink); }
.btn { padding: .85rem 1.6rem; }
.field textarea, .kv, .notice, .form, .scale { border-radius: 14px; }
.ref .kv { border-radius: 0; }
.field select { border-radius: 14px; }

/* Références clients */
.clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.clients li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--card); padding: 1.4rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.clients strong { font-family: var(--f-display); font-size: 1.25rem; font-weight: 800; color: var(--green-deep); letter-spacing: -.01em; }
.clients span { color: var(--ink-2); font-size: .95rem; }
.clients-note { margin-top: 1.4rem; color: var(--ink-2); }

/* Logo d'origine (bouton 3D) */
.brand-logo { display: block; height: 58px; width: auto; }
.brand-logo-foot { display: block; height: 65px; width: auto; }
@media (max-width: 400px) { .brand-logo { height: 40px; } }

/* Photos de références */
.ref-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref.featured .ref-visual img { object-position: 50% 20%; }
.ref-visual .credit { position: absolute; right: .7rem; top: .55rem; font-size: .68rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); opacity: .85; }
.ref.featured .ref-visual { min-height: 520px; }
.clients-logos { margin: 0; background: #fff; border-radius: var(--card); box-shadow: var(--shadow); padding: clamp(1rem, 3vw, 2.2rem); display: flex; justify-content: center; }
.clients-logos img { width: 100%; max-width: 675px; height: auto; display: block; }
/* Planche clients sur fond vert : le blanc de l'image se fond dans le vert */
.clients-logos { background: linear-gradient(135deg, #d9ecc9, #c3e1ab); }
.clients-logos img { mix-blend-mode: multiply; }
/* Référence phare : The Link */
.showcase { background: linear-gradient(160deg, #1f3f1b 0%, #14290f 100%); color: #f4f9f1; padding: clamp(3.5rem, 8vw, 6.5rem) 0; overflow: hidden; }
.showcase-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.showcase-img { margin: 0; position: relative; border-radius: var(--card); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); aspect-ratio: 4 / 5; }
.showcase-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.showcase-img figcaption { position: absolute; right: .8rem; bottom: .6rem; font-size: .7rem; color: #fff; opacity: .8; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.showcase .eyebrow { color: #9fd27a; }
.showcase h2 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.05; margin: .6rem 0 1.2rem; }
.showcase .lead { color: #d3e6c8; max-width: 46ch; }
.showcase-figs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(1.2rem, 3vw, 2.8rem); margin: 2rem 0 1.2rem; }
.showcase-figs strong { display: block; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.8rem); color: #9fd27a; line-height: 1; letter-spacing: -.02em; }
.showcase-figs span { display: block; margin-top: .4rem; color: #bdd4b2; font-size: .95rem; }
.showcase-labels { color: #bdd4b2; font-size: .9rem; margin: 0 0 1.8rem; }
.showcase .btn { background: #7cc24f; color: #10230c; }
@media (max-width: 860px) { .showcase-grid { grid-template-columns: minmax(0, 1fr); } .showcase-img { aspect-ratio: 4 / 3; } .showcase-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.detail .body li strong { color: var(--green-deep); }

.form-hint { margin: -.4rem 0 0; opacity: .8; }
.field input[type=file] { padding: .55rem .6rem; }

/* Page Expertises : image de fond dans le bandeau d'en-tête */
.page-hero--expertises {
  background:
    linear-gradient(90deg, #f3f8ef 0%, #f3f8ef 42%, rgba(243,248,239,.55) 68%, rgba(243,248,239,.1) 100%),
    url("../img/fond-expertises.jpg") right 4% center / auto 120% no-repeat,
    #f3f8ef;
  background-blend-mode: normal, multiply, normal;
}
@media (max-width: 760px) {
  .page-hero--expertises { background: linear-gradient(rgba(243,248,239,.86), rgba(243,248,239,.86)), url("../img/fond-expertises.jpg") center / cover no-repeat, #f3f8ef; background-blend-mode: normal, multiply, normal; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-hero--expertises { background: var(--tint); } }
:root[data-theme="dark"] .page-hero--expertises { background: var(--tint); }
.engage-row img.engage-wide { aspect-ratio: 2 / 1; object-position: 60% 50%; }

.brand-logo { height: 64px; }
@media (max-width: 400px) { .brand-logo { height: 46px; } }

/* Plan d'accès (page Contact) */
.map { margin: 0; display: grid; gap: .5rem; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border: 1px solid var(--line); border-radius: var(--card); background: var(--tint); }
.map figcaption { font-size: .9rem; color: var(--ink-2); }
.map figcaption a { color: var(--green-deep); font-weight: 600; }
/* Page « Aller plus loin » */
.refs-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.refs-nav a { text-decoration: none; font-weight: 600; font-size: .92rem; padding: .4rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--green-deep); }
.refs-nav a:hover { border-color: var(--accent); }
.detail.refs .body h3 { font-size: 1.05rem; color: var(--green-deep); margin-top: .6rem; }
.detail.refs .body h3:first-child { margin-top: 0; }
.detail ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; }
.detail ol li::marker { color: var(--accent); font-weight: 700; }
.detail .back { margin-top: 1rem; }
.detail .back a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.go-further { margin-top: .4rem; }
/* Référence phare The Link : vert adouci */
.showcase { background: linear-gradient(160deg, #3a4a3e 0%, #2a352d 100%); }
.showcase .eyebrow { color: #c3d6b8; }
.showcase-figs strong { color: #c9e0b8; }
.showcase .lead { color: #e1e9dc; }
.showcase-figs span, .showcase-labels { color: #ccd8c6; }
.showcase .btn { background: #a9c99a; border-color: #a9c99a; color: #1b2a1f; }.showcase .btn { color: #1b2a1f !important; }

/* Référence phare The Link : fond vert clair doux */
.showcase { background: linear-gradient(160deg, #eef6e8 0%, #dcebd1 100%); color: #1b2a1f; }
.showcase h2 { color: #1b2a1f; }
.showcase .eyebrow { color: #2f6e1f; }
.showcase .lead { color: #3d4d41; }
.showcase-figs strong { color: #2f6e1f; }
.showcase-figs span, .showcase-labels { color: #56655a; }
.showcase .btn { background: #4a8a26; border-color: #4a8a26; color: #ffffff !important; }
.showcase-img { box-shadow: 0 24px 50px -24px rgba(31, 63, 27, .45); }
/* Référence phare The Link : carte arrondie et sublimée */
.showcase { background: transparent; padding-block: clamp(2.5rem, 6vw, 4.5rem); overflow: visible; }
.showcase-grid {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 85% 15%, rgba(255, 255, 255, .75), transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 100%, rgba(165, 204, 116, .35), transparent 70%),
    linear-gradient(150deg, #f1f8eb 0%, #e2efd8 55%, #d3e6c4 100%);
  border: 1px solid rgba(74, 138, 38, .18);
  border-radius: 36px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 70px -40px rgba(31, 63, 27, .45);
  padding: clamp(1.4rem, 4vw, 3.2rem);
  max-width: calc(var(--wrap) - 40px);
}
@media (max-width: 1240px) { .showcase-grid { margin-inline: max(20px, env(safe-area-inset-left, 0px)); } }
.showcase-grid::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(74, 138, 38, .16); z-index: -1; }
.showcase-img { border-radius: 26px; box-shadow: 0 28px 55px -28px rgba(31, 63, 27, .55); }
.showcase-figs > div { background: rgba(255, 255, 255, .6); border: 1px solid rgba(74, 138, 38, .14); border-radius: 18px; padding: .8rem 1rem; }
.showcase .btn { box-shadow: 0 10px 24px -12px rgba(47, 110, 31, .7); }.showcase-figs { grid-template-columns: repeat(3, max-content); gap: .8rem; }
.showcase-figs strong { white-space: nowrap; font-size: clamp(1.5rem, 2.8vw, 2.3rem); }
@media (max-width: 560px) { .showcase-figs { grid-template-columns: minmax(0, 1fr); } }
.showcase-grid { background: linear-gradient(150deg, #f1f8eb 0%, #e2efd8 55%, #d3e6c4 100%); }
.showcase-grid::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 55% 70% at 85% 15%, rgba(255, 255, 255, .7), transparent 70%), radial-gradient(ellipse 50% 60% at 10% 100%, rgba(165, 204, 116, .3), transparent 70%); }
/* Définition du sigle sous le logo */
.site-header .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-def { display: block; font-family: var(--f-body); font-size: .74rem; line-height: 1.25; letter-spacing: .01em; color: var(--ink-2); white-space: nowrap; padding-left: 2px; }
.site-footer .brand { flex-direction: column; align-items: flex-start; gap: .4rem; }
.brand-def-foot { color: var(--band-muted); font-size: .8rem; white-space: normal; max-width: 34ch; }
.site-header .wrap { min-height: 84px; }
@media (max-width: 600px) { .site-header .brand-def { white-space: normal; max-width: 210px; font-size: .64rem; } }.site-header .wrap { padding-block: 8px; }
.brand-def-foot { max-width: 300px; }
@media (max-width: 860px) { .brand-logo { height: 52px; } }
@media (max-width: 480px) { .brand-logo { height: 40px; } .site-header .brand-def { max-width: 190px; font-size: .6rem; } }

/* Initiales du sigle : CAP en noir, RT en vert, comme le logo ; logo légèrement réduit */
.brand-def b { font-weight: 800; }
.brand-def b.k { color: #1b1d1c; }
.brand-def b.v { color: #3fa417; }
.brand-def-foot b.k { color: #ffffff; }
.brand-def-foot b.v { color: #7cc24f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header .brand-def b.k { color: #ffffff; } }
:root[data-theme="dark"] .site-header .brand-def b.k { color: #ffffff; }
.brand-logo { height: 56px; }
.brand-logo-foot { height: 58px; }
@media (max-width: 860px) { .brand-logo { height: 48px; } }
@media (max-width: 480px) { .brand-logo { height: 38px; } }
/* Définition du sigle : lisible et alignée sur la largeur du logo */
.site-header .wrap { min-height: 0; padding-block: 10px; }
.site-header .brand { gap: 6px; }
.site-header .brand-def { font-size: .9rem; line-height: 1.3; letter-spacing: .005em; color: #4a5a4e; white-space: nowrap; padding-left: 4px; }
.brand-def b { font-weight: 800; letter-spacing: .01em; }
.brand-def-foot { font-size: .95rem; line-height: 1.35; max-width: none; white-space: nowrap; color: #d6e6cc; }
@media (max-width: 860px) { .site-header .brand-def { font-size: .8rem; } }
@media (max-width: 480px) { .site-header .brand-def { font-size: .7rem; white-space: normal; max-width: 220px; } .brand-def-foot { white-space: normal; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header .brand-def { color: #c9d8c2; } }
:root[data-theme="dark"] .site-header .brand-def { color: #c9d8c2; }
/* Définition sur une seule ligne */
.site-header .brand-def { font-size: .88rem; white-space: nowrap; }
.brand-def-foot { font-size: .86rem; white-space: nowrap; }
.site-footer .wrap > div:first-child { min-width: 0; }
@media (max-width: 1100px) { .site-header .brand-def { font-size: .8rem; } }
@media (max-width: 520px) { .site-header .brand-def { font-size: .68rem; white-space: normal; max-width: 230px; } .brand-def-foot { white-space: normal; } }
@media (min-width: 861px) { .site-footer .wrap { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.brand-def-foot { font-size: .78rem; }
@media (max-width: 1100px) { .brand-def-foot { white-space: normal; } }
