/* Fête de Noël invite page (Bordeaux look).
   Layout: one centered column on phones; on wide screens the flyer and event info sit left, the reservation card right.
   Performance: every animation is transform or opacity only (runs on the phone's GPU). No blur filters on moving layers. */

:root {
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gold: #F4C542;
  --gold-ink: #17120a;
  --glow: 244, 197, 66;

  --bg: #3a0c1b;
  --bg-2: #1c060e;
  --bg-glow: rgba(200, 70, 100, 0.24);
  --on-bg: #FBF3E8;
  --on-bg-muted: #DAC3B8;
  --card-bg: rgba(255, 244, 232, 0.08);
  --card-line: rgba(244, 197, 66, 0.28);
  --card-fg: #FBF3E8;
  --card-muted: #DAC3B8;
  --card-head: #F8E4A8;
  --ghost-line: rgba(244, 197, 66, 0.55);
  --field-bg: #FFF9F0;
  --field-fg: #2a0c14;
  --field-line: #dfc8ba;
  --off-bg: rgba(255, 255, 255, 0.10);
  --off-fg: #D3B9AE;
  --err: #ffb4a8;
  --focus: #F4C542;
  --card-focus: #F4C542;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--on-bg);
  background-color: var(--bg);
  background-image:
    radial-gradient(90% 45% at 50% 0%, var(--bg-glow), transparent 72%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  padding-block: 16px 40px;
}

button, input, select { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- page grid ---------- */
.page {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "flyer" "details" "about" "order" "sponsors" "foot";
  gap: 18px;
}
.title-block { grid-area: title; }
.flyer-block { grid-area: flyer; }
.details { grid-area: details; }
.about { grid-area: about; }
.order { grid-area: order; }
.foot { grid-area: foot; }

@media (min-width: 960px) {
  body { padding-block: 32px 56px; }
  .page {
    max-width: 1140px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "flyer order"
      "details order"
      "about order"
      "sponsors sponsors"
      "foot foot";
    column-gap: 56px;
    row-gap: 24px;
    align-items: start;
  }
}

/* ---------- title ---------- */
.title-block { text-align: center; }
.title-btn {
  display: block;
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 24px;
  -webkit-tap-highlight-color: transparent;
}
.title-stack { display: grid; position: relative; }
.title-img {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  transition: opacity 0.55s ease;
  filter: drop-shadow(0 0 14px rgba(var(--glow), 0.35));
}
.title-btn[data-lang="fr"] .title-img[data-l="en"],
.title-btn[data-lang="en"] .title-img[data-l="fr"] { opacity: 0; }

/* shimmer: a light bar sweeps across the lettering only (masked to the current title image) */
.title-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-mask: var(--title-mask, none) center / 100% 100% no-repeat;
  mask: var(--title-mask, none) center / 100% 100% no-repeat;
}
.title-stack.is-shimmer::after { animation: title-shimmer 1.4s cubic-bezier(.3, .1, .3, 1) 1; }
@keyframes title-shimmer {
  0% { background-position: 130% 0; opacity: 1; }
  100% { background-position: -30% 0; opacity: 1; }
}

/* ---------- flyer ---------- */
.flyer-block { position: relative; isolation: isolate; }
/* soft gold halo behind the flyer; only its opacity pulses */
.flyer-block::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 44px;
  background: rgba(var(--glow), 0.6);
  filter: blur(34px);
  opacity: 0.6;
  animation: halo 5s ease-in-out infinite;
  will-change: opacity;
}
@keyframes halo { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.95; } }

.flyer {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 3px var(--gold), 0 0 28px rgba(var(--glow), 0.6), 0 0 70px rgba(var(--glow), 0.32);
  transition: opacity 0.2s;
}
.flyer.is-lifted { opacity: 0; }
.flyer img { display: block; width: 100%; height: auto; }

/* ---------- sheen (light bar that sweeps across) ---------- */
.sheen { position: relative; overflow: hidden; isolation: isolate; }
.sheen::after {
  content: "";
  position: absolute;
  top: -25%;
  bottom: -25%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.62) 50%, transparent 100%);
  transform: translateX(0) skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}
