:root {
    --accent: #ff6e40;
    --accent-2: #ffab40;
    --bg: #f7f7f8;
    --card: #ffffff;
    --muted: #666;
}

* {
    box-sizing: border-box
}

body {
    font-family: Inter, system-ui, Arial, sans-serif;
    background: var(--bg);
    margin: 0;
    color: #111
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(90deg, var(--card), var(--card));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04)
}

.header-left {
    display: flex;
    gap: 16px;
    align-items: center
}
/* Icône livraison */
.icon-delivery {
    width: 35px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Police arabe élégante */
.titre-ar,
.subtitle-ar {
    font-family: 'Tajawal', sans-serif;
}

/* Titre français */
.titre-fr {
    color: #222; /* noir doux */
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Titre arabe */
.titre-ar {
    color: #FF6E40; /* orange du site */
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

/* Sous-titre fr */
.subtitle-fr {
    color: #666; /* gris foncé */
    font-size: 1rem;
    margin-bottom: 2px;
}

/* Sous-titre arabe */
.subtitle-ar {
    color: #FF6E40;
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 16px
}
.arabe {
    font-size: 0.9em;
    color: #ff6e40;  /* ou une autre couleur si tu veux */
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

.whatsapp {
    background: #25D366;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    text-align: center;
}

.whatsapp:hover {
    opacity: 0.9;
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
}

.container {
    max-width: 980px;
    margin: 24px auto;
    padding: 0 16px
}

.card {
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(12, 12, 12, 0.04)
}

.big-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
}

.link-btn {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer
}

.list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px
}

.item {
    display: flex;
    gap: 12px;
    align-items: center
}

/* Loader pour images */
.item img {
    width: 101px;
    height: 89px;
    object-fit: cover;
    border-radius: 10px;
    background: #f0f0f0; /* gris clair */
    position: relative;
    overflow: hidden;
}

/* Animation skeleton */
.item img.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingAnimation 1.5s infinite;
}

@keyframes loadingAnimation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.item .meta {
    flex: 1
}

.item h3 {
    margin: 0;
    font-size: 16px
}

.item .meta h3 {
    font-size: 1.2rem;   
    font-weight: 700;
}

.item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 15px
}

.price {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.old-price {
    text-decoration: line-through;
    color: #bbb;
    font-size: 0.88rem;
}

.current-price {
    color: #FF6E40;
    font-weight: 800;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
}

.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.btn-remove i {
    font-size: 18px;
    color: #e63946;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1;
}
.btn-remove:hover i {
    transform: scale(1.2);
    color: #ff2d2d;
}
.cart-row div:last-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

#panier-list .cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #efefef
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-weight: 800
}
 /* statut close open commerce */
 .status-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 2px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ---- BADGES ---- */
.status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.open {
    background: #4CAF50;
    color: white;
}

.status.closed {
    background: #E53935;
    color: white;
}

.status.opening-soon {
    background: #FFA500;
    color: black;
}

.status.closing-soon {
    background: #B39DDB;
    color: black;
}

/* ---- HORAIRES ---- */
.hours {
    font-size: 0.8rem;
    color: #555;
    margin-top: 2px;
}

/* ---- MODE GRISÉ SI FERMÉ ---- */
.closed-opacity {
    opacity: 0.45;
}

/* Commerce cliquable hover + tactile */
.commerce-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* Hover sur desktop */
.commerce-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Active ou touch (mobile) */
.commerce-item:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Bouton rond ajouter au panier style Uber Eats */
.add-btn-circle {
    width: 40px;
    height: 40px;
    background: var(--accent); /* orange */
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-btn-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.add-btn-circle .plus-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

/* Bandeau logo fixe en haut et centré */
.top-logo-bar {
    position: sticky; /* reste collé en haut lors du scroll */
    top: 0;           /* à partir du top */
    z-index: 100;     /* au-dessus du reste du contenu */
    background: white; /* pour éviter que le contenu défile derrière */
    border-bottom: 1px solid #eee;
    padding: 14px 20px;

    display: flex;
    justify-content: center; /* centrer horizontalement */
    align-items: center;
    height: 120px;     /* centrer verticalement */
}

.logo-main {
    height: 102px;
    object-fit: contain;
    margin: 0; /* enlever toute marge possible */
}

/* Panier wrapper */
.cart-wrapper {
    position: relative;
}

/* Badge */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: red; 
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Spinner de chargement */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* toujours au-dessus */
}

.loader-overlay.hidden {
    display: none;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #ff6e40;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    }

    @keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
    } 





@media(min-width:700px) {
    .list {
        grid-template-columns: repeat(2, 1fr)
    }
}

.arabic-text {
    font-family: 'Tajawal', sans-serif;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    text-align:center;
    transform: translateX(-50%) translateY(120%);
    background: var(--accent);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
}

/* État visible */
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.promo-box {
    margin: 12px 0;
    display: flex;
    gap: 8px;
}
#promo-input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
#apply-promo {
    padding: 10px 14px;
    background: var(--accent);
    border-radius: 8px;
    color: white;
    border: none;
    cursor: pointer;
}

/* ===== MODAL IMAGE MENU ===== */
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes imgFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.image-modal.hidden { display: none; }

.image-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.image-modal-content {
    position: relative;
    z-index: 2;
    width: 92vw;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: modalFadeIn 0.22s ease;
}

