/* François Lopes — peintre en bâtiment à Évreux */

@font-face {
  font-family: "Archivo";
  src: url(../fonts/archivo.woff2) format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url(../fonts/source-serif.woff2) format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url(../fonts/source-serif-italic.woff2) format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Nuancier */
  --ardoise: #1e272b;
  --ardoise-2: #46525a;
  --enduit: #eef0ec;
  --papier: #f8f9f6;
  --trait: #d3d7d0;
  --vert: #234a3c;
  --vert-fonce: #183529;
  --vert-pale: #dbe4dd;
  --pierre: #d6cab2;
  --chene: #8b6236;
  --verre: #b3cad1;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 3px;

  /* Nuages de chaux : nuages sombres et clairs équilibrés, la teinte moyenne ne change pas */
  --chaux-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0028 .0055' numOctaves='5' seed='11' result='t'/%3E%3CfeColorMatrix in='t' result='d' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  2.6 0 0 0 -1.25'/%3E%3CfeColorMatrix in='t' result='l' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  -2.6 0 0 0 1.05'/%3E%3CfeMerge%3E%3CfeMergeNode in='d'/%3E%3CfeMergeNode in='l'/%3E%3C/feMerge%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Même chaux, raccordable bord à bord, pour les grands blocs (répétée en mosaïque) */
  --chaux-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0028 .0055' numOctaves='5' seed='11' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix in='t' result='d' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  2.6 0 0 0 -1.25'/%3E%3CfeColorMatrix in='t' result='l' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  -2.6 0 0 0 1.05'/%3E%3CfeMerge%3E%3CfeMergeNode in='d'/%3E%3CfeMergeNode in='l'/%3E%3C/feMerge%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--enduit);
  color: var(--ardoise);
  font: 400 1.125rem/1.62 var(--serif);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--vert); outline-offset: 3px; border-radius: 2px; }
.contact :focus-visible, .cta :focus-visible, .site-footer :focus-visible, .lightbox :focus-visible { outline-color: var(--pierre); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ardoise); color: #fff; padding: 10px 16px;
  font: 600 .95rem var(--sans); text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--sans);
  font-stretch: 118%;
  font-weight: 640;
  letter-spacing: -0.012em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.3rem; font-stretch: 110%; line-height: 1.15; }

.lead { font-size: clamp(1.18rem, 1.7vw, 1.36rem); line-height: 1.5; max-width: 34em; color: var(--ardoise-2); }

.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 46rem; }
.section-head p { margin: 0; color: var(--ardoise-2); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  font: 600 1rem/1 var(--sans); font-stretch: 108%;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid var(--vert);
  background: var(--vert); color: #fff;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.btn--ghost { background: transparent; color: var(--vert); }
.btn--ghost:hover { background: var(--vert); color: #fff; }
.btn--light { background: var(--papier); border-color: var(--papier); color: var(--ardoise); }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 249, 246, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.brand { display: grid; text-decoration: none; line-height: 1.1; margin-right: auto; }
.brand b { font: 720 1.32rem var(--sans); font-stretch: 125%; letter-spacing: -0.01em; }
.brand span { font: 450 .82rem var(--sans); color: var(--ardoise-2); margin-top: 3px; }

.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 12px;
  font: 500 .98rem var(--sans); text-decoration: none; color: var(--ardoise-2);
  border-radius: var(--radius);
}
.nav a:hover { color: var(--ardoise); background: var(--enduit); }
.nav a[aria-current="page"] { color: var(--ardoise); box-shadow: inset 0 -2px 0 var(--vert); border-radius: 0; }

.header-call { min-height: 44px; padding: 0 16px; font-size: .95rem; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-right: -8px;
  background: none; border: 0; color: var(--ardoise); cursor: pointer; border-radius: var(--radius);
}
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 960px) {
  .header-call span { display: none; }
  .header-call { padding: 0 13px; }
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--papier); border-bottom: 1px solid var(--trait);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 20px; }
  .nav a { padding: 14px 0; font-size: 1.12rem; border-bottom: 1px solid var(--trait); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--vert); }
}

/* ---------- Accueil : ouverture ---------- */

.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 8vw, 112px); }
.hero .wrap {
  display: grid; gap: clamp(36px, 5vw, 72px);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
}
.hero h1 { max-width: 11ch; }
.hero .lead { margin: 28px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start;
  gap: 0; margin: 48px 0 0; padding: 0; list-style: none;
  font-family: var(--sans);
}
.facts li { padding: 0 24px; border-left: 1px solid var(--trait); }
.facts li:first-child { padding-left: 0; border-left: 0; }
.facts b { display: block; font-size: 1.5rem; font-stretch: 120%; font-weight: 650; line-height: 1.1; }
.facts span { font-size: .9rem; color: var(--ardoise-2); }

