/* ============================================================
   TERANGA THIEB — Design system (iOS / HIG, web)
   Clair par défaut, sombre via prefers-color-scheme.
   Accent : or de la marque (#C9A84C).
   ============================================================ */

:root {
  color-scheme: light dark;

  --bg: #F4F1EC;
  --surface: #FFFFFF;
  --fill: #EBE7E0;
  --fill-strong: #E0DBD2;
  --separator: rgba(60, 50, 30, 0.14);
  --label: #1C1A17;
  --label-2: #6B6762;
  --accent: #C9A84C;
  --accent-pressed: #B8973D;
  --on-accent: #1F1704;
  --accent-text: #7D5C0E;
  --accent-tint: rgba(201, 168, 76, 0.18);
  --danger: #B3261E;
  --danger-tint: rgba(179, 38, 30, 0.1);
  --success: #1E7A44;
  --success-tint: rgba(30, 122, 68, 0.12);
  --wa: #15803D;
  --wa-pressed: #116A32;
  --bar: rgba(244, 241, 236, 0.78);
  --material: rgba(255, 255, 255, 0.82);
  --scrim: rgba(20, 16, 8, 0.38);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 -2px 12px rgba(0, 0, 0, 0.06), 0 24px 64px rgba(0, 0, 0, 0.2);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-sheet: 26px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --gutter: max(16px, var(--safe-left));
  --topbar-h: calc(56px + var(--safe-top));
  --tabbar-h: calc(56px + var(--safe-bottom));

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --press: transform 160ms var(--ease-out), background-color 160ms ease, opacity 160ms ease;

  /* Alias utilisés par des styles en ligne et app.js */
  --gold: var(--accent);
  --text-dim: var(--label-2);
  --text-muted: var(--label-2);
  --rouge: var(--danger);
  --rouge-light: var(--danger-tint);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1C1C1E;
    --fill: #2C2C2E;
    --fill-strong: #3A3A3C;
    --separator: rgba(255, 255, 255, 0.12);
    --label: #F5F2EC;
    --label-2: #9E9A93;
    --accent-pressed: #D8B65A;
    --accent-text: #D8B65A;
    --accent-tint: rgba(216, 182, 90, 0.16);
    --danger: #FF6961;
    --danger-tint: rgba(255, 105, 97, 0.14);
    --success: #4CD07D;
    --success-tint: rgba(76, 208, 125, 0.14);
    --bar: rgba(22, 22, 23, 0.98);
    --material: rgba(44, 44, 46, 0.82);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}

/* ── Ambiance « coucher de soleil sur Dakar » (18 h → fermeture, posée par app.js) ── */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #F4F1EC; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #FFFFFF; }
@property --fill { syntax: "<color>"; inherits: true; initial-value: #EBE7E0; }
@property --label-2 { syntax: "<color>"; inherits: true; initial-value: #6B6762; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #C9A84C; }
@property --accent-text { syntax: "<color>"; inherits: true; initial-value: #7D5C0E; }
@property --bar { syntax: "<color>"; inherits: true; initial-value: rgba(244, 241, 236, 0.78); }
@property --dusk { syntax: "<color>"; inherits: true; initial-value: rgba(0, 0, 0, 0); }

:root {
  --dusk: rgba(0, 0, 0, 0);
  transition: --bg 1.2s ease, --surface 1.2s ease, --fill 1.2s ease, --label-2 1.2s ease,
    --accent 1.2s ease, --accent-text 1.2s ease, --bar 1.2s ease, --dusk 1.2s ease;
}

:root[data-ambiance="soir"] {
  --bg: #F7EEE5;
  --surface: #FFFBF7;
  --fill: #F0E2D4;
  --fill-strong: #E6D2C0;
  --label: #22150E;
  --label-2: #6E5B4E;
  --accent: #DB8A56;
  --accent-pressed: #C9773F;
  --on-accent: #2A1206;
  --accent-text: #9A4520;
  --accent-tint: rgba(219, 138, 86, 0.18);
  --bar: rgba(247, 238, 229, 0.8);
  --dusk: rgba(240, 168, 120, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root[data-ambiance="soir"] {
    --bg: #150C07;
    --surface: #24170F;
    --fill: #352419;
    --fill-strong: #463024;
    --label: #F8EDE3;
    --label-2: #B59F8C;
    --accent: #E0915C;
    --accent-pressed: #F2A673;
    --on-accent: #2A1206;
    --accent-text: #F2A673;
    --accent-tint: rgba(242, 166, 115, 0.16);
    --bar: rgba(30, 19, 12, 0.98);
    --dusk: rgba(120, 52, 22, 0.9);
  }
}

/* ── Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.41;
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--label);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
}

::selection { background: var(--accent-tint); color: var(--label); }

img { display: block; max-width: 100%; height: auto; }

button, a {
  touch-action: manipulation;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

button { background: none; border: none; }

input, textarea, select {
  font-family: inherit;
  font-size: 1.0625rem;
  color: var(--label);
  background: transparent;
  border: none;
  outline: none;
  caret-color: var(--accent-text);
}

::placeholder { color: var(--label-2); opacity: 1; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.ti { line-height: 1; }

/* ============================================================
   SPLASH
   ============================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-ring-wrap { width: 112px; height: 112px; }
.splash-ring { display: none; }

.splash-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: splashIn 0.9s var(--ease-out) both;
}

.splash-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #E3C46E;
  animation: splashIn 0.9s var(--ease-out) 0.12s both;
}

.splash-sub {
  font-size: 0.9375rem;
  color: rgba(245, 242, 236, 0.66);
  animation: splashIn 0.9s var(--ease-out) 0.2s both;
}

@keyframes splashIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   SHEETS PARTAGÉES (onboarding, confirmation)
   ============================================================ */
#onboarding,
#modal-confirm {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: var(--scrim);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

#onboarding.active,
#modal-confirm.active { opacity: 1; visibility: visible; }

.onboarding-sheet,
.confirm-sheet {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-sheet);
}

#onboarding.active .onboarding-sheet,
#modal-confirm.active .confirm-sheet { transform: none; }

.sheet-handle,
.modal-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--fill-strong);
  margin: 0 auto 18px;
}

.onboarding-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 4px auto 14px;
  box-shadow: var(--shadow-md);
}

