/* --- CONFIGURATION GLOBALE --- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #f5f6fa;
    color: #222;
    line-height: 1.6;
}

/* --- EN-TÊTE --- */
header {
    background: #222;
    color: #fff;
    padding: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom: 3px solid #4f8dff;
}

.header-link { 
    color: inherit; 
    text-decoration: none; 
    font-weight: 600; 
}

.profile {
    display: flex;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
}

.profile img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-right: 25px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    object-fit: cover;
}

.profile img:hover {
    transform: scale(1.1) rotate(3deg);
    border-color: #4f8cff;
}

.profile-info h1 {
    margin: 0 0 5px 0;
    font-size: 2.2em;
    color: #4f8cff;
}

.profile-info p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.9;
    color: white;
}

/* --- NAVIGATION --- */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
}

nav a:hover, nav a:focus {
    background: rgba(79, 140, 255, 0.2);
    color: #4f8cff;
}

.nav-active {
    background: #4f8cff !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

/* --- CONTENU PRINCIPAL --- */
main {
    max-width: 900px;
    width: 90%;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    flex: 1;
}

main:hover {
    transform: translateY(-5px);
}

a, button, nav a, .profile img, main {
    transition: all 0.3s ease;
}

h1, h2, h3 {
    color: #2d3a4b;
    margin-top: 0;
}

p {
    margin-bottom: 1.5rem;
    color: #444;
}

/* --- INDEX --- */
.a-propos {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.sommaire {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #4f8cff;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #4f8cff;
}

.a-propos-sidebar {
    background: #fafbfc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.info {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.info li {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.info li strong {
    color: #4f8cff;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.tags span {
    background: #eef4ff;
    color: #4f8cff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
}

/* --- MES FORMATIONS --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 30px 0;
    padding-left: 40px;
    border-left: 3px solid #4f8cff; /* La ligne bleue à gauche */
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

/* Le petit rond sur la ligne */
.timeline-item::before {
    content: "";
    position: absolute;
    left: -48px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #4f8cff;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #4f8cff;
}

.timeline-date {
    font-weight: 700;
    color: #4f8cff;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.timeline-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    background: #fff;
    border-right: 4px solid #4f8cff; 
}

.timeline-content h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2d3a4b;
}

.institution {
    font-style: italic;
    color: #666;
    margin: 5px 0 10px 0;
    font-size: 0.9em;
}

.badge-diploma {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
}

.badge-diploma { 
    background: #e1f5fe; 
    color: #0288d1; 
}

/* --- COMPLÉMENT STYLE TIMELINE --- */
.badge-exp {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    background: #f0f2f5; /* Gris clair par défaut */
    color: #555;
}

/* --- MES COMPETENCES --- */
table.competences {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 25px;
    background: #fff;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e4e8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table.competences thead th {
    background: #4f8cff;
    color: #fff;
    text-align: left;
    padding: 15px 18px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

table.competences tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
}

table.competences td:first-child {
    font-weight: 700;
    color: #2d3a4b;
    width: 200px;
}

.tech-column {
    font-weight: 700 !important;
    color: #4f8cff;
    width: 250px;
}

table.competences tbody tr:last-child td {
    border-bottom: none;
}

table.competences tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

table.competences tbody tr:hover {
    background-color: #f0f7ff;
}

/* --- MES CENTRES D'INTÉRÊTS --- */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.interest-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.interest-card:hover {
    transform: translateY(-10px);
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: #4f8cff;
}

.interest-icon {
    font-size: 2.5em;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.interest-content h3 {
    margin: 0 0 10px 0;
    color: #2d3a4b;
}

.interest-content p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 15px;
}

/* Petits badges pour les intérêts */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tags span {
    font-size: 0.75em;
    background: #eef4ff;
    color: #4f8cff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- LISTE DE CONTACT --- */
.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.contact-list li {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.contact-list .label {
    min-width: 110px;
    font-weight: 700;
    color: #4f8cff;
}

.contact-link {
    color: #2d3a4b;
    font-weight: 600;
    text-decoration: none;
}

.contact-link:hover {
    color: #4f8cff;
    text-decoration: underline;
}

/* --- PIED DE PAGE --- */
.site-footer {
    background: #222;
    color: #fff;
    padding: 40px 20px;
    border-top: 3px solid #4f8cff;
    text-align: center;
}

.footer-grid {
    max-width: 900px;
    margin: 0 auto;
}

.site-footer p {
    margin: 0;
    font-size: 0.9em;
    color: #bbb;
}

/* --- RESPONSIVE (MOBILE) --- */
.burger-btn {
    display: none;
}

@media (max-width: 850px) {

    header, footer {
        position: static !important;
        width: 100% !important;
        height: auto !important;
    }

    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: block;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .profile img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .profile-info h1 {
        font-size: 1.8em;
    }

    main {
        width: auto;
        margin: 15px;
        padding: 20px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .a-propos, 
    .cv-layout, 
    .summary-cards, 
    .interests-grid {
        grid-template-columns: 1fr !important;
    }

    .burger-btn {
        display: block;
        margin: 0 auto 15px;
        background: #4f8cff;
        color: white;
        border: none;
        padding: 10px 25px;
        border-radius: 30px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-size: 0.8em;
        box-shadow: 0 4px 15px rgba(79, 140, 255, 0.4);
        cursor: pointer;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        background: #2d3a4b;
        margin: 10px 20px;
        gap: 0;
        padding: 0;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .nav-list.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .nav-list li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 15px 0;
        text-align: center;
        border-radius: 0;
        box-sizing: border-box;
        margin: 0 !important; 
        line-height: normal; 
    }

    .nav-list a:hover {
        background: rgba(79, 140, 255, 0.2);
        color: #fff;
    }

    .interest-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    table.competences {
        display: block;
        overflow-x: auto;
    }

    .contact-list li {
        flex-direction: column; /* Superpose le label et le lien */
        text-align: center;      /* Centre le texte */
        padding: 20px 15px;      /* Un peu plus d'espace vertical */
    }

    .contact-list .label {
        min-width: 0;            /* Annule la largeur fixe du PC */
        margin-bottom: 8px;      /* Espace sous le titre (Email, etc.) */
        width: 100%;
    }

    .contact-link {
        width: 100%;
        word-wrap: break-word;   /* Coupe l'email s'il est trop long pour l'écran */
        font-size: 0.95em;       /* Légère réduction pour éviter les débordements */
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}