/* Desktop : tout le bloc d'ouverture (titre, texte, boutons, chiffres clés) tient dans la
   hauteur visible de l'écran, barres du navigateur comprises. Tailles et marges suivent vh. */
@media (min-width: 901px) {
  .hero { padding: clamp(20px, 4.5vh, 72px) 0 clamp(48px, 7vh, 104px); }
  .hero h1 { max-width: none; font-size: clamp(2.3rem, min(4.6vw, 8.6vh), 4.6rem); }
  .hero .lead { margin: clamp(14px, 2.8vh, 28px) 0 clamp(18px, 3.6vh, 36px); font-size: clamp(1.08rem, min(1.5vw, 2.4vh), 1.3rem); }
  .facts { margin-top: clamp(18px, 4vh, 48px); }
  .compare-frame { max-height: calc(100vh - 210px); min-height: 340px; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; gap: 14px; }
  .facts li { padding: 0; border: 0; }
  .facts b { display: inline; font-size: 1.15rem; margin-right: 6px; }
}

/* ---------- Comparateur avant / après ---------- */

.compare { margin: 0; }
.compare-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; max-height: 72vh; width: 100%;
  background: var(--trait); border-radius: var(--radius);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 2px; margin-left: -1px; background: #fff; pointer-events: none;
}
.compare-knob {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: var(--ardoise); box-shadow: 0 2px 14px rgba(20, 30, 30, .28);
}
.compare-knob svg { width: 26px; height: 26px; }
.compare-tag {
  position: absolute; top: 14px; padding: 5px 10px;
  font: 600 .82rem/1.2 var(--sans); color: #fff;
  background: rgba(30, 39, 43, .72); border-radius: 2px; pointer-events: none;
}
.compare-tag--before { left: 14px; }
.compare-tag--after { right: 14px; }
.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.compare-range:focus-visible + .compare-line .compare-knob { outline: 3px solid var(--vert); outline-offset: 3px; }
.compare figcaption { margin-top: 14px; font: 400 .95rem/1.45 var(--sans); color: var(--ardoise-2); }
.compare.is-hinting .compare-before, .compare.is-hinting .compare-line { transition: clip-path .9s cubic-bezier(.6,0,.2,1), left .9s cubic-bezier(.6,0,.2,1); }

/* ---------- Nuancier des métiers ---------- */