.onboarding-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-align: center;
}

.onboarding-sub {
  font-size: 0.9375rem;
  color: var(--label-2);
  text-align: center;
  margin: 6px auto 22px;
  max-width: 32ch;
}

.form-group { margin-bottom: 12px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--label-2);
  margin: 0 4px 6px;
}

.form-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--fill);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input:focus { box-shadow: 0 0 0 2px var(--accent); background: var(--surface); }

.confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.confirm-sub {
  font-size: 0.9375rem;
  color: var(--label-2);
  text-align: center;
  margin: 6px 0 22px;
}

.confirm-actions { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  transition: var(--press);
  user-select: none;
  -webkit-user-select: none;
}

.btn .ti { font-size: 20px; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: not-allowed; background: var(--fill); color: var(--label-2); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:active:not(:disabled) { background: var(--accent-pressed); }

.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:active { background: var(--wa-pressed); }

.btn-outline { background: var(--fill); color: var(--label); }
.btn-outline:active { background: var(--fill-strong); }

.btn-danger { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #1A0503; } }

.btn-sm {
  width: auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9375rem;
}

.btn-sm .ti { font-size: 17px; }

/* ============================================================
   BADGES & PILLULES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.badge .ti { font-size: 12px; }
.badge-gold { background: var(--accent); color: var(--on-accent); }
.badge-neutral { background: var(--fill); color: var(--label); }
.badge-low { background: var(--danger-tint); color: var(--danger); }
.badge-open { background: rgba(255, 255, 255, 0.2); color: #fff; }
.badge-open .ti { color: #4CD07D; }
.badge-closed { background: rgba(255, 255, 255, 0.2); color: #fff; }
.badge-closed .ti { color: #FF8A80; }

.daily-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.6875rem;
  font-weight: 600;
  vertical-align: middle;
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app {
  min-height: 100dvh;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#app.visible { opacity: 1; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: calc(var(--safe-top) + 8px) max(16px, var(--safe-right)) 8px var(--gutter);
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 0.5px 0 var(--separator);
}

.topbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px var(--separator);
}

.topbar-info { flex: 1; min-width: 0; }

.topbar-name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-loc {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8125rem;
  color: var(--label-2);
  line-height: 1.3;
}

.topbar-actions { display: flex; align-items: center; }

.topbar-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-text);
  transition: var(--press);
}

.topbar-btn:active { transform: scale(0.9); background: var(--fill); }

.cart-badge,
.nav-badge {
  position: absolute;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform 0.35s var(--ease-out);
  box-shadow: 0 0 0 2px var(--bg);
}

@media (prefers-color-scheme: dark) {
  .cart-badge, .nav-badge { color: #1A0503; }
}

.cart-badge { top: 3px; right: 1px; }
.nav-badge { top: -5px; right: -10px; }
.cart-badge.visible,
.nav-badge.visible { transform: scale(1); }
.cart-badge.bounce { animation: badgePop 0.45s var(--ease-out); }

@keyframes badgePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ── Pages ── */
.pages-container { position: relative; }

.page {
  display: none;
  padding-bottom: calc(var(--tabbar-h) + 96px);
}

.page.active {
  display: block;
  animation: pageIn 0.38s var(--ease-out) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

#page-home { position: relative; }

.page-title-bar { padding: 14px var(--gutter) 10px; }

.page-title {
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.page-title span { color: inherit; }

/* ── Barre d'onglets ── */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  height: var(--tabbar-h);
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 -0.5px 0 var(--separator);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding-top: 4px;
  color: var(--label-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, transform 0.16s var(--ease-out);
}

.nav-item .ti { font-size: 25px; }
.nav-item:active { transform: scale(0.92); }
.nav-item.active { color: var(--accent-text); }
.nav-cart-wrap { position: relative; display: flex; }

/* ── Bouton WhatsApp flottant ── */
.fab-wa {
  position: fixed;
  right: max(16px, var(--safe-right));
  bottom: calc(var(--tabbar-h) + 14px);
  z-index: 90;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.12);
  transition: var(--press);
}

.fab-wa:active { transform: scale(0.92); }

/* Le panier a déjà son bouton de commande : le bouton flottant y masquerait les totaux */
body:has(#page-cart.active) .fab-wa { display: none; }

/* ============================================================
   ACCUEIL
   ============================================================ */
.pull-indicator {
  position: absolute;
  top: -56px;
  left: 50%;
  z-index: 10;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: top 0.25s var(--ease-out), opacity 0.2s ease, visibility 0.2s;
}

.pull-indicator.visible { top: 12px; opacity: 1; visibility: visible; }
.pull-indicator .ti { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero {
  position: relative;
  margin: 12px var(--gutter) 0;
  aspect-ratio: 10 / 11;
  max-height: 560px;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  background: #1a1408;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 26%),
    linear-gradient(0deg, rgba(10, 7, 2, 0.88) 0%, rgba(10, 7, 2, 0.55) 34%, rgba(10, 7, 2, 0) 62%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 22px;
  color: #fff;
}

.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.hero-badges .badge {
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.hero-badges .badge-gold { background: var(--accent); }

.hero-title {
  margin-top: auto;
  font-family: var(--font-serif);
  font-size: 2.375rem;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.hero-sub {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.hero-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.hero-title, .hero-sub, .hero-actions { animation: rise 0.7s var(--ease-out) both; }
.hero-sub { animation-delay: 0.08s; }
.hero-actions { animation-delay: 0.16s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Sections ── */
.section { padding: 28px 0 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter) 12px;
}

.section-title,
.drinks-banner-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-link {
  min-height: 44px;
  padding: 0 4px;
  margin: -12px -4px;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--accent-text);
  transition: opacity 0.15s ease;
}

.section-link:active { opacity: 0.5; }

.divider { display: none; }

/* ── Carrousel incontournables ── */
.cards-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 2px var(--gutter) 8px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.cards-scroll::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 auto;
  width: min(62vw, 250px);
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.card:active { transform: scale(0.97); }

.card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--fill);
  box-shadow: var(--shadow-sm);
}

.card-img,
.menu-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge,
.menu-card-daily,
.menu-card-low {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}

.card-badge,
.menu-card-daily { background: var(--accent); color: var(--on-accent); }

.menu-card-low { left: auto; right: 10px; background: rgba(179, 38, 30, 0.92); color: #fff; }
.menu-card-daily .ti, .menu-card-low .ti { font-size: 12px; }

.card-body { padding: 10px 2px 0; }

.card-name,
.menu-card-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.012em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.card-price,
.menu-card-price {
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--label);
}

.card-add,
.menu-card-add {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 19px;
  transition: var(--press);
}

.card-add::after,
.menu-card-add::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.card-add:active,
.menu-card-add:active { transform: scale(0.85); }

.card-add.in-cart,
.menu-card-add.in-cart { background: var(--success); color: #fff; }

@media (prefers-color-scheme: dark) {
  .card-add.in-cart, .menu-card-add.in-cart { color: #04210F; }
}

/* ── Squelettes ── */
.skeleton {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--fill) 0%, var(--fill-strong) 50%, var(--fill) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-card { flex: 0 0 auto; width: min(62vw, 250px); aspect-ratio: 4 / 5; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ── Offre pastels ── */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 var(--gutter);
  padding: 12px 16px 12px 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.promo-banner:active { transform: scale(0.98); }

.promo-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
}

.promo-text { flex: 1; min-width: 0; }

.promo-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.012em; }
.promo-sub { font-size: 0.9375rem; color: var(--label-2); margin-top: 1px; }

.promo-price {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Boissons & desserts ── */
.drinks-banner-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter) 12px;
}

.drinks-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 var(--gutter) 2px;
  scrollbar-width: none;
}

.drinks-pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--press);
}

.pill .ti { font-size: 18px; color: var(--accent-text); }
.pill:active { transform: scale(0.95); background: var(--fill); }

/* ── Infos pratiques ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--gutter);
}

.info-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out);
}

.info-tile[onclick] { cursor: pointer; }
.info-tile[onclick]:active { transform: scale(0.97); }

.info-tile-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent-text);
}

.info-tile-label { font-size: 0.8125rem; color: var(--label-2); }
.info-tile-value { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }

/* ============================================================
   MENU
   ============================================================ */
.search-wrap { padding: 0 var(--gutter) 12px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 4px 0 10px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--label-2);
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::-webkit-search-cancel-button { display: none; }

#search-clear {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

/* Contrôle segmenté */
.cat-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  margin: 0 var(--gutter) 6px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
}

.cat-tab {
  position: relative;
  min-height: 40px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--label);
  white-space: nowrap;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.cat-tab::after { content: ""; position: absolute; inset: -2px 0; }

.cat-tab.active {
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .cat-tab.active { background: #636366; }
}

.menu-group { padding-top: 18px; }

.menu-group-title {
  padding: 0 var(--gutter) 10px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
  padding: 0 var(--gutter) 6px;
}

.menu-card { cursor: pointer; min-width: 0; transition: transform 0.2s var(--ease-out); }
.menu-card:active { transform: scale(0.97); }

.menu-card-img-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--fill);
  box-shadow: var(--shadow-sm);
}

.menu-card-add { position: absolute; right: 8px; bottom: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22); }
.menu-card-info { padding: 8px 2px 0; }
.menu-card-name { font-size: 0.9375rem; }
.menu-card-price { margin-top: 3px; font-size: 1rem; }

