/* Styles pour la sidebar avec arbre de fichiers */
.sidebar {
    width: 300px;
    background: #ffffff;
    border-right: 1px solid #d1d5db;
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-title i {
    color: #4b5563;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.sidebar-collapse-btn:hover {
    color: #374151;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Arbre de fichiers */
.file-tree {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.file-tree-loading {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.file-tree-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    position: relative;
}

.file-tree-item:hover {
    background: #f3f4f6;
}

.file-tree-item.active {
    background: #dbeafe;
    color: #1e40af;
}

.file-tree-item.active .file-tree-icon {
    color: #1e40af;
}

.file-tree-indent {
    width: 1.25rem;
    flex-shrink: 0;
}

.file-tree-toggle {
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.file-tree-toggle:hover {
    color: #374151;
}

.file-tree-toggle.expanded {
    transform: rotate(90deg);
}

.file-tree-toggle.empty {
    visibility: hidden;
}

.file-tree-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    color: #f59e0b;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-tree-item.active .file-tree-icon {
    color: #1e40af;
}

.file-tree-name {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-tree-item.active .file-tree-name {
    color: #1e40af;
    font-weight: 500;
}

.file-tree-children {
    display: none;
    margin-left: 0;
}

.file-tree-children.expanded {
    display: block;
}

/* Informations de connexion */
.sidebar-info {
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
    padding: 1rem;
    background: #f9fafb;
}

.sidebar-info-card {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.sidebar-info-item i {
    color: #6b7280;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.sidebar-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.sidebar-info-value {
    font-size: 0.75rem;
    color: #1f2937;
    font-weight: 600;
    word-break: break-all;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        transition: left 0.3s ease;
        z-index: 1000;
        height: 100vh;
        top: 70px;
    }
    
    .sidebar.open {
        left: 0;
    }
}