.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.chip {
  display: flex; flex-direction: column;
  background: var(--papier); text-decoration: none;
  border-radius: var(--radius); overflow: hidden;
  outline: 1px solid var(--trait); outline-offset: -1px;
}
.chip-swatch { height: 64px; background: var(--tint); display: flex; align-items: flex-end; padding: 10px 14px; }
.chip-swatch span { font: 500 .8rem var(--sans); color: var(--tint-ink, var(--ardoise)); opacity: .85; }
.chip-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.chip-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.chip-body { padding: 20px 18px 22px; display: grid; gap: 8px; flex: 1; align-content: start; }
.chip-body p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ardoise-2); }
.chip-more { margin-top: 6px; font: 600 .95rem var(--sans); color: var(--vert); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.chip:hover .chip-photo img { transform: scale(1.03); }
.chip:hover .chip-more { text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) { .chip-photo img { transition: none; } .chip:hover .chip-photo img { transform: none; } }

.tint-peinture { --tint: var(--vert); --tint-ink: #fff; }
.tint-facade { --tint: var(--pierre); }
.tint-sols { --tint: var(--chene); --tint-ink: #fff; }
.tint-vitrerie { --tint: var(--verre); }
.tint-legal { --tint: var(--papier); }

.legal .prose { max-width: 42rem; }
.legal h2 { font-size: 1.4rem; font-stretch: 112%; margin: 48px 0 14px; }
.legal h2:first-child { margin-top: 0; }
.legal p { font-size: 1.05rem; }
.legal a { color: var(--vert); text-underline-offset: 3px; }

@media (max-width: 1020px) { .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .chips { grid-template-columns: 1fr; }
  .chip { display: grid; grid-template-columns: 112px 1fr; }
  .chip-swatch { display: none; }
  .chip-photo { aspect-ratio: auto; border-left: 6px solid var(--tint); }
  .chip-body { padding: 14px 16px; }
  .chip-body p { font-size: .95rem; }
}

/* ---------- Références ---------- */

.refs { background: var(--papier); border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.refs-grid {
  display: grid; gap: clamp(14px, 2vw, 24px);
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: auto auto;
}
.ref { margin: 0; display: flex; flex-direction: column; }
.ref-img { overflow: hidden; border-radius: var(--radius); background: var(--trait); flex: 1; }
.ref-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.ref:first-child { grid-row: span 2; }
.ref:first-child .ref-img img { aspect-ratio: auto; min-height: 100%; }
.ref figcaption { padding-top: 12px; font-family: var(--sans); line-height: 1.35; }
.ref figcaption b { display: block; font-weight: 600; font-size: 1.02rem; }
.ref figcaption span { font-size: .9rem; color: var(--ardoise-2); }
@media (max-width: 860px) {
  .refs-grid { grid-template-columns: 1fr 1fr; }
  .ref:first-child { grid-column: span 2; grid-row: auto; }
  .ref:first-child .ref-img img { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .refs-grid { grid-template-columns: 1fr; }
  .ref:first-child { grid-column: auto; }
}

/* ---------- Méthode ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px 28px 8px 0; border-top: 2px solid var(--ardoise); margin-right: 24px; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 18px;
  font: 600 2.6rem/1 var(--sans); font-stretch: 125%; color: var(--vert);
  font-variant-numeric: lining-nums;
}
.steps h3 { margin-bottom: 10px; }
.steps p { font-size: 1.02rem; line-height: 1.55; color: var(--ardoise-2); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { margin-right: 0; padding-right: 0; } }

/* ---------- Fournisseurs ---------- */

.suppliers { padding: 0 0 clamp(64px, 8vw, 104px); }
.suppliers .wrap > * { padding-top: 36px; }
.suppliers .wrap { background: linear-gradient(var(--trait), var(--trait)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.suppliers .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.suppliers p { margin: 0; font: 500 .98rem/1.4 var(--sans); color: var(--ardoise-2); }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 52px; list-style: none; margin: 0; padding: 0; }
.logos a { display: grid; padding: 6px; margin: -6px; border-radius: var(--radius); }
.logos img { grid-area: 1 / 1; max-height: 40px; width: auto; opacity: .92; transition: opacity .35s ease; }
.logos .logo-couleur { opacity: 0; }
.logos a:hover img, .logos a:focus-visible img { opacity: 0; }
.logos a:hover .logo-couleur, .logos a:focus-visible .logo-couleur { opacity: 1; }
.logos li:nth-child(1) img { max-height: 52px; }
.logos li:nth-child(2) img { max-height: 22px; }
@media (max-width: 720px) { .suppliers .wrap { grid-template-columns: 1fr; } .logos { gap: 24px 36px; } .logos img { max-height: 34px; } }

/* ---------- Contact ---------- */

.contact { background: var(--ardoise); color: #e9ece8; }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); }
.contact h2 { color: #fff; margin-bottom: 22px; }
.contact p { color: #bfc7c4; max-width: 30em; }
.contact .btn { margin-top: 12px; }
.contact dl { margin: 0; display: grid; gap: 0; align-content: start; }
.contact dl div { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.16); }
.contact dl div:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.contact dt { font: 500 .88rem var(--sans); color: #9eaaa6; margin-bottom: 4px; }
.contact dd { margin: 0; font: 500 1.2rem/1.35 var(--sans); color: #fff; }
.contact dd a { text-decoration: none; }
.contact dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact .big { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-stretch: 118%; font-weight: 620; letter-spacing: -0.01em; }
@media (max-width: 820px) { .contact .wrap { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--vert-fonce); color: #b9c8c0; font: 400 .92rem/1.6 var(--sans); padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; color: #e5ece8; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- Pages métier ---------- */

.page-head { background: var(--tint); color: var(--tint-ink, var(--ardoise)); padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.page-head .crumb { grid-column: 1 / -1; font: 500 .92rem var(--sans); opacity: .82; margin: 0 0 4px; }
.page-head .crumb a { text-underline-offset: 3px; }
.page-head .lead { color: inherit; opacity: .9; margin: 0; }

/* Bandeaux métier : badigeon à la chaux qui dérive lentement + motif du métier en filigrane.
   Réglages validés : chaux 46 %, motif 26 %. */
.page-head.chaux {
  --chaux-force: .46;
  --motif-force: .26;
  --chaux-a: .8;           /* teintes foncées */
  --ink: 30, 39, 43;
  --ink-a: .055;
  position: relative; overflow: hidden; isolation: isolate;
}
.page-head.chaux.tint-peinture, .page-head.chaux.tint-sols { --ink: 255, 255, 255; --ink-a: .075; }
.page-head.chaux.tint-facade, .page-head.chaux.tint-vitrerie { --chaux-a: .62; }
.page-head .fx, .page-head .fx2, .page-head.chaux::before, .page-head.chaux::after {
  position: absolute; z-index: -1; pointer-events: none;
}
/* Nuages de chaux : nuages sombres et clairs équilibrés, la teinte moyenne ne change pas */
.page-head .fx, .page-head .fx2 {
  inset: -25%;
  background: var(--chaux-img) center / cover no-repeat;
  mix-blend-mode: soft-light;
  will-change: transform;
}
.page-head .fx { opacity: calc(var(--chaux-a) * var(--chaux-force)); animation: chaux 34s ease-in-out infinite alternate; }
.page-head .fx2 { transform: scaleX(-1); opacity: calc(var(--chaux-a) * .5 * var(--chaux-force)); animation: chaux-2 46s ease-in-out infinite alternate; }
@keyframes chaux { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-9%, 4%, 0) scale(1.08); } }
@keyframes chaux-2 { from { transform: scaleX(-1) translate3d(-6%, 3%, 0) scale(1.06); } to { transform: scaleX(-1) translate3d(4%, -3%, 0) scale(1); } }
/* Motif du métier, fixe, ton sur ton */
.page-head.chaux::before {
  content: ""; inset: 0;
  background: rgba(var(--ink), calc(var(--ink-a) * var(--motif-force)));
  -webkit-mask: var(--motif) 0 0 / var(--motif-size) repeat;
  mask: var(--motif) 0 0 / var(--motif-size) repeat;
}
/* Grain fin d'enduit */
.page-head.chaux::after {
  content: ""; inset: 0; opacity: .2; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tint-peinture { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='200'%3E%3Cg fill='black'%3E%3Crect x='0' width='44' height='200' opacity='.55'/%3E%3Crect x='46' width='40' height='200' opacity='.25'/%3E%3Crect x='88' width='46' height='200' opacity='.7'/%3E%3Crect x='136' width='42' height='200' opacity='.35'/%3E%3Crect x='180' width='60' height='200' opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); --motif-size: 240px 200px; }
.tint-facade { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140'%3E%3Cg fill='none' stroke='black' stroke-width='7'%3E%3Cpath d='M3 0V140M93 0V140M48 70V140M138 70V140M0 3.5H180M0 70H180M3 70L48 3.5M93 70L138 3.5M138 3.5L180 66'/%3E%3C/g%3E%3C/svg%3E"); --motif-size: 180px 140px; }
.tint-sols { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M0 32L32 0L64 32M0 16L16 0M48 0L64 16M0 48L32 16L64 48'/%3E%3C/g%3E%3C/svg%3E"); --motif-size: 64px 32px; }
.tint-vitrerie { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='150'%3E%3Cg fill='none' stroke='black' stroke-width='4'%3E%3Cpath d='M2 0V150M0 2H120M60 0V150M0 76H120'/%3E%3C/g%3E%3C/svg%3E"); --motif-size: 120px 150px; }
@media (prefers-reduced-motion: reduce) { .page-head .fx, .page-head .fx2 { animation: none; } }

/* Chaux mouvante générique : boutons, bandeaux d'appel, accueil.
   Deux calques de nuages en pseudo-éléments, derrière le contenu. */
.chaux-fond { --chaux-force: .46; --chaux-a: .8; --chaux-size: cover; position: relative; overflow: hidden; isolation: isolate; }
.chaux-fond::before, .chaux-fond::after {
  content: ""; position: absolute; inset: -25%; z-index: -1; pointer-events: none;
  background: var(--chaux-img) center / var(--chaux-size) no-repeat;
  mix-blend-mode: soft-light;
}
.chaux-fond::before { opacity: calc(var(--chaux-a) * var(--chaux-force)); animation: chaux 34s ease-in-out infinite alternate; }
.chaux-fond::after { transform: scaleX(-1); opacity: calc(var(--chaux-a) * .5 * var(--chaux-force)); animation: chaux-2 46s ease-in-out infinite alternate; }
/* Petites surfaces : nuages plus serrés pour qu'on les voie, dérive un peu plus vive */
.btn.chaux-fond, .chip-swatch.chaux-fond { --chaux-size: 520px 350px; }
.btn.chaux-fond::before { animation-duration: 18s; }
.btn.chaux-fond::after { animation-duration: 24s; }
.btn.chaux-fond:hover::before { opacity: calc(var(--chaux-a) * var(--chaux-force) * 1.6); }
/* Accueil, deux premières sections : dégradé d'enduit, plus soutenu en haut, qui rejoint
   le fond du site en bas. La chaux s'y voit mieux et s'estompe avec le dégradé. */
.accueil-haut {
  --chaux-a: .5;
  background: linear-gradient(180deg, #c9d0c7 0%, #d9ded6 40%, var(--enduit) 100%);
}
/* Les calques débordent de 25 % : le bas visible du bloc est à ~83 % de leur hauteur */
.accueil-haut::before, .accueil-haut::after {
  background: var(--chaux-tile) 0 0 / 1200px 800px repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 80%);
}
@media (prefers-reduced-motion: reduce) { .chaux-fond::before, .chaux-fond::after { animation: none; } }

@media (max-width: 820px) { .page-head .wrap { grid-template-columns: 1fr; } }

.detail .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.detail h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 22px; }
.services-list { list-style: none; margin: 0; padding: 0; font-family: var(--sans); }
.services-list li { padding: 14px 0 14px 26px; border-top: 1px solid var(--trait); font-size: 1.06rem; font-weight: 500; position: relative; }
.services-list li:last-child { border-bottom: 1px solid var(--trait); }
.services-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--tint); border-radius: 1px; outline: 1px solid rgba(0,0,0,.12); outline-offset: -1px; }
.prose { max-width: 36em; }
.prose p:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .detail .wrap { grid-template-columns: 1fr; } }

.pairs { display: grid; gap: clamp(40px, 6vw, 72px); max-width: 1000px; }
.pair { margin: 0; }
.pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair-imgs div { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--trait); }
.pair-imgs img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ratio, 4 / 3); }
.pair figcaption { margin-top: 14px; font: 400 .98rem/1.45 var(--sans); color: var(--ardoise-2); max-width: 46em; }
.pair figcaption b { color: var(--ardoise); font-weight: 600; }

.gallery { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px); }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--trait); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5;
}
.gallery button.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .2s; }
.gallery button:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery button:hover img { transform: none; } }
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery button.wide { grid-column: span 2; aspect-ratio: 4 / 3; }
}

