@import url('/css/fonts.css');

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  --bg:       #F7F4ED;
  --bg-card:  #ffffff;
  --bg-card2: #f5f2eb;
  --border:   #dedad2;
  --dark:     #32413B;
  --dark-dim: #4e6059;
  --sage:     #8EA688;
  --sage-dim: #6e8469;
  --cream:    #F7F4ED;
  --muted:    #8a9190;
  --r:        14px;
  --r-sm:     9px;
}

/* ── Base ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui, 'Sharp Grotesk', system-ui, sans-serif);
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Service pill — au-dessus des catégories, glisse avec la barre sticky ── */
.service-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto 10px;
  background: var(--dark);
  color: var(--cream);
  padding: 11px 28px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(50, 65, 59, 0.25);
  animation: pillIn 0.4s ease-out;
}

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

/* ── Header (non-sticky) ──────────────────────────────────────── */
.menu-header {
  text-align: center;
  padding: 36px 16px 22px;
}

.menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dim);
  margin-bottom: 6px;
}

.menu-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.95;
}

.menu-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Category nav (sticky) ────────────────────────────────────── */
.cat-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(247, 244, 237, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(222, 218, 210, 0.6);
  padding: 10px 0;
}

/* ── Mobile: dropdown toggle ──────────────────────────────────── */
.cat-nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
}

.cat-nav-toggle-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--sage-dim);
}

.cat-nav-toggle-icon svg { width: 18px; height: 18px; }

.cat-nav-toggle-label { flex: 1; }

.cat-nav-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.cat-nav-toggle.open { border-color: var(--sage); }
.cat-nav-toggle.open .cat-nav-chevron { transform: rotate(180deg); }

/* ── Mobile: dropdown panel ───────────────────────────────────── */
@media (max-width: 699px) {
  .cat-nav-wrapper { padding-bottom: 0; }

  .category-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 12px;
    max-height: 65vh;
    overflow-y: auto;
  }

  .category-nav.open { display: flex; }

  .category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--dark);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    text-align: left;
    white-space: nowrap;
  }

  .category-btn.active {
    background: var(--dark);
    color: var(--cream);
    border-color: var(--dark);
  }

  .category-btn:active { opacity: 0.8; }

  .cat-btn-icon svg { width: 20px; height: 20px; }
  .cat-btn-label { line-height: 1; }
}

/* ── Desktop: horizontal pills ────────────────────────────────── */
@media (min-width: 700px) {
  .cat-nav-toggle { display: none; }

  .category-nav {
    display: flex !important;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    padding: 0 16px;
  }

  .category-nav::-webkit-scrollbar { display: none; }

  .category-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 9px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    color: var(--dark);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
  }

  .category-btn:hover { background: var(--bg-card2); border-color: var(--sage); }
  .category-btn.active { background: var(--dark); color: var(--cream); border-color: var(--dark); }

  .cat-btn-icon svg { width: 17px; height: 17px; }
  .cat-btn-label { line-height: 1; }
}

/* ── Main content ─────────────────────────────────────────────── */
.menu-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

/* ── Loading dots ─────────────────────────────────────────────── */
.menu-loading {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 60px 0;
}

.menu-loading span {
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.menu-loading span:nth-child(2) { animation-delay: 0.2s; }
.menu-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1); }
}

/* ── Menu section ─────────────────────────────────────────────── */
.menu-section {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(50, 65, 59, 0.05);
}

.section-header {
  background: var(--dark);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--sage);
  opacity: 0.9;
}

.section-icon svg {
  width: 18px;
  height: 18px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ── Menu items list ──────────────────────────────────────────── */
.menu-items {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.menu-item:last-child { border-bottom: none; }

.menu-item:active { background: var(--bg-card2); }

.menu-item.item-sold-out { opacity: 0.42; }

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

.item-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  display: block;
  line-height: 1.3;
}

.item-desc {
  font-size: 0.83rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  display: block;
  margin-top: 3px;
}
.desc-dot {
  color: var(--sage);
  font-style: normal;
  font-size: 0.7rem;
  vertical-align: middle;
  margin-right: 1px;
}

.sold-out-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--bg-card);
  background: var(--muted);
  padding: 1px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

.item-restriction {
  font-size: 0.72rem;
  color: #b07d2a;
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Prix multiples (en solo · en trio) ──────────────────── */
.item-prices-inline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(142, 166, 136, 0.08);
  border: 1.5px solid rgba(142, 166, 136, 0.3);
  border-radius: var(--r-sm);
  padding: 5px 10px;
}
.item-prices-inline strong {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.88rem;
}
.ip-sep { color: var(--border); font-size: 0.75rem; }

.item-prices-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  align-items: flex-end;
  background: rgba(142, 166, 136, 0.08);
  border: 1.5px solid rgba(142, 166, 136, 0.3);
  border-radius: var(--r-sm);
  padding: 5px 10px;
}
.ip-row { display: flex; gap: 8px; align-items: baseline; }
.ip-label { font-size: 0.72rem; color: var(--muted); }
.ip-val   { font-size: 0.9rem; font-weight: 600; color: var(--dark); white-space: nowrap; }

.veg-tag  { font-size: 0.78rem; }

.item-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  background: rgba(142, 166, 136, 0.12);
  border: 1.5px solid rgba(142, 166, 136, 0.35);
  border-radius: var(--r-sm);
  padding: 5px 11px;
  flex-shrink: 0;
  align-self: center;
}

/* ── Empty / error states ─────────────────────────────────────── */
.menu-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Footer ───────────────────────────────────────────────────── */
.menu-footer {
  text-align: center;
  padding: 28px 16px 40px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-block;
  padding: 11px 24px;
  background: var(--dark);
  color: var(--cream);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}

.footer-link:hover { opacity: 0.85; }

.footer-link--sec {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--border);
}

.footer-link--sec:hover { border-color: var(--dark); }

/* ── Nudge taplist ────────────────────────────────────────────── */
.taplist-nudge {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  transition: transform 0.45s cubic-bezier(0.34, 1.46, 0.64, 1);
  z-index: 100;
  pointer-events: none;
}
.taplist-nudge.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.taplist-nudge a {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--dark);
  color: var(--cream);
  text-decoration: none;
  padding: 11px 18px 11px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(50,65,59,.35);
  white-space: nowrap;
}
.taplist-nudge a:hover { background: var(--dark-dim); }
.taplist-nudge svg { flex-shrink: 0; opacity: 0.9; }

/* ── Mobile : grille — prix haut-droite, description pleine largeur */
@media (max-width: 500px) {
  .item-name { font-weight: 600; }
  .menu-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 12px;
  }
  .item-info {
    display: contents;
  }
  .item-name {
    grid-column: 1;
    grid-row: 1;
  }
  .item-desc,
  .item-restriction,
  .sold-out-badge {
    grid-column: 1 / -1;
  }
  .item-prices-inline,
  .item-prices-stack,
  .item-price {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
}

/* ── Desktop ──────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .menu-main { max-width: 900px; }

  .menu-title { font-size: 3rem; }

  .category-nav {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 0 24px;
  }

  .menu-item:hover { background: var(--bg-card2); }
}
