/* ==========================================================================
   PAUSE A PARIS - DIGITAL MENU
   Main stylesheet (2026 redesign)
   --------------------------------------------------------------------------
   Prerequisite: tokens.css is loaded BEFORE this file (brand tokens,
   reset, loader, toast, reveal animations).

   1.  Hero (overlaid header)
   2.  Category navigation (sticky glass)
   3.  Side menu (hamburger)
   4.  Sections & headings
   5.  "Our Suggestions" carousel
   6.  Menu grid
   7.  Order buttons
   8.  Catering
   9.  Floating elements (reviews, back-to-top)
   10. Footer
   11. Cart: item rows & confirmation (menu)
   12. Responsive

   Note: modals, the generic cart and the checkout drawer now live in
   tokens.css (shared with magasin.html).
   ========================================================================== */

/* ==========================================================================
   1. HERO (OVERLAID HEADER)
   --------------------------------------------------------------------------
   Full-width dark container in 16:9 cinematic widescreen format (like a
   YouTube player): the height follows the width (aspect-ratio: 16 / 9)
   and the video covers the whole frame (object-fit: cover, centered
   crop, never stretched) under a black overlay 70% -> 40% -> 80% (top ->
   middle -> bottom). The brand sits in the overlaid header and the
   welcome title is centered.
   The category bar follows directly below the hero.
   Overlaid-content values taken 1:1 from the provided Tailwind mockup
   (no Tailwind and no build step in this project: everything is
   native CSS).
   ========================================================================== */

/* 16:9 widescreen, full width: height = width x 9/16 at every size, so
   the frame stretches across the whole screen width instead of the old
   tall, boxy 60vh block. Two graceful bounds keep that height usable:
   - min-height 240px: on the narrowest portrait phones (280-340px wide)
     a pure 16:9 strip is only 160-190px tall, too short for the overlaid
     header (76px) plus the centered title block (76px padding + one or
     two title lines + 76px padding = 184-216px); 240px keeps the title
     clear of the header and the frame still reads as a wide landscape
     rectangle, never boxy. From 427px wide the pure 16:9 height takes
     over on its own;
   - max-height = screen height minus the category bar: on windows wider
     than 16:9 (most desktop monitors) the bar stays visible on the first
     screen and the video simply center-crops a little more.
   Fallbacks: plain vh, then vh, then svh inside calc(); without
   aspect-ratio support a 56.25vw height restores the ratio (below). */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 240px;
    max-height: 100vh;
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100svh - var(--nav-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: #000000;
    color: #FFFFFF;
}

/* Safari 14 and older (no aspect-ratio): the hero is full-width, so
   56.25vw is exactly its 16:9 height (100 x 9/16); the same
   min-height / max-height bounds above still apply. */
@supports not (aspect-ratio: 16 / 9) {
    .hero-section {
        height: 56.25vw;
    }
}

.hero-slider {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 0;
}

/* The video fills the 16:9 frame edge to edge at every size:
   object-fit: cover center-crops the source to the frame (including
   where a bound above is the binding constraint), so the picture is
   never distorted and never letterboxed. */
.hero-slider video {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.1s ease;
}

.hero-slider video.active {
    opacity: 1;
}

/* bg-gradient-to-b from-black/70 via-black/40 to-black/80 */
.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%);
}

/* -- Overlaid brand header: absolute top-0 left-0 right-0 z-20,
      aligned to the left with iPhone safe-area margins. -- */
.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
}

.hero-brand {
    min-width: 0;
}

/* text-white text-xl font-bold */
.hero-brand-name {
    color: #FFFFFF;
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* text-gray-300 text-xs */
.hero-brand-caption {
    color: var(--on-dark-2);
    font-size: 0.75rem;
    line-height: 1rem;
    white-space: nowrap;
}

/* -- Centered content: top/bottom padding equal to the header height
      (76px), so the block stays centered in the hero without ever touching
      the header, even on a short hero (landscape phone). -- */
.hero-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 76px 1rem;
    text-align: center;
}

/* text-white font-serif text-2xl md:text-4xl font-bold text-center
   (site serif: Playfair Display) - soft shadow: readable even on a
   light image. */
