/* ========================================================
   terminal.css — Le terminal interactif en héros sur la home.
   ======================================================== */

.terminal {
    background: #0a0d12;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    font-family: var(--font-mono);
    color: #e6edf3;
    height: 420px;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .terminal {
    background: #0d1015;
    border-color: #1c2128;
}

.terminal-titlebar {
    background: #14181d;
    border-bottom: 1px solid #232a33;
    padding: 0.5rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #8b95a1;
    user-select: none;
}
.terminal-dot {
    width: 12px; height: 12px; border-radius: 50%; background: #3a3f44;
}
.terminal-dot.r { background: #ff5f56; }
.terminal-dot.y { background: #ffbd2e; }
.terminal-dot.g { background: #27c93f; }
.terminal-title { margin-left: 0.7rem; font-family: var(--font-mono); }

.terminal-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.55;
    scrollbar-width: thin;
    scrollbar-color: #2d333b transparent;
}
.terminal-body::-webkit-scrollbar { width: 8px; }
.terminal-body::-webkit-scrollbar-thumb { background: #2d333b; border-radius: 4px; }

.terminal-output { white-space: pre-wrap; word-break: break-word; }
.terminal-output .term-prompt {
    color: #00d97e;
}
.terminal-output .term-cmd { color: #e6edf3; }
.terminal-output .term-comment { color: #8b95a1; font-style: italic; }
.terminal-output .term-err { color: #ff5d6c; }
.terminal-output .term-ok { color: #00d97e; }
.terminal-output .term-warn { color: #ffb454; }
.terminal-output .term-dim { color: #5e6975; }
.terminal-output .term-link { color: #79c0ff; text-decoration: underline; }
.terminal-output a { color: #79c0ff; }
.terminal-output ul, .terminal-output ol { list-style: none; padding: 0; }

.terminal-line {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
}
.terminal-line .prompt {
    color: #00d97e;
    flex-shrink: 0;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.terminal-input-line .prompt {
    color: #00d97e;
    flex-shrink: 0;
}
.terminal-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #e6edf3;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    caret-color: #00d97e;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    background: #00d97e;
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
    height: 1em;
    vertical-align: text-bottom;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Matrix easter egg overlay */
.matrix-overlay {
    position: fixed; inset: 0;
    background: #000;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-mono);
    color: #00ff5a;
    font-size: 16px;
    pointer-events: none;
}
.matrix-col {
    position: absolute;
    top: -100%;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: upright;
    animation: matrixFall linear forwards;
    opacity: 0.85;
}
@keyframes matrixFall {
    to { top: 110%; }
}
