:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --nav-h: 56px;
}

.main-menu {
    margin-left: 0px !important;
    margin-right: 0px !important;
    margin-bottom: 90px;
}

.bg-header {
    height: 200px !important;
    background-repeat: no-repeat;
    position: relative;
    background-size: cover;
    background-position: center;
    height: 180px;
    border-radius: 0 0 20px 20px;
    /* margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw); */
}

.nav {
    padding: 15px;
}

.nav-link {
    color: #FFF !important;

}

.nav-item {
    background-color: #000000b0;
    border-radius: 100px;
    margin-left: 5px;
    font-size: 13px;
}

.restaurant-logo-wrapper {
    position: absolute;
    left: 50%;
    bottom: -40px;
    /* moitié en dessous du header */
    transform: translateX(-50%);
    background: white;
    padding: 6px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.restaurant-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
}

/* carte blanche moderne sous le header */
.card-plate {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    padding: 18px 20px;
    margin-top: 70px;
    /* espace sous le logo qui chevauche */
}

/* titre élégant, responsive */
.establishment-name {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    color: #111827;
}

/* chips (type, langues…) */
.info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: .8rem;
    border-radius: 999px;
    background: #111827;
    /* gris très foncé */
    color: #fff;
}

.chip-muted {
    background: #f3f4f6;
    /* gris clair */
    color: #374151;
    border: 1px solid #e5e7eb;
}

/* ligne d'infos (adresse, tel) avec séparateurs • */
.establishment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
    color: #4b5563;
    font-size: .92rem;
}

.establishment-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.establishment-meta .meta-item+.meta-item::before {
    content: "•";
    color: #9ca3af;
    margin-right: 14px;
}

/* liens neutres */
.establishment-meta a {
    color: inherit;
    text-decoration: none;
}

.establishment-meta a:hover {
    text-decoration: underline;
}

/* réseaux sociaux */
.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    transition: transform .15s ease, background .15s ease, color .15s ease;
    border: 1px solid #e5e7eb;
}

.social-btn:hover {
    background: #111827;
    color: #fff;
    transform: translateY(-2px);
}

/* petites retouches sur mobile étroit */
@media (max-width: 420px) {
    .card-plate {
        padding: 16px 14px;
    }

    .establishment-meta {
        gap: 8px 12px;
    }
}

.category-block {
    margin-top: 24px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.category-desc {
    color: #4b5563;
    margin: 6px 0 14px;
    font-size: .95rem;
}

.product-card {
    border: 1px solid #eef0f3;
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .15s ease, transform .15s ease;
}

.product-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.product-card-body {
    padding: 12px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.product-desc {
    color: #6b7280;
    margin-top: 6px;
    font-size: .92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* 2 lignes max (truncate élégant) */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 72px;
}

.menu-category {
    margin-top: 48px;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 20px;
}

.category-subtitle {
    font-size: .95rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Carte produit --- */
.menu-card {
    border-radius: 18px;
    background: #fff;
    padding: 18px 22px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

.menu-card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.menu-card-text {
    flex: 1;
    min-width: 0;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.old-price {
    color: #9ca3af;
    text-decoration: line-through;
}

.new-price {
    color: #111827;
    font-weight: 800;
}

.product-desc {
    font-size: .93rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* variantes */
.variant-list {
    margin-bottom: 8px;
}

.variant-line {
    padding: 2px 0;
    border-bottom: 1px solid #f3f4f6;
}

.variant-line:last-child {
    border-bottom: none;
}

.variant-name {
    color: #111827;
    font-size: .95rem;
}

.variant-price {
    color: #111827;
    font-weight: 600;
    font-size: .95rem;
}

/* image */
.menu-card-img {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    border-radius: 16px;
    overflow: hidden;
}

.menu-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
    object-fit: contain;
    border-radius: 12px;
}

.menu-card:hover .menu-card-img img {
    transform: scale(1.05);
}

/* responsive */
@media (max-width: 768px) {
    .menu-card {
        padding: 14px 16px;
    }

    .menu-card-body {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
}


/* --- BARRE STICKY --- */
.category-nav {
    margin-top: 30px;
    position: sticky;
    top: var(--safe-top);
    z-index: 50;
    transition: box-shadow .2s ease, border-color .2s ease;
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid #eef1f4;
    /* margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw; */
    margin-bottom: 10px;
}

.category-nav.is-stuck {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    border-color: transparent;
}

.menu-category:first-of-type {
    padding-left: 10px;
}

.category-nav::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--safe-top);
    background: #fff;
    z-index: 49;
    /* juste sous la nav */
}

/* conteneur scrollable horizontal */
.category-nav__scroller {
    position: relative;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-top: 30px;
    scrollbar-width: none;
    margin-left: 20px;

}

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

/* pastilles */
.category-chip {
    margin-bottom: 10px;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: .95rem;
    border-radius: 999px;
    border: 1px solid #e6e8eb;
    background: #fff;
    color: #111827;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.category-chip:hover {
    background: #111827;
    color: #fff;
    transform: translateY(-1px);
}

.category-chip.is-active {
    margin-bottom: 10px;
    border-color: #11182780;
    color: #111827;
    background: #fff;
}

/* soulignement animé (ink bar) */
.category-ink {
    position: absolute;
    height: 2px;
    bottom: 0px;
    left: 8px;
    width: 0;
    background: #111827;
    border-radius: 2px;
    transition: width .2s ease, transform .2s ease;
}

/* espace pour que la nav ne colle pas au contenu */
.menu-category {
    scroll-margin-top: calc(var(--safe-top) + var(--nav-h) + 12px);
}

@media (max-width: 576px) {
    .category-chip {
        padding: 7px 10px;
        font-size: .9rem;
    }
}

/* Conteneur global */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    /* inactif tant qu’ouvert n’est pas vrai */
}

.sheet.is-open {
    pointer-events: auto;
}

/* Backdrop */
.sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 1;
}

.sheet.is-open .sheet__backdrop {
    opacity: 1;
}

/* Panneau */
.sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(90vh, 720px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .15);
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    overscroll-behavior: contain;
    touch-action: pan-y;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
    overscroll-behavior-y: contain;
}

.sheet.is-open .sheet__panel {
    transform: translateY(0);
}

/* Poignée */
.sheet__grab {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    touch-action: none;
}

.sheet__grabber {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
}

/* Image */
.sheet__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    margin: 0 auto;
    max-width: 680px;
}

