/* CV Moderne - Adam Schlee - Format A4 Strict */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset et variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 6px;
    --transition: all 0.2s ease-in-out;

    /* Variables A4 strictes - Marges minimales */
    --a4-width: 210mm;
    --a4-height: 297mm;
    --a4-margin: 3mm;
    --content-width: calc(var(--a4-width) - 2 * var(--a4-margin));
    --content-height: calc(var(--a4-height) - 2 * var(--a4-margin));
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    color: var(--text-primary);
    background: var(--bg-gray-50);
    font-size: 5mm;
    margin: 0;
    padding: 0;
}

/* Container principal - Format A4 strict */
.cv-container {
    min-width: var(--a4-width);
    min-height: var(--a4-height);
    max-width: var(--a4-width);
    margin: 0 auto;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: visible;
    padding: var(--a4-margin);
    display: flex;
    flex-direction: column;
}

/* Header - Optimisé pour A4 */
.cv-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3mm;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 3mm;
    flex-shrink: 0;
}

.cv-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(40%, -40%);
}

.cv-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-40%, 40%);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 4mm;
    margin-bottom: 2.5mm;
    position: relative;
    z-index: 1;
}

.profile-image {
    width: 30mm;
    height: 30mm;
    border-radius: 50%;
    overflow: hidden;
    border: 1mm solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1mm 3mm rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.name {
    font-size: 7.5mm;
    font-weight: 700;
    margin-bottom: 1.2mm;
    letter-spacing: -0.02em;
    text-shadow: 0 1mm 2mm rgba(0, 0, 0, 0.1);
}

.personality-traits {
    display: none; /* Plus utilisé - gardé pour compatibilité */
}

.trait {
    display: none; /* Plus utilisé - gardé pour compatibilité */
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1mm;
    font-size: 3.8mm;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2mm;
}

.contact-item i {
    font-size: 4mm;
    opacity: 0.9;
    width: 4.5mm;
    flex-shrink: 0;
}

.website-link {
    color: inherit;
    text-decoration: none;
}

.website-link:hover {
    text-decoration: underline;
}

.objective {
    position: relative;
    z-index: 1;
}

.objective h2 {
    font-size: 4.3mm;
    font-weight: 600;
    text-align: center;
    padding: 2.5mm 4mm;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.2;
}

/* Main Content - Optimisé A4 */
.cv-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.cv-left {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
    height: 100%;
}

.cv-right {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
    height: 100%;
}

/* Sections - Fonds distincts */
.cv-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 3mm;
    box-shadow: var(--shadow-sm);
}

.cv-section:nth-child(odd) {
    background: var(--bg-gray-50);
}

/* Dernière section de chaque colonne prend l'espace restant */
.cv-left .cv-section:last-child,
.cv-right .cv-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cv-left .cv-section:last-child .interests-tags,
.cv-right .cv-section:last-child .projects-grid {
    flex: 1;
    align-content: flex-start;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1.2mm;
    font-size: 4.3mm;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2.8mm;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 0.4mm;
    background: linear-gradient(to right, var(--primary-color), transparent);
    margin-left: 2.5mm;
}

.section-title i {
    font-size: 4.5mm;
}

/* Timeline - Ultra compacte */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    margin-left: 1.5mm;
    padding-left: 3mm;
}

.timeline-item:not(:last-child) {
    border-left: 0.4mm solid var(--border-color);
    padding-bottom: 4mm;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5mm;
    top: 0;
    width: 2.5mm;
    height: 2.5mm;
    border-radius: 50%;
    background: var(--primary-color);
    border: 0.4mm solid var(--bg-white);
}

.timeline-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3mm;
    margin-bottom: 1.2mm;
}

.timeline-content-header {
    flex: 1;
    min-width: 0;
}

.timeline-logo {
    width: 12mm;
    height: 12mm;
    border-radius: 2.5mm;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-gray-100);
    border: 0.4mm solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.8mm;
    gap: 1.5mm;
}