.hero-title {
    color: #FFFFFF;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   2. CATEGORY NAVIGATION (STICKY GLASS)
   ========================================================================== */

/* Stuck directly below the hero, on a surface background slightly
   contrasted with the page (white on very light grey; slate on a dark
   background) with a bottom rule. Floating elements never cover it (see
   section 9 and script.js). */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.6rem;
    padding: 0 max(0.6rem, env(safe-area-inset-right)) 0 max(0.6rem, env(safe-area-inset-left));
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(20, 26, 28, 0.05);
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.category-nav.is-stuck {
    box-shadow: 0 10px 30px -18px rgba(23, 20, 15, 0.4);
}

/* Numbered tabs (01 -> 12): numbering is generated in CSS (counter),
   text and links stay unchanged. Tabs fill the full height of the bar:
   the active underline sits on its bottom edge.
    */
.nav-container {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: stretch;
    gap: 0.1rem;
    counter-reset: cat;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}

.nav-link {
    counter-increment: cat;
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.8rem;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--secondary-text);
    transition: color var(--transition);
}

.nav-link::before {
    content: counter(cat, decimal-leading-zero);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--secondary-text);
    opacity: 0.72;
    transition: color var(--transition), opacity var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-link:hover {
    color: var(--primary-text);
}

/* Active category: full-contrast text, number + underline in the brand
   accent (deep green in light mode, pistachio in dark mode). */
.nav-link.active {
    color: var(--primary-text);
}

.nav-link.active::before {
    color: var(--accent);
    opacity: 1;
}

.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -8px;
    border-radius: var(--radius);
}

.dark-mode-toggle,
.nav-icon-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--primary-text);
    font-size: 0.95rem;
    transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

.dark-mode-toggle:hover,
.nav-icon-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--primary-text);
    transform: translateY(-1px);
}

.hamburger-menu {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--surface);
    transition: background-color var(--transition), border-color var(--transition);
}

.hamburger-menu span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-text);
    transition: transform var(--transition), opacity var(--transition), width var(--transition);
}

.hamburger-menu.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   3. SIDE MENU
   ========================================================================== */

.side-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 90;
    background: var(--overlay);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 86vw;
    max-width: 360px;
    width: min(86vw, 360px);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    box-shadow: var(--shadow-l);
    transform: translateX(-104%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--surface-2), transparent);
}

.side-menu-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.side-menu-header h3 i {
    color: var(--primary-text);
}

.close-side-menu {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--secondary-text);
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.close-side-menu:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

.side-menu-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.9rem 0.85rem 1.2rem;
    display: grid;
    gap: 0.3rem;
    align-content: start;
}

.side-menu-group-title {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--secondary-text);
    padding: 0.9rem 0.7rem 0.35rem;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--primary-text);
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.side-menu-link i {
    width: 30px;
    height: 30px;
    flex-shrink: 0;   /* keeps the icon square when the label wraps on 2 lines */
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--primary-text);
    font-size: 0.82rem;
    transition: background-color var(--transition), color var(--transition);
}

.side-menu-link:hover,
.side-menu-link.active {
    background: var(--surface-2);
    transform: translateX(2px);
}

.side-menu-link:hover i,
.side-menu-link.active i {
    background: var(--primary-text);
    color: var(--surface);
}

.magasin-external-link {
    margin-top: 0.3rem;
    border: 1px solid var(--border-color);
    background: var(--surface-2);
}

.magasin-external-link::after {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.68rem;
    color: var(--secondary-text);
    opacity: 0.65;
    margin-left: auto;
    transition: transform var(--transition), opacity var(--transition);
}

.magasin-external-link:hover::after {
    transform: translate(2px, -2px);
    opacity: 1;
}

.side-menu-footer {
    padding: 1rem 1.15rem 1.35rem;
    border-top: 1px solid var(--border-color);
    display: grid;
    gap: 0.5rem;
    background: var(--surface-2);
}

.side-menu-footer p {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.side-menu-footer span {
    font-size: 0.78rem;
    color: var(--secondary-text);
}

.side-menu-contacts {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.side-menu-contacts a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 0.85rem;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.side-menu-contacts a:hover {
    background: var(--primary-text);
    border-color: var(--primary-text);
    color: var(--surface);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. SECTIONS & HEADINGS
   ========================================================================== */

main {
    display: block;
    width: 100%;
    max-width: var(--shell);
    width: min(100%, var(--shell));
    margin: 0 auto;
    padding: 0 0 3rem;
}

/* Anchor landing ("See the menu", categories, side menu): a single
   offset, equal to the sticky bar height. tokens.css used to add a
   second one (html scroll-padding): the bar did not stick and an empty
   band stayed above the section. This menu-specific override remains
   local to style.css; the shared foundation is left untouched. */
html {
    scroll-padding-top: var(--nav-h);
}

.menu-section {
    padding: 2.6rem 1.1rem 1rem;
}

.menu-section:last-of-type {
    padding-bottom: 3rem;
}

.section-header {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.7rem;
    margin-bottom: 1.7rem;
}

.section-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary-text);
    font-size: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 6px var(--background);
    box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--background) 60%, transparent);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-size: clamp(1.5rem, 5.6vw, 2.35rem);
    letter-spacing: 0.005em;
}

