/* Navigation responsive, dock panier et panneau panier (/menu et /commande), 2026-09-28.
   Nouvelles classes (.pc-*) : aucune regle historique (.guest-cart-*, .gc-*, menu-premium.css, order-experience-3i.css)
   ne s'y applique. Les identifiants (#guest-cart-bar, #guest-cart-drawer, #guest-cart-overlay, #guest-cart-list...) et
   les attributs [data-gc-*] sont conserves : validation, vente additionnelle et anti double envoi en dependent.
   Couleurs : uniquement les tokens du theme (--ed-ink, --ed-inner, --ed-accent, --ed-accent-ink, --ed-on-accent,
   --ed-muted, --ed-hairline). Couleur du restaurant reservee a l'action principale, aux accents et a l'etat actif. */
body.ed-page { --pc-dock-h: 52px; --pc-gap: 8px; }

/* ── Dock panier (telephone ; /commande a toutes les largeurs) : au-dessus de la navigation, jamais dessus ── */
.pc-dock {
  position: fixed; z-index: 310; inset-inline: 12px; bottom: calc(var(--mobile-nav-height, 64px) + var(--pc-gap));
  height: var(--pc-dock-h); display: none; align-items: center; gap: 10px; margin: 0; padding: 0 16px;
  border: 0; border-radius: 16px; cursor: pointer; font-family: var(--ed-font); text-align: start;
  background: var(--ed-ink); color: var(--ed-inner); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .6);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease; -webkit-tap-highlight-color: transparent;
}
.pc-dock.show { display: flex; }
.pc-dock__icon { display: inline-flex; opacity: .8; }
.pc-dock__label { flex: 1; min-width: 0; font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-dock__total { font-weight: 800; font-size: .98rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Nombre d'articles dans le dock seulement sans navigation basse (/commande) : sinon il est sur l'onglet « Commander » */
.pc-dock__count { display: none; font-weight: 600; opacity: .72; font-size: .88rem; }
.pc-dock__count::before { content: "· "; }
body:not(:has(> .mobile-bottom-nav)) .pc-dock { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
body:not(:has(> .mobile-bottom-nav)) .pc-dock__count { display: inline; }
.pc-dock:focus-visible { outline: 3px solid var(--ed-accent-ink); outline-offset: 3px; }
.pc-dock.gc-pulse { animation: pc-bump .36s cubic-bezier(.2, .8, .2, 1); }
@keyframes pc-bump { 40% { transform: scale(1.02); } }
/* Masque (invisible, non cliquable) quand un autre panneau occupe l'ecran : fiche produit, langues, « Plus », panier ouvert */
body.pc-sheet-open .pc-dock { opacity: 0; transform: translateY(12px); pointer-events: none; }
body.elyria-product-sheet-open .pc-dock, body.lang-panel-open .pc-dock, body.rh-more-open .pc-dock { visibility: hidden; pointer-events: none; }

/* Reserve de bas de page : une seule. Navigation (sa zone de securite est deja comprise dans sa hauteur) + dock visible. */
@media (max-width: 720px) {
  body.ed-page--menu:has(> .mobile-bottom-nav):has(.pc-dock.show) { --ed-nav-reserve: calc(var(--mobile-nav-height) + var(--pc-dock-h) + var(--pc-gap) + 16px); }
  html:has(> body.ed-page--menu > .mobile-bottom-nav):has(.pc-dock.show) { scroll-padding-bottom: calc(var(--mobile-nav-height) + var(--pc-dock-h) + var(--pc-gap) + 16px); }
}

/* Sans navigation basse (/commande) : reserve unique pour le dock (52px + 12px + 16px + zone de securite) */
body:not(:has(> .mobile-bottom-nav)):has(.pc-dock.show) { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

/* Quantite sur l'onglet « Commander » de la navigation basse */
.pc-nav-badge {
  position: absolute; top: 5px; inset-inline-start: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center; font: 800 .68rem/1 var(--ed-font); background: var(--ed-accent); color: var(--ed-on-accent);
  box-shadow: 0 0 0 2px var(--ed-inner); font-variant-numeric: tabular-nums; pointer-events: none;
}
.pc-nav-badge[hidden] { display: none; }

/* ── Barre du haut (tablette et ordinateur, /menu) : apparait quand l'en-tete sort de l'ecran ── */
.pc-topbar, .pc-topbar__list { display: none; }
@media (min-width: 768px) {
  .pc-topbar {
    display: flex; position: fixed; z-index: 305; top: 0; inset-inline: 0; height: 64px; align-items: center; gap: 16px;
    padding-inline: max(20px, calc((100vw - 1120px) / 2 + 18px)); font-family: var(--ed-font);
    background: var(--ed-inner); border-bottom: 1px solid var(--ed-hairline); box-shadow: 0 8px 20px -18px rgba(0, 0, 0, .5);
    transform: translateY(-100%); visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s;
  }
  body.pc-scrolled .pc-topbar, body.pc-sheet-open .pc-topbar { transform: translateY(0); visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  .pc-topbar__brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 760; font-size: 1rem; color: var(--ed-ink); white-space: nowrap; }
  .pc-topbar__brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
  .pc-topbar__nav { display: flex; gap: 2px; margin-inline-start: auto; }
  .pc-topbar__nav a { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 12px; color: var(--ed-muted); font-weight: 600; font-size: .93rem; text-decoration: none; white-space: nowrap; }
  .pc-topbar__nav a:hover { color: var(--ed-ink); }
  .pc-topbar__nav a[aria-current="page"] { color: var(--ed-ink); box-shadow: inset 0 -2px 0 var(--ed-accent-ink); border-radius: 0; }
  .pc-topbar__more { display: none; }
  .pc-topbar a:focus-visible, .pc-topbar button:focus-visible { outline: 2px solid var(--ed-accent-ink); outline-offset: 2px; }
  .pc-cartbtn {
    display: inline-flex; align-items: center; gap: 10px; height: 44px; margin: 0; padding: 0 16px; border: 0; border-radius: 14px; cursor: pointer; flex: 0 0 auto;
    background: var(--ed-ink); color: var(--ed-inner); font: 700 .93rem var(--ed-font); white-space: nowrap;
  }
  .pc-cartbtn__count { font-weight: 600; opacity: .72; }
  .pc-cartbtn__count:not(:empty)::before { content: "· "; }
  .pc-cartbtn__total { font-weight: 800; font-variant-numeric: tabular-nums; }
  .pc-cartbtn[data-empty="1"] { background: transparent; color: var(--ed-ink); box-shadow: inset 0 0 0 1px var(--ed-hairline); }
  /* /menu : la barre du haut remplace le dock ; reserve de bas de page reduite (plus de barre flottante) */
  body:has(.pc-topbar) .pc-dock { display: none !important; }
  body.ed-page--menu:has(.pc-topbar) { padding-bottom: 32px !important; }
  html:has(.pc-topbar) { scroll-padding-top: 72px; }
  /* /commande : dock centre en bas (pas de barre du haut, en-tete propre a la page) */
  body:not(:has(.pc-topbar)) .pc-dock { inset-inline: auto; left: 50%; width: min(520px, calc(100vw - 48px)); transform: translateX(-50%); }
  body:not(:has(.pc-topbar)).pc-sheet-open .pc-dock { transform: translate(-50%, 12px); }
}
/* 768-1023px : pas de liens en ligne ; un bouton « Navigation » compact ouvre la liste */
@media (min-width: 768px) and (max-width: 1023px) {
  .pc-topbar__nav { display: none; }
  .pc-topbar__more { display: inline-flex; align-items: center; gap: 8px; height: 44px; margin: 0; margin-inline-start: auto; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer; background: transparent; color: var(--ed-ink); font: 650 .93rem var(--ed-font); box-shadow: inset 0 0 0 1px var(--ed-hairline); }
  .pc-topbar__list { position: fixed; top: 70px; inset-inline-end: 20px; z-index: 306; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--ed-inner); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55), 0 0 0 1px var(--ed-hairline); }
  .pc-topbar__list.is-open { display: block; }
  .pc-topbar__list a { display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 10px; color: var(--ed-ink); font: 600 .95rem var(--ed-font); text-decoration: none; white-space: nowrap; }
  .pc-topbar__list a:hover { background: color-mix(in srgb, var(--ed-ink) 6%, transparent); }
}

/* ── Panneau panier : feuille basse (telephone), tiroir lateral (tablette / ordinateur) ── */
.pc-scrim { position: fixed; inset: 0; z-index: 1390; background: rgba(8, 8, 10, .44); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.pc-scrim.show { opacity: 1; pointer-events: auto; }
.pc-sheet {
  position: fixed; z-index: 1400; inset-inline: 0; bottom: 0; max-height: 85dvh; display: flex; flex-direction: column;
  background: var(--ed-inner); color: var(--ed-ink); font-family: var(--ed-font);
  border-radius: 24px 24px 0 0; box-shadow: 0 -16px 36px -26px rgba(0, 0, 0, .6);
  transform: translateY(104%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
}
.pc-sheet.show { transform: translateY(0); visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.pc-grip { flex: 0 0 auto; align-self: center; width: 40px; height: 4px; margin-top: 10px; border-radius: 2px; background: color-mix(in srgb, var(--ed-ink) 18%, transparent); }
.pc-head { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px 22px; }
html[dir="rtl"] .pc-head { padding: 8px 22px 10px 8px; }
.pc-head h2 { margin: 0; font-size: 1.22rem; font-weight: 780; letter-spacing: -.012em; color: var(--ed-ink); }
.pc-head small { display: block; margin-top: 2px; color: var(--ed-muted); font-weight: 550; font-size: .84rem; }
/* Boutons d'icone : zone tactile reelle 44x44, partie visible compacte (::before, cercle de 30px) */
.pc-ib { position: relative; width: 44px; height: 44px; flex: 0 0 44px; margin: 0; padding: 0; border: 0; display: grid; place-items: center; cursor: pointer; background: transparent; color: var(--ed-ink); border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.pc-ib::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: transparent; transition: background-color .15s ease; }
.pc-ib svg { position: relative; }
.pc-ib:hover::before { background: color-mix(in srgb, var(--ed-ink) 7%, transparent); }
.pc-ib:active::before { background: color-mix(in srgb, var(--ed-ink) 12%, transparent); }
.pc-ib:focus-visible { outline: 2px solid var(--ed-accent-ink); outline-offset: -2px; }
.pc-close { margin-inline-start: auto; }
.pc-close::before { background: color-mix(in srgb, var(--ed-ink) 6%, transparent); }
.pc-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px; }
.pc-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img main price" "img opts opts" "img step step"; column-gap: 14px; padding: 18px 0; }
.pc-item + .pc-item { border-top: 1px solid color-mix(in srgb, var(--ed-ink) 7%, transparent); }
.pc-thumb { grid-area: img; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: color-mix(in srgb, var(--ed-ink) 6%, var(--ed-inner)); display: grid; place-items: center; font-weight: 800; color: var(--ed-muted); }
.pc-name { grid-area: main; font-weight: 650; font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.pc-price { grid-area: price; padding-inline-start: 12px; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-opts { grid-area: opts; margin-top: 3px; color: var(--ed-muted); font-size: .85rem; line-height: 1.4; }
.pc-step { grid-area: step; justify-self: start; display: inline-flex; align-items: center; margin: 4px 0 -8px -9px; }
html[dir="rtl"] .pc-step { margin: 4px -9px -8px 0; }
.pc-step output { min-width: 22px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.pc-step .pc-inc { color: var(--ed-accent-ink); }
.pc-step .pc-del:hover { color: #b42318; }
.pc-empty { padding: 28px 24px 32px; text-align: center; color: var(--ed-muted); }
.pc-empty svg { color: var(--ed-muted); }
.pc-empty p { margin: 12px 0 18px; font-size: .92rem; }
.pc-empty button { height: 48px; padding: 0 20px; border: 0; border-radius: 14px; cursor: pointer; background: var(--ed-accent); color: var(--ed-on-accent); font: 700 .95rem var(--ed-font); }
.pc-empty button:focus-visible { outline: 3px solid var(--ed-accent-ink); outline-offset: 3px; }
.pc-sheet.is-empty .pc-foot { display: none; }
.pc-foot { flex: 0 0 auto; padding: 16px 22px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid color-mix(in srgb, var(--ed-ink) 8%, transparent); background: var(--ed-inner); }
.pc-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-weight: 650; }
.pc-sum strong { font-size: 1.18rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-cta { width: 100%; height: 54px; margin: 0; border: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font: 760 1rem var(--ed-font); background: var(--ed-accent); color: var(--ed-on-accent); }
.pc-cta:focus-visible { outline: 3px solid var(--ed-accent-ink); outline-offset: 3px; }
.pc-cta:disabled, .pc-cta.is-submitting { opacity: .65; cursor: progress; }
.pc-cta.is-submitting::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: pc-rot .7s linear infinite; }
@keyframes pc-rot { to { transform: rotate(1turn); } }
@media (min-width: 768px) {
  .pc-sheet { inset-inline: auto 0; top: 0; bottom: 0; width: min(420px, 100vw); max-height: none; border-radius: 0; transform: translateX(104%); box-shadow: -20px 0 40px -30px rgba(0, 0, 0, .6); }
  html[dir="rtl"] .pc-sheet { transform: translateX(-104%); box-shadow: 20px 0 40px -30px rgba(0, 0, 0, .6); }
  .pc-sheet.show, html[dir="rtl"] .pc-sheet.show { transform: translateX(0); }
  .pc-grip { display: none; }
  .pc-head { padding: 16px 12px 12px 26px; }
  html[dir="rtl"] .pc-head { padding: 16px 26px 12px 12px; }
  .pc-list { padding: 0 26px; }
  .pc-foot { padding: 18px 26px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-dock, .pc-sheet, .pc-sheet.show, .pc-scrim, .pc-topbar, body.pc-scrolled .pc-topbar, .pc-ib::before { transition: none !important; }
  .pc-dock.gc-pulse { animation: none !important; }
  .pc-cta.is-submitting::before { animation-duration: 1.6s; }
}

/* ── Navigation basse sur une seule rangee (telephone) : libelles sur une ligne ; les entrees qui ne tiennent pas passent
   dans « Plus » (cart-panel.js : meme element deplace, lien, action et nom accessible inchanges). La hauteur reelle de la
   barre reste mesuree en continu (--mobile-nav-height) : dock et reserve basse suivent. ── */
@media (max-width: 767px) {
  .mobile-bottom-nav > .mobile-bottom-nav__item { flex: 1 1 0 !important; max-width: none !important; min-width: 0 !important; }
  .mobile-bottom-nav .mobile-bottom-nav__label { white-space: nowrap; overflow-wrap: normal; hyphens: manual; }
  .mobile-bottom-nav .pc-nav-more-btn[hidden], .mobile-bottom-nav .pc-nav-more[hidden] { display: none !important; }
  .mobile-bottom-nav .pc-nav-more {
    position: absolute; bottom: calc(100% + 8px); inset-inline-end: 12px; z-index: 5; min-width: 220px; max-width: calc(100vw - 24px);
    display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px;
    background: var(--ed-inner); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55), 0 0 0 1px var(--ed-hairline);
  }
  body.pc-nav-more-open .mobile-bottom-nav { z-index: 330 !important; }
  .ed-page--menu .mobile-bottom-nav .pc-nav-more .mobile-bottom-nav__item {
    flex: none !important; width: 100% !important; min-height: 48px !important; flex-direction: row !important; justify-content: flex-start !important;
    gap: 12px !important; padding: 0 14px !important; border-radius: 10px !important; color: var(--ed-ink) !important;
  }
  .ed-page--menu .mobile-bottom-nav .pc-nav-more .mobile-bottom-nav__item:hover { background: color-mix(in srgb, var(--ed-ink) 6%, transparent) !important; }
  .ed-page--menu .mobile-bottom-nav .pc-nav-more .mobile-bottom-nav__label { font-size: .95rem !important; font-weight: 600 !important; text-align: start !important; }
  .ed-page--menu .mobile-bottom-nav .pc-nav-more .mobile-bottom-nav__item.is-active::before { content: none !important; }
  .ed-page--menu .mobile-bottom-nav .pc-nav-more-btn[aria-expanded="true"] { color: var(--ed-accent-ink) !important; }
}
/* Icones au trait (cadeau de la Roulette, jeu Feather) : jamais remplies par la regle generique des icones pleines */
.ed-page--menu .mobile-bottom-nav .mobile-bottom-nav__icon svg[fill="none"],
.ed-page--menu .menu-app .restaurant-sheet-hero .ed-action-icon svg[fill="none"] { fill: none !important; stroke: currentColor; }
/* Lot panier : « Modifier » un article a choix, sur la ligne de la quantite (cote oppose), zone tactile de 44px. */
.pc-edit { grid-area: step; justify-self: end; align-self: center; height: 44px; margin: 4px -6px -8px 0; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ed-accent-ink); font: 680 .9rem var(--ed-font); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; }
html[dir="rtl"] .pc-edit { margin: 4px 0 -8px -6px; }
.pc-edit:hover { text-decoration-thickness: 2px; }
.pc-edit:focus-visible { outline: 2px solid var(--ed-accent-ink); outline-offset: -2px; }
.pc-notice { flex: 0 0 auto; margin: 0 22px 6px; padding: 10px 12px; border-radius: 12px; font-size: .88rem; font-weight: 600; line-height: 1.4; color: color-mix(in srgb, #d92d20 72%, var(--ed-ink)); background: color-mix(in srgb, #d92d20 10%, transparent); }
.pc-notice--info { color: var(--ed-ink); background: color-mix(in srgb, var(--ed-accent) 12%, transparent); }
.pc-notice[hidden] { display: none; }
