/* MS VIVA — version Opus
   Pierre bleue, chaux, vert du logo, sable, et le rose fluo du cordeau de maçon (utilisé pour la seule ligne de progression). */

:root {
  --pierre: #1d2629;      /* pierre bleue sombre, texte et fonds sombres */
  --pierre-2: #4a585d;    /* pierre bleue claire, texte secondaire */
  --chaux: #e9ebe6;       /* enduit à la chaux, fond principal */
  --chaux-2: #dfe2dc;     /* fond alterné */
  --vert: #0b5a3b;        /* vert du logo */
  --vert-2: #0f7a50;
  --sable: #d6c396;
  --cordeau: #ff2e88;     /* le cordeau de maçon */
  --blanc: #fbfbf8;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--chaux);
  color: var(--pierre);
  font-family: var(--text);
  font-size: clamp(17px, 1.05vw + 12px, 20px);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--vert-2); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--blanc); padding: 10px 14px; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Typographie */
.display, .headline, .subhead, .btn, .top, .cordeau, .build__step, .dock, .chips, legend, .field > span, .quote__label, .trades dt, .swatch__name, .method h3, .compare__tag, figcaption strong {
  font-family: var(--display);
}
.display {
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(2.6rem, 6.2vw, 6.4rem);
  line-height: .92;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
.headline {
  font-weight: 750;
  font-stretch: 112%;
  font-size: clamp(2rem, 3.9vw, 4rem);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
  max-width: 18ch;
}
.subhead {
  font-weight: 700;
  font-stretch: 108%;
  font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}
.lede { font-size: clamp(1.08rem, 1.3vw, 1.4rem); line-height: 1.45; margin: 1.1rem 0 0; max-width: 34ch; }
.prose { max-width: 52ch; color: var(--pierre-2); margin: 1rem 0 0; }

/* Boutons et liens */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  font-weight: 650; font-stretch: 105%; font-size: .95rem; letter-spacing: .005em;
  text-decoration: none; border: 1.5px solid currentColor; border-radius: 999px;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--vert); border-color: var(--vert); color: var(--blanc); }
.btn--solid:hover { background: var(--vert-2); border-color: var(--vert-2); }
.btn--light { background: var(--blanc); border-color: var(--blanc); color: var(--pierre); }
.btn--light:hover { background: transparent; color: var(--blanc); }
.btn--ghost { background: transparent; color: var(--pierre); }
.btn--ghost:hover { background: var(--pierre); color: var(--blanc); }
.link { font-family: var(--display); font-weight: 600; font-size: .95rem; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.link--light { color: var(--blanc); }

/* En-tête */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: clamp(12px, 2.5vw, 36px);
  padding: 14px var(--gutter);
  color: var(--blanc);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.top.is-solid { background: rgba(233, 235, 230, .94); color: var(--pierre); box-shadow: 0 1px 0 rgba(29, 38, 41, .1); backdrop-filter: blur(10px); }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.top__brand img { width: 52px; height: auto; background: var(--blanc); border-radius: 10px; padding: 4px 5px; }
.top__brand span { font-weight: 800; font-stretch: 120%; letter-spacing: .01em; font-size: 1.05rem; }
.top__nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.top__nav a, .top__phone { font-weight: 550; font-size: .92rem; text-decoration: none; }
.top__nav a:hover, .top__phone:hover { text-decoration: underline; text-underline-offset: 5px; }
.top .btn { min-height: 44px; padding: 0 18px; font-size: .88rem; }
.top:not(.is-solid) .top__cta { background: var(--blanc); border-color: var(--blanc); color: var(--pierre); }

/* Le chantier au défilement */
.build { position: relative; height: 520vh; background: var(--pierre); }
.build__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--blanc); }
.build__media, .build__still, .build__video, .build__shade { position: absolute; inset: 0; }
.build__still img, .build__video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.build__still { opacity: 0; }
.build__still[data-still="0"] { opacity: 1; }
.build__video { opacity: 0; transition: opacity .6s; }
.build.has-video .build__video { opacity: 1; }
.build__shade {
  background:
    linear-gradient(180deg, rgba(20, 27, 30, .55) 0%, rgba(20, 27, 30, 0) 22%),
    linear-gradient(90deg, rgba(20, 27, 30, .72) 0%, rgba(20, 27, 30, .38) 38%, rgba(20, 27, 30, 0) 62%),
    linear-gradient(0deg, rgba(20, 27, 30, .7) 0%, rgba(20, 27, 30, 0) 30%);
}
.build__copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(120px, 19vh, 190px); }
.build__panel {
  position: absolute; left: 0; bottom: 0; max-width: min(640px, 100%);
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.build__panel .display { font-size: clamp(2.4rem, 4.8vw, 5rem); }
.build__panel[data-panel="0"] .display { font-size: clamp(2.8rem, 6vw, 6.4rem); max-width: 11ch; }
.build__panel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.build__step { display: inline-block; font-weight: 700; font-size: .95rem; margin: 0 0 1rem; padding: 5px 12px; color: var(--pierre); background: var(--cordeau); border-radius: 999px; letter-spacing: .01em; }
.build__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 1.7rem; }
.build__note { position: absolute; right: var(--gutter); top: 84px; margin: 0; font-size: .8rem; opacity: .75; max-width: 30ch; text-align: right; }

