:root {
  --cream: #F7F1E8;
  --paper: #FFFCF7;
  --ivory: #FBF7F1;
  --linen: #F2EADF;
  --oat: #EFE5D6;
  --sand: #E3D3BE;
  --sand-2: #D9C7AF;
  --brown: #3B2A22;
  --brown-2: #6E5A4B;
  --taupe: #8A7462;
  --taupe-2: #A08B78;
  --rose: #A9786C;
  --blush: #E3C7B8;
  --serif: 'Instrument Serif', serif;
  --sans: 'DM Sans', sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--brown); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brown); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rose); }
button { font-family: var(--sans); }
img { max-width: 100%; }

.kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.kicker.accent { color: var(--rose); }
.kicker.sand { color: var(--sand-2); }

/* Top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px var(--gutter); border-bottom: 1px solid var(--sand); font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.lang { display: flex; gap: 4px; }
.lang button { border: none; background: transparent; color: var(--brown); cursor: pointer; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; }
.lang button.on { background: var(--brown); color: var(--cream); }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--gutter); }
.logo { height: clamp(42px, 4.5vw, 56px); width: auto; display: block; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 28px); align-items: center; font-size: 13.5px; font-weight: 500; }
.nav-links { display: flex; gap: 28px; }

.pill { display: inline-block; padding: 13px 24px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.nav .pill { padding: 10px 18px; font-size: 13.5px; }
.pill-dark { background: var(--brown); color: var(--cream); }
.pill-dark:hover { background: var(--rose); color: var(--cream); }
.pill-outline { border: 1px solid var(--brown); }
.pill-light { background: var(--cream); color: var(--brown); }
.pill-light:hover { background: var(--blush); color: var(--brown); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 72px) var(--gutter) clamp(48px, 6vw, 88px); }
.hero-text { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 34px); container-type: inline-size; }
.display { margin: 0; font-family: var(--serif); font-weight: 400; }
.hero h1 { font-size: clamp(56px, 18cqw, 128px); line-height: .88; letter-spacing: -.03em; }
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
@media (min-width: 721px) {
  .hero h1 span { white-space: nowrap; }
}
.hero h1 em, .footer-title em { font-style: italic; }
.hero h1 em { color: var(--rose); }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-collage { position: relative; min-height: clamp(380px, 40vw, 520px); padding: clamp(24px, 3vw, 40px); }
.polaroid { background: var(--paper); }
.polaroid-main { position: relative; margin-left: auto; width: min(74%, 380px); padding: 14px 14px 48px; box-shadow: 0 18px 40px rgba(59,42,34,.14); transform: rotate(2deg); }
.polaroid-small { position: absolute; left: clamp(16px, 3vw, 40px); bottom: clamp(20px, 3vw, 36px); width: min(40%, 210px); padding: 10px 10px 30px; box-shadow: 0 14px 30px rgba(59,42,34,.16); transform: rotate(-5deg); }
.caption { position: absolute; right: 16px; bottom: 14px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--brown); }
.stamp { position: absolute; left: -26px; top: -18px; width: 92px; height: 92px; border-radius: 50%; border: 1.5px dashed var(--rose); background: var(--cream); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; transform: rotate(-14deg); font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); line-height: 1.4; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-1 { aspect-ratio: 1; }

/* Media slots */
.slot { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--oat); }
.slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; border: 1.5px dashed rgba(59,42,34,.22); color: var(--brown-2); font-size: 12px; line-height: 1.4; background: repeating-linear-gradient(135deg, var(--oat) 0 12px, #EAE0D0 12px 24px); }

/* About + gear */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.about-text { background: var(--sand); padding: clamp(32px, 4.5vw, 64px) var(--gutter); display: flex; flex-direction: column; gap: 18px; }
.about-title { margin: 0; font-family: var(--serif); font-size: clamp(28px, 2.9vw, 40px); line-height: 1.1; text-wrap: pretty; }
.about-body { margin: 0; font-size: 15px; line-height: 1.65; max-width: 520px; }
.gear { background: var(--ivory); padding: clamp(32px, 4.5vw, 64px) var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.gear-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gear-sub { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--rose); }
.gear-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 0; border-top: 1px solid var(--sand); }
.gear-row .k { font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe); }
.gear-row .v { font-family: var(--serif); font-size: 25px; text-align: right; }

/* Portfolio */
.parts { background: var(--linen); padding: clamp(44px, 6vw, 88px) var(--gutter); display: flex; flex-direction: column; gap: clamp(48px, 6vw, 84px); scroll-margin-top: 0; }
.parts-head { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.tabs { display: flex; gap: clamp(20px, 4vw, 48px); }
.tabs button { border: none; background: transparent; cursor: pointer; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .22em; padding: 6px 2px; color: var(--taupe-2); border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.tabs button.on { color: var(--brown); border-bottom-color: var(--brown); }
.part-title { margin: 0; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(64px, 10vw, 150px); line-height: .9; letter-spacing: -.02em; }
.part-tags { font-size: 10.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--taupe); }

.block { display: flex; flex-direction: column; gap: 22px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--sand-2); padding-bottom: 14px; }
.block-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.2vw, 44px); }
.hint { font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe); }

