/* ═══════════════════════════════════════════════════════════════
   CHECKOUT PAGE - VERSION SIMPLIFIÉE & PERFORMANTE
   AlphaVault AI - Inspiré du Forex Converter Design
   ✅ Dégradés discrets + Glassmorphism léger + Performance optimale
   ═══════════════════════════════════════════════════════════════ */

:root {
    --checkout-primary: #3b82f6;
    --checkout-secondary: #8b5cf6;
    --checkout-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --checkout-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    --checkout-success: #10b981;
    --checkout-danger: #ef4444;
    --checkout-warning: #f59e0b;
    --checkout-bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-lg: 24px;
}

body.dark-mode {
    --glass-bg: rgba(15, 23, 42, 0.95);
    --glass-border: rgba(100, 116, 139, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   ✅ OPTIMISATIONS GLOBALES
   ═══════════════════════════════════════════════════════════════ */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT CONTAINER - FOND BLANC CASSÉ PROFESSIONNEL (SIMPLIFIÉ)
   ═══════════════════════════════════════════════════════════════ */
.checkout-page {
    min-height: 100vh;
    /* ✅ Fond fixe sans animation (performance) */
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ✅ Particules supprimées pour performance */

.checkout-container {
    max-width: 900px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 60px;
    position: relative;
    z-index: 1;
    margin: 20px auto;
    transition: var(--transition-smooth);
}

.checkout-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT HEADER
   ═══════════════════════════════════════════════════════════════ */
.checkout-header {
    text-align: center;
    margin-bottom: 50px;
}

.checkout-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.checkout-logo svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

.checkout-logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--checkout-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.2;
}

body.dark-mode .checkout-title {
    color: #f1f5f9;
}

.checkout-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

body.dark-mode .checkout-subtitle {
    color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════
   PLAN SELECTOR - DÉGRADÉS BLEU/VIOLET DISCRETS
   ═══════════════════════════════════════════════════════════════ */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.plan-option {
    /* ✅ Dégradé bleu/violet DISCRET en arrière-plan */
    background: var(--checkout-gradient-soft);
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

body.dark-mode .plan-option {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

/* ✅ Barre supérieure avec dégradé (effet subtil) */
.plan-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--checkout-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.plan-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.2);
    border-color: var(--checkout-primary);
}

.plan-option:hover::before {
    opacity: 1;
}

.plan-option.selected {
    border-color: var(--checkout-primary);
    /* ✅ Dégradé plus visible pour le plan sélectionné */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.3);
}

.plan-option.selected::before {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   PLAN BADGES - DÉGRADÉS SELON LE PLAN
   ═══════════════════════════════════════════════════════════════ */
.plan-badge {
    display: inline-block;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ✅ PLAN BASIC - Cyan/Bleu clair */
.plan-badge.basic {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

/* ✅ PLAN PRO - Orange/Rouge */
.plan-badge.pro {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* ✅ PLAN PLATINUM - Violet/Indigo */
.plan-badge.platinum {
    background: linear-gradient(135deg, #8B5CF6, #6366f1);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

body.dark-mode .plan-name {
    color: #f1f5f9;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 20px;
}

.plan-price .currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--checkout-primary);
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: 900;
    background: var(--checkout-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-price .period {
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
}

body.dark-mode .plan-features li {
    color: #cbd5e1;
}

.plan-features li i {
    color: var(--checkout-success);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION CODE PROMO
   ═══════════════════════════════════════════════════════════════ */
.promo-section {
    background: var(--checkout-gradient-soft);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 30px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
    transition: var(--transition-smooth);
}

body.dark-mode .promo-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.promo-section:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.promo-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark-mode .promo-title {
    color: #f1f5f9;
}

.promo-title i {
    color: var(--checkout-secondary);
    font-size: 1.3rem;
}

.promo-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.promo-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(203, 213, 225, 0.5);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
    outline: none;
}

body.dark-mode .promo-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(100, 116, 139, 0.5);
    color: #f1f5f9;
}

.promo-input:focus {
    border-color: var(--checkout-secondary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.promo-input::placeholder {
    text-transform: none;
    font-weight: 500;
}

.btn-apply-promo {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--checkout-secondary), #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-apply-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.btn-apply-promo:active {
    transform: translateY(0);
}

.btn-apply-promo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages de validation */
.promo-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #047857;
}

.promo-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.promo-message i {
    font-size: 1.1rem;
}

/* Code promo appliqué */
.promo-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
}

.promo-badge-success {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #047857;
}

.promo-badge-success i {
    font-size: 1.3rem;
}

.btn-remove-promo {
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.btn-remove-promo:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   RÉCAPITULATIF DES PRIX
   ═══════════════════════════════════════════════════════════════ */
.price-summary {
    background: var(--checkout-gradient-soft);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 30px;
    border: 2px solid rgba(59, 130, 246, 0.2);
}

body.dark-mode .price-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.3);
}

body.dark-mode .summary-row {
    border-bottom-color: rgba(100, 116, 139, 0.3);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
}

body.dark-mode .summary-label {
    color: #cbd5e1;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

body.dark-mode .summary-value {
    color: #f1f5f9;
}

.discount-row .summary-label {
    color: var(--checkout-success);
}

.discount-value {
    color: var(--checkout-success) !important;
    font-weight: 800;
}

.summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin: 16px 0;
}

.total-row {
    padding: 16px 0 0 0;
}

.summary-label-total {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
}

body.dark-mode .summary-label-total {
    color: #f1f5f9;
}

.summary-total-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.summary-original-price {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

.summary-value-total {
    font-size: 2rem;
    font-weight: 900;
    background: var(--checkout-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.free-access-badge {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #d97706;
}

.free-access-badge i {
    font-size: 1.5rem;
}

/* Badge pour accès trial 14 jours */
#trialAccessBadge {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    padding: 16px 24px;
    border-radius: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT FORM
   ═══════════════════════════════════════════════════════════════ */
.checkout-form {
    background: var(--checkout-gradient-soft);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
}

body.dark-mode .checkout-form {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.form-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.dark-mode .form-section-title {
    color: #f1f5f9;
}

.form-section-title i {
    color: var(--checkout-primary);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .form-label {
    color: #cbd5e1;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(203, 213, 225, 0.5);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
    outline: none;
    box-sizing: border-box;
}

body.dark-mode .form-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(100, 116, 139, 0.5);
    color: #f1f5f9;
}

.form-input:focus {
    border-color: var(--checkout-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

#card-element {
    padding: 16px 20px;
    border: 2px solid rgba(203, 213, 225, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

body.dark-mode #card-element {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(100, 116, 139, 0.5);
}

#card-element.StripeElement--focus {
    border-color: var(--checkout-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#card-errors {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#card-errors i {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON SUBMIT - VERSION OPTIMISÉE & STABLE
   ═══════════════════════════════════════════════════════════════ */
.btn-checkout-submit {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    background: var(--checkout-gradient);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-checkout-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-checkout-submit:hover:not(.loading):not(:disabled)::before {
    width: 400px;
    height: 400px;
}

.btn-checkout-submit:hover:not(.loading):not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.5);
}

.btn-checkout-submit:active:not(.loading):not(:disabled) {
    transform: translateY(-2px);
}

/* État loading */
.btn-checkout-submit.loading {
    cursor: wait;
    pointer-events: none;
    opacity: 0.8;
}

.btn-checkout-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Texte du bouton */
.btn-checkout-submit .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}

.btn-checkout-submit.loading .btn-text {
    opacity: 0;
}

/* Spinner */
.btn-checkout-submit .spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: spinnerRotate 1s linear infinite;
}

.btn-checkout-submit.loading .spinner {
    opacity: 1;
}

@keyframes spinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   TRUST SIGNALS
   ═══════════════════════════════════════════════════════════════ */
.trust-signals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 30px;
    padding: 24px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #059669;
}

.trust-item i {
    font-size: 1.3rem;
}

body.dark-mode .trust-signals {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .trust-item {
    color: #10b981;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITAIRES
   ═══════════════════════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .checkout-page {
        padding: 20px 10px;
    }
    
    .checkout-container {
        padding: 40px 24px;
        border-radius: var(--border-radius);
        margin: 10px auto;
    }

    .checkout-title {
        font-size: 2rem;
    }

    .checkout-subtitle {
        font-size: 1rem;
    }

    .plan-selector {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plan-option {
        padding: 24px 20px;
    }

    .plan-price .amount {
        font-size: 2.5rem;
    }

    .promo-section {
        padding: 24px 20px;
    }

    .promo-input-wrapper {
        flex-direction: column;
    }

    .btn-apply-promo {
        width: 100%;
        justify-content: center;
    }

    .price-summary {
        padding: 24px 20px;
    }

    .summary-value-total {
        font-size: 1.6rem;
    }

    .checkout-form {
        padding: 24px 16px;
    }

    .form-section-title {
        font-size: 1.1rem;
    }

    .btn-checkout-submit {
        font-size: 1.1rem;
        padding: 18px;
    }

    .trust-signals {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .trust-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 30px 16px;
    }

    .checkout-title {
        font-size: 1.6rem;
    }

    .checkout-logo-text {
        font-size: 1.4rem;
    }

    .plan-name {
        font-size: 1.3rem;
    }

    .plan-price .amount {
        font-size: 2rem;
    }

    .checkout-form {
        padding: 20px 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--checkout-primary);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   📱 APPLE PAY / GOOGLE PAY - VERSION ULTRA-COMPACTE
   ✅ Bouton réduit, sans contours, espacement parfait
   ═══════════════════════════════════════════════════════════════ */

.payment-request-container {
    display: none; /* Affiché via JS quand disponible */
    margin-bottom: 32px; /* ✅ Plus d'espace avant le séparateur */
    position: relative;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge "Fastest Way to Pay" discret */
.payment-request-container::before {
    /* content: '⚡ Fastest Way to Pay'; */
    display: block;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.3s forwards;
}

body.dark-mode .payment-request-container::before {
    color: #34d399;
}

#payment-request-button {
    /* ✅ AUCUN contour, aucune bordure, aucun padding */
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    
    /* ✅ Hauteur COMPACTE (44px = minimum iOS, parfait mobile) */
    min-height: 44px !important;
    max-height: 48px !important;
    height: 46px !important;
    
    border-radius: 8px;
    overflow: hidden;
    
    /* ✅ Transition douce pour interactions */
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
}

/* Animation au tap (feedback tactile) */
#payment-request-button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Forcer le bouton Stripe à ne pas avoir de contours */
#payment-request-button > div,
#payment-request-button button {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   SÉPARATEUR "OR PAY WITH CARD" - DESIGN ORIGINAL RESTAURÉ
   ✅ Badge avec fond dégradé + bordure (version originale)
   ═══════════════════════════════════════════════════════════════ */

.payment-divider {
    display: none; /* Affiché via JS */
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 32px 0 28px 0; /* ✅ Plus d'espace au-dessus (32px au lieu de 0) */
    animation: fadeIn 0.6s ease 0.2s both;
}

.divider-line {
    height: 2px; /* ✅ Version originale (pas 1px) */
    flex: 1;
    background: linear-gradient(to right, transparent, rgba(102, 126, 234, 0.3), transparent);
    border-radius: 2px;
}

body.dark-mode .divider-line {
    background: linear-gradient(to right, transparent, rgba(100, 116, 139, 0.4), transparent);
}

.divider-text {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 20px; /* ✅ Version originale */
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%); /* ✅ Dégradé original */
    border-radius: 20px; /* ✅ Version originale */
    border: 1px solid rgba(102, 126, 234, 0.2); /* ✅ Bordure originale */
    white-space: nowrap;
}

body.dark-mode .divider-text {
    color: #94a3b8;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(100, 116, 139, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   GROUPE "CARD DETAILS" - ESPACEMENT OPTIMISÉ
   ═══════════════════════════════════════════════════════════════ */

#cardDetailsGroup {
    margin-top: 24px; /* ✅ Espace confortable après le séparateur */
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .payment-request-container {
        margin-bottom: 28px;
    }
    
    #payment-request-button {
        min-height: 44px !important;
        max-height: 46px !important;
        height: 44px !important;
        border-radius: 6px;
    }
    
    .payment-request-container::before {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }
    
    .payment-divider {
        margin: 28px 0 24px 0;
        gap: 16px;
    }
    
    .divider-text {
        font-size: 0.75rem; /* ✅ Légèrement réduit sur mobile */
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .payment-request-container {
        margin-bottom: 24px;
    }
    
    #payment-request-button {
        min-height: 42px !important;
        max-height: 44px !important;
        height: 42px !important;
        border-radius: 6px;
    }
    
    .payment-request-container::before {
        font-size: 0.6rem;
        margin-bottom: 6px;
    }
    
    .payment-divider {
        margin: 24px 0 20px 0;
        gap: 12px;
    }
    
    .divider-text {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    
    .divider-line {
        height: 1.5px; /* ✅ Ligne légèrement plus fine sur très petit écran */
    }
    
    #cardDetailsGroup {
        margin-top: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FORCER LE STYLE STRIPE (au cas où)
   ═══════════════════════════════════════════════════════════════ */

#payment-request-button .ApplePayButton,
#payment-request-button .gpay-button {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .payment-request-container,
    #payment-request-button,
    .payment-request-container::before,
    .payment-divider {
        animation: none !important;
        transition: none !important;
    }
}

#payment-request-button:focus-visible {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px;
}