/* Close button — top right of modal */
.image-modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
}
.image-modal-close:hover { background: rgba(255,255,255,0.28); }

/* Track = image + arrows side by side */
.image-modal-track {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-track img {
    width: 100%;
    max-height: 72vh;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    display: block;
}
.image-modal-track img.img-fade-in {
    animation: imgFadeIn 0.2s ease;
}

/* Prev / Next arrows */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.15s;
    backdrop-filter: blur(4px);
    z-index: 3;
}
.image-nav:hover { background: rgba(255,255,255,0.32); transform: translateY(-50%) scale(1.08); }
.image-nav.prev { left: -14px; }
.image-nav.next { right: -14px; }

/* Dot indicators */
.image-modal-footer {
    display: flex;
    justify-content: center;
}
.image-modal-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.img-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.img-dot.active {
    background: #fff;
    transform: scale(1.35);
}

.commerce-item img { cursor: zoom-in; }
.commerce-item { cursor: pointer; }
.commerce-item img:hover { transform: scale(1.03); }

/* ── Menu Commerce Header ── */
.menu-commerce-header {
    margin: -18px -18px 0 -18px;
    overflow: hidden;
}
.menu-commerce-banner {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #f4511e, #ff6e40, #ffab40);
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 12px 12px 0 0;
}
.menu-commerce-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
}
.menu-commerce-info {
    padding: 14px 18px 10px;
    background: #fff;
}
.menu-commerce-info #menu-title {
    margin: 0 0 3px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    color: #111;
}
.menu-commerce-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: 'Tajawal', sans-serif;
}

/* ── Sticky category bar ── */
.menu-categories-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    margin: 0 -18px;
    padding: 10px 18px;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.menu-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 0;
    padding-bottom: 2px;
}
.menu-categories::-webkit-scrollbar { display: none; }

.menu-categories button {
    background: #f2f2f2;
    color: #555;
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.menu-categories button:hover {
    background: #ffe5dd;
    color: var(--accent);
}
.menu-categories button.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255,110,64,0.35);
}
.cat-count {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    font-size: 0.72rem;
    padding: 1px 6px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.menu-categories button:not(.active) .cat-count {
    background: rgba(0,0,0,0.08);
    color: #555;
}

.service-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
    flex: 1;
}

.service-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}
.service-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto; /* au lieu de fixe */
    padding: 12px;
    
}

.service-meta h3 {
    word-break: break-word;
    line-height: 1.3;
    margin-bottom: 12px;
}

.service-btn-container {
    margin-top: auto; /* pousse le bouton tout en bas */
    display: flex;
    justify-content: center; /* bouton centré horizontalement */
}

.service-item img {
    width: 100%;       /* occupe toute la largeur */
    height: 100%;     /* tu peux ajuster */
    object-fit: cover; /* garde les proportions et remplit le cadre */
    border-radius: 10px;
    margin-bottom: 12px; /* espace entre image et texte */
}

/* =====================================================
   SUIVI DE COMMANDE — redesign
   ===================================================== */

@keyframes scooter-ride {
  0%,100% { transform: translateX(0) rotate(-2deg); }
  50%      { transform: translateX(6px) rotate(2deg); }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,110,64,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(255,110,64,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,110,64,0); }
}
@keyframes bounce-in {
  0%   { transform: scale(.6); opacity:0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity:1; }
}

/* ── Bouton tracking map ── */
.tracking-map-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  padding: 12px;
  background: #fff;
  border: 2px solid #ff6e40;
  border-radius: 12px;
  color: #ff6e40;
  font-family: 'Tajawal', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.tracking-map-btn:active { opacity: .8; }

/* ── Modal map livreur — style Uber Eats ── */
.livreur-map-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; background: #fff;
}

/* Header */
.lm-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  background: #fff; flex-shrink: 0;
  border-bottom: 1px solid #f0f0f0;
}
.lm-back {
  background: #f5f5f5; border: none; font-size: 1.1rem;
  cursor: pointer; color: #111;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Pill statut */
.lm-status-pill {
  display: flex; align-items: center; gap: 6px;
  background: #111; color: #fff;
  padding: 6px 12px; border-radius: 999px;
  font-family: 'Tajawal', sans-serif;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  white-space: nowrap;
}
.lm-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4caf50; flex-shrink: 0;
  animation: lm-dot-pulse 1.4s ease-in-out infinite;
}
@keyframes lm-dot-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

/* Carte — 70% de l'écran */
.lm-map-wrap {
  height: 70vh; position: relative; overflow: hidden; flex-shrink: 0;
}
.livreur-map-div { width: 100%; height: 100%; }
.livreur-map-wait {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.72); color: #fff;
  padding: 9px 18px; border-radius: 20px;
  font-family: 'Tajawal', sans-serif; font-size: .85rem;
  pointer-events: none; white-space: nowrap;
}

/* Panneau bas : livreur uniquement */
.lm-bottom {
  flex: 1; background: #fff;
  padding: 14px 18px 18px;
  border-top: 1px solid #ebebeb;
  box-shadow: 0 -4px 16px rgba(0,0,0,.07);
  display: flex; align-items: center;
}

