/**
 * KOAEE Modern Sidebar
 * Sidebar minimaliste 52px de large avec icônes
 */

/* ============================================
   SIDEBAR PRINCIPALE (52px)
   ============================================ */

.koaee-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 52px;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
}

/* Header avec logo et avatar */
.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: rgba(255, 255, 255, 0.7);
}

.logo-btn:hover {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 0.9);
}

.logo-btn svg {
    width: 24px;
    height: 24px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.5);
}

/* Bouton New Thread */
.new-thread-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.new-thread-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 6px;
}

.nav-item {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Cacher les labels texte dans la sidebar */
.nav-item span:not(.dot-badge) {
    display: none;
}

/* Spacer flexible */
.sidebar-spacer {
    flex: 1;
}

/* Bottom actions */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

/* Dot badge rouge pour Upgrade et Install */
.dot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #ff4444;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
}

.mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Icons SVG */
.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Responsive - sidebar collapse mobile */
@media (max-width: 768px) {
    .koaee-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .koaee-sidebar.open {
        transform: translateX(0);
    }
}