/* ============================================================
   FICHE PRODUIT (sheet)
   ============================================================ */
#modal-product {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: var(--scrim);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

#modal-product.active { opacity: 1; visibility: visible; }

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - var(--safe-top) - 12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-sheet);
}

#modal-product.active .modal-sheet { transform: none; }

.modal-img-wrap {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1;
  max-height: 46dvh;
  width: 100%;
  overflow: hidden;
  background: #120d05;
}

.modal-img-blur {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(36px) saturate(1.4) brightness(0.75);
}

.modal-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-wrap[data-cat="boissons"] .modal-img { object-fit: contain; }
/* Les photos de bouteilles sont détourées sur fond noir : un fond noir uni évite la coupure avec le flou */
.modal-img-wrap[data-cat="boissons"] { background: #000; }
.modal-img-wrap[data-cat="boissons"] .modal-img-blur { display: none; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 30, 30, 0.45);
  color: #fff;
  font-size: 17px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: var(--press);
}

.modal-close::after { content: ""; position: absolute; inset: -6px; }
.modal-close:active { transform: scale(0.9); }

.modal-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 2;
  margin: 0 0 0 -18px;
  background: rgba(255, 255, 255, 0.7);
}

.modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 0;
}

.modal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.modal-badges:empty { display: none; }

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.modal-ingr {
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--label-2);
}

