/* Galerie /merci — maquette B validée : en-tête « cocktails », voile noir, chapitres en mosaïque, sommaire flottant. */
body { text-align: left; }
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 16px; }

/* ——— En-tête ——— */
.hero { position: relative; height: min(82vh, 48rem); min-height: 26rem; overflow: hidden; background: #111; color: #fff; }
.hero picture, .hero img { display: block; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.5) 50%, rgba(0,0,0,.78) 100%); }
.hero-home { position: absolute; z-index: 2; top: max(1.25rem, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); }
.hero-home img { width: 7.5rem; height: auto; filter: brightness(0) invert(1); opacity: .92; }
.hero .over { position: absolute; z-index: 2; inset: auto 0 0 0; padding: 2rem 16px 2.75rem; text-align: center; }
.hero .kicker { margin: 0; font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.hero h1 { margin: .5rem 0; font-weight: normal; font-size: clamp(2.3rem, 8vw, 3.8rem); line-height: 1.08; }
.hero .over p:last-child { margin: 0; font-size: 1.15rem; }

/* ——— Chapitres ——— */
.chapter { text-align: center; margin: 3.25rem 0 1.25rem; scroll-margin-top: 1.5rem; }
.chapter h2 { margin: .25rem 0; font-size: 2rem; font-weight: normal; }
.chapter-n, .chapter-sub { margin: 0; color: var(--ink-soft); font-style: italic; }

/* ——— Mosaïque ——— */
.masonry { columns: 2; column-gap: 6px; }
@media (min-width: 48rem) { .masonry { columns: 3; column-gap: 10px; } }
.ph { display: block; break-inside: avoid; margin: 0 0 6px; padding: 0; border: 0; width: 100%; cursor: zoom-in; overflow: hidden; }
@media (min-width: 48rem) { .ph { margin-bottom: 10px; } }
.ph img { display: block; width: 100%; height: auto; transition: opacity .4s ease; }
.ph img:not(.on) { opacity: 0; }
.ph:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ph img { transition: none; } }

.outro { text-align: center; margin: 3.5rem 0 1rem; }
.outro p:first-child { font-size: 1.2rem; }
.credit { margin-top: 2rem; color: var(--ink-soft); font-size: .95rem; }

/* ——— Sommaire flottant ——— */
.toc { position: fixed; left: 1.5rem; top: 50%; z-index: 20; transform: translate(-.75rem, -50%); opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease; }
.toc.on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li + li { margin-top: 1.1rem; }
.toc a { display: block; position: relative; padding-left: 1rem; text-decoration: none; color: var(--ink-soft); line-height: 1.2; }
.toc a small { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.toc a span { font-size: 1rem; }
.toc a::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--ink); transform: scaleY(0); transition: transform .3s ease; }
.toc a[aria-current="true"] { color: var(--ink); }
.toc a[aria-current="true"]::before { transform: scaleY(1); }
.toc-toggle { display: none; }
@media (max-width: 89.99rem) {
  .toc { top: auto; bottom: max(1rem, env(safe-area-inset-bottom)); left: 1rem; transform: translateY(.75rem); }
  .toc.on { transform: none; }
  .toc-toggle { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: .95rem; color: var(--ink);
    background: rgba(242,241,238,.94); border: 1px solid var(--line); border-radius: 999px; padding: .5rem .95rem;
    box-shadow: 0 6px 20px rgba(42,72,100,.14); backdrop-filter: blur(6px); cursor: pointer; }
  .toc-toggle::before { content: "≡"; font-size: 1.1rem; line-height: 1; }
  .toc ol { position: absolute; bottom: calc(100% + .6rem); left: 0; min-width: 13rem; background: rgba(242,241,238,.97);
    border: 1px solid var(--line); border-radius: 6px; padding: .9rem 1rem .9rem .25rem; box-shadow: 0 10px 28px rgba(42,72,100,.16); display: none; }
  .toc.open ol { display: block; }
}
@media (prefers-reduced-motion: reduce) { .toc, .toc a::before { transition: none; } }

/* ——— Visionneuse ——— */
.lb { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(12,16,22,.97); color: #fff; touch-action: pan-y; }
.lb-fig { margin: 0; max-width: 100vw; display: flex; align-items: center; justify-content: center; }
.lb-fig img { max-width: 96vw; max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb > button, .lb-bar button { font: inherit; color: #fff; background: none; border: 0; cursor: pointer; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.8rem; padding: 1rem .8rem; opacity: .85; }
.lb-prev { left: 0; } .lb-next { right: 0; }
.lb-close { position: absolute; top: max(.6rem, env(safe-area-inset-top)); right: .4rem; font-size: 2.2rem; padding: .4rem .8rem; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem max(.9rem, env(safe-area-inset-bottom)); font: 15px/1.3 system-ui, sans-serif; }
.lb-actions { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.lb-actions a, .lb-link { color: #fff; text-decoration: underline; text-underline-offset: .2em; font: inherit; padding: 0; }
.lb-quiet { color: rgba(255,255,255,.7) !important; }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }
.toast { position: absolute; left: 50%; bottom: 4.4rem; transform: translate(-50%, 8px); max-width: 90vw; padding: .6rem 1rem; border-radius: 6px;
  background: #fff; color: #1d2a38; font: 14px/1.35 system-ui, sans-serif; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Formulaire de demande de retrait */
.removal { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(30rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); color: var(--ink); padding: 1.5rem; border-radius: 6px;
  font-family: var(--serif); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.removal h2 { margin: 0 0 .5rem; font-weight: normal; font-size: 1.4rem; }
.removal p { margin: 0 0 1rem; font-size: 1rem; }
.removal textarea { width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 2px; background: var(--field); color: var(--ink); font: inherit; font-size: 1rem; }
.removal-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }
.removal-actions .button { min-height: 2.75rem; padding: .5rem 1.1rem; font-size: 1rem; }
.removal .button-quiet { color: var(--ink); }
.removal .legal-note { margin-top: 1rem; }
.gallery-error { text-align: center; color: var(--ink-soft); font-style: italic; margin: 2rem 0; }
