/* Pages métier (dressings, terrasses…) : header animé, texte de référencement, chantiers en photos */
/* page longue : pas d'ancres de section, la lecture reste libre */
html { scroll-snap-type: none !important; }
.pied, .bas { scroll-snap-align: none; }

/* header : une photo, puis la suivante qui la recouvre au défilement (la seule chose qui bouge sur la page) */
.m-tete { height: calc(100vh + var(--etapes, 1) * 100vh); position: relative; background: var(--noir); }
.m-scene { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.m-scene img, .m-ouvert, .m-couche { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-scene img { object-fit: cover; object-position: 50% 62%; }
.m-ouvert, .m-couche { clip-path: inset(0 0 0 100%); will-change: clip-path; }
.m-fil { position: absolute; top: 0; bottom: 0; left: 100%; width: 1px; background: rgba(239,237,232,.75); box-shadow: 0 0 18px rgba(0,0,0,.35); opacity: 0; }
.m-scene::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 150px; z-index: 3; pointer-events: none; background: linear-gradient(180deg, rgba(10,10,10,.5), rgba(10,10,10,0)); }
.m-voile { position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(10,10,10,.82), rgba(10,10,10,.2) 48%, rgba(10,10,10,0) 70%); }
/* iPhone : le décor prend la grande hauteur (fixe), le titre reste au-dessus de la barre d'adresse dépliée */
.m-titre { position: absolute; z-index: 4; left: var(--marge); right: var(--marge); bottom: clamp(40px, 9vh, 96px); bottom: calc(100lvh - 100svh + clamp(40px, 9svh, 96px)); }
.m-titre h1 { font: 400 clamp(40px, 6.4vw, 96px)/.98 var(--serif); letter-spacing: -.01em; margin: 12px 0 14px; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.m-titre p { color: rgba(239,237,232,.86); }
.m-titre .caps { color: rgba(239,237,232,.8); text-shadow: 0 1px 14px rgba(0,0,0,.65); }
.m-titre p { text-shadow: 0 1px 14px rgba(0,0,0,.5); }

/* corps */
.m-corps { background: var(--papier); color: var(--encre); position: relative; z-index: 2; padding: clamp(40px, 6vw, 80px) var(--marge) clamp(72px, 9vw, 120px); }
/* un seul bord gauche pour tout le corps, le même que les sections de l'accueil (1400 px marges comprises) */
.m-texte, .m-chantiers { max-width: calc(1400px - 2 * var(--marge)); margin-left: auto; margin-right: auto; }
.m-texte > * { max-width: 720px; }
.m-ariane { font: 400 13px/1.4 var(--mono); letter-spacing: .08em; color: var(--gris); margin-bottom: clamp(20px, 3vw, 32px); }
.m-ariane a { color: var(--gris); }
.m-ariane span[aria-hidden] { margin: 0 .6em; }
.m-chapeau { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.55; color: #2b2a28; }
.m-corps p, .m-corps li { color: #2b2a28; }
.m-corps p + p { margin-top: .9em; }
.m-corps a { color: var(--encre); text-underline-offset: 3px; }
.m-corps h2 { font: 400 clamp(30px, 3.4vw, 46px)/1.06 var(--serif); letter-spacing: -.01em; margin: clamp(48px, 5vw, 72px) 0 16px; }
.m-corps h3 { font: 400 clamp(23px, 2vw, 28px)/1.15 var(--serif); margin: 32px 0 10px; }
.m-bref { margin-top: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--encre); border-bottom: 1px solid var(--ligne); padding: 22px 0 26px; }
.m-bref h2 { font: 400 13px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; color: var(--gris); }
.m-bref ul { list-style: none; display: grid; gap: 10px; }
.m-bref li { padding-left: 1.6em; position: relative; }
.m-bref li::before { content: ""; position: absolute; left: 0; top: .8em; width: .9em; height: 1px; background: var(--chene); }

/* header à photo verticale : en plein écran sur téléphone, posée entière à droite au bureau, le titre à gauche sur le noir */
.m-cadre { position: absolute; inset: 0; overflow: hidden; }
@media (min-width: 761px) {
  .m-vertical .m-cadre { left: auto; right: var(--marge); top: 96px; bottom: 40px; bottom: calc(100lvh - 100svh + 40px); width: calc((100svh - 136px) * .71); border-radius: 4px; }
  .m-vertical .m-cadre img { object-position: 50% 50%; }
  .m-vertical .m-voile { display: none; }
  .m-vertical .m-titre { right: auto; max-width: calc(100vw - (100svh - 136px) * .71 - 3 * var(--marge)); }
  .m-vertical .m-titre h1 { font-size: clamp(40px, 5vw, 84px); }
}
.m-etapes { list-style: none; counter-reset: e; display: grid; gap: 18px; margin-top: 22px; }
.m-etapes li { counter-increment: e; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; padding-top: 16px; border-top: 1px solid var(--ligne); }
.m-etapes li::before { content: "0" counter(e); font: 400 13px/1.9 var(--mono); letter-spacing: .08em; color: var(--gris); grid-row: span 2; }
.m-etapes strong { font-weight: 500; }
.m-faq h3 { font: 500 18px/1.4 var(--sans); margin: 0 0 8px; }
.m-faq > div { padding: 22px 0; border-top: 1px solid var(--ligne); }
.m-faq > div:last-child { border-bottom: 1px solid var(--ligne); }

/* la barre prend le fond papier au-dessus du texte, pour que les lignes ne passent pas sous le logo */
.barre { transition: background-color .25s; }
.barre.sur-clair { background: var(--papier); }

@media (max-width: 760px) {
  .m-etapes li { grid-template-columns: 36px minmax(0, 1fr); }
}

/* chantiers : le texte d'un côté, les photos de l'autre, en alternant ; les photos restent à une taille où elles sont nettes */
.m-chantiers { margin-top: 28px; display: grid; gap: clamp(40px, 4.5vw, 64px); }
.m-chantier { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.m-chantier:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.m-chantier:nth-child(even) .m-photos { order: -1; }
.m-chantier h3 { margin-top: 0; }
.m-photos { display: grid; gap: 10px; }
.m-photos img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--papier-2); }
.m-photos.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-photos.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-photos.paysage img { aspect-ratio: 4 / 3; }
.m-photos.une { justify-items: end; }
.m-chantier:nth-child(even) .m-photos.une { justify-items: start; }
.m-photos.une img { max-width: 400px; }
/* une seule photo : le texte se colle à elle, sans vide au milieu */
.m-chantier:has(.m-photos.une:not(.paysage)) { grid-template-columns: minmax(0, 560px) 400px; justify-content: start; }
.m-chantier:nth-child(even):has(.m-photos.une:not(.paysage)) { grid-template-columns: 400px minmax(0, 560px); }
.m-photos.une.paysage img { max-width: none; }
@media (max-width: 860px) {
  .m-chantier, .m-chantier:nth-child(even), .m-chantier:has(.m-photos.une:not(.paysage)), .m-chantier:nth-child(even):has(.m-photos.une:not(.paysage)) { grid-template-columns: 1fr; gap: 22px; }
  .m-chantier:nth-child(even) .m-photos { order: 0; }
  .m-photos.deux.paysage { grid-template-columns: 1fr; }
  .m-photos.trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-photos.trois img:last-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .m-photos.une, .m-chantier:nth-child(even) .m-photos.une { justify-items: start; }
  .m-photos.une img { max-width: 300px; }
}

.m-chantiers + .m-texte { margin-top: clamp(32px, 4vw, 48px); }