.flyer::after { animation: sheen-once 1.5s cubic-bezier(.35, .1, .25, 1) 0.7s 1 both; }
@keyframes sheen-once {
  0% { transform: translateX(0) skewX(-20deg); opacity: 1; }
  100% { transform: translateX(480%) skewX(-20deg); opacity: 1; }
}
@keyframes sheen-loop {
  0% { transform: translateX(0) skewX(-20deg); opacity: 1; }
  38% { transform: translateX(480%) skewX(-20deg); opacity: 1; }
  100% { transform: translateX(480%) skewX(-20deg); opacity: 1; }
}

/* ---------- cards ---------- */
.card {
  background: var(--card-bg);
  color: var(--card-fg);
  border: 1px solid var(--card-line);
  border-radius: 24px;
  padding: 20px 33px 22px;
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.6);
}
.card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: var(--card-head);
}
.card p { margin: 0; }

/* details (compact) */
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.fact { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; }
/* detail icons are image files (assets/icon-*.svg). Replace them with your own art; the image fills this 36px slot. */
.ico { width: 36px; height: 36px; display: block; flex: none; }
.fact-label { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--card-muted); line-height: 1.3; }
.fact-value { font-size: 18px; font-weight: 600; line-height: 1.25; }
.fact-sub { color: var(--card-muted); font-size: 14px; line-height: 1.3; }
.map-link { display: block; color: inherit; text-decoration: none; border-radius: 8px; }
.map-link .fact-value, .map-link .fact-sub { display: block; }
.map-link .fact-sub { text-decoration: underline; text-decoration-color: rgba(var(--glow), 0.6); text-underline-offset: 3px; }
.map-link:hover .fact-value { text-decoration: underline; text-decoration-color: rgba(var(--glow), 0.6); text-underline-offset: 3px; }
.pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(var(--glow), 0.16);
  border: 1px solid rgba(var(--glow), 0.65);
  color: var(--card-fg);
  font-size: 14px;
  font-weight: 600;
}
.cal { margin-top: 16px; display: flex; gap: 10px; }
.btn-ghost {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--card-fg);
  background: transparent;
  border: 1.5px solid var(--ghost-line);
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
}
.btn-ghost svg { width: 18px; height: 18px; flex: none; }
.btn-ghost:hover { border-color: var(--gold); }

/* about */
.about h2 + p { margin-top: 10px; }
.about p + p { margin-top: 10px; }

/* ---------- reservation card ---------- */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(var(--glow), 0.16);
  border: 1px solid rgba(var(--glow), 0.65);
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.chip .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.chip.is-low .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(var(--glow), 0.75);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