.cordeau { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 5vh, 52px); }
.cordeau__line { position: relative; height: 2px; background: rgba(251, 251, 248, .28); }
.cordeau__done { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--cordeau); box-shadow: 0 0 12px rgba(255, 46, 136, .65); }
.cordeau__done::after { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--cordeau); }
.cordeau__ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: t; }
.cordeau__ticks li { position: relative; padding: 14px 0 0; font-size: .82rem; font-weight: 600; opacity: .55; transition: opacity .3s; }
.cordeau__ticks li::before { content: ""; position: absolute; left: 0; top: -7px; width: 2px; height: 14px; background: currentColor; }
.cordeau__ticks li.is-reached { opacity: 1; }
.cordeau__ticks li.is-reached::before { background: var(--cordeau); }

/* Chantiers réels */
.real { padding: clamp(88px, 12vw, 170px) 0 clamp(70px, 9vw, 130px); }
.real__head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.real__head .headline { max-width: 16ch; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.pair { margin: 0; }
.pair--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 56px); align-items: end; }
.pair figcaption { display: grid; gap: 4px; margin-top: 14px; }
.pair--wide figcaption { margin: 0 0 12px; }
.pair figcaption strong { font-weight: 700; font-size: clamp(1.1rem, 1.5vw, 1.45rem); line-height: 1.15; }
.pair figcaption span { color: var(--pierre-2); }
.pair--wide figcaption strong { font-size: clamp(1.5rem, 2.4vw, 2.3rem); font-stretch: 110%; }

.compare { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--chaux-2); border-radius: 4px; touch-action: pan-y; user-select: none; }
.pair--wide .compare { aspect-ratio: 5 / 6; max-height: 78vh; }
.compare picture, .compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--cordeau); box-shadow: 0 0 10px rgba(255, 46, 136, .6); pointer-events: none; }
.compare__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2629' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
}
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__range:focus-visible + * , .compare:focus-within { outline: 3px solid var(--vert-2); outline-offset: 3px; }
.compare__tag { position: absolute; top: 12px; padding: 5px 10px; font-size: .78rem; font-weight: 650; background: rgba(251, 251, 248, .92); border-radius: 999px; pointer-events: none; }
.compare__tag--before { left: 12px; }
.compare__tag--after { right: 12px; }

.pool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 32px clamp(28px, 5vw, 72px); margin-top: clamp(72px, 10vw, 140px); align-items: start; }
.pool__text { position: sticky; top: 110px; }
.pool__grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto auto; gap: 12px; }
.pool__item { padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; border-radius: 4px; aspect-ratio: 1; }
.pool__item--main { grid-row: span 2; aspect-ratio: auto; }
.pool__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pool__item:hover img { transform: scale(1.04); }
.pool__item:last-child { grid-column: 1 / -1; aspect-ratio: 2.2; }

