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

body {
    font-family: 'Segoe UI', Taurus, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}


/* Élargir spécifiquement le header */
header .container {
    max-width: 1800px; /* Header plus large */
    padding: 0 40px; /* Plus d'espace sur les côtés */
}

/* Garder les autres sections à une largeur normale pour la lisibilité */
.container {
    max-width: 1200px; /* Largeur normale pour le contenu */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.lang-btn:hover, .lang-btn.active {
    background: #ffd700;
    color: #333;
    border-color: #ffd700;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffd700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,0 800,1000 0,1000"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.3);
    margin: 0 auto 2rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-img i {
    font-size: 4rem;
    color: #333;
    display: none; /* Hide icon when image is loaded */
}

.profile-img.has-image i {
    display: none;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 12px 30px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-primary {
    background: #ffd700;
    color: #333;
    border-color: #ffd700;
}

.btn-primary:hover {
    background: #ffed4e;
    color: #333;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.skill-category h3 {
    color: #667eea;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -13px;
    background: #ffd700;
    border: 4px solid white;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.right::after {
    left: -12px;
}

.timeline-content {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.project-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem;
}

.project-body {
    padding: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: #e9ecef;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
}

/* Contact Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.contact-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.contact-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.quote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .timeline::before {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 19px;
    }

    .timeline-item.right {
        left: 0%;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        z-index: 999;
        text-align: center; /* Centre les liens */
    }
    
    .nav-links li {
        margin: 0.5rem 0; /* Espacement vertical */
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: white;
        border-radius: 3px;
        transition: 0.3s;
    }
    
    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative; /* Important pour le positionnement absolu */
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}


/* Header plus large et plus haut */
header .container {
    max-width: 100%;
    padding: 0 60px;
}

nav {
    padding: 2rem 0; /* Plus de hauteur */
}

.logo {
    font-size: 1.8rem; /* Logo plus grand */
}

.nav-links a {
    font-size: 1.1rem; /* Navigation plus lisible */
}


.lang-select {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    outline: none;
}

.lang-select:hover, .lang-select:focus {
    background: #ffd700;
    color: #333;
    border-color: #ffd700;
}

.lang-select option {
    background: #333;
    color: white;
}