/* ===== Digital Goblin — direction éditoriale ===== */
:root {
  --paper: #FAF9F6;
  --ink: #242424;
  --navy: #14284B;
  --stone: #EAE6DF;
  --lime: #B6FF00;
  --muted: #6c6a66;
  --line: rgba(36, 36, 36, .16);
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --gap: clamp(14px, 2vw, 28px);
  --header-h: 76px;
  --space: clamp(72px, 11vw, 168px);
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0313rem/1.75 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.on-dark :focus-visible, .lightbox :focus-visible { outline-color: var(--lime); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--space); }
.stone { background: var(--stone); }

/* Typographie */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.1vw, 2.7rem); line-height: 1.12; }
h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.2; }
.eyebrow { font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.lead { font: 400 clamp(1.3rem, 2.1vw, 1.8rem)/1.38 var(--serif); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
em, .it { font-style: italic; }

/* Liens */
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .35s ease; font-weight: 500; }
.link::after { content: " →"; display: inline-block; transition: transform .3s; }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link:hover::after { transform: translateX(4px); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 249, 246, .94); backdrop-filter: blur(8px); transition: transform .4s ease; }
.site-header.is-hidden { transform: translateY(-100%); }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding-inline: var(--gutter); }
.brand img { height: 46px; width: auto; }
.nav ul { display: flex; gap: clamp(20px, 2.6vw, 38px); }
.nav a { position: relative; text-decoration: none; font: 500 .86rem/1 var(--sans); letter-spacing: .03em; padding-block: 8px; color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px var(--navy); }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s, top .3s; }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--paper); padding: 28px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: block; text-decoration: none; font: 400 2.1rem/1.2 var(--serif); padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu a[aria-current="page"] { font-style: italic; }
body.menu-open { overflow: hidden; }

/* Accueil : hero photographique */
.hero-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-block: clamp(28px, 4vw, 56px) clamp(22px, 3vw, 38px); flex-wrap: wrap; }
.hero-head p { color: var(--muted); font-size: 1rem; }
.hero-photo { height: clamp(360px, 80vh, 920px); overflow: hidden; background: var(--stone); }
.hero-photo picture, .hero-photo img { width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 62%; }
.caption { display: flex; gap: .8em; align-items: baseline; flex-wrap: wrap; margin-top: 14px; font-size: .85rem; color: var(--muted); }
.caption .t { font: italic 400 1.1rem/1.2 var(--serif); color: var(--ink); }

/* Photos et galeries */
.ph { display: block; overflow: hidden; background: var(--stone); }
.ph picture { display: block; }
.ph img { width: 100%; height: auto; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.work-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.work-open:hover img { transform: scale(1.025); }
.work figcaption { padding-top: 14px; display: flex; gap: .8em; align-items: baseline; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.work figcaption .t { font: italic 400 1.15rem/1.2 var(--serif); color: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: clamp(56px, 9vw, 150px); align-items: start; }
.gallery .work:nth-child(4n+1) { grid-column: 1 / 9; }
.gallery .work:nth-child(4n+2) { grid-column: 9 / 13; margin-top: clamp(40px, 12vw, 200px); }
.gallery .work:nth-child(4n+3) { grid-column: 2 / 7; }
.gallery .work:nth-child(4n+4) { grid-column: 7 / 13; align-self: end; }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: clamp(36px, 6vw, 84px); flex-wrap: wrap; }

/* Présentation */
.statement { max-width: 36em; margin-inline: auto; text-align: center; display: grid; gap: 26px; justify-items: center; }
.statement p.lead { max-width: none; }

/* Expertises */
.expertises { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px var(--gap); align-items: start; }
.expertise { border-top: 1px solid var(--ink); padding-top: 22px; display: grid; gap: 16px; justify-items: start; }
.expertise.main { grid-column: 1 / 8; }
.expertise.second { grid-column: 9 / 13; }
.expertise.main h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.expertise.second h2 { font-size: clamp(1.4rem, 2.1vw, 1.8rem); color: var(--ink); }
.expertise p { max-width: 36em; }

/* Appel à contact */
.closing { background: var(--navy); color: var(--paper); text-align: center; padding-block: clamp(80px, 12vw, 170px); }
.closing .mark { height: 52px; width: auto; margin: 0 auto 30px; opacity: .95; }
.closing h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); max-width: 18em; margin-inline: auto; }
.closing p { margin-top: 30px; }
.closing .link { color: var(--paper); font-size: 1.05rem; }

