/* portfolio.html — big photos on a deep, warm near-black. Every photo once, no captions; each opens the lightbox.
   Desktop: one or two frames per row, most near full width, many full-bleed. Phones: every photo edge to edge.
   Static by default (no JS, reduced motion, « Moins de mouvement »): all frames visible, nothing moves.
   html.pf-motion (set by js/pages.js) adds the staggered reveal and the parallax inside frames. */
html:has(body.pf) { background: #100d0b; }
body.pf { background: #100d0b; color: #efe6da; }
body.pf .pf-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px) clamp(80px, 10vw, 160px);
  overflow-x: clip;
}
body.pf .pf-back { margin: 0; padding-top: 28px; font-size: 0.85rem; letter-spacing: 0.04em; }
body.pf .pf-back a { color: #d6b48f; }

/* intro: serif, light on dark, lots of air */
body.pf .pf-intro { max-width: 40rem; margin: clamp(64px, 11vw, 160px) 0 clamp(56px, 8vw, 120px) clamp(0px, 6vw, 96px); }
body.pf .pf-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: #f6eee3;
}
body.pf .pf-intro p {
  margin: clamp(22px, 3vw, 36px) 0 0;
  padding-left: clamp(0px, 6vw, 96px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.45;
  color: rgba(239, 230, 218, 0.7);
}
body.pf .pf-intro p::before { content: ""; display: block; width: 48px; height: 1px; margin-bottom: 18px; background: rgba(214, 180, 143, 0.6); }

/* rows: one or two big frames */
body.pf .pf-gallery { display: block; }
body.pf .pf-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.4vw, 40px);
  margin: 0 0 clamp(40px, 7vw, 112px);
}
body.pf .pf-start { justify-content: flex-start; }
body.pf .pf-end { justify-content: flex-end; }
body.pf .pf-center { justify-content: center; }
body.pf .pf-between { justify-content: space-between; }
body.pf .pf-full { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

body.pf .pf-shot {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: var(--w, 80%);
  aspect-ratio: var(--ar, 3 / 2);
  max-height: 94vh;
  margin: 0;
  margin-top: var(--dy, 0);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #1d1814;
  overflow: hidden;
  overflow: clip; /* clip keeps view() timelines alive (hidden would make a scroll container) */
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
body.pf .pf-full .pf-shot { width: 100%; }
body.pf .pf-plx { position: absolute; inset: 0; display: block; }
body.pf .pf-shot img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 1.8s cubic-bezier(0.2, 0.6, 0.2, 1), filter 1.2s ease;
}
body.pf .pf-shot:focus-visible { outline: 2px solid #d6b48f; outline-offset: 4px; }

/* desktop hover: slow zoom and a quiet return to full colour */
@media (hover: hover) and (pointer: fine) {
  body.pf .pf-shot img { filter: saturate(0.72) brightness(0.94); }
  body.pf .pf-shot:hover img, body.pf .pf-shot:focus-visible img { filter: none; transform: scale(1.035); }
}

/* motion on: staggered reveal + parallax (the image layer is taller than its frame) */
html.pf-motion body.pf .pf-plx { inset: -6% 0; }
html.pf-motion body.pf .pf-shot {
  opacity: 0;
  transform: translate3d(0, 48px, 0);
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: calc(var(--k, 0) * 180ms);
}
html.pf-motion body.pf .pf-shot .pf-plx {
  clip-path: inset(10% 0 0 0);
  transition: clip-path 1.5s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: calc(var(--k, 0) * 180ms);
}
html.pf-motion body.pf .pf-shot.is-in { opacity: 1; transform: none; }
html.pf-motion body.pf .pf-shot.is-in .pf-plx { clip-path: inset(0 0 0 0); }
@supports (animation-timeline: view()) {
  html.pf-motion:not(.pf-js) body.pf .pf-plx {
    animation: pf-drift linear both;
    animation-timeline: view(block);
    animation-range: cover 0% cover 100%;
  }
}
@keyframes pf-drift { from { transform: translate3d(0, -5%, 0); } to { transform: translate3d(0, 5%, 0); } }

/* phones: every photo full width, edge to edge */
@media (max-width: 720px) {
  body.pf .pf-main { padding-left: 18px; padding-right: 18px; }
  body.pf .pf-intro { margin: 64px 0 48px; }
  body.pf .pf-row {
    flex-direction: column;
    gap: 6px;
    width: 100vw;
    margin: 0 0 6px calc(50% - 50vw);
  }
  body.pf .pf-row:nth-child(4n) { margin-bottom: 36px; }
  body.pf .pf-shot, body.pf .pf-full .pf-shot { width: 100%; margin-top: 0; max-height: none; }
  body.pf .pf-full .pf-shot { aspect-ratio: 4 / 3; }
  html.pf-motion body.pf .pf-shot { transform: translate3d(0, 24px, 0); transition-delay: 0ms; }
  html.pf-motion body.pf .pf-shot .pf-plx { transition-delay: 0ms; }
}

/* reduced motion: everything visible and still */
@media (prefers-reduced-motion: reduce) {
  html body.pf .pf-shot { opacity: 1 !important; transform: none !important; transition: none !important; }
  html body.pf .pf-plx { animation: none !important; transform: none !important; inset: 0 !important; clip-path: none !important; }
  html body.pf .pf-shot img { transition: filter 0.4s ease; transform: none !important; }
}
html.lpm-still body.pf .pf-shot { opacity: 1 !important; transform: none !important; transition: none !important; }
html.lpm-still body.pf .pf-plx { animation: none !important; transform: none !important; inset: 0 !important; clip-path: none !important; }
html.lpm-still body.pf .pf-shot img { transform: none !important; }

/* footer on the dark page */
body.pf footer.site { background: #0b0908; color: rgba(239, 230, 218, 0.75); border-top: 1px solid rgba(239, 230, 218, 0.1); }
body.pf footer.site a { color: #d6b48f; }

/* Lightbox (same look as the home page) */
body.pf .lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 12, 10, 0.97);
  color: #f3ede4;
  overflow: hidden;
  touch-action: pan-y;
}
body.pf .lightbox[open] { display: flex; align-items: center; justify-content: center; }
body.pf .lightbox::backdrop { background: rgba(14, 12, 10, 0.9); }
body.pf .lb-stage { margin: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 64px 88px; }
body.pf .lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 2px;
  object-fit: contain;
  transition: opacity 0.45s ease;
  user-select: none;
  -webkit-user-drag: none;
}
body.pf .lightbox img.is-loading { opacity: 0; }
body.pf .lb-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(243, 237, 228, 0.28);
  background: transparent;
  color: #f3ede4;
  cursor: pointer;
}
body.pf .lb-btn:hover { background: rgba(243, 237, 228, 0.1); border-color: rgba(243, 237, 228, 0.6); }
body.pf .lb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
body.pf .lb-close { top: 18px; right: 18px; }
body.pf .lb-prev { left: 20px; top: 50%; margin-top: -24px; }
body.pf .lb-next { right: 20px; top: 50%; margin-top: -24px; }
body.pf .lb-count {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: rgba(243, 237, 228, 0.6);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  body.pf .lb-stage { padding: 64px 0; }
  body.pf .lb-prev, body.pf .lb-next { top: auto; bottom: 10px; margin-top: 0; width: 44px; height: 44px; }
  body.pf .lb-prev { left: 16px; }
  body.pf .lb-next { right: 16px; }
  body.pf .lb-count { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { body.pf .lightbox img { transition: none; } }
html.lpm-still body.pf .lightbox img { transition: none; }

/* ---------- Ending: night spa photo + line, dates & prices, three reviews, light practical info, two buttons ---------- */
body.pf .pf-end { margin-top: clamp(96px, 12vw, 180px); }
body.pf .pf-kicker {
  margin: 0 0 18px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #c9a07a;
  text-align: center;
}

/* full-screen night photo with one line over it */
body.pf .pf-end-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  overflow: clip;
  background: #0b0908;
}
body.pf .pf-end-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 40%;
}
body.pf .pf-end-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(16, 13, 11, 0) 30%, rgba(16, 13, 11, 0.45) 100%),
    linear-gradient(to bottom, rgba(16, 13, 11, 0.55) 0%, rgba(16, 13, 11, 0) 22%, rgba(16, 13, 11, 0) 62%, #100d0b 100%);
}
body.pf .pf-end-line {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: clamp(56px, 14vh, 140px);
  width: min(92%, 22em);
  transform: translateX(-50%);
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.15;
  text-align: center;
  color: #fbf6ef;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

/* dates + prices */
body.pf .pf-dates { max-width: 860px; margin: clamp(56px, 7vw, 96px) auto 0; }
body.pf .pf-dates-hint { margin: 0 auto 28px; max-width: 34em; text-align: center; font-size: 0.95rem; font-weight: 300; line-height: 1.6; color: rgba(239, 230, 218, 0.78); }
body.pf .pf-cal { position: relative; min-height: 120px; }
body.pf .pf-cal-note { text-align: center; color: rgba(239, 230, 218, 0.7); font-size: 0.92rem; margin: 40px 0 20px; }
body.pf .pf-cal > .pf-btn { display: flex; width: max-content; margin: 0 auto; }
body.pf .pf-cal-nav { position: absolute; top: -4px; left: 0; right: 0; display: flex; justify-content: space-between; pointer-events: none; z-index: 1; }
body.pf .pf-cal-arrow {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(239, 230, 218, 0.22);
  background: transparent;
  color: #efe6da;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
body.pf .pf-cal-arrow:disabled { opacity: 0.25; cursor: default; }
body.pf .pf-cal-arrow:not(:disabled):hover { border-color: rgba(239, 230, 218, 0.6); }
body.pf .pf-cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); }
body.pf .pf-month-title {
  margin: 6px 0 18px;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  color: #f6efe5;
  text-transform: capitalize;
}
body.pf .pf-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
body.pf .pf-wd { text-align: center; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(239, 230, 218, 0.45); padding-bottom: 6px; }
body.pf .pf-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1 / 1;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(239, 230, 218, 0.04);
  color: #efe6da;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