.section-divider {
    position: relative;
    width: 96px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%) rotate(45deg);
}

.subcategory-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 2.1rem 0 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary-text);
    white-space: nowrap;
}

.subcategory-title:first-of-type {
    margin-top: 0.4rem;
}

.subcategory-title i {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 0.72rem;
    letter-spacing: 0;
}

.subcategory-title::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

/* Very narrow phones: long uppercase headings (e.g. "Pâtisseries Pause
   Sweety") wrap instead of squeezing their icon. */
@media (max-width: 360px) {
    .subcategory-title {
        white-space: normal;
        letter-spacing: 0.14em;
    }
}

/* ==========================================================================
   5. "OUR SUGGESTIONS" CAROUSEL
   ========================================================================== */

.popular-carousel {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.35rem 0.15rem 0.9rem;
    margin: 0 -1.1rem;
    padding-inline: 1.1rem;
}

/* Overlay video cards: the media (video, or its poster until it loads)
   fills the whole card in 4:5 portrait format. A black gradient rises
   from the bottom and carries, overlaid on the image: the name (white,
   bold), the description (light grey), the price (pill) and the order
   button. Badge top-left, play pill on the right. */
.popular-card {
    position: relative;
    flex: 0 0 auto;
    width: 78vw;
    max-width: 320px;
    width: min(78vw, 320px);
    scroll-snap-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    /* dark background: white text stays readable before the poster arrives */
    background: var(--charcoal);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-s);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.popular-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-m);
    border-color: var(--border-strong);
}

.popular-card:active {
    transform: scale(0.992);
}

/* The media sets the card height; the text is overlaid. */
.popular-card video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 1px);
}

/* While a card's video is shown in the detail modal (same element
   moved, see script.js), its poster holds its place. */
.video-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--charcoal);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.popular-card .video-placeholder {
    border-radius: calc(var(--radius-lg) - 1px);
}

/* Readability gradient across the whole card, under the text (Tailwind:
   bg-gradient-to-t from-black/80 via-black/40 to-transparent). */
.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

/* Play pill: every card opens onto its video (modal). */
.popular-card::after {
    content: '\f04b';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 50%;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.72rem;
    line-height: 1;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.32);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
    transition: transform var(--transition), background-color var(--transition);
}

.popular-card:hover::after {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.58);
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-dark);
    background: rgba(20, 17, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.card-badge.best {
    background: var(--mint-grad);
    border-color: transparent;
    color: var(--ink-on-mint);
}

.card-badge.new {
    background: var(--charcoal-2);
    color: var(--on-dark);
    border-color: rgba(212, 175, 55, 0.35);
    border-color: transparent;
}

/* Text overlaid at the bottom of the media: name, description, price,
   button (added by script.js), stacked in a single column. */
.card-content {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    inset: auto 0 0 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.4rem;
    padding: 1rem;
    color: var(--on-dark);
}

.card-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.005em;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* Neutral light grey (approx. Tailwind gray-200), never tinted green. */
.card-content .ingredients {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--on-dark-2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price: crisp pill, left-aligned (e.g. "60 Dh"); dark smoked glass
   with a white edge: readable even on a very light image. */
.card-content .price {
    justify-self: start;
    margin-top: 0.1rem;
    padding: 0.24rem 0.68rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.32);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ==========================================================================
   6. MENU GRID
   ========================================================================== */

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

/* Light card: name (Playfair) and price on the same row - two-column
   grid, so the price never overlaps a long name -, full-width
   description, compact button bottom-left (equal-height cards). */
.menu-item-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    column-gap: 1rem;
    padding: 1.05rem 1.1rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.menu-item-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14%;
    bottom: 14%;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--mint-grad);
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity var(--transition), transform var(--transition);
}

.menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-s);
    border-color: var(--border-strong);
}

.menu-item-card:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.menu-item-card:active {
    transform: scale(0.995);
}

