

/* =====================================================================================
   🛒 PANIER FLOTTANT
===================================================================================== */



.floating-cart.open {
    right: 0;
}

/* --- Poignée du panier --- */
.cart-handle {
    position: absolute;
    left: -50px;
    top: 70%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 10px 0 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

.cart-handle:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

.floating-cart:not(.open) .cart-handle {
    animation: gentle-pulse 3s ease-in-out infinite;
}

.cart-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

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

/* --- Contenu du panier --- */
.cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 80vh;
}

.cart-header {
    background: linear-gradient(90deg, #000000, #c89116);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s;
}

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

/* --- Items du panier --- */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: #000000;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item.updating {
    opacity: 0.6;
    transform: scale(0.98);
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    color: #000000;
    font-weight: 500;
    font-size: 0.9rem;
}

/* --- Contrôles quantité --- */
.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quantity-btn.decrease {
    border-color: #dc3545;
    color: #dc3545;
}

.quantity-btn.decrease:hover {
    background: #dc3545;
    color: white;
}

.quantity-btn.processing {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
    animation: pulse 1s infinite;
}

.quantity-display {
    font-weight: bold;
    min-width: 25px;
    text-align: center;
    color: #495057;
}

.empty-cart {
    text-align: center;
    padding: 30px 15px;
    color: #6c757d;
}

/* =====================================================================================
   💰 CODES PROMO ET RÉDUCTIONS
===================================================================================== */

.discount-section {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 10px 0;
}

.discount-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.discount-info {
    flex: 1;
    min-width: 0;
}

.discount-code {
    font-weight: bold;
    color: #155724;
    font-size: 0.9rem;
}

.discount-amount {
    color: #28a745;
    font-weight: 600;
    font-size: 0.8rem;
}

.remove-discount-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.remove-discount-btn:hover {
    background: #c82333;
}

.discount-notice {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #0c5460;
}

/* =====================================================================================
   💳 TOTAUX ET FOOTER PANIER
===================================================================================== */

.cart-totals {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.total-line:last-child {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: bold;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    color: #2c3e50;
}

.discount-line {
    color: #28a745;
    font-weight: 600;
}

.cart-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
}

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

.cart-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-btn.primary {
    background: #1e7e34;
    color: #ffffff;
}

.cart-btn.primary:hover {
    background: #218838;
}

.cart-btn.secondary {
    background: #6c757d;
    color: white;
}

.cart-btn.secondary:hover {
    background: #5a6268;
}





