/* =========================================================
   Maison Boucly — base commune aux trois directions
   Règle : 3 tailles max par police (voir --fs-*)
   ========================================================= */

/* ---------- Polices (auto-hébergées) ---------- */
@font-face { font-family: "Boska"; src: url("../fonts/Boska-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/Boska-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/Boska-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/Boska-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("../fonts/ClashDisplay-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("../fonts/ClashDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("../fonts/ClashDisplay-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Jetons ---------- */
:root {
  /* Palette */
  --chalk: #E6DFD7;
  --almond: #C1B5A6;
  --taupe: #856F57;
  --olive: #353125;
  --bordeaux: #402120;
  --bordeaux-deep: #280909;
  --espresso: #2B1915;
  --night: #181611;

  /* Rôles (redéfinis par chaque thème) */
  --bg: var(--chalk);
  --bg-alt: var(--almond);
  --bg-contrast: var(--espresso);
  --ink: var(--espresso);

  --ink-contrast: var(--chalk);
  --accent: var(--taupe);


  /* Typo — Boska : 3 tailles */
  --fs-hero: clamp(3.1rem, 8.4vw, 8.75rem);
  --fs-section: clamp(2.3rem, 5.2vw, 5rem);
  --fs-card: clamp(1.5rem, 2.3vw, 2.15rem);
  /* Typo — Clash Display : 3 tailles */
  --fs-sub: 0.75rem;     /* sous-titres, petites capitales */
  --fs-body: 1.0625rem;  /* texte courant */
  --fs-small: 0.875rem;  /* légendes, footer, mentions */

  --serif: "Boska", "Times New Roman", serif;
  --sans: "Clash Display", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1440px;
  --section-y: clamp(6rem, 14vw, 12rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Couleurs dérivées, recalculées là où --ink change */
body, .section, .hero, .footer, .menu {
  --ink-soft: color-mix(in srgb, var(--ink) 70%, transparent);
  --line: color-mix(in srgb, var(--ink) 20%, transparent);
}
.section { background: var(--bg); color: var(--ink); }

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, blockquote, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grain papier ---------- */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain, .085);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: var(--grain-blend, multiply);
  filter: var(--grain-filter, none);
}

/* ---------- Styles typographiques (les seules tailles du site) ---------- */
.t-hero, .t-section, .t-card { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.t-hero { font-size: var(--fs-hero); line-height: .98; font-weight: 500; }
.t-section { font-size: var(--fs-section); line-height: 1.04; }
.t-card { font-size: var(--fs-card); line-height: 1.15; }
.t-hero em, .t-section em, .t-card em { font-style: italic; font-weight: inherit; color: var(--accent); }

.sub {
  font-family: var(--sans);
  font-size: var(--fs-sub);
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 1.6;
}
.body { font-size: var(--fs-body); color: var(--ink-soft); max-width: 38em; }
.small { font-size: var(--fs-small); line-height: 1.6; }

/* ---------- Mise en page ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.head { display: grid; gap: 1.4rem; margin-bottom: clamp(3rem, 7vw, 6rem); }
.head .sub { color: var(--accent); display: flex; align-items: center; gap: 1rem; }
.head .sub::before { content: ""; width: 2.5rem; height: 1px; background: currentColor; }
.head--center { text-align: center; justify-items: center; }
.head--center .sub::after { content: ""; width: 2.5rem; height: 1px; background: currentColor; }

/* ---------- Bouton ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .9rem;
  padding: 1.15rem 1.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .6s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-fill, var(--ink));
  transform: translateY(101%); border-radius: inherit;
  transition: transform .6s var(--ease);
}
.btn:hover { color: var(--btn-ink, var(--bg)); }
.btn:hover::before { transform: translateY(0); }
.btn__arrow { width: 1.6rem; height: 1px; background: currentColor; position: relative; transition: width .6s var(--ease); }
.btn__arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .btn__arrow { width: 2.4rem; }

.link {
  display: inline-flex; gap: .7rem; align-items: center;
  padding-bottom: .35rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: right bottom; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--nav-ink, var(--ink));
  transition: transform .7s var(--ease), background-color .5s, color .5s;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); color: var(--ink); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 5.25rem; }
.nav__logo svg { width: clamp(9.5rem, 13vw, 12rem); height: auto; display: block; }
.nav__links { display: flex; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { padding: .8rem 1.3rem; }
.nav__burger { display: none; width: 2.75rem; height: 2.75rem; position: relative; }
.nav__burger span { position: absolute; left: .55rem; right: .55rem; height: 1px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.nav__burger span:first-child { top: 1.1rem; }
.nav__burger span:last-child { top: 1.6rem; }
.menu-open .nav__burger span:first-child { top: 1.35rem; transform: rotate(45deg); }
.menu-open .nav__burger span:last-child { top: 1.35rem; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg-contrast); color: var(--ink-contrast);
  display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  padding: 6rem var(--gutter) 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .9s var(--ease);
}
.menu-open .menu { clip-path: inset(0 0 0 0); }
.menu-open .nav { color: var(--ink-contrast); background: transparent; backdrop-filter: none; }
.menu ul { display: grid; gap: .6rem; }
.menu .small { opacity: .7; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; overflow: hidden; }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 125%; object-fit: cover; }
.hero__content { position: relative; z-index: 2; align-self: end; padding-bottom: clamp(3rem, 9vh, 7rem); display: grid; gap: 1.8rem; }
.hero__lead { max-width: 30em; }
.hero__scroll { position: absolute; z-index: 2; bottom: 2rem; right: var(--gutter); display: flex; align-items: center; gap: .8rem; writing-mode: vertical-rl; }
.hero__scroll::after { content: ""; width: 1px; height: 3.5rem; background: currentColor; transform-origin: top; animation: scrollLine 2.4s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Manifeste (texte révélé au scroll) ---------- */
.manifesto__text { max-width: 22ch; }
.manifesto__text .w { opacity: .14; transition: none; }
.manifesto__sign { margin-top: 3rem; display: flex; gap: 1.2rem; align-items: center; color: var(--accent); }

/* ---------- Prestations ---------- */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 2.25rem); }
.offer { display: grid; gap: 1.4rem; align-content: start; }
.offer__media { overflow: hidden; aspect-ratio: 3 / 4; position: relative; }
.offer__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.4s var(--ease), filter 1.4s var(--ease); }
.offer:hover .offer__media img { transform: scale(1.09); }
.offer__meta { display: flex; justify-content: space-between; align-items: baseline; color: var(--accent); }
.offer .body { max-width: 26em; }

/* ---------- Méthode ---------- */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); }
.steps__media { position: sticky; top: 12vh; height: 76vh; overflow: hidden; }
.steps__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); transform: scale(1.15); transition: clip-path 1.2s var(--ease), transform 1.6s var(--ease); }
.steps__media img.is-active { clip-path: inset(0 0 0 0); transform: scale(1); }
.steps__media img.is-past { clip-path: inset(0 0 0 0); transform: scale(1); }
.step { min-height: 76vh; display: grid; align-content: center; gap: 1.4rem; border-top: 1px solid var(--line); padding-block: 3rem; opacity: .3; transition: opacity .8s var(--ease); }
.step.is-active { opacity: 1; }
.step__num { color: var(--accent); }
.step .t-card em { color: var(--accent); }

