/* Thème « restaurant ouzbek » — clair, sable, vert foncé, or. Mobile-first. Tokens : charte.md */
:root {
  --sand: #F8F4EA; --surface: #FFFDF8; --terracotta: #C75B3A; --green: #0F4D3A; --gold: #D4AF37;
  --gray: #6B6B6B; --ink: #1E1E1E; --line: #E8E0CF; --wa: #25D366; --tg: #229ED9;
  --green-soft: #E6F0EC; --terracotta-soft: #F8E5DE;
  --font-title: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 12px; --radius-lg: 18px; --nav-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom), 12px);
  --shadow: 0 2px 12px rgba(30, 30, 30, .06);
}
* { box-sizing: border-box; }
html { background: var(--sand); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--sand); color: var(--ink); font: 15px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; line-height: 1.15; } h2 { font-size: 20px; } h3 { font-size: 17px; }
.muted { color: var(--gray); }
.hidden, [hidden] { display: none !important; }

/* ---- coquille ---- */
#app { opacity: 0; transition: opacity .25s; }
#app.is-ready { opacity: 1; }
.header { position: sticky; top: 0; z-index: 20; background: rgba(248, 244, 234, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 640px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand__logo { width: 40px; height: 40px; object-fit: contain; }
.brand__name { font-family: var(--font-title); font-size: 21px; font-weight: 700; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang__btn { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--gray); }
.lang__btn.is-active { background: var(--green); color: #fff; }
.suzani { height: 14px; background: url('/assets/suzani-bande.webp') center / auto 100% repeat-x; opacity: .9; }

main { max-width: 640px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 44px); }
.screen { padding-top: 16px; }
.screen__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.ornament { display: block; width: 44px; height: 3px; margin: 8px 0 0; background: linear-gradient(90deg, var(--gold), transparent); border-radius: 2px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: var(--radius); background: var(--green); color: #fff; font-weight: 700; font-size: 15px; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); filter: brightness(1.08); }
.btn--block { width: 100%; }
.btn--ghost { background: var(--surface); color: var(--green); border: 1px solid var(--line); }
.btn--wa { background: var(--wa); } .btn--tg { background: var(--tg); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--gray); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.error { padding: 40px 16px; text-align: center; color: var(--terracotta); }

/* ---- nav du bas ---- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 253, 248, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav__inner { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 640px; margin: 0 auto; height: var(--nav-h); }
.nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--gray); position: relative; -webkit-tap-highlight-color: transparent; }
.nav__item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.nav__item.is-active { color: var(--green); }
.nav__item.is-active svg { transform: translateY(-1px); }
.nav__item.is-active::after { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
.nav__badge { position: absolute; top: 8px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--terracotta); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.nav__badge:empty { display: none; }

@media (min-width: 640px) { body { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- accueil ---- */
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.4; background: var(--line); box-shadow: var(--shadow); }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(15, 40, 30, .82) 100%); }
.hero__text { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; color: #fff; }
.hero__text h1 { font-size: 26px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.hero__text p { margin: 6px 0 0; font-size: 13.5px; opacity: .92; }
.hero__cta { margin: 14px 0 22px; }
.link { color: var(--green); font-weight: 700; font-size: 13px; white-space: nowrap; }
.reco-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 12px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reco-row::-webkit-scrollbar { display: none; }
.reco { flex: 0 0 156px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.reco__img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.reco__body { padding: 10px 12px 12px; }
.reco__name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reco__row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13px; }
.cats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0 8px; }
.cat-tile { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; font-size: 14px; text-align: left; box-shadow: var(--shadow); }
.cat-tile img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }

