/* ==========================================
   CV HTML Styles - Design moderne et professionnel
   ========================================== */

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

:root {
    --primary-color: #242222;
    --secondary-color: #64748b;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent-color: #242222;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header avec actions */
.cv-header-actions {
    background: var(--bg-color);
    padding: 2rem 0;
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 2rem;
}

.cv-header-actions h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cv-header-actions .subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1a1818;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 34, 34, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 34, 34, 0.3);
}

/* Layout principal */
.cv-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.cv-html {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    line-height: 1.6;
}

/* En-tête du CV */
.cv-html-header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.cv-html-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.cv-html-header-info {
    flex: 1;
}

.cv-html-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.cv-html-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.cv-html-location {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-html-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.cv-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.cv-contact-link:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 34, 34, 0.2);
}

.cv-contact-link i {
    font-size: 1.2rem;
}

/* Sections du CV */
.cv-section {
    margin-bottom: 2.5rem;
    page-break-inside: avoid;
}

.cv-section:last-child {
    margin-bottom: 0;
}

.cv-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.cv-section-title i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.cv-section-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Compétences */
.cv-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cv-skill-category {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cv-skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.cv-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    color: var(--primary-color);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cv-skill-tag:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(36, 34, 34, 0.2);
}

/* Timeline pour expériences et formations */
.cv-timeline {
    position: relative;
    padding-left: 2rem;
}

.cv-timeline::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.cv-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.cv-timeline-item:last-child {
    margin-bottom: 0;
}

.cv-timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--border-color);
    z-index: 1;
}

.cv-timeline-content {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cv-timeline-content:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(4px);
}

.cv-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.cv-timeline-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    white-space: nowrap;
    padding: 0.25rem 0.75rem;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.cv-timeline-company {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0.5rem 0;
    font-style: italic;
}

.cv-timeline-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.cv-timeline-description li {
    margin-bottom: 0.5rem;
}

.cv-timeline-description li::marker {
    color: var(--primary-color);
}

.cv-timeline-tech {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.cv-timeline-tech strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.cv-tech-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-tech-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Projets */
.cv-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cv-project-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cv-project-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.cv-project-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}

.cv-project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.cv-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Langues */
.cv-languages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv-language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cv-language-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cv-language-level {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Sidebar */
.cv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 20px;
}

.info-card,
.navigation-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-card:hover,
.navigation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.info-card h2,
.navigation-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.info-card dl {
    margin: 0;
}

.info-card dt {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.75rem;
}

.info-card dt:first-child {
    margin-top: 0;
}

.info-card dd {
    color: var(--text-secondary);
    margin-left: 0;
    margin-bottom: 0.5rem;
}

/* Navigation dans la sidebar */
.cv-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.cv-nav-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(36, 34, 34, 0.2);
}

.cv-nav-link i {
    font-size: 1.125rem;
}

/* Footer */
.cv-footer {
    background: var(--bg-color);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.cv-footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Styles pour l'impression */
@media print {
    .cv-header-actions,
    .cv-sidebar,
    .cv-footer {
        display: none;
    }

    .cv-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cv-html {
        box-shadow: none;
        border: none;
        padding: 1rem;
        page-break-inside: avoid;
    }

    .cv-section {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }

    .cv-timeline-content,
    .cv-project-card {
        page-break-inside: avoid;
    }

    .cv-contact-link {
        color: var(--primary-color);
        text-decoration: none;
        background: transparent;
        border: none;
        padding: 0;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--secondary-color);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .cv-layout {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .cv-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cv-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .cv-html {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .cv-html {
        padding: 1.5rem;
    }

    .cv-html-name {
        font-size: 2rem;
    }

    .cv-html-title {
        font-size: 1.25rem;
    }

    .cv-html-contact {
        flex-direction: column;
    }

    .cv-contact-link {
        width: 100%;
        justify-content: center;
    }

    .cv-skills-grid {
        grid-template-columns: 1fr;
    }

    .cv-projects-grid {
        grid-template-columns: 1fr;
    }

    .cv-timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cv-timeline-date {
        align-self: flex-start;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
