body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: var(--font-sans);
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    inset: 0;
    z-index: 1;
}

/* Labels CSS2D des cubes */
.cube-label {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(10, 24, 40, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    text-shadow: 0 0 10px currentColor;
}

/* Header */
.header {
    position: absolute;
    top: 100px;
    left: 24px;
    text-align: left;
    z-index: 120;
    background: rgba(10, 24, 40, 0.42);
    backdrop-filter: blur(12px);
    padding: 11px 26px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.header h1 {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

/* DISCLAIMER */
.disclaimer {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(232, 233, 237, 0.8);
    font-size: 0.72rem;
    z-index: 110;
    pointer-events: none;
    text-align: center;
    letter-spacing: 0.4px;
    width: min(680px, 84vw);
    background: rgba(10, 24, 40, 0.36);
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 999px;
    padding: 8px 14px;
    backdrop-filter: blur(8px);
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.disclaimer i {
    color: rgba(212, 175, 55, 0.85);
    margin-right: 6px;
}

/* SIDEBAR DE NAVIGATION */
.nav-sidebar {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 120;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-icon {
    width: 48px;
    height: 48px;
    background: rgba(10, 24, 40, 0.62);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #D4AF37;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.nav-label {
    position: absolute;
    left: 40px;
    background: rgba(10, 24, 40, 0.9);
    padding: 9px 14px 9px 18px;
    border-radius: 0 14px 14px 0;
    color: #D4AF37;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.68rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    white-space: nowrap;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-left: none;
    z-index: 1;
    transform: translateX(-14px);
    letter-spacing: 0.8px;
}

.nav-item:hover .nav-icon {
    transform: translateX(2px) scale(1.06);
    background: rgba(212, 175, 55, 0.9);
    color: #0A1828;
    border-color: rgba(255, 255, 255, 0.85);
}

.nav-item:hover .nav-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.status-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: #2ecc71;
    border-radius: 50%;
    border: 2px solid #0A1828;
    box-shadow: 0 0 5px #2ecc71;
}

/* BOUTON RETOUR */
.back-btn {
    position: absolute;
    bottom: 24px;
    left: 24px;
    padding: 9px 14px;
    background: rgba(10, 24, 40, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.22);
    color: #A0A8B8;
    text-decoration: none;
    border-radius: 11px;
    font-size: 0.8rem;
    z-index: 120;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, opacity 0.25s ease, filter 0.25s ease;
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.18);
    color: #D4AF37;
    border-color: #D4AF37;
}

/* INFO PANEL */
.info-panel {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    text-align: right;
    z-index: 120;
    pointer-events: none;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.info-item {
    margin-bottom: 16px;
    opacity: 0.85;
}

.info-label {
    font-size: 0.64rem;
    color: #A0A8B8;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: 3px;
}

.info-value {
    font-size: 1.02rem;
    color: #D4AF37;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.22);
}

/* Focus 3D */
.focus-3d-toggle {
    position: absolute;
    top: 100px;
    right: 24px;
    z-index: 130;
    border: 1px solid rgba(212, 175, 55, 0.24);
    background: rgba(10, 24, 40, 0.6);
    color: #D4AF37;
    backdrop-filter: blur(8px);
    border-radius: 11px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: 'Orbitron', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.focus-3d-toggle:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.5);
}

body.homelab-focus .header,
body.homelab-focus .disclaimer,
body.homelab-focus .info-panel,
body.homelab-focus .nav-sidebar,
body.homelab-focus .back-btn {
    opacity: 0;
    filter: blur(3px);
    pointer-events: none;
}

body.homelab-focus .focus-3d-toggle {
    background: rgba(212, 175, 55, 0.22);
    border-color: rgba(212, 175, 55, 0.65);
}

@media (max-width: 768px) {
    .nav-sidebar {
        left: 50%;
        top: auto;
        bottom: 68px;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 14px;
    }

    .nav-label,
    .info-panel,
    .disclaimer {
        display: none;
    }

    .nav-icon {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
    }

    .back-btn {
        top: 90px;
        left: 14px;
        bottom: auto;
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .header {
        top: 90px;
        left: 14px;
        width: min(72vw, 300px);
        padding: 9px 14px;
    }

    .focus-3d-toggle {
        top: 90px;
        right: 14px;
        font-size: 0.7rem;
        padding: 8px 9px;
    }
}
