/* ---------- Polices (auto-hébergées) ---------- */
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(/fonts/inter-tight.woff2) format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f3f1ec;
  --bg-2: #e9e6df;
  --ink: #161513;
  --ink-2: #5d5a53;
  --line: #d6d2c8;
  --dark: #121110;
  --on-dark: #eeebe4;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: italic; font-family: var(--serif); }
::selection { background: var(--ink); color: var(--bg); }

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

.eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 1.5rem;
}
.eyebrow--light { color: rgba(238, 235, 228, .75); }

.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem); line-height: 1; letter-spacing: -.01em;
  margin: 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  color: var(--on-dark);
  transition: background .4s var(--ease), color .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(243, 241, 236, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  color: var(--ink); padding-block: 14px;
  border-color: var(--line);
}
.nav__brand { font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.nav__links { display: flex; gap: clamp(14px, 2.5vw, 36px); font-size: 14px; }
.nav__links a { position: relative; opacity: .85; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 560px; overflow: hidden;
  color: var(--on-dark); background: var(--dark);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08); animation: heroIn 2.4s var(--ease) forwards;
}
@keyframes heroIn { to { transform: scale(1); } }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
.hero__content {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 9vh, 110px);
  max-width: var(--max);
}
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3rem, 9vw, 8.5rem); line-height: .92; letter-spacing: -.02em;
  margin: 0;
  opacity: 0; transform: translateY(24px); animation: fadeUp 1.2s .4s var(--ease) forwards;
}
.hero .eyebrow { opacity: 0; animation: fadeUp 1s .2s var(--ease) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 110px);
  width: 1px; height: 64px; background: rgba(238,235,228,.3); overflow: hidden;
}
.hero__scroll span {
  position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--on-dark);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 100%; } }