/* Ligne livreur */
.lm-livreur-row {
  display: flex; align-items: center; gap: 14px;
}
.lm-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #111; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  flex-shrink: 0;
}
.lm-livreur-details { flex: 1; min-width: 0; }
.lm-livreur-label {
  font-size: .75rem; color: #aaa; font-family: 'Tajawal', sans-serif;
  font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 2px;
}
.lm-livreur-name {
  font-size: 1.05rem; font-weight: 800; color: #111;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lm-contact-btns {
  display: flex; gap: 10px; flex-shrink: 0;
}
.lm-call-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: #e8f5e9; color: #2e7d32;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background .15s;
}
.lm-call-btn:active { background: #c8e6c9; }
.lm-wa-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: #e7fbe9; color: #25d366;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background .15s;
}
.lm-wa-btn:active { background: #b2f0bb; }

.order-tracking-card {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(255,110,64,.22);
}

/* ── Hero zone ── */
.tracking-hero {
  position: relative;
  background: linear-gradient(135deg, #ff6e40 0%, #ff9500 100%);
  padding: 24px 20px 20px;
  text-align: center;
  color: #fff;
}
.order-tracking-card.tracking-prep .tracking-hero {
  background: linear-gradient(135deg, #ff8f00 0%, #ffb300 100%);
}
.order-tracking-card.tracking-onway .tracking-hero {
  background: linear-gradient(135deg, #ff6e40 0%, #f53b00 100%);
}
.order-tracking-card.tracking-done .tracking-hero {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.tracking-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.25);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.tracking-close:hover { background: rgba(255,255,255,.4); }

.tracking-hero-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 10px;
  display: inline-block;
  animation: bounce-in .5s ease;
}
.order-tracking-card.tracking-onway .tracking-hero-emoji {
  animation: scooter-ride 1.2s ease-in-out infinite;
}

.tracking-hero-status {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.tracking-hero-sub {
  font-size: .82rem;
  opacity: .88;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tracking-hero-sep { opacity: .6; }

/* ── Progress bar ── */
.order-tracking-card::before { display: none; } /* remove old pseudo */
.tracking-progress-bar {
  height: 6px;
  background: #f0f0f0;
  overflow: hidden;
}
.tracking-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6e40, #ffab40);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.order-tracking-card.tracking-done .tracking-progress-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* ── Timeline horizontal ── */
.tracking-timeline {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 14px 8px 16px;
  background: #fff;
  gap: 0;
}
.tracking-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  gap: 6px;
}
.tracking-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 55%;
  right: -55%;
  height: 2px;
  background: #e8e8e8;
  z-index: 0;
  transition: background .3s;
}
.tracking-step.done::after { background: #22c55e; }

.tracking-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 2px solid #e0e0e0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transition: all .3s;
}
.tracking-step.done .tracking-dot {
  background: #22c55e;
  border-color: #22c55e;
}
.tracking-step.done .tracking-dot::after {
  content: '✓';
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
}
.tracking-step.active .tracking-dot {
  background: var(--accent);
  border-color: var(--accent);
  animation: pulse-ring 1.5s ease-out infinite;
}
.tracking-dot-icon { font-size: 13px; color: #bbb; }
.tracking-step.done  .tracking-dot-icon { display: none; }
.tracking-step.active .tracking-dot-icon { color: #fff; }

.tracking-label {
  font-size: .68rem;
  color: #bbb;
  text-align: center;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.2;
  transition: color .3s;
}
.tracking-step.done   .tracking-label { color: #22c55e; }
.tracking-step.active .tracking-label { color: #111; font-weight: 800; font-size: .72rem; }

/* =====================================================
   ONBOARDING
   ===================================================== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.onboarding-overlay.hidden { display: none; }

.onboarding-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 32px 24px calc(40px + 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: slideUp 0.3s cubic-bezier(.32,1,.4,1);
  position: relative;
  text-align: center;
  direction: rtl;
}
.ob-top-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 8px;
  direction: ltr;
  width: 100%;
}
.onboarding-skip { margin-right: auto; }  /* pousse tout le reste à droite */
.onboarding-skip {
  background: none;
  border: none;
  color: #bbb;
  font-size: 0.88rem;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  padding: 4px 8px;
}
/* Le switcher onboarding réutilise .lang-switcher / .lang-btn */
.onboarding-slides { width: 100%; }
.onboarding-slide { display: none; }
.onboarding-slide.active { display: block; }

.onboarding-emoji {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 8px;
}
.onboarding-modal h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #111;
  margin: 0 0 6px;
  font-family: 'Tajawal', sans-serif;
}
.onboarding-modal p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.55;
  margin: 0;
  font-family: 'Tajawal', sans-serif;
}
.onboarding-dots {
  display: flex;
  gap: 7px;
  margin: 4px 0;
}
.ob-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: background 0.2s, width 0.2s;
}
.ob-dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 999px;
}
.onboarding-next-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,110,64,0.35);
  transition: transform 0.15s;
  margin-top: 6px;
}
.onboarding-next-btn:active { transform: scale(0.97); }

/* ── Bouton partage commerce ── */
.commerce-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.78rem;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.commerce-share-btn:hover { color: var(--accent); }

/* =====================================================
   MODAL CONFLIT COMMERCE (un seul commerce par commande)
   ===================================================== */
.cart-conflict-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 24px;
}
.cart-conflict-overlay.active { display: flex; }
.cart-conflict-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 20px 20px;
  width: 100%; max-width: 340px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: slideUp .25s cubic-bezier(.32,1,.4,1);
}
.cart-conflict-icon { font-size: 2.4rem; margin-bottom: 10px; }
.cart-conflict-title {
  font-size: 1rem; font-weight: 800; color: #111;
  margin-bottom: 10px;
}
.cart-conflict-msg {
  font-size: .85rem; color: #666; line-height: 1.5;
  margin-bottom: 20px;
}
.cart-conflict-btns { display: flex; gap: 10px; }
.cart-conflict-cancel {
  flex: 1; padding: 12px;
  border: 1.5px solid #e0e0e0; border-radius: 12px;
  background: #fff; color: #666;
  font-size: .9rem; font-weight: 700;
  font-family: 'Tajawal', sans-serif; cursor: pointer;
}
.cart-conflict-confirm {
  flex: 1; padding: 12px;
  border: none; border-radius: 12px;
  background: var(--accent); color: #fff;
  font-size: .9rem; font-weight: 800;
  font-family: 'Tajawal', sans-serif; cursor: pointer;
}

