
/* Styles des titres de section */
.section-title {
    font-size: 2em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.subsection-title {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--dark-text-primary);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-color);
    opacity: 0.9;
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-color);
    color: var(--dark-text-primary);
    box-shadow: 0 6px 15px var(--shadow-color);
}

.small-btn {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Carte générique (pour projets, compétences, etc.) */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card.move:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

/* --- Header --- */
.main-header {
    display: flex;
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    flex-direction: column;
    align-items: start;
    padding: 60px 0 20px 0;
    /* z-index: 1000; */
    z-index: 500;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition : left .5s ease-out;
}

.main-header.active {
    left: 0;
}

#menu-burger {
    display: block;
    position: fixed;
    width: 50px;
    height: 50px;
    background: var(--header-bg);
    color: var(--primary-color-rgb);
    border-radius: 50%;
    top: 10px;
    left: 10px;
    z-index: 501;
}

#menu-burger span {
    position: relative;
    width: 25px;
    height: 2px;
    display: block;
    background: var(--primary-color);
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    transition: .2s;
}

#menu-burger span::before, #menu-burger span::after {
    content: "";
    display: block;
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
}

#menu-burger span::before {
    transform: translateY(-7px);
    transition: .2s;
}

#menu-burger span::after {
    transform: translateY(7px);
    transition: .2s;
}

#menu-burger.open span {
    background: transparent;
}

#menu-burger.open span::before {
    transform: translateY(0) rotate(45deg);
}

#menu-burger.open span::after {
    transform: translateY(0) rotate(-45deg);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-direction: column;
    gap: 20px;
}


.logo {
    display: flex;
    align-items: flex-end;
}

.logo-text {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
    line-height: 1;
}

.logo-name-mobil, .logo-name-desktop {
    color: var(--primary-color);
    letter-spacing: 1px;
    font-weight: bold;
}

.logo-name-mobil {
    font-size: 2em;
}

.logo-name-desktop {
    display: none;
    font-size: 1.2em;
}

.main-nav ul {
    list-style: none;
    display: flex;
        flex-direction: column;
}

.main-nav ul li {
    margin: 5px 0;
}

.main-nav ul li a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: none;
}

.toggle-label {
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-label::before {
    content: '';
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.theme-toggle:checked + .toggle-label {
    background-color: var(--primary-color);
}

.theme-toggle:checked + .toggle-label::before {
    transform: translateX(24px);
    background-color: #fff;
}


/* --- Hero Section --- */
.hero-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden; 
}

.hero-section .container {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    flex: 1; 
    justify-content: center;
    max-width: 800px;
}

.hero-left {
    position: relative;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    padding: 5px;
    box-shadow: var(--shadow);
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 45%;
    display: block;
}

.hero-right h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    line-height: 1.1;
    color: var(--text-color);
}

.hero-right .tagline {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.hero-left, .hero-right {
    text-align: center;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}



/* --- Sections Générales --- */
.section {
    padding: 50px 0;
}

.section.grey-background {
    background-color: var(--section-bg-alt);
}

/* --- À Propos --- */
.about-content {
    /* display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 30px;
    flex-wrap: wrap; */
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    /* flex: 2; */
    font-size: 1.1em;
    line-height: 1.8;
    text-align: justify;
    max-width: 100%;
}

.about-illustration {
    flex: 1;
    max-width: 250px;
    height: auto;
    opacity: 0.8;
}

/* --- Expériences et Formations --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;

}


.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}

.timeline-badges {
    position: absolute;
    background-color: var(--primary-color);
    color: var(--dark-text-primary);
    border-radius: 20px;
    top: 10px;
    z-index: 1;
    padding: 5px 8px 5px;
    transform: translate(-20%, -70%);
    box-shadow: var(--shadow);
}


.timeline-content {
    padding: 20px;
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content .dates {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.timeline-content ul {
    list-style: inside;
    margin-top: 10px;
    padding-left: 0;
}

/* --- Projets --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 0; 
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    margin-bottom: 15px;
}

.project-card h4 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 20px;
}

.project-card p {
    font-size: 0.95em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding: 0 20px;
}

.project-tech-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.project-tech-badges span {
    background-color: var(--primary-color);
    color: var(--dark-text-primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.project-card .btn {
    margin-bottom: 20px;
    background: var(--primary-color);
    color: var(--card-bg);
}

.project-list-compact {
    list-style: none;
    padding: 25px;
    margin-top: 40px;
    line-height: 2;
}

.project-list-compact li {
    font-size: 1.1em;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.project-list-compact li .title-subproject {
    font-weight: bold;
    color: var(--primary-color);
}

.project-list-compact li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


/* --- Competences --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 25px;
    min-width: 120px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.skill-item i {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* --- Contact --- */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
}

.contact-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

#form-contact {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.3); 
}

span[data-helper] {
    color: red;
    display: block;
    height: 22px;
    opacity: 0;
}

.form-group input.invalid ~ span[data-helper],
.form-group textarea.invalid ~ span[data-helper] {
    opacity: 1;
}


/* Pour la couleur primaire en RGB pour le box-shadow */
body.dark-mode { --primary-color-rgb: 114, 137, 218; } /* #7289da */
body.light-mode { --primary-color-rgb: 0, 123, 255; } /* #007bff */


.social-links {
    margin-top: 30px;
}

.social-links a {
    font-size: 1.8em;
    margin: 0 15px;
    color: var(--secondary-color);
}

.social-links a i {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-links a:hover i {
    transform: translateY(-5px);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--header-bg);
    padding: 30px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-top: 50px;
    box-shadow: 0 -2px 10px var(--shadow-color);
}


/* --- Pages Details ---*/
#section-projet {
    margin-bottom: 50px;
}

#section-projet #back-to-home{
    position: fixed;
    bottom: 10px;
    right: 10px;
}

#section-projet .subsection-title {
    display: inline-block;
    border-bottom: 2px solid var(--primary-color);
}

#section-projet ul {
    margin-left: 30px;
}

#section-projet li ul li {
    list-style: square;
}

#section-projet .fonction-role {
    padding: 20px 20px 0;
    margin-top : 15px;
    font-size: 1.3em;
    color: var(--primary-color);
}

#section-projet h1 {
    font-size : 2.3em;
    text-align: center;
}

#section-projet .container h2 {
    margin-bottom : 15px;
}


@media (min-width: 768px) {
    .section-title {
        font-size: 2.5em;
        margin-bottom: 30px;
    }
    .hero-content {
        flex-direction: row;
    }
     .hero-right h1 {
        font-size: 3.5em;
    }

    .hero-right .tagline {
        font-size: 1.4em;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .timeline-item {
        padding: 10px 40px;
    }

    /* .timeline-item .timeline-badges {
        transform: translate(-50%, -50%);
    } */

    
    
}

@media (min-width: 992px) {
    #menu-burger {
        display: none;
    }

    .main-header {
        width: 100%;
        height: initial;
        left: 0;
        padding: 20px 0;
    }

    .main-header .container {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .logo-name-mobil {
        display: none;
    }

    .logo-name-desktop {
        display: block;
    }

     .main-nav ul {
        flex-direction: row;
    }

    .main-nav ul li {
        margin: 0;
        margin-left: 30px;
    }

    .hero-section {
        padding: 100px 0 80px 0;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: start;
        gap: 20px;
    }
    
    .hero-left, .hero-right {
        text-align: left;
    }

    /* .about-content {
        flex-direction: row;
        gap: 50px;
    } */

     /* .about-content p {
        max-width: 600px;
    } */

    .timeline-item .timeline-badges {
        transform: translate(-50%, -50%);
    }
}


