/* ============================================================
   MB Concept Design — design system
   Palette : ivoire / encre chaude / brique (logo)
   Typo : Cormorant Garamond (display) + Jost (UI/texte)
   ============================================================ */

:root {
  --paper: #f6f3ed;
  --paper-deep: #efeade;
  --card: #fffdf9;
  --ink: #1b1712;
  --ink-soft: #40382e;
  --muted: #7c7365;
  --line: #ddd5c6;
  --accent: #9e2b25;
  --accent-dark: #77201b;
  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --header-h: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }

.container { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 130px) 0; }

/* ---- petites capitales utilitaires ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); font-weight: 400;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--accent); }

.section-title { font-size: clamp(34px, 4.6vw, 58px); margin: 14px 0 18px; }
.section-lead { max-width: 640px; color: var(--muted); font-size: 18px; }

/* ============================ HEADER ============================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.site-header.scrolled, .site-header.solid {
  background: rgba(246, 243, 237, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 44px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.brand-name span { font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a:not(.btn) {
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 400;
  padding: 6px 0; position: relative; color: var(--ink-soft);
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.main-nav a:not(.btn):hover::after,
.main-nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); transform-origin: left; }
.main-nav a[aria-current="page"]:not(.btn) { color: var(--ink); }

/* header sur hero sombre */
.header-on-dark:not(.scrolled) { --hcolor: #f4efe6; }
.header-on-dark:not(.scrolled) .main-nav a:not(.btn) { color: var(--hcolor); }
.header-on-dark:not(.scrolled) .brand-name b { color: var(--hcolor); }
.header-on-dark:not(.scrolled) .brand-name span { color: rgba(244, 239, 230, .75); }
.header-on-dark:not(.scrolled) .burger span { background: var(--hcolor); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff !important;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 400;
  padding: 13px 26px; border: 1px solid var(--accent);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper) !important; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 10px; z-index: 70; }
