/* ===========================
   === BACKGROUND GLOBAL ===
   =========================== */
body {
    background: linear-gradient(
        135deg,
        #f9fafb,
        #f3f4f6
    ); /* background par défaut */
    color: #1a1a1a; /* couleur du texte par défaut */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    /* Reserve space for bottom nav on mobile */
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===========================
   === MOBILE RESPONSIVE ===
   =========================== */

/* Mobile-first adjustments */
@media (max-width: 640px) {
    /* Reduce padding on mobile */
    .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .px-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .py-8 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .gap-6 {
        gap: 1rem !important;
    }
    .gap-5 {
        gap: 0.75rem !important;
    }

    /* Full width containers */
    .w-96 {
        width: 100% !important;
        max-width: 100% !important;
    }
    .max-w-3xl {
        max-width: 100% !important;
    }
    .max-w-6xl {
        max-width: 100% !important;
    }

    /* Adjust margins */
    .mt-10 {
        margin-top: 1.5rem !important;
    }
    .mb-10 {
        margin-bottom: 1.5rem !important;
    }
    .mx-auto {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    /* Login/signup form on mobile */
    .glass-card {
        margin: 0.5rem !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        width: calc(100% - 1rem) !important;
        max-width: none !important;
    }

    /* Hero section mobile - more compact */
    .hero {
        padding: 0.75rem 0.75rem !important;
    }

    /* Product cards - single column on mobile */
    .grid-cols-1 {
        grid-template-columns: 1fr !important;
    }

    /* Product card mobile adjustments */
    .product-card {
        padding: 0.75rem !important;
        margin: 0 !important;
    }

    .product-thumb {
        width: 72px !important;
        height: 72px !important;
    }

    .product-name-clamp {
        font-size: 0.95rem !important;
    }

    /* Buttons full width on mobile */
    .btn-cart {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }

    /* Sidebar hide by default on mobile */
    .sidebar-mobile-hidden {
        display: none !important;
    }

    /* Search input mobile */
    .search-input {
        font-size: 16px !important; /* prevents zoom on iOS */
    }

    /* Tags smaller on mobile */
    .tag-bubble {
        padding: 0.25rem 0.55rem !important;
        font-size: 0.72rem !important;
    }

    /* Price chip mobile */
    .price-chip {
        padding: 0.3rem 0.55rem !important;
        font-size: 0.82rem !important;
    }

    /* Ordonnance chip mobile */
    .ord-chip {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.65rem !important;
    }

    /* Dialogs mobile - full width, safe margins */
    .q-dialog__inner > div {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 0 auto !important;
    }

    /* Navbar mobile adjustments */
    .app-navbar {
        padding: 0.4rem 0.5rem !important;
    }

    .nav-btn {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.78rem !important;
        min-height: 40px !important;
        min-width: 40px !important;
    }

    /* Hide wallet amount text on very small screens, keep icon */
    .nav-wallet-amount {
        display: none !important;
    }

    .nav-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    /* Footer mobile */
    footer {
        padding: 0.5rem !important;
        /* Add space for bottom nav */
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }

    /* Text sizes mobile */
    .text-2xl {
        font-size: 1.25rem !important;
    }
    .text-3xl {
        font-size: 1.5rem !important;
    }
    .text-lg {
        font-size: 1rem !important;
    }

    /* Hide recommended button on mobile hero (moved to bottom) */
    .hero .btn-recommended {
        position: static !important;
        margin-top: 0.5rem !important;
    }

    /* Map: responsive height on mobile */
    .map-container {
        height: 55vh !important;
        min-height: 280px !important;
    }

    /* Page content padding for bottom nav */
    .page-content {
        padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }

    /* Wallet recharge buttons - full row */
    .recharge-btns {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .recharge-btns button {
        flex: 1 !important;
    }

    /* Cart item cards full width */
    .cart-item-card {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Back button sticky - better visibility */
    .btn-back-sticky {
        backdrop-filter: blur(8px) !important;
        background: rgba(255,255,255,0.85) !important;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-thumb {
        width: 80px !important;
        height: 80px !important;
    }

    .glass-card {
        max-width: 450px !important;
    }
}

/* Ensure touch targets are large enough (44x44 minimum) */
@media (pointer: coarse) {
    button,
    .q-btn,
    [role="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    input,
    select,
    textarea {
        min-height: 44px !important;
        font-size: 16px !important; /* prevents zoom on iOS */
    }

    .q-checkbox {
        min-height: 44px !important;
    }
}

/* ===========================
   === BOTTOM NAVIGATION (mobile) ===
   =========================== */
.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        padding: 0.4rem 0;
        padding-bottom: env(safe-area-inset-bottom);
        justify-content: space-around;
        align-items: center;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 0.3rem 0.5rem;
        min-width: 56px;
        min-height: 48px;
        border-radius: 10px;
        cursor: pointer;
        transition: background 0.15s ease;
        text-decoration: none;
        color: #6b7280;
        font-size: 0.65rem;
        font-weight: 500;
        position: relative;
        background: transparent;
        border: none;
    }

    .bottom-nav-item:active {
        background: #f3f4f6;
    }

    .bottom-nav-item.active {
        color: #34a853;
    }

    .bottom-nav-item .material-icons,
    .bottom-nav-item .q-icon {
        font-size: 1.4rem !important;
    }

    .bottom-nav-badge {
        position: absolute;
        top: 2px;
        right: 6px;
        background: #ef4444;
        color: #fff;
        font-size: 0.6rem;
        font-weight: 700;
        border-radius: 9999px;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 0 2px white;
    }

    /* Give pages breathing room above bottom nav */
    .nicegui-content > *:last-child {
        margin-bottom: 70px;
    }
}
/* ===========================
    === FADE IN ===
    =========================== */
.fade-in {
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
    === STYLES HOME ===
    =========================== */
.hero {
    background: linear-gradient(135deg, #e9fdf5, #d7fbf0);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.white-input .q-field__control {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.white-input .q-field__native,
.white-input input {
    background: transparent !important;
    color: #111827;
}
.white-input .q-field__control:before,
.white-input .q-field__control:after {
    display: none !important;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    padding: 1.2rem;
    transition:
        box-shadow 0.18s ease,
        transform 0.18s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-fixed {
    min-height: 240px;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.product-header {
    align-items: flex-start;
}
.product-thumb {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.price-chip {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.18);
}

.ord-chip {
    background: #ef4444;
    color: #fff;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
    text-transform: uppercase;
}

.tag-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    opacity: 0.95;
}

.tag-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.bubble-close {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bubble-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.skeleton-card {
    position: relative;
    overflow: hidden;
}
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
.rating-row .material-icons {
    vertical-align: middle;
}
.card-actions {
    margin-top: auto;
}
.card-actions .q-btn {
    min-height: 34px;
}

/* ===========================
    === GLASS CARD ===
    =========================== */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}
.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ===========================
    === STYLES PRODUIT ===
    =========================== */
/* body.theme-product {
    background: #f9fdfb;
    color: #1a1a1a;
}*/

body.theme-product .main-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    align-items: start;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

body.theme-product .main-product-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

body.theme-product .main-product-card img {
    border-radius: 16px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-height: 350px;
    object-fit: cover;
}
body.theme-product .main-product-info h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
body.theme-product .main-product-info .price-chip {
    font-size: 1rem;
    margin-right: 0.8rem;
}

body.theme-product .tag-bubble {
    margin-right: 0.4rem;
    margin-top: 0.4rem;
}

body.theme-product .similar-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
body.theme-product .similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}
body.theme-product .similar-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}
body.theme-product .similar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
body.theme-product .similar-card img {
    border-radius: 12px;
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 0.8rem;
}
body.theme-product .similar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

/* ============================
=== BOUTONS GLOBAUX ===
============================ */

/* --- Bouton d’action principale --- */
.btn-primary {
    background-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(14, 165, 233, 0.15);
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-primary:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 5px 14px rgba(2, 132, 199, 0.2);
    transform: translateY(-1px);
}

/* --- Bouton secondaire (ex: Vérifier dispo, Rechercher itinéraire) --- */
.btn-secondary {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-secondary:hover {
    background-color: #e5e7eb !important;
    transform: translateY(-1px);
}

/* --- Boutons liés à l'authentification (Se connecter / S’inscrire) --- */
.btn-auth {
    background-color: #3b82f6 !important;
    color: white !important;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
    text-transform: uppercase !important; /*Force les majuscules*/
    letter-spacing: 0.5px;
}
.btn-auth:hover {
    background-color: #2563eb !important;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

/* --- Bouton retour / navigation secondaire --- */
.btn-back {
    background-color: #e5e7eb !important;
    color: #374151 !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    text-transform: none !important;
}
.btn-back:hover {
    background-color: #d1d5db !important;
}

/* --- Bouton succès (ex: Recharger wallet) --- */
.btn-success {
    background-color: #10b981 !important;
    color: white !important;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.18);
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-success:hover {
    background-color: #059669 !important;
    box-shadow: 0 5px 14px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

/* --- Bouton annulation --- */
.btn-cancel {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-cancel:hover {
    background-color: #fde68a !important;
}

/* --- Bouton édition (Modifier commentaire) --- */
.btn-edit {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-edit:hover {
    background-color: #e5e7eb !important;
}

/* --- Bouton suppression (Supprimer commentaire) --- */
.btn-delete {
    background-color: #ef4444 !important;
    color: white !important;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-delete:hover {
    background-color: #dc2626 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* --- Boutons montant (wallet) --- */
.btn-amount {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-amount:hover {
    border-color: #16a34a !important;
    color: #16a34a !important;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

/* --- Bouton recommandé pour vous --- */
.btn-recommended {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    text-transform: none !important;
}
.btn-recommended:hover {
    background-color: #ddd6fe !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* --- Bouton panier --- */
.btn-cart {
    background-color: #fef3c7 !important; /*D1FAE5*/
    color: #78350f !important; /*065F46*/
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
    text-transform: none !important;
}

.btn-cart:hover {
    background-color: #fef08a !important; /*A7F3D0*/
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* ============================
=== NAVBAR ===
============================ */

.app-navbar {
    background: linear-gradient(90deg, #34a853, #1e7d32);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Marque / logo */
.app-navbar .nav-brand {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: none !important;
}
.app-navbar .nav-brand:hover {
    opacity: 0.9;
}

/* Nom utilisateur */
.app-navbar .nav-username {
    color: white;
    font-weight: 600;
}

/* Boutons génériques */
.app-navbar .nav-btn {
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-transform: none !important;
}

/* Commandes en cours */
.app-navbar .nav-orders {
    background: #60a5fa;
    color: #1e3a8a;
    border: 1px solid #3b82f6;
    position: relative;
}

.app-navbar .nav-orders:hover {
    background: #3b82f6;
    color: white;
}

/* Wallet */
.app-navbar .nav-wallet {
    background: #256d3a;
    color: #ffffff;
    border: 1px solid #1b5e20;
}
.app-navbar .nav-wallet:hover {
    background: #2e7d32;
}

/* Panier */
.app-navbar .nav-cart {
    background: #facc15;
    color: #1f2937;
    border: 1px solid #eab308;
    position: relative;
}
.app-navbar .nav-cart:hover {
    background: #fbbf24;
}

/* Paramètres */
.app-navbar .nav-settings {
    background: #9ca3af;
    color: #111827;
    border: 1px solid #6b7280;
    position: relative;
}
.app-navbar .nav-settings:hover {
    background: #d1d5db;
}

/* Profil utilisateur */
.app-navbar .nav-profile {
    background: #3b82f6;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}
.app-navbar .nav-profile:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Logout */
.app-navbar .nav-danger {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #b91c1c;
}
.app-navbar .nav-danger:hover {
    background: #dc2626;
}

/* Badge du panier */
.app-navbar .nav-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.05rem 0.35rem;
    position: absolute;
    top: -6px;
    left: -6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Avatar */
.app-navbar .nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    object-fit: cover;
}

/* Admin buttons - styles */
.admin-action {
    border-radius: 14px;
    padding: 1rem 1.25rem; /* p-6 approx */
    font-weight: 600;
    font-size: 1.05rem;
    width: 100%;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        background-color 0.12s ease;
}

/* ensure color applies despite Quasar default styling */
.admin-action,
.admin-action .q-btn__content {
    background-color: transparent !important;
    color: inherit !important;
}

/* Blue */
.admin-action--blue {
    background-color: #2563eb !important; /* blue-600 */
    color: #ffffff !important;
    border-color: rgba(14, 41, 121, 0.12) !important;
}
.admin-action--blue:hover {
    background-color: #1e40af !important;
    transform: translateY(-3px);
}

/* Green */
.admin-action--green {
    background-color: #10b981 !important; /* green-500 */
    color: #ffffff !important;
    border-color: rgba(6, 95, 70, 0.08) !important;
}
.admin-action--green:hover {
    background-color: #059669 !important;
    transform: translateY(-3px);
}

/* Purple */
.admin-action--purple {
    background-color: #7c3aed !important; /* purple */
    color: #ffffff !important;
    border-color: rgba(66, 8, 131, 0.08) !important;
}
.admin-action--purple:hover {
    background-color: #6d28d9 !important;
    transform: translateY(-3px);
}

/* Gray */
.admin-action--gray {
    background-color: #374151 !important; /* gray-700 */
    color: #f9fafb !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
}
.admin-action--gray:hover {
    background-color: #4b5563 !important;
    transform: translateY(-3px);
}

/* Red */
.admin-action--red {
    background-color: #ef4444 !important; /* red-500 */
    color: #ffffff !important;
    border-color: rgba(153, 27, 27, 0.1) !important;
}
.admin-action--red:hover {
    background-color: #dc2626 !important;
    transform: translateY(-3px);
}

/* Yellow */
.admin-action--yellow {
    background-color: #facc15 !important; /* yellow-400 */
    color: #000000 !important; /* texte en noir pour contraste */
    border-color: rgba(133, 100, 4, 0.12) !important;
}
.admin-action--yellow:hover {
    background-color: #eab308 !important;
    transform: translateY(-3px);
}

/* Bouton "Retour à l'accueil" */
.btn-return-home {
    background-color: #1565c0 !important; /* Bleu principal */
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-return-home:hover {
    background-color: #1976d2 !important; /* Bleu un peu plus clair au hover */
    transform: translateY(-3px);
}

/* Bouton "Télécharger le reçu" */
.btn-download-receipt {
    background-color: #2e7d32 !important; /* Vert principal */
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-download-receipt:hover {
    background-color: #388e3c !important; /* Vert plus clair au hover */
    transform: translateY(-3px);
}

/* === Bouton principal "Réserver la commande" === */
.btn-claim-order {
    background-color: #1565c0 !important; /* Bleu principal */
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-claim-order:hover {
    background-color: #1976d2 !important; /* Bleu clair au hover */
    transform: translateY(-3px);
}

/* === Bouton "Voir les détails" ou "Ouvrir la commande" === */
.btn-view-details {
    background-color: #0288d1 !important; /* Bleu cyan */
    color: #ffffff !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-view-details:hover {
    background-color: #039be5 !important;
    transform: translateY(-2px);
}

/* === Bouton "Annuler la réservation" === */
.btn-cancel-order {
    background-color: #c62828 !important; /* Rouge foncé */
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-cancel-order:hover {
    background-color: #d32f2f !important; /* Rouge plus clair au hover */
    transform: translateY(-3px);
}

/* === Bouton "Confirmer la livraison" === */
.btn-confirm-delivery {
    background-color: #2e7d32 !important; /* Vert principal */
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-confirm-delivery:hover {
    background-color: #388e3c !important;
    transform: translateY(-3px);
}

/* === Bouton "Retour" ou "Précédent" === */
.btn-back {
    background-color: #9e9e9e !important; /* Gris neutre */
    color: #ffffff !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-back:hover {
    background-color: #b0b0b0 !important;
    transform: translateY(-2px);
}

/* === Bouton "🔄 Rafraîchir" === */
.btn-refresh {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
    text-transform: none !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    border: 1px solid #ddd !important;
    transition: all 0.2s ease-in-out;
}
.btn-refresh:hover {
    background-color: #bfdbfe !important;
    transform: translateY(-2px);
}

/* === Bouton "📦 Mes livraisons" === */
.btn-my-deliveries {
    position: relative; /* permet de positionner la bulle */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
    text-transform: none !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 18px !important;
    border: none !important;
    transition: all 0.2s ease-in-out;
}
.btn-my-deliveries:hover {
    background-color: #ddd6fe !important;
    transform: translateY(-3px);
}

.btn-my-deliveries .order-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ef4444; /* rouge tailwind-like */
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 9999px; /* cercle parfait */
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px white; /* petit contour blanc */
    transition: transform 0.15s ease;
}

.btn-my-deliveries:hover .order-badge {
    transform: scale(1.1);
}

/* ===========================
   === MOBILE PAGE SPACING ===
   =========================== */

/* Ensure all main page columns have bottom padding to not hide behind bottom nav on mobile */
@media (max-width: 768px) {
    /* Give the last main content column room above the bottom nav */
    body > .nicegui-content > .q-page > div,
    body > .nicegui-content > div {
        padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }

    /* Sticky back button: frosted glass effect */
    .sticky.top-0 {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        background: rgba(249, 250, 251, 0.88) !important;
    }

    /* Larger tap area for +/- cart buttons */
    .q-btn.q-btn--round {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    /* Login tab bar full width */
    .q-tabs {
        width: 100% !important;
    }

    /* Product detail image: stack on mobile */
    .main-product-card {
        grid-template-columns: 1fr !important;
    }

    /* Map itinerary card: full width */
    .absolute.top-16.right-4 {
        position: fixed !important;
        bottom: 80px !important;
        top: auto !important;
        right: 0.5rem !important;
        left: 0.5rem !important;
        width: auto !important;
    }
}

/* ===========================
   === GLOBAL UX POLISH ===
   =========================== */

/* Smooth page transitions */
.fade-in {
    animation: fadeIn 0.2s ease-out both;
}

/* Better focus rings for accessibility */
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid #34a853;
    outline-offset: 2px;
}

/* Prevent long pharmacy/product names from overflowing */
.product-name-clamp,
.q-item__label {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Skeleton loading shimmer for product cards */
.skeleton-text {
    height: 1em;
    border-radius: 4px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
