/* =========================================================================
   MB Bois — site vitrine
   Implémentation de « MB Bois - Site vitrine.dc.html » (maquettes 1440 / 390).
   Les deux maquettes sont fusionnées : les valeurs desktop et mobile de la
   maquette sont les bornes des clamp(), le reste interpole entre les deux.
   ========================================================================= */

:root {
  --ink: #12120F;
  --olive: #7E8B62;
  --sand: #F4F3EF;
  --page: #E8E7E2;
  --body: #4A4A44;
  --soft: #5E5E57;
  --muted: #8C8C84;
  --line: rgba(18, 18, 15, .12);
  --hairline: rgba(18, 18, 15, .08);

  --display: Manrope, system-ui, sans-serif;
  --ui: Inter, system-ui, -apple-system, sans-serif;

  --gutter: clamp(22px, 5vw, 72px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 1024px) {
  :root { --header-h: 96px; }
}

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

/* Le `display` posé par une règle de classe l'emporte sur le `display:none` que
   le navigateur applique à [hidden]. Sans cette ligne, .gallery{display:grid}
   laisse visible ce que le script vient de masquer : la grille restait
   affichée sous l'embed Instagram. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; }

h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: -.02em; margin: 0; }

a { color: var(--ink); text-decoration: none; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  font: 500 13px/1 var(--ui);
}
.skip:focus { left: 12px; top: 12px; color: #fff; }

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

.btn {
  display: inline-block;
  text-align: center;
  font: 500 clamp(13px, .95vw, 14px)/1 var(--ui);
  letter-spacing: .06em;
  padding: 17px 34px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

.btn-white { background: #fff; color: var(--ink); }
.btn-outline-white { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-olive { border-color: var(--olive); color: var(--olive); padding: 12px 22px; letter-spacing: .04em; }
.btn-dark { background: var(--ink); color: #fff; border: 0; }

@media (hover: hover) {
  .btn-white:hover { background: var(--olive); color: #fff; }
  .btn-outline-white:hover { background: #fff; color: var(--ink); border-color: #fff; }
  .btn-outline-dark:hover { background: var(--ink); color: #fff; }
  .btn-outline-olive:hover { background: var(--olive); color: #fff; }
  .btn-dark:hover { background: var(--olive); }
}

/* ---------- Photos ----------------------------------------------------- */

.ph { overflow: hidden; background: var(--sand); display: block; }

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

@media (hover: hover) {
  .ph:hover img { transform: scale(1.045); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: #fff;
  border-bottom: 1px solid var(--hairline);
}

.brand { display: flex; align-items: center; }

.brand img {
  display: block;
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 40px);
  font: 400 13.5px/1 var(--ui);
  letter-spacing: .02em;
}

/* Sept entrées et le téléphone depuis la séparation Ossature bois / Isolation :
   entre 1024 et 1279 px, l'écart par défaut ferait déborder l'en-tête. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav { gap: 16px; }
}

.nav > a:not(.btn) { position: relative; transition: color .3s ease; }

.nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 0;
  background: var(--olive);
  transition: width .35s var(--ease);
}

@media (hover: hover) {
  .nav > a:not(.btn):hover { color: var(--olive); }
  .nav > a:not(.btn):hover::after { width: 100%; }
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 1px;
  width: 22px;
  margin-left: auto;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s ease;
}

.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 1024px) {
  .brand img { height: 52px; }
}

@media (max-width: 1023px) {
  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 39;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 0 var(--gutter) 12vh;
    background: #fff;
    font-size: 22px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .35s var(--ease), visibility .3s;
  }

  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav > a:not(.btn) {
    font: 300 30px/1 var(--display);
    letter-spacing: -.02em;
    padding: 14px 0;
  }

  .nav .nav-tel { margin-top: 26px; font-size: 14px; }
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  height: clamp(560px, 54vw, 780px);
  overflow: hidden;
  background: var(--ink);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.heroimg { animation: heroZoom 6s var(--ease) both; }

/* Voile du hero : la maquette pose un aplati à 34 %. La photo de toiture étant
   très claire, le voile est dégradé — même densité moyenne, mais concentrée en
   bas où se trouve le texte, ce qui garde le contraste sur le titre. */
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(12, 12, 10, .68) 0%,
      rgba(12, 12, 10, .46) 32%,
      rgba(12, 12, 10, .22) 62%,
      rgba(12, 12, 10, .18) 100%);
}

