﻿body {
    background: #0c0c0c;
    color: #d0d0d0;
    font-family: 'Consolas', monospace;
    margin: 0;
    display: flex; /* Active le mode colonnes */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Les colonnes latérales (Joueurs, Plugins, Backups) */
.sidebar {
    width: 300px;
    min-width: 300px; /* On force la largeur minimum */
    flex-shrink: 0;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    z-index: 5; /* On s'assure qu'il est au-dessus du fond */
}

    .sidebar.hidden {
        display: none !important; /* Méthode radicale : si c'est caché, ça n'existe plus */
    }

/* LA ZONE CENTRALE (Console + Chat + Editor) */
.main {
    flex: 1; /* OCCUPE 100% DE L'ESPACE RESTANT */
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative; /* Pour que l'éditeur reste dedans */
}

/* L'ÉDITEUR : Maintenant il reste DANS la zone main sans cacher les joueurs */
#editor-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 45px; /* Laisse la place pour la barre RCON */
    background: #050505;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

    #editor-container.hidden {
        display: none !important;
    }

/* TYPOGRAPHIE DYNAMIQUE (vw + clamp) */
#console, #chat, .list-item, .log-line {
    font-size: clamp(11px, 0.9vw, 16px); /* Plus fin pour le Ryzen */
    line-height: 1.3;
}

#console {
    flex: 2; /* 2/3 de la hauteur */
    overflow-y: auto;
    background: #000;
    padding: 10px;
    border-bottom: 2px solid #222;
}

#chat {
    flex: 1; /* 1/3 de la hauteur */
    overflow-y: auto;
    background: #050505;
    padding: 10px;
}

/* BARRE RCON */
.rcon-bar {
    height: 45px;
    background: #111;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px; /* Espace entre les boutons */
    border-top: 1px solid #333;
}

#rcon-input {
    flex: 1;
    background: #000;
    border: 1px solid #444;
    color: #4caf50;
    padding: 8px;
    outline: none;
}

/* ÉLÉMENTS DE LISTE */
.list-item {
    padding: 4px 8px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .list-item:hover {
        background: #2a2a2a;
    }

.header {
    height: 40px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border-bottom: 1px solid #333;
    color: #4caf50;
}
