/* ============================================================
   Agnès Guédeu — Artiste peintre  ·  styles v2
   Papier chaud · encre · lavis colorés · grain
   Fraunces (titres) + Hanken Grotesk (texte)
   ============================================================ */

:root {
  --paper:      #f4eee2;
  --paper-deep: #ece2cf;
  --paper-card: #faf6ed;
  --ink:        #1b1813;
  --ink-soft:   #4a4339;
  --ink-faint:  #8c8273;

  --terracotta: #c0562f;
  --sage:       #34553f;
  --blue:       #46637e;
  --pink:       #cf8298;
  --gold:       #b8924f;

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  --container: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-pad: clamp(80px, 12vh, 160px);
  --line: rgba(27, 24, 19, 0.14);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x sur html ET body : body seul ne suffit pas à bloquer le
   balayage latéral sur iOS Safari (menus off-canvas, débords décoratifs). */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.04; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
em { font-style: italic; }

.section-head { margin-bottom: clamp(40px, 6vh, 80px); position: relative; z-index: 1; }
.section-title { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.01em; }
.section-title em { color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 40px;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; transition: all 0.3s ease;
}
.btn-fill { background: var(--ink); color: var(--paper); }
.btn-fill:hover { background: var(--terracotta); }
.btn-line { border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: rgba(27,24,19,0.035); }

/* ============================================================ NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  transition: box-shadow 0.4s ease, padding 0.4s ease;
}
/* Le fond flouté vit sur un pseudo-élément : un backdrop-filter posé sur .nav
   ferait du menu mobile (fixed, enfant de .nav) un panneau écrasé dans la barre. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.nav.scrolled::before {
  background: rgba(244, 238, 226, 0.84);
  backdrop-filter: blur(14px) saturate(1.1);
}
.nav.scrolled {
  box-shadow: 0 1px 0 var(--line);
  padding-block: 11px;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand b { font-family: var(--serif); font-weight: 400; font-size: 1.28rem; }
.nav__brand b em { color: var(--terracotta); }
.nav__brand small { font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-top: 5px; }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 38px); align-items: center; }
.nav__links a { font-size: 0.84rem; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-soft); position: relative; padding-bottom: 3px; transition: color 0.25s ease; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--terracotta); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__menu-btn { display: none; background: none; border: none; color: var(--ink); }

@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 0 0 0 32%;
    flex-direction: column; justify-content: center; gap: 26px;
    background: rgba(244, 238, 226, 0.97); backdrop-filter: blur(20px);
    padding: var(--gutter);
    /* visibility évite que le panneau hors écran crée un débord latéral
       (et retire ses liens du parcours clavier quand il est fermé). */
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.6, 0, 0.2, 1), visibility 0.45s;
  }
  .nav__links.open { visibility: visible; transform: translateX(0); }
  .nav__links a { font-size: 1.4rem; font-family: var(--serif); }
  .nav__menu-btn { display: block; z-index: 101; font-size: 1.6rem; line-height: 1; }
}