/* =====================================================
   PROMPT AVIS APRÈS LIVRAISON
   ===================================================== */
.delivery-review-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  align-items: flex-end; justify-content: center;
  padding: 0;
}
.delivery-review-overlay.active { display: flex; }
.delivery-review-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 36px;
  width: 100%; max-width: 480px;
  text-align: center;
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  animation: slideUp .3s cubic-bezier(.32,1,.4,1);
}
.delivery-review-emoji { font-size: 2.8rem; margin-bottom: 10px; }
.delivery-review-title {
  font-size: 1.1rem; font-weight: 800; color: #111; margin-bottom: 8px;
}
.delivery-review-msg {
  font-size: .88rem; color: #666; line-height: 1.5; margin-bottom: 20px;
}
.delivery-review-yes {
  display: block; width: 100%; padding: 14px;
  border: none; border-radius: 14px;
  background: var(--accent); color: #fff;
  font-size: 1rem; font-weight: 800;
  font-family: 'Tajawal', sans-serif; cursor: pointer;
  margin-bottom: 10px;
}
.delivery-review-skip {
  background: none; border: none;
  color: #aaa; font-size: .88rem;
  font-family: 'Tajawal', sans-serif; cursor: pointer;
  padding: 6px;
}

/* =====================================================
   PUSH NOTIFICATIONS — bannière permission
   ===================================================== */
.push-banner {
  position: fixed;
  bottom: 74px;
  left: 12px; right: 12px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.32);
  z-index: 900;
  animation: slideUp 0.3s cubic-bezier(.32,1,.4,1);
  direction: rtl;
}
.push-banner.hidden { display: none; }

.push-banner-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.push-banner-ico {
  font-size: 24px;
  color: #FFB300;
  flex-shrink: 0;
  line-height: 1;
}
.push-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.push-banner-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  color: #fff;
}
.push-banner-text span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  font-family: 'Tajawal', sans-serif;
}
.push-banner-actions {
  display: flex;
  gap: 10px;
}
.push-accept-btn {
  flex: 1;
  background: #ff6e40;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
}
.push-dismiss-btn {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.65);
  border-radius: 12px;
  padding: 11px;
  font-size: 0.88rem;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
}

/* =====================================================
   GÉOLOCALISATION
   ===================================================== */
.address-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  background: #f7f7f8;
  transition: border-color 0.2s;
}
.address-search-wrap:focus-within { border-color: var(--accent); background: #fff; }
.address-search-icon {
  font-size: 16px;
  color: var(--accent);
  padding: 0 10px 0 6px;
  flex-shrink: 0;
  line-height: 1;
}
.address-search-input {
  flex: 1;
  border: none;
  background: none;
  padding: 11px 4px;
  font-size: 0.88rem;
  font-family: 'Tajawal', sans-serif;
  outline: none;
  color: #111;
  direction: rtl;
  text-align: right;
}
.address-search-input::placeholder { color: #aaa; }
.address-clear-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #e0e0e0;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
  line-height: 1;
}

.weather-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e3f2fd, #e8f5e9);
  border: 1px solid #b3e5fc;
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0277bd;
  font-family: 'Tajawal', sans-serif;
  margin-bottom: 10px;
}

.commerce-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5c6bc0;
  font-family: 'Tajawal', sans-serif;
  margin-top: 5px;
}

/* =====================================================
   FAVORIS
   ===================================================== */