/* ---------- Karla ---------- */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 8rem); align-items: center; }
.about__media { position: relative; }
.about__media .frame { overflow: hidden; aspect-ratio: 4 / 5; }
.about__media img { width: 100%; height: 120%; object-fit: cover; }
.about__media .frame--small { position: absolute; width: 42%; aspect-ratio: 3 / 4; right: -12%; bottom: -10%; border: .6rem solid var(--bg); }
.about__text { display: grid; gap: 1.6rem; }
.about__sign { font-family: var(--serif); font-style: italic; font-size: var(--fs-card); color: var(--accent); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(.75rem, 1.6vw, 1.5rem); align-items: start; }
.gallery figure { overflow: hidden; }
.gallery img { width: 100%; height: 120%; object-fit: cover; }
.g1 { grid-column: 1 / span 5; aspect-ratio: 4 / 5; }
.g2 { grid-column: 7 / span 4; aspect-ratio: 3 / 4; margin-top: 20%; }
.g3 { grid-column: 11 / span 2; aspect-ratio: 2 / 3; margin-top: 60%; }
.g4 { grid-column: 2 / span 3; aspect-ratio: 3 / 4; margin-top: -10%; }
.g5 { grid-column: 5 / span 4; aspect-ratio: 1 / 1; margin-top: 10%; }
.g6 { grid-column: 9 / span 4; aspect-ratio: 4 / 5; margin-top: -8%; }
.gallery figcaption { margin-top: .7rem; color: var(--ink-soft); }

