* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

html, body {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #0B1D3B;
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

header .container {
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav {
    position: relative;
}

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

.section {
    width: 90%;
    margin: 2rem auto 0.2rem auto;
    background: #fff;
    padding: 1rem;
    border: black 0.5px solid;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1 0 auto;
}

.section:first-of-type {
    margin-top: 8rem;
}
.section:last-of-type {
    margin-bottom: 2rem;
}

.section h2,
.section p,
.section ul,
.section ol {
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}

h2 {
    color: #0B1D3B;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0B1D3B;
    padding-bottom: 5px;
    display: block;
}

.competence-category {
    margin-bottom: 1rem;
}

.competence-category h3 {
    margin-bottom: 0.5rem;
    color: #0B1D3B;
    font-size: 1.2rem;
}

.subskills {
    list-style: none;
    padding-left: 0;
}

.subskill-item {
    margin-bottom: 6px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.subskill-title {
    width: 100%;
    text-align: left;
    background-color: #0B1D3B;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.subskill-title:hover {
    background-color: #0E254C;
    transform: translateX(3px);
}

.subskill-content {
    max-height: 0;
    overflow: hidden;
    background-color: #f3f4f6;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 15px;
}

.subskill-content p {
    margin: 8px 0;
    color: #333;
}

.subskill-item.active .subskill-content {
    max-height: 200px;
    padding: 10px 15px;
}

.btn-more {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #0B1D3B;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.btn-more:hover {
    background-color: #0E254C;
    transform: translateY(-2px);
}

.stage-item {
    margin-bottom: 6px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.stage-title {
    width: 100%;
    text-align: left;
    background-color: #0B1D3B;
    color: #fff;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 6px 6px 0 0;
    transition: background 0.3s;
}

.stage-title:hover {
    background-color: #0E254C;
}

.stage-content {
    max-height: 0;
    overflow: hidden;
    background-color: #f3f4f6;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 15px;
}

.stage-item.active .stage-content {
    max-height: 300px;
    padding: 10px 15px;
}

.certification-item {
    margin-bottom: 6px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.certification-title {
    width: 100%;
    text-align: left;
    background-color: #0B1D3B;
    color: #fff;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 6px 6px 0 0;
    transition: background 0.3s;
}

.certification-title:hover {
    background-color: #0E254C;
}

.certification-content {
    max-height: 0;
    overflow: hidden;
    background-color: #f3f4f6;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 15px;
}

.certification-item.active .certification-content {
    max-height: 200px;
    padding: 10px 15px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
}

.project {
    background: #e5e7eb;
    padding: 1rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.timeline li {
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 3px solid #0B1D3B;
}

.certificates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.certificates img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s;
}

.certificates img:hover {
    transform: scale(1.05);
}

#lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

#lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 2100;
    transition: color 0.3s;
}

#lightbox .close-btn:hover {
    color: #ff4d4d;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    background-color: #0B1D3B;
    color: #fff;
    z-index: 1000;
}

body::after {
    content: "";
    display: block;
    height: 4rem;
}

.profil-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
}

.profile-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

#profil p {
    flex: 1;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-height: 200px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav li {
        margin: 0 0.5rem;
    }

    .section {
        width: 95%;
        padding: 1rem;
        margin: 6rem auto 0.5rem auto;
    }

    .certificates img {
        max-width: 90%;
    }

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

    .profile-image {
        margin-bottom: 1rem;
    }
}

ul {
    list-style: disc;
    margin-left: 1.5rem;
}

#infos p strong {
    color: #0B1D3B;
}

.info-entreprise {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.info-entreprise img {
    width: 120px;
    height: auto;
    border-radius: 10px;
}

.texte-entreprise p {
    margin: 5px 0;
}

.info-entreprise img {
    width: 30%;
}