.modal-allergens {
  display: flex;
  gap: 10px;
  margin: 16px 0 4px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--fill);
}

.modal-allergens:empty { display: none; }
.allergens-icon { flex-shrink: 0; font-size: 20px; color: var(--accent-text); margin-top: 1px; }
.allergens-body { flex: 1; }
.allergens-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 8px; }

.allergens-text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--label-2);
}

.allergens-text strong { color: var(--label); font-weight: 600; }
.allergens-body .allergens-text + .allergens-text,
.allergen-pills + .allergens-text { margin-top: 8px; }

.allergen-pills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }

.allergen-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator);
  font-size: 0.875rem;
  font-weight: 600;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: auto -20px 0;
  padding: 14px 20px calc(14px + var(--safe-bottom));
  background: var(--surface);
  box-shadow: 0 -0.5px 0 var(--separator);
}

.modal-price {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.modal-add-btn { flex: 1; }

/* ============================================================
   PANIER — listes groupées (style Réglages)
   ============================================================ */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 64px 24px;
  text-align: center;
}

.cart-empty-icon,
.empty-state-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-text);
}

.cart-empty-title,
.empty-state-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.cart-empty-sub,
.empty-state-sub { font-size: 0.9375rem; color: var(--label-2); margin-bottom: 10px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 40px 24px;
  text-align: center;
}

.cart-details,
.cart-checkout { display: flex; flex-direction: column; gap: 20px; }
#cart-content { display: flex; flex-direction: column; gap: 20px; padding: 6px var(--gutter) 0; }
#cart-content.hidden { display: none; }

.cart-profile-card,
.delivery-options,
.cart-items-section,
.cart-summary,
.contact-card,
.loyalty-progress-card,
.loyalty-steps,
.events-card {
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.cart-profile-card { overflow: hidden; }

.cart-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.cart-avatar,
.loyalty-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, #E3C46E, #B08A2E);
  color: #1F1704;
  font-weight: 700;
}

.cart-avatar { width: 44px; height: 44px; font-size: 1.125rem; }
.cart-profile-name { font-size: 1.0625rem; font-weight: 600; }
.cart-profile-tel { font-size: 0.875rem; color: var(--label-2); }


.delivery-options { padding: 14px 16px 16px; }

.delivery-options-title,
.cart-items-title,
.loyalty-steps-title,
.history-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--label-2);
}

.delivery-options-title { margin-bottom: 10px; }

.delivery-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
}

.delivery-radio { position: relative; }

.delivery-radio input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.delivery-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.delivery-radio input:checked + .delivery-radio-label {
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .delivery-radio input:checked + .delivery-radio-label { background: #636366; }
}

.delivery-radio input:focus-visible + .delivery-radio-label { outline: 3px solid var(--accent); outline-offset: 1px; }

.delivery-form {
  min-width: 0;
  margin: 16px 0 4px;
  padding: 14px 0 4px;
  border: 0;
  box-shadow: 0 -0.5px 0 var(--separator), 0 0.5px 0 var(--separator);
}

.delivery-form.is-entering { animation: deliveryFormIn 280ms var(--ease-out) both; }

@keyframes deliveryFormIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.delivery-form-title {
  float: left;
  width: 100%;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--label);
}

.delivery-form-title + * { clear: left; }

.df-zone {
  margin: -6px 2px 12px;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.df-field { min-width: 0; margin-bottom: 12px; }

.df-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 10px;
}

.df-row .df-field { margin-bottom: 0; }
.df-row ~ .df-field { margin-top: 12px; }

.df-label {
  display: block;
  margin: 0 2px 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--label-2);
}

.df-optional { font-weight: 400; opacity: 0.85; }
.df-optional::before { content: "· "; }

.df-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--fill);
  font-size: 1rem;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.df-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); background: var(--surface); }
.df-input[aria-invalid="true"] { box-shadow: 0 0 0 1.5px var(--danger); background: var(--danger-tint); }
.df-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 2px var(--danger); background: var(--surface); }

.df-error {
  margin: 6px 2px 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--danger);
  text-wrap: pretty;
}

.time-select {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 40px 0 14px;
  border-radius: var(--r-sm);
  background-color: var(--fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23948f87' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.preorder-note {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--label);
  text-wrap: pretty;
}

.cart-items-section { padding: 14px 0 4px; }

.cart-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 4px 16px;
}

.btn-clear-cart {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 0.9375rem;
  color: var(--danger);
}

.cart-item { padding: 12px 16px; }
.cart-item + .cart-item { box-shadow: 0 -0.5px 0 var(--separator); }

.cart-item-top { display: flex; align-items: center; gap: 12px; }

.cart-item-img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: var(--fill);
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.cart-item-price { margin-top: 2px; font-size: 0.9375rem; color: var(--label-2); font-variant-numeric: tabular-nums; }

.cart-item-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--fill);
}

.qty-btn {
  position: relative;
  width: 38px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 16px;
  color: var(--label);
  transition: var(--press);
}

