:root {
    --primary-color: #2178d0;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
    line-height: 1.6;
}

/* ===== Header ===== */
.cart-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    text-align: center;
}

.cart-progress {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 20px auto 0;
    position: relative;
}

.cart-progress-step {
    text-align: center;
    position: relative;
    z-index: 2;
    background: var(--secondary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.cart-progress-step.active {
    background: var(--success-color);
}

.cart-progress-step::before {
    content: attr(data-title);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8rem;
}

.cart-progress-bar {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.cart-progress-bar-fill {
    height: 100%;
    background: var(--success-color);
    width: 33%;
    transition: width 0.3s;
}

/* ===== Layout principal ===== */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 992px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

/* ===== Articles du panier ===== */
.cart-items {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border-radius: var(--radius-sm);
    padding: 5px;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info h4 {
    margin: 0 0 5px;
    color: var(--primary-color);
}

.cart-item-info p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

.cart-item-info small {
    font-size: 12px;
    color: var(--text-light);
}

.cart-item-stock {
    font-size: 0.8rem;
    margin-top: 5px;
}

.in-stock {
    color: var(--success-color);
}

.low-stock {
    color: var(--warning-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.quantity-value {
    width: 40px;
    text-align: center;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.remove-item {
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
}

.remove-item:hover {
    color: var(--secondary-color);
}

.save-for-later {
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 5px;
}

/* ===== Récapitulatif de commande ===== */
.cart-summary {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    align-self: start;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 20px 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.checkout-btn:hover {
    background: #c0392b;
}

.trust-signals {
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.trust-signal-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.trust-signal-item:last-child {
    margin-bottom: 0;
}

.trust-signal-item i {
    color: var(--success-color);
    margin-right: 12px;
    font-size: 1.2rem;
}

/* ===== Recommandations ===== */
.cart-recommendations {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recommendations-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.recommendations-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.recommendation-card {
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    padding: 10px;
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.recommendation-image {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--light-color);
    margin-right: 15px;
}

.recommendation-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.recommendation-info {
    flex: 1;
}

.recommendation-info h5 {
    margin: 0 0 5px;
    font-size: 0.95rem;
}

.recommendation-price {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.add-recommendation {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

/* Bouton de retour à la boutique */
.back-to-shop {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-to-shop i {
    margin-right: 8px;
}

/* ===== Modal de paiement professionnel ===== */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    padding: 24px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.modal-header .modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    text-align: center;
    width: 100%;
}

.modal-body {
    padding: 32px;
    background: var(--light-color);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.payment-method {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.payment-method:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(33, 120, 208, 0.1);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: rgba(33, 120, 208, 0.03);
}

.payment-method .method-icon {
    width: 48px;
    height: 32px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method .method-icon img {
    max-width: 100%;
    max-height: 100%;
}

.payment-method .method-details h6 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}

.payment-method .method-details p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.payment-method .radio-input input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.payment-instructions {
    background: white;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
    display: none;
    border: 1px solid var(--border-color);
}

.payment-instructions h6 {
    margin-top: 0;
    font-size: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.payment-instructions h6 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.payment-instructions ol {
    padding-left: 20px;
    margin: 0;
}

.payment-instructions li {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.payment-instructions .qrcode-placeholder {
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

.modal-footer {
    padding: 20px 24px;
    background: white;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.modal-footer .btn-cancel {
    padding: 10px 24px;
    color: var(--text-color);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: 12px;
    transition: all 0.2s;
}

.modal-footer .btn-confirm {
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

.modal-footer .btn-confirm:hover {
    background: #1a61a6;
}

.modal-footer .btn-confirm:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        margin-top: 10px;
    }
    .recommendations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}