:root {
    --ink: #171310;
    --muted: #71685f;
    --line: #ece5dd;
    --paper: #fffaf3;
    --surface: #ffffff;
    --accent: #b21f32;
    --accent-2: #d99b31;
    --green: #0f7a52;
    --shadow: 0 18px 55px rgba(43, 30, 20, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---- Optimisations mobile (iOS/Android) ---- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

input,
select,
textarea {
    font-size: 16px; /* evite le zoom automatique iOS au focus */
}

button,
a,
.nav-card,
.cart-add,
.crumb,
.picker-opt,
.quick-chip,
.filter-chip {
    touch-action: manipulation;
}

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

.item-cat {
    margin: -2px 0 3px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.menu-hero {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 0 0;
    color: #fff;
    background: linear-gradient(135deg, #171310 0%, #4a171f 58%, #8a1b2b 100%);
    box-shadow: 0 16px 40px rgba(20, 10, 8, .22);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 10px;
}

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

.brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .75);
}

.brand-name {
    min-width: 0;
    font-size: clamp(1.05rem, 4.5vw, 1.5rem);
    font-weight: 800;
    line-height: 1.1;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.contact-actions a {
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
}

.header-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 12px;
    scrollbar-width: none;
}

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

.header-nav a {
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 800;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, .22);
}

.menu-shell {
    padding-top: 18px;
    padding-bottom: 40px;
}

.search-panel {
    position: sticky;
    top: 126px;
    z-index: 15;
    padding: 12px 0;
    background: var(--paper);
}

.search-panel label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: .82rem;
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 16px;
    background: #fff;
    color: var(--ink);
    outline: none;
    box-shadow: var(--shadow);
}

.search-panel input:focus {
    border-color: var(--accent-2);
}

.category-tabs {
    position: sticky;
    top: 210px;
    z-index: 14;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 14px;
    background: var(--paper);
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar,
.quick-actions::-webkit-scrollbar {
    display: none;
}

.category-tabs a {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.category-tabs a.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.category-section {
    scroll-margin-top: 270px;
    padding-top: 16px;
}

.category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.category-heading h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 850;
}

.category-heading span {
    color: var(--muted);
    font-size: .86rem;
}

.cat-group {
    margin: 22px 0 0;
}

.cat-group h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 800;
}

.items-list {
    display: grid;
    gap: 10px;
}

.menu-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 96px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(38, 27, 20, .07);
}

.item-copy {
    min-width: 0;
}

.item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-title-row h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.item-copy p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.35;
}

.item-copy small {
    display: inline-block;
    margin-top: 6px;
    color: var(--green);
    font-weight: 800;
}

.promo {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: #fff;
    background: var(--green);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.item-options {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: var(--ink);
    background: var(--accent-2);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.price {
    align-self: start;
    padding-top: 4px;
    color: var(--accent);
    white-space: nowrap;
    font-size: .96rem;
}

.empty-state {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

/* ===== Navigation: Types / Categories ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 14px;
}

.crumb {
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
}

.crumb:hover {
    color: var(--accent);
}

.crumb-current {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    cursor: default;
}

.crumb-sep {
    color: var(--muted);
}

.nav-screen {
    padding-top: 4px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.type-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.nav-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(38, 27, 20, .07);
    transition: transform .1s, box-shadow .1s;
}

.nav-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(15, 8, 5, .82) 0%, rgba(15, 8, 5, .34) 32%, rgba(15, 8, 5, 0) 58%);
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.nav-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: block;
}

.nav-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: grid;
    gap: 2px;
    padding: 16px 16px 14px;
}

.nav-card-body strong {
    color: #fff;
    font-size: 1.05rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.nav-card-body span {
    color: rgba(255, 255, 255, .92);
    font-size: .82rem;
}

.cat-grid .nav-card {
    aspect-ratio: 1 / 1.08;
}

.cat-grid .nav-card-body {
    padding: 20px 14px 10px;
    align-content: end;
}

.cat-grid .nav-card-body strong {
    font-size: .85rem;
}

.cat-grid .nav-card-body span {
    font-size: .74rem;
}

.admin-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--paper);
}

.admin-box {
    width: min(100%, 460px);
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.admin-box img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-box h1 {
    margin-top: 18px;
    color: var(--ink);
    font-size: 1.55rem;
}

.admin-box p,
.admin-box label {
    color: var(--muted);
}

.admin-box form {
    display: grid;
    gap: 14px;
}

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.site-footer {
    margin-top: 30px;
    color: #e9e2d8;
    background: linear-gradient(135deg, #171310 0%, #3d1319 100%);
}

.footer-grid {
    display: grid;
    gap: 28px;
    padding: 36px 0 26px;
}

.footer-brand img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

.footer-brand strong {
    display: block;
    margin: 12px 0 4px;
    color: #fff;
    font-size: 1.1rem;
}

.footer-tagline,
.footer-line {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
    line-height: 1.5;
}

.footer-col h4 {
    margin: 0 0 12px;
    color: #fff;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.footer-col a {
    display: block;
    padding: 3px 0;
    color: #e9e2d8;
    text-decoration: none;
    font-size: .92rem;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-col-qr img {
    display: block;
    width: 118px;
    height: 118px;
    padding: 6px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
}

.footer-bottom {
    padding: 16px 0;
    color: rgba(255, 255, 255, .68);
    text-align: center;
    font-size: .82rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

@media (min-width: 760px) {
    .menu-shell {
        max-width: 920px;
    }

    .search-panel {
        top: 132px;
    }

    .category-tabs {
        top: 218px;
    }

    .items-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.2fr;
        gap: 32px;
    }
}