/* ============================================================ HERO */
.hero { min-height: 100svh; display: flex; align-items: center; position: relative; padding-top: 110px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 80px); align-items: center; width: 100%; position: relative; z-index: 2; }
.hero__eyebrow { margin-bottom: 24px; }
.hero__name { font-size: clamp(3rem, 9vw, 8rem); line-height: 0.9; letter-spacing: -0.02em; margin-bottom: 28px; }
.hero__name .l2 { display: block; font-style: italic; color: var(--terracotta); }
.hero__accroche { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.34; color: var(--ink-soft); max-width: 34ch; margin-bottom: 34px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__loc { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.hero__loc .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }

/* L'œuvre du hero est montrée entière (ratio naturel) — on ne recadre pas une toile. */
.hero__art { position: relative; }
.hero__art img { width: 100%; height: auto; box-shadow: 0 40px 80px -40px rgba(27,24,19,0.45); }

.scroll-hint { position: absolute; bottom: 28px; left: var(--gutter); display: flex; align-items: center; gap: 12px; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); z-index: 3; }
.scroll-hint .bar { width: 46px; height: 1px; background: var(--ink-faint); position: relative; overflow: hidden; }
.scroll-hint .bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: scrollbar 2.4s ease-in-out infinite; }
@keyframes scrollbar { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@media (max-width: 820px) {
  /* Hero resserré : l'œuvre visible dès le premier écran. */
  .hero { min-height: auto; padding-top: 104px; padding-bottom: 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__name { margin-bottom: 20px; }
  .hero__accroche { margin-bottom: 26px; }
  .hero__cta { margin-bottom: 26px; }
  .hero__art { max-width: 420px; }
  .scroll-hint { display: none; }
}
@media (max-height: 760px) { .scroll-hint { display: none; } }

/* ============================================================ UNIVERS */
.univers__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(36px, 6vw, 80px); align-items: center; position: relative; z-index: 1; }
.univers__media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.univers__media .um-main { grid-column: 1 / -1; position: relative; }
.univers__media .um-main img { width: 100%; height: auto; box-shadow: 0 30px 70px -40px rgba(27,24,19,0.4); }
.univers__media .um-sub img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; box-shadow: 0 22px 50px -34px rgba(27,24,19,0.4); }
.univers__media .tag { position: absolute; bottom: 16px; left: -14px; background: var(--ink); color: var(--paper); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 8px 16px; z-index: 2; }
.bio p { color: var(--ink-soft); max-width: 56ch; margin: 0 0 1.1em; }
.bio p .em { color: var(--ink); font-style: italic; }
.bio__sign { margin-top: 26px; font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
@media (max-width: 820px) { .univers__grid { grid-template-columns: 1fr; gap: 40px; } .univers__media { max-width: 460px; } }

/* ============================================================ ŒUVRES — ÉTAGÈRES */
.shelves { position: relative; z-index: 1; }
.shelf {
  padding: clamp(38px, 6vh, 66px) 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.shelf:last-child { border-bottom: 1px solid var(--line); }
.shelf__top { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.shelf__name { font-size: clamp(1.9rem, 4.4vw, 3.2rem); letter-spacing: -0.01em; }
.shelf__name .count { font-family: var(--sans); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-faint); margin-left: 16px; vertical-align: middle; }
.shelf__open { display: inline-flex; align-items: center; gap: 9px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--terracotta); white-space: nowrap; background: none; border: 0; padding: 0; }
.shelf__open .arr { transition: transform 0.35s ease; }
.shelf:hover .shelf__open .arr { transform: translateX(7px); }
.shelf__desc { color: var(--ink-soft); max-width: 62ch; margin: 16px 0 30px; }

/* tablette : toiles posées qui se chevauchent */
/* Géométrie : les cadres reposent SUR la ligne (padding-bottom = position de
   la ligne), et l'ombre est projetée par la planche, SOUS la ligne. */
.shelf__strip { position: relative; display: flex; align-items: flex-end; padding: 4px 0 14px; min-height: 210px; }
.shelf__strip::after {
  content: ""; position: absolute; left: -6%; right: -6%; bottom: 14px; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--ink-faint) 12%, var(--ink-faint) 88%, transparent);
  opacity: 0.5;
}
.shelf__strip::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 22px;
  background: radial-gradient(60% 100% at 50% 0, rgba(27,24,19,0.18), transparent 70%);
}
.shelf__thumb {
  flex: 0 0 auto;
  width: clamp(120px, 14vw, 178px);
  height: clamp(150px, 17vw, 200px);
  margin-left: -34px;
  background: var(--paper-card);
  padding: 7px; padding-bottom: 14px;
  /* Au-dessus de la ligne d'étagère (le ::after passerait devant sinon). */
  position: relative; z-index: 1;
  transition: transform 0.5s cubic-bezier(0.2,0,0.1,1), margin 0.5s cubic-bezier(0.2,0,0.1,1);
  transform-origin: bottom center;
}
.shelf__thumb:first-child { margin-left: 0; }
.shelf__thumb:nth-child(odd) { transform: rotate(-1.4deg); }
.shelf__thumb:nth-child(even) { transform: rotate(1.6deg) translateY(-6px); }
.shelf__thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf__thumb.ph { display: grid; place-items: center; }
.shelf__thumb.ph span { font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.shelf:hover .shelf__thumb { margin-left: -14px; transform: rotate(0deg) translateY(-10px); }
.shelf:hover .shelf__thumb:first-child { margin-left: 0; }
.shelf__more {
  align-self: center; margin-left: 22px; flex: 0 0 auto;
  font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-faint);
}

