/* panier.css - Styles pour la page panier */

:root {
    --primary: #2b6cb0;
    --secondary: #3182ce;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --light: #f7fafc;
    --dark: #2d3748;
    --gray: #718096;
    --border: #e2e8f0;
}

/* Page Panier */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Conteneur Panier */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 1024px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

/* Articles du panier */
.cart-items {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 25px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.cart-item-category {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Contrôle quantité */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.quantity-control input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 120px;
    text-align: right;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Panier vide */
.empty-cart {
    text-align: center;
    padding: 60px 30px;
}

.empty-cart i {
    color: var(--border);
    margin-bottom: 20px;
}

.empty-cart h3 {
    color: var(--gray);
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--gray);
    margin-bottom: 30px;
}

/* Actions panier */
.cart-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 20px;
    flex-wrap: wrap;
}

.cart-actions button, .cart-actions a {
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-clear {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.btn-clear:hover {
    background: var(--danger);
    color: white;
}

.btn-export {
    background: rgba(49, 130, 206, 0.1);
    color: var(--secondary);
}

.btn-export:hover {
    background: var(--secondary);
    color: white;
}

.btn-continue {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
    margin-left: auto;
}

.btn-continue:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Récapitulatif */
.cart-summary {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 30px;
}

.cart-summary h3 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.summary-details {
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    padding-top: 20px;
    border-top: 2px solid var(--primary);
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-checkout {
    background: var(--success);
    color: white;
    padding: 16px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.shipping-info {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.shipping-info h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.shipping-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Suggestions */
.cart-suggestions {
    margin-top: 60px;
}

.cart-suggestions h3 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card h4 {
    padding: 15px 15px 5px 15px;
    margin: 0;
    color: var(--dark);
}

.price {
    padding: 0 15px;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.btn-add {
    margin: 15px;
    width: calc(100% - 30px);
    padding: 12px;
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modal Panier */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.cart-modal.active {
    display: block;
}

.cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.cart-modal-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
}

.close-modal:hover {
    color: var(--danger);
}

.cart-modal-items {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.cart-modal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.cart-modal-item:last-child {
    border-bottom: none;
}

.cart-modal-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-modal-item-info h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--dark);
}

.cart-modal-item-info p {
    margin: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.more-items {
    text-align: center;
    padding: 15px;
    color: var(--gray);
    font-style: italic;
    background: var(--light);
    border-radius: 8px;
    margin-top: 15px;
}

.cart-modal-total {
    padding: 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.total-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.cart-modal-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-view-cart {
    padding: 12px;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-cart:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 3000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .cart-modal-content {
        width: 100%;
    }
    
    .cart-actions {
        justify-content: center;
    }
    
    .btn-continue {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}