.steps { list-style: none; counter-reset: step; margin: 14px 0 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.steps li {
  counter-increment: step;
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 600;
  color: var(--card-muted);
  --ncontent: counter(step);
  --nbg: transparent; --nfg: var(--card-muted); --nline: var(--card-line);
  min-width: 0;
}
.steps li:not(:last-child) { flex: 1 1 auto; }
.steps li::before {
  content: var(--ncontent);
  flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  background: var(--nbg); color: var(--nfg);
  border: 2px solid var(--nline);
}
.steps li:not(:last-child)::after { content: ""; flex: 1 1 0; height: 2px; min-width: 0; background: var(--card-line); }
.order .steps li[data-step="1"] { color: var(--card-fg); --nbg: var(--gold); --nfg: var(--gold-ink); --nline: var(--gold); }
.order.is-ready .steps li[data-step="1"],
.order.is-reserved .steps li[data-step="1"],
.order.is-reserved .steps li[data-step="2"] { color: var(--card-muted); --ncontent: "\2713"; --nbg: transparent; --nfg: var(--card-fg); --nline: var(--gold); }
.order.is-ready .steps li[data-step="2"],
.order.is-reserved .steps li[data-step="3"] { color: var(--card-fg); --ncontent: counter(step); --nbg: var(--gold); --nfg: var(--gold-ink); --nline: var(--gold); }

.field { display: grid; gap: 4px; margin-top: 12px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field select {
  width: 100%; min-height: 44px; padding: 8px 14px;
  font-size: 16px;
  color: var(--field-fg); background: var(--field-bg);
  border: 1.5px solid var(--field-line); border-radius: 12px;
}
.field input::placeholder { color: #7b786f; }
.field input:focus, .field select:focus { outline: 3px solid var(--card-focus); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field input:disabled, .field select:disabled { opacity: 0.72; cursor: not-allowed; }
.field-err { margin: 0; color: var(--err); font-size: 14.5px; font-weight: 500; }
.field-err:empty { display: none; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 42px; }
.select-wrap::after {
  content: ""; position: absolute; right: 17px; top: 50%;
  width: 8px; height: 8px; margin-top: -7px;
  border-right: 2px solid var(--field-fg); border-bottom: 2px solid var(--field-fg);
  transform: rotate(45deg); pointer-events: none;
}
#fete-guests { display: grid; gap: 8px; margin-top: 8px; }
#fete-guests input {
  width: 100%; min-height: 44px; padding: 8px 14px; font-size: 16px;
  color: var(--field-fg); background: var(--field-bg);
  border: 1.5px solid var(--field-line); border-radius: 12px;
}
#fete-guests input:disabled { opacity: 0.72; }
#fete-guests input:focus { outline: 3px solid var(--card-focus); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--card-line);
}
.total-row span { font-size: 15px; font-weight: 600; }
.total-row strong { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--card-head); }
.form-err { margin-top: 10px; color: var(--err); font-weight: 500; font-size: 15px; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  font-size: 17px; font-weight: 600;
  border: 2px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: background 0.35s, color 0.35s, box-shadow 0.45s, border-color 0.35s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; }
.btn:active:not(:disabled) { transform: scale(0.985); }

.btn-reserve {
  width: 100%; margin-top: 16px;
  background: transparent; color: var(--card-fg); border-color: var(--gold);
}
.btn-reserve .lbl-after { display: none; align-items: center; gap: 8px; }
.order.is-ready .btn-reserve {
  background: var(--gold); color: var(--gold-ink); border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.5), 0 0 20px rgba(var(--glow), 0.5), 0 0 44px rgba(var(--glow), 0.22);
}
.order.is-ready .btn-reserve::after { animation: sheen-loop 2.8s ease-in-out infinite; }
.order.is-reserved .btn-reserve {
  background: transparent; color: var(--card-muted); border-color: var(--card-line); box-shadow: none; cursor: default;
}
.order.is-reserved .btn-reserve .lbl-before { display: none; }
.order.is-reserved .btn-reserve .lbl-after { display: inline-flex; }
.btn-reserve:disabled { cursor: default; }

.hint { margin-top: 10px; text-align: center; color: var(--card-muted); font-size: 15px; }
.hint .hint-after { display: none; color: var(--card-fg); font-weight: 600; }
.order.is-reserved .hint .hint-before { display: none; }
.order.is-reserved .hint .hint-after { display: inline; }

.pay { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--card-line); }
.pay-title {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; color: var(--card-head);
}
.pay-row { margin-top: 12px; display: flex; gap: 10px; }
.btn-pay {
  flex: 1 1 0; min-width: 0; padding: 0 10px; white-space: nowrap;
  background: var(--off-bg); color: var(--off-fg); border-color: transparent; cursor: not-allowed;
}
.btn-pay .ico-lock { width: 18px; height: 18px; }
.btn-pay.is-active {
  background: var(--gold); color: var(--gold-ink); cursor: pointer;
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.6), 0 0 22px rgba(var(--glow), 0.55), 0 0 52px rgba(var(--glow), 0.26);
}
.btn-pay.is-active .ico-lock { display: none; }
.btn-pay.is-active::after { animation: sheen-loop 3.4s ease-in-out infinite; }
.pay-note {
  margin-top: 12px; padding: 10px 14px; border-radius: 14px;
  background: rgba(var(--glow), 0.12); border: 1px solid rgba(var(--glow), 0.45);
  font-size: 15px;
}
.pay-note p + p { margin-top: 4px; }