.qty-btn::after { content: ""; position: absolute; inset: -4px 0; }
.qty-btn:active { background: var(--fill-strong); transform: scale(0.92); }
.qty-btn.remove .ti-trash { color: var(--danger); }

.qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart-item-note {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill);
  font-size: 0.9375rem;
  line-height: 1.35;
  resize: vertical;
}

.delivery-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--accent-tint);
  color: var(--accent-text);
}

.delivery-info-text { flex: 1; min-width: 0; font-size: 0.9375rem; color: var(--label); }

.delivery-info-link,
.merci-pickup a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -10px -4px;
  padding: 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.merci-pickup {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--accent-tint);
  text-align: left;
  font-size: 0.9375rem;
}

.merci-pickup .ti { flex-shrink: 0; color: var(--accent-text); }
.merci-pickup span { flex: 1; min-width: 0; }
.merci-pickup a { margin: -10px 0; }
.merci-delivery { align-items: flex-start; }
.merci-delivery .ti { margin-top: 2px; }
.merci-delivery strong { overflow-wrap: anywhere; }
.merci-delivery-contact { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--label-2); overflow-wrap: anywhere; }
.delivery-info-text strong { font-weight: 700; }

.cart-summary { padding: 6px 16px 14px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  font-size: 1rem;
}

.summary-row + .summary-row { box-shadow: 0 -0.5px 0 var(--separator); }
.summary-label { color: var(--label-2); }
.summary-value { font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-row.total { padding-top: 12px; }
.summary-row.total .summary-label { color: var(--label); font-weight: 600; font-size: 1.0625rem; }
.summary-row.total .summary-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }

.summary-time {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--label-2);
}

.cart-notices { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }

.cart-notice {
  display: flex;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--label-2);
}

.cart-notice .ti { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.cart-notice-allergy { color: var(--label); font-weight: 500; }
.cart-notice-allergy .ti { color: var(--accent-text); }

.cart-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-order { font-size: 0.9375rem; line-height: 1.2; padding: 8px 14px; text-wrap: balance; }
.btn-order .ti-brand-whatsapp { color: var(--wa); }
@media (prefers-color-scheme: dark) { .btn-order .ti-brand-whatsapp { color: #4CD07D; } }
.order-hint,
.pay-hint { margin-top: -4px; text-align: center; font-size: 0.8125rem; color: var(--label-2); }
.pay-hint { margin-bottom: 6px; }
.pay-hint, .order-hint { text-wrap: balance; }
.pay-statement { margin: -14px 0 6px; text-align: center; font-size: 0.75rem; color: var(--label-2); }
.pay-hint.is-warning,
.order-hint.is-warning { color: var(--label); font-weight: 500; }
.btn-order:disabled .ti-brand-whatsapp { color: inherit; }

.btn-pay { font-variant-numeric: tabular-nums; }
.btn-pay .pay-spinner { display: none; }
.btn-pay.is-loading .ti-lock { display: none; }
.btn-pay.is-loading .pay-spinner { display: inline-block; animation: spin 0.9s linear infinite; }
.btn-pay.is-loading:disabled { background: var(--accent); color: var(--on-accent); }

.btn-order.is-suggested { animation: suggest 1.2s var(--ease-out) 0.3s 2; }

@keyframes suggest {
  0%, 100% { transform: none; }
  35% { transform: scale(1.035); }
  60% { transform: scale(0.99); }
}

/* ============================================================
   FIDÉLITÉ
   ============================================================ */
#page-loyalty { padding-top: 0; }

.loyalty-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px var(--gutter) 22px;
  text-align: center;
}

.loyalty-avatar { width: 84px; height: 84px; font-size: 2rem; box-shadow: var(--shadow-md); margin-bottom: 12px; }
.loyalty-name { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.022em; }
.loyalty-sub { font-size: 0.9375rem; color: var(--label-2); margin-top: 2px; }

.loyalty-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--gutter);
}

.stat-card {
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}

.stat-label { font-size: 0.875rem; color: var(--label-2); }

.loyalty-progress-card { margin: 20px var(--gutter) 0; padding: 16px; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-title { font-size: 1rem; font-weight: 600; }
.progress-count { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-text); }

