/* ========== RESET & BASE ========== */
:root {
    --primary: #db800a;
    --primary-dark: #b86a07;
    --bg-color: #f8f9fa;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', "Segoe UI", sans-serif;
    background: var(--bg-color); color: var(--text-main);
    line-height: 1.6; padding-bottom: 100px;
}

/* ========== HEADER PREMIUM VERT FONCÉ ========== */
header {
    background: #143621;
    padding: 1.1rem 1rem;
    position: sticky; 
    top: 0; 
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.logo-img {
    height: 55px; 
    width: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e3c496; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.logo h1 { 
    font-family: 'Cinzel', serif; 
    font-size: 1.9rem; 
    font-weight: 800; 
    color: #fdfbf7; 
    display: flex; 
    flex-direction: column; 
    line-height: 1; 
    margin: 0; 
}

.logo .logo-subtext { 
    font-family: 'Inter', sans-serif; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #e3c496; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    margin-top: 2px;
}

.user-badge { 
    background: rgba(255,255,255,0.1); 
    color: #fdfbf7; 
    padding: 8px 16px; 
    border-radius: 30px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3)), url("https://images.unsplash.com/photo-1554118811-1e0d58224f24?auto=format&fit=crop&q=80&w=1000");
    background-size: cover; background-position: center;
    padding: 3rem 1.5rem; text-align: center; color: var(--white);
}
.hero-content h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero-content p { font-size: 1.1rem; opacity: 0.9; }

/* ========== CATÉGORIES STICKY ========== */
.categories-wrapper {
    background: var(--white); position: sticky; top: 78px; z-index: 90;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}
.categories {
    max-width: 1200px; margin: 0 auto; display: flex; gap: 0.8rem; padding: 1rem;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }
.category-btn {
    background: #f1f5f9; border: none; padding: 0.6rem 1.2rem;
    border-radius: 30px; font-weight: 600; font-size: 0.9rem;
    color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all 0.3s;
}
.category-btn.active { background: var(--primary); color: var(--white); box-shadow: 0 4px 10px rgba(219, 128, 10, 0.3); }