.hero-body {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(34px, 6vw, 88px);
  color: #fff;
}

.eyebrow {
  margin: 0;
  font: 500 clamp(10px, .85vw, 12px)/1 var(--ui);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--olive);
}

.eyebrow-light { color: rgba(255, 255, 255, .78); }

.hero-body h1 {
  margin: clamp(16px, 1.6vw, 22px) 0 0;
  font-size: clamp(58px, 7.22vw, 104px);
  line-height: .92;
  letter-spacing: -.035em;
  color: #fff;
}

.hero-baseline {
  margin: clamp(14px, 1.4vw, 20px) 0 0;
  font: 400 clamp(13px, 1.3vw, 19px)/1.5 var(--ui);
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .9);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: clamp(26px, 3vw, 44px);
}

.hero-actions .btn { padding-left: clamp(24px, 2.8vw, 40px); padding-right: clamp(24px, 2.8vw, 40px); }

@media (max-width: 599px) {
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { display: block; padding: 17px 0; }
}

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

/* L'en-tête est collant : les ancres doivent s'arrêter sous lui. */
.section[id] { scroll-margin-top: var(--header-h); }

.section { padding: clamp(60px, 9vw, 130px) var(--gutter); }
.section-light { background: #fff; }
.section-sand { background: var(--sand); }

#savoir { padding-top: clamp(66px, 9.7vw, 140px); }
.section-real { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: clamp(22px, 3.9vw, 56px);
}

.section h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1; }

