/* Terminal Portfolio Theme - Custom CSS */

:root {
    /* Colors */
    --color-bg-primary: #050505;
    --color-bg-secondary: #0a0a0a;
    --color-emerald-50: #ecfdf5;
    --color-emerald-100: #d1fae5;
    --color-emerald-400: #34d399;
    --color-emerald-500: #10b981;
    --color-emerald-600: #059669;
    --color-emerald-700: #047857;
    --color-emerald-800: #065f46;
    --color-emerald-900: #064e3b;   
    --color-emerald-950: #022c22;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-red-400: #f87171;
    --color-red-500: #ef4444;
    --color-red-900: #7f1d1d;
    --color-blue-300: #93c5fd;
    --color-blue-500: #3b82f6;
    
    /* Fonts */
    --font-mono: 'Fira Code', 'Courier New', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-mono);
}

body {
    font-family: var(--font-mono);
    background-color: var(--color-bg-primary);
    color: var(--color-emerald-500);
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-800);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-700);
}

/* Animations */
@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Utility Classes */
.text-emerald-50 { color: var(--color-emerald-50); }
.text-emerald-100 { color: var(--color-emerald-100); }
.text-emerald-400 { color: var(--color-emerald-400); }
.text-emerald-500 { color: var(--color-emerald-500); }
.text-emerald-600 { color: var(--color-emerald-600); }
.text-emerald-700 { color: var(--color-emerald-700); }
.text-emerald-800 { color: var(--color-emerald-800); }
.text-emerald-900 { color: var(--color-emerald-900); }
.text-gray-300 { color: var(--color-gray-300); }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-white { color: #ffffff; }
.text-red-400 { color: var(--color-red-400); }
.text-red-500 { color: var(--color-red-500); }
.text-blue-300 { color: var(--color-blue-300); }
.text-blue-500 { color: var(--color-blue-500); }

.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-emerald-900-10 { background-color: rgba(6, 78, 59, 0.1); }
.bg-emerald-950-20 { background-color: rgba(2, 44, 34, 0.2); }
.bg-emerald-950-50 { background-color: rgba(2, 44, 34, 0.5); }
.bg-emerald-950 { background-color: var(--color-emerald-950); }
.bg-gray-800 { background-color: var(--color-gray-800); }
.bg-gray-900 { background-color: var(--color-gray-900); }
.bg-black-40 { background-color: rgba(0, 0, 0, 0.4); }

.border-emerald-500 { border-color: var(--color-emerald-500); }
.border-emerald-900 { border-color: var(--color-emerald-900); }
.border-emerald-900-30 { border-color: rgba(6, 78, 59, 0.3); }
.border-emerald-900-50 { border-color: rgba(6, 78, 59, 0.5); }
.border-emerald-500-30 { border-color: rgba(16, 185, 129, 0.3); }
.border-gray-800 { border-color: var(--color-gray-800); }

/* Layout Classes */
.main-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.file-tree-sidebar {
    width: 300px;
    background-color: var(--color-bg-secondary);
    border-right: 1px solid var(--color-gray-800);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.terminal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-primary);
    overflow: hidden;
    padding: 1.5rem;
    position: relative;
}

/* FileTree Styles */
.file-tree-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    color: var(--color-gray-400);
}

.file-tree-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.file-tree-folder {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 0.25rem;
    color: var(--color-gray-300);
}

.file-tree-folder:hover {
    background-color: var(--color-gray-900);
}

.file-tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.25rem;
    color: var(--color-gray-500);
    margin-left: 1rem;
    margin-top: 0.25rem;
}

.file-tree-item:hover {
    color: var(--color-gray-300);
    background-color: rgba(31, 41, 55, 0.5);
}

.file-tree-item.active {
    background-color: rgba(6, 78, 59, 0.3);
    color: var(--color-emerald-400);
    border-left: 2px solid var(--color-emerald-500);
}

.file-tree-footer {
    padding: 1rem;
    border-top: 1px solid var(--color-gray-800);
    font-size: 0.625rem;
    color: var(--color-gray-600);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Terminal Container Styles */
.terminal-header {
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--color-emerald-800);
    opacity: 0.5;
    border-bottom: 1px solid rgba(6, 78, 59, 0.3);
    padding-bottom: 0.5rem;
}

