/* Bâtisseurs d'Aotfois — maquette HTML
   Échelle : 1rem = 10px de la maquette Figma (1440px). Tout s'adapte à la largeur. */

@font-face { font-family: "Viner Hand"; src: local("Viner Hand ITC Std"), local("VinerHandITCStd-Regular"), local("Viner Hand ITC"); }

:root {
  --orange: #ed8946;
  --blanc: #edeced;
  --gris: #28272c;
  --bleu: #082ed8;
  --sans: "Inter Tight", system-ui, sans-serif;
  --script: "Viner Hand", cursive;
  --margin: 4rem;
  --margin-inset: 8rem;
  --section-y: 11.2rem;
  --nav-h: 7.6rem; /* hauteur de la nav fixe une fois réduite */
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(100vw / 144); -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--blanc); color: var(--gris); font-family: var(--sans); font-size: 1.6rem; letter-spacing: -0.005em; line-height: 1.5; overflow-x: hidden; text-rendering: optimizeLegibility; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: none; }
button { font: inherit; }

/* Échelle typo : display 9.6 · H2 5.6 · H3 / chapô 3.2 · texte 1.6 · petit 1.4 · étiquette 1.2 */
.h2 { font-size: 5.6rem; line-height: 1.04; letter-spacing: -0.03em; }
.h3 { font-size: 3.2rem; line-height: 1.1; letter-spacing: -0.025em; }
.body { font-size: 1.6rem; line-height: 1.5; }
.body p + p { margin-top: 1.2em; }
.label { font-size: 1.2rem; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.arrow { width: 3.136rem; height: 2.646rem; transform: rotate(180deg); transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
/* Au survol, la flèche pivote vers le haut */
.btn:hover .arrow, .link:hover .arrow { transform: rotate(135deg); }

.btn { display: inline-flex; align-items: center; gap: 1rem; padding: 1.1rem 1.6rem; border-radius: .4rem; white-space: nowrap; font-size: 1.5rem; line-height: 1.2; }
.btn .arrow { width: 2.2rem; height: 1.86rem; }
.btn--orange { background: var(--orange); color: var(--gris); }
.btn--dark { background: var(--gris); color: var(--blanc); }
/* Survol : tous les boutons passent en orange (l'orange passe en gris) */
.btn { transition: background-color .35s, color .35s, box-shadow .35s; }
.btn .arrow { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), filter .35s; }
.btn:hover { background: var(--orange); color: var(--gris); box-shadow: none; }
.btn--dark:hover .arrow, .btn--ghost:hover .arrow { filter: brightness(.17); }
.btn--orange:hover { background: var(--gris); color: var(--blanc); }
.btn--orange:hover .arrow { filter: invert(1) brightness(1.1); }
.link { display: inline-flex; align-items: center; gap: 1.2rem; white-space: nowrap; font-size: 1.5rem; }
.link .arrow { width: 2.6rem; height: 2.2rem; }

/* ---------- TEXTURE (matière, comme sur la maquette Figma) ---------- */
/* Texture fixe, attachée à la page : elle défile avec le contenu comme un papier */
body { position: relative; }
body::after { content: ""; position: absolute; inset: 0; z-index: 100; pointer-events: none; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- HERO ---------- */
/* Hero encadré : détaché du haut (sous la nav) et des bords */
.hero { position: relative; isolation: isolate; height: 60rem; margin: 8.8rem var(--margin) 0; padding: 4rem 4rem 3.2rem; border-radius: .8rem; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; color: var(--blanc); }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.6); }
/* Nav fixe : texte sombre au-dessus du hero encadré, fond clair flouté au scroll */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 1.6rem var(--margin); color: var(--gris); transition: padding .5s cubic-bezier(.65,0,.35,1), background-color .5s, color .5s, box-shadow .5s; }
.header.is-scrolled { padding-top: 1.1rem; padding-bottom: 1.1rem; color: var(--gris); background: rgba(237,236,237,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(40,39,44,.08); }
/* Logo dessiné en em : --logo règle sa taille d'un seul coup */
@property --logo { syntax: "<number>"; inherits: true; initial-value: .7; }
.logo { --logo: .7; display: inline-grid; font-family: var(--script); font-size: calc(1rem * var(--logo)); line-height: 1.4; color: inherit; transition: --logo .5s cubic-bezier(.65,0,.35,1); }
.is-scrolled .logo { --logo: .6; }
.logo > * { grid-area: 1 / 1; }
.logo__icon { position: relative; margin: .145em 0 0 4.214em; width: 2.034em; height: 6.19em; }
.logo__icon i { position: absolute; border: 1.162px solid var(--orange); border-radius: .2em; height: 1.889em; }
.logo__icon i:nth-child(1) { top: 0; left: 0; width: 2.034em; }
.logo__icon i:nth-child(2) { top: 4.301em; left: 0; width: 2.034em; }
.logo__icon i:nth-child(3) { top: 2.15em; left: 0; width: .959em; }
.logo__icon i:nth-child(4) { top: 2.15em; left: 1.075em; width: .959em; }
.logo__l1 { font-size: 2.2786em; }
.logo__l2 { font-size: 2.4443em; margin: 1.4622em 0 0 .0589em; }
.logo .up { text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 2.4rem; white-space: nowrap; font-size: 1.3rem; letter-spacing: 0; }
.nav .btn { font-size: 1.3rem; padding: .9rem 1.3rem; margin-left: .8rem; }
.nav .btn .arrow { width: 1.9rem; height: 1.6rem; }
/* sur la nav claire, le bouton blanc garde un contour fin pour rester lisible */
.nav .btn--light:not(:hover) { box-shadow: inset 0 0 0 1px rgba(40,39,44,.2); }
.hero__title { font-size: 9.6rem; line-height: 1.02; letter-spacing: -0.035em; white-space: nowrap; }
.hero__title span { display: block; }
.hero__title .l2 { padding-left: 12.8rem; }

/* ---------- WATERMARK ---------- */
.watermark { position: absolute; left: 50%; font-family: var(--script); font-size: 35.13rem; line-height: 1; color: #fff; pointer-events: none; transform: translateX(-50%) rotate(-7.76deg); }

/* ---------- INTRO ---------- */
.intro { --intro-top: 18rem; position: relative; padding: var(--intro-top) var(--margin) var(--section-y); display: flex; justify-content: center; overflow: hidden; }
/* Le B est centré sur le bloc texte */
.intro .watermark { top: calc(50% + (var(--intro-top) - var(--section-y)) / 2); transform: translate(-50%, -50%) rotate(-7.76deg); }
.intro__text { position: relative; width: 92rem; font-size: 4rem; line-height: 1.2; letter-spacing: -0.025em; text-align: center; }

/* ---------- TRADITION ---------- */
.tradition { padding: var(--section-y) 0; }
.tradition__intro { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 var(--margin) var(--section-y); }
.tradition__text { width: 49.2rem; }

/* Les deux métiers sont superposés dans un écran fixé et s'échangent au scroll */
.savoir { height: 100vh; padding-top: var(--nav-h); display: flex; align-items: center; overflow: hidden; }
.savoir__stage { width: 144rem; height: 76rem; flex: none; transform-origin: left center; }
.savoir__track { display: grid; height: 100%; }
.metier { position: relative; width: 144rem; height: 76rem; flex: none; grid-area: 1 / 1; }
.metier__typo { position: absolute; inset: 0; font-size: 29.1653rem; line-height: 1.21; white-space: nowrap; color: var(--gris); }
/* Chaque ligne est un masque : le mot glisse à l'intérieur */
/* Lignes centrées sur la carte (axe vertical de la scène) */
.metier__line { position: absolute; left: 50%; display: block; overflow: hidden; transform: translateX(-50%); }
.metier__line > span { display: block; will-change: transform; }
.metier--maconnerie .l1 { top: 8.9rem; }
.metier--maconnerie .l2 { top: 31.7rem; }
.metier--charpente .l1 { top: 10.9rem; }
.metier--charpente .l2 { top: 29.7rem; }

.card { position: absolute; left: 39rem; top: 0; width: 66rem; border-radius: .8rem; overflow: hidden; will-change: transform; }
/* scène de 76rem : elle tient sans réduction à 1440×900, les H3 restent à 40px */
.card__img { height: 52rem; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.card__body { display: flex; flex-direction: column; gap: 1.6rem; padding: 3.6rem 4rem 3.2rem; }
.card__row { display: flex; justify-content: space-between; align-items: flex-start; }
.card__row .h3 { width: 32.9rem; }
.card__desc { width: 29.3rem; }
.card .link { align-self: flex-end; }
.card__body { background: var(--gris); color: var(--blanc); }

/* ---------- MATÉRIAUX ---------- */
.materiaux { padding: var(--section-y) 0; overflow: hidden; }
.materiaux__pin { height: 100vh; padding-top: var(--nav-h); display: flex; align-items: center; overflow: hidden; }
.materiaux__inner { width: 144rem; flex: none; padding: 0 var(--margin); transform-origin: left center; }
/* Le titre défile normalement, seul le carrousel est fixé : le H2 garde sa taille réelle */
.materiaux__title { width: 123.1rem; padding: 0 var(--margin); }
.carousel-nav { position: relative; width: 6.4rem; height: 2.4rem; margin: 0 0 3.2rem auto; }
.carousel-nav img { width: 6.4rem; height: 2.4rem; pointer-events: none; }
.carousel-nav button { position: absolute; top: -1rem; width: 3.2rem; height: 4.4rem; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel-nav [data-prev] { left: -1rem; }
.carousel-nav [data-next] { right: -1rem; }
.carousel { display: flex; gap: 4.8rem; will-change: transform; }
.mcard { position: relative; flex: none; width: 52rem; height: 68rem; border-radius: .8rem; overflow: hidden; display: flex; align-items: flex-end; justify-content: flex-end; }
.mcard__img { position: absolute; inset: 0; overflow: hidden; }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.mcard__img--torchis img { position: absolute; width: 249%; height: 104.99%; left: -99.95%; top: -2.5%; object-fit: fill; }
.mcard__body { position: relative; width: 40rem; min-height: 40rem; padding: 3.6rem 3.2rem 3.6rem 3.6rem; gap: 2.4rem; background: var(--blanc); border-radius: .8rem; display: flex; flex-direction: column; justify-content: space-between; }
.mcard__body .body { font-size: 2rem; line-height: 1.4; }

/* ---------- DIAGNOSTIC ---------- */
.diagnostic { padding: var(--section-y) var(--margin); }
.diagnostic__head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 9.6rem; }
.diagnostic__title { width: 94.6rem; }
.prestations { display: flex; flex-direction: column; }
.presta + .presta { margin-top: 7.2rem; padding-top: 7.2rem; border-top: 1px solid rgba(40,39,44,.2); }
.presta { display: flex; gap: 7.2rem; align-items: stretch; }
.presta__title { flex: 1; }
.presta__text { width: 30rem; flex: none; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.presta__text--narrow { width: 28.4rem; }
.presta__img { width: 39.2rem; height: 44.8rem; flex: none; border-radius: .8rem; overflow: hidden; }
.presta__img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- BANDEAU ---------- */
.bandeau { height: 100vh; padding-top: var(--nav-h); background: var(--gris); color: var(--blanc); display: flex; align-items: center; overflow: hidden; }
.bandeau__stage { position: relative; width: 144rem; height: 82.4rem; flex: none; display: grid; place-items: center; transform-origin: left center; }
.bandeau__text, .bandeau__more { grid-area: 1 / 1; text-align: center; }
.bandeau__text { position: relative; z-index: 2; }
/* Texte final : trois paragraphes en taille H3, centrés, révélés l'un après l'autre */
.bandeau__more { width: 104rem; display: flex; flex-direction: column; align-items: center; gap: 3.2rem; text-align: center; }
.bandeau__lead { font-size: 3.2rem; line-height: 1.15; letter-spacing: -0.025em; }
.bandeau__lead .w { display: inline-block; }
.bandeau__more .btn { margin-top: 1.6rem; }
.btn--light { background: var(--blanc); color: var(--gris); }
/* Les photos partent du centre, derrière la typo */
.bandeau__flies { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fly { position: absolute; left: 50%; top: 50%; margin: 0; visibility: hidden; will-change: transform, filter, opacity; }
.fly img { width: 100%; height: 100%; object-fit: cover; }
.fly--p { width: 27rem; aspect-ratio: 3 / 4; }
.fly--l { width: 35rem; aspect-ratio: 3 / 2; }

/* ---------- ÉTAPES ---------- */
.etapes { padding: var(--section-y) var(--margin-inset); overflow: hidden; }
.etapes .h2 { margin-bottom: 8.8rem; }
.etapes__grid { position: relative; display: grid; grid-template-columns: 41.6rem 41.6rem; justify-content: space-between; row-gap: 8rem; }
.etapes__grid .watermark { top: -3.6rem; margin-left: -.66rem; }
.etape { position: relative; display: flex; flex-direction: column; gap: 1.2rem; }
.etape .body { width: calc(var(--w) * 1rem); }

/* ---------- FAQ ---------- */
.faq { padding: var(--section-y) var(--margin-inset); }
.faq__title { margin-bottom: 3.2rem; }
.faq__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 4rem; padding: 4.8rem 0; }
.faq__item:not(:last-child) { border-bottom: 1px solid var(--gris); }
.faq__q { font-size: 3.2rem; line-height: 1.1; letter-spacing: -0.025em; white-space: nowrap; }
.faq__a { width: 49.2rem; }

/* ---------- FOOTER ---------- */
.footer { background: var(--gris); color: var(--blanc); padding: 14.4rem var(--margin) 3.2rem; overflow: hidden; }
.footer a:not(.btn) { transition: opacity .3s; }
.footer a:not(.btn):hover { opacity: .6; }
.footer__cta { display: flex; justify-content: space-between; align-items: flex-start; gap: 4rem; padding-bottom: 12rem; }
.footer__cta-side { width: 49.2rem; display: flex; flex-direction: column; gap: 3.2rem; color: rgba(237,236,237,.75); }
.footer__btns { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer .btn--orange:hover { background: var(--blanc); color: var(--gris); }
.footer .btn--orange:hover .arrow { filter: none; }
.btn--ghost { color: var(--blanc); box-shadow: inset 0 0 0 1px rgba(237,236,237,.35); }
.footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 2.4rem; padding-top: 2.4rem; border-top: 1px solid rgba(237,236,237,.2); font-size: 1.4rem; line-height: 1.6; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.footer__label { color: var(--orange); margin-bottom: 1.2rem; }
.footer__mark { margin: 12rem 0 4rem; overflow: hidden; }
.footer__mark img { display: block; width: 100%; height: auto; }
.footer__bottom { display: flex; justify-content: space-between; padding-top: 2.4rem; border-top: 1px solid rgba(237,236,237,.2); font-size: 1.2rem; color: rgba(237,236,237,.55); }

/* ---------- Sans animation ---------- */
@media (prefers-reduced-motion: reduce) {
  .materiaux__pin { height: auto; }
  .bandeau { height: auto; padding: 16rem 0; }
  .bandeau__stage { height: auto; display: flex; flex-direction: column; gap: 6.4rem; }
  .fly { display: none; }
  .carousel { transition: transform .8s cubic-bezier(.65,0,.35,1); }
  .savoir { height: auto; overflow: visible; }
  .savoir__stage { height: auto; }
  .savoir__track { display: flex; flex-direction: column; gap: 12rem; }
  .metier { grid-area: auto; }
}