.kicker {
  font: 400 clamp(11px, .85vw, 12px)/1 var(--ui);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.kicker-link { letter-spacing: .04em; text-transform: none; font-size: clamp(11px, .9vw, 13px); }
.kicker-link:hover { color: var(--olive); }

.ig-short, .on-narrow { display: none; }

@media (max-width: 899px) {
  .ig-long { display: none; }
  .ig-short { display: inline; }
}

/* La maquette mobile abrège les surtitres trop larges pour 390 px. */
@media (max-width: 639px) {
  .on-wide { display: none; }
  .on-narrow { display: inline; }
  /* « Cinq savoir-faire, un seul artisan » n'existe pas dans la maquette mobile. */
  #savoir .kicker { display: none; }
}

/* ---------- Savoir-faire ---------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(34px, 2vw, 28px);
}

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .card { grid-column: span 2; }
  .card:nth-child(5) { grid-column: 2 / span 2; }
}

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(6, 1fr); }
  .card:nth-child(4) { grid-column: 2 / span 2; }
  .card:nth-child(5) { grid-column: 4 / span 2; }
}

.ph-card { aspect-ratio: 7 / 6; }

@media (min-width: 1024px) {
  .ph-card { aspect-ratio: 4 / 5; }
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 1vw, 14px);
  margin-top: clamp(16px, 1.5vw, 22px);
}

.num { font: 500 clamp(11px, .85vw, 12px)/1 var(--ui); color: var(--olive); }

.card h3 { font-size: clamp(22px, 1.8vw, 26px); line-height: 1; font-weight: 400; letter-spacing: -.01em; }

.rule {
  position: relative;
  height: 1px;
  background: var(--line);
  margin-top: 18px;
}

.cardline {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 0;
  background: var(--olive);
  transition: width .5s var(--ease);
}

@media (hover: hover) {
  .card:hover .cardline { width: 100%; }
}

.card p {
  margin: 16px 0 0;
  font: 400 clamp(14px, 1vw, 14.5px)/1.65 var(--ui);
  color: var(--soft);
  max-width: 340px;
}

@media (max-width: 1023px) {
  .rule { display: none; }
  .card p { margin-top: 10px; max-width: none; }
}

/* ---------- Réalisations ---------------------------------------------- */

/* La maquette mobile posait un bloc de 3 × 3 vignettes muettes. Les accroches
   du flux demandent de la place : sous 700 px la grille passe à deux colonnes,
   sinon la légende tomberait sur des vignettes de 112 px, illisible. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery li { display: block; }

.gallery li { position: relative; }

.gallery a { display: block; position: relative; aspect-ratio: 1; }

/* ---------- Accroches du flux Instagram -------------------------------- */

/* La légende de la publication. Une seule balise, deux présentations, décidées
   par la largeur seule — jamais par la présence d'un survol, qui laisserait
   l'accroche inatteignable sur une tablette tactile.

   Sous 700 px : posée sous la vignette, la grille étant à deux colonnes.
   Au-delà : bandeau permanent en bas de la photo, sur un dégradé sombre. */
.tile-caption {
  margin: 10px 0 0;
  font: 400 12.5px/1.5 var(--ui);
  color: var(--soft);
}

.tile-caption .cap {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (max-width: 699px) {
  .tile-caption { font-size: 12px; }
  .tile-caption .cap { -webkit-line-clamp: 2; }
}

.tile-caption .cap-date {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* La mention n'est vraie que lorsque la synchronisation a répondu. */
.ig-live-note { display: none; }
body.ig-live .ig-live-note { display: inline; }

@media (min-width: 700px) {
  .tile-caption {
    position: absolute;
    inset: auto 0 0 0;
    margin: 0;
    padding: 42px 14px 13px;
    color: #fff;
    background: linear-gradient(to top,
      rgba(12, 12, 10, .88) 0%,
      rgba(12, 12, 10, .60) 55%,
      rgba(12, 12, 10, 0) 100%);
    /* Le clic doit traverser le bandeau pour atteindre le lien, qui est en
       dessous : ils sont frères, pas imbriqués. */
    pointer-events: none;
  }

  .tile-caption .cap { -webkit-line-clamp: 1; }
  .tile-caption .cap-date { color: rgba(255, 255, 255, .72); margin-top: 3px; }
}

/* Une seconde ligne d'accroche seulement là où la vignette est assez haute
   pour l'absorber sans manger la photo. */
@media (min-width: 1024px) {
  .tile-caption { padding: 48px 16px 15px; }
  .tile-caption .cap { -webkit-line-clamp: 2; }
}

/* ---------- Pastilles vidéo et carrousel ------------------------------- */

/* Reprend la convention d'Instagram : une publication reste une vignette, et
   un repère en coin dit ce qu'elle contient. Déplier un carrousel en autant de
   vignettes noierait la grille sous une seule publication. */
.tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(12, 12, 10, .55);
  color: #fff;
  font: 500 11px/1 var(--ui);
  letter-spacing: .02em;
  backdrop-filter: blur(3px);
}

.tile-badge svg { display: block; width: 11px; height: 11px; fill: currentColor; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .gallery a { aspect-ratio: 316 / 340; }
}

/* ---------- Embed Instagram, chargé à la demande ----------------------- */

/* Mention sous le cadre. Le fil est chargé d'emblée : cette ligne est le seul
   endroit où le visiteur apprend que la section vient d'instagram.com et ce que
   cela implique. Discrète, mais présente. */
.ig-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 12px 0 0;
  font: 400 12px/1.6 var(--ui);
  color: var(--muted);
}

.ig-note strong { font-weight: 500; color: var(--body); }
.ig-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ig-note a:hover { color: var(--olive); }

/* Borné puis centré : l'embed garde toujours trois colonnes, donc en pleine
   largeur ses vignettes atteignent 432 px et écrasent le reste de la page.
   À 1000 px elles font 333 px, soit la taille des vignettes de la grille du
   site — la section garde son rythme. */
.ig-embed {
  max-width: 1000px;
  margin-inline: auto;
}

/* Le cadre rogne l'en-tête d'Instagram : l'iframe est remontée d'autant, et la
   hauteur du cadre est posée par assets/site.js. */
.ig-frame {
  overflow: hidden;
  background: #fff;
}

.ig-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  margin-top: -157px;
  background: #fff;
}


.gallery-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(26px, 3.6vw, 52px);
}

.gallery-cta .btn { padding: 18px clamp(24px, 3vw, 44px); }