/* ---- liste menu ---- */
.listhead { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; gap: 8px 6px; margin-bottom: 10px; }
.listhead h2 { font-size: 22px; }
.listhead .search { grid-column: 1 / -1; }
.back { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); }
.back svg, .search svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.search svg { stroke: var(--gray); width: 20px; height: 20px; }
.search input { flex: 1; border: 0; background: none; outline: none; min-width: 0; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px 4px; position: sticky; top: 75px; z-index: 10; background: var(--sand); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--gray); white-space: nowrap; }
.cat img, .cat__all { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.cat__all { display: flex; align-items: center; justify-content: center; background: var(--gold); color: #fff; font-size: 14px; }
.cat.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.group { margin: 18px 0 10px; font-size: 19px; }
.dishes { display: flex; flex-direction: column; gap: 10px; }
.dish { display: flex; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.dish__img { width: 92px; height: 92px; border-radius: var(--radius); object-fit: cover; flex: none; }
.dish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish__name { font-size: 16px; }
.dish__desc { margin: 3px 0 0; font-size: 12.5px; color: var(--gray); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish__row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.dish.is-off { opacity: .6; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tag--off { background: var(--terracotta-soft); color: var(--terracotta); }
.add { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15, 77, 58, .3); transition: transform .12s; }
.add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.add--sm { width: 30px; height: 30px; }
.add.is-bump { animation: bump .35s; }
@keyframes bump { 30% { transform: scale(1.25); } 100% { transform: scale(1); } }
.empty { text-align: center; padding: 40px 0; }

/* ---- panier central en pastille ---- */
.nav__item--cart { overflow: visible; }
.nav__bubble { position: relative; width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--sand), 0 0 0 5px var(--gold), 0 6px 16px rgba(15, 77, 58, .35); transition: transform .15s; }
.nav__bubble svg { width: 26px; height: 26px; stroke: #fff; }
.nav__item--cart.is-active .nav__bubble { transform: translateY(-2px) scale(1.04); }
.nav__item--cart.is-active::after { display: none; }
.nav__item--cart .nav__badge { top: -4px; right: -4px; left: auto; border: 2px solid var(--sand); }
.nav__bubble.is-bump { animation: bump .35s; }

/* ---- fiche plat (panneau bas) ---- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 20, 20, .45); opacity: 0; transition: opacity .2s; }
.sheet-backdrop.is-open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 640px; margin: 0 auto; max-height: 92dvh; display: flex; flex-direction: column; background: var(--sand); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); }
.sheet.is-open { transform: translateY(0); }
.sheet__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.sheet__media { position: relative; aspect-ratio: 4 / 3; border-radius: 22px 22px 0 0; overflow: hidden; background: var(--line); }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; }
.sheet__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 253, 248, .92); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.sheet__close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.sheet__grip { position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, .8); }
.sheet__body { padding: 16px 18px 0; }
.sheet__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sheet__head h2 { font-size: 24px; }
.sheet__head .price { font-size: 18px; color: var(--green); }
.sheet__desc { margin: 8px 0 0; color: var(--gray); font-size: 14.5px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--green); }
.badge svg { width: 16px; height: 16px; fill: none; stroke: var(--terracotta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.label { display: block; margin: 16px 0 8px; font-size: 13px; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size { padding: 10px 6px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); text-align: center; transition: border-color .12s, background .12s; }
.size__name { display: block; font-weight: 700; font-size: 14px; }
.size__price { display: block; font-size: 12px; color: var(--gray); margin-top: 2px; }
.size.is-active { border-color: var(--green); background: var(--green-soft); }
.size.is-active .size__price { color: var(--green); font-weight: 700; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--green); }
.qty button:disabled { opacity: .35; }
.qty output { min-width: 34px; text-align: center; font-weight: 800; font-size: 16px; }
.sheet__foot { padding: 12px 18px calc(var(--safe-b) + 8px); background: var(--sand); border-top: 1px solid var(--line); }
.sheet__foot .btn { justify-content: space-between; }
.btn:disabled { background: var(--gray); opacity: .6; cursor: default; }
body.is-locked { overflow: hidden; }

/* ---- panier ---- */
.empty-cart { text-align: center; padding: 48px 16px; }
.empty-cart svg { width: 64px; height: 64px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.empty-cart h2 { margin-bottom: 4px; } .empty-cart .btn { margin-top: 18px; }
.link--danger { color: var(--terracotta); }
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.line__img { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; flex: none; }
.line__body { flex: 1; min-width: 0; }
.line__name { font-weight: 700; font-size: 15px; }
.line__unit { font-size: 12.5px; margin-top: 1px; }
.line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.qty--sm { padding: 2px; } .qty--sm button { width: 30px; height: 30px; font-size: 18px; } .qty--sm output { min-width: 28px; font-size: 15px; }
.summary { margin: 16px 0; padding: 14px 16px; }
.summary__row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14.5px; }
.summary__row--total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 17px; font-weight: 800; }
.summary__row--total .price { font-size: 19px; color: var(--green); }
.ok { color: var(--green); }
.form { display: flex; flex-direction: column; gap: 10px; }
.field { width: 100%; padding: 13px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--green); }
.field.is-bad { border-color: var(--terracotta); background: var(--terracotta-soft); }
textarea.field { resize: vertical; min-height: 56px; }
.channel { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-lg); margin-top: 4px; }
.channel--telegram { background: #E4F3FA; } .channel--whatsapp { background: #E7F8EC; }
.channel svg { width: 34px; height: 34px; flex: none; }
.channel--telegram svg { fill: var(--tg); } .channel--whatsapp svg { fill: var(--wa); }
.channel b { font-size: 14px; } .channel p { margin: 2px 0 0; font-size: 12.5px; color: var(--gray); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { background: var(--terracotta); }

/* ---- info ---- */
.about { display: flex; align-items: center; gap: 14px; padding: 14px; }
.about__logo { width: 64px; height: 64px; object-fit: contain; flex: none; }
.about__tag { margin: 2px 0 0; font-size: 13px; }
.about__text { margin: 14px 2px; font-size: 15px; }
.infos { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.info { display: flex; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.info__ic { width: 38px; height: 38px; border-radius: 50%; background: var(--green-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.info__ic svg, .contact__hours svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.info b { font-size: 13px; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.info p { margin: 2px 0 4px; font-weight: 600; }
a.btn { text-decoration: none; }

/* ---- avis ---- */
.rating { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 12px; }
.rating__num { font-family: var(--font-title); font-size: 44px; font-weight: 700; color: var(--green); line-height: 1; }
.stars { display: inline-flex; gap: 2px; }
.stars i { width: 16px; height: 16px; display: inline-block; }
.stars svg { width: 100%; height: 100%; fill: var(--line); stroke: none; }
.stars i.on svg { fill: var(--gold); }
.reviews { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.review { padding: 12px 14px; }
.review__head { display: flex; align-items: center; gap: 10px; }
.review__meta { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.review__meta .stars i { width: 13px; height: 13px; }
.review p { margin: 10px 0 0; font-size: 14.5px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--terracotta-soft); color: var(--terracotta); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }

/* ---- contact ---- */
.contact__sub { margin: -6px 0 14px; }
.contacts { display: flex; flex-direction: column; gap: 10px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--net); }
.contact__ic { width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--net) 14%, white); display: flex; align-items: center; justify-content: center; flex: none; }
.contact__ic svg { width: 26px; height: 26px; fill: var(--net); }
.contact__body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.contact__body b { font-size: 15px; }
.contact__arrow { font-size: 24px; color: var(--gray); }
.contact__hours { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 18px; font-size: 13px; }

/* ---- confettis au panier ---- */
.confetti { position: fixed; width: var(--w, 7px); height: var(--h, 11px); border-radius: 2px; margin: -5px 0 0 -4px; pointer-events: none; z-index: 60; will-change: transform, opacity; animation: confetti-vol var(--dur, 850ms) cubic-bezier(.15, .85, .35, 1) forwards; }
@keyframes confetti-vol {
  0% { transform: translate(0, 0) rotate(0deg) scale(.6); opacity: 1; }
  15% { transform: translate(calc(var(--dx) * .35), calc(var(--dy) * .45)) rotate(calc(var(--rot) * .2)) scale(1.1); opacity: 1; }
  65% { transform: translate(calc(var(--dx) * .9), calc(var(--dy) * .95)) rotate(calc(var(--rot) * .75)); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)); opacity: 0; }
}