.terminal-scroll-area {
    flex: 1;
    overflow-y: auto;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    scroll-behavior: smooth;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.terminal-prompt-label {
    color: var(--color-emerald-500);
    font-weight: bold;
    font-family: var(--font-mono);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-emerald-100);
    font-family: var(--font-mono);
    caret-color: var(--color-emerald-500);
}

.terminal-input::placeholder {
    color: var(--color-gray-600);
}

.terminal-cursor {
    width: 0.5rem;
    height: 1.25rem;
    background-color: var(--color-emerald-500);
    margin-left: 0.25rem;
}

/* Glow Effect */
.terminal-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05), transparent);
    opacity: 0.2;
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
    opacity: 0.03;
}

.scanlines-pattern {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ),
    linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 2px, 3px 100%;
}

/* Page Content Styles */
.page-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--color-emerald-400);
    border-bottom: 1px solid var(--color-emerald-900);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    color: var(--color-emerald-600);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

/* Cards */
.card {
    background-color: var(--color-bg-secondary);
    border: 1px solid rgba(6, 78, 59, 0.3);
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--color-emerald-500);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skill-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid rgba(6, 78, 59, 0.3);
    padding: 1rem;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: var(--color-emerald-500);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid rgba(6, 78, 59, 0.3);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.project-card:hover {
    background-color: rgba(6, 78, 59, 0.05);
}

/* Tech Badges */
.tech-badge {
    font-size: 0.625rem;
    background-color: rgba(2, 44, 34, 0.4);
    color: var(--color-emerald-500);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-family: var(--font-mono);
    display: inline-block;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid rgba(6, 78, 59, 0.5);
    padding-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: -0.375rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--color-emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Responsive - Mobile Bottom Nav */
@media (max-width: 767px) {
    .main-layout {
        flex-direction: column;
    }
    
    .file-tree-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 2px solid var(--color-emerald-900);
        order: 2;
        min-height: 70px;
        max-height: 70px;
        overflow: hidden;
        background-color: var(--color-bg-secondary);
        position: sticky;
        bottom: 0;
        z-index: 100;
    }
    
    .file-tree-header,
    .file-tree-footer {
        display: none;
    }
    
    .file-tree-items {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 0.25rem;
        gap: 0.25rem;
        height: 100%;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .file-tree-items::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }
    
    /* Neutraliser le div parent des items de menu */
    .file-tree-items > div {
        display: contents; /* Le div devient transparent pour le layout */
    }
    
    .file-tree-folder {
        display: none;
    }
    
    .file-tree-item {
        margin-left: 0;
        margin-top: 0;
        white-space: nowrap;
        flex-shrink: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 0.75rem;
        min-width: 70px;
        height: 60px;
        border-radius: 0.375rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        gap: 0.25rem;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .file-tree-item span {
        display: block;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.65rem;
    }
    
    .file-tree-item.active {
        background-color: rgba(6, 78, 59, 0.4);
        border-bottom: 2px solid var(--color-emerald-500);
        border-left: none;
    }
    
    .file-tree-item:hover {
        background-color: rgba(31, 41, 55, 0.7);
    }
    
    .terminal-content {
        order: 1;
        flex: 1;
        overflow-y: auto;
        padding-bottom: 1rem;
    }
}

/* Utility Spacing */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Text Utilities */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-5xl { font-size: 3rem; }

.font-bold { font-weight: bold; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

.leading-relaxed { line-height: 1.625; }

/* Display Utilities */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* Rounded */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Border */
.border { border-width: 1px; }
.border-l { border-left-width: 1px; }
.border-l-2 { border-left-width: 2px; }
.border-l-4 { border-left-width: 4px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b-solid {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

/* Max Width */
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Opacity */
.opacity-50 { opacity: 0.5; }

/* Truncate */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Transition */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

a.file-tree-item
{
    text-decoration: none;
}

.p-8 {
    padding: 2rem;
}

.relative {
    position: relative;
}

a.greenLink
{
    color: green;
}
a.greenLink:visited 
{
    color: green;
}

/* CV Page Responsive */
@media (max-width: 767px) {
    .cv-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}