.photo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 16px; grid-auto-flow: dense; gap: 12px; }
.photo { position: relative; border-radius: 16px; overflow: hidden; }
.photo .slot { border-radius: 16px; }
.photo.filled { cursor: zoom-in; }
.photo.filled img { transition: transform .5s ease; }
.photo.filled:hover img { transform: scale(1.03); }
.enlarge { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--paper); color: var(--brown); font-size: 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(59,42,34,.12); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 44%), 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.video { display: flex; flex-direction: column; gap: 14px; }
.phone { position: relative; aspect-ratio: 9 / 19.5; background: #2A1E18; border-radius: clamp(26px, 3vw, 38px); padding: 7px; box-shadow: 0 0 0 1.5px #5A463B, 0 20px 36px rgba(59,42,34,.18); }
.screen { position: relative; width: 100%; height: 100%; border-radius: clamp(20px, 2.5vw, 31px); overflow: hidden; background: var(--sand); }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.screen .slot.empty { border: none; }
.notch { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 34%; height: 20px; border-radius: 999px; background: #120C09; pointer-events: none; z-index: 2; }
.dur { position: absolute; left: 12px; bottom: 14px; padding: 3px 9px; border-radius: 999px; background: rgba(255,252,247,.92); font-size: 11px; font-weight: 600; pointer-events: none; z-index: 2; }
.screen.playing .dur { display: none; }
.video-title { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.video-sub { font-size: 12.5px; color: var(--taupe); }

.wip { margin: 0; padding: 40px 20px; text-align: center; border: 1.5px dashed rgba(59,42,34,.22); border-radius: 16px; color: var(--taupe); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.cases { display: flex; flex-direction: column; gap: 20px; }
.case { background: var(--ivory); border-radius: 22px; padding: clamp(24px, 3.6vw, 52px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(28px, 4vw, 56px); }
.case-main { display: flex; flex-direction: column; gap: 22px; }
.case-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.badge { border: 1px solid var(--brown); border-radius: 999px; padding: 5px 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.place { font-size: 12.5px; color: var(--taupe); }
.case h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 64px); line-height: .95; letter-spacing: -.02em; }
.case h3 em { color: var(--rose); }
.case-dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px 18px; font-size: 15px; line-height: 1.55; margin: 0; }
.case-dl dt { font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--rose); padding-top: 4px; }
.case-dl dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--oat); border-radius: 14px; padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.stat .n { font-family: var(--serif); font-size: clamp(30px, 3.2vw, 44px); line-height: 1; }
.stat .l { font-size: 12px; color: var(--brown-2); }
.case-side { display: flex; flex-direction: column; gap: 18px; }
.testimonial { flex: 1; min-height: clamp(260px, 24vw, 340px); border-radius: 14px; overflow: hidden; }
.testimonial .slot.empty { border-radius: 14px; }

/* Footer */
.footer { background: var(--brown); color: var(--cream); padding: clamp(48px, 6vw, 96px) var(--gutter) 28px; display: flex; flex-direction: column; gap: clamp(44px, 5vw, 72px); }
.footer a { color: var(--cream); }
.footer a:hover { color: var(--blush); }
.footer .pill-light { color: var(--brown); }
.footer .pill-light:hover { color: var(--brown); }
.footer-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: clamp(36px, 4vw, 56px); align-items: center; }
.footer-text { display: flex; flex-direction: column; gap: 24px; }
.footer-title { font-size: clamp(64px, 10vw, 150px); line-height: .85; letter-spacing: -.035em; }
.footer-title em { color: var(--blush); }
.footer-body { margin: 0; max-width: 480px; font-size: 16px; line-height: 1.6; color: #E6DACB; }
.footer-collage { position: relative; min-height: clamp(340px, 34vw, 460px); padding: clamp(24px, 3vw, 36px); }
.polaroid-cta { position: relative; margin: 0 auto; width: min(68%, 320px); padding: 12px 12px 42px; box-shadow: 0 18px 40px rgba(0,0,0,.25); transform: rotate(-2deg); }
.polaroid-cta .caption { right: 14px; bottom: 12px; font-size: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; align-items: flex-end; border-top: 1px solid rgba(247,241,232,.22); padding-top: 28px; }
.logo-footer { height: 46px; width: auto; }
.contacts { display: flex; flex-wrap: wrap; gap: 24px clamp(28px, 4vw, 56px); }
.contacts a { display: flex; flex-direction: column; gap: 6px; }
.contact-val { font-family: var(--serif); font-size: 24px; }
.rights { text-align: center; font-size: 11px; letter-spacing: .08em; color: #BFAE9C; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(59,42,34,.95); display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--cream); }
.lightbox-label { font-family: var(--serif); font-style: italic; font-size: 26px; }
.lightbox-close { border: 1px solid var(--cream); border-radius: 999px; background: transparent; color: var(--cream); padding: 8px 16px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.lightbox-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Mobile (mirrors the design's "mobile" variant) */
@media (max-width: 720px) {
  .desktop-only { display: none !important; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1px; row-gap: 0; }
  /* hauteur ≈ 17px par unité desktop (--k), + 12px de marge entre photos */
  .photo { grid-column: auto !important; grid-row: span calc(var(--k) * 17 + 12) !important; margin-bottom: 12px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .case-dl { grid-template-columns: auto minmax(0, 1fr); }
}
