/* ========================================= */
/* VARIABLES & CONFIGURATION DE BASE         */
/* ========================================= */
:root {
    /* Palette de couleurs */
    --bg: #050505;           /* Fond très sombre (presque noir) */
    --text: #e0e0e0;         /* Texte gris clair */
    --acid: #ccff00;         /* Le vert fluo "Cyberpunk" */
    --gray: #333333;         /* Gris pour les bordures */
    
    /* Polices */
    --font-head: 'Oswald', sans-serif;    /* Pour les titres */
    --font-code: 'Fira Code', monospace;  /* Pour le texte courant */
    
    --nav-bg: #111111;       /* Fond de la navbar */
}

/* ================================================================= */
/* STYLES DE L'ÉCRAN DE CHARGEMENT (PRELOADER)                       */
/* ================================================================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg); 
    z-index: 10000; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.counter {
    font-family: var(--font-head);
    font-size: 8rem;
    font-weight: 700;
    color: var(--acid);
    font-variant-numeric: tabular-nums;
}

.preloader.hide {
    transform: translateY(-100%);
}


/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    cursor: none; 
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-code);
    overflow-x: hidden; 
    line-height: 1.6;   
}

body.lock-scroll {
    overflow: hidden;
}

/* ========================================= */
/* EFFETS VISUELS GLOBAUX                    */
/* ========================================= */

.grain-effect {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
    pointer-events: none; 
    z-index: 990; 
}

/* Curseur Personnalisé */
.cursor, .cursor-follower {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%); 
    border-radius: 50%;
    z-index: 9999; 
    pointer-events: none;
}

.cursor {
    width: 8px; height: 8px;
    background-color: var(--acid);
}

.cursor-follower {
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.hovering .cursor-follower {
    width: 80px; height: 80px;
    background-color: rgba(204, 255, 0, 0.1); 
    border-color: var(--acid);
}

/* Styles Typographiques Utilitaires */
h1, h2, h3 {
    font-family: var(--font-head);
    text-transform: uppercase;
    font-weight: 700;
}

.outline {
    -webkit-text-stroke: 2px var(--text);
    color: transparent;
}
.highlight { color: var(--acid); }

.container {
    width: 90%;
    max-width: 1400px; 
    margin: 0 auto;    
}

/* ========================================= */
/* NAVIGATION (HEADER)                       */
/* ========================================= */
header {
    position: fixed; 
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    pointer-events: none; 
    display: flex;
    justify-content: center;
    padding-top: 20px;
    transition: all 0.4s ease;
}

.navbar {
    pointer-events: auto; 
    background: transparent;
    padding: 10px 40px; 
    width: 95%;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    border-radius: 0;
    border: none;
    transition: all 0.4s ease;
}

.navbar.sticky {
    background: var(--nav-bg);
    padding: 10px 30px;
    border-radius: 50px; 
    width: auto;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--gray);
    backdrop-filter: blur(10px); 
}

.nav-logo {
    height: 100px; width: auto;
    object-fit: contain;
    transition: height 0.4s ease;
    display: block; 
}
.navbar.sticky .nav-logo { height: 50px; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0; padding: 0;
    position: absolute; 
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: max-content; 
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    line-height: 1; 
}
.nav-links a:hover { color: #fff; }

.navbar.sticky .nav-links {
    position: static; 
    transform: none;  
}

.burger-menu {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--acid);
    font-weight: 700;
    font-size: 0.9rem;
    padding-left: 0;
    line-height: 1; 
}
.navbar.sticky .burger-menu {
    padding-left: 20px;
    border-left: 1px solid var(--gray);
}

/* ========================================= */
/* MENU PLEIN ÉCRAN (OVERLAY)                */
/* ========================================= */
.fs-menu {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2000;
}

.fs-menu.active {
    opacity: 1; 
    pointer-events: all;
}

.close-fs-menu {
    position: absolute;
    top: 40px; right: 40px;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
    border: 1px solid var(--gray);
    padding: 10px 20px;
    border-radius: 30px;
    transition: 0.3s;
}
.close-fs-menu:hover {
    background: var(--acid);
    color: #000;
    border-color: var(--acid);
}