.menu-item-card h3 {
    grid-column: 1;
    grid-row: 1;
    align-self: baseline;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--primary-text);
}

.menu-item-card p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.4rem;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--secondary-text);
}

.price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.menu-item-card > .price-line {
    grid-column: 2;
    grid-row: 1;
    align-self: baseline;
}

.price-line .price,
.menu-item-card .price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: 0.01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   7. ORDER BUTTONS
   ========================================================================== */

/* Neutral secondary button on menu cards (dozens per page): pistachio
   only appears on hover / tap. Compact pill at the bottom left of
   cards; full-width (pistachio) on video cards. */
.commander-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 1.15rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    color: var(--primary-text);
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.commander-btn i {
    font-size: 0.76rem;
}

.commander-btn:hover {
    background: var(--mint-grad);
    border-color: transparent;
    color: var(--ink-on-mint);
    box-shadow: 0 12px 26px -14px rgba(212, 175, 55, 0.95);
}

.commander-btn:active {
    transform: scale(0.97);
}

/* Left-aligned, below the text: the bottom-right corner of the screen is
   taken by the cart and back-to-top (about 116px high), the bottom-left
   only by the small review pill. */
.menu-item-card > .commander-btn {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: end;
    justify-self: start;
    margin-top: 0.9rem;
}

/* Video cards: full-width pistachio button, last element of the overlaid
   text (so at the bottom of the card, above the video). */
.popular-card .commander-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 0.4rem;
    color: var(--ink-on-mint);
    background: var(--mint-grad);
    border-color: transparent;
    box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.75);
}

.popular-card .commander-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* ==========================================================================
   8. CATERING
   ========================================================================== */

.traiteur-showcase {
    display: grid;
    gap: 1rem;
}

/* Catering card: the video is presented in 9:16 portrait format (like a
   Reel / TikTok), centered above the text on phones; from 768px up,
   video on the left and text on the right (see Responsive). */
.traiteur-video-card {
    position: relative;
    overflow: hidden;
    padding: 8px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    background: var(--surface);
    box-shadow: var(--shadow-m);
}

/* 9:16 frame: at most 320px wide, and never taller than 78% of the
   visible screen (the whole video stays visible without scrolling). */
.traiteur-media {
    position: relative;
    width: 100%;
    max-width: 320px;
    max-width: min(320px, calc(78vh * 9 / 16));
    max-width: min(320px, calc(78svh * 9 / 16));
    aspect-ratio: 9 / 16;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--charcoal);
}

/* The video (and its poster) fills the frame with object-fit: cover:
   center-cropped, never stretched or distorted, never larger than the frame. */
.traiteur-media video,
.traiteur-video {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Safari 14 and older (no aspect-ratio): a spacer keeps the 9:16 ratio
   (its percentage padding resolves against the frame's own width). */
@supports not (aspect-ratio: 9 / 16) {
    .traiteur-media::before {
        content: '';
        display: block;
        padding-top: 177.78%;
    }
}

.traiteur-media::after {
    content: '\f04b';
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 50%;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.78rem;
    line-height: 1;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.32);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.traiteur-content {
    padding: 1.3rem 0.95rem 1rem;
    display: grid;
    gap: 0.7rem;
}

.traiteur-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-size: clamp(1.35rem, 5vw, 1.9rem);
}

.traiteur-content p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--secondary-text);
}

.traiteur-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-on-mint);
    background: var(--mint-grad);
    overflow: hidden;
    box-shadow: 0 16px 34px -18px rgba(212, 175, 55, 0.95);
    transition: transform var(--transition), box-shadow var(--transition);
}

.traiteur-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-18deg);
    transition: left 0.7s ease;
}

.traiteur-btn:hover::before {
    left: 130%;
}

.traiteur-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -18px rgba(212, 175, 55, 1);
}

.traiteur-btn:active {
    transform: translateY(0) scale(0.99);
}

.traiteur-btn i:first-child {
    font-size: 0.95rem;
}

.traiteur-btn-arrow {
    transition: transform var(--transition);
}

.traiteur-btn:hover .traiteur-btn-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   9. FLOATING ELEMENTS
   ========================================================================== */

.back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(5.6rem + env(safe-area-inset-bottom));
    z-index: 65;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 0.9rem;
    box-shadow: var(--shadow-s);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background-color var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-text);
    border-color: var(--primary-text);
    color: var(--surface);
}

