body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: row;
}

/* Styles pour l'encart fixe à gauche */
.sidebar {
    background: #fff;
    padding: 1rem;
    width: 250px;
    position: fixed;
    top: 150px; /* Ajuste selon la hauteur du header */
    left: 0;
    height: calc(100% - 150px); /* Ajuste selon la hauteur du header */
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}


.sidebar .contact-info {
    width: 100%;
    text-align: left;
}

.sidebar .contact-info p {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}

.sidebar .contact-info i {
    margin-right: 0.5rem;
}

.sidebar h2 {
    margin-top: 2rem;
    text-align: center;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    width: 100%;
    text-align: left;
}

.sidebar ul li {
    margin-bottom: 0.5rem;
}

/* Styles pour le contenu principal */
.main-content {
    margin-left: 270px; /* Ajuste selon la largeur de la sidebar */
    padding: 1rem 2rem;
    flex: 1;
    margin-top: 100px; /* Ajuste selon la hauteur du header */
}

header {
    background: #555;
    color: #fff;
    padding: 1rem 2rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header img.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

header .header-content {
    flex-grow: 1;
    text-align: right;
}

header h1 {
    margin: 0;
}

header p {
    margin: 0.5rem 0 0;
}

section {
    margin-bottom: 1rem;
    background: #fff;
    padding: 1rem 2rem;
}

section h2 {
    margin-top: 0;
}

ul {
    padding-left: 1.5rem;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #555;
    color: #fff;
}

/* Center the first section horizontally and align text to the center */
section#summary {
    /*max-width: auto; /* Adjust the width as needed */
   /* margin: 10px;   /* Center the section horizontally */
    margin-top: 2rem;
    text-align: center; /* Center the text */
}

/* Flexbox for professional experiences */
section#experience-professionnelle .experience-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

section#experience-professionnelle .experience-container div {
    background: #f9f9f9;
    margin: 10px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* Adjust for 3 columns */
    box-sizing: border-box;
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        box-shadow: none;
        margin-top: 0;
    }

    .main-content {
        margin-left: 0;
        margin-top: 200px; /* Adjust according to the height of the header and sidebar */
    }

    header img.profile-photo {
        position: static;
        margin: 1rem auto;
    }

    header .header-content {
        text-align: center;
    }

    section#experience-professionnelle .experience-container div {
        flex: 1 1 100%; /* Stack items on small screens */
    }
}