.fs-links {
    list-style: none;
    text-align: center;
}
.fs-links li { margin: 15px 0; }
.fs-links a {
    font-family: var(--font-head);
    font-size: 4rem;
    color: transparent; 
    -webkit-text-stroke: 1px var(--text); 
    text-decoration: none;
    display: block;
    transition: 0.3s;
}
.fs-links a:hover {
    color: var(--acid); 
    -webkit-text-stroke: 0px;
    transform: scale(1.05);
}

/* ========================================= */
/* SECTION HERO (ACCUEIL)                    */
/* ========================================= */
.hero {
    height: 95vh; 
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 20px; 
}

.hero-title {
    font-size: 6.5vw; 
    line-height: 1.1;
    letter-spacing: -2px;
    margin: 25px 0;
}
.hero-subtitle { color: var(--acid); letter-spacing: 2px; }

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 60px; 
}

.btn-scroll {
    text-decoration: none;
    color: var(--acid);
    font-family: var(--font-code);
    font-size: 0.8rem;
    border: 1px solid var(--acid);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.btn-scroll:hover {
    background: var(--acid);
    color: var(--bg);
}

.bounce {
    animation: moveDown 1.5s infinite alternate;
}
@keyframes moveDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(5px); }
}

/* ========================================= */
/* MARQUEE (TEXTE DÉFILANT)                  */
/* ========================================= */
.marquee-wrap {
    position: relative;
    width: 100vw;
    overflow: hidden;
    padding: 50px 0;
    margin-top: -80px; 
    z-index: 10;
}

.marquee {
    background: var(--acid);
    color: var(--bg);
    padding: 15px 0;
    border-top: 2px solid var(--bg);
    border-bottom: 2px solid var(--bg);
    width: 150vw;
    margin-left: -25vw;
    transform: rotate(-2deg); 
    transform-origin: center;
}

.track {
    display: flex;
    white-space: nowrap;
    animation: marqueeAnim 30s linear infinite; 
    width: max-content; 
}

.content {
    display: flex;
    align-items: center;
}
.content span {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 40px;
    vertical-align: middle;
}