.progress-bar-wrap {
  height: 8px;
  border-radius: 4px;
  background: var(--fill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.8s var(--ease-out);
}

.progress-sub { margin-top: 10px; font-size: 0.875rem; color: var(--label-2); }

.loyalty-steps { margin: 20px var(--gutter) 0; padding: 14px 16px 4px; }
.loyalty-steps-title { margin-bottom: 4px; }

.loyalty-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.loyalty-step + .loyalty-step { box-shadow: 0 -0.5px 0 var(--separator); }

.step-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.step-text { font-size: 0.9375rem; line-height: 1.35; }
.step-text strong { font-weight: 600; }

.history-section { margin: 28px var(--gutter) 0; }
.history-title { padding: 0 4px 8px; }

.history-item {
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.history-item + .history-item { margin-top: 10px; }

.history-item-header { display: flex; justify-content: space-between; gap: 12px; }
.history-ref { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.history-date { font-size: 0.875rem; color: var(--label-2); }
.history-items-list { margin: 4px 0 10px; font-size: 0.9375rem; color: var(--label-2); }
.history-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.history-total { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-card { margin: 6px var(--gutter) 0; overflow: hidden; }

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.contact-logo { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.contact-name { font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 600; }
.contact-tagline { font-size: 0.9375rem; color: var(--label-2); }

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin-left: 16px;
  padding: 10px 14px 10px 0;
  box-shadow: 0 -0.5px 0 var(--separator);
  transition: background-color 0.15s ease;
}

.contact-row[onclick] { cursor: pointer; }
.contact-row[onclick]:active { background: var(--fill); }

.contact-row-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}

.contact-row-icon .ti { font-size: 17px !important; }
.contact-row-info { flex: 1; min-width: 0; }
.contact-row-label { font-size: 0.8125rem; color: var(--label-2); }
.contact-row-value { font-size: 1rem; line-height: 1.35; }
.contact-row > .ti-chevron-right { color: var(--fill-strong) !important; font-size: 18px; }

@media (prefers-color-scheme: dark) {
  .contact-row > .ti-chevron-right { color: #5A5A5E !important; }
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px var(--gutter) 0;
}

.events-card { margin: 20px var(--gutter) 0; padding: 18px 16px 16px; }

.events-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.events-title .ti { color: var(--accent-text); font-size: 22px; }
.events-sub { margin: 6px 0 16px; font-size: 0.9375rem; line-height: 1.45; color: var(--label-2); }

/* ============================================================
   TOASTS, ANIMATIONS DIVERSES
   ============================================================ */
#toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%;
  z-index: 9000;
  width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: var(--material);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-md), inset 0 0 0 0.5px var(--separator);
  opacity: 0;
  transform: translateY(-16px) scale(0.96);
  transition: transform 0.45s var(--ease-out), opacity 0.3s ease;
  pointer-events: auto;
}

.toast.show { opacity: 1; transform: none; }
.toast.hide { opacity: 0; transform: translateY(-16px) scale(0.96); }

.toast-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.toast-icon.success { background: var(--success-tint); color: var(--success); }
.toast-icon.error { background: var(--danger-tint); color: var(--danger); }
.toast-icon.info { background: var(--accent-tint); color: var(--accent-text); }
.toast-text { font-size: 0.9375rem; font-weight: 500; line-height: 1.3; }

.fly-item {
  position: fixed;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  will-change: transform;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#confetti-canvas.active { opacity: 1; }

.sidebar,
.app-footer { display: none; }

/* ============================================================
   ACCESSIBILITÉ : mouvement et transparence réduits
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity, background-color, color, visibility !important;
    transition-duration: 0.2s !important;
    scroll-behavior: auto !important;
  }

  .modal-sheet, .onboarding-sheet, .confirm-sheet { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar, .bottom-nav, .toast { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --separator: rgba(0, 0, 0, 0.45); --label-2: #4A4642; }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --separator: rgba(255, 255, 255, 0.45); --label-2: #D6D1C9; }
}

@media (prefers-contrast: more) {
  :root[data-ambiance="soir"] { --label-2: #4E3D32; }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root[data-ambiance="soir"] { --label-2: #DCCBBB; }
}

/* ============================================================
   PAYSAGE TÉLÉPHONE
   ============================================================ */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { aspect-ratio: 21 / 9; }
  .modal-img-wrap { max-height: 38dvh; }
}

/* ============================================================
   TABLETTE (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --gutter: 28px; }

  #app { max-width: 820px; margin: 0 auto; }

  .hero { aspect-ratio: 16 / 9; }
  .hero-title { font-size: 3rem; }
  .hero-content { padding: 24px 32px 32px; }

  .card,
  .skeleton-card { width: 230px; }

  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
  .info-grid { grid-template-columns: repeat(4, 1fr); }

  #modal-product { justify-content: center; padding: 32px; }

  .modal-sheet {
    max-width: 520px;
    max-height: calc(100dvh - 64px);
    border-radius: var(--r-sheet);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.45s var(--ease-sheet), opacity 0.3s ease;
  }

  #modal-product.active .modal-sheet { transform: none; opacity: 1; }
  .modal-handle { display: none; }
  .modal-footer { padding-bottom: 16px; }

  #onboarding, #modal-confirm { justify-content: center; padding: 32px; }
  .onboarding-sheet, .confirm-sheet { max-width: 440px; border-radius: var(--r-sheet); padding-bottom: 24px; }
}

/* ============================================================
   DESKTOP (≥ 1024px) — barre latérale façon iPadOS
   ============================================================ */
@media (min-width: 1024px) {
  :root { --gutter: 40px; --tabbar-h: 0px; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: 264px;
    display: flex;
    flex-direction: column;
    padding: 24px 14px 20px;
    background: var(--surface);
    box-shadow: 0.5px 0 0 var(--separator);
    overflow-y: auto;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 24px;
  }

  .sidebar-logo { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
  .sidebar-name { font-size: 0.8125rem; color: var(--label-2); }
  .sidebar-title { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; line-height: 1.1; }

  .sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }

  .sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    color: var(--label);
    transition: background-color 0.15s ease;
  }

  .sidebar-item > .ti,
  .sidebar-item-inner .ti { font-size: 21px; color: var(--accent-text); }
  .sidebar-item { justify-content: flex-start; }
  .sidebar-item-inner { display: flex; align-items: center; gap: 12px; flex: 1; }
  .sidebar-item:hover { background: var(--fill); }
  .sidebar-item.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
  .sidebar-item.active .ti { color: var(--on-accent); }

  .sidebar-badge {
    display: none;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 11px;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  .sidebar-badge.visible { display: inline-block; }

  .sidebar-footer { display: flex; flex-direction: column; gap: 12px; padding: 16px 10px 0; }
  .sidebar-status { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--label-2); }

  .sidebar-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--wa);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--press);
  }

  .sidebar-wa:hover { background: var(--wa-pressed); }

  #app { max-width: none; margin: 0 0 0 264px; }

  .topbar { padding-left: var(--gutter); padding-right: var(--gutter); }
  .topbar-logo { display: none; }

  .bottom-nav,
  .fab-wa { display: none !important; }

  .page { padding-bottom: 48px; }

  .page > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .page-title-bar { padding-top: 28px; }

  .hero {
    height: 440px;
    aspect-ratio: auto;
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(1120px - 2 * var(--gutter));
    margin: 20px auto 0;
  }
  .hero-content { max-width: 620px; padding: 40px; }
  .hero-title { font-size: 3.5rem; }

  .cards-scroll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; gap: 22px; }
  .card,
  .skeleton-card { width: auto; }

  .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
  .search-wrap, .cat-tabs { max-width: 520px; margin-left: var(--gutter); margin-right: auto; }
  .search-wrap { padding-left: 0; padding-right: 0; }

  #cart-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
    gap: 24px;
  }

  #cart-content.hidden { display: none; }
  .cart-checkout { position: sticky; top: calc(var(--topbar-h) + 20px); }

  .loyalty-header,
  .loyalty-stats,
  .loyalty-progress-card,
  .loyalty-steps,
  .history-section,
  .contact-card,
  .contact-actions,
  .events-card { max-width: 640px; }

  .loyalty-progress-card,
  .loyalty-steps,
  .history-section,
  .contact-card,
  .contact-actions,
  .events-card { margin-left: auto; margin-right: auto; }

  .loyalty-stats { padding: 0; margin-left: auto; margin-right: auto; }

  .app-footer {
    display: block;
    margin-left: 264px;
    padding: 20px var(--gutter) 28px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--label-2);
    box-shadow: 0 -0.5px 0 var(--separator);
  }

  .app-footer a { color: var(--accent-text); }
  .app-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ============================================================
   SIGNATURE TÉRANGA — calebasse, cauris, vapeur, tissu, soir
   ============================================================ */