/* sold out / waitlist */
.soldout p { margin-top: 10px; }
#fete-waitlist-form .btn {
  width: 100%; margin-top: 16px; background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.6), 0 0 22px rgba(var(--glow), 0.55), 0 0 52px rgba(var(--glow), 0.26);
}
#fete-waitlist-form .btn::after { animation: sheen-loop 2.8s ease-in-out infinite; }
#fete-waitlist-form .btn:disabled { opacity: 0.6; }
.done { margin-top: 14px; font-weight: 600; }

/* footer */
.foot { text-align: center; color: var(--on-bg-muted); font-size: 16px; }
.foot p { margin: 0; }
.foot p + p { margin-top: 4px; font-size: 14.5px; }
.foot strong { color: var(--on-bg); font-weight: 600; }

/* ---------- flyer viewer ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0);
  touch-action: none; overscroll-behavior: contain;
  -webkit-user-select: none; user-select: none;
  transition: background 0.35s ease;
}
.lb.is-shown { background: rgba(0, 0, 0, 0.92); }
.lb-img {
  position: absolute; max-width: none; border-radius: 20px;
  will-change: transform; -webkit-user-drag: none;
  box-shadow: 0 0 0 2px rgba(var(--glow), 0.6), 0 0 50px rgba(var(--glow), 0.3);
}
.lb-btn {
  display: grid; place-items: center;
  width: 54px; height: 54px; padding: 0;
  color: #fff; background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 50%;
  cursor: pointer;
}
.lb-btn svg { width: 24px; height: 24px; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.lb-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.lb-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
}
.lb-controls {
  position: absolute; left: 0; right: 0;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; gap: 16px;
}
.lb-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + 70px);
  margin: 0; padding: 0 16px; text-align: center;
  color: #fff; font-size: 16px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  transition: opacity 0.6s; pointer-events: none;
}
.lb-hint.is-faded { opacity: 0; }
html.lb-open { overflow: hidden; }

/* toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + 96px);
  z-index: 120; max-width: min(92vw, 460px);
  padding: 12px 18px; border-radius: 16px;
  background: #fff; color: #14110a; font-size: 15px; font-weight: 500; text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 380px) {
  body { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .card { padding: 18px 24px 20px; }
  .card h2 { font-size: 24px; }
  .steps { gap: 4px; }
  .steps li { font-size: 13.5px; gap: 5px; }
  .steps li::before { width: 22px; height: 22px; font-size: 12px; }
}

/* ---------- about the evening: artists button ---------- */
.about-actions { margin-top: 16px; display: flex; }
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--gold);
  background: rgba(var(--glow), 0.14);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.45), 0 0 18px rgba(var(--glow), 0.4);
}

/* ---------- artists page (single column) ---------- */
.page-solo { max-width: 640px; grid-template-areas: "title" "artists" "return"; }
@media (min-width: 960px) {
  .page-solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "artists" "return"; column-gap: 0; }
}
.artists { grid-area: artists; }
.return-row { grid-area: return; display: flex; justify-content: center; }
.btn-return {
  width: 100%; text-decoration: none;
  background: var(--gold); color: var(--gold-ink); border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(var(--glow), 0.5), 0 0 20px rgba(var(--glow), 0.5), 0 0 44px rgba(var(--glow), 0.22);
}
.btn-return::after { animation: sheen-loop 2.8s ease-in-out infinite; }

/* ---------- sponsors (logos drift left, fading at both ends) ---------- */
.sponsors { grid-area: sponsors; text-align: center; }
.sponsors h2 {
  margin: 0 0 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; color: var(--card-head);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.marquee-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; width: max-content;
  animation: marquee var(--marquee-dur, 24s) linear infinite;
  will-change: transform;
}
.marquee-track li { flex: none; padding: 0 22px; display: flex; align-items: center; }
.marquee-track img { display: block; height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .marquee-track li[data-clone] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