/* Mosaïque mobile — masquée sur desktop. */
.shelf__mosaic { display: none; }

@media (max-width: 640px) {
  /* Mobile : mosaïque directe — l'étagère et sa description laissent place
     à 4 œuvres tappables (lightbox) + « Tout voir » (tiroir). */
  .shelf { padding: 30px 0 34px; }
  .shelf__strip, .shelf__desc, .shelf__more { display: none; }
  .shelf__name .count { display: block; margin: 6px 0 0; }
  .shelf__top .shelf__open { display: none; }
  .shelf__mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  .mtile { padding: 0; border: 0; background: var(--paper-card); aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; box-shadow: 0 14px 26px -18px rgba(27,24,19,0.45); }
  .mtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .shelf__all { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; margin-top: 2px; border: 1px solid var(--line); border-radius: 40px; background: none; font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--terracotta); }
}

/* ============================================================ OVERLAY COLLECTION (tiroir) */
.coll-backdrop {
  position: fixed; inset: 0; z-index: 880;
  background: rgba(27,24,19,0.5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.coll-backdrop.open { opacity: 1; visibility: visible; }
.coll-overlay {
  position: fixed; left: 0; right: 0; bottom: 0; top: 7vh; z-index: 900;
  width: min(1180px, 100%); margin-inline: auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -30px 90px -30px rgba(27,24,19,0.55);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  transform: translateY(101%); visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.2,0.72,0.2,1), visibility 0.6s;
}
.coll-overlay.open { transform: none; visibility: visible; }
.coll-overlay__bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px var(--gutter) 16px;
  background: rgba(244,238,226,0.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
}
.coll-overlay__bar::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 5px; border-radius: 3px; background: var(--ink-faint); opacity: 0.45;
}
.coll-overlay__bar h2 { font-size: 1.5rem; }
.coll-overlay__bar h2 .count { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); margin-left: 12px; font-weight: 600; }
.coll-close { display: inline-flex; align-items: center; gap: 9px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); background: none; border: none; }
.coll-close:hover { color: var(--terracotta); }
.coll-overlay__body { padding: clamp(40px, 7vh, 90px) var(--gutter) clamp(48px, 8vh, 90px); max-width: var(--container); margin-inline: auto; }
.coll-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: clamp(48px, 7vh, 84px); padding-top: 30px; border-top: 1px solid var(--line); }
.coll-back { background: none; border: none; font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 10px; transition: gap 0.3s ease, color 0.3s ease; }
.coll-back:hover { color: var(--terracotta); gap: 16px; }
.coll-next { background: none; border: none; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 10px; transition: gap 0.3s ease, color 0.3s ease; }
.coll-next:hover { color: var(--terracotta); gap: 16px; }
.coll-next b { font-style: normal; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-right: 6px; }
.coll-lead { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.3; max-width: 22ch; margin: 0 0 24px; }
.coll-lead em { color: var(--terracotta); }
.coll-text { columns: 2; column-gap: clamp(28px, 4vw, 64px); color: var(--ink-soft); margin-bottom: clamp(48px, 7vh, 80px); }
.coll-text p { margin: 0 0 1em; break-inside: avoid; }
.coll-text .pull { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink); }
@media (max-width: 720px) {
  .coll-text { columns: 1; }
  /* Tiroir plein écran en mobile — chaque pixel compte. */
  .coll-overlay { top: 0; border-radius: 0; }
  .coll-overlay__bar { border-radius: 0; padding: 16px var(--gutter) 12px; }
  .coll-overlay__bar::before { display: none; }
  .coll-overlay__bar h2 { font-size: 1.15rem; }
  .coll-overlay__bar h2 .count { display: block; margin: 4px 0 0; }
}

