/* Barre latérale et tous ses composants */
#noVNC_control_bar_anchor,
#noVNC_control_bar,
#noVNC_control_bar_handle,
#noVNC_control_bar_hint,
#noVNC_hint_anchor,
#noVNC_status,
#noVNC_bell,
#noVNC_connect_dlg {
    display: none !important;
}

/* Overlay "Connexion en cours" */
#noVNC_transition {
    display: none !important;
}

html, body {
    background: #ffffff !important;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* rfb.js crée le canvas sans id → on cible via le parent #noVNC_container.
   visibility:hidden cache le canvas sans créer de couche GPU,
   le JS fait canvas.style.visibility='visible' quand le contenu est prêt. */
#noVNC_container canvas {
    visibility: hidden;
}

#noVNC_container {
    background: #ffffff !important;
}

/* Bouton clavier flottant mobile */
#mobile_kb_btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    touch-action: manipulation;
}

/* Visible uniquement sur ecrans tactiles quand noVNC est connecte */
@media (hover: none) and (pointer: coarse) {
    html.noVNC_connected #mobile_kb_btn {
        display: flex;
    }
}

#mobile_kb_btn img {
    width: 100%;
    height: 100%;
    filter: invert(1) brightness(1.2);
    pointer-events: none;
}

/* ── Correction affichage mobile ─────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Supprime le scroll horizontal qui crée le décalage vers la droite */
    #noVNC_container,
    #noVNC_container > div {
        overflow: hidden !important;
    }
    /* Centre le canvas scalé (évite les marges noires haut/bas) */
    #noVNC_container > div {
        align-items: center !important;
        justify-content: center !important;
    }
    /* Supprime l'ovale blanc causé par border-bottom-right-radius sur mobile */
    #noVNC_container {
        border-bottom-right-radius: 0 !important;
    }
}
.noVNC_logo { display: none !important; }
