/*
 * Encart d'installation du Campus (resources/views/partials/pwa-install.blade.php, 20/11/2026).
 * Carte posée en bas de l'écran, au-dessus du bandeau d'avertissement s'il est affiché.
 * Couleurs : --pwa-accent (couleur du thème) et --pwa-accent-texte, posées sur l'encart par le gabarit.
 */
.pwa-install {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 440px;
    margin: 0 auto;
    padding: 16px 48px 16px 16px;
    background: #ffffff;
    color: #1f2329;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.18), 0 2px 6px rgba(17, 24, 39, 0.08);
    font-size: 15px;
    line-height: 1.45;
    animation: pwa-install-entree 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pwa-install[hidden],
.pwa-install [hidden] { display: none !important; }

body:has(> .site-notice:not([hidden])) .pwa-install {
    bottom: calc(var(--site-notice-h, 64px) + 12px);
}

.pwa-install__icone {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 11px;
}

.pwa-install__corps { min-width: 0; }

.pwa-install__titre {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

.pwa-install__texte { margin: 0; color: #4b5563; }

.pwa-install__bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--pwa-accent, #5e3fd7);
    color: var(--pwa-accent-texte, #ffffff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pwa-install__bouton:focus-visible,
.pwa-install__croix:focus-visible {
    outline: 3px solid var(--pwa-accent, #5e3fd7);
    outline-offset: 2px;
}

.pwa-install__etapes {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: pwa-etape;
}

.pwa-install__etapes li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    counter-increment: pwa-etape;
}

.pwa-install__etapes li::before {
    content: counter(pwa-etape);
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}

.pwa-install__glyphe {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: #0a84ff;
}

.pwa-install__note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.pwa-install__croix {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pwa-install__croix:hover { background: #f1f3f5; color: #1f2329; }

@keyframes pwa-install-entree {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pwa-install-fondu {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mouvement réduit : l'encart apparaît en fondu, sans glisser. */
@media (prefers-reduced-motion: reduce) {
    .pwa-install { animation-name: pwa-install-fondu; }
}
