:root {
    --bg-color: #120017;
    --text-color: #e5e1d8;
    --accent-sand: #d2c1b0;
    --glass-bg: rgba(15, 15, 15, 0.85);
    --glass-border: rgba(210, 193, 176, 0.15);
    --dim-text: #a0a0a0;
    --transition-smooth: all 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

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

p {
    color:var(--accent-sand);
}

#canvas-bg { position: fixed; top: 0; left: 0; z-index: -1; opacity: 0.4; }

/* --- NAVIGATION --- */
.main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 50px !important;
    overflow: hidden;
    /* On s'assure que le container a une hauteur cohérente */
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav .glass-content {
    padding: 0; /* On gère le padding directement dans le ul pour le centrage */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.main-nav nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 12px 35px; /* Ajuste le padding ici pour la taille du bouton nav */
    margin: 0;
    align-items: center;
    justify-content: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    /* Pour s'assurer que le texte est bien centré verticalement même avec l'espacement des lettres */
    display: inline-block;
    line-height: 1;
}

.main-nav a:hover {
    color: var(--accent-sand);
}

/* --- LUEUR TOURNANTE --- */
.glass-panel { position: relative; background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 16px; overflow: hidden; }
.glass-panel::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(transparent, transparent, transparent, var(--accent-sand)); animation: rotate 6s linear infinite; z-index: 0; }
.glass-panel::after { content: ""; position: absolute; inset: 1px; background: var(--bg-color); border-radius: 15px; z-index: 1; }
.glass-content { position: relative; z-index: 2; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- ACCORDÉONS (REPLI) --- */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; padding-top: 10px; margin-bottom: 20px;
    border-bottom: 1px solid rgba(210, 193, 176, 0.1); transition: 0.3s;
}
.section-header h2 { padding-top: 0 ; margin-bottom: 15px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 4px; color: var(--accent-sand); }
.arrow-icon { font-size: 1.2rem; color: var(--accent-sand); transition: transform 0.5s var(--transition-smooth); margin-bottom: 15px; }

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
}
.collapsible-content.open {
    max-height: 2000px;
    opacity: 1;
    margin-bottom: 50px;
}
.section-header.active .arrow-icon { transform: rotate(180deg); }

/* Container Flex pour aligner texte et photo */
.hero-header {
    display: flex;
    justify-content: space-between; /* Pousse le texte à gauche et la photo à droite */
    align-items: center; /* Aligne verticalement au centre */
    margin-bottom: 40px;
    gap: 30px; /* Espace entre le texte et la photo */
}

.hero-text {
    flex: 1; /* Prend l'espace disponible */
}

/* On réajuste les marges pour que tout soit bien aligné */
.title-main {
    margin-bottom: 10px !important; /* Réduit l'espace sous le nom */
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--accent-sand);
    letter-spacing: 1px;
}

/* Style de la photo de profil */
.profile-pic {
    width: 180px;  /* Taille de la photo */
    height: 180px;
    border-radius: 50%; /* Rend la photo circulaire */
    object-fit: cover; /* Évite de déformer l'image */
    border: 2px solid var(--accent-sand); /* Bordure fine couleur sable */
    box-shadow: 0 0 20px rgba(210, 193, 176, 0.2); /* Légère lueur */
    transition: transform 0.5s var(--transition-smooth);
}

.profile-pic:hover {
    transform: scale(1.05); /* Petit effet de zoom au survol */
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .hero-header {
        flex-direction: column-reverse; /* Met la photo au dessus du nom sur mobile */
        text-align: center;
    }
    .profile-pic {
        width: 140px;
        height: 140px;
    }
}