/* vidéo (réutilisée dans la collection gyotaku) */
.video-block { margin: 0 0 clamp(48px, 7vh, 80px); }
.video-block .eyebrow { color: var(--terracotta); margin-bottom: 16px; }
.video__frame { position: relative; aspect-ratio: 16/9; background: var(--ink); overflow: hidden; cursor: pointer; box-shadow: 0 40px 90px -50px rgba(27,24,19,0.6); }
.video__poster { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(130% 130% at 50% -10%, #2c261e, var(--ink) 72%); }
.video__play { width: 92px; height: 92px; border-radius: 50%; background: rgba(244,238,226,0.95); display: grid; place-items: center; transition: transform 0.4s ease; }
.video__frame:hover .video__play { transform: scale(1.08); }
.video__cap { position: absolute; left: 0; bottom: 0; padding: 26px 30px; color: var(--paper); font-size: 0.82rem; }
.video__cap strong { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; display: block; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* grille photos (tiroirs d'exposition) */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; height: auto; object-fit: cover; box-shadow: 0 22px 50px -34px rgba(27,24,19,0.4); }
@media (max-width: 560px) { .photo-grid { grid-template-columns: 1fr; } }

/* ============================================================ WORK CARDS (mosaïque dans l'overlay) */
/* column-gap ≥ 24px : les colonnes CSS rognent au MILIEU de la gouttière —
   les repères d'angle (10px hors de l'œuvre) doivent tenir dans la demi-gouttière. */
.gallery { columns: 3; column-gap: clamp(26px, 2.6vw, 36px); }
@media (max-width: 1000px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }
.work { break-inside: avoid; margin-bottom: clamp(24px, 2.6vw, 34px); cursor: pointer; position: relative; }
.work__media { position: relative; background: var(--paper-deep); transition: transform 0.55s cubic-bezier(0.2,0,0.1,1), box-shadow 0.55s cubic-bezier(0.2,0,0.1,1); }
.work:hover .work__media { transform: translateY(-7px); box-shadow: 0 28px 48px -26px rgba(27,24,19,0.5); }
/* .work__clip découpe le zoom de l'image ; les repères d'angle restent libres autour. */
.work__clip { position: absolute; inset: 0; overflow: hidden; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2,0,0.1,1); }
.work:hover .work__media img { transform: scale(1.05); }
.work__ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
/* repères d'angle (crop marks) au survol — à l'EXTÉRIEUR de l'œuvre, sans jamais la toucher */
.work__media::after {
  content: ""; position: absolute; inset: -3px; pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity 0.4s ease, inset 0.5s cubic-bezier(0.2,0,0.1,1);
  --c: var(--terracotta); --t: 2px; --l: 22px;
  background-image:
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)),
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)),
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)),
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c));
  background-repeat: no-repeat;
  background-size:
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l),
    var(--l) var(--t), var(--t) var(--l);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
}
.work:hover .work__media::after { opacity: 1; inset: -10px; }
.work__cap { padding: 14px 2px 4px; }
.work__title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.15; transition: color 0.4s ease; }
.work:hover .work__title { color: var(--terracotta); }
.work__meta { font-size: 0.8rem; color: var(--ink-faint); margin-top: 4px; }