.timeline-header h4 {
    font-size: 3.5mm;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}

.location {
    font-size: 2.8mm;
    color: var(--text-secondary);
    font-style: italic;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2mm;
    gap: 1.5mm;
}

.degree {
    font-weight: 500;
    color: var(--primary-color);
    flex: 1;
    font-size: 3.1mm;
    line-height: 1.1;
}

.period {
    font-size: 2.2mm;
    color: var(--text-secondary);
    background: var(--bg-gray-100);
    padding: 0.6mm 1.5mm;
    border-radius: 4mm;
    font-weight: 500;
    white-space: nowrap;
}

.timeline-details {
    color: var(--text-secondary);
    font-size: 3.3mm;
    line-height: 1.3;
}

.timeline-details p {
    margin-bottom: 0.6mm;
}

/* Achievement List - Ultra compacte */
.achievement-list {
    margin-top: 0.8mm;
    margin-left: 2mm;
}

.achievement-list li {
    margin-bottom: 0.8mm;
    color: var(--text-secondary);
    font-size: 3mm;
    line-height: 1.3;
}

.achievement-list li strong {
    color: var(--primary-color);
}

.note {
    font-size: 2.2mm;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.8mm;
}

/* Skills - Ultra optimisées */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
}

.skill-category h4 {
    font-size: 3.3mm;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.2mm;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8mm;
}

.skill-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.6mm 1.5mm;
    border-radius: 3mm;
    font-size: 2.5mm;
    font-weight: 500;
}

.skill-tag.soft-skill {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
}

.tech-tag {
    background: var(--bg-gray-100);
    color: var(--text-secondary);
    padding: 0.4mm 1.2mm;
    border-radius: 2.5mm;
    font-size: 2mm;
    font-weight: 500;
    border: 0.4mm solid var(--border-color);
}

.language-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8mm;
    align-items: flex-start;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8mm;
}

.language-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.6mm 0.8mm 0.6mm 1.5mm;
    border-radius: 3mm;
    font-size: 2.5mm;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1mm;
}

.level-badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary-color);
    padding: 0.3mm 0.8mm;
    border-radius: 2mm;
    font-size: 1.8mm;
    font-weight: 600;
    white-space: nowrap;
}

.language-note {
    font-size: 1.4mm;
    color: var(--secondary-color);
    text-align: center;
    font-style: italic;
}

/* Centres d'intérêt - Similaires aux compétences */
.interests-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
}

.interest-category h4 {
    font-size: 2.8mm;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.2mm;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8mm;
}

.interest-tag {
    background: var(--accent-color);
    color: white;
    padding: 0.6mm 1.5mm;
    border-radius: 3mm;
    font-size: 2.2mm;
    font-weight: 500;
}

/* Projects - Ultra compacts */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
}

.project-item {
    background: var(--bg-gray-50);
    padding: 2.5mm;
    border-radius: var(--border-radius);
    border: 0.4mm solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.project-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.4mm);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.2mm;
    gap: 2mm;
}

.project-header h4 {
    font-size: 2.8mm;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.1;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 2.2mm;
    font-weight: 500;
    white-space: nowrap;
}

.project-link:hover {
    text-decoration: underline;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8mm;
    margin-bottom: 1.2mm;
}

.project-description {
    color: var(--text-secondary);
    font-size: 3mm;
    line-height: 1.3;
}

/* Intérêts et Loisirs - Tags discrets */
.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1mm;
}

.interest-tag {
    background: var(--bg-gray-100);
    color: var(--text-primary);
    padding: 0.8mm 1.8mm;
    border-radius: 3mm;
    font-size: 2.2mm;
    font-weight: 400;
    border: 0.3mm solid var(--text-primary);
    transition: var(--transition);
}

.interest-tag:hover {
    background: var(--bg-gray-50);
    color: var(--text-primary);
}