/* ========================================
   MASSROUFI - INSTALLATION DE L'APPLICATION (PWA)
======================================== */
.masroufi-pwa-overlay[hidden],
.masroufi-pwa-banner[hidden],
.masroufi-pwa-help[hidden],
.masroufi-pwa-overlay button[hidden],
.masroufi-pwa-card [hidden] { display: none !important; }

.masroufi-pwa-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #c7f747;
    color: #10120b;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.masroufi-pwa-help {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #25291f;
    color: #e4e7dc;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}

/* Fenêtre */
.masroufi-pwa-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.masroufi-pwa-popup {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 34px 26px 26px;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    background: linear-gradient(145deg, #20231b, #10110e);
    border: 1px solid #343a29;
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .45);
    animation: masroufiPwaAppear .3s ease both;
}

.masroufi-pwa-popup .masroufi-pwa-icon { margin: 0 auto 22px; }

@keyframes masroufiPwaAppear {
    from { opacity: 0; transform: translateY(15px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.masroufi-pwa-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2a2d24;
    color: #b7bcad;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.masroufi-pwa-popup h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 25px !important;
    line-height: 1.25;
    font-weight: 750;
}

.masroufi-pwa-popup p {
    margin: 0 0 22px;
    color: #aeb2a4;
    font-size: 14px;
    line-height: 1.7;
}

.masroufi-pwa-install,
.masroufi-pwa-card-install,
.masroufi-pwa-banner-install {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 18px;
    box-sizing: border-box;
    border: 0;
    border-radius: 11px;
    background: #c7f747;
    color: #10120b;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.masroufi-pwa-install { width: 100%; }

.masroufi-pwa-install:hover,
.masroufi-pwa-card-install:hover,
.masroufi-pwa-banner-install:hover {
    background: #d6ff69;
    transform: translateY(-1px);
}

.masroufi-pwa-later {
    display: inline-block;
    margin-top: 18px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: #b7bcad;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.masroufi-pwa-later:hover { color: #c7f747; }

/* Bandeau de l'accueil */
.masroufi-pwa-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 16px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(199, 247, 71, .35);
    border-radius: 18px;
    background: #171914;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    color: #fff;
    animation: masroufiPwaAppear .3s ease both;
}

.masroufi-pwa-banner .masroufi-pwa-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 21px;
}

.masroufi-pwa-banner p {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.masroufi-pwa-banner p strong { display: block; color: #fff; font-size: 14px; }
.masroufi-pwa-banner p span { color: #aeb2a4; }

.masroufi-pwa-banner-install {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 14px;
}

.masroufi-pwa-banner-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2a2d24;
    color: #b7bcad;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

/* Carte « Installer l'application » (Mon compte) */
.masroufi-pwa-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    max-width: 720px;
    margin: 30px auto;
    padding: 22px;
    border: 1px solid rgba(199, 247, 71, .3);
    border-radius: 18px;
    background: #111310;
    color: #f4f5ef;
}

.masroufi-pwa-card .masroufi-pwa-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 26px;
}

.masroufi-pwa-card-body { flex: 1; min-width: 0; }
.masroufi-pwa-card h3 { margin: 0 0 6px; color: #fff; font-size: 18px; }
.masroufi-pwa-card p { margin: 0 0 14px; color: #aeb2a4; font-size: 14px; line-height: 1.6; }
.masroufi-pwa-card-installed { color: #c7f747 !important; font-weight: 600; }

@media (max-width: 480px) {
    .masroufi-pwa-card { flex-direction: column; align-items: center; text-align: center; }
    .masroufi-pwa-card-install { width: 100%; }
    .masroufi-pwa-banner p span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .masroufi-pwa-popup,
    .masroufi-pwa-banner { animation: none; }
    .masroufi-pwa-install,
    .masroufi-pwa-card-install,
    .masroufi-pwa-banner-install { transition: none; }
}
