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

:root {
    --primary-color: #a78bfa; /* Violet doux */
    --background-color-start: #1e1b4b; /* Indigo foncé */
    --background-color-end: #4c1d95; /* Violet foncé */
    --card-background: rgba(255, 255, 255, 0.07);
    --text-color: #e5e7eb; /* Gris clair */
    --text-color-darker: #9ca3af; /* Gris moyen */
    --shadow-color: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, var(--background-color-start), var(--background-color-end));
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: var(--text-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(23, 21, 56, 0.5); /* Couleur de fond plus subtile */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem 0; /* Un peu plus d'espace */
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    color: var(--text-color-darker);
    text-decoration: none;
    font-size: 1rem; /* Police légèrement réduite */
    font-weight: 500; /* Moins gras */
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--text-color);
    text-shadow: none; /* Pas de text-shadow pour un look clean */
}

.hamburger {
    display: none; /* Caché par défaut sur grand écran */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(15, 12, 41, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 2rem 0;
    }

    nav ul li a {
        font-size: 1.5rem;
        color: var(--text-color);
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

main {
    padding-top: 80px;
}

section {
    padding: 6rem 2rem;
    text-align: center;
    min-height: auto; /* Hauteur réduite */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 4rem; /* Ajoute de l'espace entre les sections */
}

#accueil {
    min-height: 100vh; /* Prend toute la hauteur de la vue */
    padding-top: 0; /* Annule le padding du main pour un centrage parfait */
}

#accueil h1 {
    font-size: 4.5rem; /* Légèrement réduit pour un look moins imposant */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #fff;
}

#accueil p {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-color-darker);
}

h2 {
    font-size: 2.5rem; /* Titres de section plus petits */
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    color: #fff;
}

h2::after {
    content: '';
    display: block;
    width: 60px; /* Soulignement plus court */
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.about-text {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: var(--text-color-darker);
    line-height: 1.8;
    text-align: center; /* Assure le centrage du paragraphe */
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
}

.detail-item {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.detail-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.detail-item strong {
    color: var(--text-color);
    font-weight: 600;
}

.detail-item span {
    color: var(--text-color-darker);
}

#projets {
    width: auto;
    padding: 6rem 2rem;
    position: relative;
    overflow: visible; /* Rétablir le comportement par défaut */
}

.projets-container {
    display: flex;
    flex-wrap: wrap; /* Permet aux projets de passer à la ligne */
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 1100px; /* Limite la largeur maximale pour un meilleur contrôle */
}


.projet-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.projet-link:hover {
    transform: translateY(-10px); /* Effet de soulèvement plus subtil pour la grille */
}


.projet {
    background-color: var(--card-background);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 1rem; /* Bords plus arrondis */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease;
    width: 320px; /* Légèrement plus large */
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center; /* Centrer le contenu */
}

.projet-link:hover .projet {
    box-shadow: 0 6px 25px rgba(167, 139, 250, 0.2);
}

.projet h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.projet p {
    color: var(--text-color-darker);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem; /* Taille de police ajustée */
    color: var(--text-color-darker);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

.contact-link:hover {
    color: var(--text-color);
    transform: scale(1.05);
}

.contact-link i {
    font-size: 1.5rem;
    width: 25px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    background-color: transparent;
}
