/* =========================================================
   MPZi — feuille de style
   Palette : blanc / noir / vert sauge
   ========================================================= */

:root {
  /* Couleurs */
  --paper:      #ffffff;
  --paper-2:    #f6f6f3;
  --paper-3:    #eeeeea;
  --ink:        #10120f;
  --ink-70:     #3d423b;
  --ink-45:     #6f746b;
  --sage:       #7a8c6e;
  --sage-deep:  #4e5c45;
  --sage-wash:  #e7ebe2;
  --rule:       #ddded7;

  /* Typographie */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Rythme */
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1280px;
  --section-y: clamp(5rem, 11vw, 10rem);

  /* Divers */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

body {
  font-family: var(--body);
  font-size: clamp(1rem, .95rem + .2vw, 1.0625rem);
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.eyebrow {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-deep);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--sage);
  flex: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.25rem;
  font-family: var(--mono);
  font-size: .8125rem;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
}

/* Titres */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.025em;
  font-variation-settings: "wdth" 100, "opsz" 32;
}

.h-section {
  font-size: clamp(2.125rem, 1.3rem + 3.4vw, 4rem);
  max-width: 22ch;
  margin-top: 1.75rem;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 56ch;
}

/* =========================================================
   En-tête
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  transition: color .25s var(--ease), opacity .25s var(--ease);
}
.brand:hover { opacity: .72; }

.logo { display: block; width: auto; height: auto; }
.logo--horizontal { height: 1.6rem; }
.logo--stacked { height: 5.25rem; }

@media (max-width: 500px) { .logo--horizontal { height: 1.375rem; } }

/* Inversion sur le hero (avant le scroll) */
.site-header:not(.is-stuck) .brand,
.site-header:not(.is-stuck) .nav-link,
.site-header:not(.is-stuck) .nav-toggle { color: var(--paper); }
.site-header:not(.is-stuck) .nav-cta {
  color: var(--paper);
  border-color: rgba(255, 255, 255, .45);
}
.site-header:not(.is-stuck) .nav-cta:hover {
  background: var(--paper);
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); }
.nav-link {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: .35rem;
  position: relative;
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--sage);
  transition: width .3s var(--ease);
}
.nav-link:hover::after,
.nav-link[aria-current="true"]::after { width: 100%; }

.nav-cta {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: .55rem 1.1rem;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media video { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-media video.is-ready { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(16, 18, 15, .91) 0%,
      rgba(16, 18, 15, .78) 36%,
      rgba(16, 18, 15, .61) 64%,
      rgba(16, 18, 15, .43) 100%),
    linear-gradient(to right,
      rgba(16, 18, 15, .44) 0%,
      rgba(16, 18, 15, .07) 66%,
      rgba(16, 18, 15, 0) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(3rem, 8vh, 6rem);
}
.hero .eyebrow { color: rgba(255, 255, 255, .82); }
.hero .eyebrow::before { background: rgba(255, 255, 255, .55); }

.hero h1 {
  font-size: clamp(2.5rem, 1.1rem + 5.6vw, 5.75rem);
  max-width: 17ch;
  margin-top: 1.5rem;
  font-variation-settings: "wdth" 100, "opsz" 48;
}
.hero h1 em {
  font-style: normal;
  color: #cdd6c3;
}

.hero-foot {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 1.5rem;
}
.hero-foot p {
  max-width: 42ch;
  color: rgba(255, 255, 255, .8);
  font-size: 1.0625rem;
}
.hero-scroll {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
}
.hero-scroll svg { animation: nudge 2.6s var(--ease) infinite; }
@keyframes nudge {
  0%, 70%, 100% { transform: translateY(0); }
  35%           { transform: translateY(4px); }
}

/* =========================================================
   Sections génériques
   ========================================================= */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: end;
    gap: 3rem;
  }
  .section-head .lede { padding-bottom: .5rem; }
}

/* ---------- Repères ---------- */
.marks {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
  grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .marks { grid-template-columns: repeat(3, 1fr); } }

.mark {
  background: var(--paper);
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem);
}
.section--tint .mark { background: var(--paper-2); }
.mark dt {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 1rem;
}
.mark dd {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variation-settings: "wdth" 100, "opsz" 24;
}
.mark dd span { color: var(--sage); }

/* =========================================================
   Signature — la coupe
   ========================================================= */
.coupe-layout {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 960px) {
  .coupe-layout { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); }
}

.coupe-figure { position: sticky; top: 6.5rem; }
@media (max-width: 959px) { .coupe-figure { position: static; } }

.coupe-svg { width: 100%; max-width: 380px; height: auto; }
.coupe-svg .struct    { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.coupe-svg .hairline  { fill: none; stroke: var(--rule); stroke-width: 1; }
.coupe-svg .terrain   { stroke: var(--ink-45); stroke-width: .8; opacity: .5; }
.coupe-svg .slab      { fill: var(--ink); }
.coupe-svg .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  fill: var(--ink-45);
}

