/* The gallery continues through rooms, rather than a stack of editorial blocks. */
/* Every room sits below the same fine stone floor cross-section. */
/* The underside of the slab casts a small shadow onto each lower room. */
.artist-room::before, .home-exhibition::before, .home-contact::before { content: ''; position: absolute; z-index: 2; inset: 0 0 auto; height: clamp(18px, 2vw, 32px); background: linear-gradient(#141611, transparent); pointer-events: none; }
.home-story { background: #1c1f1a; }
.home-story h2 { font-size: clamp(34px, 3.2vw, 46px); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.home-story h2 em { color: #d5bc90; }
.home-copy { color: #d0c9ba; font: 400 15px/1.85 var(--sans); }
.home-copy p + p { margin-top: 22px; }
.home-caption { color: #c3bba9; font: 400 var(--label-size)/1.8 var(--sans); letter-spacing: .025em; }
.home-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
.home-story .text-link { font-size: 10px; letter-spacing: .1em; gap: 30px; }
.room-topline { position: absolute; z-index: 3; top: 32px; left: 10%; right: 10%; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.room-topline .eyebrow > span { margin-inline: 15px; color: #9b8e77; }
.room-topline .home-secondary-link { font-size: var(--label-size); }
.room-next { position: absolute; z-index: 3; bottom: 23px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; flex-direction: column; gap: 8px; min-height: 44px; color: #d9cfbb; font: 400 8px/1.6 var(--sans); text-transform: uppercase; letter-spacing: .13em; white-space: nowrap; }
.room-next > span:last-child { font: 24px/1 var(--serif); color: var(--gold); }
.home-passage { position: relative; }
.home-passage:focus { outline: none; }
/* Room anchors fill the viewport behind the transparent menu; only the WP toolbar reserves space. */
.gallery-sequence[id], .home-passage[id] { scroll-margin-top: calc(0px - var(--site-header-height) - 20px); }
.fresco-room, .artist-room { position: relative; height: 100svh; min-height: 780px; max-height: 1200px; isolation: isolate; overflow: clip; }
.fresco-room__world { position: absolute; inset: 0; }
.fresco-room .room-topline { top: calc(var(--site-top) + 10px); }
.fresco-room .room-topline .eyebrow, .fresco-room .room-topline .home-secondary-link { color: #eee8dc; text-shadow: 0 1px 5px rgb(0 0 0 / 70%); }
.fresco-room__architecture { position: absolute; inset: 0; background: url('images/fresco-room-close.webp') center / 100% 100% no-repeat; }
.fresco-room__architecture::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5%; background: linear-gradient(#141611, transparent); }
.fresco-room__architecture::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(9 10 8 / 60%), transparent 24%, transparent 57%, rgb(9 10 8 / 70%) 100%); }
.fresco-room__gallery { position: absolute; top: calc(var(--site-top) + 66px); bottom: 26%; left: 0; right: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.fresco-room__gallery::-webkit-scrollbar { display: none; }
.fresco-room__slide { flex: 0 0 100%; min-width: 0; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.fresco-room__mural a { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 3px; }
.fresco-room__mural img { width: auto; height: auto; max-width: 86%; max-height: 100%; object-fit: contain; box-shadow: 0 2px 2px rgb(0 0 0 / 35%); }
/* Only the room's viewport clips the moving photographs, never an inset slot in the wall. */
.has-passage .fresco-room__gallery { display: block; overflow: visible; scroll-snap-type: none; }
.has-passage .fresco-room__slide { position: absolute; inset: 0; }
.fresco-collection { display: grid; place-items: center; padding: 16px 28px; }
.fresco-collection__copy { width: min(100%, 520px); text-align: center; }
.fresco-collection__copy h3 { margin: 18px 0 20px; font: 400 clamp(30px, 3vw, 44px)/1.12 var(--serif); letter-spacing: -.025em; }
.fresco-collection__copy h3 em { color: #d5bc90; }
.fresco-collection__copy .home-copy { max-width: 440px; margin-inline: auto; }
.fresco-collection__copy .gallery-collection-link { margin-top: 26px; }
.fresco-selection { margin-top: 12px; }
.fresco-selection nav { display: flex; gap: 7px; }
.fresco-selection nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-inline: 7px; color: #c2b39a; font: 400 10px/1 var(--sans); font-variant-numeric: tabular-nums; }
.fresco-selection nav a > span { width: 28px; height: 1px; background: var(--gold); transform: scaleX(.2); transform-origin: left; opacity: .35; }
.fresco-selection nav a[aria-current] { color: #e0c599; }
.fresco-selection nav a[aria-current] > span { transform: scaleX(1); opacity: 1; }
.fresco-selection__label { visibility: hidden; margin-bottom: 12px; color: #d0c2aa; font: italic 19px/1.4 var(--serif); }
.is-fresco-ready .fresco-selection__label { visibility: visible; }
.fresco-room__copy { position: absolute; left: 8%; right: 8%; bottom: 7.5%; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 8%; }
.fresco-room__copy h2 br { display: none; }
.fresco-room__description { max-width: 430px; }

/* A quieter adjoining room, with a real portrait mounted independently of the scenery. */
.artist-room__architecture { position: absolute; z-index: -1; inset: -2%; background: linear-gradient(90deg, rgb(7 9 7 / 25%), rgb(7 9 7 / 16%) 65%, rgb(7 9 7 / 8%)), url('images/artist-room.webp') center / 100% 100% no-repeat; }
.artist-room__layout { position: absolute; top: 17%; bottom: 17%; left: 12%; right: 17%; display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1fr); gap: 14%; align-items: center; }
.artist-room__portrait { width: min(100%, 42svh); justify-self: center; }
.artist-room__portrait figcaption { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 22px; }
.artist-room__portrait figcaption > span:first-child { font: 400 21px/1.3 var(--serif); }
.artist-room__portrait .home-caption { font-size: var(--label-size); }
.artist-room__copy { max-width: 470px; }
.artist-room__copy h2 { margin-bottom: 30px; }
/* Pinned rooms are held by the motion engine; only their viewport height is fixed here. */
.has-passage .room-topline { top: calc(var(--site-top) + 10px); }
.has-passage > section { height: 100svh; min-height: 0; max-height: none; }
[data-room-scenery] { will-change: transform; transform-origin: 50% 50%; }

/* The date is lettering on the gallery wall; the invitation remains live HTML. */
.home-exhibition, .home-contact { position: relative; isolation: isolate; display: grid; align-items: center; min-height: max(740px, 100svh); overflow: clip; }
.home-exhibition { padding: 170px 12% 150px; }
.home-exhibition > .room-topline, .home-contact > .room-topline { top: calc(var(--site-top) + 22px); }
.exhibition-room__architecture { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgb(10 12 9 / 20%), rgb(10 12 9 / 8%) 60%, rgb(10 12 9 / 38%)), url('images/exhibition-room.webp') center top / 100% 100% no-repeat; }
.home-exhibition__layout { display: grid; width: 100%; max-width: 1280px; margin-inline: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 15%; }
.exhibition-inscription { justify-self: center; width: 100%; max-width: 370px; text-align: center; text-shadow: 0 2px 3px rgb(0 0 0 / 40%); }
.exhibition-inscription__venue { font: 400 clamp(32px, 3.2vw, 46px)/1.08 var(--serif); letter-spacing: -.025em; }
.exhibition-inscription__venue em { color: #d5bc90; }
.exhibition-inscription__date { display: flex; justify-content: center; align-items: center; gap: clamp(15px, 2vw, 30px); margin-top: 30px; color: #d5bc90; font: 400 clamp(64px, 6.3vw, 92px)/1 var(--serif); font-variant-numeric: lining-nums; letter-spacing: -.055em; }
.exhibition-inscription__dash { width: 40px; height: 1px; flex: 0 1 40px; background: #b79b6e; }
/* A month or a year replaces the day numbers when the dates are not precise. */
.exhibition-inscription__date--word { font-size: clamp(34px, 3.4vw, 50px); letter-spacing: -.02em; text-wrap: balance; }
.exhibition-inscription__month { margin-top: 16px; color: #e0d2ba; font: 400 11px/1.6 var(--sans); text-transform: uppercase; letter-spacing: .25em; }
.exhibition-inscription__month span { margin-left: 12px; }
.exhibition-inscription__artist { width: fit-content; margin: 36px auto 0; padding-top: 22px; border-top: 1px solid rgb(196 164 116 / 45%); color: #c9bfac; font: 400 10px/1.6 var(--sans); letter-spacing: .055em; }
.home-exhibition__copy { max-width: 425px; }
.home-exhibition__copy > .eyebrow, .home-contact__copy > .eyebrow { margin-bottom: 22px; }
.home-exhibition__copy h2, .home-contact__copy h2 { margin-bottom: 26px; }
.home-exhibition__copy .text-link { min-width: 240px; }
.home-exhibition .room-next { bottom: 35px; }
.room-title-line { display: block; }
/* Entrance lighting uses a translucent layer independently of the scroll-driven scenery. */
.room-light-cue { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.exhibition-room__light { background: linear-gradient(90deg, rgb(6 8 5 / 68%), rgb(6 8 5 / 28%) 60%, rgb(6 8 5 / 50%)); }
.contact-room__light { background: linear-gradient(90deg, rgb(6 8 5 / 72%), rgb(6 8 5 / 55%) 35%, transparent 55%); }

/* The last room opens into a warm adjoining space, leaving the wall for a conversation. */
.home-contact { padding: 160px 12% 150px 53%; }
.contact-room__architecture { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgb(9 11 8 / 14%), transparent 30%, rgb(9 11 8 / 12%) 75%, #191c18), url('images/contact-room.webp') center / 100% 100% no-repeat; }
.home-contact__copy { width: 100%; max-width: 430px; }
.home-contact__link { margin-top: 30px; min-width: 250px; }
.home-contact__social { margin-top: 38px; padding-top: 22px; border-top: 1px solid rgb(196 164 116 / 28%); }
.home-contact__social .social-links { margin-top: 12px; }
@media (max-width: 1100px) and (min-width: 761px) {
  .fresco-room__gallery { bottom: 30%; }
  .artist-room__layout { left: 9%; right: 16%; gap: 9%; }
  .home-story h2 { font-size: 34px; }
  .home-exhibition { padding-inline: 10%; }
  .home-exhibition__layout { gap: 11%; }
  .home-contact { padding-left: 49%; padding-right: 9%; }
}
@media (max-width: 760px) {
  .home-story h2 { font-size: 34px; }
  .home-copy { font-size: 14px; }
  .home-copy p + p { margin-top: 18px; }
  .home-story .text-link { font-size: 9px; }
  .room-topline { top: 22px; left: 28px; right: 28px; align-items: start; gap: 15px; }
  .room-topline .eyebrow { max-width: 180px; }
  .room-topline .eyebrow > span { margin-inline: 7px; }
  .room-topline .home-caption { font-size: var(--label-size); }
  .room-topline .home-secondary-link { min-height: 32px; font-size: var(--label-size); white-space: nowrap; gap: 8px; }
  .fresco-room { height: auto; min-height: 100svh; max-height: none; padding: calc(var(--site-top) + 72px) 28px 100px; }
  .fresco-room .room-topline { top: calc(var(--site-top) + 16px); }
  .fresco-room__world { position: static; }
  .fresco-room__architecture { z-index: -1; background-size: auto 100%; }
  .fresco-room__architecture::after { background: linear-gradient(180deg, rgb(9 10 8 / 60%), rgb(9 10 8 / 15%) 25%, rgb(9 10 8 / 60%) 55%, #1c1f1a); }
  .fresco-room__gallery { position: relative; inset: auto; width: calc(100% + 56px); margin-left: -28px; height: clamp(280px, 65vw, 350px); }
  .fresco-room__mural img { max-width: calc(100% - 32px); }
  .fresco-collection { padding-block: 10px; }
  .fresco-collection__copy h3 { font-size: 28px; margin: 12px 0 14px; }
  .fresco-collection__copy .home-copy { line-height: 1.7; }
  .fresco-collection__copy .gallery-collection-link { margin-top: 20px; }
  .fresco-selection nav { gap: 0; }
  .fresco-selection nav a { gap: 6px; padding-inline: 5px; font-size: 9px; }
  .fresco-selection nav a > span { width: 19px; }
  .fresco-selection__label { font-size: 17px; }
  .fresco-room__copy { position: relative; inset: auto; display: block; margin-top: 28px; }
  .fresco-room__copy h2 br { display: initial; }
  .fresco-room__description { margin-top: 25px; }
  .room-next { font-size: 7px; bottom: 20px; }
  .artist-room { height: auto; min-height: 100svh; max-height: none; padding: 108px 28px 105px; }
  .artist-room__architecture { background-size: auto 100%; background-position: 45% center; }
  .artist-room__layout { position: relative; inset: auto; display: flex; flex-direction: column; gap: 40px; }
  .artist-room__portrait { width: min(94%, 345px); margin-inline: auto; }
  .artist-room__portrait figcaption { padding-top: 20px; }
  .artist-room__portrait figcaption > span:first-child { font-size: 19px; }
  .artist-room__copy h2 { margin-bottom: 24px; }
  .home-actions { margin-top: 24px; gap: 9px; }
  .home-exhibition { padding: calc(var(--site-top) + 83px) 28px 125px; min-height: 0; }
  .home-exhibition > .room-topline, .home-contact > .room-topline { top: calc(var(--site-top) + 20px); }
  .home-exhibition > .room-topline { top: calc(var(--site-top) + 44px); }
  .home-exhibition > .room-topline .eyebrow { max-width: 170px; }
  .home-exhibition__layout { display: flex; flex-direction: column; gap: 50px; align-items: center; }
  .exhibition-room__architecture { background-size: auto 115%; }
  .exhibition-inscription { max-width: 280px; }
  .exhibition-inscription__venue { font-size: 32px; }
  .exhibition-inscription__date { font-size: 72px; margin-top: 20px; gap: 20px; }
  .exhibition-inscription__month { font-size: 9px; margin-top: 10px; }
  .exhibition-inscription__artist { margin-top: 25px; padding-top: 18px; font-size: 9px; }
  .home-exhibition__copy > .eyebrow, .home-contact__copy > .eyebrow { margin-bottom: 18px; }
  .home-exhibition__copy .text-link { min-width: 220px; }
  /* The copy follows the topline closely; the doorway photograph stays behind it. */
  .home-contact { min-height: 0; padding: calc(var(--site-top) + 118px) 28px 90px; align-items: start; }
  .contact-room__architecture { background-size: auto 660px; background-position: 25% top; background-color: #191c18; }
  .contact-room__architecture::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(17 19 16 / 20%), transparent 16%, rgb(25 28 24 / 85%) 42%, #191c18 75%); }
  .home-contact > .room-topline .home-caption { display: none; }
  .home-contact__copy { margin-inline: auto; }
  .home-contact__link { margin-top: 25px; min-width: 230px; }
  .home-contact__social { margin-top: 30px; padding-top: 20px; }
}
.home-artist-quote { margin: 0; }
.home-artist-quote em { color: var(--gold); }
.home-artist-quote cite { display: block; margin-top: 18px; font: italic 18px/1.5 var(--serif); color: var(--gold); }
/* Phones tall enough to hold the room: the frescoes cross under the still heading, as on large screens. */
@media (min-width: 360px) and (max-width: 760px) and (min-height: 640px) {
  /* The held room fills the screen actually visible (dvh follows the toolbar), and the fresco and its heading spread
     evenly between the topline and « La fresque suivante », which keeps to the foot of the screen. */
  .has-passage .fresco-room { height: 100svh; height: 100dvh; min-height: 0; padding-bottom: 84px; overflow-x: clip; overflow-y: visible; display: flex; flex-direction: column; justify-content: space-evenly; }
  /* Its dark floor continues below the held room when the phone toolbar hides. */
  .has-passage .fresco-room__architecture { bottom: calc(-1 * var(--toolbar-gap)); background-color: #1c1f1a; }
  /* Tall enough for the tallest fresco at full width, so the heading and its title stay above the floor line. */
  .has-passage .fresco-room__gallery { height: clamp(200px, calc(100dvh - 477px), 260px); }
  .has-passage .fresco-room__copy { margin-top: 0; }
  .has-passage .fresco-room__description { margin-top: 10px; }
  /* The last slide fits the held gallery: its eyebrow repeats the topline, so the title and the button keep their distance
     from « Quand l’œuvre devient un lieu. » below. */
  .has-passage .fresco-collection { padding-block: 0; }
  .has-passage .fresco-collection__copy .eyebrow { display: none; }
  .has-passage .fresco-collection__copy h3 { margin-top: 0; }
}
/* Shorter phones give the fresco the room of the introductory sentence; the fresco title stays. */
@media (min-width: 360px) and (max-width: 760px) and (min-height: 640px) and (max-height: 819px) {
  .has-passage .fresco-room__description .home-copy, .has-passage .fresco-collection__copy .home-copy { display: none; }
}
/* Until the wall pins (home.js), its scroll length is held by padding: the rooms below stay out of lazy-loading reach. */
.is-awaiting-wall { padding-bottom: 400vh; }