/* Bouton cœur sur la carte commerce */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, background 0.2s;
  z-index: 2;
}
.fav-btn:hover { background: #fff; }
.fav-btn.fav-active { background: #fff0f0; }
.fav-btn-ico {
  font-size: 17px;
  color: #999;
  line-height: 1;
  transition: color 0.2s;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}
.fav-btn.fav-active .fav-btn-ico {
  color: #e63946;
  filter: drop-shadow(0 1px 3px rgba(230,57,70,0.35));
}

@keyframes favPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.fav-btn.fav-pop { animation: favPop 0.3s ease; }

/* =====================================================
   AVIS — affichage étoiles + modal soumission
   ===================================================== */

/* Ligne rating sur carte commerce */
.commerce-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.menu-commerce-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}
.rating-count {
  font-size: 0.8rem;
  color: #888;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
}
.review-add-btn {
  margin-right: auto;
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.review-add-btn:hover { background: var(--accent); color: #fff; }

/* Toast confirmation */
.review-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2000;
  white-space: nowrap;
}
.review-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.review-modal.hidden { display: none; }
.review-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(3px);
}
.review-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(36px + 64px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUp 0.26s cubic-bezier(.32,1,.4,1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.review-modal-close {
  position: absolute;
  top: 14px; left: 14px;
  background: #f2f2f2;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #555;
}
.review-modal-sub {
  text-align: center;
  font-size: 0.82rem;
  color: #aaa;
  margin: 4px 0 0;
  font-family: 'Tajawal', sans-serif;
}
.review-modal-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  color: #111;
  font-family: 'Tajawal', sans-serif;
}
.review-stars-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 6px 0 2px;
}
.review-star {
  font-size: 38px;
  color: #ddd;
  cursor: pointer;
  transition: transform 0.12s, color 0.12s;
  line-height: 1;
}
.review-star:hover,
.review-star.active { transform: scale(1.2); }
.review-stars-label {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #aaa;
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  min-height: 1.2em;
  transition: color 0.2s;
}
.review-textarea {
  width: 100%;
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 0.93rem;
  font-family: 'Tajawal', sans-serif;
  resize: none;
  outline: none;
  box-sizing: border-box;
  color: #111;
  transition: border-color 0.2s;
}
.review-textarea:focus { border-color: var(--accent); }
.review-name-input {
  width: 100%;
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 0.93rem;
  font-family: 'Tajawal', sans-serif;
  outline: none;
  box-sizing: border-box;
  color: #111;
  transition: border-color 0.2s;
}
.review-name-input:focus { border-color: var(--accent); }
.review-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,110,64,0.35);
  transition: transform 0.15s, opacity 0.15s;
  margin-top: 2px;
}
.review-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.review-submit-btn:not(:disabled):active { transform: scale(0.97); }