/* ---------- Intro ---------- */
.intro { padding-block: clamp(96px, 16vh, 180px) clamp(64px, 10vh, 120px); }
.intro__text {
  font-family: var(--serif); font-size: clamp(1.9rem, 3.8vw, 3.3rem); line-height: 1.12;
  letter-spacing: -.01em; margin: 0; max-width: 1100px;
}
.intro__text em { color: var(--ink-2); }
.intro__meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: clamp(56px, 8vh, 96px); padding-top: 28px; border-top: 1px solid var(--line);
}
.intro__meta div { display: flex; flex-direction: column; gap: 4px; }
.num { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.lbl { font-size: 14px; color: var(--ink-2); }

/* ---------- Travaux ---------- */
.work { padding-bottom: clamp(96px, 14vh, 160px); }
.section-head {
  display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  margin-bottom: clamp(32px, 5vh, 56px);
}
.section-head__sub { color: var(--ink-2); max-width: 38ch; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font-size: 14px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  transition: all .25s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink-2); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid { columns: 3; column-gap: clamp(12px, 1.6vw, 24px); }
.tile {
  break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 24px);
  position: relative; overflow: hidden; cursor: zoom-in; background: var(--bg-2);
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.tile.is-in { opacity: 1; transform: none; }
.tile.is-hidden { display: none; }
.tile img {
  width: 100%; height: auto;
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
}
.tile:hover img { transform: scale(1.035); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px;
  display: flex; justify-content: space-between; align-items: end; gap: 12px;
  color: #fff; font-size: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
  opacity: 0; transform: translateY(8px); transition: all .45s var(--ease);
}
.tile figcaption b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.tile figcaption span { opacity: .8; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; transform: none; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Citation ---------- */
.quote {
  position: relative; height: clamp(420px, 80vh, 820px); overflow: hidden;
  display: grid; place-items: center; background: var(--dark); color: var(--on-dark);
}
.quote img {
  position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover;
  opacity: .6; will-change: transform;
}
.quote__text {
  position: relative; margin: 0; padding-inline: var(--gutter); max-width: 1000px; text-align: center;
  font-family: var(--serif); font-size: clamp(1.8rem, 4.2vw, 3.6rem); line-height: 1.1;
}
.quote__text cite {
  display: block; margin-top: 28px; font-family: var(--sans); font-style: normal;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .75;
}

/* ---------- À propos ---------- */
.about {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 120px); align-items: center;
  padding-block: clamp(96px, 16vh, 180px);
}
.about__img { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.about__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about__text .h2 { margin-bottom: 2rem; }
.about__text p:not(.eyebrow) { color: var(--ink-2); max-width: 54ch; }
.about__list { list-style: none; padding: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.about__list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.about__list span { color: var(--ink-2); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }

/* ---------- Prestations ---------- */
.services { padding-bottom: clamp(96px, 16vh, 180px); }
.services__list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.service {
  padding: 32px clamp(20px, 2.5vw, 40px) 40px 0;
  display: flex; flex-direction: column;
}
.service + .service { padding-left: clamp(20px, 2.5vw, 40px); border-left: 1px solid var(--line); }
.service__idx { font-size: 13px; color: var(--ink-2); letter-spacing: .1em; }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1.05; margin: 40px 0 16px; }
.service p { color: var(--ink-2); margin: 0 0 20px; }
.service ul { list-style: none; padding: 0; margin: 0 0 32px; font-size: 15px; }
.service li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.service li::before { content: "—"; color: var(--ink-2); margin-right: 10px; }
.service__price { margin-top: auto !important; color: var(--ink) !important; font-family: var(--serif); font-size: 1.5rem; }

/* ---------- Contact ---------- */
.contact { background: var(--dark); color: var(--on-dark); padding-block: clamp(96px, 18vh, 200px); }
.contact__title {
  font-family: var(--serif); font-weight: 400; margin: 0 0 clamp(40px, 6vh, 72px);
  font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: .95; letter-spacing: -.02em;
}
.contact__title em { color: rgba(238,235,228,.6); }
.contact__mail {
  display: inline-block; font-size: clamp(1.3rem, 3vw, 2.2rem);
  border-bottom: 1px solid rgba(238,235,228,.35); padding-bottom: 6px;
  transition: border-color .3s;
  word-break: break-all;
}
.contact__mail:hover { border-color: var(--on-dark); }
.contact__mail span { display: inline-block; transition: transform .3s var(--ease); }
.contact__mail:hover span { transform: translate(4px, -4px); }
.contact__row {
  display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 56px;
  font-size: 14px; color: rgba(238,235,228,.65);
}
.contact__row a:hover { color: var(--on-dark); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px;
  padding-block: 28px; font-size: 13px; color: var(--ink-2);
}
.footer a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 13, 12, .97);
  display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
  color: var(--on-dark);
  opacity: 0; transition: opacity .35s var(--ease);
}
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
.lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.lb__fig img {
  max-width: 100%; max-height: calc(100svh - 140px); width: auto; height: auto; object-fit: contain;
  transition: opacity .3s var(--ease);
}
.lb__fig img.is-loading { opacity: .2; }
.lb__fig figcaption { display: flex; gap: 24px; font-size: 13px; letter-spacing: .06em; opacity: .75; }
.lb__fig figcaption #lb-cap { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0; }
.lb__nav { font-size: 28px; height: 100%; opacity: .6; transition: opacity .2s; }
.lb__nav:hover { opacity: 1; }
.lb__close {
  position: absolute; top: 18px; right: var(--gutter);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; padding: 8px 0;
}
.lb__close:hover { opacity: 1; }

/* ---------- Apparition au scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { columns: 2; }
  .services__list { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0 36px; border-left: 0; border-bottom: 1px solid var(--line); }
  .service h3 { margin-top: 16px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__cta { border: 1px solid currentColor; border-radius: 999px; padding: 6px 14px; }
  .nav__cta::after { display: none; }
  .intro__meta { grid-template-columns: 1fr; gap: 20px; }
  .intro__meta div { flex-direction: row; align-items: baseline; gap: 14px; }
  .about { grid-template-columns: 1fr; }
  .about__list li { grid-template-columns: 1fr; gap: 2px; }
  .lb { grid-template-columns: 1fr; }
  .lb__nav { position: absolute; bottom: 12px; height: 56px; width: 56px; }
  .lb__prev { left: 12px; } .lb__next { right: 12px; }
  .lb__fig { padding-inline: 8px; }
  .tile figcaption { opacity: 1; transform: none; padding: 32px 12px 10px; }
  .tile figcaption b { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .grid { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .tile, .hero__title, .hero .eyebrow { opacity: 1; transform: none; }
}