@media (max-width: 599px) {
  .gallery-cta { display: block; }
  .gallery-cta .btn { display: block; padding: 17px 0; }
}

/* ---------- À propos -------------------------------------------------- */

.about {
  display: grid;
  gap: clamp(26px, 6vw, 90px);
  align-items: center;
}

@media (min-width: 1024px) {
  .about { grid-template-columns: minmax(380px, 520px) 1fr; }
}

/* Emplacement du portrait de l'artisan. Pour poser la vraie photo : déposer le
   fichier en photos/portrait.webp puis décommenter la ligne `background` ci-dessous
   (le repère .portrait-hint disparaît alors derrière l'image). */
.portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 13 / 16;
  background: #E2E0D9;
  /* background: #E2E0D9 url("../photos/portrait.webp") center / cover no-repeat; */
  display: grid;
  place-items: center;
  overflow: hidden;
}

.portrait-hint {
  font: 400 12.5px/1.7 var(--ui);
  letter-spacing: .04em;
  color: var(--muted);
  text-align: center;
  padding: 0 20px;
}

.portrait-hint em { font: italic 400 11.5px/1 ui-monospace, Menlo, monospace; opacity: .8; }

@media (max-width: 1023px) {
  .portrait { aspect-ratio: 39 / 40; }
}

.about-body h2 { margin: clamp(16px, 1.6vw, 22px) 0 0; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.12; }

.lead {
  margin: clamp(18px, 2vw, 28px) 0 0;
  font: 400 clamp(15px, 1.2vw, 17px)/1.8 var(--ui);
  color: var(--body);
  max-width: 560px;
  text-wrap: pretty;
}

.lead + .lead { margin-top: 20px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  margin: clamp(30px, 3.4vw, 48px) 0 0;
}

.facts dt { font: 300 clamp(28px, 2.8vw, 40px)/1 var(--display); color: var(--ink); }
.facts dd { margin: 8px 0 0; font: 400 13px/1.4 var(--ui); color: var(--muted); }

/* ---------- Zone d'intervention --------------------------------------- */

.zone {
  display: grid;
  gap: clamp(20px, 5vw, 80px);
  align-items: start;
}

/* La carte passe en deux colonnes plus tard que le reste : en dessous de
   ~1180 px elle deviendrait trop étroite pour porter les neuf étiquettes. */
@media (min-width: 1180px) {
  .zone { grid-template-columns: 1fr 380px; }
  .zone-body { padding-top: 96px; }
}

.zone-map h2 { margin-bottom: clamp(22px, 2.4vw, 34px); font-size: clamp(30px, 3.1vw, 44px); }

.map-frame {
  height: clamp(320px, 36vw, 520px);
  border: 1px solid rgba(18, 18, 15, .1);
}

/* Carte pleine largeur : sans hauteur proportionnée, le cadrage automatique
   recule d'un cran de zoom et les étiquettes se tassent. */
@media (min-width: 640px) and (max-width: 1179px) {
  .map-frame { height: auto; aspect-ratio: 8 / 5; max-height: 560px; }
}

.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.zone-body p { margin: 0; font: 400 clamp(14px, 1.1vw, 16px)/1.75 var(--ui); color: var(--body); }

.zone-body hr { height: 1px; border: 0; background: var(--line); margin: clamp(20px, 2.2vw, 32px) 0; }

.communes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 400 clamp(14px, 1.05vw, 15px)/1.5 var(--ui);
}

.muted { color: var(--muted); font-size: 14px; }
.zone-body .muted { margin-top: clamp(20px, 2.2vw, 32px); }

@media (max-width: 1179px) {
  .zone-body hr { display: none; }
  .communes { margin-top: 20px; }
}

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

.contact {
  display: grid;
  gap: clamp(38px, 6vw, 90px);
  align-items: start;
}

@media (min-width: 1024px) {
  .contact { grid-template-columns: 1fr 1fr; }
}

.tel {
  display: block;
  margin: clamp(18px, 1.9vw, 26px) 0 0;
  font: 300 clamp(40px, 4.7vw, 68px)/1 var(--display);
  letter-spacing: -.03em;
}

.tel:hover { color: var(--olive); }

