/* Yves de Fierlant — feuille de style unique */

:root {
  --bg: #f5f2ec;
  --surface: #ebe5d9;
  --ink: #1f1d1a;
  --muted: #645d53;
  --line: #d8cfbf;
  --accent: #8a4527;
  --accent-ink: #fff;

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 2px;
  --shadow: 0 1px 2px rgb(31 29 26 / .06), 0 8px 24px -12px rgb(31 29 26 / .25);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1.1em; max-width: 65ch; text-wrap: pretty; }

.skip {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem;
}
.skip:focus { left: .5rem; }

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

.eyebrow {
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.lead { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(245 242 236 / .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.5rem;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand-name { font: 400 1.5rem/1.1 var(--serif); letter-spacing: .01em; }
.brand-role { font: 600 .65rem/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.brand:hover { color: var(--ink); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-size: .95rem; color: var(--muted);
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  min-width: 44px; min-height: 44px; padding: 0 .75rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  font: 500 .9rem var(--sans); color: var(--ink); cursor: pointer;
}

@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .js .nav {
    position: absolute; inset: 100% 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .js .nav.open { display: block; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav a { width: 100%; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .js .nav a[aria-current="page"] { color: var(--accent); }
  html:not(.js) .site-header .wrap { flex-direction: column; align-items: flex-start; padding-block: .75rem; }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  font: 500 .95rem/1 var(--sans); letter-spacing: .02em;
  text-decoration: none; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section-alt { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; }

.page-head { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { margin-bottom: .4em; }
.page-head .lead { max-width: 40ch; }

/* ---------- Accueil ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.hero figure { margin: 0; }
.hero img { width: 100%; box-shadow: var(--shadow); }
@media (max-width: 52rem) { .hero .wrap { grid-template-columns: 1fr; } }

.works-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.75rem, 2vw, 1.5rem); }
.works-strip a { display: block; overflow: hidden; background: var(--surface); }
.works-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.works-strip a:hover img { transform: scale(1.03); }
@media (max-width: 40rem) { .works-strip { grid-template-columns: repeat(2, 1fr); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split figure { margin: 0; }
.split img { width: 100%; box-shadow: var(--shadow); }
@media (max-width: 52rem) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.card { display: flex; flex-direction: column; text-decoration: none; background: var(--bg); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .975rem; margin-bottom: 1rem; }
.card .link-arrow { margin-top: auto; align-self: flex-start; }
.card:hover { color: var(--ink); }
.card:hover h3 { color: var(--accent); }
@media (max-width: 52rem) { .cards { grid-template-columns: 1fr; } }

.quote { text-align: center; padding-block: clamp(4rem, 10vw, 7rem); }
.quote blockquote { margin: 0 auto; max-width: 30ch; font: italic 400 clamp(1.6rem, 3.6vw, 2.5rem)/1.3 var(--serif); text-wrap: balance; }
.quote blockquote p { max-width: none; margin: 0; }
.quote figcaption { margin-top: 1.25rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.cta { background: var(--ink); color: var(--bg); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta h2 { margin: 0; color: var(--bg); }
.cta p { margin: .5rem 0 0; color: rgb(245 242 236 / .75); }
.cta .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Contenu éditorial ---------- */

.prose > * + h2 { margin-top: 2.5em; }
.prose > .eyebrow + h2 { margin-top: 0; }
.prose figure { margin: 2.5rem 0; }
.prose figure img { width: 100%; box-shadow: var(--shadow); }
.prose figcaption, .caption { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
.prose ul { padding-left: 1.2em; }

.figure-wide { margin-top: 0; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.figure-wide img { width: 100%; max-height: 80vh; object-fit: cover; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin: 0 0 3rem; padding: 0; list-style: none;
}
.facts li { background: var(--bg); padding: 1.25rem 1.4rem; }
.facts strong { display: block; font: 400 1.5rem/1.2 var(--serif); margin-bottom: .25rem; }
.facts span { color: var(--muted); font-size: .95rem; }

.formulas { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); margin: 2.5rem 0 0; padding: 0; list-style: none; }
.formulas li { border-top: 2px solid var(--accent); padding-top: 1.25rem; }
.formulas p { color: var(--muted); font-size: .975rem; }
@media (max-width: 52rem) { .formulas { grid-template-columns: 1fr; } }

.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.5rem, 1.5vw, 1rem); }
.photo-row img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 40rem) { .photo-row { grid-template-columns: 1fr 1fr; } .photo-row > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- Galerie ---------- */

.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .95rem;
}
.jump a:hover { border-color: var(--ink); color: var(--ink); }

.gallery-section { padding-top: clamp(3rem, 7vw, 5rem); scroll-margin-top: 4.5rem; }
.gallery-section h2 { display: flex; align-items: baseline; gap: .75rem; }
.gallery-section h2 small { font: 400 .85rem var(--sans); color: var(--muted); }

.masonry { columns: 3 18rem; column-gap: clamp(.75rem, 2vw, 1.5rem); }
.masonry a { display: block; break-inside: avoid; margin-bottom: clamp(.75rem, 2vw, 1.5rem); background: var(--surface); }
.stack a { display: block; margin-bottom: clamp(.75rem, 2vw, 1.5rem); }
.work img { width: 100%; transition: opacity .2s; }
.work:hover img { opacity: .9; }
.work { cursor: zoom-in; }

/* ---------- Visionneuse ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(18 17 15 / .96); color: #f5f2ec;
}
.lightbox::backdrop { background: rgb(18 17 15 / .96); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 0 4.5rem; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; font-size: .875rem; color: rgb(245 242 236 / .7); }
.lb-btn {
  min-width: 48px; min-height: 48px; display: inline-grid; place-items: center;
  background: none; border: 0; color: inherit; cursor: pointer; border-radius: 50%;
  font: 300 1.75rem/1 var(--sans);
}
.lb-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }
.lb-caption { max-width: none; margin: 0; text-align: center; padding: .75rem 1rem 1.25rem; font-size: .9rem; color: rgb(245 242 236 / .75); }
@media (max-width: 40rem) {
  .lb-stage { padding: 0 .5rem; }
  .lb-prev, .lb-next { top: auto; bottom: .5rem; transform: none; }
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }

.address { font-style: normal; line-height: 1.8; }
.address .name { font: 400 1.5rem/1.3 var(--serif); display: block; margin-bottom: .5rem; }
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a { display: flex; justify-content: space-between; gap: 1rem; min-height: 52px; align-items: center; text-decoration: none; }
.contact-list span { color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }

.form { display: grid; gap: 1.1rem; background: var(--surface); padding: clamp(1.25rem, 4vw, 2.5rem); }
.form label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 500; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  font: 400 1rem/1.5 var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form textarea { min-height: 9rem; resize: vertical; }
.form .note { font-size: .85rem; color: var(--muted); margin: 0; }

/* ---------- Pied de page ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font: 600 .72rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .2rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand .brand-name { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.linkish:hover { text-decoration: underline; }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Bandeau cookies ---------- */

.consent {
  position: fixed; z-index: 90; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 34rem; margin-left: auto;
  background: var(--ink); color: var(--bg);
  padding: 1.1rem 1.25rem; border-radius: 4px; box-shadow: 0 12px 40px rgb(0 0 0 / .3);
  font-size: .925rem; line-height: 1.5;
}
.consent p { margin: 0 0 .9rem; }
.consent a { color: inherit; }
.consent-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.consent button {
  min-height: 44px; padding: 0 1.1rem; border-radius: var(--radius); cursor: pointer;
  font: 500 .9rem var(--sans); border: 1px solid rgb(245 242 236 / .4); background: transparent; color: var(--bg);
}
.consent button[data-consent="granted"] { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------- Apparition douce ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