/* --- A PROPOS DE MOI --- */
.bio-box {
    margin-top: 10px;
    padding: 30px;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.bio-text strong {
    color: var(--accent-sand);
    font-weight: 600;
}


/* --- LISTES ET ITEMS --- */
.container { max-width: 900px; margin: 0 auto; padding: 100px 24px; }
.hero { padding: 10px 0 30px; }
.title-main { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 300; margin-bottom: 40px; letter-spacing: -2px; }
.description { padding: 30px; font-size: 1.25rem; }

.competences-item, .project-item {
    display: flex; align-items: center; padding: 18px 0;
    transition: var(--transition-smooth); border-bottom: 1px solid rgba(210, 193, 176, 0.05);
}
.year {
    font-size: 0.8rem; color: var(--dim-text);
    min-width: 220px; /* Augmenté pour tes longs textes de compétences */
    white-space: nowrap; flex-shrink: 0;
}
.project-link, .skill-link {
    text-decoration: none; color: var(--text-color);
    font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 300;
}

.competences-item:hover, .project-item:hover { transform: translateX(25px); }
.competences-item:hover .skill-link, .project-item:hover .project-link { color: var(--accent-sand); }

/* --- FORMATIONS ET CONTACT --- */
.education-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.edu-item { padding: 30px !important; }
.edu-title { font-weight: 600; color: var(--accent-sand); margin-bottom: 8px; }
.contact-box { padding: 60px !important; text-align: center; }
.email-btn:hover { background: var(--accent-sand); color: var(--bg-color); }
.social-links { display: flex; justify-content: center; gap: 30px; }
.social-links a { color: var(--dim-text); text-decoration: none; }
.copyright { text-align: center; margin-top: 60px; font-size: 0.75rem; color: #333; }

.reveal { opacity: 0; transform: translateY(40px); transition: var(--transition-smooth); }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .education-grid { grid-template-columns: 1fr; }
    .year { min-width: 120px; font-size: 0.7rem; }
    .project-link, .skill-link { font-size: 1rem; }
}

/* Style commun aux boutons d'action */
.email-btn, .cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Centre le texte horizontalement */
    gap: 10px;
    margin: 10px;
    padding: 15px 35px;
    min-width: 280px; /* Largeur identique pour les deux */
    height: 55px;    /* Hauteur identique */
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    z-index: 5;
    box-sizing: border-box;
}

/* Variantes de bordures (pour garder tes styles originaux) */
.email-btn {
    border: 1px solid var(--accent-sand);
    color: var(--accent-sand);
    background: transparent;
}

.cv-btn {
    border: 1px dashed var(--accent-sand);
    color: var(--accent-sand);
    background: rgba(210, 193, 176, 0.1);
}

/* Effet au survol commun */
.email-btn:hover, .cv-btn:hover {
    background: var(--accent-sand);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(210, 193, 176, 0.2);
}


.cv-btn:hover {
    background: var(--accent-sand);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(210, 193, 176, 0.2);
}

.cv-btn .icon {
    font-size: 1.2rem;
}

/* --- PAGES DE DÉTAILS --- */

.content-block {
    padding: 40px !important;
    font-size: 1.1rem;
    line-height: 1.8;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.media-item {
    padding: 15px !important;
    transition: transform 0.4s ease;
}

.media-item:hover {
    transform: scale(1.02);
}

.media-item img {
    display: block;
    filter: grayscale(20%);
    transition: 0.4s;
}

.media-item:hover img {
    filter: grayscale(0%);
}

/* Ajustement pour les listes dans les blocs glass */
.glass-content ul li {
    margin-bottom: 10px;
}

/* --- CURSEUR --- */

/* Cache le curseur réel sur tout le site */
html, body, a, button, .section-header {
    cursor: none !important;
}

/* Le point central */
#custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-sand);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
    z-index: 10000;
    box-shadow: 0 0 10px var(--accent-sand);
}

/* Le cercle qui suit (follower) */
#custom-cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-sand);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    /* Transition fluide pour l'effet de retard */
    transition: transform 0.08s ease-out, width 0.3s, height 0.3s, opacity 0.3s;
    z-index: 9999;
    opacity: 0.3;
}

/* État quand on survole un lien ou un bouton */
#custom-cursor.active {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

#custom-cursor-follower.active {
    width: 50px;
    height: 50px;
    opacity: 0.8;
    background-color: rgba(210, 193, 176, 0.1);
}

/* Cacher le curseur sur mobile (car il n'y a pas de souris) */
@media (max-width: 768px) {
    #custom-cursor, #custom-cursor-follower {
        display: none;
    }
    html, body, a, button {
        cursor: auto !important;
    }
}