body.pf .pf-day-empty { background: none; cursor: default; }
body.pf .pf-day-n { font-size: 0.92rem; line-height: 1; }
body.pf .pf-day-p { font-size: 0.62rem; line-height: 1; color: #c9a07a; letter-spacing: 0.02em; }
body.pf .pf-day:not(:disabled):hover { border-color: rgba(214, 180, 143, 0.6); }
body.pf .pf-day:focus-visible { outline: 1px solid #d6b48f; outline-offset: 2px; }
body.pf .pf-day.is-off { background: none; color: rgba(239, 230, 218, 0.22); cursor: default; }
body.pf .pf-day.is-taken { text-decoration: line-through; text-decoration-color: rgba(239, 230, 218, 0.25); }
body.pf .pf-day.is-mid { background: rgba(168, 97, 63, 0.28); }
body.pf .pf-day.is-in, body.pf .pf-day.is-out { background: #a8613f; color: #fffaf4; text-decoration: none; }
body.pf .pf-day.is-in .pf-day-p, body.pf .pf-day.is-out .pf-day-p, body.pf .pf-day.is-mid .pf-day-p { color: #fbe7d6; }
body.pf .pf-sum { margin-top: 28px; text-align: center; }
body.pf .pf-sum-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(239, 230, 218, 0.12); border-bottom: 1px solid rgba(239, 230, 218, 0.12); }
body.pf .pf-sum-cell { padding: 16px 8px; display: flex; flex-direction: column; gap: 6px; }
body.pf .pf-sum-cell + .pf-sum-cell { border-left: 1px solid rgba(239, 230, 218, 0.12); }
body.pf .pf-sum-k { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: #c9a07a; }
body.pf .pf-sum-v { font-size: 1rem; color: #f6efe5; text-transform: capitalize; }
body.pf .pf-sum-v.is-empty { color: rgba(239, 230, 218, 0.4); text-transform: none; }
body.pf .pf-sum-total { margin: 20px 0 0; display: flex; justify-content: center; align-items: baseline; gap: 18px; flex-wrap: wrap; color: rgba(239, 230, 218, 0.8); }
body.pf .pf-sum-total strong { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 1.7rem; color: #fbf6ef; }
body.pf .pf-sum-msg { margin: 14px 0 0; font-size: 0.9rem; color: #e3b48e; }
body.pf .pf-sum-msg.is-soft { color: rgba(239, 230, 218, 0.6); }
body.pf .pf-sum-go { margin: 22px 0 0; }

/* reviews */
body.pf .pf-revs { max-width: 1180px; margin: clamp(88px, 11vw, 150px) auto 0; }
body.pf .pf-rev-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
body.pf .pf-rev {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 36px);
  border: 1px solid rgba(239, 230, 218, 0.1);
  border-radius: 4px;
  background: rgba(239, 230, 218, 0.03);
}
body.pf .pf-rev-stars { color: #c9a07a; letter-spacing: 0.2em; font-size: 0.8rem; }
body.pf .pf-rev-text {
  flex: 1;
  margin: 16px 0 22px;
  white-space: pre-line;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.5;
  color: #efe6da;
}
body.pf .pf-rev-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; color: rgba(239, 230, 218, 0.55); }
body.pf .pf-rev-who { color: #efe6da; letter-spacing: 0.08em; }

/* light practical info */
body.pf .pf-light { max-width: 720px; margin: clamp(80px, 10vw, 130px) auto 0; }
body.pf .pf-light-list { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px clamp(24px, 4vw, 48px); }
body.pf .pf-light-list > div { display: flex; flex-direction: column; gap: 4px; }
body.pf .pf-light-list dt { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(201, 160, 122, 0.85); }
body.pf .pf-light-list dd { margin: 0; font-size: 0.92rem; font-weight: 300; line-height: 1.55; color: rgba(239, 230, 218, 0.78); }

/* the two last buttons */
body.pf .pf-end-btns { margin: clamp(64px, 8vw, 104px) 0 0; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
body.pf .pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #a8613f;
  color: #fffaf4;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.25s ease;
}
body.pf .pf-btn:hover { background: #8c4f33; box-shadow: 0 10px 28px -12px rgba(140, 79, 51, 0.8); transform: translateY(-1px); }
body.pf .pf-btn-ghost { background: transparent; color: #efe6da; border-color: rgba(239, 230, 218, 0.32); }
body.pf .pf-btn-ghost:hover { background: rgba(239, 230, 218, 0.06); border-color: rgba(239, 230, 218, 0.7); box-shadow: none; }
body.pf .pf-btn:focus-visible { outline: 1px solid #d6b48f; outline-offset: 4px; }

/* gentle reveal (only when js/pf-end.js allows motion) */
html.pf-end-motion body.pf .pf-dates, html.pf-end-motion body.pf .pf-revs,
html.pf-end-motion body.pf .pf-light, html.pf-end-motion body.pf .pf-end-btns {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.2, 0.6, 0.2, 1);
}
html.pf-end-motion body.pf .pf-end-hero img { transform: scale(1.08); transition: transform 2.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
html.pf-end-motion body.pf .pf-end-line { opacity: 0; transition: opacity 1.6s ease 0.5s; }
html.pf-end-motion body.pf .is-in-view { opacity: 1; transform: none; }
html.pf-end-motion body.pf .pf-end-hero.is-in-view img { transform: scale(1); }
html.pf-end-motion body.pf .pf-end-hero.is-in-view .pf-end-line { opacity: 1; }

@media (max-width: 720px) {
  body.pf .pf-end-hero { height: 88svh; }
  body.pf .pf-end-line { bottom: 64px; font-size: 2rem; }
  body.pf .pf-grid { gap: 3px; }
  body.pf .pf-day { min-height: 42px; border-radius: 4px; }
  body.pf .pf-day-p { font-size: 0.58rem; }
  body.pf .pf-rev-list { grid-template-columns: 1fr; }
  body.pf .pf-light-list { grid-template-columns: 1fr; }
  body.pf .pf-end-btns { flex-direction: column; align-items: stretch; }
  body.pf .pf-btn { width: 100%; min-height: 50px; }
  body.pf .pf-sum-go .pf-btn { width: 100%; }
}
html.lpm-still body.pf .pf-btn, html.lpm-still body.pf .pf-day { transition: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.pf .pf-btn, body.pf .pf-day { transition: none; transform: none !important; }
}