/* Métiers */
.trades { background: var(--pierre); color: var(--chaux); padding: clamp(88px, 11vw, 160px) 0 0; }
.trades .prose { color: rgba(233, 235, 230, .72); }
.trades__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: clamp(48px, 6vw, 84px) 0 0; border-top: 1px solid rgba(233, 235, 230, .2); }
.trades__list > div { padding: 26px 24px 30px 0; border-right: 1px solid rgba(233, 235, 230, .14); }
.trades__list > div + div { padding-left: 24px; }
.trades__list > div:last-child { border-right: 0; }
.trades dt { font-weight: 700; font-stretch: 108%; font-size: clamp(1.15rem, 1.4vw, 1.4rem); line-height: 1.12; }
.trades dd { margin: .7rem 0 0; color: rgba(233, 235, 230, .72); font-size: .98rem; }

.matter { padding: clamp(80px, 10vw, 140px) 0 0; }
.matter__row { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: clamp(420px, 62vh, 640px); }
.swatch {
  position: relative; overflow: hidden; outline-offset: -4px;
  background: var(--img) center / cover no-repeat;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px;
  transition: flex-grow .5s var(--ease);
  cursor: default;
}
.swatch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 27, 30, .82) 0%, rgba(20, 27, 30, .1) 55%); transition: opacity .4s; }
.swatch > * { position: relative; }
.swatch__name { font-weight: 750; font-stretch: 112%; font-size: clamp(1.3rem, 2vw, 2rem); line-height: 1; }
.swatch__use { max-width: 26ch; font-size: .98rem; line-height: 1.45; margin-top: 12px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s; }
.swatch:hover .swatch__use, .swatch:focus .swatch__use, .swatch.is-open .swatch__use { max-height: 8em; opacity: 1; }
@media (hover: hover) and (min-width: 900px) {
  .matter__row { display: flex; }
  .swatch { flex: 1 1 0; }
  .swatch:hover, .swatch:focus { flex-grow: 2.1; }
}

/* Méthode */
.method { padding: clamp(96px, 12vw, 170px) 0; }
.method__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 40px clamp(32px, 6vw, 96px); }
.method__steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.method__steps li { counter-increment: s; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); column-gap: 20px; padding: 26px 0 28px; border-top: 1.5px solid var(--pierre); }
.method__steps li::before { content: counter(s); grid-row: span 2; font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 2.4rem; line-height: .9; color: var(--vert); }
.method h3 { margin: 0; font-weight: 700; font-stretch: 108%; font-size: clamp(1.2rem, 1.6vw, 1.6rem); line-height: 1.12; }
.method__steps p { margin: .55rem 0 0; color: var(--pierre-2); max-width: 46ch; }

/* Max */
.max { background: var(--chaux-2); padding: clamp(80px, 10vw, 140px) 0; }
.max__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px clamp(32px, 6vw, 96px); align-items: center; }
.max__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.max__text .headline { max-width: 17ch; }
.max__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 2rem; }

/* Devis */
.quote { padding: clamp(96px, 12vw, 170px) 0; }
.quote__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 48px clamp(32px, 6vw, 96px); align-items: start; }
.quote__intro { position: sticky; top: 110px; }
.quote__contact { display: grid; gap: 6px; margin-top: 2rem; font-style: normal; }
.quote__contact a:first-child { font-family: var(--display); font-weight: 750; font-stretch: 112%; font-size: clamp(1.6rem, 2.6vw, 2.4rem); text-decoration: none; line-height: 1.05; margin-bottom: 6px; }
.quote__contact span { color: var(--pierre-2); }

