/* Look and feel from Anaïs's Canva production book (Momentum): the invitation (page 4) and the moodboard (page 3).
   Palette: black, cocoa, gold, amber, white. Fonts: Vidaloka for the big "60", a script for accents, a classic serif for text. */

@font-face { font-family: "Vidaloka"; src: url("/fonts/vidaloka-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("/fonts/great-vibes-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson-pro-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Moodboard swatches */
  --night: #000000;
  --cocoa: #572512;
  --gold: #b27409;
  --amber: #f99d1f;
  --white: #ffffff;
  /* Derived */
  --ink: #f7f0e6;
  --muted: #c4b29c;
  --card: rgba(87, 37, 18, 0.32);
  --line: rgba(178, 116, 9, 0.5);
  --field: #0e0906;
  --on-amber: #140b03;
  --ok-text: #7fe0ae;
  --ok-soft: rgba(47, 163, 107, 0.18);
  --error-soft: rgba(214, 69, 61, 0.16);
  --error-line: rgba(214, 69, 61, 0.6);
  --door-ok: #15803d;
  --door-stop: #c0392b;
  --door-warn: #b45309;
  --qr-paper: #ffffff;
  --radius: 18px;
  --font-display: "Vidaloka", "Didot", "Bodoni 72", Georgia, serif;
  --font-script: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive;
  --font-text: "Crimson Pro", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 55% at 50% -8%, rgba(249, 157, 31, 0.17), transparent 62%), var(--night);
  color: var(--ink);
  font: 19px/1.5 var(--font-text);
}
[hidden] { display: none !important; }
a { color: var(--amber); }

.wrap { margin: 0 auto; padding: 12px 16px 56px; display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 560px; }
.wide { max-width: 1100px; padding-top: 28px; }

h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; color: var(--amber); }
h1 { font-size: clamp(2rem, 6vw, 2.6rem); }
h2 { font-size: 1.3rem; }
p { margin: 0; }
strong { font-weight: 700; }

.eyebrow { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; align-items: center; display: flex; flex-direction: column; }