/* ── Liste des avis ── */
.avis-list-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.avis-list-modal.hidden { display: none; }
.avis-list-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(3px);
}
.avis-list-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + 64px);
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.26s cubic-bezier(.32,1,.4,1);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.avis-list-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}
.avis-list-commerce {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  font-family: 'Tajawal', sans-serif;
}
.avis-list-avg {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avis-list-avg-num {
  font-size: 2rem;
  font-weight: 900;
  color: #111;
  line-height: 1;
  font-family: 'Tajawal', sans-serif;
}
.avis-list-count {
  font-size: 0.82rem;
  color: #aaa;
  font-family: 'Tajawal', sans-serif;
}
.avis-list-close {
  position: absolute;
  top: 14px; left: 14px;
  background: #f2f2f2;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #555;
}
.avis-add-from-list {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
}
.avis-item {
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.avis-item:last-child { border-bottom: none; }
.avis-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.avis-item-prenom {
  font-weight: 700;
  font-size: 0.9rem;
  color: #111;
  font-family: 'Tajawal', sans-serif;
}
.avis-item-comment {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.45;
  font-family: 'Tajawal', sans-serif;
}
.avis-item-date {
  font-size: 0.75rem;
  color: #bbb;
  font-family: 'Tajawal', sans-serif;
}
.avis-empty {
  text-align: center;
  padding: 30px 0;
  color: #bbb;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.92rem;
}

/* Rating cliquable */
.commerce-rating-row,
.menu-commerce-rating {
  cursor: pointer;
}
.rating-stars-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rating-stars-wrap:hover .rating-count { color: var(--accent); }

/* ===================================================== */

.footer {
    margin-top: 40px;
    padding: 28px 20px 24px;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-logo { font-size: 1.6rem; }
.footer-brand-name {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.footer-tagline {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    font-family: 'Tajawal', sans-serif;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-social-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s, opacity 0.18s;
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.footer-social-btn:hover { transform: scale(1.06); opacity: 0.9; }
.footer-social-btn.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}
.footer-social-btn:not(.instagram) { background: #1877F2; }

.footer-copy {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.12s, opacity 0.12s;
}
.qty-btn:active { transform: scale(0.88); opacity: 0.8; }

.qty-btn.plus {
    background: #ff6e40;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,110,64,0.35);
}

.qty-btn.minus {
    background: #f0f0f0;
    color: #555;
}

.qty-count {
    min-width: 22px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: #111;
    font-family: 'Tajawal', sans-serif;
}

/* ── Barre suivi commande persistante ── */
.float-order-bar {
  position: fixed;
  bottom: calc(62px + env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 901;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  transition: transform .2s;
}
.float-order-bar:active { transform: scale(.98); }
.float-order-bar.status-prep   { background: #f57f17; }
.float-order-bar.status-route  { background: #2e7d32; }
.float-order-bar.status-done   { background: #6a1b9a; }
.float-order-emoji  { font-size: 1.4rem; flex-shrink: 0; }
.float-order-info   { flex: 1; min-width: 0; }
.float-order-status {
  display: block; font-weight: 800; font-size: .9rem;
  font-family: 'Tajawal', sans-serif;
}
.float-order-commerce {
  display: block; font-size: .78rem; opacity: .8;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.float-order-arrow { font-size: 1.4rem; opacity: .7; flex-shrink: 0; }

/* ── Barre panier flottante style Uber Eats ── */
.float-cart-bar {
  position: fixed;
  bottom: calc(62px + env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  transition: transform .25s, opacity .25s;
}
.float-cart-bar:active { transform: scale(.98); }
.float-cart-count {
  background: #ff6e40;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  min-width: 24px; height: 24px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px; flex-shrink: 0;
}
.float-cart-label {
  flex: 1;
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
}
.float-cart-total {
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

/* ---- Bottom Nav ---- */
.bottom-nav{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: #fff;
  border-top:2px solid #877d79;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  z-index: 9999;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item{
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
}

.nav-item .nav-ico {
  font-size: 24px;
  line-height: 1;
  display: block;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.nav-item.active .nav-ico {
  transform: scale(1.1);
}

.nav-item.active{
  color: var(--accent);
  font-weight: 700;
}

.nav-panier-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge{
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: red;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

/* باش المحتوى ما يهبطش تحت nav */
body{
  padding-bottom: 74px;
}

.img-wrap{
  position: relative;
  width: 101px;
  height: 89px;
  flex: 0 0 auto;
}

.img-wrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.img-badge{
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.70);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.img-badge i {
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

/* ===== CITY PAGE ===== */

/* ── City selection page ── */
.city-section {
  padding: 0;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.city-page-hero {
  padding: 52px 24px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.city-page-logo {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(255,110,64,0.5));
}
.city-page-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  font-family: 'Tajawal', sans-serif;
}
.city-page-sub {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  font-family: 'Tajawal', sans-serif;
}

#city-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 18px;
  flex: 1;
}

.city-card {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.18s;
}
.city-card:active { transform: scale(0.98); }
.city-card:hover { background: rgba(255,255,255,0.13); }

.city-card.active {
  background: rgba(255,110,64,0.18);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 20px rgba(255,110,64,0.25);
}

.city-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,110,64,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.city-card.active .city-card-icon {
  background: rgba(255,110,64,0.3);
}

.city-names {
  flex: 1;
}
.city-ar {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
.city-fr {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.city-go {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.city-card.active .city-go {
  background: var(--accent);
}
.city-go svg { display: block; }

.city-page-hint {
  margin: 20px 0 28px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  font-family: 'Tajawal', sans-serif;
}

/* =====================================================
   SKELETON LOADING
   ===================================================== */
.skeleton-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f3f3f3;
}
.skeleton-item:last-child { border-bottom: none; }

.skeleton-img {
  width: 101px;
  height: 89px;
  border-radius: 10px;
  flex: 0 0 101px;
}
.skeleton-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.skeleton-line {
  height: 13px;
  border-radius: 6px;
}
.skeleton-shimmer {
  background: linear-gradient(90deg, #efefef 25%, #e3e3e3 50%, #efefef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* =====================================================
   SECTION FADE-IN ANIMATION
   ===================================================== */
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section-enter {
  animation: sectionFadeIn 0.28s ease forwards;
}

/* =====================================================
   CART — EMPTY STATE
   ===================================================== */
.empty-cart-state {
  text-align: center;
  padding: 52px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-cart-illustration {
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, #fff3ef, #ffe0d8);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.empty-cart-ico { font-size: 52px; color: var(--accent); }
.empty-cart-state h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #111;
  font-family: 'Tajawal', sans-serif;
}
.empty-cart-state p {
  color: #aaa;
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-family: 'Tajawal', sans-serif;
}
.empty-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 13px 28px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,110,64,0.35);
  transition: transform 0.15s, opacity 0.15s;
}
.empty-cart-btn:active { transform: scale(0.97); opacity: 0.9; }

/* =====================================================
   CART — ITEMS (filled state)
   ===================================================== */
.commerce-block {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.commerce-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #fff8f6, #fff);
  border-bottom: 1px solid #f5f0ee;
}
.commerce-block-icon { color: var(--accent); display: flex; align-items: center; }
.commerce-block-name {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #111;
}
.cart-items-list { padding: 0 16px; }
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #111;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-qty { font-size: 0.78rem; color: #aaa; font-weight: 600; }
.cart-item-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cart-item-price { font-weight: 800; font-size: 0.92rem; color: var(--accent); }

.cart-promo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #f0fff4;
  font-size: 0.82rem;
  color: #2e7d32;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
}
.cart-delivery-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #888;
  font-family: 'Tajawal', sans-serif;
  border-top: 1px solid #f5f5f5;
}
.cart-delivery-row span:first-child { display: flex; align-items: center; gap: 5px; }
.cart-free { color: #25D366; font-weight: 700; }
.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #faf8f7;
  border-top: 1px solid #f0ede9;
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #111;
}
.cart-subtotal-row span:last-child { color: var(--accent); }

/* Grand total */
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  font-weight: 800;
  font-size: 1.05rem;
  font-family: 'Tajawal', sans-serif;
  border-top: 2px solid #f0f0f0;
  margin-top: 4px;
}
.total-row #total-price { color: var(--accent); font-size: 1.15rem; }

/* Promo input */
.promo-box { display: flex; gap: 8px; margin: 4px 0 8px; }
.promo-box input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid #eee;
  font-size: 0.9rem;
  background: #fafafa;
  outline: none;
  font-family: 'Tajawal', sans-serif;
  transition: border-color 0.2s;
}
.promo-box input:focus { border-color: var(--accent); background: #fff; }
#apply-promo {
  padding: 11px 18px;
  background: var(--accent);
  border-radius: 10px;
  color: white;
  border: none;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

/* =====================================================
   STICKY ORDER BUTTON (panier)
   ===================================================== */
#order-whatsapp {
  position: sticky;
  bottom: 74px;
  z-index: 50;
  margin-top: 16px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}

/* =====================================================
   BOTTOM NAV — indicateur actif animé
   ===================================================== */
.nav-item {
  position: relative;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
  animation: navDot 0.22s ease forwards;
}
@keyframes navDot {
  from { width: 0; opacity: 0; }
  to   { width: 22px; opacity: 1; }
}

/* =====================================================
   ADD-TO-CART BUTTON — micro-animation
   ===================================================== */
@keyframes btnPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.add-btn-circle.popping {
  animation: btnPop 0.28s ease;
}

/* =====================================================
   COMMERCE CARD — améliorations visuelles
   ===================================================== */
.commerce-item {
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  padding: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.commerce-item .meta h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
}
.commerce-item .meta p {
  font-size: 0.82rem;
  color: #aaa;
  margin: 2px 0;
}
.commerce-item .status-wrapper {
  margin-top: 6px;
}
.status.open    { background: #e6f9ec; color: #2e7d32; border: 1px solid #a5d6a7; }
.status.closed  { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }
.status.opening-soon { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }
.status.closing-soon { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }

/* =====================================================
   BADGE POP — animation quand on ajoute au panier
   ===================================================== */
@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  100% { transform: scale(1); }
}
.nav-badge.badge-pop {
  animation: badgePop 0.3s ease;
}

/* =====================================================
   HEADER — logo bar plus compact
   ===================================================== */
.top-logo-bar {
  height: 80px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr; /* logo toujours à gauche, bouton langue toujours à droite */
}
.logo-main {
  height: 60px;
}
.lang-switcher {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 3px;
  flex-shrink: 0;
  direction: ltr;
}
.lang-btn {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  color: #888;
  cursor: pointer;
  transition: all .18s;
  letter-spacing: .3px;
}
.lang-btn.active {
  background: #ff6e40;
  color: #fff;
  box-shadow: 0 1px 4px rgba(255,110,64,.35);
}
.lang-btn:not(.active):hover { color: #ff6e40; }

/* =====================================================
   HERO — bannière d'accueil
   ===================================================== */
.hero {
  background: linear-gradient(135deg, #f4511e 0%, #ff6e40 55%, #ffab40 100%);
  padding: 20px 20px 24px;
  position: relative;
  overflow: hidden;
}
/* cercles décoratifs */
.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -25px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}
.hero-tagline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-emoji {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18));
}
.hero-text { display: flex; flex-direction: column; gap: 2px; }
.hero-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  margin: 0;
  font-family: 'Tajawal', sans-serif;
}
.hero-wa {
  background: #25D366;
  color: #fff;
  padding: 9px 16px;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(37,211,102,0.4);
}
.hero-wa:hover { background: #1ebe5d; transform: scale(1.04); }
.hero-wa .whatsapp-icon { width: 20px; height: 20px; }

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  font-family: 'Tajawal', sans-serif;
}
.hero-desc {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  margin: 0;
  font-family: 'Tajawal', sans-serif;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid #eee;
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f7f7f8;
  color: #111;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
}
.search-bar input:focus {
  border-color: var(--accent);
  background: #fff;
}
.search-bar-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #bbb;
  pointer-events: none;
  line-height: 1;
}

/* =====================================================
   COMMERCE CARD — style Uber Eats
   ===================================================== */
#commerces-list {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}
.commerce-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #f0f0f0;
}
.commerce-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.13);
}
.commerce-card:active { transform: scale(0.985); }
.commerce-card.closed-opacity { opacity: 0.5; }

.commerce-banner {
  position: relative;
  width: 100%;
  height: 165px;
  background: #efefef;
  overflow: hidden;
}
.commerce-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.commerce-card:hover .commerce-banner img {
  transform: scale(1.04);
}
.commerce-status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.commerce-status-pill.open      { background: rgba(46,125,50,0.92);  color:#fff; }
.commerce-status-pill.closed    { background: rgba(0,0,0,0.62);      color:#fff; }
.commerce-status-pill.opening-soon { background: rgba(230,81,0,0.92); color:#fff; }
.commerce-status-pill.closing-soon { background: rgba(106,27,154,0.92);color:#fff;}

.commerce-info { padding: 12px 14px 14px; }

.commerce-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 3px;
}
.commerce-addr {
  font-size: 0.8rem;
  color: #aaa;
  margin: 0 0 10px;
}
.commerce-meta-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.commerce-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: #555;
  background: #f4f4f4;
  padding: 4px 10px;
  border-radius: 999px;
}
.commerce-chip.free         { color: #2e7d32; background: #e8f5e9; }
.commerce-chip.service-chip { color: #1565c0; background: #e3f2fd; }

/* =====================================================
   MENU ITEM — style Deliveroo (image à droite)
   ===================================================== */
#menu-list {
  display: flex !important;
  flex-direction: column;
  padding-top: 12px;
}
.menu-item {
  display: flex;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 12px;
}
.menu-item:last-child { border-bottom: none; }

.menu-item-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}
.menu-item-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin: 0;
  line-height: 1.4;
  font-family: 'Tajawal', sans-serif;
}
.menu-item-prices {
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-item-qty {
  margin-top: 6px;
}
.menu-item-right {
  flex: 0 0 112px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.menu-item-right .img-wrap {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.menu-item-right .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* =====================================================
   SERVICE CARD
   ===================================================== */
.service-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 14px;
}
.service-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.service-card-img:hover { transform: scale(1.02); }
.service-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  font-family: 'Tajawal', sans-serif;
}

/* ── Menu empty state ── */
.menu-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 10px;
  color: #bbb;
}
.menu-empty-state span {
  font-size: 2.5rem;
}
.menu-empty-state p {
  margin: 0;
  font-size: 0.95rem;
  font-family: 'Tajawal', sans-serif;
}


.menu-item:hover  { background: #fafafa; }
.menu-item:active { background: #f5f5f5; }

/* ═══════════════════════════════════════════════════════
   CARTE DE FIDÉLITÉ — بطاقة الولاء
═══════════════════════════════════════════════════════ */

@keyframes stamp-pop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.loyalty-block {
  background: linear-gradient(135deg, #ff6e40 0%, #ff9500 100%);
  box-shadow: 0 4px 16px rgba(255,110,64,.22);
  border-radius: 16px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
}
.loyalty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.loyalty-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loyalty-title {
  font-size: .88rem;
  font-weight: 800;
  color: #fff;
}
.loyalty-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.82);
}
.loyalty-count-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.loyalty-stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.loyalty-stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  transition: transform .2s;
}
.loyalty-stamp.filled {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.loyalty-stamp.empty {
  background: rgba(255,255,255,.2);
  border: 2px dashed rgba(255,255,255,.5);
}
.loyalty-stamp.stamp-pop {
  animation: stamp-pop .4s cubic-bezier(.34,1.56,.64,1) forwards;
}
.loyalty-progress-bar {
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.loyalty-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 999px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.loyalty-reward-label {
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.9);
  font-weight: 700;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 7px 12px;
}

/* Modal récompense */
.loyalty-reward-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 501;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -10px;
  animation: confetti-fall linear forwards;
}
.loyalty-reward-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  z-index: 502;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.loyalty-reward-emoji {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 14px;
  animation: bounce-in .5s ease;
}
.loyalty-reward-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 8px;
}
.loyalty-reward-sub {
  font-size: .85rem;
  color: #777;
  margin: 0 0 20px;
  line-height: 1.5;
}
.loyalty-full-card {
  background: linear-gradient(135deg, #ff6e40, #ff9500);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.loyalty-full-card .loyalty-stamps {
  margin-bottom: 0;
}
.loyalty-full-card .loyalty-stamp.filled { background: #fff; }
.loyalty-full-card .loyalty-stamp.empty  { background: rgba(255,255,255,.2); }
.loyalty-reward-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .98rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════
   HEADER — icône profil
═══════════════════════════════════════════════════════ */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: .75rem;
  transition: background .2s;
}
.profile-avatar-filled {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
}

/* ═══════════════════════════════════════════════════════
   INSCRIPTION & PROFIL
═══════════════════════════════════════════════════════ */
.reg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.reg-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
}
/* Extra padding pour ne pas être caché par la bottom navbar */
.reg-card-nav-safe {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 16px));
}
.reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.reg-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin: 0;
}
.reg-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reg-skip {
  background: none;
  border: none;
  color: #aaa;
  font-size: .85rem;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 6px;
  white-space: nowrap;
}
.reg-sub {
  font-size: .82rem;
  color: #888;
  margin-bottom: 18px;
  line-height: 1.4;
}
.reg-label {
  display: block;
  font-size: .78rem;
  color: #666;
  margin-bottom: 4px;
  margin-top: 10px;
}
.reg-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 10px;
  transition: border-color .2s;
}
.reg-input:focus { border-color: var(--accent); }
.reg-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.reg-row2 .reg-input { margin-bottom: 10px; }
.reg-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .97rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}
.reg-btn:active { opacity: .85; }

.reg-delete-btn {
  width: 100%;
  padding: 10px;
  background: none;
  border: 1.5px solid #ffcdd2;
  border-radius: 12px;
  font-size: .85rem;
  color: #e53935;
  cursor: pointer;
  font-family: inherit;
  margin-top: 10px;
}
.reg-error {
  color: #e53935;
  font-size: .82rem;
  margin-top: 8px;
  min-height: 1em;
  text-align: center;
}

/* ── Montant minimum panier ── */
.cart-min-order-msg {
  text-align: center;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #fff8e1;
  color: #f57f17;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
}
#order-whatsapp:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   PWA Install Banner
═══════════════════════════════════════════════════════ */
.install-banner {
  position: fixed;
  bottom: 72px;
  left: 12px;
  right: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 300;
  animation: slideUpIn .3s ease;
}
.install-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.install-banner-text strong {
  font-size: .9rem;
  font-weight: 800;
  color: #111;
}
.install-banner-text span {
  font-size: .75rem;
  color: #888;
}
.install-banner-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.install-banner-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: .78rem;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  padding: 4px;
}

/* ═══════════════════════════════════════════════════════
   Section Historique طلباتي
═══════════════════════════════════════════════════════ */
.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: #bbb;
  font-size: .95rem;
}
.history-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.history-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.history-commerce {
  font-weight: 800;
  font-size: .95rem;
  color: #111;
}
.history-total {
  font-weight: 800;
  color: var(--accent);
  font-size: .9rem;
  white-space: nowrap;
}
.history-items {
  font-size: .78rem;
  color: #999;
  margin-bottom: 4px;
  line-height: 1.4;
}
.history-date {
  font-size: .72rem;
  color: #ccc;
  margin-bottom: 10px;
}
.history-reorder-btn {
  width: 100%;
  padding: 10px;
  background: #fff4f0;
  color: var(--accent);
  border: 1.5px solid #ffd5c8;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.history-reorder-btn:active {
  background: #ffe8e0;
}
