.pwa-notice {
    position: fixed;
    z-index: 1090;
    left: 1rem;
    bottom: 1rem;
    width: min(440px, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    color: #ffffff;
    background: var(--ph-navy);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--ph-radius-lg);
    box-shadow: var(--ph-shadow-lg);
    font-size: 0.9rem;
}

.pwa-notice[hidden] { display: none; }
#pwa-push-toggle[hidden] { display: none !important; }
.pwa-notice p { margin: 0; }
.pwa-notice .btn-close { filter: invert(1); }
.pwa-notice.is-offline { border-left: 4px solid var(--ph-warning); }
.pwa-install { bottom: 5.25rem; }
.pwa-install .btn { flex: 0 0 auto; }

@media (max-width: 575.98px) {
    .pwa-notice {
        left: 0.5rem;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        width: calc(100vw - 1rem);
        padding: 0.75rem;
    }
    /* Le bandeau est ajouté en fin de body : dans le flux, il ne masque plus
       les boutons de connexion ou les actions placées au bas d’un écran mobile. */
    .pwa-install {
        position: static;
        width: calc(100% - 1rem);
        margin: 0.5rem auto calc(0.5rem + env(safe-area-inset-bottom));
    }
    .pwa-notice .pwa-install-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
    .pwa-notice:not([hidden]) { animation: pwa-notice-in 180ms ease-out; }
    @keyframes pwa-notice-in {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