/* Corps */
.sheet__body {
    max-width: 680px;
    margin: 10px auto 100px;
    /* espace pour bouton si un jour */
    padding: 0 16px;
}

.sheet__title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 8px 0 10px;
    color: #111827;
}

.sheet__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.sheet__desc {
    color: #4b5563;
    line-height: 1.5;
    margin-top: 8px;
}

.sheet__variants {
    list-style: none;
    padding: 0;
    margin: 6px 0 2px;
}

.sheet__variant {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.sheet__variant:last-child {
    border-bottom: none;
}

.sheet__variant .v-name {
    color: #111827;
}

.sheet__variant .v-price {
    font-weight: 700;
    color: #111827;
}

/* Allergènes chips */
.sheet__allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.allergen-chip {
    font-size: .85rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

/* Btn close */
.sheet__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== Allergènes & Tags – layout commun ====== */
.sheet__meta-block {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.sheet__meta-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: #1f2937;
    /* gris très foncé */
}

.sheet__meta-title i {
    font-size: 1rem;
    opacity: .75;
}

/* Grille responsive de chips (mieux qu'une simple ligne wrap) */
.chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
    gap: 8px;
}

/* ====== Allergènes ====== */
.allergen-chip {
    --bg: #f8fafc;
    /* slate-50 */
    --bd: #e5e7eb;
    /* gray-200 */
    --tx: #334155;
    /* slate-700 */
    --tx2: #64748b;
    /* slate-500 */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--bd);
    color: var(--tx);
    font-size: .92rem;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.allergen-chip::before {
    content: "⚠️";
    font-size: .95rem;
    line-height: 1;
    opacity: .9;
}

.allergen-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 6, 23, .06);
}

/* Variant compacte (si un produit a beaucoup d'allergènes) */
.allergen-chip.is-compact {
    padding: 6px 10px;
    font-size: .85rem;
}

/* ====== Tags ====== */
.tag-chip {
    --bg: #eef6ff;
    /* bleu clair */
    --bd: #dbeafe;
    /* blue-200 */
    --tx: #1e40af;
    /* blue-800 */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--bd);
    color: var(--tx);
    font-weight: 600;
    font-size: .86rem;
    line-height: 1;
    transition: transform .15s ease, background .15s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.tag-chip::before {
    content: "#";
    font-weight: 800;
    opacity: .85;
}

.tag-chip:hover {
    transform: translateY(-1px);
    background: #e0efff;
}

/* Mode “mono-ligne scrollable” si tu préfères sur mobile */
@media (max-width: 480px) {
    .chips.is-scroll {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .chips.is-scroll::-webkit-scrollbar {
        display: none;
    }
}

/* Petite légende grisée sous le titre (facultatif) */
.sheet__meta-hint {
    font-size: .78rem;
    color: #6b7280;
}



/* Mobile */
@media (max-width: 640px) {
    .sheet__image {
        height: 160px;
        border-radius: 10px;
    }

    .sheet__body {
        padding: 0 14px;
    }
}


.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: .78rem;
    line-height: 1;
    border-radius: 999px;
    background: #eef6ff;
    /* bleu clair */
    border: 1px solid #dbeafe;
    /* blue-200 */
    color: #1e40af;
    /* blue-800 */
    pointer-events: none;
    /* n’interfère pas avec le clic de la carte */
}

.mini-tag--more {
    background: #f3f4f6;
    /* gris clair */
    border-color: #e5e7eb;
    color: #374151;
}

.hh-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: .78rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    margin: 4px 0 6px;
    width: max-content;
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, .35);
    display: grid;
    place-items: start center;
    padding-top: min(14vh, 120px);
}

.search-panel {
    width: min(780px, 92vw);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.search-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
}

.search-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 1rem;
    outline: none;
}

.search-input:focus {
    border-color: #111827;
}

.search-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results {
    max-height: 60vh;
    overflow: auto;
    padding: 8px;
}

.search-item {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    border: none;
    background: #fff;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
}

.search-item:hover {
    background: #f8fafc;
}

.search-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 56px;
}

.search-texts {
    flex: 1;
    min-width: 0;
}

.search-title {
    font-weight: 800;
    color: #111827;
}

.search-sub {
    font-size: .9rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-price {
    font-weight: 700;
    color: #111827;
}

.search-empty {
    padding: 20px;
    color: #6b7280;
    text-align: center;
}

.footer {
    margin-top: 30px;
}