body {
    margin: 0;
    font-family: Arial, sans-serif;
    scroll-behavior: smooth;
}


body {
    background: #f8f9fb;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ---- LAYOUT GLOBAL ---- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #143677;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 10px 0;
    height: 60px;
    display: flex;
    text-align: center;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 40px;
}

nav .menu-item {
    margin: 0 15px;
    color: #262626;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav .menu-item.active {
    color: #fff;
}


/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img {
    height: 120px;
    width: auto;
    margin-top: 50px;
}

/* NAVIGATION */
.nav-links a {
    margin: 0 15px;
    text-decoration: none;
    color: #636262;
    font-weight: 600;
    transition: color .25s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

/* SOCIAL ICONS */
.social-icons img {
    height: 24px;
    margin-left: 12px;
    opacity: 0.75;
    transition: 0.25s ease;
}

.social-icons img:hover {
    opacity: 1;
    transform: scale(1.1);
}


/* FOOTER */
.site-footer {
    background: #143677;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.site-footer p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-socials img {
    height: 28px;
    margin: 0 10px;
    opacity: 0.8;
    transition: .3s ease;
}

.footer-socials img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* SECTIONS */
.section {
    min-height: 100vh;
    padding: 120px 40px 40px;
    text-align: center;
}

/* Section home */
.home-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0 20px;
    text-align: center;
}

.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    transform: translateY(-120px);
}

.home-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.home-text {
    max-width: 600px;
    text-align: left;
}

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

/* TIMELINE */
#experience .timeline-content {
    text-align: left;
}

#experience .timeline-content strong,
#experience .timeline-content br + text {
    text-align: center;
}

#experience .timeline-content strong,
#experience .timeline-content .company {
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.timeline {
    position: relative;
    margin: 50px 0;
    padding-left: 30px;
    list-style: none;
    border-left: 3px solid #005bff; /* ligne verticale */
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -45px; /* centrage du cercle */
    top: 0;
    width: 20px;
    height: 20px;
    background: #005bff;
    border-radius: 50%;
    border: 3px solid white;
}

.timeline-content {
    background: #f8f9fb;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.timeline-content strong {
    color: #143677;
}

/* animation active */
.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}


/* Menu details */
#competences details {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 15px 0;
    padding: 15px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

#competences details[open] {
    background: #f0f4ff;
}

#competences summary {
    font-size: 1.2rem;
    font-weight: 600;
    color: #143677;
    list-style: none;
    outline: none;
}

#competences summary::-webkit-details-marker {
    display: none;
}

#competences details ul {
    text-align: left;
    margin-top: 10px;
    padding-left: 20px;
    list-style-type: disc;
}

#competences details li {
    padding: 6px 0;
    color: #333;
}

.skill-title {
    font-weight: bold;
    color: #000000;
}

/* Hover & animation */
#competences details:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

/* PROJECT GRID */
.grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card {
    display: block;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: black;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.25s;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card h3 {
    padding: 15px 15px 0;
}

.card p {
    padding: 0 15px 15px;
    color: gray;
}

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


/* CONTACTS */
/* Email */
.contact-email {
    color: #143677;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: #005bff;
    text-decoration: underline;
}


/* PAGES PROJETS */
.project-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #143677;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
}

.project-header .project-name {
    color: #d1d1d1;
    font-weight: bold;
    font-size: 1.2rem;
}

.project-header .project-home-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 8px 16px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-header .project-home-link:hover {
    background: #ffffff;
    color: #143677;
}

/* Décaler le contenu sous le header */
.project-content {
    padding-top: 90px;
}

/* Titres et sous-titres */
body.project-page h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333333;
}

body.project-page .project-subtitle {
    color: #888888;
    margin-top: -5px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Image principale */
body.project-page .project-cover {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* Liste de fonctionnalités */
body.project-page .project-list li {
    margin-bottom: 8px;
}

/* Galerie */
body.project-page .gallery-img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 20px;
}

/* Sections du projet */
body.project-page section {
    margin-bottom: 50px;
}

/* MOBILE */
@media (max-width: 768px) {

    /* Global */
    body {
        font-size: 15px;
        line-height: 1.5;
    }

    .content-wrapper {
        padding: 10px;
    }

    /* HEADER (toutes pages) */
    header {
        height: auto;
        padding: 12px 0;
    }

    .header-container {
        padding: 0 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    nav .menu-item {
        margin: 8px;
        display: inline-block;
        font-size: 0.95rem;
    }

    .logo img {
        height: 80px;
        margin-top: 10px;
    }

    /* HOME */
    .home-container {
        flex-direction: column;
        gap: 25px;
        transform: none;
        margin-top: 40px;
        text-align: center;
    }

    .home-text {
        text-align: center;
        padding: 0 10px;
    }

    .home-image img {
        width: 250px;
        height: 250px;
        margin-top: 250px;
        object-fit: cover;
        border-radius: 50%; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

    /* TIMELINE */
    .timeline {
        padding-left: 20px;
        border-left-width: 2px;
    }

    .timeline-item {
        transform: none !important;
        opacity: 1 !important; /* Toujours visible sur mobile */
    }

    .timeline-content {
        padding: 12px 15px;
    }

    .timeline-item::before {
        left: -32px;
        width: 14px;
        height: 14px;
    }

    /* PROJECT GRID */
    .grid {
        grid-template-columns: 1fr; /* 1 colonne */
        gap: 20px;
    }

    .card img {
        height: 180px;
    }

    /* FOOTER */
    .site-footer {
        padding: 20px 10px;
        font-size: 0.9rem;
    }

    /* ----------- PAGES PROJETS ----------- */

    .project-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }

    .project-header .project-name {
        font-size: 1rem;
    }

    .project-header .project-home-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .project-content {
        padding-top: 100px;
    }

    /* TITRE / SOUS-TITRE */
    body.project-page h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    body.project-page .project-subtitle {
        font-size: 0.9rem;
        text-align: center;
    }

    /* IMAGE */
    body.project-page .project-cover {
        border-radius: 12px;
        margin-bottom: 20px;
    }

    /* GALLERIE */
    .project-gallery .grid {
        grid-template-columns: 1fr;
    }

    /* SECTIONS */
    body.project-page section {
        margin-bottom: 35px;
    }
}