.quote__form { background: var(--blanc); border-radius: 6px; padding: clamp(22px, 3vw, 40px); box-shadow: 0 1px 0 rgba(29, 38, 41, .06), 0 24px 60px -30px rgba(29, 38, 41, .35); }
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid rgba(29, 38, 41, .22); border-radius: 999px; font-size: .92rem; font-weight: 550; transition: background-color .15s, border-color .15s, color .15s; }
.chips input:hover + span { border-color: var(--pierre); }
.chips input:checked + span { background: var(--pierre); border-color: var(--pierre); color: var(--blanc); }
.chips input:focus-visible + span { outline: 3px solid var(--vert-2); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field > span { font-weight: 650; font-size: .9rem; }
.field em { font-weight: 400; font-style: normal; color: var(--pierre-2); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--pierre); background: var(--chaux); border: 1.5px solid transparent; border-radius: 4px; padding: 12px 14px; min-height: 48px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--vert-2); background: var(--blanc); }
.quote__preview { margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--cordeau); background: var(--chaux); }
.quote__label { margin: 0 0 6px; font-weight: 650; font-size: .85rem; color: var(--pierre-2); }
.quote__msg { margin: 0; white-space: pre-line; font-size: .98rem; }
.quote__error { color: #a3123f; font-weight: 600; margin: 16px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.quote__ok { color: #0b5a3b; font-weight: 600; margin: 16px 0 0; }
.quote__send { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.quote__send .btn { flex: 1 1 200px; }

/* Pied de page */
.foot { background: var(--pierre); color: rgba(233, 235, 230, .8); padding: 64px 0 120px; font-size: .95rem; }
.foot__grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 28px 48px; align-items: start; }
.foot img { width: 120px; background: var(--blanc); border-radius: 10px; padding: 8px 10px; }
.foot p { margin: 0; }
.foot a { color: var(--chaux); }
.foot__small { grid-column: 1 / -1; font-size: .82rem; opacity: .7; }

/* Barre de contact mobile */
.dock { display: none; }

/* Zoom photo */
.zoom { padding: 0; border: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; }
.zoom::backdrop { background: rgba(20, 27, 30, .88); }
.zoom img { max-height: 86vh; width: auto; margin: 0 auto; border-radius: 4px; }
.zoom__close { display: block; margin: 12px auto 0; background: var(--blanc); border: 0; border-radius: 999px; padding: 10px 20px; font-family: var(--display); font-weight: 650; cursor: pointer; }

/* Tablettes */
@media (max-width: 1080px) {
  .top__nav { display: none; }
  .trades__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trades__list > div:nth-child(2) { border-right: 0; }
  .trades__list > div:nth-child(3) { padding-left: 0; }
  .trades__list > div:nth-child(n+3) { border-top: 1px solid rgba(233, 235, 230, .14); }
}

/* Téléphones */
@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .top { padding: 10px 16px; }
  .top__brand img { width: 44px; }
  .top__phone, .top__cta { display: none; }
  .build { height: 420vh; }
  .build__still img, .build__video { object-position: 44% 50%; }
  .build__shade { background: linear-gradient(180deg, rgba(20, 27, 30, .5) 0%, rgba(20, 27, 30, 0) 20%), linear-gradient(0deg, rgba(20, 27, 30, .88) 0%, rgba(20, 27, 30, .5) 40%, rgba(20, 27, 30, 0) 62%); }
  .build__copy { bottom: 128px; }
  .build__panel .display { font-size: clamp(2.2rem, 10.5vw, 3.2rem); }
  .build__panel[data-panel="0"] .display { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .build__note { top: auto; bottom: 94px; left: 16px; right: auto; text-align: left; font-size: .72rem; }
  .cordeau { bottom: 34px; }
  .cordeau__ticks li { font-size: .7rem; }
  .real__head, .pair--wide, .pool, .method__grid, .max__grid, .quote__grid { grid-template-columns: 1fr; }
  .pairs { grid-template-columns: 1fr; }
  .pair--wide figcaption { margin: 14px 0 0; order: 2; }
  .pool__text, .quote__intro { position: static; }
  .trades__list { grid-template-columns: 1fr; }
  .trades__list > div, .trades__list > div + div { padding: 22px 0; border-right: 0; border-top: 1px solid rgba(233, 235, 230, .14); }
  .matter__row { grid-template-columns: 1fr 1fr; height: auto; }
  .swatch { aspect-ratio: 3 / 4; padding: 16px; }
  .swatch__use { font-size: .86rem; }
  .fields { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .dock {
    display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(233, 235, 230, .96); backdrop-filter: blur(10px);
    box-shadow: 0 -1px 0 rgba(29, 38, 41, .12);
    transform: translateY(110%); transition: transform .35s var(--ease);
  }
  .dock.is-on { transform: none; }
  .dock a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--pierre); text-decoration: none; font-weight: 650; font-size: .92rem; }
  .dock__main { background: var(--vert); border-color: var(--vert) !important; color: var(--blanc); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
