@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0d47a1; /* Bleu foncé du CV */
    --secondary-color: #fdd835; /* Jaune/Or du CV */
    --background-color: #f4f7f6; /* Blanc cassé */
    --text-color: #333;
    --light-gray: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
}

header {
    background: white;
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: top 0.3s;
}

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

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

main {
    padding-top: 80px; /* hauteur du header */
}

section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: auto;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
}
section h2::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Accueil Section */
#accueil {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.accueil-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

.accueil-text h1 {
    font-size: 3rem;
}

.accueil-text h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.accueil-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.accueil-img {
    flex-shrink: 0;
}
.accueil-img img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.social-links a {
    color: var(--text-color);
    font-size: 2rem;
    margin-right: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Projets Section */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.projet-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.projet-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.projet-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.technologies {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.technologies span {
    background-color: var(--light-gray);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Compétences Section */
.competences-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.categorie {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.categorie h3{
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}
.categorie ul {
    list-style: none;
}
.categorie li{
    margin-bottom: 0.5rem;
}

/* Formation Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: auto;
}
.timeline::after{
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 60px;
}
.timeline-item:nth-child(even) {
    left: 50%;
     padding-left: 60px;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot{
     right: -10px;
}
.timeline-item:nth-child(even) .timeline-dot{
    left: -10px;
}
.timeline-date{
    font-weight: 600;
    color: var(--primary-color);
}
.timeline-content h3{
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Footer Section */
footer {
    background-color: var(--text-color);
    color: var(--background-color);
    text-align: center;
    padding: 40px 5%;
}

footer h2 {
     font-size: 2rem;
     margin-bottom: 20px;
}
footer p {
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-contact {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-contact:hover {
    background: #0b3d87;
}

.footer-links{
    margin-top: 20px;
}
.footer-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
}
.copyright{
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}


/* Responsive Design */
@media(max-width: 768px){
    .accueil-content {
        flex-direction: column-reverse;
        text-align: center;
    }
     .accueil-img img {
        width: 250px;
        height: 250px;
    }
     nav ul{
        display: none; /* Simplification pour le mobile, un menu burger serait idéal */
     }

     .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0;
        text-align: left;
    }
     .timeline-item:nth-child(odd), .timeline-item:nth-child(even){
        left: 0;
        padding-left: 60px;
         text-align: left;
    }
     .timeline-dot {
        left: 10px;
    }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot{
        left: 11px;
    }
}