@keyframes marqueeAnim { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

/* ========================================= */
/* SECTION À PROPOS (ABOUT)                  */
/* ========================================= */
.section-pad { padding: 100px 0; }

.section-title {
    display: flex; align-items: baseline; gap: 20px;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 20px; margin-bottom: 60px;
}
.num { color: var(--acid); font-family: var(--font-code); }
.glitch { font-size: 3rem; }

.about-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}
.about-img {
    flex: 1;
    position: relative;
}
.about-img img {
    width: 100%;
    border-radius: 5px;
}
.frame {
    position: absolute;
    top: 20px; left: 20px;
    width: 100%; height: 100%;
    border: 2px solid var(--acid);
    z-index: -1; 
}
.about-desc { flex: 1.5; }
.about-desc h3 { font-size: 2rem; margin-bottom: 20px; }
.about-desc p { color: #aaa; margin-bottom: 20px; font-size: 1.1rem; }

.stats {
    display: flex; gap: 40px; margin-top: 40px;
    border-top: 1px solid var(--gray); padding-top: 20px;
}
.val { display: block; font-size: 2.5rem; color: var(--acid); font-family: var(--font-head); }
.lbl { font-size: 0.9rem; color: #666; }

.buttons {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-simple {
    background: transparent;
    cursor: pointer;
    font-family: var(--font-code);
    font-weight: 500;
    text-decoration: none; 
    color: var(--text); 
    border: 1px solid var(--gray);
    padding: 12px 25px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; 
    transition: 0.3s;
}

.btn-simple:hover { 
    background: var(--acid); 
    color: var(--bg); 
    border-color: var(--acid); 
}

/* ========================================= */
/* GRILLE COMPÉTENCES (DANS LA MODALE)       */
/* ========================================= */
.grid-skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.card-skill {
    background: #0a0a0a;
    border: 1px solid var(--gray);
    border-radius: 10px;
    padding: 20px 10px;
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.card-skill:hover {
    border-color: var(--acid);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(204, 255, 0, 0.1);
}
.card-skill i {
    font-size: 2.5rem;
    color: var(--text);
    transition: 0.3s;
}
.card-skill:hover i {
    color: var(--acid);
}
.card-skill span {
    font-size: 0.85rem;
    font-family: var(--font-code);
    color: #aaa;
}

/* ========================================= */
/* SECTION PROJETS                           */
/* ========================================= */
.project-card {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 150px;
}
.project-card:last-child { margin-bottom: 0; }
.project-card:nth-child(even) { flex-direction: row-reverse; }

.p-info { width: 40%; }
.p-info h3 { font-size: 2.5rem; margin-bottom: 10px; }
.p-stack { color: var(--acid); margin-bottom: 20px; }
.p-desc { color: #888; margin-bottom: 30px; }

.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: transparent !important;
    border-color: #555 !important;
    color: #777 !important;
}

.p-visual {
    width: 50%; height: 350px; position: relative;
    overflow: hidden; border-radius: 10px;
}
.p-visual img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s; 
}
.p-visual:hover img { transform: scale(1.05); }

.overlay { pointer-events: none; }
.p-visual.open-modal { cursor: pointer; }

/* ========================================= */
/* SECTION CONTACT                           */
/* ========================================= */
.big-text { font-size: 5rem; margin-bottom: 50px; line-height: 1; }
.hollow { color: transparent; -webkit-text-stroke: 1px var(--text); }
.mail-link { font-size: 1.5rem; color: var(--acid); text-decoration: none; border-bottom: 2px solid var(--acid); }

.contact.section-pad { padding-bottom: 30px; }

.social-links {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}
.networks a {
    color: var(--text); text-decoration: none;
    font-family: var(--font-head); margin-right: 20px;
    font-size: 1.1rem;
}
.networks a:hover { color: var(--acid); }

.btn-cv {
    background: var(--text);
    color: var(--bg);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-head);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    border: 2px solid var(--text);
    
}
.btn-cv:hover {
    background: transparent;
    color: var(--acid);
    border-color: var(--acid);
}

.copyright {
    width: 100%; text-align: center;
    margin-top: 30px; 
    color: #fff; font-size: 0.85rem;
    font-family: var(--font-code);
}

.legal-trigger {
    width: 100%; text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300; font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer; margin-top: 10px; transition: 0.3s;
}
.legal-trigger:hover { color: var(--acid); }

/* ========================================= */
/* STYLES DES MODALES (Pop-ups)              */
/* ========================================= */
.modal-overlay, .project-modal-wrap {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active, .project-modal-wrap.active {
    opacity: 1; pointer-events: all;
}

/* Contenu de la modale par défaut */
.modal-content {
    background: var(--nav-bg);
    border: 1px solid var(--gray);
    padding: 40px;
    width: 90%;
    position: relative;
    border-radius: 10px;
    text-align: left;
}
.modal-content.sm { max-width: 600px; }
.modal-content.md { max-width: 800px; }

.modal-content h2 {
    color: var(--acid);
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
}
.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid var(--gray);
    padding: 5px 15px;
    border-radius: 20px;
    transition: 0.3s;
    z-index: 10;
}
.close-modal:hover { color: var(--acid); border-color: var(--acid); }

.license-item {
    margin-bottom: 25px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}
.license-item:last-child { border-bottom: none; }
.license-item h4 { color: #fff; margin-bottom: 10px; font-family: var(--font-head); }
.license-item p { font-size: 0.85rem; color: #888; line-height: 1.5; }


/* ====================================================== */
/* [CORRECTION] SPÉCIFIQUE MODALE DIPLÔMES                */
/* ====================================================== */
#modal-diplomas .modal-content {
    text-align: center; /* Centre le grand titre H2 uniquement */
    padding-top: 80px;  /* Espace en haut pour le bouton Fermer */
    padding-bottom: 60px;
}

#modal-diplomas h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    letter-spacing: 1px;
    /* Le H2 est centré car il hérite du parent */
}

/* Bloc individuel (Certification / Bac) */
.diploma-item {
    width: 90%;
    margin: 0 auto; /* Le bloc lui-même est centré dans la page */
    padding: 30px 0;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5); /* Ligne de séparation */
    text-align: left; /* ICI : LE TEXTE EST FORCÉ À GAUCHE */
}

.diploma-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.diploma-item:first-child {
    padding-top: 0;
}

.diploma-item h4 {
    color: var(--acid);
    font-family: var(--font-head);
    font-size: 1.6rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.diploma-item p {
    font-size: 0.95rem;
    color: #ccc;
    font-family: var(--font-code);
    line-height: 1.5;
    margin: 0; /* Pas de marge auto, pour rester à gauche */
}
/* ====================================================== */


/* MODALE PROJET SPÉCIFIQUE (Structure complexe) */
.pm-container {
    background: var(--nav-bg);
    border: 1px solid var(--gray);
    width: 90%; max-width: 1000px; height: 85vh;
    position: relative;
    border-radius: 10px;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.pm-close {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 1.5rem; color: var(--text);
    cursor: pointer; z-index: 10;
    transition: 0.3s;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 50%;
}
.pm-close:hover { color: var(--acid); }

.pm-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--gray);
    background: var(--bg);
}
.pm-header h2 { font-size: 2.5rem; margin-bottom: 5px; }

.pm-body { flex: 1; overflow-y: auto; padding: 40px; }

.pm-grid {
    display: flex; flex-direction: column; gap: 30px;
}
.pm-grid img {
    width: 100%; height: auto; 
    border-radius: 5px; border: 1px solid var(--gray);
}

.pm-details { display: flex; gap: 40px; margin-bottom: 40px; }
.pm-desc { flex: 2; }
.pm-stack { flex: 1; background: #0a0a0a; padding: 20px; border-radius: 5px; }

.pm-details h4 { color: var(--acid); margin-bottom: 15px; font-family: var(--font-head); letter-spacing: 1px; }
.pm-desc p { color: #ccc; font-size: 1rem; line-height: 1.8; white-space: pre-line; }

#pm-techs { list-style: none; }
#pm-techs li { 
    margin-bottom: 10px; 
    border-bottom: 1px solid #222; 
    padding-bottom: 5px; 
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
#pm-techs li::before {
    content: '>';
    color: var(--acid);
    font-weight: bold;
}

.pm-footer {
    padding: 20px 40px;
    border-top: 1px solid var(--gray);
    background: var(--bg);
    text-align: right;
}

/* ========================================= */
/* RESPONSIVE DESIGN (Adaptation Mobile)     */
/* ========================================= */

@media (max-width: 768px) {
    .pm-container { height: 95vh; width: 95%; }
    .pm-header h2 { font-size: 1.8rem; }
    .pm-details { flex-direction: column; }
    .buttons { justify-content: center; }
}

@media screen and (max-width: 992px) {
    * { cursor: auto !important; }
    .cursor, .cursor-follower { display: none !important; }

    .navbar, .navbar.sticky {
        width: max-content !important;
        min-width: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important; 
        top: 20px !important;            
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important; 
        gap: 30px !important;
        align-items: center !important;
        padding: 8px 15px !important;
        background: var(--nav-bg) !important;
        border: 1px solid var(--gray) !important;
        border-radius: 50px !important;  
        box-shadow: 0 5px 20px rgba(0,0,0,0.6) !important;
    }

    .nav-logo { height: 30px !important; width: auto !important; margin: 0; }
    .nav-links { display: none !important; } 
    .burger-menu {
        padding-left: 0 !important;
        border: none !important;
        font-size: 0.85rem;              
    }

    .container { width: 90%; padding: 0; }
    .section-pad { padding: 60px 0; }
    
    .hero {
        padding-top: 120px;
        height: auto; 
        min-height: 80vh;
        padding-bottom: 50px !important;
    }
    
    .hero-title { font-size: 3.2rem; margin: 15px 0; }
    .hero-bottom { flex-direction: column-reverse; align-items: flex-start; gap: 30px; }

    .marquee-wrap { margin-top: 0 !important; }
    
    .about-content { flex-direction: column; gap: 40px; }
    .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    
    .project-card { flex-direction: column !important; gap: 20px; margin-bottom: 80px; }
    .p-visual { height: 250px; width: 100%; }
    .p-info { width: 100%; }

    .big-text { font-size: 2.5rem; word-break: break-word; }
    .contact-box {
        display: flex !important;
        flex-direction: column !important; 
        align-items: center !important;    
        text-align: center !important;
    }
    .contact-box p { margin: 0 0 5px 0 !important; }
    .contact-box i { display: none !important; } 
    .mail-link { display: inline-block; font-size: 1.2rem; }

    .pm-container { width: 100%; height: 100%; border-radius: 0; }
    .modal-content { width: 95%; max-height: 85vh; overflow-y: auto; }
    .grid-skills { grid-template-columns: repeat(2, 1fr); }
}