.cta { background: var(--vert); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; padding-top: clamp(44px, 6vw, 72px); padding-bottom: clamp(44px, 6vw, 72px); }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 18ch; }
.cta p { margin: 12px 0 0; color: #cfe0d6; max-width: 30em; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.cta .btn--ghost:hover { background: #fff; color: var(--vert); border-color: #fff; }

.others { padding: clamp(56px, 7vw, 96px) 0; }
.others h2 { font-size: 1.5rem; margin-bottom: 24px; }
.others ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.others a {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--papier); border-radius: var(--radius); text-decoration: none;
  outline: 1px solid var(--trait); outline-offset: -1px;
  font: 600 1.08rem var(--sans); font-stretch: 110%;
}
.others a::before { content: ""; width: 28px; height: 28px; flex: none; border-radius: 2px; background: var(--tint); }
.others a:hover { outline-color: var(--ardoise-2); }
@media (max-width: 720px) { .others ul { grid-template-columns: 1fr; } }

/* ---------- Visionneuse ---------- */

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #12181a; color: #fff;
}
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox::backdrop { background: rgba(18, 24, 26, .6); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox figure { margin: 0; display: grid; place-items: center; padding: 64px 72px 8px; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; font: 400 .95rem var(--sans); color: #c3ccc8; padding: 14px 16px 22px; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px;
  background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 50%; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; margin-top: -26px; }
.lb-next { right: 14px; top: 50%; margin-top: -26px; }
@media (max-width: 640px) {
  .lightbox figure { padding: 64px 0 0; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; margin: 0; }
}

/* Appareils tactiles (téléphones, tablettes) : allègement du badigeon et du bandeau
   pour les GPU modestes. Le rendu desktop n'est pas concerné. */
@media (hover: none) and (pointer: coarse) {
  /* Bandeau : pas de flou d'arrière-plan, fond plein */
  .site-header { backdrop-filter: none; background: var(--papier); }

  /* Un seul calque de chaux par élément, un peu plus présent pour compenser le second */
  .chaux-fond::after, .page-head .fx2 { display: none; }
  .chaux-fond::before, .page-head .fx { opacity: calc(var(--chaux-a) * 1.3 * var(--chaux-force)); }

  /* Petits éléments : texture fixe */
  .btn.chaux-fond::before, .chip-swatch.chaux-fond::before { animation: none; }
}