/* ---------- Témoignages ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.quote { display: grid; gap: 1.8rem; align-content: start; padding-top: 2rem; border-top: 1px solid var(--line); }
.quote blockquote { font-family: var(--serif); font-style: italic; font-size: var(--fs-card); line-height: 1.25; }
.quote cite { font-style: normal; color: var(--accent); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(2rem, 6vw, 7rem); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 1.8rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .t-card { transition: color .4s; }
.faq summary:hover .t-card { color: var(--accent); }
.faq__icon { flex: none; width: 1rem; height: 1rem; position: relative; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .5s var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq details[open] .faq__icon::after { transform: rotate(0); }
.faq__answer { padding: 0 0 2rem; }

/* ---------- Appel final ---------- */
.cta { text-align: center; display: grid; justify-items: center; gap: 2.4rem; }
.cta__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.5rem; color: var(--ink-soft); }

/* ---------- Footer (révélé sous le contenu) ---------- */
.page { position: relative; z-index: 1; background: var(--bg); }
.footer-spacer { pointer-events: none; }
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  background: var(--footer-bg, var(--night)); color: var(--footer-ink, var(--chalk));
  padding-top: clamp(4rem, 9vw, 7rem);
}
.footer.is-static { position: relative; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: clamp(3rem, 7vw, 6rem); }
.footer__cols .sub { color: var(--footer-accent, var(--almond)); margin-bottom: 1.1rem; }
.footer__cols li { margin-bottom: .35rem; }
.footer__cols a { transition: opacity .3s; }
.footer__cols a:hover { opacity: .6; }
.footer__intro { max-width: 24em; opacity: .75; }
.footer__logo { overflow: hidden; padding-bottom: 1.5vw; }
.footer__logo svg { width: 100%; height: auto; display: block; overflow: visible; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 1.5rem 2rem; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); opacity: .65; }

/* ---------- Comparateur de maquettes (temporaire) ---------- */
.switcher {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: .3rem; padding: .35rem;
  background: rgba(24, 22, 17, .82); color: var(--chalk); backdrop-filter: blur(12px);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.switcher > span { padding: 0 .8rem 0 .9rem; opacity: .6; }
.switcher a { padding: .55rem .95rem; border-radius: 999px; transition: background .3s; white-space: nowrap; }
.switcher a:hover { background: rgba(230, 223, 215, .14); }
.switcher a[aria-current="page"] { background: var(--chalk); color: var(--night); }

/* ---------- Animations : états initiaux (seulement si JS actif) ---------- */
.js [data-fade] { opacity: 0; transform: translateY(1.5rem); }
.js .mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js .mask > .w-in { display: inline-block; transform: translateY(110%); }
.js [data-split="blur"] .c { opacity: 0; filter: blur(14px); }
.js [data-reveal="img"] { clip-path: inset(100% 0 0 0); }
.w, .c { display: inline-block; }
.w { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .offers { grid-template-columns: 1fr; gap: 3.5rem; }
  .offer__media { aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: 1fr; }
  .steps__media { position: relative; top: 0; height: 60vh; display: none; }
  .step { min-height: auto; opacity: 1; }
  .step__img { display: block !important; aspect-ratio: 4 / 3; overflow: hidden; }
  .about { grid-template-columns: 1fr; }
  .about__media { margin-right: 12%; }
  .quotes { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__cols > :first-child { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .g1 { grid-column: 1 / span 4; }
  .g2 { grid-column: 5 / span 2; margin-top: 40%; }
  .g3 { display: none; }
  .g4 { grid-column: 1 / span 3; margin-top: 0; }
  .g5 { grid-column: 4 / span 3; margin-top: 30%; }
  .g6 { grid-column: 2 / span 4; margin-top: 0; }
  .hero__scroll { display: none; }
}
.step__img { display: none; }
.step__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) {
  .footer__cols { grid-template-columns: 1fr; }
  .switcher span { display: none; }
  .switcher a { padding: .55rem .7rem; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
