/* Menu Ludiparc – version mobile (liste compacte) */

:root {
  color-scheme: dark;
  --bg: #0f0d0b;
  --surface: #1a1714;
  --surface-2: #231f1b;
  --line: #2f2924;
  --ink: #fff7ec;
  --muted: #b8a999;
  --yellow: #f4d248;
  --orange: #f07c1d;
  --red: #d8431f;
  --green: #8cc152;
  --radius: 16px;
  --gutter: 16px;
  --topbar-h: 60px;
  --navbar-h: 56px;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --display: "Lilita One", "Rubik", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--navbar-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- Barre du haut ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 8px var(--gutter);
  padding-top: max(8px, env(safe-area-inset-top));
  background: radial-gradient(120% 140% at 0% 0%, rgba(240, 124, 29, 0.22), transparent 60%), var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.brand-text { display: grid; min-width: 0; }
.brand-text strong {
  font: 400 22px/1.05 var(--display);
  letter-spacing: 0.02em;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.langs {
  display: flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.langs a {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.langs a[aria-current] { background: var(--orange); color: #1b0e03; }

/* ---------- Barre categories + recherche (collante) ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--navbar-h);
  padding: 0 0 0 var(--gutter);
  background: rgba(15, 13, 11, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

[dir="rtl"] .navbar { padding: 0 var(--gutter) 0 0; }

.search-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.chips {
  display: flex;
  gap: 8px;
  min-width: 0;
  height: 100%;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline-end: var(--gutter);
  scroll-padding-inline: 56px;
  -webkit-mask-image: linear-gradient(to var(--fade-dir, right), #000 85%, transparent);
  mask-image: linear-gradient(to var(--fade-dir, right), #000 85%, transparent);
}
[dir="rtl"] .chips { --fade-dir: left; }
.chips::-webkit-scrollbar { display: none; }

.chips a {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chips a.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1d1703;
  font-weight: 600;
}

.search-box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--gutter);
  background: var(--bg);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: var(--surface);
  font-size: 16px; /* evite le zoom iOS */
  outline: none;
}
.search-box input::-webkit-search-cancel-button { display: none; }

.search-box button {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
}

.search-status {
  margin: 16px var(--gutter) 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Sections du menu ---------- */

.menu {
  width: min(720px, 100%);
  margin: 0 auto;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.menu-section { padding: 20px var(--gutter) 4px; }

.section-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 4px;
}

.section-head.has-banner {
  min-height: 112px;
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 8px;
}

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

.section-head.has-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 13, 11, 0) 20%, rgba(15, 13, 11, 0.88) 100%);
}

.section-head h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--yellow);
  font: 400 28px/1.05 var(--display);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.section-head .count {
  position: relative;
  z-index: 1;
  margin-bottom: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Articles ---------- */

.dishes { margin: 0; padding: 0; list-style: none; }
.dish + .dish { border-top: 1px solid var(--line); }

.dish-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: none;
  text-align: start;
}

.dish-btn:active { opacity: 0.7; }

.dish-text { display: grid; gap: 4px; flex: 1; min-width: 0; }

.dish-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dish-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.dish-price {
  margin-top: 2px;
  color: var(--yellow);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.dish-thumb {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface);
}

.dish.is-soldout .dish-name,
.dish.is-soldout .dish-desc,
.dish.is-soldout .dish-price,
.dish.is-soldout .dish-thumb { opacity: 0.45; }
.dish.is-soldout .dish-price { text-decoration: line-through; }

/* ---------- Badges ---------- */

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

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--ink);
}
.badge-new { background: rgba(244, 210, 72, 0.16); color: var(--yellow); }
.badge-popular { background: rgba(240, 124, 29, 0.18); color: #ffa45c; }
.badge-spicy { background: rgba(216, 67, 31, 0.2); color: #ff7b5c; }
.badge-veggie { background: rgba(140, 193, 82, 0.18); color: #a9d877; }
.badge-chef { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.badge-soldout { background: var(--ink); color: var(--bg); }

/* ---------- Infos pratiques ---------- */

.info { padding: 28px var(--gutter) 8px; }
.info h2 { margin: 0 0 12px; color: var(--yellow); font: 400 28px/1.1 var(--display); }

.info-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .info-grid { grid-template-columns: 1fr 1fr; } }

.info-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.info-card h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.info-card p { margin: 0 0 4px; }
.info-card .hours { white-space: normal; }

.pill-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #1b0e03;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
}

.foot {
  padding: 24px var(--gutter) 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.foot p { margin: 2px 0; }

/* ---------- Bouton haut de page ---------- */

.to-top {
  position: fixed;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: #1d1703;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ---------- Fiche article (bottom sheet) ---------- */

.sheet { position: fixed; inset: 0; z-index: 50; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fade 0.2s ease-out;
}

.sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: 88vh;
  max-height: 88dvh;
  margin: 0 auto;
  width: min(560px, 100%);
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  padding-bottom: env(safe-area-inset-bottom);
  animation: slide-up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sheet-body { display: grid; gap: 10px; padding: 18px 20px 24px; }
.sheet-body h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.sheet-desc { margin: 0; color: var(--muted); }
.sheet-desc:empty { display: none; }
.sheet-price { margin: 0; color: var(--yellow); font-size: 22px; font-weight: 700; }

.sheet-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 13, 11, 0.75);
}

body.sheet-open { overflow: hidden; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Page article seule (?article=) ---------- */

.single { width: min(560px, 100%); margin: 0 auto; padding: 8px var(--gutter) 40px; }
.single-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.single-cat { margin: 16px 0 0; color: var(--orange); font-weight: 600; font-size: 14px; }
.single h1 { margin: 4px 0 8px; font-size: 26px; line-height: 1.2; }
.single-desc { color: var(--muted); }
.single-price { color: var(--yellow); font-size: 24px; font-weight: 700; }

/* ---------- Arabe ---------- */

[lang="ar"] .section-head h2,
[lang="ar"] .info h2 { font-family: var(--font); font-weight: 700; }
[lang="ar"] body, html[lang="ar"] { line-height: 1.6; }

/* ---------- Lien vers le site Ludiparc ---------- */

.topbar .brand { margin-inline-end: auto; }

.site-link {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}
.site-link svg { width: 20px; height: 20px; }

.site-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px var(--gutter) 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(244, 210, 72, 0.14), rgba(240, 124, 29, 0.16));
  text-decoration: none;
}
.site-card img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.site-card-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.site-card-text strong { color: var(--yellow); font: 400 22px/1.1 var(--display); }
.site-card-text span { color: var(--muted); font-size: 14px; }
.site-card-go { flex: none; color: var(--orange); }
[dir="rtl"] .site-card-go { transform: scaleX(-1); }
[lang="ar"] .site-card-text strong { font-family: var(--font); font-weight: 700; }