:root { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none' stroke='%23C9A84C' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 5l11 11-11 11L5 16z'/%3E%3Cpath d='M16 11l5 5-5 5-5-5z'/%3E%3Cpath d='M0 4l4-4M28 0l4 4M0 28l4 4M28 32l4-4'/%3E%3Cg fill='%23C9A84C' stroke='none'%3E%3Ccircle cx='16' cy='16' r='.9'/%3E%3Ccircle cx='0' cy='16' r='.9'/%3E%3Ccircle cx='32' cy='16' r='.9'/%3E%3Ccircle cx='16' cy='0' r='.9'/%3E%3Ccircle cx='16' cy='32' r='.9'/%3E%3C/g%3E%3C/svg%3E"); --frise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12' fill='none' stroke='%23C9A84C' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 9l4-5 4 5 4-5 4 5 4-5 4 5'/%3E%3Cg fill='%23C9A84C' stroke='none'%3E%3Ccircle cx='8' cy='2' r='.9'/%3E%3Ccircle cx='20' cy='2' r='.9'/%3E%3C/g%3E%3C/svg%3E"); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Icônes SVG maison au trait Tabler (2 px, arrondi) */
.icon-svg { width: 1em; height: 1em; flex-shrink: 0; overflow: visible; }
.topbar-btn .calebasse { width: 24px; height: 24px; }
.nav-item .calebasse { width: 25px; height: 25px; }
.sidebar-item .calebasse { width: 21px; height: 21px; color: var(--accent-text); }
.sidebar-item.active .calebasse { color: var(--on-accent); }
.cart-empty-icon .calebasse { width: 36px; height: 36px; }

.calebasse.is-bouncing {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: calebasseBounce 0.45s var(--ease-out);
}

@keyframes calebasseBounce {
  0% { transform: none; }
  30% { transform: translateY(2px) scale(1.12, 0.86); }
  60% { transform: translateY(-3px) scale(0.95, 1.06); }
  100% { transform: none; }
}

/* Tissu : motif original (losanges, chevrons, points) en filigrane doré */
.onboarding-sheet,
.cart-empty,
.loyalty-progress-card { position: relative; isolation: isolate; }

.onboarding-sheet::before,
.cart-empty::before,
.loyalty-progress-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: var(--motif) center / 32px 32px repeat;
}

.onboarding-sheet::before {
  inset: 0 0 auto;
  height: 150px;
  border-radius: inherit;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent);
  mask-image: linear-gradient(180deg, #000 20%, transparent);
}

.cart-empty::before {
  inset: 24px 0 auto;
  height: 180px;
  opacity: 0.2;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}

.loyalty-progress-card { overflow: hidden; }

.loyalty-progress-card::before {
  inset: 0;
  opacity: 0.12;
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000);
  mask-image: linear-gradient(120deg, transparent 30%, #000);
}

.divider {
  display: block;
  height: 12px;
  margin: 30px var(--gutter) 0;
  background: var(--frise) center / 24px 12px repeat-x;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.divider + .section { padding-top: 22px; }

/* Cauris de fidélité */
.cauris-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  margin: 4px 0 2px;
}

.cauri { display: flex; justify-content: center; }
.cauri svg { width: 100%; max-width: 26px; height: auto; overflow: visible; }

.cauri-body { fill: none; stroke: var(--accent-text); stroke-width: 1.2; opacity: 0.55; }
.cauri-slit { fill: none; stroke: var(--accent-text); stroke-width: 1; stroke-linecap: round; opacity: 0.4; }
.cauri-sheen { fill: rgba(255, 255, 255, 0.75); opacity: 0; }

