:root {
    --primary-color: #066b79; /* Bleu profond */
    --secondary-color: #f0f8ff; /* Bleu très clair */
    --text-color: #131212;
    --light-text-color: #03424b;
    --header-text-color: #fff;
    --font-main: 'Roboto', sans-serif; 
    --font-alt: 'Open Sans', sans-serif;
    --timeline-color: #ccc; /* Couleur du trait vertical */
}

/* --- GLOBAL ET CONTENEUR A4 --- */
body {
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.2; 
    margin: 0;
    padding: 0; 
    background-color: #fbffe8; /*font de page derriere le cv */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    cursor: cell;
    background: #066B79;
    background: linear-gradient(302deg,rgba(6, 107, 121, 1) 0%, rgba(104, 186, 196, 1) 45%, rgba(255, 251, 217, 1) 100%);}

h2 {
font-size: 330px;
}

.cv-container {
    display: flex;
    width: 21cm; /* Format A4 */
    height: 29.7cm; /* Format A4 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: rgb(251, 255, 214);
    position: relative; 
}

/* --- BANDEAU LATÉRAL GAUCHE (SIDEBAR) --- */
.sidebar {
    width: 32%; 
    background-color: var(--primary-color);
    color: var(--header-text-color);
    padding: 25px 20px; 
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* EN-TÊTE NOM/PRÉNOM/TITRE (Optimisé pour la taille) */
.sidebar h1 {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1.5em; 
    margin-bottom: 1px; 
    text-transform: uppercase;
}

.sidebar h2 {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 1.5em; 
    margin-top: 0;
    margin-bottom: 15px; 
    color: rgba(215, 241, 255, 0.993);
}

.sidebar h3 { /* Titres des sections Contact, Compétences, etc. */
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px; 
    margin-top: 25px; 
    margin-bottom: 8px; 
    font-size: 1.15em; 
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--header-text-color);
    width: 100%;
}

/* SECTION CONTACT */
.social-links a,
.social-links a:link,
.social-links a:visited { 
    text-decoration: underline; 
}

/* Style au survol  */
.social-links a:hover {
    color: #F0F0F0 !important;
    text-decoration: underline; 
}

.sidebar .contact-info,

.sidebar .languages,
.sidebar .education-section {
    width: 100%;
    text-align: left;   
}
.sidebar .contact-info p,
.sidebar .languages p,
.sidebar .education-section p { 
    margin-bottom: 4px; 
    font-size: 0.9em; 
}

.sidebar .social-links { /* Alignement LinkedIn/GitHub */
    display: flex; 
    gap: 15px; 
    margin-bottom: 5px; 
    margin-top: -3px; 
}
.sidebar .social-item a {
    white-space: nowrap; 
}


/* FORMATIONS */
.sidebar .education-section .edu-title {
    font-weight: 600;
    font-size: 0.9em;
    line-height: 1.2;
}
.sidebar .education-section .edu-meta {
    font-size: 0.8em;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* --- COMPÉTENCES (STYLE LISTE COMPACTE) --- */
.skills-section {
    width: 100%;
    text-align: left;
}
.skill-category {
    margin-bottom: 2px; 
    margin-top: 2px;
    font-size: 0.9em;
}
.skill-category h4 i { 
    margin-right: 12px; /* Passe de 8px à 12px (ou plus) pour plus d'espace */
}

.skill-tags {
    margin-top: 5px; 
    
}
.languages-section {
    width: 100%;
    text-align: left;
}

.category-title {
    font-size: 1em; 
    font-weight: 700;
    margin-top: 2px; 
    margin-bottom: 2px; 
    color: var(--secondary-color); 
    text-transform: uppercase;
}


.category-list strong {
    color: var(--secondary-color); 
}

a:link {
  color: rgb(235, 255, 190);
}
.category-list {
    /* Augmente l'espace vertical */
    line-height: 0.5em; 
    padding-left: 10px;
    margin-bottom: 2px; 
}

/* --- CONTENU PRINCIPAL DROIT (MAIN CONTENT) --- */
.main-content {
    width: 70%; 
    padding: 20px 30px 10px 15px; 
    box-sizing: border-box;
    background-color: white;
    overflow: hidden; 
}

/* TITRES DE SECTION DROIT (PROFIL, EXPÉRIENCES) */
.main-content h2 { 
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px; 
    margin-top: 35px; 
    margin-bottom: 12px; 
    font-size: 1.3em; 
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}
.main-content h2:first-of-type {
    margin-top: 0; 
}
.main-content h2 i {
    margin-right: 8px; 
    font-size: 1.05em;
    color: var(--primary-color);
}

/* Accroche (Profil) */
.profile-section p {
    margin-bottom: 15px; 
    font-size: 0.95em;
    line-height: 1.35; 
}

/* --- EXPÉRIENCES - STYLE TIMELINE DÉCALÉE --- */
.experiences-section {
    position: relative;
}

.experience-item {
    position: relative;
    display: flex; 
    margin-bottom: 20px; 
}

/* Colonne de Gauche (Date/Entreprise) */
.item-meta {
    width: 33%; 
    padding-right: 20px;
    box-sizing: border-box;
    text-align: right; 
    flex-shrink: 0; 
}
.item-meta p {
    margin: 0;
    line-height: 1.3;
}
.item-company {
    font-weight: 500;
    padding-right: 15px; 
    font-size: 1.1em !important;
    color: var(--text-color) !important;
}
.item-date {
    font-size: 0.9em !important;
    color: var(--light-text-color) !important;
}

/* Colonne de Droite (Poste/Description) */
.item-content {
    width: 70%; 
    padding-left: 10px; 
    box-sizing: border-box;
    border-left: 1px solid var(--timeline-color); /* CRÉE LE TRAIT VERTICAL */
}

/* Titre du Poste */
.item-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2px;
}

/* Description */
.item-description {
    font-size: 0.9em;
    line-height: 1.4;
    margin-top: 0;
}

/* CERCLE DE TIMELINE (POINT) */
.experience-item::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    left: calc(30% - 1px); 
    top: 3px; 
    z-index: 1;
    transform: translateX(-50%); 
}