/* ============================================================ LIGHTBOX */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 17, 13, 0.94); display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 80px); opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__inner { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 4vw, 56px); align-items: center; max-width: 1100px; width: 100%; transform: scale(0.97); transition: transform 0.5s cubic-bezier(0.2,0,0.1,1); }
.lightbox.open .lightbox__inner { transform: scale(1); }
.lightbox__media { max-height: 82vh; display: flex; align-items: center; justify-content: center; }
.lightbox__media img { max-height: 82vh; width: auto; object-fit: contain; box-shadow: 0 40px 100px -30px rgba(0,0,0,0.7); }
.lightbox__ph { width: min(60vw, 540px); aspect-ratio: 4/5; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #2a251f, #2a251f 12px, #262019 12px, #262019 24px); color: rgba(244,238,226,0.5); font-family: monospace; font-size: 0.85rem; letter-spacing: 0.1em; }
.lightbox__info { color: var(--paper); max-width: 280px; }
.lightbox__info .eyebrow { color: var(--terracotta); margin-bottom: 14px; }
.lightbox__info h3 { font-size: 2rem; margin-bottom: 18px; color: var(--paper); }
.lightbox__info dl { margin: 0; display: grid; gap: 14px; }
.lightbox__info dt { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,238,226,0.45); }
.lightbox__info dd { margin: 2px 0 0; font-size: 1rem; color: rgba(244,238,226,0.92); }
.lightbox__cta { display: inline-flex; align-items: center; gap: 9px; margin-top: 28px; padding: 13px 24px; border-radius: 40px; background: var(--paper); color: var(--ink); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.03em; transition: all 0.3s ease; }
.lightbox__cta:hover { background: var(--terracotta); color: var(--paper); }
.lightbox__cta .arr { transition: transform 0.35s ease; }
.lightbox__cta:hover .arr { transform: translateX(5px); }
/* z-index : les commandes doivent rester au-dessus de la fiche (l'inner,
   transformé, crée un contexte d'empilement et passerait devant sinon). */
.lightbox__close { position: absolute; top: 28px; right: 32px; width: 48px; height: 48px; border-radius: 50%; background: transparent; border: 1px solid rgba(244,238,226,0.3); color: var(--paper); font-size: 1.3rem; display: grid; place-items: center; transition: all 0.3s ease; z-index: 6; }
.lightbox__close:hover { background: rgba(244,238,226,0.12); transform: rotate(90deg); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; background: transparent; border: 1px solid rgba(244,238,226,0.25); color: var(--paper); font-size: 1.4rem; display: grid; place-items: center; transition: all 0.3s ease; z-index: 6; }
.lightbox__nav:hover { background: rgba(244,238,226,0.12); }
.lightbox__nav.prev { left: 24px; } .lightbox__nav.next { right: 24px; }
@media (max-width: 760px) {
  /* Fiche scrollable : l'image laisse la place à l'info et au CTA d'achat,
     les commandes restent fixes à l'écran. */
  .lightbox { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 64px 18px 96px; }
  .lightbox__inner { grid-template-columns: 1fr; gap: 20px; }
  .lightbox__media { max-height: none; }
  .lightbox__media img { max-height: 52vh; }
  .lightbox__info { max-width: none; }
  .lightbox__close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; }
  .lightbox__nav { position: fixed; top: auto; bottom: 18px; transform: none; width: 48px; height: 48px; background: rgba(20,17,13,0.7); backdrop-filter: blur(6px); }
  .lightbox__nav.prev { left: 18px; } .lightbox__nav.next { right: 18px; }
}

/* ============================================================ ÉVÉNEMENTS */
.events { background: rgba(236, 227, 210, 0.45); }

/* Cartes d'événements — grille 2 colonnes */
.evt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 40px); position: relative; z-index: 1; }
.evt-card {
  background: var(--paper-card); border: 1px solid var(--line);
  cursor: pointer; display: flex; flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.2,0,0.1,1), box-shadow 0.5s cubic-bezier(0.2,0,0.1,1);
}
.evt-card:hover { transform: translateY(-7px); box-shadow: 0 30px 50px -28px rgba(27,24,19,0.45); }
.evt-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-deep); }
.evt-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2,0,0.1,1); }
.evt-card:hover .evt-card__media img { transform: scale(1.04); }
.evt-card__ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.evt-card__badge { position: absolute; top: 14px; left: 14px; background: var(--paper); }
.evt-card__body { padding: 22px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.evt-card__date { font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--terracotta); margin: 0 0 6px; }
.evt-card__name { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; margin: 0 0 8px; }
.evt-card__loc { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 18px; }
.evt-card__body .shelf__open { margin-top: auto; }
.evt-card:hover .shelf__open .arr { transform: translateX(7px); }

