/* ===== SMART WALLET CSS - LAYOUT VERTICAL CORRIGÉ ===== */

/* Base styles */
.animate-slide-down {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Détection Wallet */
.wallet-detection-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: walletDetected 0.6s ease-out;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-expanded {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2) !important;
    border-color: #1976d2 !important;
}

@keyframes walletDetected {
    0% { opacity: 0; transform: scale(0.95); }
    50% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.wallet-detection-card .wallet-icon {
    font-size: 2.5rem;
    color: #1976d2;
}

.wallet-info h5 {
    margin-bottom: 0.25rem;
    color: #1565c0;
    font-weight: 600;
}

.wallet-balance {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0d47a1;
    margin-bottom: 0.25rem;
}

.wallet-status {
    color: #1976d2;
    font-style: italic;
}

.wallet-toggle {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1976d2;
}

/* ===== CONTRÔLES SMART WALLET ===== */
#smart-wallet-controls {
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9ff 100%);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
    border-top: 2px solid #e3f2fd;
}

#smart-wallet-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2196f3, #21cbf3, #2196f3);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.smart-controls-container {
    max-width: 600px;
    margin: 0 auto;
}

.smart-controls-header h5 {
    color: #1565c0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Boutons preset intelligents */
.preset-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.preset-smart-btn {
    position: relative;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.preset-smart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.preset-smart-btn:hover::before {
    left: 100%;
}

.preset-smart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.preset-smart-btn.active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.preset-smart-btn.recommended::after {
    content: '⭐';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

/* Slider intelligent avec feedback visuel */
.smart-slider-container {
    position: relative;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e3f2fd;
    box-shadow: inset 0 2px 4px rgba(33, 150, 243, 0.1);
}

.slider-header {
    margin-bottom: 1rem;
}

.amount-display .badge-lg {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2); }
    50% { box-shadow: 0 4px 16px rgba(33, 150, 243, 0.4); }
}

/* Slider personnalisé */
.smart-slider {
    position: relative;
    z-index: 2;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.slider-track-background {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    transform: translateY(-50%);
}

.slider-track-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 8px;
    background: linear-gradient(90deg, #2196f3, #21cbf3);
    border-radius: 4px;
    transform: translateY(-50%);
    transition: width 0.2s ease;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.smart-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 2px rgba(33, 150, 243, 0.3);
    transition: all 0.2s ease;
}

.smart-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 4px rgba(33, 150, 243, 0.4);
}

.smart-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 2px rgba(33, 150, 243, 0.3);
    transition: all 0.2s ease;
}

/* ===== BREAKDOWN SECTION - LAYOUT VERTICAL ===== */
.smart-breakdown-section {
    margin-top: 2rem;
}

.breakdown-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e3f2fd;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.08);
    position: relative;
    overflow: hidden;
}

.breakdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2196f3, #21cbf3, #4caf50);
}

.breakdown-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.breakdown-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.breakdown-row:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.breakdown-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breakdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.wallet-row .breakdown-icon {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.card-row .breakdown-icon {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.total-row .breakdown-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.breakdown-row:hover .breakdown-icon {
    transform: scale(1.1) rotate(5deg);
}

.breakdown-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.95rem;
}

.breakdown-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    min-width: 70px;
    text-align: right;
}

.wallet-row .breakdown-amount {
    color: #17a2b8;
}

.card-row .breakdown-amount {
    color: #007bff;
}

.breakdown-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.breakdown-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e3f2fd;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: -0.5rem;
    padding: 1rem;
}

.total-amount {
    font-size: 1.3rem !important;
    color: #28a745 !important;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

/* Indicateur de mode sélectionné */
.selected-mode-indicator {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.selected-mode-indicator .alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.selected-mode-indicator .alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    background-size: 200% 100%;
    animation: progress-flow 3s ease-in-out infinite;
}

@keyframes progress-flow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== CARTES DE MÉTHODES DE PAIEMENT ===== */
.payment-method-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.payment-method-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.1);
    transform: translateY(-2px);
}

