:root {
  --cream: #faf6ef;
  --cream-2: #f3ead9;
  --ink: #1a1410;
  --ink-2: #4a3f35;
  --muted: #8a7d6f;
  --gold: #b8924a;
  --gold-2: #d9b874;
  --gold-3: #8c6a2c;
  --line: rgba(26, 20, 16, .1);
  --card: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(60, 40, 10, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; font-size: 16px; /* évite le zoom iOS */ }
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; margin: 0; line-height: 1.05; }
em { font-style: italic; color: var(--gold-2); }
[hidden] { display: none !important; }

/* ---------- BOUTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: 0 1.4em; border-radius: 999px;
  font-weight: 500; letter-spacing: .02em;
  transition: transform .35s var(--spring), box-shadow .3s, background .3s, opacity .3s;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn:active { transform: scale(.95); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, var(--gold-3));
  color: #fff; box-shadow: 0 8px 24px -8px rgba(184, 146, 74, .7);
}
.btn-gold::after { /* reflet doré qui passe */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 3.2s var(--ease) infinite 1.5s;
}
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-lg { min-height: 58px; font-size: 1.05rem; padding: 0 2em; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.2rem; color: var(--ink); text-decoration: none;
  transition: background .2s, transform .3s var(--spring);
}
.icon-btn:active { transform: scale(.88); background: var(--cream-2); }

/* ---------- SPLASH ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50; overflow: hidden; color: #fff;
  display: grid; place-items: center; background: var(--ink);
}
.splash-bg { position: absolute; inset: -5%; }
.splash-bg img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.05) translate(0, 0); } to { transform: scale(1.22) translate(-3%, -2%); } }
.splash-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(26,20,16,.35), rgba(26,20,16,.88) 75%),
              linear-gradient(to bottom, rgba(26,20,16,.2), rgba(26,20,16,.95));
}
.splash-content {
  position: relative; text-align: center; padding: 24px 24px calc(24px + var(--safe-b));
  max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.splash-logo {
  width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 6px 30px rgba(217,184,116,.45));
  animation: logoIn 1.4s var(--ease) both, float 6s ease-in-out infinite 1.4s;
}
@keyframes logoIn { from { opacity: 0; transform: scale(.6) rotate(-12deg); filter: blur(10px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .72rem; color: var(--gold-2); margin: 0; }
.splash-title { font-size: clamp(2.4rem, 9vw, 4rem); }
.splash-sub { margin: 0 0 12px; opacity: .8; font-weight: 300; }
.reveal-up { opacity: 0; animation: revealUp 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes revealUp { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.splash.leaving { animation: splashOut .9s var(--ease) forwards; }
@keyframes splashOut { to { clip-path: circle(0% at 50% 85%); } }
.splash { clip-path: circle(150% at 50% 85%); }

.sparkles { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-2);
  box-shadow: 0 0 8px 2px rgba(217,184,116,.7); opacity: 0;
  animation: rise linear infinite;
}
@keyframes rise {
  0% { opacity: 0; transform: translateY(0) scale(.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-70vh) scale(1.2); }
}

/* ---------- APP ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(6px + var(--safe-t)) 10px 6px;
  background: rgba(250, 246, 239, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.top-logo { width: 46px; height: 46px; object-fit: contain; }
.steps { position: sticky; top: calc(58px + var(--safe-t)); z-index: 19; padding: 0 16px 10px; background: rgba(250,246,239,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.steps-track { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.steps-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .7s var(--ease); }
.steps ol { list-style: none; display: flex; justify-content: space-between; margin: 8px 0 0; padding: 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.steps li { transition: color .4s; }
.steps li.on { color: var(--gold-3); font-weight: 600; }
.steps li.done { color: var(--ink-2); }

.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px 16px calc(120px + var(--safe-b)); }
.page-enter { animation: pageIn .6s var(--ease) both; }
.page-enter.back { animation-name: pageInBack; }
@keyframes pageIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes pageInBack { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

.page-head { margin: 14px 0 20px; }
.page-head .eyebrow { color: var(--gold); }
.page-head h2 { font-size: clamp(2rem, 7vw, 2.8rem); margin-top: 6px; }
.page-head p { color: var(--muted); margin: 8px 0 0; font-weight: 300; }

/* stagger */
.stagger > * { opacity: 0; transform: translateY(22px); }
.stagger.in > * { animation: revealUp .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }

