/* iManage — version-watcher (bannière "Nouvelle version disponible") */

.vw-banner {
    position: fixed;
    /* 60px = clearance pour ne pas chevaucher le footer fixe en bas de page */
    bottom: 60px;
    right: 20px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 16px;
    background: var(--paper, #fff);
    color: var(--text-primary, #0f172a);
    border: 1px solid var(--line, #e2e8f0);
    border-left: 4px solid var(--accent, #1fb4c5);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.15);
    font-size: 13.5px;
    /* État initial : caché (translateY pour slide-in) */
    transform: translateY(80px);
    opacity: 0;
    transition: transform .25s ease-out, opacity .25s ease-out;
    max-width: calc(100vw - 40px);
}
.vw-banner.vw-visible {
    transform: translateY(0);
    opacity: 1;
}
.vw-banner.vw-hiding {
    transform: translateY(80px);
    opacity: 0;
}

.vw-icon {
    color: var(--accent, #1fb4c5);
    font-size: 18px;
    flex-shrink: 0;
}

.vw-text {
    font-weight: 500;
    flex: 1 1 auto;
    white-space: nowrap;
}

.vw-reload {
    border: 0;
    background: var(--accent, #1fb4c5);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.vw-reload:hover {
    background: var(--accent-strong, #0d9bb2);
}

.vw-dismiss {
    border: 0;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.vw-dismiss:hover {
    background: var(--bg-primary, #f8fafc);
    color: var(--text-primary, #0f172a);
}

/* Mobile : bannière full-width en bas, plus compact */
@media (max-width: 575.98px) {
    .vw-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 10px 12px;
        gap: 8px;
        font-size: 13px;
        border-radius: 10px;
    }
    .vw-text { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════════
   Mode FORCE_RELOAD : bannière modale centrée + backdrop bloquant.
   Empêche toute interaction avec l'app tant que l'utilisateur n'a pas
   cliqué Recharger. Évite les incohérences front-old / back-new.
   ═══════════════════════════════════════════════════════════════ */
.vw-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s ease-out;
}
.vw-backdrop.vw-visible {
    opacity: 1;
}

.vw-banner.vw-modal {
    /* Centré à l'écran, plus visible qu'une bannière simple */
    bottom: auto;
    right: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 80px));   /* offset initial pour anim */
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-left-width: 0;
    border-top: 4px solid var(--accent, #1fb4c5);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
    max-width: 460px;
}
.vw-banner.vw-modal.vw-visible {
    transform: translate(-50%, -50%);
}
.vw-banner.vw-modal .vw-icon {
    font-size: 28px;
}
.vw-banner.vw-modal .vw-text {
    white-space: normal;
    display: flex;
    flex-direction: column;
}
.vw-banner.vw-modal .vw-sub {
    font-size: 12.5px;
    color: var(--text-muted, #64748b);
    font-weight: 400;
    margin-top: 2px;
}
.vw-banner.vw-modal .vw-reload {
    padding: 9px 18px;
    font-size: 13.5px;
}

@media (max-width: 575.98px) {
    .vw-banner.vw-modal {
        left: 12px;
        right: 12px;
        max-width: none;
        transform: translate(0, calc(-50% + 80px));
        padding: 16px 18px;
    }
    .vw-banner.vw-modal.vw-visible {
        transform: translate(0, -50%);
    }
}
