/* Réinitialisation et styles de base */
:root {
    --primary-color: #3498db; /* Bleu */
    --secondary-color: #2c3e50; /* Bleu foncé/gris */
    --background-color: #ecf0f1; /* Gris clair */
    --text-color: #34495e; /* Gris foncé */
    --light-color: #ffffff; /* Blanc */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header et Navigation */
header {
    background-color: var(--light-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

/* Sections principales */
main {
    padding-top: 80px; /* Hauteur du header */
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 3rem;
    color: var(--secondary-color); /* Couleur revenue à la normale */
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section - REVENUE À LA VERSION SANS FOND */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

#hero p strong {
    color: var(--primary-color);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* Section À propos */
#a-propos {
    background-color: var(--light-color);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.about-container img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

/* Section CV */
#cv {
    background-color: var(--light-color);
}

#cv p {
    margin-bottom: 2rem;
}

#cv p {
    margin-bottom: 2rem;
}

/* Styles pour la section Expériences */
#experiences {
    background-color: var(--light-color);
}

.experience-item {
    display: flex;
    gap: 2rem;
    align-items: center;
    text-align: left;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.experience-item img {
    /* On définit une taille maximale pour que les grands logos ne dépassent pas. */
    max-width: 200px;
    max-height: 200px;
    
    /* On laisse le navigateur calculer la largeur et hauteur pour garder les proportions. */
    width: auto;
    height: auto;
    
    object-fit: contain; /* Assure que l'image entière est visible sans être coupée. */
    
    /* NOUVELLE LIGNE AJOUTÉE 👇 */
    padding: 5px; /* Crée de l'espace entre l'image et la bordure */
    
    border-radius: 10px;
    border: 3px solid var(--primary-color);
    background-color: white; /* Ajout d'un fond blanc pour que le padding soit visible */
}

.experience-details h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.experience-date {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.soft-skills {
    margin-top: 1rem;
}

.soft-skills h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.soft-skills span {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Section Projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.project-card h3 {
    font-size: 1.5rem;
    margin: 1rem;
    color: var(--secondary-color);
}

.project-card p {
    margin: 0 1rem 1rem;
}

.project-card a {
    display: inline-block;
    margin: 0 1rem 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
}

/* Section Compétences */
#competences {
    background-color: var(--light-color);
}
.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.skills-list span {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
}

/* Section Contact */
#contact p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--light-color);
    text-align: center;
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none; /* Ou créer un menu burger */
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }
}

/* Style pour l'icône du burger */
.burger {
    display: none; /* Caché par défaut sur grand écran */
    cursor: pointer;
    font-size: 1.5rem;
}

/* Style pour le bouton retour en haut */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--light-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0; /* Caché par défaut */
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: scale(1.1);
}

/* Classes pour les animations de défilement */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Responsive - MODIFIÉ */
/* Responsive - MODIFIÉ */
@media (max-width: 768px) {
    /* ... (les autres styles responsives) ... */

    .experience-item {
        flex-direction: column;
        text-align: center;
    }

    .experience-details {
        text-align: center;
    }

    /* Styles pour le menu mobile */
    .burger {
        display: block; /* Affiche l'icône burger */
    }
    
    .nav-links {
        position: fixed;
        top: 80px; /* Hauteur du header */
        right: 0;
        height: calc(100vh - 80px);
        width: 60%;
        background-color: var(--light-color);
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        transform: translateX(100%); /* Cache le menu sur le côté */
        transition: transform 0.5s ease-in-out;
        z-index: 2000;
    }

    .nav-links li {
        opacity: 0;
    }

    /* Classe ajoutée par le JS */
    .nav-active {
        transform: translateX(0%);
    }

    /* Animation pour les liens du menu mobile */
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
}