:root {
    --primary: #2563EB;      /* Bleu professionnel */
    --primary-dark: #1D4ED8; /* Bleu foncé */
    --secondary: #60A5FA;    /* Bleu clair */
    --light: #F8FAFC;        /* Fond clair */
    --dark: #1E293B;         /* Texte foncé */
    --accent: #3B82F6;       /* Bleu accent */
    --success: #10B981;      /* Vert succès */
    --text: #334155;         /* Texte principal */
}

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

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
}

/* ===== MENU PROFESSIONNEL ===== */
.navbar {
    background: white;
    color: var(--dark);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Container SPÉCIFIQUE au menu (pas les autres) */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.logo:hover {
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.2));
}

.logo span {
    color: var(--accent);
    margin-left: 0.5rem;
}

.nav-links li {
    margin: 0; /* Supprime les marges entre les <li> */
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
}

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

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

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Sélecteur de langue */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0 !important; /* Supprime la marge gauche héritée */
}

.lang-switcher a {
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.lang-switcher a:hover {
    color: var(--primary);
}

.lang-switcher .lang-current {
    font-weight: 600;
    color: var(--primary);
}

.lang-switcher span {
    color: #9CA3AF;
    font-size: 0.8rem;
}

/* Menu hamburger (mobile) */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        clip-path: circle(0px at 90% -10%);
        transition: clip-path 0.5s ease-out;
        pointer-events: none;
    }

    .nav-links.active {
        clip-path: circle(1000px at 90% -10%);
        pointer-events: all;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .lang-switcher {
        margin: 0.5rem 0;
        flex-direction: row;
    }
}

/* ===== CONTAINERS GÉNÉRAUX (hors menu) ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SECTION PROJETS ===== */
.projets .container {
    padding-top: 2rem; /* Espace en haut si nécessaire */
}

.project-block {
    margin: 2rem 0; /* Marge verticale entre les cartes */
    gap: 2rem;
    /* Le reste de ton CSS pour les projets... */
}



/* ===== LOGO ROBOT ===== */
.logo i.fa-robot {
    margin-right: 0.5rem;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
    font-size: 1.6rem;
}

.logo:hover i.fa-robot {
    transform: scale(1.1) rotate(10deg);
    color: var(--accent);
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3));
}

/* ===== SECTION HERO ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
    color: var(--dark);
    padding-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCI+PHJlY3Qgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9zdmc+') repeat;
    opacity: 0.1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text);
}

/* ===== BOUTON HERO ===== */
.hero .btn {
    margin-top: 15px;
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===== BOUTONS CONTACT ===== */
.contact-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    transform: scale(1) !important;
}


.btn {
    margin-top: 15px;
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}

/* ===== SECTION PROJETS ===== */
.projets {
    padding: 5rem 0;
    background: white;
}

.projets h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
}

.projets h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===== CARTES PROJETS RESTYLÉES ===== */
.project-block {
    display: flex;
    margin: 2rem 0;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #E2E8F0;
}

.project-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
    border-color: var(--accent);
}

.project-3d {
    width: 50%;
    height: 300px;
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
}

.project-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-block:hover .project-3d img {
    transform: scale(1.05);
}

.scene-3d {
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f0ff 100%);
}

.project-block:hover .scene-3d {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

/* Conteneur des détails (position relative pour l'icône absolue) */
.project-details {
    position: relative;
    width: 50%;
    padding: 1rem;
}

/* Icône de catégorie (premier projet uniquement) */
.project-with-category .project-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .project-with-category .project-category {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 1rem;
        display: inline-flex;
    }
    .project-with-category h3 {
        padding-right: 0;
        margin-top: 2rem;
    }
}


.project-with-category h3 {
    margin-top: 0;
    padding-right: 2rem;
}

/* Décalage du titre pour éviter le chevauchement */
.project-details h3 {
        margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    margin-top: 0.5rem; /* Espace sous l'icône */
    padding-right: 2rem; /* Espace à droite pour éviter le chevauchement */
}



.project-details h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

.project-details p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text);
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    margin-bottom: auto;
}

.tag {
    background: #F1F5F9;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text);
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
}

.project-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-icon i.fa-robot {
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-block:hover .project-icon i.fa-robot {
    transform: scale(1.1) rotate(-5deg);
    color: var(--accent);
}

/* ===== SECTION CONTACT ===== */
.contact {
    padding: 5rem 0;
    background: #F8FAFC;
    text-align: center;
}

.contact h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
}

.contact h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-item {
    width: 120px;
    height: 120px;
    position: relative;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transform: scale(0);
    transition: transform 0.3s;
    border-radius: 50%;
    z-index: 0;
}

.contact-btn:hover::before {
    transform: scale(1);
}

.contact-btn:hover {
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}

.contact-btn span {
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Styles spécifiques pour chaque bouton */
.contact-btn.linkedin {
    border: 2px solid #0077B5;
    color: #0077B5;
}

.contact-btn.linkedin:hover {
    background: #0077B5;
    color: white;
}

.contact-btn.mail {
    border: 2px solid var(--accent);
    color: var(--accent);
}

.contact-btn.mail:hover {
    background: var(--accent);
    color: white;
}

.contact-btn.phone {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.contact-btn.phone:hover {
    background: var(--primary);
    color: white;
}

/* Bouton "Ajouter aux contacts" */
.add-contact {
    border: 2px solid var(--success); /* Vert pour se démarquer */
    color: var(--success);
}

.add-contact:hover {
    background: var(--success);
    color: white;
}

.add-contact i {
    color: inherit; /* Hérite de la couleur du parent */
}
/* Bouton "Télécharger CV" */
.cv-download {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.cv-download:hover {
    background: var(--primary);
    color: white;
}

/* Section CV dans le footer */
.cv-download-section {
    text-align: center;
    margin: 2rem 0;
}

/* ===== MODALE ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #E2E8F0;
}

.modal-content h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin: 0.75rem 0;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.modal-btn:hover {
    background: var(--primary-dark);
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9CA3AF;
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 50px;
    height: 50px;
    margin: 5px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.loader div:nth-child(1) {
    animation-delay: -0.45s;
}

.loader div:nth-child(2) {
    animation-delay: -0.3s;
}

.loader div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes loader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== CURSEUR PERSONNALISÉ ===== */
.cursor {
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary);
    background: rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease-out;
}

.cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(2);
    background: var(--accent);
    border-color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

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

    .project-block {
        flex-direction: column;
    }

    .project-3d,
    .project-details {
        width: 100%;
    }

    .contact-item {
        width: 100px;
        height: 100px;
    }

    .contact-methods {
        gap: 1.5rem;
    }

   
}