/* --- BOUTON ET IMPRESSION --- */
.pdf-button {
    /* Bouton dl CV */
    position: fixed; 
    top: 50%; 
    left: 20px; 
    transform: translateY(-50%); 
    padding: 8px 15px; 
    background-color: #28a745; 
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9em; 
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.20); 
    z-index: 1000; 
}

/* --- REGLES SPECIFIQUES MOBILE  --- */
/* ============================================== */
/* --- 1. REGLES SPECIFIQUES IMPRESSION (PDF A4) --- */
/* (Ceci doit garantir que le PDF est toujours parfait en deux colonnes A4) */
/* ============================================== */

@media print {
    @page {
        size: a4 portrait;
        margin: 0;
    }
    
    /* Force le body à être au format A4 sans marges */
    body {
        width: 210mm;
        height: 297mm;
        margin: 0 !important; 
        padding: 0 !important;
        /* Désactive le dégradé en print pour économiser l'encre (optionnel) */
        background-image: none !important; 
        background-color: white !important; 
    }
    
    /* Force le conteneur à être en Flex et à prendre le format A4 */
    .cv-container {
        width: 21cm !important; 
        height: 29.7cm !important;
        display: flex !important; /* Force la mise en page en deux colonnes */
        flex-direction: row !important;
        box-shadow: none !important;
    }
    
    /* S'assurer que les deux colonnes gardent leur largeur A4 */
    .sidebar { width: 32% !important; padding: 25px 20px !important; }
    .main-content { width: 70% !important; padding: 20px 30px 10px 15px !important; }

    /* Règles pour éviter les coupures de page */
    h2, h3, .experience-item, .education-item {
        page-break-inside: avoid;
    }
    .pdf-button {
        display: none !important; 
    }
}

/* ============================================== */
/* --- 2. REGLES SPECIFIQUES ECRAN MOBILE/TABLETTE --- */
/* (Ceci s'applique uniquement aux écrans de moins de 992px de large) */
/* ============================================== */

@media screen and (max-width: 992px) {
    
    /* Rendre le CV responsif */
    .cv-container {
        width: 100%; 
        height: auto; 
        min-height: 100vh;
        display: block; /* Bascule en mode bloc (une colonne sous l'autre) */
        box-shadow: none; 
    }

    /* Les deux colonnes passent à 100% de la largeur */
    .sidebar, .main-content {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    
    /* Réalignement de la Sidebar (colonne gauche) */
    .sidebar {
        text-align: left;
        padding-bottom: 20px; /* Plus d'espace au bas de la sidebar */
    }
    .sidebar h1, .sidebar h2 {
        text-align: left; /* Aligner le nom et le titre à gauche */
    }

    /* Gestion des expériences (supprimer la timeline) */
    .experience-item {
        display: block;
        margin-bottom: 25px; 
    }
    .item-meta {
        width: 100%;
        text-align: left; 
        padding-right: 0;
    }
    .item-content {
        width: 100%; 
        padding-left: 0;
        border-left: none; /* Supprimer le trait vertical */
    }
    .experience-item::before {
        display: none; /* Supprimer le cercle de la timeline */
    }
    
    /* Ajustement des marges générales */
    .main-content h2 {
        margin-top: 20px;
        font-size: 1.2em; /* Réduire légèrement les titres de section */
    }
}