/* style.css */
:root {
    --bg-dark: #0f1117;
    --panel-dark: #1b1f2a;
    --panel-header: #2a3040;
    --border-dark: #3b4356;
    --text-dark: #d5d9e2;
    --accent-cyan: #4fc1ff;
    --accent-green: #b5cea8;
    --accent-yellow: #dcdcaa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    font-family: "Fira Code", "Courier New", monospace;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.terminal-container {
    width: 100%;
    max-width: 950px;
    background: var(--panel-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.terminal-header {
    background: var(--panel-header);
    border-bottom: 1px solid var(--border-dark);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.buttons {
    display: flex;
    gap: 8px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

.title {
    color: #9ba3b5;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-view-btn,
.export-btn {
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.toggle-view-btn {
    border: 1px solid #4a5878;
    background: #2f3b52;
    color: #d7e6ff;
}

.toggle-view-btn:hover {
    background: #3a4a68;
}

.export-btn {
    border: 1px solid #5c6377;
    background: #3a3f50;
    color: #eef2f7;
}

.export-btn:hover {
    background: #4a5063;
}

.cv-body {
    padding: 26px;
}

.cv-body section {
    margin-bottom: 18px;
}

.human-header {
    border-bottom: 1px dashed var(--border-dark);
    padding-bottom: 12px;
}

.human-header h1 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 4px;
}

.human-title {
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.human-header a {
    color: var(--accent-cyan);
}

.cv-body h2 {
    color: var(--accent-cyan);
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 8px;
}

.cv-body p {
    margin-bottom: 8px;
}

.human-list {
    list-style-type: "> ";
    color: #d0d4dc;
    padding-left: 20px;
}

.human-list li {
    margin-bottom: 6px;
}

.human-item {
    margin-bottom: 14px;
    border-bottom: 1px dashed #343c50;
    padding-bottom: 10px;
}

.human-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.human-item-header h3 {
    margin: 0;
    color: #e6edf8;
    font-size: 1rem;
}

.human-item-header span {
    color: #c586c0;
    font-size: 0.92rem;
}

.human-item-subtitle {
    color: var(--accent-green);
    margin-bottom: 6px;
}

.terminal-footer {
    background: var(--panel-header);
    color: #8d95a8;
    border-top: 1px solid var(--border-dark);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    padding: 6px 14px;
}

/* Mode terminal enrichi visuellement sans dupliquer le contenu */
body:not(.view-human) .cv-body section:not(.human-header)::before {
    content: "guest@olivierbrun:~$";
    display: block;
    color: var(--accent-green);
    font-weight: 600;
    margin-bottom: 4px;
}

body:not(.view-human) .cv-body h2::after {
    content: " #";
    color: var(--accent-yellow);
}

/* Vue classique pour non-dev */
body.view-human {
    background: #f3f5f8;
    color: #1f2937;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.view-human .terminal-container {
    background: #ffffff;
    border-color: #d2d8e1;
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.18);
}

body.view-human .terminal-header {
    background: #eef2f7;
    border-bottom-color: #d2d8e1;
}

body.view-human .title {
    color: #5b6472;
}

body.view-human .toggle-view-btn {
    background: #21344f;
    border-color: #21344f;
    color: #ffffff;
}

body.view-human .toggle-view-btn:hover {
    background: #1b2b42;
}

body.view-human .cv-body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
}

body.view-human .human-header {
    border-bottom: 1px solid #d7dce3;
}

body.view-human .human-header h1 {
    color: #111827;
}

body.view-human .human-title,
body.view-human .cv-body h2,
body.view-human .human-header a {
    color: #1d4ed8;
}

body.view-human .human-list {
    list-style: disc;
    color: #1f2937;
}

body.view-human .human-item {
    border-bottom: 1px solid #e5e7eb;
}

body.view-human .human-item-header h3 {
    color: #111827;
}

body.view-human .human-item-header span,
body.view-human .human-item-subtitle {
    color: #4b5563;
}

body.view-human .terminal-footer {
    display: none;
}

/* Impression ATS */
@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        display: block;
        padding: 0;
        font-family: Calibri, Arial, Helvetica, sans-serif;
        line-height: 1.28;
        font-size: 11pt;
    }

    .terminal-container {
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-width: 100%;
        background: #ffffff !important;
    }

    .terminal-header,
    .terminal-footer {
        display: none !important;
    }

    .cv-body {
        padding: 0;
        color: #000000 !important;
        font-family: Calibri, Arial, Helvetica, sans-serif;
    }

    .cv-body section::before,
    .cv-body h2::after {
        content: none !important;
    }

    .human-header,
    .human-item {
        border: none;
    }

    .cv-body h2,
    .cv-body p,
    .human-item-header h3,
    .human-item-header span,
    .human-item-subtitle,
    .human-list,
    .human-list li,
    .human-header h1 {
        color: #000000 !important;
    }

    .human-list {
        list-style: disc;
    }
}

@media (max-width: 700px) {
    body {
        padding: 20px 10px;
    }

    .cv-body {
        padding: 16px;
    }

    .title {
        display: none;
    }

    .actions {
        gap: 6px;
    }

    .toggle-view-btn,
    .export-btn {
        padding: 5px 8px;
        font-size: 0.74rem;
    }

    .human-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