.cauri.is-filled .cauri-body { fill: url(#cauri-nacre); stroke: #9C7429; opacity: 1; }
.cauri.is-filled .cauri-slit { stroke: #6E4F14; opacity: 0.85; }
.cauri.is-filled svg { filter: drop-shadow(0 1px 1.5px rgba(80, 55, 10, 0.3)); }

.cauri.is-new svg { animation: cauriIn 0.6s var(--ease-out) calc(var(--n) * 110ms) both; }

.cauri.is-new .cauri-sheen {
  animation: cauriSheen 0.8s ease-out calc(var(--n) * 110ms + 0.35s) both;
}

@keyframes cauriIn {
  0% { opacity: 0; transform: translateY(6px) scale(0.4) rotate(-25deg); }
  60% { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes cauriSheen {
  0% { opacity: 0; transform: translateX(0) skewX(-20deg); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(40px) skewX(-20deg); }
}

.cauris-row.is-complete .cauri svg {
  animation: cauriIn 0.6s var(--ease-out) calc(var(--n) * 110ms) both,
    cauriWave 0.7s var(--ease-out) 1.4s both;
}

@keyframes cauriWave {
  0%, 100% { transform: none; }
  40% { transform: translateY(-5px) rotate(-6deg); }
}

/* Vapeur : 3 volutes translucides, uniquement sur les plats chauds */
.steam {
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: 1;
  width: 84px;
  height: 104px;
  margin-left: -42px;
  pointer-events: none;
  filter: blur(1.5px);
}

.steam i {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 78px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 80' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M10 78c-6-10 6-16 0-26s6-16 0-26 4-14 0-22'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  animation: steamRise 5s ease-in-out infinite;
  will-change: transform, opacity;
}

.steam i:nth-child(1) { left: 8px; }
.steam i:nth-child(2) { left: 32px; height: 96px; animation-delay: 1.7s; }
.steam i:nth-child(3) { left: 56px; animation-delay: 3.4s; }

@keyframes steamRise {
  0% { opacity: 0; transform: translateY(14px) scaleX(0.8); }
  25% { opacity: 0.55; }
  70% { opacity: 0.22; }
  100% { opacity: 0; transform: translateY(-26px) scaleX(1.3); }
}

.hero .steam { left: 56%; top: 12%; transform: scale(1.5); transform-origin: 50% 100%; }

#modal-product:not(.active) .steam i { animation-play-state: paused; }

/* Cartes : la vapeur ne s'anime qu'au survol ou au toucher, pour rester légère */
.menu-card-img-wrap .steam,
.card-img-wrap .steam { top: 6%; transform: scale(0.8); transform-origin: 50% 100%; }

.menu-card .steam i,
.card .steam i { animation-play-state: paused; }

.menu-card:hover .steam i,
.menu-card:active .steam i,
.menu-card:focus-visible .steam i,
.card:hover .steam i,
.card:active .steam i,
.card:focus-visible .steam i { animation-play-state: running; }

/* Ambiance du soir : indicateur, en-tête et carte d'accueil réchauffés */
.ambiance-chip {
  display: none;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding-left: 8px;
  box-shadow: inset 1px 0 0 var(--separator);
  color: var(--accent-text);
  font-weight: 600;
}

.ambiance-chip .ti { font-size: 14px; }
:root[data-ambiance="soir"] .ambiance-chip { display: inline-flex; }

.topbar { background-image: linear-gradient(180deg, var(--dusk), transparent); }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(200deg, rgba(240, 150, 95, 0.38), rgba(200, 90, 60, 0.12) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 1.2s ease;
}

:root[data-ambiance="soir"] .hero::after { opacity: 1; }
.hero-content { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .steam { display: none; }
  .cauri svg, .cauri-sheen, .calebasse { animation: none !important; }
}

/* ============================================================
   PAGE MERCI (retour de paiement Stripe)
   ============================================================ */
.merci-topbar { position: sticky; }

.merci-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--label);
}

.merci-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px var(--gutter) calc(48px + var(--safe-bottom));
}

.merci-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.merci-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 170px;
  pointer-events: none;
  background: var(--motif) center / 32px 32px repeat;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent);
  mask-image: linear-gradient(180deg, #000 25%, transparent);
}

.merci-emblem {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 30px;
}

.merci-emblem.cauri { width: 56px; height: 72px; border-radius: 0; background: none; }
.merci-emblem.cauri svg { width: 100%; max-width: none; }
.merci-emblem-wait .ti { animation: spin 0.9s linear infinite; }

.merci-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.merci-sub {
  margin: 8px auto 0;
  max-width: 36ch;
  font-size: 1rem;
  color: var(--label-2);
}

.merci-recap {
  margin: 22px 0 0;
  border-radius: var(--r-sm);
  background: var(--fill);
  text-align: left;
}

.merci-recap > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
}

.merci-recap > div + div { box-shadow: 0 -0.5px 0 var(--separator); }
.merci-recap dt { color: var(--label-2); white-space: nowrap; }
.merci-recap dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.merci-statement { margin: 8px 0 0; font-size: 0.75rem; color: var(--label-2); }

.merci-lines {
  margin: 12px 0 0;
  padding: 0 4px;
  list-style: none;
  text-align: left;
  font-size: 0.9375rem;
}

.merci-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--label-2);
}

.merci-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

.merci-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--success);
}
