:root {
  --ground: #FAF8F5;
  --raised: #FFFFFF;
  --sunk:   #F3EDE4;
  --line:   #EAE1D6;
  --line-2: #DCD0C0;
  --ink:    #1F1C18;
  --ink-2:  #635C53;
  --ink-3:  #948C80;
  --ok:     #3B7A57;
  --wait:   #547A9A;
  --brand:  #B88655;
  --brand-dark: #8F5E33;
  --brand-light: #FBF4ED;
  --brand-glow: rgba(184, 134, 85, 0.18);
  --sans: "Plus Jakarta Sans", "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", "Instrument Serif", "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

button { font-family: var(--sans); cursor: pointer; }
button:disabled { cursor: not-allowed; }

.wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 20px;
}

.pad-top { padding-top: max(28px, env(safe-area-inset-top)); }
.pad-bot { padding-bottom: max(28px, env(safe-area-inset-bottom)); }

.studio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600;
  background: var(--brand-light); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 30px;
}

.display {
  font-family: var(--serif);
  font-size: clamp(40px, 13vw, 58px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
  font-weight: 500;
}

.eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); font-weight: 600;
}

.muted  { color: var(--ink-2); font-size: 14.5px; }
.tiny   { color: var(--ink-3); font-size: 12px; }
.stack  { display: flex; flex-direction: column; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  width: 100%; min-height: 54px; padding: 0 22px;
  border: 0; border-radius: 6px;
  background: linear-gradient(135deg, #C59B6D 0%, #B88655 100%);
  color: #FFFFFF;
  font-size: 15.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(184, 134, 85, 0.25);
  transition: all .2s ease;
  text-decoration: none;
}
.btn:hover {
  background: linear-gradient(135deg, #BA8E5E 0%, #A87544 100%);
  box-shadow: 0 6px 20px rgba(184, 134, 85, 0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: #FFFFFF; color: var(--ink);
  border: 1px solid var(--line-2); font-weight: 500; font-size: 15px; min-height: 52px;
  box-shadow: 0 1px 3px rgba(40, 30, 20, 0.03);
}
.btn-ghost:hover {
  background: var(--sunk); border-color: var(--brand);
}
.btn:disabled { background: #E5DDD3; color: #9C948A; box-shadow: none; transform: none; }

.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 4px 18px -2px rgba(40, 30, 20, 0.04);
}

/* --- écran d'arrivée --- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.hero__glow {
  position: absolute; inset: 0 0 auto 0; height: 56vh; pointer-events: none;
  background:
    radial-gradient(42% 35% at 74% 22%, rgba(196, 146, 104, 0.22) 0%, transparent 70%),
    radial-gradient(90% 70% at 24% 14%, #F5EAE0 0%, #FAF8F5 70%);
  opacity: .95;
}
.hero__fade {
  position: absolute; left: 0; right: 0; top: 26vh; height: 32vh; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--ground) 90%);
}
.hero__inner { position: relative; flex: 1; display: flex; flex-direction: column; gap: 0; }
.spacer { flex: 1 1 auto; min-height: 24px; }

.avatars { display: flex; flex: none; }
.avatars img {
  width: 32px; height: 32px; border-radius: 50%; display: block;
  border: 2px solid var(--raised); background: #EDE6DD;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(40, 30, 20, 0.08);
}
.avatars img + img { margin-left: -11px; }

/* --- galerie --- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px; border-radius: 18px;
  border: 1px solid var(--line-2); background: #FFFFFF; color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 1px 3px rgba(40, 30, 20, 0.03);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #FFFFFF; box-shadow: 0 2px 8px rgba(184, 134, 85, 0.25); }

.masonry { display: flex; gap: 8px; align-items: flex-start; }
.masonry__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tile {
  display: block; width: 100%; border: 0; padding: 0; border-radius: 6px;
  background: #EFE8DF center/cover no-repeat; overflow: hidden; position: relative;
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.05);
}
.tile > a { display: block; }
.tile img { display: block; width: 100%; height: auto; }

.tile__del {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31, 28, 24, .75); color: #FFFFFF;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.tile__del:hover  { background: rgba(31, 28, 24, .95); }
.tile__del:disabled { opacity: .45; }
.tile__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(31, 28, 24, .25);
}

.live { display: flex; align-items: center; gap: 7px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: block; }

/* --- file d'attente --- */
.queue { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }
.queue__inner {
  max-width: 520px; margin: 0 auto;
  padding: 14px 20px max(18px, env(safe-area-inset-bottom));
  background: var(--raised); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(40, 30, 20, 0.08);
}
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .25s ease; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 6px;
  background: #F4EFE7; border: 1px solid #E2D7C8; color: #5C5449; font-size: 13.5px; line-height: 1.5;
}
.notice b { color: #2B2620; display: block; font-size: 14px; margin-bottom: 3px; }

.fab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 0 20px max(18px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.fab__inner { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }
.fab__scrim {
  position: fixed; left: 0; right: 0; bottom: 0; height: 130px; z-index: 29; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--ground) 75%);
}

/* --- pastille « laisser mon adresse » --- */
.cap-pill {
  display: flex; align-items: stretch; gap: 2px;
  min-height: 50px; border-radius: 25px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(40, 30, 20, 0.12);
  backdrop-filter: blur(8px);
}
.cap-pill__open {
  flex: 1 1 auto; display: flex; align-items: flex-start; gap: 10px;
  background: none; border: 0; padding: 14px 4px 14px 18px;
  color: var(--ink); font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  line-height: 1.35; text-align: left;
}
.cap-pill__open svg { flex: none; margin-top: 1px; color: var(--brand); }
.cap-pill__x {
  flex: none; width: 44px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink-3);
}
.cap-pill__x:hover { color: var(--ink-2); }

/* --- fiche superposée --- */
.sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(31, 28, 24, .65); backdrop-filter: blur(4px); }
.sheet__card {
  position: relative; width: 100%; max-width: 520px;
  background: var(--raised); border: 1px solid var(--line);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  padding: 28px 22px max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 -10px 40px rgba(40, 30, 20, 0.15);
  animation: sheet-in .22s ease;
}
.sheet__close {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--sunk); color: var(--ink-2);
}
@keyframes sheet-in {
  from { transform: translateY(20px); opacity: .3; }
  to   { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet__card { animation: none; }
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- photo en plein écran --- */
.lightbox {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(26, 23, 20, .97);
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.lightbox__stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox__stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 250ms ease;
  -webkit-user-drag: none; user-select: none;
}
.lightbox__stage img.vue { opacity: 1; }
.lightbox__close, .lightbox__nav {
  position: fixed; z-index: 1; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); color: #FFFFFF;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .32); }
.lightbox__nav { width: 44px; height: 44px; border-radius: 50%; }
.lightbox__close {
  top: max(16px, env(safe-area-inset-top)); right: 16px;
  height: 40px; padding: 0 18px; border-radius: 20px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
}
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }

/* --- QR code --- */
.qrmodal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(31, 28, 24, .7);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.qrmodal[hidden] { display: none; }
.qrmodal__card {
  background: #FFFFFF; border-radius: 12px; padding: 28px 24px 24px;
  width: min(100%, 380px); text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 20px 40px rgba(40, 30, 20, 0.16);
}
.qrmodal__lead { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.qrmodal__code { line-height: 0; }
.qrmodal__code svg { width: 100%; height: auto; display: block; }
.qrmodal__url { margin: 0; font-size: 13px; color: var(--ink-2); word-break: break-all; }
.qrmodal__close {
  min-height: 48px; border: 0; border-radius: 6px;
  background: var(--ink); color: #FFFFFF; font-size: 15px; font-weight: 600;
}
.qr-open {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; padding: 8px 0; min-height: 44px;
  color: var(--ink-2); font-size: 13.5px;
}
.qr-open:hover { color: var(--ink); }

.qrblock {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; width: 100%;
}
.qrinline {
  display: block; width: fit-content; margin: 0;
  background: #FFFFFF; border-radius: 10px; padding: 12px; line-height: 0;
  box-shadow: 0 4px 16px rgba(40, 30, 20, 0.08);
  border: 1px solid var(--line);
}
.qrinline__code { display: block; width: 112px; }
.qrinline__code svg { width: 100%; height: auto; display: block; }
.qrblock__hint { font-size: 12px; color: var(--ink-3); margin: 0; }
.qrblock:hover .qrblock__hint { color: var(--ink-2); }

.refresh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 6px; min-height: 44px; min-width: 44px;
  color: var(--brand);
}
.refresh-btn:hover { opacity: .8; }
.refresh-btn:disabled { opacity: .5; cursor: default; }

#refresh-icon.spinning { animation: refresh-spin .6s linear; }
@keyframes refresh-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #refresh-icon.spinning { animation: none; }
}

