/* --- Variables de Thème (Dracula / Dark Modern Vibe) --- */
:root {
    --bg-app: #1e1e1e;
    --bg-sidebar: #252526;
    --bg-editor: #1f1f1f;
    --bg-terminal: #1e1e1e;
    --border-color: #3e3e42;
    
    /* Syntax Highlighting style VS Code */
    --text-primary: #d4d4d4;
    --text-comment: #6a9955;
    --text-string: #ce9178;
    --text-keyword: #569cd6;
    --text-function: #dcdcaa;
    --text-number: #b5cea8;
    --text-class: #4ec9b0;
    
    --accent-blue: #007acc;
    --selection-bg: #264f78;
}

/* Reset sans prise de tête */
* { margin: 0; padding: 0; box-sizing: border-box; }

::selection { background: var(--selection-bg); }

body {
    font-family: 'Fira Code', monospace; /* La seule vraie police pour coder */
    height: 100vh;
    background-color: var(--bg-app);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- SCROLLBARS (Psk celles par défaut sont moches) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: #424242; }
::-webkit-scrollbar-thumb:hover { background: #4f4f4f; }

.main-container {
    display: flex;
    flex: 1;
    height: 70vh; 
}

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 13px;
}

.sidebar-header {
    padding: 10px 20px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #bbbbbb;
    letter-spacing: 1px;
}

.file-item {
    padding: 5px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: background 0.1s;
    border-left: 2px solid transparent;
}

.file-item:hover { background: #2a2d2e; }
.file-item.active { background: #37373d; border-left-color: var(--accent-blue); }

.mini-profile-pic {
    width: 30px; height: 30px; border-radius: 5px; cursor: pointer; opacity: 0.8; margin: 10px 20px;
}

/* --- EDITOR AREA --- */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-editor);
}

.filename-bar {
    background: var(--bg-app);
    font-size: 0.85rem;
    display: flex;
}

.tab {
    background: var(--bg-editor);
    padding: 10px 15px;
    border-top: 1px solid var(--accent-blue);
    display: flex; gap: 8px; align-items: center;
    color: white;
}
.close-tab { margin-left: 10px; font-size: 0.8rem; cursor: pointer; visibility: hidden; }
.tab:hover .close-tab { visibility: visible; }

.code-container {
    flex: 1;
    padding: 20px 40px;
    overflow-y: auto;
    line-height: 1.5;
    font-size: 14px;
    white-space: pre-wrap; 
}

/* --- README STYLES --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.profile-pic {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-keyword);
}

.profile-info h1 { font-size: 1.8rem; color: #fff; font-weight: 400; }

/* --- TERMINAL --- */
.terminal-area {
    height: 30vh;
    background: var(--bg-terminal);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    display: flex; justify-content: space-between; padding: 5px 15px;
    background: var(--bg-sidebar); border-bottom: 1px solid var(--border-color);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.terminal-tabs span {
    font-size: 0.7rem; margin-right: 15px; color: #888; cursor: pointer;
}
.terminal-tabs span.active-tab { color: white; border-bottom: 1px solid white; }

.terminal-body {
    flex: 1; padding: 10px 15px; overflow-y: auto; font-size: 13px; color: #cccccc;
}

.command-line {
    display: flex; padding: 5px 15px 15px; align-items: center;
}
.prompt { color: #b5cea8; margin-right: 10px; }
.success { color: var(--text-comment); }

#terminal-input {
    flex: 1; background: transparent; border: none; color: #fff;
    font-family: inherit; font-size: 13px; outline: none;
}

/* Classes de coloration syntaxique */
.comment { color: var(--text-comment); font-style: italic; }
.string { color: var(--text-string); }
.keyword { color: var(--text-keyword); }
.function { color: var(--text-function); }
.number { color: var(--text-number); }
.class-name { color: var(--text-class); }
.link { color: var(--text-string); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--text-keyword); }

/* Animation curseur (le petit détail qui tue) */
@keyframes blink { 50% { opacity: 0; } }
.cursor { animation: blink 1s step-end infinite; }

/* Mobile (parce qu'il faut bien...) */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-container { height: 60vh; }
    .terminal-area { height: 40vh; }
    .profile-header { flex-direction: column; text-align: center; }
}