body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: white;
    background: #0a0a0a;
    overflow-x: hidden;
    line-height: 1.6;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 7%;
    left: 50%;
    width: 95%;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.5);
}

.navbar-container {
    max-width: 1200px;
    width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
    position: relative;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    background: #00ff00;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-links a:hover {
    background: #00cc00;
    color: white;
    transform: translateY(-2px);
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #00ff00;
    margin: 2px 0;
    transition: all 0.3s ease;
}

/* Welcome Section Styles */
.welcome-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 100px;
    padding: 20px;
    width: 100%;
}

.welcome-section {
    text-align: center;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    animation: slideIn 1s ease forwards;
    opacity: 0;
}

.welcome-title {
    font-size: 3rem;
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    margin-bottom: 20px;
    animation: typewriter 2s steps(40) forwards;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
}

.welcome-text {
    color: #ffffff;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.avatar-container {
    margin-right: 40px;
    position: relative;
    animation: sway 4s infinite ease-in-out;
}

#avatar-canvas {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.avatar-container:hover #avatar-canvas {
    transform: rotate(10deg) scale(1.1);
}

.content {
    position: relative;
    z-index: 1;
    padding: 100px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

/* Styles pour les sections avec arrière-plan */
.section {
    position: relative;
    background: rgba(0, 0, 0, 0.5); /* Fond sombre pour le contenu */
    padding: 25px;
    margin: 25px auto;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    overflow: hidden; /* Pour contenir le pseudo-élément */
    z-index: 1; /* Pour placer le contenu au-dessus de l'arrière-plan */
    width: calc(100% - 30px);
    max-width: 100%;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('1.png') center/cover; /* Remplacez par votre image */
    opacity: 0.3; /* Opacité de l'arrière-plan */
    z-index: -1; /* Pour placer l'arrière-plan derrière le contenu */
}

/* Exemple d'arrière-plan spécifique pour chaque section */
#about::before {
    background: url('1.png') center/cover;
}

#education::before {
    background: url('2.png') center/cover;
}

#skills::before {
    background: url('4.png') center/cover;
}

#projects::before {
    background: url('3.png') center/cover;
}

#contact::before {
    background: url('5.png') center/cover;
}

h1, h2 {
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
    margin-bottom: 15px;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

#project1 {
    background: rgba(255, 0, 0, 0.1); /* Rouge */
}
#project1:hover {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); /* Ombre rouge */
}

#project2 {
    background: rgba(0, 255, 0, 0.1); /* Vert */
}

#project3 {
    background: rgba(0, 0, 255, 0.1); /* Bleu */
}
#project3:hover {
    box-shadow: 0 0 15px rgba(0, 0, 255, 0.5); /* Ombre bleue */
}

.contact-links {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}   

.contact-links a {
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Espace entre l'icône et le texte */
}

.contact-links a i {
    font-size: 35px; /* Taille des icônes */
    transition: text-shadow 0.3s ease;
}

/* Couleurs et effets pour l'icône Email */
.email-link {
    color: #d44638; /* Couleur rouge pour l'email */
}

.email-link:hover {
    color: #d44638;
    text-shadow: 0 0 10px #d44638;
}

.email-link:hover i {
    text-shadow: 0 0 10px #d44638, 0 0 20px #d44638, 0 0 30px #d44638;
}

/* Couleurs et effets pour l'icône GitHub */
.github-link {
    color: #837f7f; /* Couleur noire pour GitHub */
}

.github-link:hover {
    color: #5f5757;
    text-shadow: 0 0 10px #333;
}

.github-link:hover i {
    text-shadow: 0 0 10px #636262, 0 0 20px #333, 0 0 30px #333;
}

/* Couleurs et effets pour l'icône LinkedIn */
.linkedin-link {
    color: #0077b5; /* Couleur bleue pour LinkedIn */
}

.linkedin-link:hover {
    color: #0077b5;
    text-shadow: 0 0 10px #0077b5;
}

.linkedin-link:hover i {
    text-shadow: 0 0 10px #0077b5, 0 0 20px #0077b5, 0 0 30px #0077b5;
}

/* Keyframes */
@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes typewriter {
    to {
        width: 100%;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Media Queries - Optimisés pour iPhone et autres mobiles */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .navbar {
        width: 95%;
        left: 50%;
        transform: translateX(-50%);
        top: 10px;
        border-radius: 20px;
        z-index: 1000;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        border-radius: 0 0 10px 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 14px;
        padding: 8px 12px;
        background: #00ff00;
        border-radius: 10px;
        text-align: center;
        width: 100%;
    }

    .navbar-container {
        padding: 0 20px;
    }

    .welcome-container {
        flex-direction: column;
        margin-top: 70px;
        padding: 0 15px;
        width: 100%;
    }
    
    .welcome-section {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }

    .avatar-container {
        margin: 0 auto 20px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #avatar-canvas {
        width: 150px;
        height: 150px;
    }

    .welcome-title {
        font-size: 6vw;
        white-space: normal;
        width: 100% !important;
        overflow: visible;
        animation: fadeIn 1s ease 0.5s forwards;
        opacity: 0;
    }
    
    .content {
        padding: 70px 15px 20px;
        width: 100%;
    }
    
    .section {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 20px 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    h1, h2 {
        font-size: 1.8rem;
    }
}

/* Spécifique pour les très petits écrans */
@media (max-width: 350px) {
    .welcome-title {
        font-size: 7vw;
    }
    
    .nav-links a {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    #avatar-canvas {
        width: 120px;
        height: 120px;
    }
}