/* Sous-titre du groupe des expositions passées */
.evt-sub { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin: clamp(36px, 5vh, 54px) 0 18px; position: relative; z-index: 1; }
/* Passées en petites cartes — desktop uniquement (le mobile garde son format compact) */
.evt-grid--past .evt-card__badge { display: none; }
@media (min-width: 721px) {
  .evt-grid--past { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .evt-grid--past .evt-card__media { aspect-ratio: 16 / 10; }
  .evt-grid--past .evt-card__body { padding: 16px 18px 18px; }
  .evt-grid--past .evt-card__date { font-size: 0.95rem; margin-bottom: 3px; }
  .evt-grid--past .evt-card__name { font-size: 1.25rem; margin-bottom: 5px; }
  .evt-grid--past .evt-card__loc { font-size: 0.8rem; margin-bottom: 12px; }
  .evt-grid--past .evt-card__body .shelf__open { font-size: 0.68rem; }
}

/* Mobile — APRÈS les règles de base : à spécificité égale, c'est l'ordre
   dans le fichier qui tranche. */
@media (max-width: 720px) {
  /* Cartes compactes : photo carrée à gauche, texte à droite — 3× plus dense. */
  .evt-grid { grid-template-columns: 1fr; gap: 14px; }
  /* min-height commune + lieu écrêté à 2 lignes : toutes les cartes
     compactes ont exactement la même hauteur. */
  .evt-card { flex-direction: row; min-height: 150px; }
  .evt-card__media { aspect-ratio: auto; width: 116px; flex: 0 0 116px; }
  /* L'image remplit la colonne sans imposer sa hauteur : la carte est
     dimensionnée par le texte, les hauteurs restent homogènes. */
  .evt-card__media img { position: absolute; inset: 0; }
  .evt-card__loc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .evt-card__ph { font-size: 0.56rem; padding: 8px; text-align: center; }
  .evt-card__badge { top: 8px; left: 8px; padding: 4px 9px; font-size: 0.58rem; }
  .evt-card__body { padding: 14px 16px 16px; }
  .evt-card__date { font-size: 0.94rem; margin-bottom: 2px; }
  .evt-card__name { font-size: 1.22rem; margin-bottom: 4px; }
  .evt-card__loc { font-size: 0.78rem; margin-bottom: 10px; }
  .evt-card__body .shelf__open { font-size: 0.68rem; }
  /* Hybride : les lieux « En cours » gardent leur photo pleine largeur. */
  .evt-card--featured { flex-direction: column; }
  .evt-card--featured .evt-card__media { width: auto; flex: initial; aspect-ratio: 3 / 2; }
  .evt-card--featured .evt-card__badge { top: 14px; left: 14px; padding: 6px 13px; font-size: 0.7rem; }
  .evt-card--featured .evt-card__body { padding: 18px 20px 22px; }
  .evt-card--featured .evt-card__date { font-size: 1.02rem; }
  .evt-card--featured .evt-card__name { font-size: 1.5rem; }
}
.ef-date { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--terracotta); margin: -10px 0 6px; }
.ef-meta { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; }
.evt-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 clamp(34px, 5vh, 50px); }
.evt-actions .btn .arr { transition: transform 0.35s ease; }
.evt-actions .btn:hover .arr { transform: translateX(5px); }
.expo-badge { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line); padding: 6px 13px; border-radius: 30px; color: var(--ink-soft); white-space: nowrap; }
.expo-badge.next { border-color: var(--terracotta); color: var(--terracotta); }

