/* Variables CSS pour le thème */
:root {
    --terminal-bg: #000000;
    --terminal-fg: #ffffff;
    --terminal-selection: #cccccc;
    --terminal-link: #00aaff;
    --terminal-error: #ff4444;
    --terminal-warning: #ffaa00;
    --terminal-border: #ffffff;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--terminal-bg);
    font-family: 'Courier New', monospace;
    overflow: auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.3s ease;
    position: relative;
}

/* Canvas d'animation Perlin en pixel art */
#perlin-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#terminal-container {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    min-height: 600px;
    background: var(--terminal-bg);
    border: 3px solid var(--terminal-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(var(--terminal-border-rgb), 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease-in-out;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Barre de titre du terminal pour le drag */
#terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    z-index: 10;
    cursor: move;
    user-select: none;
}

#terminal {
    height: 100%;
    --color: var(--terminal-fg);
    --background: var(--terminal-bg);
    --link-color: var(--terminal-link);
    padding: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Personnalisation du terminal */
.terminal {
    --size: 1;
    font-size: calc(14px * var(--size));
    line-height: 1.4;
}

/* Animation de typing */
.terminal .cmd .cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Styles pour les commandes */
.terminal .terminal-output div {
    margin: 2px 0;
}

.terminal .terminal-output .error {
    color: var(--terminal-error);
}

.terminal .terminal-output .warning {
    color: var(--terminal-warning);
}

.terminal .terminal-output .success {
    color: var(--terminal-fg);
}

/* Styles pour les liens */
.terminal a {
    color: var(--terminal-link);
    text-decoration: underline;
}

.terminal a:hover {
    color: var(--terminal-selection);
}

/* Styles pour les sections */
.section-title {
    color: var(--terminal-selection);
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
}

.project-item {
    margin-left: 20px;
    margin-bottom: 8px;
}

.skill-category {
    margin-left: 10px;
    margin-bottom: 5px;
}

/* ASCII Art */
.ascii-art {
    color: var(--terminal-selection);
    line-height: 1.2;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        --size: 0.9;
    }
    
    #terminal-container {
        width: 95%;
        height: 85vh;
    }
}

@media (max-width: 480px) {
    .terminal {
        --size: 0.8;
    }
    
    .ascii-art {
        font-size: 0.7em;
    }
    
    #terminal-container {
        width: 98%;
        height: 90vh;
    }
    
    body {
        padding: 10px;
    }
}

/* Scrollbar personnalisée */
.terminal::-webkit-scrollbar {
    width: 10px;
}

.terminal::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

.terminal::-webkit-scrollbar-thumb {
    background: var(--terminal-fg);
    border-radius: 5px;
}

.terminal::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-selection);
}
