/* ===== PWA STYLES ===== */

/* Install Notification */
.pwa-install-notification {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid rgba(0, 180, 219, 0.2);
}

.pwa-install-notification.show {
    bottom: 30px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
}

.notification-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00B4DB, #2F55D4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    flex-shrink: 0;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.notification-text {
    flex: 1;
}

.notification-text h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0B1B35;
    margin-bottom: 5px;
}

.notification-text p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-install-now,
.btn-install-later {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-install-now {
    background: linear-gradient(135deg, #00B4DB, #2F55D4);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 180, 219, 0.3);
}

.btn-install-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 180, 219, 0.4);
}

.btn-install-later {
    background: transparent;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-install-later:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Success Message */
.pwa-success-message {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00B894, #00D2B4);
    color: #ffffff;
    padding: 20px 40px;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(0, 184, 148, 0.4);
    z-index: 10001;
    transition: top 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pwa-success-message.show {
    top: 30px;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 700;
}

.success-content i {
    font-size: 24px;
}

/* Install Button (Fixed) */
#pwa-install-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #00B4DB, #2F55D4);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 180, 219, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: buttonPulse 2s ease-in-out infinite;
}

#pwa-install-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 180, 219, 0.6);
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 180, 219, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 180, 219, 0.6);
    }
}

#pwa-install-btn i {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-install-notification {
        bottom: -250px;
    }
    
    .pwa-install-notification.show {
        bottom: 20px;
    }
    
    .notification-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .notification-actions {
        flex-direction: row;
        width: 100%;
    }
    
    .btn-install-now,
    .btn-install-later {
        flex: 1;
    }
    
    #pwa-install-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* iOS Standalone Mode Detection */
@media all and (display-mode: standalone) {
    /* Cacher le bouton d'installation si déjà installé */
    #pwa-install-btn,
    .pwa-install-notification {
        display: none !important;
    }
    
    /* Styles spécifiques pour le mode standalone */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Splash Screen Animation */
@media all and (display-mode: standalone) {
    .loader-wrapper {
        background: linear-gradient(135deg, #0B1B35 0%, #1E3D59 100%);
    }
}

