/* ===== STYLES APPLE PAY DIRECT OPTIMISÉS ===== */

/* Conteneur des boutons d'action */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

/* Bouton Apple Pay Principal */
.btn-apple-pay {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: white;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 24px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-apple-pay::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-apple-pay:hover::before {
    left: 100%;
}

.btn-apple-pay:hover {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

.btn-apple-pay:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.btn-apple-pay:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-apple-pay:disabled:hover {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    transform: none;
}

/* Icône Apple dans le bouton */
.btn-apple-pay .fab.fa-apple {
    font-size: 20px;
    margin-right: 2px;
}

/* Messages et infos Apple Pay */
.apple-pay-info {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    animation: slideInFromBottom 0.4s ease-out;
}

.apple-pay-info .fab.fa-apple {
    font-size: 18px;
    color: #000;
}

/* Animations spéciales pour Apple Pay */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* État de succès pour Apple Pay */
.btn-apple-pay.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    animation: pulse 0.6s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .action-buttons {
        margin: 20px 0;
    }
    
    .btn-apple-pay {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .apple-pay-info {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Adaptations pour les écrans Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn-apple-pay {
        border-width: 1px;
    }
}

/* Support du mode sombre */
@media (prefers-color-scheme: dark) {
    .apple-pay-info {
        background: linear-gradient(135deg, #2d3036, #393f4a);
        border-color: #495057;
        color: #f8f9fa;
    }
}

/* États de chargement pour Apple Pay */
.btn-apple-pay .fas.fa-spinner {
    animation: spin 1s linear infinite;
}

.btn-apple-pay .fas.fa-shield-alt {
    color: #28a745;
    animation: pulse 1.5s ease-in-out infinite;
}

.btn-apple-pay .fas.fa-credit-card {
    color: #007bff;
    animation: pulse 1s ease-in-out infinite;
}

.btn-apple-pay .fas.fa-check-circle {
    color: #28a745;
    animation: pulse 0.8s ease-in-out 2;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Notification système optimisée */
.notification {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.notification.apple-pay-notification {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: white;
}

.notification button:hover {
    background: rgba(255,255,255,0.15) !important;
    border-radius: 4px;
}

/* Amélioration des interactions tactiles */
@media (hover: none) and (pointer: coarse) {
    .btn-apple-pay {
        padding: 18px 24px;
        min-height: 60px;
        font-size: 17px;
    }
    
    .btn-apple-pay:active {
        background: linear-gradient(135deg, #333333, #4a4a4a);
    }
}

/* Animation pour l'apparition du bouton Apple Pay */
.btn-apple-pay[style*="display: block"] {
    animation: fadeInUp 0.6s ease-out;
}

/* Styles pour les états d'erreur Apple Pay */
.btn-apple-pay.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: shake 0.5s ease-in-out;
}

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

/* Optimisations pour Safari (navigateur principal pour Apple Pay) */
@supports (-webkit-touch-callout: none) {
    .btn-apple-pay {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .apple-pay-info {
        -webkit-backdrop-filter: blur(10px);
    }
}