/* ---------- The invitation (Anaïs's flyer) ---------- */
.flyer { margin: 0; }
.flyer img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 18px 60px rgba(249, 157, 31, 0.14); }
.welcome { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 10px; text-align: center; }
.greeting { font-family: var(--font-script); font-size: clamp(2.3rem, 11vw, 3rem); line-height: 1.15; color: var(--white); }
.when { color: var(--amber); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
/* Guest page: the party date, with the reply deadline right under it in an outlined pill so nobody misses it */
.key-dates { margin: 6px 0 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.95rem; }
.key-dates div { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.35em; }
.key-dates dt { color: var(--muted); }
.key-dates dd { margin: 0; font-weight: 700; color: var(--white); }
.key-dates .deadline { border: 1px solid var(--amber); border-radius: 999px; padding: 2px 14px; }
.key-dates .deadline dd { color: var(--amber); }
.place { display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 600; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cards, forms, buttons ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
/* Compact cards: text a step below the page's 19px, so a card reads as one block on a phone */
.card p, .card label, .card li { font-size: 1rem; }
.card .small { font-size: 0.85rem; }
.card .hint { font-size: 0.92rem; }
.card .eyebrow { font-size: 0.82rem; }
.notice { background: rgba(249, 157, 31, 0.12); border: 1px solid rgba(249, 157, 31, 0.55); border-radius: 12px; padding: 12px 14px; }
.notice.error { background: var(--error-soft); border-color: var(--error-line); }

button, .button {
  appearance: none; border: 0; border-radius: 999px; background: var(--amber); color: var(--on-amber);
  font: inherit; font-weight: 700; font-size: 1rem; padding: 12px 22px; cursor: pointer; text-decoration: none;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; transition: filter 0.15s;
}
button:hover, .button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.6; cursor: default; }
button.secondary, .button.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
button.link { background: none; color: var(--muted); text-decoration: underline; padding: 6px; font-weight: 400; font-size: 1rem; }
button:focus-visible, .button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 2px;
}
.buttons { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.buttons > * { flex: 1 1 180px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
input[type="number"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="text"], input[type="file"], textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--field); color: var(--ink); width: 100%;
}
.pay { display: flex; flex-direction: column; gap: 12px; }
.rsvp { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.names { display: flex; gap: 10px; }
.names label { flex: 1; min-width: 0; }
.help { margin-top: 14px; }
.help summary { cursor: pointer; color: var(--muted); text-decoration: underline; }
.help form { margin-top: 10px; }
.hint { color: var(--muted); font-size: 0.95rem; }
/* The pot's donation box from HelloAsso, opened inside the donation card (its own white page) */
.donation { display: flex; flex-direction: column; gap: 12px; }
.donation-box iframe.helloasso { display: block; width: 100%; max-width: 26rem; height: 640px; margin: 0 auto; border: 0; border-radius: 12px; background: var(--white); }

.ticket { align-items: center; text-align: center; }
.ticket h2 { font-size: 1.6rem; }
.qr { width: min(260px, 100%); background: var(--qr-paper); padding: 10px; border-radius: 14px; box-shadow: 0 0 0 3px var(--gold), 0 14px 44px rgba(249, 157, 31, 0.22); }
.qr svg { width: 100%; height: auto; display: block; transition: opacity 0.6s ease; }
.qr { position: relative; }
.ticket.used .qr svg { opacity: 0.12; }
.ticket.used .qr::after {
  content: "Utilisé"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.4rem; color: var(--cocoa); transform: rotate(-12deg);
}

.group { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.group li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge { font-size: 0.85rem; border-radius: 999px; padding: 3px 10px; background: rgba(255, 255, 255, 0.07); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }

.fake { border: 2px dashed var(--amber); }
.summary { display: grid; gap: 8px; margin: 14px 0; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(178, 116, 9, 0.25); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
/* Demo site only: a strip above every page */
.demo-bar { margin: 0; padding: 6px 16px; background: var(--amber); color: #000; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; text-align: center; }
td.links { display: flex; gap: 6px; }
.login { gap: 14px; }

/* ---------- Organiser page ---------- */
.admin-head, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-family: var(--font-display); color: var(--amber); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.92rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(178, 116, 9, 0.25); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.small-button { padding: 7px 14px; font-size: 0.92rem; }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack label { width: 100%; }
textarea { min-height: 120px; width: 100%; }
code { background: rgba(255, 255, 255, 0.07); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
summary { cursor: pointer; color: var(--muted); }

/* ---------- Door ---------- */
.door { max-width: 560px; padding-top: 24px; }
.door-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.camera { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 3 / 4; max-height: 60vh; display: grid; place-items: center; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera .big { position: absolute; font-size: 1.2rem; padding: 16px 26px; max-width: 90%; }
.result { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; gap: 10px; z-index: 10; cursor: pointer; }
.result.ok { background: var(--door-ok); }
.result.stop { background: var(--door-stop); }
.result.warn { background: var(--door-warn); }
.r-title { font-family: var(--font-display); font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: 1.1; color: var(--white); }
.r-sub { font-size: 1.35rem; color: var(--white); opacity: 0.94; }
.net { font-size: 0.95rem; display: flex; align-items: center; gap: 8px; margin-top: -6px; }
.net::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.net.on::before { background: var(--ok-text); }
.net.off { color: var(--amber); }
.net.off::before { background: var(--amber); }
#conflicts { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.matches li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(178, 116, 9, 0.25); }
.matches .who { display: flex; flex-direction: column; min-width: 0; }

@media (prefers-reduced-motion: no-preference) {
  .result { animation: pop 0.12s ease-out; }
  @keyframes pop { from { transform: scale(0.98); opacity: 0.6; } }
}

/* "Propulsé par LUNAS": one small, centred, muted line at the bottom of every page, like LUNAS's quote platform */
.powered { text-align: center; font-size: 12px; line-height: 1.2; padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.powered a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.powered a:hover { opacity: 0.7; }
.powered span { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; }