.burger span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 6px 0; transition: .3s var(--ease); }
body.menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
body.menu-open .burger span { background: var(--paper) !important; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 65; background: var(--ink);
  display: flex; flex-direction: column; justify-content: center; padding: 0 9vw;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif); font-size: clamp(30px, 7vw, 44px); color: var(--paper);
  padding: 10px 0; border-bottom: 1px solid rgba(246, 243, 237, .12);
  opacity: 0; transform: translateY(18px); transition: .5s var(--ease);
}
body.menu-open .mobile-menu a { opacity: 1; transform: none; }
.mobile-menu a:hover { color: #d8b9a2; padding-left: 10px; }
.mobile-menu .mm-foot { margin-top: 34px; color: rgba(246,243,237,.55); font-size: 13px; letter-spacing: .1em; }

/* ============================ HERO ============================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #f6f2ea; overflow: hidden; background: var(--ink);
}
.hero-slides, .hero-slides .slide { position: absolute; inset: 0; }
.hero-slides .slide {
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.6s ease;
}
.hero-slides .slide.active { opacity: 1; animation: kenburns 7s linear forwards; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.11); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 12, 8, .82) 0%, rgba(15, 12, 8, .28) 45%, rgba(15, 12, 8, .38) 100%);
}
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(56px, 9vh, 110px); }
.hero .eyebrow { color: #d8b9a2; }
.hero .eyebrow::before { background: #d8b9a2; }
.hero h1 {
  font-size: clamp(46px, 7.4vw, 96px); font-weight: 500; margin: 18px 0 26px;
  max-width: 13ch;
}
.hero h1 em { font-style: italic; color: #e4c7ae; }
.hero-metiers { display: flex; flex-wrap: wrap; gap: 8px 0; max-width: 760px; }
.hero-metiers span {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 300;
  color: rgba(246, 242, 234, .9);
}
.hero-metiers span:not(:last-child)::after { content: "·"; margin: 0 16px; color: #d8b9a2; }
.hero-dots { position: absolute; z-index: 3; right: 40px; bottom: 46px; display: flex; gap: 10px; }
.hero-dots button {
  width: 34px; height: 2px; border: 0; cursor: pointer;
  background: rgba(246, 242, 234, .35); transition: background .3s;
}
.hero-dots button.active { background: #f6f2ea; }
.scroll-hint {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 1px; height: 54px; overflow: hidden;
}
.scroll-hint::before {
  content: ""; position: absolute; inset: 0; background: rgba(246, 242, 234, .8);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { 0% { transform: translateY(-100%); } 60% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* hero de page intérieure */
.page-hero { padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(40px, 6vw, 76px); margin-top: 14px; max-width: 18ch; }
.page-hero .section-lead { margin-top: 18px; }

/* ============================ ACCUEIL ============================ */
.statement { background: var(--paper-deep); border-block: 1px solid var(--line); }
.statement blockquote {
  font-family: var(--serif); font-size: clamp(24px, 3.2vw, 40px); line-height: 1.35;
  max-width: 21em; font-weight: 500;
}
.statement blockquote em { color: var(--accent); font-style: italic; }
.statement figcaption { margin-top: 26px; color: var(--muted); font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }

.domains-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; margin-top: 56px;
}
.domain-card { position: relative; overflow: hidden; grid-column: span 3; background: var(--ink); min-height: 380px; display: flex; }
.domain-card:nth-child(8n+1), .domain-card:nth-child(8n+6) { grid-column: span 6; }
.domain-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .92; transition: transform 1.1s var(--ease), opacity .6s;
}
.domain-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 12, 8, .88), rgba(15, 12, 8, .05) 55%);
  transition: background .4s;
}
.domain-card:hover img { transform: scale(1.06); }
.domain-card .dc-body {
  position: relative; z-index: 2; align-self: flex-end; padding: 26px; color: #f6f2ea; width: 100%;
}
.domain-card .dc-num { font-size: 12px; letter-spacing: .3em; color: #d8b9a2; }
.domain-card h3 { font-size: clamp(22px, 2vw, 30px); margin: 8px 0 6px; }
.domain-card p {
  font-size: 14px; color: rgba(246, 242, 234, .82); max-width: 40ch;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .5s;
}
.domain-card:hover p, .domain-card:focus-visible p { max-height: 120px; opacity: 1; }
.domain-card .dc-cta {
  margin-top: 12px; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: #d8b9a2;
  display: inline-flex; gap: 8px; align-items: center;
}
.domain-card .dc-cta::after { content: "→"; transition: transform .3s var(--ease); }
.domain-card:hover .dc-cta::after { transform: translateX(6px); }

.home-cta { background: var(--ink); color: #f2ede3; text-align: center; }
.home-cta h2 { font-size: clamp(32px, 4.6vw, 56px); max-width: 22ch; margin: 16px auto 30px; }
.home-cta .eyebrow { color: #d8b9a2; justify-content: center; }
.home-cta .eyebrow::before { background: #d8b9a2; }

/* ============================ RÉALISATIONS ============================ */
.filter-bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 243, 237, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
.filter-bar .rail {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 14px 0;
}
.filter-bar .rail::-webkit-scrollbar { display: none; }
.filter-bar a {
  flex: 0 0 auto; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 18px; border: 1px solid transparent; border-radius: 999px; color: var(--ink-soft);
  transition: .3s var(--ease); white-space: nowrap;
}
.filter-bar a:hover { border-color: var(--line); background: var(--card); }
.filter-bar a.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.work-section { padding: clamp(60px, 8vw, 100px) 0; scroll-margin-top: 120px; }
.work-section + .work-section { border-top: 1px solid var(--line); }
.work-grid { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.work-text { position: sticky; top: 130px; }
.work-num { font-family: var(--serif); font-size: 60px; color: var(--line); font-weight: 500; line-height: 1; }
.work-text h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 10px 0 8px; }
.work-text .tagline { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--accent); margin-bottom: 18px; }
.work-text .desc { color: var(--ink-soft); font-size: 15.5px; }
.work-text .desc p + p { margin-top: 12px; }
.work-count { margin-top: 22px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.masonry { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 14px; }
.masonry a { position: relative; overflow: hidden; display: block; background: var(--paper-deep); cursor: zoom-in; }
.masonry a:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; }
.masonry a:nth-child(6n+4) { grid-row: span 2; }
.masonry img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .5s;
}
.masonry a:hover img { transform: scale(1.05); }
.masonry a::after {
  content: "⤢"; position: absolute; right: 12px; bottom: 10px; color: #fff; font-size: 18px;
  opacity: 0; transition: opacity .35s; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.masonry a:hover::after { opacity: 1; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(14, 11, 8, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(92vw, 1500px); max-height: 84vh; object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lb-caption {
  position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; color: #cfc7ba;
  font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid rgba(246, 242, 234, .28); color: #f6f2ea;
  width: 54px; height: 54px; border-radius: 50%; font-size: 20px; cursor: pointer;
  transition: .3s; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(246, 242, 234, .12); }
.lb-prev { left: 26px; } .lb-next { right: 26px; }
.lb-close { position: absolute; top: 22px; right: 26px; transform: none; }
@media (max-width: 700px) {
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-btn { width: 42px; height: 42px; }
}

/* ============================ MISSIONS ============================ */
.missions-wrap { display: grid; gap: 22px; margin-top: 50px; }
.mission-card {
  display: grid; grid-template-columns: 130px 1fr; gap: 26px;
  background: var(--card); border: 1px solid var(--line); padding: clamp(26px, 4vw, 48px);
}
.mission-card .m-num { font-family: var(--serif); font-size: 58px; color: var(--accent); line-height: 1; }
.mission-card h2 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 12px; }
.mission-card p { color: var(--ink-soft); max-width: 62ch; }
.mission-card ul { list-style: none; margin-top: 14px; }
.mission-card li {
  padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); position: relative;
  color: var(--ink-soft); font-size: 15.5px;
}
.mission-card li:last-child { border-bottom: 0; }
.mission-card li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* ============================ DOMAINES (liste) ============================ */
.dom-list { columns: 2; column-gap: 60px; margin-top: 50px; }
.dom-list li {
  break-inside: avoid; list-style: none; display: flex; gap: 18px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px;
}
.dom-list li span { font-family: var(--serif); color: var(--accent); font-size: 15px; min-width: 30px; }
@media (max-width: 800px) { .dom-list { columns: 1; } }

/* ============================ LIENS ============================ */
.links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.link-card {
  background: var(--card); border: 1px solid var(--line); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 16px; min-height: 240px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.link-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(27, 23, 18, .09); }
.link-card .lk-arrow { font-size: 22px; color: var(--accent); margin-top: auto; transition: transform .3s var(--ease); }
.link-card:hover .lk-arrow { transform: translate(4px, -4px); }
.link-card h3 { font-size: 24px; }
.link-card p { color: var(--muted); font-size: 15px; }
.link-card .lk-url { font-size: 12px; letter-spacing: .08em; color: var(--accent); word-break: break-all; }

/* ============================ RÉFÉRENCES ============================ */
.refs .prose h4 {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 500;
  margin: 70px 0 26px; padding-top: 46px; border-top: 1px solid var(--ink);
  color: var(--ink); line-height: 1.3;
}
.refs .prose h4:first-child { margin-top: 30px; }
.refs .prose h4 strong { font-weight: 500; }
.refs .prose h6 {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--accent); margin: 26px 0 6px;
}
.refs .prose h6 strong { font-weight: 500; }
.refs .prose > div { color: var(--ink-soft); font-size: 15.5px; padding-left: 18px; border-left: 2px solid var(--line); }
.refs-note { margin-top: 10px; color: var(--muted); font-size: 14px; font-style: italic; }

/* ============================ PROSE (mentions) ============================ */
.prose-page .prose { max-width: 760px; }
.prose-page .prose h4, .prose-page .prose h5 {
  font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 46px 0 14px;
}
.prose-page .prose h6 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 28px 0 8px; }
.prose-page .prose p, .prose-page .prose div { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 12px; }
.prose-page .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============================ CONTACT ============================ */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.contact-info h2 { font-size: clamp(34px, 4vw, 52px); margin: 14px 0 26px; }
.contact-info .ci-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-info .ci-label { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-info .ci-value { font-size: 19px; font-weight: 300; }
.contact-info .ci-value a:hover { color: var(--accent); }

.contact-form { background: var(--card); border: 1px solid var(--line); padding: clamp(28px, 4vw, 52px); }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font-family: var(--sans); font-size: 16.5px; font-weight: 300; color: var(--ink);
  padding: 10px 2px; transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.form-status { display: none; padding: 16px 20px; margin-top: 20px; font-size: 15px; }
.form-status.ok { background: #eef3e9; color: #3d5230; border: 1px solid #c9d6bc; }
.form-status.err { background: #f7ebe9; color: #7c211c; border: 1px solid #e4c4c0; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ============================ FOOTER ============================ */
.site-footer { background: var(--ink); color: #cfc7ba; padding: 70px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; margin-bottom: 50px; }
.site-footer .brand-name b { color: #f2ede3; }
.site-footer .brand-name span { color: rgba(242, 237, 227, .55); }
.site-footer h5 { font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: #d8b9a2; margin-bottom: 16px; font-weight: 400; }
.site-footer .f-nav a, .site-footer address { display: block; font-style: normal; font-size: 15px; color: rgba(242, 237, 227, .75); padding: 4px 0; }
.site-footer .f-nav a:hover { color: #fff; }
.footer-baseline {
  border-top: 1px solid rgba(242, 237, 227, .14); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 13px; color: rgba(242, 237, 227, .5);
}
.footer-baseline a:hover { color: #fff; }

/* ============================ REVEAL ============================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slides .slide.active { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .burger { display: block; }
  .work-grid { grid-template-columns: 1fr; }
  .work-text { position: static; }
  .links-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .domain-card, .domain-card:nth-child(8n+1), .domain-card:nth-child(8n+6) { grid-column: span 6; min-height: 300px; }
  .mission-card { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .domain-card, .domain-card:nth-child(8n+1), .domain-card:nth-child(8n+6) { grid-column: span 12; }
  .masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .masonry a:nth-child(6n+1) { grid-column: span 2; }
  .contact-form .cf-row { grid-template-columns: 1fr; gap: 0; }
  .hero-dots { right: 20px; bottom: 30px; }
}