.mail {
  display: inline-block;
  margin: clamp(16px, 1.7vw, 24px) 0 0;
  font: 400 clamp(16px, 1.3vw, 19px)/1 var(--ui);
  color: var(--body);
  border-bottom: 1px solid rgba(18, 18, 15, .2);
  padding-bottom: 4px;
  transition: color .3s ease, border-color .3s ease;
}

.mail:hover { color: var(--olive); border-color: var(--olive); }

.hours { margin: clamp(24px, 2.8vw, 40px) 0 0; font: 400 15px/1.7 var(--ui); }

.form { display: flex; flex-direction: column; gap: clamp(18px, 1.6vw, 22px); }

.field { margin: 0; display: block; }

.field label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.field input, .field textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(18, 18, 15, .22);
  background: transparent;
  padding: 14px 0;
  font: 400 clamp(15px, 1.1vw, 16px)/1.6 var(--ui);
  color: var(--ink);
  outline: none;
  border-radius: 0;
  transition: border-color .3s ease;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus, .field textarea:focus { border-bottom-color: var(--olive); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field.has-error input, .field.has-error textarea { border-bottom-color: #B4553F; }

.form .btn { align-self: flex-start; margin-top: 8px; padding: 18px clamp(28px, 3vw, 44px); }

.form-status { margin: 0; font: 400 13.5px/1.6 var(--ui); color: var(--olive); min-height: 1.6em; }
.form-status.is-error { color: #B4553F; }

@media (max-width: 599px) {
  .form .btn { align-self: stretch; padding: 18px 0; }
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: clamp(28px, 2.6vw, 36px) var(--gutter);
  background: #fff;
  border-top: 1px solid rgba(18, 18, 15, .1);
  font: 400 12.5px/1.8 var(--ui);
  color: var(--muted);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 20px 28px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--olive); }

@media (max-width: 599px) {
  .site-footer { display: block; }
  .footer-links { margin-top: 8px; }
}

/* ---------- Pages annexes (mentions légales) -------------------------- */

.prose { max-width: 760px; }
.prose h1 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1; }
.prose h2 { font-size: clamp(19px, 1.5vw, 22px); font-weight: 400; margin: clamp(32px, 3vw, 48px) 0 12px; }
.prose p, .prose li { font: 400 clamp(14px, 1.1vw, 16px)/1.75 var(--ui); color: var(--body); }
.prose a { color: var(--olive); border-bottom: 1px solid rgba(126, 139, 98, .4); }
.prose ul { padding-left: 18px; }

/* ---------- Animations ------------------------------------------------ */

.fade { animation: fadeUp 1s var(--ease) both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: none; }
}

.reveal { opacity: 0; transform: translateY(16px); }

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.gallery li.reveal.is-in { transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ph:hover img { transform: none; }
}

/* ---------- Photos en grand (assets/site.js) -------------------------- */

.ph > img.zoomable { cursor: zoom-in; }
.ph > img.zoomable:focus-visible { outline: 2px solid var(--olive); outline-offset: -4px; }

html:has(.lightbox[open]) { overflow: hidden; }

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox::backdrop { background: rgba(18, 18, 15, .92); }

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  margin: 0;
  padding: 56px 64px 24px;
}
.lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
}
.lightbox figcaption {
  max-width: 60ch;
  font: 400 14px/1.5 var(--ui);
  color: rgba(255, 255, 255, .85);
  text-align: center;
}

.lightbox button {
  position: absolute;
  padding: 8px 14px;
  border: 0;
  background: none;
  font: 300 40px/1 var(--ui);
  color: #fff;
  cursor: pointer;
}
.lightbox button:hover { color: var(--sand); }
.lightbox .lb-close { top: 6px; right: 10px; }
.lightbox .lb-prev,
.lightbox .lb-next { top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev { left: 6px; }
.lightbox .lb-next { right: 6px; }

@media (max-width: 639px) {
  .lightbox figure { padding: 52px 12px 16px; }
  .lightbox .lb-prev,
  .lightbox .lb-next { top: auto; bottom: 8px; transform: none; }
  .lightbox img { max-height: calc(100vh - 170px); }
}
