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

html, body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
    width: 100vw;
}

.cv-container {
    width: 100vw;
    min-height: 100vh;
    background-color: white;
    box-shadow: none;
    padding: 30px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styles */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0066cc;
}

.name-section h1 {
    font-size: 2.2rem;
    color: #0066cc;
    margin-bottom: 8px;
    font-weight: bold;
}

.name-section h2 {
    font-size: 1.2rem;
    color: #444444;
    font-weight: normal;
}

.contact-info {
    text-align: right;
    font-size: 1rem;
}

.contact-info p {
    margin-bottom: 8px;
}

/* Section styles */
.cv-section {
    margin-bottom: 25px;
}

.cv-section h3 {
    font-size: 1.5rem;
    color: #0066cc;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #cccccc;
    font-weight: bold;
}

.cv-section p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Job and education styles */
.job, .education {
    margin-bottom: 20px;
}

.job h4, .education h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
}

.job h5, .education h5 {
    font-size: 1rem;
    color: #333333;
    font-weight: normal;
    margin-bottom: 8px;
}

.date {
    font-size: 0.9rem;
    color: #333333;
    font-style: italic;
    margin-bottom: 10px;
    font-weight: bold;
}

.job ul {
    margin-left: 25px;
}

.job li {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.skill-category h4 {
    font-size: 1.1rem;
    color: #000000;
    margin-bottom: 12px;
    font-weight: bold;
    border-bottom: 1px solid #dddddd;
    padding-bottom: 4px;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    background-color: #f8f8f8;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    font-size: 0.95rem;
    border-left: 3px solid #0066cc;
}

/* Responsive design - ajusté pour tenir dans la viewport sans scroll seulement sur mobile */
@media (max-width: 768px) {
    .cv-container {
        padding: 20px;
        min-height: 100vh;
    }

    .cv-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .contact-info {
        text-align: center;
        margin-top: 15px;
        font-size: 1rem;
    }

    .name-section h1 {
        font-size: 1.8rem;
    }

    .name-section h2 {
        font-size: 1.1rem;
    }

    .cv-section {
        margin-bottom: 20px;
    }

    .cv-section h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .cv-section p {
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .job, .education {
        margin-bottom: 18px;
    }

    .job h4, .education h4 {
        font-size: 1.1rem;
    }

    .job h5, .education h5 {
        font-size: 0.95rem;
    }

    .date {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .job ul {
        margin-left: 20px;
    }

    .job li {
        font-size: 0.95rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .skill-category h4 {
        font-size: 1rem;
    }

    .skill-category li {
        font-size: 0.9rem;
        padding: 6px 10px;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .cv-container {
        padding: 15px;
    }

    .cv-header {
        padding-bottom: 3px;
        margin-bottom: 5px;
    }

    .name-section h1 {
        font-size: 1.5rem;
    }

    .name-section h2 {
        font-size: 0.95rem;
    }

    .contact-info {
        font-size: 0.9rem;
        margin-top: 10px;
    }

    .cv-section {
        margin-bottom: 6px;
    }

    .cv-section h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .cv-section p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .job, .education {
        margin-bottom: 5px;
    }

    .job h4, .education h4 {
        font-size: 1rem;
    }

    .job h5, .education h5 {
        font-size: 0.85rem;
    }

    .date {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .job ul {
        margin-left: 6px;
    }

    .job li {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .skills-grid {
        gap: 3px;
    }

    .skill-category h4 {
        font-size: 0.9rem;
    }

    .skill-category li {
        font-size: 0.8rem;
        padding: 5px 8px;
        margin-bottom: 5px;
    }
}

/* Print styles for portrait CV */
@media print {
    body {
        background-color: white;
        padding: 0;
    }

    .cv-container {
        box-shadow: none;
        max-width: none;
        min-height: 297mm;
        width: 210mm;
        margin: 0;
        padding: 20mm;
    }

    .cv-header {
        break-inside: avoid;
    }

    .cv-section {
        break-inside: avoid;
    }
}