:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
}

body { 
    font-family: 'Roboto', sans-serif; 
    background: var(--bg-color); 
    color: #333; 
    margin: 0; 
    padding: 0; 
}

/* =========================================
   HEADER ET PANNEAU CLIENT
========================================= */
header { 
    background: var(--card-bg); 
    padding: 15px 30px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 20px; 
}

header img { 
    height: 60px; 
}

.header-center { 
    text-align: center; 
    flex: 1; 
}

.notice { 
    font-size: 13px; 
    color: #777; 
    margin-top: 5px; 
}

/* Panneau d'information du client connecté */
.client-info { 
    background: #e8f8f5; 
    border: 1px solid #27ae60; 
    padding: 12px; 
    border-radius: 8px; 
    font-size: 13px; 
    text-align: right; 
    min-width: 250px; 
}

.client-info strong { 
    color: #2c3e50; 
    font-size: 15px; 
    display: block; 
    margin-bottom: 5px;
}

.client-info .encours { 
    color: #e74c3c; 
    font-weight: bold; 
    margin-top: 6px; 
    font-size: 14px;
}

/* Bouton de déconnexion */
.btn-logout { 
    background-color: #e74c3c; 
    color: white; 
    border: none; 
    padding: 6px 12px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: bold; 
    margin-top: 10px; 
    width: 100%; 
    transition: background 0.2s; 
}

.btn-logout:hover { 
    background-color: #c0392b; 
}

/* =========================================
   FILTRES ET RECHERCHE
========================================= */
.filters-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    justify-content: center; 
    padding: 20px; 
    background: var(--card-bg); 
    margin-bottom: 20px; 
    border-bottom: 1px solid #eee; 
}

.filters-container input, .filters-container select, .btn-reset { 
    padding: 10px; 
    font-size: 14px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    outline: none; 
    min-width: 200px; 
}

.btn-reset { 
    background-color: #f1c40f; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    min-width: auto; 
}

/* =========================================
   GRILLE DE PRODUITS ET CARTES
========================================= */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
    padding: 0 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.card { 
    background: var(--card-bg); 
    border-radius: 10px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    transition: transform 0.2s ease; 
}

.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); 
}

.card img { 
    width: 100%; 
    height: 200px; 
    object-fit: contain; 
    margin-bottom: 15px; 
}

.promo-badge { 
    background: var(--secondary-color); 
    color: white; 
    font-weight: bold; 
    padding: 5px 10px; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    text-align: center; 
    font-size: 12px; 
    align-self: flex-start; 
}

.title { 
    font-size: 15px; 
    font-weight: bold; 
    margin-bottom: 10px; 
    line-height: 1.4; 
    color: var(--primary-color);
}

.info { 
    font-size: 13px; 
    margin: 4px 0; 
    color: #555; 
}

.info strong { 
    color: #222; 
}

.price-ht { 
    color: #2980b9; 
    font-weight: bold; 
}

.price-ttc { 
    background: #fff3cd; 
    color: #856404; 
    font-weight: bold; 
    padding: 6px; 
    border-radius: 5px; 
    display: inline-block; 
    margin-top: 5px; 
}

.remise { 
    color: var(--secondary-color); 
    font-weight: bold; 
}

/* Zone d'ajout au panier dans la carte */
.action-zone { 
    margin-top: auto; 
    padding-top: 15px; 
    display: flex; 
    gap: 10px; 
}

.action-zone input { 
    width: 60px; 
    padding: 8px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    text-align: center; 
}

.action-zone button { 
    flex: 1; 
    background: #27ae60; 
    color: white; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: background 0.2s; 
}

.action-zone button:hover { 
    background: #2ecc71; 
}

/* =========================================
   PAGINATION ET PIED DE PAGE
========================================= */
.pagination-controls { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    margin: 40px 0; 
}

.pagination-controls button { 
    padding: 10px 20px; 
    cursor: pointer; 
    border: 1px solid #ccc; 
    background: white; 
    border-radius: 5px; 
}

.pagination-controls button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

footer { 
    text-align: center; 
    font-size: 14px; 
    background: #e9ecef; 
    padding: 20px; 
    margin-top: 40px; 
}

/* =========================================
   SYSTÈME DE PANIER (BADGE ET MODAL)
========================================= */
.cart-badge { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    background: #27ae60; 
    color: white; 
    padding: 15px 25px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: bold; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    z-index: 1000; 
    transition: transform 0.3s; 
}

.cart-badge:hover { 
    transform: scale(1.1); 
}

.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
}

.modal-content { 
    background-color: white; 
    margin: 5% auto; 
    padding: 20px; 
    width: 90%; 
    max-width: 600px; 
    border-radius: 10px; 
    position: relative; 
}

.close { 
    position: absolute; 
    right: 20px; 
    top: 10px; 
    font-size: 28px; 
    cursor: pointer; 
}

#cartItemsList { 
    max-height: 300px; 
    overflow-y: auto; 
    margin: 20px 0; 
    border-top: 1px solid #eee; 
}

.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 0; 
    border-bottom: 1px solid #eee; 
}

.cart-total { 
    text-align: right; 
    font-size: 18px; 
    margin-bottom: 20px; 
}

.cart-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.btn-whatsapp { 
    background: #25D366; 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
}

.btn-email { 
    background: #3498db; 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
}

.btn-clear { 
    background: #e74c3c; 
    color: white; 
    border: none; 
    padding: 8px; 
    border-radius: 5px; 
    cursor: pointer; 
}

/* =========================================
   NOTIFICATIONS (TOAST)
========================================= */
.toast { 
    visibility: hidden; 
    min-width: 250px; 
    background-color: #333; 
    color: #fff; 
    text-align: center; 
    border-radius: 8px; 
    padding: 15px 20px; 
    position: fixed; 
    z-index: 3000; 
    left: 50%; 
    bottom: 30px; 
    transform: translateX(-50%); 
    font-size: 15px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    opacity: 0; 
    transition: opacity 0.3s, bottom 0.3s; 
}

.toast.show { 
    visibility: visible; 
    opacity: 1; 
    bottom: 80px; 
}

.toast.success { 
    background-color: #27ae60; 
}

.toast.warning { 
    background-color: #f39c12; 
}