/* === VARIABLES ISSUES DE JRAVIER.FR === */
:root {
    --sidebar-bg: #0f172a;        /* Bleu nuit (Slate 900) */
    --sidebar-text: #94a3b8;      /* Gris bleu clair */
    --primary-accent: #10b981;    /* Vert Emerald */
    --body-bg: #f1f5f9;           /* Gris très très clair */
    --card-bg: #ffffff;           /* Blanc pur */
    --text-main: #334155;         /* Gris foncé lisible */
    --heading-color: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Inter, system-ui, sans-serif;
    background-color: #e2e8f0;
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px;
}

/* === STRUCTURE GLOBALE === */
.cv-wrapper {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--body-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    overflow: hidden;
}

/* === BARRE LATÉRALE (Sidebar) === */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid var(--primary-accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
}

.sidebar-header h1 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.sidebar-header .title {
    color: var(--primary-accent);
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-info {
    list-style: none;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info a {
    color: var(--sidebar-text);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: var(--primary-accent);
}

/* Compétences dans la Sidebar */
.nav-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 25px 0 10px 0;
    font-weight: 800;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.skills-list li::before {
    content: '▹';
    color: var(--primary-accent);
    font-weight: bold;
}

/* === CONTENU PRINCIPAL === */
.main-content {
    flex: 1;
    padding: 40px;
    background-color: var(--body-bg);
}

h2 { 
    font-size: 1.5rem; 
    margin-bottom: 20px; 
    color: var(--heading-color); 
    border-bottom: 2px solid #e2e8f0; 
    padding-bottom: 8px; 
}

/* STYLE DES CARTES & EFFET DE SURVOL (Glow Vert) */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    transition: all 0.3s ease; /* Animation fluide */
}

/* EFFET DEMANDÉ : Brillance et contour vert au survol */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(16, 185, 129, 0.15), 0 0 0 1px var(--primary-accent);
    border-color: var(--primary-accent);
}

.card-intro {
    border-left: 4px solid var(--primary-accent);
}

/* Annuler l'effet de survol sur la carte d'intro si on veut le garder uniquement pour les 3 gros blocs */
.card-intro:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-color: #e2e8f0;
}

/* Timeline / Expériences */
.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.item-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
}

.item-logo img { width: 100%; height: 100%; object-fit: contain; }

.item-content { flex: 1; }
.item-title { font-weight: 700; color: var(--heading-color); font-size: 1.1rem; }
.item-subtitle { color: #64748b; font-weight: 500; font-size: 0.95rem; margin-bottom: 2px;}
.item-dates { color: var(--primary-accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }

.item-description ul {
    list-style: none;
}

.item-description li {
    margin-bottom: 6px;
    padding-left: 15px;
    position: relative;
    font-size: 0.95rem;
}

.item-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-accent);
    font-weight: bold;
}

/* Boîte Projets */
.project-box {
    background-color: #f8fafc;
    border-left: 4px solid #3b82f6; 
    padding: 20px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px;
}

.project-box.homelab { border-left-color: var(--primary-accent); }
.project-box.fyc { border-left-color: #8b5cf6; }

.project-box h3 {
    color: var(--heading-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.project-box p { font-size: 0.95rem; }

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.btn-download:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* === INTÉGRATION IMAGES & VIDÉO YOUTUBE === */
.media-container {
    text-align: center;
    background: white;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 15px;
}

.media-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Format 16:9 */
    height: 0;
    overflow: hidden;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* === FOOTER === */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
}

/* === RESPONSIVE & IMPRESSION === */
@media (max-width: 900px) {
    .cv-wrapper { flex-direction: column; }
    .sidebar { width: 100%; padding: 30px; }
    .main-content { padding: 20px; }
    .timeline-item { flex-direction: column; gap: 10px; }
    .card:hover { transform: none; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-color: #e2e8f0; } /* Désactive le hover sur mobile */
}

@media print {
    body { padding: 0; background: white; }
    .cv-wrapper { 
        box-shadow: none; 
        border-radius: 0; 
        max-width: 100%; 
        display: flex;
        flex-direction: row;
    }
    .sidebar {
        width: 30%;
        background-color: var(--sidebar-bg) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 30px 20px;
    }
    .sidebar-header h1 { color: white !important; -webkit-print-color-adjust: exact !important; }
    .sidebar-text { color: var(--sidebar-text) !important; }
    
    .main-content {
        width: 70%;
        padding: 30px;
        background-color: white !important;
    }
    .card {
        border: none;
        box-shadow: none !important;
        padding: 0 0 20px 0;
        margin-bottom: 15px;
        transform: none !important; /* Retire l'effet de survol à l'impression */
    }
    .project-box {
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact !important;
    }
    .media-container,
    .video-container {
        display: none !important; /* Masque les images et la vidéo à l'impression pour ne pas casser la page */
    }
    footer {
        display: none; /* Masque le footer à l'impression pour un rendu plus pro */
    }
}