/* --- recherche par selfie --- */
.consent {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 16px; border-radius: 6px;
  background: var(--raised); border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(40, 30, 20, 0.02);
}
.consent input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--brand); }
.consent span { font-size: 13.5px; line-height: 1.48; color: var(--ink-2); }

.btn.is-off { background: #E5DDD3; color: #9C948A; cursor: not-allowed; box-shadow: none; }

.fine { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; }
.fine p { margin: 0 0 7px; color: var(--ink-2); }
.fine ul { margin: 0; padding-left: 17px; }
.fine li { margin-bottom: 5px; }
.fine b { color: var(--ink-2); }

.ring {
  width: 34px; height: 34px; border-radius: 50%; display: block;
  border: 2px solid var(--line-2); border-top-color: var(--brand);
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation-duration: 3s; } }

.selfie-cta {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit; margin-bottom: 16px;
  background: var(--raised); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.03);
}
.selfie-cta svg { flex: none; color: var(--brand); }
.selfie-cta b { display: block; font-size: 14.5px; color: var(--ink); }
.selfie-cta b + span { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.selfie-cta .chev { margin-left: auto; color: var(--ink-3); }

/* --- pages légales --- */
.legal { padding: clamp(34px, 6vw, 64px) 20px clamp(60px, 8vw, 96px); }
.legal__wrap { max-width: 740px; margin: 0 auto; }
.legal h1 {
  font-family: var(--serif); font-size: clamp(34px, 6vw, 48px);
  line-height: 1.05; letter-spacing: -.02em; margin: 0; font-weight: 500;
}
.legal__intro { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 14px 0 0; max-width: 60ch; }
.legal section { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.legal h2 {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin: 0 0 14px;
}
.legal p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.legal p:last-child { margin-bottom: 0; }
.legal b { color: var(--ink); font-weight: 600; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px;
}

.legal .fiche { display: grid; grid-template-columns: 200px 1fr; gap: 10px 22px; margin: 0 0 12px; }
.legal .fiche dt { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.legal .fiche dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 600px) {
  .legal .fiche { grid-template-columns: 1fr; gap: 3px 0; }
  .legal .fiche dd { margin-bottom: 12px; }
}

.acompleter {
  color: #C25E4A; background: #FDF3F0; border: 1px dashed #E2A79C;
  border-radius: 4px; padding: 2px 8px; font-size: 13px;
}

.legal__maj { margin-top: 38px; font-size: 12px; color: var(--ink-3); }
.legal__nav {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px;
}
.legal__nav a { color: var(--ink-3); text-decoration: none; }
.legal__nav a:hover { color: var(--brand); }

.legales {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
  margin: 12px 0 0; font-size: 12px; line-height: 1.5;
}
.legales a { color: var(--ink-3); text-decoration: none; }
.legales a:hover { color: var(--brand); }