/* ===== VARIABLES ===== */
:root {
    --primary: #5D4037; /* Brun cacao */
    --secondary: #8D6E63; /* Brun clair */
    --accent: #D7CCC8; /* Beige */
    --light: #EFEBE9; /* Fond clair */
    --dark: #3E2723; /* Texte foncé */
    --highlight: #FFAB91; /* Orange doux */
    --success: #4CAF50; /* Vert */
    --danger: #F44336; /* Rouge */
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===== BASE STYLES ===== */
.cart-section {
    padding: 3rem 0;
    min-height: 70vh;
    background-color: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem;
}

h1 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h1 i {
    color: var(--highlight);
}

/* ===== PANIER VIDE ===== */
.empty-cart {
    text-align: center;
    padding: 4rem 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

.empty-cart p {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

/* ===== ARTICLES DU PANIER ===== */
.cart-items {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 1fr 1fr 50px;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
    position: relative;
}

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

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cart-item:hover .item-image img {
    transform: scale(1.05);
}

.item-details h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.item-weight {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.item-price {
    font-weight: 600;
    color: var(--primary);
}

/* ===== QUANTITE ===== */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--highlight);
    color: var(--white);
}

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

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* ===== SOUS-TOTAL ===== */
.item-subtotal {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

/* ===== BOUTON SUPPRIMER ===== */
.item-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.item-remove:hover {
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

/* ===== RECAPITULATIF ===== */
.cart-summary {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
}

.summary-total {
    font-size: 1.3rem;
    color: var(--dark);
    display: flex;
    gap: 1rem;
}

.total-amount {
    font-weight: 700;
    color: var(--primary);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--highlight);
    color: var(--dark);
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.3);
}

.btn-checkout {
    background: var(--primary);
    color: var(--white);
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

.btn-checkout:hover {
    background: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(62, 39, 35, 0.3);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-item {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== RESPONSIVE ===== */
/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .container {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas: 
            "image details"
            "quantity quantity"
            "subtotal remove";
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
    }
    
    .item-details h3 {
        font-size: 1rem;
    }
    
    .item-weight,
    .item-price {
        font-size: 0.85rem;
    }
}

/* Mobile - Formats plus petits */
@media (max-width: 768px) {
    .cart-section {
        padding: 1.5rem 0;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .empty-cart {
        padding: 2rem 1rem;
    }
    
    .empty-cart i {
        font-size: 3rem;
    }
    
    .empty-cart p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Petits smartphones (portrait) */
@media (max-width: 576px) {
    .container {
        padding: 1rem;
    }
    
    .cart-items {
        gap: 1rem;
    }
    
    .cart-item {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .item-image {
        width: 70px;
        height: 70px;
    }
    
    .item-quantity {
        gap: 0.3rem;
    }
    
    .quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .quantity {
        min-width: 25px;
    }
    
    .item-remove {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .cart-summary {
        padding: 1.5rem;
        align-items: stretch;
    }
    
    .summary-total {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    
    .btn-checkout {
        width: 100%;
        justify-content: center;
        padding: 0.9rem;
    }
}

/* Très petits écrans (<= 375px) */
@media (max-width: 375px) {
    h1 {
       
        font-size: 1.3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .empty-cart {
        padding: 1.5rem 0.5rem;
    }
    
    .empty-cart i {
        font-size: 2.5rem;
    }
    
    .empty-cart p {
        font-size: 0.9rem;
    }
    
    .cart-item {
        grid-template-columns: 60px 1fr;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
    }
    
    .item-details h3 {
        font-size: 0.9rem;
    }
    
    .item-weight,
    .item-price {
        font-size: 0.8rem;
    }
    
    .item-subtotal {
        font-size: 0.9rem;
    }
}   