.coupe-zone { cursor: pointer; }
.coupe-zone .zone-fill {
  fill: transparent;
  transition: fill .45s var(--ease);
}
.coupe-zone .zone-edge {
  fill: none;
  stroke: transparent;
  stroke-width: 1.4;
  transition: stroke .45s var(--ease);
}
.coupe-zone:hover .zone-fill { fill: rgba(122, 140, 110, .12); }
.coupe-zone.is-active .zone-fill { fill: var(--sage-wash); }
.coupe-zone.is-active .zone-edge { stroke: var(--sage-deep); }
.coupe-zone.is-active .label { fill: var(--sage-deep); }
.coupe-zone:focus-visible { outline: none; }
.coupe-zone:focus-visible .zone-edge { stroke: var(--ink); }

.coupe-caption {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-45);
  line-height: 1.7;
}

/* Panneaux */
.poles { display: grid; gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); }

.pole {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  display: grid;
  gap: 1.5rem;
}
.section--tint .pole { background: var(--paper-2); }
@media (min-width: 620px) {
  .pole { grid-template-columns: minmax(0, 1fr) minmax(150px, 200px); align-items: start; }
}

.pole-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .85rem;
}
.pole-index {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  color: var(--sage);
  flex: none;
}
.pole h3 {
  font-size: clamp(1.375rem, 1.1rem + .9vw, 1.875rem);
  font-variation-settings: "wdth" 100, "opsz" 24;
}
.pole p { color: var(--ink-70); max-width: 52ch; }
.pole ul {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.pole li {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage-deep);
  border: 1px solid var(--rule);
  padding: .35rem .7rem;
}
.pole figure { margin: 0; }
.pole picture { display: block; }
.pole img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(.85);
  transition: filter .5s var(--ease);
}
.pole.is-active img { filter: saturate(1); }

/* =========================================================
   Approche
   ========================================================= */
.principles {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 760px) { .principles { grid-template-columns: repeat(2, 1fr); } }

.principle {
  background: var(--paper);
  padding: clamp(1.75rem, 3.2vw, 3rem);
}
.section--tint .principle { background: var(--paper-2); }
.principle h3 {
  font-size: 1.25rem;
  margin-bottom: .85rem;
  font-variation-settings: "wdth" 100, "opsz" 20;
}
.principle p { color: var(--ink-70); font-size: 1rem; }
.principle .num {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  color: var(--sage);
  display: block;
  margin-bottom: 1.5rem;
}

/* =========================================================
   Contact
   ========================================================= */
/* Bloc courriel — seul point de contact du site */
.mailto {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: .5rem 2rem;
  text-decoration: none;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.75rem, 3.5vw, 2.75rem) 0;
  transition: color .3s var(--ease);
}
.mailto:hover { color: var(--sage-deep); }

.mailto-label {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: .85rem;
}
.mailto-address {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.75rem, .9rem + 3.6vw, 4rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-variation-settings: "wdth" 100, "opsz" 40;
  word-break: break-word;
}
.mailto-arrow {
  flex: none;
  align-self: end;
  margin-bottom: .35rem;
  transition: transform .35s var(--ease);
}
.mailto:hover .mailto-arrow { transform: translate(4px, -4px); }

/* Coordonnées */
.contact-details {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 700px) {
  .contact-details { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
}
.detail dt {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: .75rem;
}
.detail dd {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-70);
}

/* =========================================================
   Pied de page
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  font-size: .9375rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}
@media (min-width: 800px) {
  .footer-top { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .85fr)); gap: 3rem; }
}
.site-footer .brand { color: var(--paper); display: block; }
.site-footer h3 {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: 1.1rem;
}
.site-footer li + li { margin-top: .6rem; }
.site-footer a { text-decoration: none; transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--paper); }
.footer-blurb { margin-top: 1.25rem; max-width: 40ch; color: rgba(255, 255, 255, .6); }

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}

/* =========================================================
   Page intérieure (mentions légales / 404)
   ========================================================= */
.page-header {
  padding-top: 9rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.page-header h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); }
.prose { max-width: 68ch; padding-block: clamp(3rem, 6vw, 5rem); }
.prose h2 {
  font-size: 1.375rem;
  margin-top: 2.75rem;
  margin-bottom: .85rem;
  font-variation-settings: "wdth" 100, "opsz" 20;
}
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--ink-70); }
.prose a { color: var(--sage-deep); }

/* Page intérieure : en-tête toujours opaque */
body.page .site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--rule);
}
body.page .brand,
body.page .nav-link { color: var(--ink); }
body.page .nav-cta { color: var(--ink); border-color: var(--ink); }

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

/* =========================================================
   Navigation mobile
   ========================================================= */
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: .5rem;
    margin-right: -.5rem;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--gutter) 2rem;
    transform: translateY(-120%);
    transition: transform .4s var(--ease);
    box-shadow: 0 24px 40px -30px rgba(16, 18, 15, .5);
  }
  .nav.is-open { transform: none; }
  .site-header:not(.is-stuck) .nav .nav-link { color: var(--ink); }
  .site-header:not(.is-stuck) .nav .nav-cta { color: var(--ink); border-color: var(--ink); }
  .nav-link {
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
    font-size: .8125rem;
  }
  .nav-cta { margin-top: 1.5rem; text-align: center; }
}

/* =========================================================
   Préférences système
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .hero-media, .hero-scroll { display: none; }
  body { color: #000; }
}
