/* ========================================
   PWA INSTALL BANNER + IOS MODAL
   ======================================== */

/* Banner caché par défaut sur desktop */
.pwa-install-banner {
    display: none;
}

@media (max-width: 768px) {
    .pwa-install-banner {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        z-index: 9998;
        background: linear-gradient(135deg, #03173d 0%, #0EA5E9 100%);
        color: white;
        border-radius: 14px;
        padding: 10px 12px;
        box-shadow: 0 8px 24px rgba(3, 23, 61, 0.35);
        animation: pwa-slide-up 0.4s ease-out;
    }

    .pwa-install-banner-icon img {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: block;
    }

    .pwa-install-banner-text {
        flex: 1;
        min-width: 0;
    }

    .pwa-install-banner-title {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
    }

    .pwa-install-banner-subtitle {
        font-size: 11px;
        opacity: 0.9;
        line-height: 1.3;
        margin-top: 2px;
    }

    .pwa-install-banner-cta {
        background: #F59E0B;
        color: #03173d;
        border: none;
        font-weight: 700;
        font-size: 13px;
        padding: 9px 14px;
        border-radius: 10px;
        cursor: pointer;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .pwa-install-banner-cta:active {
        transform: scale(0.96);
    }

    .pwa-install-banner-close {
        background: rgba(255, 255, 255, 0.15);
        color: white;
        border: none;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }

    .pwa-install-banner-close:active {
        transform: scale(0.9);
    }

    @keyframes pwa-slide-up {
        from { transform: translateY(120%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
}

/* ========== iOS MODAL ========== */
.pwa-install-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    animation: pwa-fade-in 0.2s ease-out;
}

.pwa-install-modal {
    position: fixed;
    z-index: 10000;
    background: white;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: pwa-modal-pop 0.3s ease-out;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 420px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

.pwa-install-modal-header {
    padding: 18px 18px 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.pwa-install-modal-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.pwa-install-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #03173d;
    flex: 1;
}

.pwa-install-modal-close-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

.pwa-install-modal-body {
    padding: 18px;
    overflow-y: auto;
    flex: 1;
}

.pwa-install-modal-intro {
    margin: 0 0 18px 0;
    color: #444;
    font-size: 14px;
}

.pwa-install-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.pwa-install-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #03173d, #0EA5E9);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.pwa-install-step-content {
    flex: 1;
    font-size: 14px;
    color: #03173d;
    line-height: 1.4;
}

.pwa-install-step-content strong {
    display: block;
    margin-bottom: 6px;
}

.pwa-install-step-icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
}

.pwa-install-share-icon {
    color: #0EA5E9;
    font-size: 16px;
}

.pwa-install-add-icon {
    color: #0EA5E9;
    font-size: 16px;
}

.pwa-install-step-hint {
    color: #777;
    font-size: 12px;
    margin-top: 4px;
}

.pwa-install-modal-note {
    background: #fff8e1;
    border-left: 3px solid #F59E0B;
    padding: 10px 12px;
    border-radius: 6px;
    color: #5d4037;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 8px;
}

.pwa-install-modal-note i {
    color: #F59E0B;
    margin-right: 6px;
}

.pwa-install-modal-footer {
    padding: 12px 18px 18px 18px;
    border-top: 1px solid #f0f0f0;
}

.pwa-install-modal-ok-btn {
    width: 100%;
    background: linear-gradient(135deg, #03173d, #0EA5E9);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 15px;
    padding: 13px;
    border-radius: 10px;
    cursor: pointer;
}

.pwa-install-modal-ok-btn:active {
    transform: scale(0.98);
}

@keyframes pwa-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pwa-modal-pop {
    from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