.payment-option {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.payment-option.selected,
.payment-method-card.active .payment-option {
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.payment-method-card.active {
    border-color: #28a745;
    box-shadow: 0 4px 20px rgba(40,167,69,0.2);
}

.method-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.card-icon {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.method-details {
    flex: 1;
}

.method-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.method-description {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.payment-breakdown {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #495057;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.method-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.amount-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

.selection-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    animation: checkIn 0.3s ease-in-out;
}

.payment-method-card.active .selection-indicator,
.payment-option.selected .selection-indicator {
    display: flex;
}

@keyframes checkIn {
    0% { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wallet-detection-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .wallet-toggle {
        margin-left: 0;
    }
    
    .preset-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preset-smart-btn {
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .breakdown-row {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .breakdown-left {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .breakdown-amount {
        text-align: center;
        min-width: auto;
    }
    
    .smart-slider-container {
        padding: 1rem;
    }
    
    .slider-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .payment-option {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .method-details {
        order: 2;
    }
    
    .method-amount {
        order: 3;
        align-items: center;
    }
}

@media (max-width: 576px) {
    #smart-wallet-controls {
        padding: 1.5rem;
    }
    
    .smart-controls-container {
        max-width: 100%;
    }
    
    .breakdown-card {
        padding: 1rem;
    }
    
    .breakdown-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .breakdown-amount {
        font-size: 1rem;
    }
    
    .total-amount {
        font-size: 1.2rem !important;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Effets de performance */
.smart-slider,
.breakdown-amount,
.preset-smart-btn {
    will-change: transform, opacity;
}

/* ===== BOUTON DE VALIDATION ===== */
.payment-validation-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn-payment-validate {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 12px;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40,167,69,0.25);
    width: 100%;
    max-width: 500px;
    min-height: 70px;
    display: inline-block;
}

.btn-payment-validate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.35);
    color: white;
}

.btn-payment-validate:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
    color: white;
}

.btn-payment-validate:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-payment-validate:disabled:hover {
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
    justify-content: center;
}

.btn-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.btn-text {
    flex: 1;
    text-align: center;
}

.btn-main-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.btn-sub-text {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.2rem;
    line-height: 1.2;
}

.btn-amount {
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Indicateurs de sécurité */
.security-indicators {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.security-badge:hover {
    background: #e9ecef;
    color: #495057;
}

.security-badge i {
    color: #28a745;
    font-size: 0.9rem;
}

/* Responsive pour le bouton */
@media (max-width: 768px) {
    .btn-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .btn-text {
        text-align: center;
    }
    
    .security-indicators {
        gap: 0.5rem;
    }
    
    .security-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .btn-payment-validate {
        max-width: 100%;
        min-height: 80px;
    }
    
    .btn-main-text {
        font-size: 0.9rem;
    }
    
    .btn-sub-text {
        font-size: 0.8rem;
    }
    
    .btn-amount {
        font-size: 1rem;
    }
}

/* Styles pour le paiement hybride */
.step-card {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.step-card.completed {
    background: #f8f9fa;
    border: 2px solid #28a745;
}

.step-card.active {
    background: #e3f2fd;
    border: 2px solid #007bff;
}

#hybrid-processing-indicator {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#monetico-transition-overlay .progress {
    height: 10px;
}

#monetico-transition-overlay .progress-bar {
    transition: width 1.5s ease-in-out;
}



.wallet-simple-container {
    max-width: 100%;
}

.wallet-presets {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.wallet-presets .preset-btn.active {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
    color: white;
}

.wallet-custom-input .input-group {
    max-width: 200px;
}

.wallet-breakdown {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

#wallet-config-section {
    animation: slideDown 0.3s ease-out;
}

.card-amount-updated {
    border-color: #4299e1 !important;
    background: linear-gradient(135deg, #ebf8ff 0%, #f7fafc 100%) !important;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.1) !important;
}

.card-amount-updated .amount-value {
    color: #4299e1 !important;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* ===== OPTIMISATION DE L'INTERFACE DE PAIEMENT ===== */

/* Container principal de l'étape paiement */
#step-payment-method .col-12 {
    max-width: 800px; /* Limiter la largeur maximale */
    margin: 0 auto; /* Centrer le contenu */
}

/* Section Smart Wallet optimisée */
.wallet-simple-container {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

/* Carte de détection wallet plus compacte */
.wallet-detection-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    margin-bottom: 1rem;
}

/* Configuration wallet plus compacte */
#wallet-config-section {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.wallet-presets {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.wallet-presets .preset-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
    min-width: 80px;
}

/* Carte bancaire par défaut optimisée */
#default-payment-card {
    max-width: 600px;
    margin: 0 auto;
}

.payment-method-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.payment-method-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 16px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.payment-method-card.active {
    border-color: #28a745;
    box-shadow: 0 4px 20px rgba(40,167,69,0.2);
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.payment-option {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.method-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.method-details {
    flex: 1;
    min-width: 0; /* Permet la compression du texte */
}

.method-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.method-description {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.payment-breakdown {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #495057;
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.method-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 100px;
}

.amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.selection-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    animation: checkIn 0.3s ease-in-out;
}

.payment-method-card.active .selection-indicator,
.payment-option.selected .selection-indicator {
    display: flex;
}

/* Résumé de paiement plus compact */
#payment-summary-bar {
    max-width: 600px;
    margin: 1.5rem auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

#payment-summary-bar .row {
    align-items: center;
    text-align: center;
}

.summary-amount {
    font-size: 1.2rem !important;
    font-weight: 700;
    line-height: 1;
}

.summary-label {
    font-size: 0.8rem !important;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Informations contextuelles */
#payment-context-info {
    max-width: 600px;
    margin: 1rem auto;
}

.context-info .info-card {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-icon {
    color: #0c5460;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content {
    color: #0c5460;
    font-size: 0.9rem;
    margin: 0;
}

/* Bouton de validation optimisé */
.payment-validation-section {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-payment-validate {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 12px;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40,167,69,0.25);
    width: 100%;
    max-width: 500px;
    min-height: 65px;
    display: inline-block;
}

.btn-payment-validate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.35);
    color: white;
}

.btn-payment-validate:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
    justify-content: center;
}

.btn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.btn-text {
    flex: 1;
    text-align: center;
}

.btn-main-text {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.btn-sub-text {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.2rem;
    line-height: 1.2;
}

.btn-amount {
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Indicateurs de sécurité plus compacts */
.security-indicators {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.4rem 0.6rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.security-badge:hover {
    background: #e9ecef;
    color: #495057;
}

.security-badge i {
    color: #28a745;
    font-size: 0.8rem;
}

/* Responsive optimisé */
@media (max-width: 768px) {
    #step-payment-method .col-12 {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .wallet-simple-container,
    #default-payment-card,
    #payment-summary-bar,
    #payment-context-info,
    .payment-validation-section {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .wallet-detection-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .wallet-toggle {
        margin-left: 0;
    }
    
    .payment-option {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .method-details {
        order: 2;
    }
    
    .method-amount {
        order: 3;
        align-items: center;
        min-width: auto;
    }
    
    .wallet-presets {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preset-btn {
        margin-bottom: 0.5rem;
    }
    
    #payment-summary-bar .col-1 {
        display: none;
    }
    
    #payment-summary-bar .col-3,
    #payment-summary-bar .col-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .wallet-simple-container,
    #wallet-config-section,
    .payment-method-card {
        padding: 1rem;
    }
    
    .btn-payment-validate {
        min-height: 70px;
    }
    
    .btn-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .security-indicators {
        gap: 0.5rem;
    }
    
    .security-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Animations et transitions */
@keyframes checkIn {
    0% { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.payment-method-card,
.wallet-detection-card,
#payment-summary-bar {
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Améliorations visuelles */
.payment-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.payment-method-card:hover::before {
    transform: translateX(100%);
}

.payment-method-card.active::before {
    background: linear-gradient(90deg, transparent, rgba(40,167,69,0.5), transparent);
}

/* Badge complément pour montant carte */
.complement-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    background: #17a2b8;
    color: white;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: scale(0.5); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* ===== ASSOCIATION VISUELLE PAIEMENT HYBRIDE ===== */

/* État hybride : Carte bancaire associée visuellement */
.payment-method-card.hybrid-complement {
    border: 2px solid #17a2b8;
    background: linear-gradient(135deg, #e1f7fa 0%, #f0fdff 100%);
    position: relative;
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.15);
}

.payment-method-card.hybrid-complement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #17a2b8, #20c997, #17a2b8);
    background-size: 200% 100%;
    animation: hybridFlow 2s ease-in-out infinite;
}

@keyframes hybridFlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Badge complément hybride */
.hybrid-complement-badge {
    position: absolute;
    top: -12px;
    right: 12px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
    animation: slideInDown 0.4s ease-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes slideInDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Connecteur visuel entre wallet et carte */
.hybrid-connector {
    position: relative;
    margin: 1rem 0;
    text-align: center;
}

.hybrid-connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, #17a2b8, #007bff);
    transform: translateY(-50%);
    z-index: 1;
}

.hybrid-connector-icon {
    position: relative;
    display: inline-block;
    background: white;
    border: 2px solid #17a2b8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 36px;
    font-size: 1.2rem;
    color: #17a2b8;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.4); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 6px rgba(23, 162, 184, 0.1); 
    }
}

/* Modification de l'affichage du montant carte en mode hybride */
.payment-method-card.hybrid-complement .amount-value {
    color: #17a2b8;
    position: relative;
    animation: amountUpdate 0.5s ease-out;
}

@keyframes amountUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #20c997; }
    100% { transform: scale(1); }
}

/* Indicateur de répartition hybride */
.hybrid-split-indicator {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.split-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

.split-wallet {
    background: #e1f7fa;
    color: #17a2b8;
}

.split-card {
    background: #e3f2fd;
    color: #007bff;
}

/* Flèche de connexion entre wallet et carte */
.payment-flow-arrow {
    text-align: center;
    margin: 0.5rem 0;
    color: #17a2b8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Mise à jour du wallet en mode hybride actif */
.wallet-detection-card.hybrid-active {
    border-color: #20c997;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff4 100%);
    box-shadow: 0 4px 16px rgba(32, 201, 151, 0.15);
}

.wallet-detection-card.hybrid-active .wallet-icon {
    color: #20c997;
    animation: walletActive 2s ease-in-out infinite;
}

@keyframes walletActive {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Badge montant wallet utilisé */
.wallet-amount-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #20c997;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: fadeInScale 0.3s ease-out;
}

/* Section de résumé hybride améliorée */
#payment-summary-bar.hybrid-mode {
    background: linear-gradient(135deg, #f8fff9 0%, #e1f7fa 100%);
    border: 2px solid #20c997;
    box-shadow: 0 4px 16px rgba(32, 201, 151, 0.15);
}

#payment-summary-bar.hybrid-mode #summary-wallet-amount {
    color: #20c997;
    text-shadow: 0 1px 2px rgba(32, 201, 151, 0.1);
}

#payment-summary-bar.hybrid-mode #summary-card-amount {
    color: #17a2b8;
    text-shadow: 0 1px 2px rgba(23, 162, 184, 0.1);
}

/* Animation de transition vers mode hybride */
.transitioning-to-hybrid {
    animation: transitionHybrid 0.6s ease-out forwards;
}

@keyframes transitionHybrid {
    0% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.02);
        filter: brightness(1.05);
    }
    100% { 
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Responsive pour mode hybride */
@media (max-width: 768px) {
    .hybrid-connector::before {
        left: 10%;
        right: 10%;
    }
    
    .hybrid-connector-icon {
        width: 36px;
        height: 36px;
        line-height: 32px;
        font-size: 1rem;
    }
    
    .hybrid-split-indicator {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .split-item {
        justify-content: center;
        min-width: 120px;
    }
    
    .hybrid-complement-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        top: -8px;
        right: 8px;
    }
}

/* États de focus améliorés pour l'accessibilité */
.payment-method-card.hybrid-complement:focus-within,
.wallet-detection-card.hybrid-active:focus-within {
    outline: 2px solid #20c997;
    outline-offset: 2px;
}

/* Animation d'entrée pour les éléments hybrides */
.hybrid-element-enter {
    animation: hybridElementEnter 0.5s ease-out forwards;
}

@keyframes hybridElementEnter {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Effet de glow subtil pour les montants hybrides */
.hybrid-glow {
    position: relative;
}

.hybrid-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #20c997, #17a2b8);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Quand la carte est en mode complément */
.payment-method-card.hybrid-complement {
    border-left: 4px solid #17a2b8;
}

/* Badge "Complément" plus visible */
.hybrid-complement-badge {
    background: #17a2b8;
    color: white;
    font-weight: bold;
}