.review-float {
    position: fixed;
    left: max(0.9rem, env(safe-area-inset-left));
    bottom: calc(1.1rem + env(safe-area-inset-bottom));
    z-index: 64;
    display: flex;
    align-items: center;
    padding: 0.62rem 0.8rem;
    gap: 0.4rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-s);
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), opacity var(--transition), visibility var(--transition);
}

.review-float:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-m);
}

/* Google review stars: gold (#FFD700), with a slight edge so they stay
   crisp on white and dark backgrounds alike. */
.stars-container {
    display: flex;
    gap: 0.16rem;
    font-size: 0.8rem;
    color: var(--star);
    text-shadow: 0 1px 1px rgba(122, 90, 0, 0.35);
}

.stars-container i {
    animation: starTwinkle 2.6s ease-in-out infinite;
}

.star-1 { animation-delay: 0s; }
.star-2 { animation-delay: 0.2s; }
.star-3 { animation-delay: 0.4s; }
.star-4 { animation-delay: 0.6s; }

.review-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: var(--primary-text);
    color: var(--background);
    font-size: 0.72rem;
    white-space: nowrap;
    box-shadow: var(--shadow-m);
}

.review-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 18px;
    border: 6px solid transparent;
    border-top-color: var(--primary-text);
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.82; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* -- Floating elements stay discreet while the hero is on screen ----------------------
   script.js sets body.at-hero while the category bar has not scrolled
   into the top 40% of the screen. Reviews, back-to-top and the EMPTY cart
   stay hidden: they overlap neither the hero nor the bar on small
   screens (iPhone SE etc.).
   A cart containing items always stays visible. */
.cart-float {
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition), visibility var(--transition);
}

body.at-hero .review-float,
body.at-hero .back-to-top,
body.at-hero .cart-float:not(.has-items) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    pointer-events: none;
}

/* Guardrail: a floating element (even a non-empty cart) NEVER covers the
   category bar. script.js sets .is-over-nav on every floating element
   whose box would overlap the bar (e.g. landscape phone, bar at the
   bottom of the screen); it reappears as soon as the bar moves away. */
body .review-float.is-over-nav,
body .back-to-top.is-over-nav,
body .cart-float.is-over-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Scroll-aware floating buttons (phones and tablets, below 1280px).
   While the visitor is really scrolling, script.js sets body.floats-hidden
   and removes it 300ms after the last scroll movement. In between, the
   floating buttons step aside so they never cover prices or text in motion.
   visibility:hidden also takes them out of the tab order and
   pointer-events:none blocks accidental taps. Only opacity/visibility change
   (no size, colour or transform), so with prefers-reduced-motion (tokens.css)
   the switch is instant. A button with KEYBOARD focus stays visible; a
   browser without :focus-visible ignores the whole rule and the buttons
   simply stay put. The class name must NOT contain "scroll": tokens.css
   hides the scrollbar of every [class*="scroll"] element, so on <body> the
   page would lose its scrollbar, reflow and jump. */
@media (max-width: 1279px) {
    body.floats-hidden .review-float:not(:focus-visible),
    body.floats-hidden .back-to-top:not(:focus-visible),
    body.floats-hidden .cart-float:not(:focus-visible) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* No "0" badge on an empty cart */
.cart-float:not(.has-items) .cart-badge {
    display: none;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */

footer {
    background: var(--charcoal);
    color: var(--on-dark);
    padding: 2.6rem 1.25rem calc(6.5rem + env(safe-area-inset-bottom));
    text-align: center;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    width: 100%;
    max-width: 620px;
    width: min(100%, 620px);
    margin: 0 auto;
    display: grid;
    gap: 0.65rem;
    justify-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: 0.02em;
}

.footer-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.footer-social a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--on-dark);
    font-size: 0.95rem;
    transition: transform var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
}

.footer-social a:hover {
    transform: translateY(-3px);
    background: var(--mint-grad);
    border-color: transparent;
    color: var(--ink-on-mint);
}

.footer-info {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.9rem;
    font-size: 0.86rem;
    color: var(--on-dark-2);
}