/* ========== GRILLE MENU ========== */
.menu-section { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

.menu-item {
    background: var(--white); border-radius: 20px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
    overflow: hidden !important;
}
.menu-item:active { transform: scale(0.96); }
.item-image { width: 100%; height: 140px; object-fit: cover; background: #e9ecef; position: relative;transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;}
.item-info { padding: 1rem; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.item-info h3 { font-size: 1rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.3rem; }
.price { color: var(--primary); font-weight: 800; font-size: 1.1rem; margin-bottom: 0.8rem; }
.menu-item:active .item-image {
    transform: scale(1.08) !important; 
}
.add-to-cart {
    background: #fff8f1; color: var(--primary); border: 2px solid var(--primary);
    padding: 0.6rem; border-radius: 12px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; width: 100%; display: flex; justify-content: center; align-items: center; gap: 5px;
}
.add-to-cart:hover { background: var(--primary); color: var(--white); }

/* RUPTURE DE STOCK */
.menu-item.sold-out { opacity: 0.6; filter: grayscale(80%); order: 999; }
.sold-out .item-image::after {
    content: 'ÉPUISÉ'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7); color: white; padding: 5px 12px; border-radius: 8px; font-weight: bold; letter-spacing: 1px;
}
.add-to-cart.disabled { background: #e2e8f0; color: #94a3b8; border-color: #cbd5e1; cursor: not-allowed; }

/* ========== BOUTON PANIER FLOTTANT ========== */
.floating-cart {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: var(--white); width: 90%; max-width: 400px;
    padding: 1rem; border-radius: 30px; display: flex; justify-content: space-between;
    align-items: center; box-shadow: 0 10px 25px rgba(219, 128, 10, 0.4);
    z-index: 99; cursor: pointer; transition: transform 0.2s; display: none;
}
.floating-cart:active { transform: translateX(-50%) scale(0.96); }
.floating-cart.visible { display: flex; animation: slideUpCartFloat 0.3s ease forwards; }
.floating-cart.pulse { animation: bounceCart 0.4s ease; }

.cart-badge { background: var(--white); color: var(--primary); width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 0.95rem;}
.cart-text { font-weight: 600; font-size: 1rem; }
.cart-price { font-weight: 800; font-size: 1.1rem; }

@keyframes slideUpCartFloat { from { bottom: -100px; } to { bottom: 20px; } }
@keyframes bounceCart { 0% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.08); } 100% { transform: translateX(-50%) scale(1); } }

/* ========== MODAL OPTIONS (MARQUE/CUISSON) ========== */
.options-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1005;
    display: flex; align-items: flex-end; justify-content: center;
    backdrop-filter: blur(3px); 
}
.options-content {
    background: var(--white); width: 100%; max-width: 500px;
    border-radius: 25px 25px 0 0; padding: 1.5rem;
    animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.options-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.close-options { background: #f1f5f9; border: none; width: 35px; height: 35px; border-radius: 50%; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; transition: background 0.2s;}
.close-options:active { background: #e2e8f0; }

.options-list { 
    display: flex; flex-direction: column; gap: 12px;
    margin-bottom: 20px; max-height: 45vh; overflow-y: auto; padding-right: 5px;
}
.option-label { 
    cursor: pointer; 
    display: block; 
    -webkit-tap-highlight-color: transparent; 
}
.option-input { display: none; }

.option-box {
    padding: 16px 20px; 
    border: 2px solid #e2e8f0; 
    border-radius: 16px; 
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; font-size: 1.05rem;
    color: var(--text-main); background: var(--white);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.check-icon { color: #cbd5e1; font-size: 1.4rem; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); transform: scale(0.8); }
.option-input:checked + .option-box { border-color: var(--primary); background: rgba(219, 128, 10, 0.08); color: var(--primary); box-shadow: 0 4px 15px rgba(219, 128, 10, 0.15); transform: translateY(-2px); }
.option-input:checked + .option-box .check-icon { color: var(--primary); transform: scale(1.1); }

/* ========== NOUVEAU MODAL PANIER (MODERNE BOTTOM SHEET) ========== */
/* ========== NOUVEAU MODAL PANIER (PREMIUM UX) ========== */
.cart-modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(5px);
    z-index: 2000; display: flex; justify-content: center; align-items: flex-end;
    padding: 0; 
}
.cart-content {
    background: #f8fafc; /* Fond gris clair pour faire ressortir les articles blancs */
    width: 100%; max-width: 600px;
    border-radius: 32px 32px 0 0; padding: 15px 0 0 0;
    max-height: 92vh; display: flex; flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    animation: slideUpSheet 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cart-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 24px 15px 24px; 
}
.cart-header h2 { font-size: 1.4rem; color: #1e293b; display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800;}
.close-cart { background: #e2e8f0; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; color: #475569; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center;}
.close-cart:active { transform: scale(0.9); background: #cbd5e1;}

.cart-items { 
    flex: 1; overflow-y: auto; 
    padding: 10px 24px 20px 24px; 
}
.cart-items::-webkit-scrollbar { display: none; } /* Cache la barre pour faire plus propre sur tel */

/* Articles sous forme de "Cartes" Premium */
.modern-cart-item { 
    display: flex; align-items: center; padding: 12px; margin-bottom: 12px;
    background: #ffffff; border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #f1f5f9;
}
.modern-cart-item-img {
    width: 65px; height: 65px; border-radius: 14px;
    background-size: cover; background-position: center;
    margin-right: 15px; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.modern-cart-item-info { flex: 1; }
.modern-cart-item-info h4 { margin: 0 0 4px 0; font-size: 1.05rem; color: #0f172a; font-weight: 800;}
.modern-cart-item-price { font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-top: 4px;}
.modern-cart-item-variant { display: inline-block; font-size: 0.75rem; color: #64748b; background: #f1f5f9; padding: 3px 8px; border-radius: 8px; font-weight: 600; margin-bottom: 2px;}

/* Boutons + / - */
.modern-qty-control { display: flex; align-items: center; background: #f8fafc; padding: 4px; border-radius: 30px; border: 1px solid #e2e8f0; }
.modern-qty-btn { background: #ffffff; border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #1e293b; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; font-size: 1.1rem; transition: 0.1s;}
.modern-qty-btn:active { transform: scale(0.9); background: #f1f5f9; }
.modern-qty-val { width: 30px; text-align: center; font-weight: 800; font-size: 1rem; color: #0f172a; }

/* Zone Fixe de Paiement en bas */
.checkout-section { 
    background: #ffffff; padding: 20px 24px; 
    border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 1.5rem; font-weight: 900; color: #143621; }

.sleek-input-group { position: relative; display: flex; gap: 8px; }
.sleek-input { flex: 1; padding: 12px 15px 12px 40px; border-radius: 12px; border: 2px solid #e2e8f0; font-size: 0.95rem; font-weight: 600; outline: none; transition: 0.2s; background: #f8fafc; color: var(--text-main);}
.sleek-input:focus { border-color: var(--primary); background: #fff; }
.sleek-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--primary); }
.sleek-select { width: 100%; padding: 14px 15px 14px 45px; border-radius: 12px; border: 2px solid #e2e8f0; font-size: 1rem; font-weight: 700; outline: none; color: #1e293b; background: #f8fafc; cursor: pointer; appearance: none; transition: 0.2s;}
.sleek-select:focus { border-color: #143621; }

.checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== RESPONSIVE DESKTOP ========== */
@media (min-width: 768px) {
    .cart-modal { align-items: center; padding: 20px; }
    .cart-content { height: auto; max-height: 85vh; border-radius: 32px; }
}

/* ========== MES COMMANDES ========== */
.tracking-section { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.historique-commande-card { background: var(--white); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.historique-commande-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 0.5rem;}
.commande-numero { font-weight: 800; color: var(--primary); }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: white; }
.status-attente { background: #f39c12; } .status-preparation { background: #3498db; } .status-termine, .status-paye { background: #27ae60; }
.article-detail { font-size: 0.9rem; color: var(--text-muted); display: flex; justify-content: space-between; padding: 3px 0;}

/* ========== MODALS (Table & Code) ========== */
.table-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(3px);}
.table-modal-content { background: white; border-radius: 20px; padding: 2rem; text-align: center; width: 90%; max-width: 400px; animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.table-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin: 1.5rem 0; max-height: 250px; overflow-y: auto;}
.table-btn { background: #f8fafc; border: 1px solid #cbd5e1; padding: 1rem; border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s;}
.table-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.table-btn:active { transform: scale(0.95); }

.code-input { width: 100%; padding: 1rem; font-size: 1.5rem; text-align: center; letter-spacing: 5px; border: 2px solid #e2e8f0; border-radius: 12px; margin: 1rem 0; outline: none; font-weight: bold;}
.code-input:focus { border-color: var(--primary); }

/* NOTIFICATIONS */
.notification { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: white; padding: 1rem 2rem; border-radius: 30px; font-weight: 600; z-index: 3000; animation: slideDown 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2);}
.notification-error { background: #e74c3c; }

@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { top: -50px; } to { top: 20px; } }

/* RESPONSIVE DESKTOP */
@media (min-width: 768px) {
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    
    /* Sur PC, les modales (Options et Panier) se centrent au lieu de coller en bas */
    .cart-modal, .options-modal { align-items: center; padding: 20px; }
    
    .cart-content { 
        height: auto; 
        max-height: 85vh; 
        border-radius: 28px; /* Arrondi des 4 coins sur PC */
    }
    
    .options-content { 
        height: auto; 
        max-height: 80vh; 
        border-radius: 25px; /* Arrondi des 4 coins sur PC */
    }
}
/* ======================================================= */
/* 🔥 DESIGN DE LA CARTE VIP (À AJOUTER TOUT EN BAS) */
/* ======================================================= */
.vip-card {
    background: linear-gradient(135deg, #1e293b 0%, #020617 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; padding: 24px; color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative; overflow: hidden;
}
.vip-card::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%); pointer-events: none;
}
.vip-card-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 800; color: #cbd5e1; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 2px; }
.vip-card-body h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 5px; color: white; }
.vip-code { font-family: monospace; font-size: 1.2rem; letter-spacing: 6px; color: var(--primary); margin-bottom: 25px; font-weight: bold; }
.vip-card-footer { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 15px; }
.vip-label { display: block; font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.vip-value { font-size: 1.3rem; font-weight: 900; color: white; }
/* ======================================================= */
/* 🔥 DESIGN DES BOUTONS DE L'ESPACE VIP */
/* ======================================================= */
.auth-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: none;
    margin-top: 20px;
}

/* Bouton de Connexion (Premium Orange) */
.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(219, 128, 10, 0.25);
}
.btn-login:active {
    transform: scale(0.97);
    box-shadow: 0 4px 10px rgba(219, 128, 10, 0.15);
}

/* Bouton de Déconnexion (Rouge Doux) */
.btn-logout {
    background: rgba(239, 68, 68, 0.1); /* Fond rouge très léger */
    color: var(--danger); /* Texte rouge vif */
    margin-top: 25px;
}
.btn-logout:active {
    transform: scale(0.97);
    background: rgba(239, 68, 68, 0.15);
}
/* ======================================================= */
/* 👑 THÈME ÉVOLUTIF : VIP GOLD MODE */
/* ======================================================= */
.vip-card {
    transition: all 0.5s ease;
}

.vip-card.theme-gold {
    background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
    color: #fef08a;
    border: 1px solid #fbbf24;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(1.02);
}

.vip-card.theme-gold .vip-card-header {
    color: #fbbf24;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.vip-card.theme-gold h3 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.vip-card.theme-gold .vip-code, 
.vip-card.theme-gold .vip-label, 
.vip-card.theme-gold .vip-value {
    color: #fcd34d;
}

.vip-card.theme-gold::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,215,0,0.15) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: goldShine 3s infinite linear;
    pointer-events: none;
}

@keyframes goldShine {
    0% { transform: translateX(-50%) rotate(30deg); }
    100% { transform: translateX(50%) rotate(30deg); }
}
/* ======================================================= */
/* ✨ PACK UI/UX ULTRA-PREMIUM (Animations & Interactions) */
/* ======================================================= */

/* 1. EFFET LÉVITATION ET ZOOM SUR LES PLATS */
.menu-item {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Le débordement doit être caché pour que l'image ne sorte pas de la carte en zoomant */
    overflow: hidden; 
}

.menu-item .item-image {
    transition: transform 0.6s ease; /* Transition douce pour le zoom */
}

/* Ce qui se passe quand le client touche ou survole la carte */
.menu-item:hover {
    transform: translateY(-5px); /* La carte se soulève */
    box-shadow: 0 15px 30px rgba(219, 128, 10, 0.15); /* Ombre orangée luxueuse */
    border-color: rgba(219, 128, 10, 0.3);
}

.menu-item:hover .item-image {
    transform: scale(1.08); /* L'image zoome légèrement vers le client */
}


/* 2. MENU CATÉGORIES "STICKY GLASS" (Verre Dépoli) */
.categories-wrapper {
    position: sticky;
    top: 70px; /* Ajuste ce chiffre selon la hauteur de ton header vert pour qu'il se colle juste en dessous */
    z-index: 90;
    /* L'effet Verre Dépoli iOS */
    background: rgba(248, 249, 250, 0.75) !important; 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    margin-bottom: 20px;
}


/* 3. EFFET BOUTON PRESSÉ (Micro-interaction) */
/* S'applique au bouton "Ajouter", aux boutons "+" et "-", et aux catégories */
.add-to-cart, 
.modern-qty-btn, 
.category-btn,
.checkout-btn {
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
}

/* Quand le client enfonce son doigt sur le bouton */
.add-to-cart:active, 
.modern-qty-btn:active, 
.category-btn:active,
.checkout-btn:active {
    transform: scale(0.92); /* Rétrécit de 8% pour simuler un vrai bouton physique */
}


/* 4. LUEUR RESPIRANTE SUR LE PANIER FLOTTANT (Glow Effect) */
.floating-cart.visible {
    animation: cartGlow 3s infinite alternate; /* Respiration infinie */
}

@keyframes cartGlow {
    0% {
        box-shadow: 0 10px 25px rgba(219, 128, 10, 0.4);
    }
    100% {
        box-shadow: 0 10px 35px rgba(219, 128, 10, 0.8), 0 0 15px rgba(219, 128, 10, 0.4); /* Lueur plus forte */
    }
}
/* ======================================================= */
/* 🚀 PACK ULTRA-PREMIUM : SENSORIEL & IMMERSION           */
/* ======================================================= */

/* ========== SPLASH SCREEN (ÉCRAN DE CHARGEMENT) ========== */
        #splash-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #143621; /* Vert foncé TA'BIA */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999; /* Par dessus TOUT le reste */
            transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
        }
        
        .splash-content {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .splash-logo {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            border: 3px solid #e3c496; /* Doré TA'BIA */
            object-fit: cover;
            box-shadow: 0 0 25px rgba(227, 196, 150, 0.3);
            margin-bottom: 20px;
            animation: pulseLogo 2s infinite ease-in-out;
        }

        .splash-title {
            font-family: 'Cinzel', serif;
            font-size: 2.5rem;
            font-weight: 800;
            color: #e3c496;
            margin: 0;
            letter-spacing: 3px;
        }

        .splash-subtitle {
            font-family: 'Inter', sans-serif;
            font-size: 0.9rem;
            color: #cbd5e1;
            margin-top: 8px;
            letter-spacing: 1px;
            text-transform: uppercase;
            font-weight: 600;
        }

        .splash-loader {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(227, 196, 150, 0.2);
            border-top: 4px solid #e3c496;
            border-radius: 50%;
            animation: spinLoader 1s linear infinite;
            margin-top: 30px;
        }

        /* Animations */
        @keyframes pulseLogo {
            0% { transform: scale(1); box-shadow: 0 0 15px rgba(227, 196, 150, 0.2); }
            50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(227, 196, 150, 0.6); }
            100% { transform: scale(1); box-shadow: 0 0 15px rgba(227, 196, 150, 0.2); }
        }

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

/* 3. BARRE DE TEMPS SUR LES NOTIFICATIONS */
.notification { position: relative; overflow: hidden; padding-bottom: 12px; }
.notif-progress {
    position: absolute; bottom: 0; left: 0; height: 4px;
    background: rgba(255,255,255,0.4); width: 100%;
    animation: notifTime 3s linear forwards;
}
@keyframes notifTime { from { width: 100%; } to { width: 0%; } }

/* ======================================================= */
/* 🌙 DARK MODE PREMIUM (Midnight Lounge) - ULTIMATE FIX   */
/* ======================================================= */

/* --- 1. Base et Variables --- */
body.dark-mode {
    background-color: #0f172a !important; /* Bleu nuit très profond */
    color: #f1f5f9 !important;
    color-scheme: dark; /* Force les scrollbars natives et inputs en mode sombre */
}

/* --- 2. Écran de Chargement (Splash Screen) --- */
body.dark-mode .splash-screen {
    background-color: #0f172a !important;
}

/* --- 3. Toutes les Cartes & Conteneurs (Produits, Modales, VIP) --- */
body.dark-mode .product-card,
body.dark-mode .modal-content,
body.dark-mode .menu-item, 
body.dark-mode .cart-content, 
body.dark-mode .options-content,
body.dark-mode .table-modal-content,
body.dark-mode .client-modal-content,
body.dark-mode .historique-commande-card,
body.dark-mode .gamification-container,
body.dark-mode .stat-box,
body.dark-mode .vip-card:not(.theme-gold),
body.dark-mode .cart-total-container,
body.dark-mode .auth-box,
body.dark-mode .qr-container {
    background-color: #1e293b !important; /* Gris/Bleu ardoise */
    border: 1px solid #334155 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6) !important;
}

/* --- 4. Textes globaux, Titres et Prix --- */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode p,
body.dark-mode .product-name,
body.dark-mode .commande-numero,
body.dark-mode .modern-cart-item-info h4,
body.dark-mode .stat-value,
body.dark-mode .cart-total-container span {
    color: #f8fafc !important; /* Blanc cassé pour ne pas éblouir */
}

body.dark-mode .product-desc,
body.dark-mode .stat-label,
body.dark-mode .empty-message,
body.dark-mode .text-muted {
    color: #94a3b8 !important; /* Gris doux pour textes secondaires */
}

/* --- 5. "LE NETTOYEUR" : Écrase TOUS les styles codés en dur dans le HTML/JS --- */
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color:#fff"],
body.dark-mode [style*="background:#fff"] {
    background-color: #1e293b !important;
}

body.dark-mode [style*="color:#1e293b"],
body.dark-mode [style*="color: #1e293b"],
body.dark-mode [style*="color:#333"],
body.dark-mode [style*="color:#000"] {
    color: #e2e8f0 !important;
}

body.dark-mode div[style*="border-top:2px dashed"],
body.dark-mode div[style*="border-bottom: 1px solid"] {
    border-color: #334155 !important;
}

/* --- 6. Inputs, Selects, Options et Boutons de Table --- */
body.dark-mode input,
body.dark-mode select,
body.dark-mode .code-input,
body.dark-mode .sleek-input,
body.dark-mode .sleek-select,
body.dark-mode .option-box,
body.dark-mode .table-btn {
    background-color: #0f172a !important; /* Fond très sombre pour les zones de saisie */
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .table-btn:hover { background-color: #334155 !important; }
body.dark-mode .table-btn.occupied {
    background-color: #450a0a !important; /* Rouge très sombre pour table occupée */
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}
body.dark-mode .option-input:checked + .option-box {
    background-color: rgba(219, 128, 10, 0.15) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* --- 7. Panier et Boutons de Quantité (+ / -) --- */
body.dark-mode .modern-cart-item {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
body.dark-mode .modern-qty-btn,
body.dark-mode .qty-btn {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}
body.dark-mode .modern-qty-btn:hover { background-color: #334155 !important; }

/* --- 8. Boutons Actions (Annuler, Fermer, Logout) --- */
body.dark-mode .btn-logout,
body.dark-mode .close-cart, 
body.dark-mode .close-options,
body.dark-mode #cancelTableBtn, 
body.dark-mode #annulerCodeBtn {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border: none !important;
}
body.dark-mode .close-cart:hover, 
body.dark-mode .close-options:hover {
    background-color: #475569 !important;
}

/* --- 9. Barre de Catégories & Hero Section --- */
body.dark-mode .categories-wrapper,
body.dark-mode .categories {
    background-color: #0f172a !important;
    border-bottom: 1px solid #334155 !important;
}
body.dark-mode .category-btn {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}
body.dark-mode .category-btn.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(219, 128, 10, 0.4) !important;
}
body.dark-mode .hero {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}

/* --- 10. Panier Flottant (Floating Cart) --- */
body.dark-mode .floating-cart {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.7) !important;
}
body.dark-mode .cart-text,
body.dark-mode .cart-price { color: #f8fafc !important; }
body.dark-mode .cart-badge { border-color: #1e293b !important; }

/* --- 11. Scrollbars personnalisées pour le Dark Mode --- */
body.dark-mode ::-webkit-scrollbar-track { background: #0f172a; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: #475569; }
/* ========================================================================= */
/* 💎 PACK DESIGN PREMIUM TA'BIA (Global) 💎 */
/* ========================================================================= */

/* 1. GLASSMORPHISM SUR LE HEADER (Effet Verre Dépoli type iOS) */
header {
    background: rgba(20, 54, 33, 0.94) !important; /* Le vert TA'BIA translucide */
    backdrop-filter: blur(7px) !important; /* Le flou d'arrière-plan */
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(227, 196, 150, 0.3) !important; /* Liseré doré subtil */
}

/* 2. OMBRES DOUCES ET ÉLÉGANTES (Soft Shadows) */
/* S'applique aux tables, produits, tickets, modales et commandes cuisine */
.card, .table-btn, .product-card, .ticket-card, .modal-content, .commande-card, .table-container {
    box-shadow: 0 12px 35px rgba(20, 54, 33, 0.06) !important; /* Ombre très diffuse teintée de vert */
    border: 1px solid rgba(227, 196, 150, 0.2) !important; /* Contour doré ultra fin */
    border-radius: 16px !important; /* Arrondis modernes */
}

/* 3. ANIMATIONS FLUIDES AU SURVOL ET CLIC (Feedback tactile) */
button, .product-card, .table-btn, .card, .commande-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
button:active, .product-card:active, .table-btn:active {
    transform: scale(0.96) !important; /* Effet d'enfoncement physique */
}
button:hover:not(:disabled) {
    filter: brightness(1.1); /* S'illumine légèrement au survol de la souris */
}

/* 4. SCROLLBAR PREMIUM (Barre de défilement discrète et élégante) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(20, 54, 33, 0.15); /* Vert très clair */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(227, 196, 150, 0.8); /* Devient doré quand on la manipule */
}

/* 5. SÉLECTION DE TEXTE AUX COULEURS DE LA MARQUE */
::selection {
    background: #e3c496; /* Doré */
    color: #143621; /* Vert */
}
/* ========== ANIMATION VOL VERS PANIER (CLIENT) ========== */
.fly-item {
    position: fixed;
    background: #e3c496; /* Doré TA'BIA */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(227, 196, 150, 0.6);
    transform: translate(-50%, -50%);
}
/* ========== BARRE DES CATÉGORIES (SCROLL HORIZONTAL PREMIUM) ========== */
#categoryTabs {
    display: flex;
    gap: 12px;
    overflow-x: auto; /* Permet le défilement horizontal */
    padding: 10px 15px 15px 15px; /* Ajoute un peu d'espace autour */
    
    /* 1. Défilement ultra-doux (Surtout pour iPhone/iOS) */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; 
    
    /* 2. Cacher la barre de défilement (Firefox et IE) */
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

/* 3. Cacher la barre de défilement (Chrome, Safari, Opera) */
#categoryTabs::-webkit-scrollbar {
    display: none; 
}

/* Design des boutons "Pilules" des catégories */
.category-btn {
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    flex-shrink: 0; /* Empêche les boutons de s'écraser */
    padding: 8px 20px;
    border-radius: 30px;
    background: white;
    border: 1px solid rgba(227, 196, 150, 0.4); /* Liseré doré doux */
    color: #143621; /* Vert TA'BIA */
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(20, 54, 33, 0.05); /* Petite ombre douce */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

/* Le bouton quand il est sélectionné */
.category-btn.active {
    background: #143621 !important; /* Fond Vert */
    color: #e3c496 !important; /* Texte Doré */
    border-color: #143621 !important;
    transform: scale(1.05); /* Grossit légèrement */
    box-shadow: 0 6px 15px rgba(20, 54, 33, 0.2);
}