/* Pages intérieures */
.page-head { padding-block: clamp(40px, 7vw, 100px) clamp(36px, 5vw, 72px); display: grid; gap: 22px; }
.page-head .lead { color: var(--ink); }
.pull { font: italic 400 clamp(1.5rem, 2.6vw, 2.3rem)/1.25 var(--serif); max-width: 22em; }
.fullphoto { margin-inline: auto; }
.rows > div { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px var(--gap); padding-block: 26px; border-top: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows dt { grid-column: 1 / 6; font: 400 clamp(1.4rem, 2vw, 1.8rem)/1.2 var(--serif); }
.rows dd { grid-column: 6 / 13; color: var(--muted); max-width: 36em; }
.duo { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.duo .a { grid-column: 2 / 6; } .duo .b { grid-column: 6 / 13; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px var(--gap); }
.way { border-top: 1px solid var(--ink); padding-top: 18px; display: grid; gap: 12px; align-content: start; }
.way ul li { padding-block: 3px; color: var(--muted); }
.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--gap); }
.points > div { border-top: 1px solid var(--line); padding-block: 26px 30px; display: grid; gap: 8px; align-content: start; }
.points p { color: var(--muted); max-width: 30em; }
.signature { font: italic 400 1.9rem/1 var(--serif); }
.prose { display: grid; gap: 20px; max-width: 34em; }
.mail { font: 400 clamp(1.7rem, 3.6vw, 3rem)/1.15 var(--serif); text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat; padding-bottom: 6px; transition: background-size .4s; word-break: break-all; }
.mail:hover { background-size: 0 1px; background-position: 100% 100%; }
.socials { display: flex; gap: 24px; flex-wrap: wrap; }

/* Pied de page */
.site-footer { background: var(--stone); padding: clamp(44px, 6vw, 80px) var(--gutter) 28px; font-size: .9rem; }
.foot { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; }
.foot img { height: 46px; width: auto; margin-bottom: 14px; }
.foot ul li { padding-block: 3px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot h4 { margin: 0 0 12px; font: 600 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

/* Visionneuse */
.lightbox { padding: 0; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: rgba(28, 28, 28, .97); color: var(--paper); }
.lightbox::backdrop { background: rgba(28, 28, 28, .9); }
.lb { height: 100%; display: grid; grid-template-rows: 1fr auto; padding: clamp(16px, 3vw, 40px); gap: 14px; }
.lb-img { min-height: 0; display: grid; place-items: center; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; }
.lb-cap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lb-cap .t { font: italic 400 1.4rem/1.2 var(--serif); margin-right: 12px; }
.lb-cap .s { color: #bdbab3; font-size: .88rem; }
.lb-btn { background: none; color: var(--paper); border: 1px solid rgba(250, 249, 246, .5); width: 46px; height: 46px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; transition: .25s; }
.lb-btn:hover { border-color: var(--lime); color: var(--lime); }
.lb-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.lb-nav { display: flex; gap: 10px; }

/* Apparitions douces */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .fade-in { opacity: 0; transition: opacity 1.2s ease; }
.js .fade-in.is-in { opacity: 1; }

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .nav { display: none; }
  .burger { display: block; }
  .brand img { height: 36px; }
  .hero-head { flex-direction: column; align-items: start; gap: 10px; }
  .hero-photo { height: auto; aspect-ratio: 1 / 1; }
  .hero-photo img { object-position: 48% 60%; }
  .gallery { grid-template-columns: 1fr; row-gap: 56px; }
  .gallery .work:nth-child(n) { grid-column: 1; margin-top: 0; align-self: start; }
  .gallery .work:nth-child(4n+2) { width: 80%; margin-left: auto; }
  .gallery .work:nth-child(4n+3) { width: 88%; }
  .expertises { grid-template-columns: 1fr; }
  .expertise.main, .expertise.second { grid-column: 1; }
  .rows dt, .rows dd { grid-column: 1 / -1; }
  .duo { grid-template-columns: 1fr; }
  .duo .a, .duo .b { grid-column: 1; }
  .duo .a { width: 70%; }
  .ways, .points { grid-template-columns: 1fr; }
  .foot { flex-direction: column; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal, .js .fade-in { opacity: 1; transform: none; }
}