/* ---------- FORM / ÉVÉNEMENT ---------- */
.field { margin-bottom: 22px; }
.field > label, .field-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 11px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  transition: all .35s var(--spring);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.04); }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184,146,74,.15); }
textarea.input { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.guests {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.guests::before { content: ""; position: absolute; inset: 0; background: url(img/tables.jpg) center/cover; opacity: .22; }
.guests > * { position: relative; }
.guests-num { font-family: "Cormorant Garamond", serif; font-size: 3.2rem; font-weight: 600; line-height: 1; min-width: 3ch; text-align: center; }
.guests-num small { display: block; font-family: "Jost"; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin-top: 4px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem;
  border: 1px solid rgba(255,255,255,.25); transition: transform .3s var(--spring), background .2s;
}
.round:active { transform: scale(.85); background: var(--gold); }
.range { width: 100%; margin-top: 14px; accent-color: var(--gold); }
.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- ONGLETS ---------- */
.tabs {
  position: sticky; top: calc(104px + var(--safe-t)); z-index: 15;
  display: flex; gap: 4px; padding: 5px; background: var(--cream-2); border-radius: 999px; margin-bottom: 18px;
}
.tab { flex: 1; position: relative; z-index: 1; padding: 11px 6px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--ink-2); transition: color .35s; }
.tab.on { color: #fff; }
.tab .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--gold); color: #fff; font-size: .7rem; vertical-align: 1px; }
.tab-pill { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 999px; background: var(--ink); transition: transform .5s var(--spring), width .5s var(--spring); z-index: 0; }

/* ---------- CARTES PLATS ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-align: left; width: 100%;
  transition: transform .45s var(--spring), box-shadow .4s;
  outline: 2px solid transparent; outline-offset: -2px;
}
.card:active { transform: scale(.97); }
@media (hover: hover) { .card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(60,40,10,.35); } }
.card.on { outline-color: var(--gold); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--cream-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.card:hover .card-img img, .card.on .card-img img { transform: scale(1.08); }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,20,16,.55), transparent 55%); }
.tag {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 10px; border-radius: 99px;
  background: rgba(26,20,16,.7); color: var(--gold-2); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.price-badge { position: absolute; bottom: 10px; left: 14px; z-index: 2; color: #fff; font-family: "Cormorant Garamond", serif; font-size: 1.5rem; font-weight: 600; }
.price-badge small { font-family: "Jost"; font-size: .7rem; opacity: .85; }
.check {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.1rem;
  transition: transform .5s var(--spring), background .3s, color .3s;
}
.card.on .check { background: var(--gold); color: #fff; transform: rotate(360deg) scale(1.1); }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 1.45rem; }
.card-body p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; font-weight: 300; }

/* ---------- FORFAITS ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-title h3 { font-size: 1.7rem; }
.section-title span { color: var(--muted); font-size: .85rem; }
.option-row {
  display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); width: 100%; text-align: left;
  transition: transform .4s var(--spring), outline-color .3s; outline: 2px solid transparent; outline-offset: -2px;
}
.option-row.on { outline-color: var(--gold); }
.option-thumb { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; }
.option-icon { width: 72px; height: 72px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 2rem; background: var(--cream-2); }
.option-main { flex: 1; min-width: 0; }
.option-main h4 { margin: 0; font-family: "Cormorant Garamond", serif; font-size: 1.35rem; }
.option-main p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.option-main .p { color: var(--gold-3); font-weight: 600; font-size: .95rem; margin-top: 4px; }
.switch { width: 54px; height: 32px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .4s var(--spring); }
.option-row.on .switch { background: var(--gold); }
.option-row.on .switch::after { transform: translateX(22px); }
.stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; background: var(--cream-2); font-size: 1.2rem; transition: transform .3s var(--spring); }
.stepper button:active { transform: scale(.85); background: var(--gold-2); }
.stepper output { min-width: 2ch; text-align: center; font-weight: 600; font-size: 1.1rem; }
.hint { font-size: .82rem; color: var(--gold-3); margin: 10px 4px 0; }
.hint button { color: var(--gold-3); text-decoration: underline; padding: 0; font-size: inherit; }

/* ---------- RÉCAP ---------- */
.receipt { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: relative; overflow: hidden; }
.receipt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--gold-3)); }
.receipt h3 { font-size: 1.3rem; margin: 16px 0 8px; color: var(--gold-3); }
.receipt h3:first-child { margin-top: 0; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.line span:last-child { white-space: nowrap; font-weight: 500; }
.line.muted { color: var(--muted); }
.total-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--ink); }
.total-line strong { font-family: "Cormorant Garamond", serif; font-size: 2.2rem; }
.empty { color: var(--muted); font-style: italic; font-size: .9rem; }
.note { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.send-actions { display: grid; gap: 10px; margin-top: 20px; }
.btn-wa { background: #1f9d55; color: #fff; }

/* ---------- MERCI ---------- */
.thanks { text-align: center; padding: 40px 10px; }
.thanks .seal { width: 120px; height: 120px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #fff; font-size: 3rem; animation: seal 1s var(--spring) both; box-shadow: 0 0 0 12px rgba(184,146,74,.15), 0 0 0 24px rgba(184,146,74,.07); }
@keyframes seal { from { transform: scale(0) rotate(-180deg); } }

/* ---------- BARRE PANIER ---------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(26, 20, 16, .94); color: #fff;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -10px rgba(0,0,0,.35);
  animation: barIn .8s var(--spring) both .2s;
}
@keyframes barIn { from { transform: translateY(110%); } }
@media (min-width: 700px) { .cartbar { left: 50%; right: auto; width: min(680px, calc(100% - 32px)); transform: translateX(-50%); bottom: 16px; border-radius: 22px; padding-bottom: 12px; animation-name: barInC; } }
@keyframes barInC { from { transform: translate(-50%, 140%); } to { transform: translate(-50%, 0); } }
.cart-info { display: flex; flex-direction: column; }
.cart-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.cart-total { font-family: "Cormorant Garamond", serif; font-size: 1.9rem; font-weight: 600; line-height: 1.1; display: inline-block; }
.cart-total.bump { animation: bump .5s var(--spring); color: var(--gold-2); }

/* particule « vole vers le panier » */
.fly {
  position: fixed; z-index: 60; pointer-events: none; padding: 6px 12px; border-radius: 99px;
  background: var(--gold); color: #fff; font-weight: 600; font-size: .85rem; box-shadow: 0 6px 18px rgba(184,146,74,.6);
}

.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 99px; font-size: .9rem;
  transition: opacity .3s, transform .4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.confetti { position: fixed; top: -12px; width: 8px; height: 14px; z-index: 80; pointer-events: none; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .stagger > * { opacity: 1; transform: none; }
}

/* ajustements mobile */
.btn { white-space: nowrap; }
.cards.compact { grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 1000px) { .cards.compact { grid-template-columns: repeat(4, 1fr); } }
.cards.compact .card-img { aspect-ratio: 1 / 1; }
.cards.compact .card-body { padding: 10px 12px 12px; }
.cards.compact .card-body h3 { font-size: 1.25rem; }
.cards.compact .card-body p { font-size: .78rem; }
.cards.compact .price-badge { font-size: 1.25rem; }
.cards.compact .tag { font-size: .58rem; padding: 4px 8px; top: 8px; left: 8px; }
.cards.compact .check { width: 30px; height: 30px; top: 8px; right: 8px; }
@media (max-width: 380px) { .option-thumb, .option-icon { width: 56px; height: 56px; font-size: 1.6rem; } }
