/**
 * Listeo Paiement Préalable - Frontend CSS
 */

/* Section de paiement */
.lpp-payment-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.lpp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e40af;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #cbd5e1;
}

.lpp-section-title i {
    color: #16a34a;
    font-size: 20px;
}

/* Info paiement */
.lpp-payment-info {
    background: #dbeafe;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.lpp-payment-info p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
}

/* Wrapper de l'élément carte */
.lpp-card-element-wrapper {
    margin-bottom: 20px;
}

.lpp-card-element-wrapper label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Élément de carte Stripe */
.lpp-card-element {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.lpp-card-element:hover {
    border-color: #3b82f6;
}

.lpp-card-element.StripeElement--focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lpp-card-element.StripeElement--invalid {
    border-color: #ef4444;
}

/* Erreurs de carte */
.lpp-card-errors {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #fef2f2;
    border-radius: 6px;
    display: none;
}

.lpp-card-errors.lpp-error-visible {
    display: block;
    animation: lpp-shake 0.4s ease-in-out;
}

@keyframes lpp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Montant à payer */
.lpp-payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e40af;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.lpp-amount-label {
    font-size: 14px;
    font-weight: 500;
}

.lpp-amount-value {
    font-size: 22px;
    font-weight: 700;
}

/* Bouton de paiement */
.lpp-pay-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 30px !important;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px 0 rgba(22, 163, 74, 0.4);
    margin-top: 20px;
}

.lpp-pay-button:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(22, 163, 74, 0.5);
}

.lpp-pay-button:active {
    transform: translateY(0);
}

.lpp-pay-button.loading {
    background: #9ca3af !important;
    pointer-events: none;
    box-shadow: none;
}

.lpp-pay-button .loadingspinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: lpp-spin 0.8s ease-in-out infinite;
}

.lpp-pay-button.loading .loadingspinner {
    display: block;
}

@keyframes lpp-spin {
    to { transform: rotate(360deg); }
}

.lpp-pay-button .lpp-btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lpp-pay-button .lpp-btn-text i {
    font-size: 16px;
}

/* Message de succès */
.lpp-success-message {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #16a34a;
    color: #166534;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    animation: lpp-fadeIn 0.3s ease-in-out;
}

@keyframes lpp-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Masquer le bouton original de Listeo quand LPP est actif */
.lpp-payment-section ~ .booking-confirmation-btn,
.booking-confirmation-btn.lpp-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .lpp-payment-section {
        padding: 20px 15px;
    }
    
    .lpp-section-title {
        font-size: 16px;
    }
    
    .lpp-payment-amount {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .lpp-amount-value {
        font-size: 20px;
    }
    
    .lpp-pay-button {
        padding: 15px 20px !important;
        font-size: 16px !important;
    }
}

/* Mode sombre (si thème le supporte) */
@media (prefers-color-scheme: dark) {
    .lpp-payment-section {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #3b82f6;
    }
    
    .lpp-section-title {
        color: #93c5fd;
        border-bottom-color: #475569;
    }
    
    .lpp-payment-info {
        background: #1e3a5f;
    }
    
    .lpp-payment-info p {
        color: #93c5fd;
    }
    
    .lpp-card-element-wrapper label {
        color: #e2e8f0;
    }
    
    .lpp-card-element {
        background: #1e293b;
        border-color: #475569;
    }
}

/* Badge de sécurité */
.lpp-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #16a34a;
}

.lpp-security-badge img {
    height: 20px;
}

/* Icons de cartes acceptées */
.lpp-accepted-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    opacity: 0.7;
}

.lpp-accepted-cards img {
    height: 24px;
}

