/* ==========================================================================
   KOÜS — Bar à Couscous Paris 8ème
   Global Design Tokens, Reset, Typography & Mobile App Shell Layout
   ========================================================================== */

:root {
  /* Brand Palette (Extracted from KOÜS assets & menu) */
  --kous-obsidian: #0E0E0E;
  --kous-charcoal: #161616;
  --kous-surface-dark: #1F1E1C;

  --gold-dark: #9E823C;
  --gold-primary: #C5A759;
  --gold-light: #E8D79E;
  --gold-tint: rgba(197, 167, 89, 0.14);
  --gold-gradient: linear-gradient(135deg, #B5974B 0%, #E7D69D 50%, #B89A4E 100%);

  /* Uber Eats / Deliveroo Crisp App Surface */
  --bg-app: #F6F5F2;
  --bg-surface: #FFFFFF;
  --bg-muted: #EFECE6;
  --text-primary: #141414;
  --text-secondary: #5E5E5E;
  --text-muted: #8A8780;
  --border-subtle: #EAE7E1;
  --border-strong: #D6D1C7;

  /* Semantic Status */
  --status-popular: #0E8345;
  --status-popular-bg: #E8F5ED;
  --status-danger: #C9302C;
  --status-danger-bg: #FDECEA;
  --badge-required-bg: #EFEFEF;
  --badge-required-text: #3A3A3A;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Elevation */
  --shadow-card: 0 4px 16px rgba(14, 14, 14, 0.06);
  --shadow-float: 0 10px 30px rgba(14, 14, 14, 0.16);
  --shadow-gold: 0 8px 24px rgba(181, 151, 75, 0.32);

  /* Layout Dimensions */
  --app-max-width: 430px;
  --tab-bar-height: 70px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--kous-obsidian);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Desktop Mobile-Device Stage with subtle Zellige backdrop */
.device-stage {
  min-height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: var(--kous-obsidian);
  background-image:
    linear-gradient(180deg, rgba(14, 14, 14, 0.92) 0%, rgba(14, 14, 14, 0.96) 100%),
    url('/assets/brand/zellige-pattern.png');
  background-size: auto, 240px;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background-color: var(--bg-app);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-bar-height) + 84px + var(--safe-bottom));
  overflow-x: hidden;
}

@media (min-width: 520px) {
  .device-stage {
    padding: 18px 16px;
    align-items: flex-start;
  }

  .app-shell {
    min-height: calc(100vh - 36px);
    border-radius: 34px;
    border: 1px solid rgba(197, 167, 89, 0.25);
    overflow: hidden;
  }
}

.view-panel {
  flex: 1;
}

/* Shared Gold CTA Button */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: var(--kous-obsidian);
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-gold);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-gold:active {
  transform: scale(0.98);
}

.btn-gold:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--kous-obsidian);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn-dark:active {
  transform: scale(0.98);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* Toast Notification */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-bar-height) + 84px);
  transform: translateX(-50%) translateY(16px);
  background: var(--kous-obsidian);
  color: #FFFFFF;
  border: 1px solid rgba(197, 167, 89, 0.45);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  z-index: 250;
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