.footer-info p {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.footer-info i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.footer-copy {
    margin-top: 1.1rem;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Footer signature: same size as the copyright line above; signature
   green link, readable on the charcoal footer background. */
footer .footer-credit {
    font-size: 0.74rem;
}

footer .footer-credit a {
    color: var(--mint);
}

.whatsapp-order-btn {
    position: relative;
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    /* Primary button: same pistachio as .btn-mint, readable dark text
       (the old gradient started from dark green: low-contrast text). */
    background: var(--mint-grad);
    color: var(--ink-on-mint);
    box-shadow: 0 18px 34px -18px rgba(191, 155, 43, 0.95);
    overflow: hidden;
    transition: transform var(--transition), filter var(--transition);
}

.whatsapp-order-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.whatsapp-order-btn:active {
    transform: scale(0.985);
}

.whatsapp-order-btn:disabled {
    cursor: progress;
}


/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

/* -- Small phones -- */
@media (max-width: 380px) {
    :root {
        --nav-h: 58px;
    }

    .popular-card {
        width: 84vw;
    }

    /* Narrower cards: slightly more compact text, sitting lower, in the
       darkest part of the gradient. */
    .card-content {
        padding: 0.85rem;
        row-gap: 0.3rem;
    }

    .card-content h3 {
        font-size: 1.12rem;
    }

    .nav-link {
        padding: 0 0.7rem;
    }

    .nav-link::after {
        left: 0.7rem;
        right: 0.7rem;
    }
}

/* -- Tablet -- */
@media (min-width: 620px) {
    .menu-section {
        padding-inline: 1.6rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .subcategory-title {
        grid-column: 1 / -1;
    }

    .popular-card {
        width: 300px;
    }

    .popular-carousel {
        margin-inline: 0;
        padding-inline: 0.15rem;
        scroll-snap-type: x proximity;
    }

    .traiteur-content {
        padding: 1.6rem 1.25rem 1.25rem;
    }

    .review-tooltip {
        display: block;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity var(--transition), transform var(--transition);
    }

    .review-float:hover .review-tooltip {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- Desktop -- */
@media (min-width: 992px) {
    .side-menu-link .side-menu-badge {
        margin-left: auto;
    }

    .popular-carousel {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
        scroll-snap-type: none;
    }

    /* 3 suggestions per section: cards fill the 3 columns, aligned with
       the menu grid below. */
    .popular-card {
        width: auto;
        max-width: none;
    }

    .side-menu-header {
        padding: 1.4rem 1.3rem 1.1rem;
    }
}

@media (min-width: 1200px) {
    .menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .menu-section {
        padding-inline: 2rem;
    }
}

/* -- md (768px and up): md:text-4xl title. No hero height override: the
      16:9 ratio scales the hero with the width (432px tall at 768px wide,
      810px at 1440px), still bounded by the base min/max-height. -- */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    /* Catering: 9:16 video on the left, text vertically centered on the
       right; the pair is centered in the card, text lines max 34rem. */
    .traiteur-video-card {
        display: grid;
        grid-template-columns: minmax(220px, 300px) minmax(0, 34rem);
        justify-content: center;
        align-items: center;
        column-gap: 2.5rem;
        padding: 12px;
    }

    .traiteur-content {
        padding: 1rem 1rem 1rem 0;
    }

    .traiteur-btn {
        justify-self: start;
    }
}

/* -- Landscape phone: hero + category bar fit within the visible screen
      (76px header + centered title, no overlap). Landscape phones are
      wider than 16:9, so max-height is the binding constraint here and
      the video center-crops (object-fit: cover); the base rule's 240px
      floor is repeated so this breakpoint keeps its own guarantee. -- */
@media (orientation: landscape) and (max-height: 540px) {
    .hero-section {
        min-height: 240px;
        max-height: 70vh;
        max-height: 70svh;
    }
}
/* ==========================================================================
   iOS SAFETY NET — FORM FIELDS NEVER BELOW 16px
   --------------------------------------------------------------------------
   Safari on iPhone zooms the whole page (and does not zoom back out) as
   soon as a focused field is rendered below 16px: the customer typing a
   delivery address or a table number loses half the screen.

   tokens.css already sets the 16px base. This block is deliberately the
   LAST rule of this stylesheet (loaded after tokens.css) so that no later
   component override, media query or inherited value can quietly drop a
   field under the threshold.

   max(1rem, 16px) keeps the 16px floor while still honouring a visitor who
   raised their browser's default text size; the plain 16px line just above
   is the fallback for browsers without max(). Verified on every change by
   tools/check-compat.mjs ("tous les champs à 16px minimum").
   ========================================================================== */

input,
textarea,
select,
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="time"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"] {
    font-size: 16px;                  /* fallback: no max() support */
    font-size: max(1rem, 16px);       /* floor: never below 16px on iPhone */
}