/* ============================================================ CONTACT */
.contact { text-align: center; position: relative; }
.contact__inner { position: relative; z-index: 1; }
.contact__big { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.06; letter-spacing: -0.02em; margin: 14px 0 0; }
.contact__big em { color: var(--terracotta); font-style: italic; }
.contact__big a { border-bottom: 2px solid transparent; transition: all 0.3s ease; }
.contact__big a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.contact__lead { color: var(--ink-soft); max-width: 40ch; margin: 24px auto 0; }
.contact__row { display: flex; gap: 16px 26px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.contact__row a { font-size: 0.84rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border: 1px solid var(--line); border-radius: 40px; transition: all 0.3s ease; }
.contact__row a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Newsletter */
.news { margin: 64px auto 0; max-width: 520px; padding-top: 44px; border-top: 1px solid var(--line); }
.news__title { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 20px; }
.news__title em { color: var(--terracotta); }
.news__row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.news__row input { flex: 1 1 240px; padding: 13px 20px; border: 1px solid var(--line); border-radius: 40px; background: var(--paper-card); font: inherit; font-size: 0.92rem; color: var(--ink); transition: border-color 0.3s ease; }
.news__row input::placeholder { color: var(--ink-faint); }
.news__row input:focus { outline: none; border-color: var(--ink); }
.news__hint { font-size: 0.78rem; color: var(--ink-faint); margin: 14px 0 0; }

/* ============================================================ FOOTER */
.footer { border-top: 1px solid var(--line); padding-block: 44px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 0.82rem; color: var(--ink-faint); }
.footer .brand { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.footer .brand em { color: var(--terracotta); font-style: italic; }
.footer__legal { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); transition: color 0.3s ease; }
.footer__legal:hover { color: var(--terracotta); }

/* ============================================================ REVEAL (sobre) */
.reveal, .reveal-img { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.d1, .reveal-img.d1 { transition-delay: 0.06s; }
.reveal.d2, .reveal-img.d2 { transition-delay: 0.12s; }
.reveal.d3, .reveal-img.d3 { transition-delay: 0.18s; }
@media (prefers-reduced-motion: no-preference) {
  html.reveal-on .reveal:not(.in),
  html.reveal-on .reveal-img:not(.in) { opacity: 0; transform: translateY(16px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ============================================================ ANNIVERSAIRE */
/* Écran surprise : message d'anniversaire → confettis → révélation du site.
   S'affiche à chaque visite (temporaire). */
#birthday {
  position: fixed; inset: 0; z-index: 2500;
  display: grid; place-items: center;
  padding: var(--gutter);
  text-align: center;
  background:
    radial-gradient(130% 90% at 50% -10%, var(--paper-card), var(--paper) 52%, var(--paper-deep));
  transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#birthday.birthday--out { opacity: 0; transform: scale(1.05); pointer-events: none; }

.birthday__card { width: 100%; max-width: 640px; margin-inline: auto; }
.birthday__card > * { animation: bdayRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.birthday__card > :nth-child(2) { animation-delay: 0.12s; }
.birthday__card > :nth-child(3) { animation-delay: 0.24s; }
.birthday__card > :nth-child(4) { animation-delay: 0.36s; }
.birthday__card > :nth-child(5) { animation-delay: 0.5s; }

.birthday__eyebrow {
  font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--terracotta); margin: 0 0 22px;
}
.birthday__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 9vw, 5.4rem); line-height: 1.04; margin: 0;
  overflow-wrap: break-word;
  color: var(--ink);
}
.birthday__title em { display: block; font-style: italic; color: var(--terracotta); }
.birthday__msg {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); color: var(--ink-soft);
  margin: 26px auto 40px; max-width: 30ch;
}
.birthday__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 34px; border: 0; border-radius: 44px;
  background: var(--terracotta); color: var(--paper-card);
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 18px 40px -16px rgba(192, 86, 47, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.birthday__btn:hover {
  transform: translateY(-2px); background: #a8451f;
  box-shadow: 0 24px 50px -16px rgba(192, 86, 47, 0.7);
}
.birthday__from {
  font-family: var(--serif); font-style: italic;
  font-size: 0.95rem; color: var(--ink-faint); margin: 30px 0 0;
}

.confetti-canvas { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }

@keyframes bdayRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .birthday__card > * { animation: none; }
}
