/* ========== FIX PANIER VIDE MOBILE ========== */

/* Force le message panier vide à être responsive */
@media (max-width: 768px) {
    /* Reset complet de la table sur mobile */
    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
    }
    
    /* Force le message panier vide à être responsive avec marges */
    .empty-cart-cell,
    td.empty-cart-cell,
    .cart-table td.empty-cart-cell,
    .cart-table tbody tr td.empty-cart-cell {
        display: block !important;
        width: calc(100% - 20px) !important; /* Marges de 10px de chaque côté */
        max-width: 100% !important;
        text-align: center !important;
        padding: 35px 15px !important;
        font-size: 1rem !important;
        color: #666 !important;
        background: #f8f9fa !important;
        border-radius: 12px !important;
        border: 2px dashed #d4d4d4 !important;
        margin: 10px auto !important; /* Centre avec marges auto */
        box-sizing: border-box !important;
    }
    
    /* Override toute largeur forcée par dashboard.css */
    #panier .cart-table {
        min-width: 0 !important;
        table-layout: auto !important;
        width: 100% !important;
    }
    
    /* Supprime le wrapper de scroll */
    #panier .table-wrapper {
        overflow: visible !important;
        overflow-x: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }
    
    /* Force le conteneur parent avec padding réduit */
    #panier .cart-content {
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px !important; /* Padding réduit */
        box-sizing: border-box !important;
    }
    
    /* Reset complet du tableau */
    #panier table {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Style amélioré pour le contenu du message */
    .empty-cart-cell h3,
    .empty-cart-cell .empty-cart-title {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
        color: #333 !important;
    }
    
    .empty-cart-cell p,
    .empty-cart-cell .empty-cart-text {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        color: #666 !important;
        margin-bottom: 20px !important;
    }
    
    /* Bouton responsive */
    .empty-cart-cell a,
    .empty-cart-cell .empty-cart-action {
        display: inline-block !important;
        padding: 12px 24px !important;
        background: #2c5530 !important;
        color: white !important;
        border-radius: 25px !important;
        text-decoration: none !important;
        font-size: 0.95rem !important;
        transition: all 0.3s ease !important;
    }
}

/* Ultra petit écran - iPhone SE, etc. */
@media (max-width: 480px) {
    .empty-cart-cell,
    td.empty-cart-cell {
        padding: 25px 12px !important;
        font-size: 0.95rem !important;
        width: calc(100% - 16px) !important; /* Marges plus petites */
        margin: 8px auto !important;
    }
    
    #panier .cart-content {
        padding: 8px !important;
    }
    
    .empty-cart-cell h3 {
        font-size: 1.15rem !important;
    }
    
    .empty-cart-cell p {
        font-size: 0.85rem !important;
    }
    
    .empty-cart-cell a {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* Très petit écran - 360px et moins */
@media (max-width: 360px) {
    .empty-cart-cell,
    td.empty-cart-cell {
        padding: 20px 10px !important;
        width: calc(100% - 12px) !important;
        margin: 6px auto !important;
    }
    
    #panier .cart-content {
        padding: 6px !important;
    }
}
