/* ============================= */
/* ✨ BASE & NAVIGATION         */
/* ============================= */
:root {
    --bg: #0d1117;
    --card: #161b22;
    --text: #c9d1d9;
    --title: #ffffff;
    --accent: #58a6ff;
    --nav-bg: #161b22;
}

body.light-mode {
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #24292f;
    --title: #1f2328;
    --accent: #0969da;
    --nav-bg: #ffffff;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    transition: 0.3s;
}

nav {
    background: var(--nav-bg);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Nom à gauche, menu à droite */
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--title);
    text-decoration: none;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover, nav a.active {
    color: var(--accent);
}

/* ============================= */
/* ✨ CONTENU & CARTES          */
/* ============================= */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 { font-size: 2.5rem; color: var(--title); margin-bottom: 10px; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skill-card, .card-exp, .veille-item {
    background: var(--card);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
}

.skill-card:hover { transform: translateY(-5px); }

.project-tag {
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.skill-list { margin-top: 15px; padding-left: 20px; }
.skill-list li { margin-bottom: 10px; line-height: 1.5; }

/* Mobile */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 15px; }
}

/* Conteneur principal de la timeline */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px 0;
}

/* La ligne verticale centrale */
.timeline-line {
    position: absolute;
    width: 4px;
    background-color: var(--accent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; /* Centrage parfait */
    border-radius: 2px;
}

/* Chaque bloc d'expérience */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%; /* Prend la moitié de la largeur */
    box-sizing: border-box;
}

/* Les petits ronds sur la ligne */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg);
    border: 4px solid var(--accent);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

/* Positionnement à gauche */
.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.left .skill-list {
    list-style: none;
    padding: 0;
}

/* Positionnement à droite */
.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.right::after {
    left: -10px;
}

/* Adaptation Mobile */
@media screen and (max-width: 768px) {
    .timeline-line {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        text-align: left !important;
    }
    .timeline-item.right {
        left: 0%;
    }
    .timeline-item::after {
        left: 21px;
    }
}
/* Section globale */
.education-section {
    padding: 50px 0;
    font-family: Arial, sans-serif;
}

.titre-section {
    text-align: center;
    margin-bottom: 50px;
    font-size: 24px;
}

/* Conteneur de la timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* La ligne centrale verticale */
.ligne-centrale {
    position: absolute;
    width: 4px;
    background-color: #000; /* Noir comme sur le schéma */
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Conteneur de chaque diplôme */
.container-edu {
    padding: 10px 40px;
    position: relative;
    width: 50%; /* Occupe la moitié de la largeur */
    box-sizing: border-box;
}

/* Alignement alterné */
.gauche { left: 0; text-align: right; }
.droite { left: 50%; text-align: left; }

/* Les boîtes de texte */
.contenu-edu {
    padding: 20px;
    background-color: #1a202c; /* Fond sombre de votre site original */
    color: white;
    border-radius: 15px;
    border: 2px solid #000;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.contenu-edu strong { display: block; margin-bottom: 5px; }
.contenu-edu p { margin: 0; color: #3182ce; } /* Couleur bleue pour le diplôme */

/* Trait horizontal de liaison (la flèche/trait) */
.container-edu::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 40px;
    height: 3px;
    background-color: #3182ce; /* Couleur bleue de liaison */
    z-index: 1;
}

.gauche::before { right: 0; }
.droite::before { left: 0; }

/* Point de jonction sur la ligne centrale */
.point-jonction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 3px solid #000;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.gauche .point-jonction { right: -8px; }
.droite .point-jonction { left: -8px; }

/* Responsive : Tout sur une colonne pour mobile */
@media screen and (max-width: 600px) {
    .ligne-centrale { left: 31px; }
    .container-edu { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .droite { left: 0; }
    .gauche::before, .droite::before { left: 31px; width: 39px; }
    .gauche .point-jonction, .droite .point-jonction { left: 23px; }
}
/* --- STYLE TIMELINE COMPÉTENCES --- */
.education-section {
    padding: 50px 0;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.ligne-centrale {
    position: absolute;
    width: 4px;
    background-color: #000;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.container-edu {
    padding: 15px 50px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.gauche { left: 0; text-align: right; }
.droite { left: 50%; text-align: left; }

/* Boîtes de contenu */
.contenu-edu {
    padding: 20px;
    background-color: #1a202c; /* Ton fond sombre */
    border: 2px solid #000;
    border-radius: 15px;
    position: relative;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
}

.badge-categorie {
    display: inline-block;
    padding: 4px 12px;
    background-color: #3182ce; /* Bleu accent */
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 10px;
}

.contenu-edu strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
}

.contenu-edu p {
    margin: 0;
    color: #a0aec0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Points de jonction */
.point-jonction {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border: 3px solid #000;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.gauche .point-jonction { right: -11px; }
.droite .point-jonction { left: -11px; }

/* Traits de liaison horizontaux */
.container-edu::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 50px;
    height: 3px;
    background-color: #000;
    z-index: 1;
}

.gauche::before { right: 0; }
.droite::before { left: 0; }
/* Ajoute ceci à la fin de ton style.css pour gérer la grille de compétences */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

.skills-grid .card-exp {
    width: 45%; /* Affiche 2 cartes par ligne */
    min-width: 300px; /* Evite qu'elles soient trop petites sur mobile */
    margin: 0; /* On gère l'espacement avec gap */
}

/* Petit ajustement pour que les listes soient jolies */
.skill-list li {
    margin-bottom: 8px;
    padding-left: 0;
    list-style-type: none; /* On enlève les puces par défaut */
}
.skill-list li::before {
    content: "🔹"; /* Puce personnalisée */
    margin-right: 10px;
    font-size: 0.8em;
}
