/* CSS extrait de views/checkout.view.php */
/* Variables de couleur SAAS */
    :root {
        --primary-color: #3e9172;
        --primary-hover: #2f7259;
        --success-color: #10b981;
        --danger-color: #ef4444;
        --warning-color: #f59e0b;
        --text-dark: #1e293b;
        --text-muted: #64748b;
        --border-color: #e2e8f0;
        --bg-light: #f8fafc;
        --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    /* Container et layout */
    .checkout-container {
        font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
        background: var(--bg-light);
        min-height: 100vh;
        padding: 40px 0;
    }

    /* Layout 2 colonnes robuste (e-commerce SaaS) : paiement à gauche, récap sticky à droite. */
    .checkout-container .row.g-4 {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 1.6rem;
        align-items: start;
    }
    .checkout-container .row.g-4 > .col-lg-7,
    .checkout-container .row.g-4 > .col-lg-5 {
        max-width: 100%;
        width: 100%;
        padding: 0;
        flex: none;
    }
    @media (max-width: 991px) {
        .checkout-container .row.g-4 {
            grid-template-columns: 1fr;
        }
    }

    .checkout-card {
        background: white;
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        margin-bottom: 24px;
        overflow: hidden;
    }

    .checkout-card-header {
        padding: 20px 24px;
        border-bottom: 1px solid var(--border-color);
        background: white;
    }

    .checkout-card-header h5 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-dark);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .checkout-card-body {
        padding: 24px;
    }

    /* Badges et étapes */
    .checkout-steps {
        display: flex;
        gap: 12px;
        margin-bottom: 32px;
        justify-content: center;
    }

    .step-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: white;
        border-radius: 8px;
        border: 2px solid var(--border-color);
        font-size: 0.875rem;
        font-weight: 500;
    }

    .step-item.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    .step-item .step-number {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .step-item.active .step-number {
        background: white;
        color: var(--primary-color);
    }

    /* Adresses */
    .address-card {
        border: 2px solid var(--border-color);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 16px;
        transition: all 0.2s;
        cursor: pointer;
        position: relative;
        background: white;
    }

    .address-card:hover {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .address-card.selected {
        border-color: var(--primary-color);
        background: #eef2ff;
    }

    .address-radio {
        width: 20px;
        height: 20px;
        accent-color: var(--primary-color);
    }

    .address-title {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .address-content {
        color: var(--text-muted);
        font-size: 0.875rem;
        line-height: 1.6;
    }

    /* Bouton d'ajout d'adresse */
    .btn-add-address {
        border: 2px dashed var(--border-color);
        background: white;
        color: var(--primary-color);
        padding: 12px 20px;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .btn-add-address:hover {
        border-color: var(--primary-color);
        background: #eef2ff;
    }

    /* Méthodes de paiement */
    .payment-method {
        border: 2px solid var(--border-color);
        border-radius: 10px;
        padding: 16px 20px;
        margin-bottom: 12px;
        transition: all 0.2s;
        cursor: pointer;
        background: white;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .payment-method:hover {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-sm);
    }

    .payment-method.selected {
        border-color: var(--primary-color);
        background: #eef2ff;
    }

    .payment-radio {
        width: 20px;
        height: 20px;
        accent-color: var(--primary-color);
    }

    .payment-logo {
        width: 60px;
        height: auto;
        object-fit: contain;
    }

    .payment-info h6 {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    .payment-info p {
        margin: 4px 0 0;
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    /* Résumé de commande */
    .order-summary {
        position: sticky;
        top: 20px;
    }

    .product-item {
        display: flex;
        gap: 16px;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .product-item:last-child {
        border-bottom: none;
    }

    .product-image-wrapper {
        position: relative;
        flex-shrink: 0;
    }

    .product-image {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }

    .product-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: var(--primary-color);
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 600;
        box-shadow: var(--shadow-sm);
    }

    .product-details {
        flex: 1;
    }

    .product-name {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 4px;
        font-size: 0.9rem;
    }

    .product-attributes {
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-top: 4px;
    }

    .product-price {
        font-weight: 700;
        color: var(--text-dark);
        font-size: 1rem;
    }

    /* Totaux */
    .summary-line {
        display: flex;
        justify-content: space-between;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .summary-line.promo {
        background: #fef3c7;
        border-radius: 6px;
        margin: 8px 0;
    }

    .summary-line.shipping {
        background: #f0f9ff;
        border-radius: 6px;
        margin: 8px 0;
    }

    .summary-line.shipping.free {
        background: #ecfdf5;
        color: var(--success-color);
    }

    .summary-line.total {
        border-top: 2px solid var(--border-color);
        padding-top: 16px;
        margin-top: 8px;
        font-weight: 700;
        font-size: 1.125rem;
        color: var(--text-dark);
    }

    .old-price {
        text-decoration: line-through;
        color: var(--text-muted);
        font-size: 0.875rem;
    }

    /* Boutons */
    .btn-checkout {
        background: linear-gradient(135deg, #ff6b35, #e85520);
        color: white;
        padding: 16px 32px;
        border-radius: 12px;
        border: none;
        font-weight: 800;
        font-size: 1rem;
        width: 100%;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        box-shadow: 0 12px 26px -12px rgba(255,107,53,.6);
    }

    .btn-checkout:hover {
        background: var(--primary-hover);
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

    .btn-checkout:active {
        transform: translateY(0);
    }

    /* Badge sécurisé */
    .security-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        background: #ecfdf5;
        border-radius: 8px;
        margin-top: 16px;
        color: var(--success-color);
        font-size: 0.875rem;
        font-weight: 500;
    }

    .free-shipping-alert {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 12px 20px;
        border-radius: 8px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .shipping-progress {
        margin-bottom: 16px;
        padding: 0 20px;
    }

    .shipping-progress-text {
        font-size: 0.875rem;
        color: var(--text-muted);
        margin-bottom: 8px;
    }

    .progress-bar-container {
        height: 8px;
        background: var(--border-color);
        border-radius: 4px;
        overflow: hidden;
    }

    .progress-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--primary-color), var(--success-color));
        transition: width 0.3s ease;
        border-radius: 4px;
    }

    /* Style pour les champs de la modal */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-close:focus {
    box-shadow: none;
}

    /* Responsive */
    @media (max-width: 991px) {
        .order-summary {
            position: relative;
            top: 0;
        }

        .checkout-steps {
            flex-direction: column;
        }
    }
