:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --line: #e2e2e2;
    --hover: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding: 24px;
}

main {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.retour {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.retour:hover,
.retour:focus-visible {
    color: var(--text);
    border-bottom-color: var(--text);
}

/* ---------- En-tête ---------- */

.cv-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.cv-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cv-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.cv-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.95rem;
}

.cv-header > div {
    flex: 1;
}

.btn-pdf {
    flex-shrink: 0;
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.btn-pdf:hover,
.btn-pdf:focus-visible {
    background-color: var(--hover);
    border-color: var(--text);
}

/* ---------- Grille générale ---------- */

.cv-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
}

.cv-block {
    margin-bottom: 32px;
}

.cv-block h2 {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

/* ---------- Sidebar : infos / langues / tags ---------- */

.cv-infos {
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.9;
}

.cv-infos a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.cv-infos a:hover,
.cv-infos a:focus-visible {
    border-bottom-color: var(--text);
}

.cv-langues {
    list-style: none;
}

.cv-langues li {
    margin-bottom: 12px;
}

.cv-langue-nom {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.cv-barre {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}

.cv-barre span {
    display: block;
    height: 100%;
    background: var(--text);
}

.cv-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-tags li {
    font-size: 0.82rem;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}

/* ---------- Contenu : timelines ---------- */

.cv-timeline {
    list-style: none;
    border-top: 1px solid var(--line);
}

.cv-timeline li {
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
}

.cv-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.cv-item-titre {
    font-size: 1rem;
    font-weight: 500;
}

.cv-item-periode {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.cv-item-lieu {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--muted);
}

.cv-item-note {
    margin-left: 8px;
    font-style: italic;
}

/* ---------- Footer ---------- */

footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
}

footer a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
    color: var(--text);
    border-bottom-color: var(--text);
}

footer .footer-links {
    display: flex;
    gap: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
    .cv-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cv-header {
        flex-wrap: wrap;
    }

    .btn-pdf {
        margin-left: 104px;
    }
}

@media (max-width: 480px) {
    .cv-header {
        text-align: left;
    }

    .btn-pdf {
        margin-left: 0;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --text: #f0f0f0;
        --muted: #999999;
        --line: #2a2a2a;
        --hover: #1c1c1c;
    }
}

/* Réseaux sociaux (pied de page) */
footer {
    flex-wrap: wrap;
    gap: 12px;
}

footer .footer-links {
    align-items: center;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 8px;
}

footer .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

footer .social-link:hover,
footer .social-link:focus-visible {
    color: var(--text);
    border-color: var(--text);
    transform: translateY(-2px);
}

.social-icon {
    width: 16px;
    height: 16px;
}
