/* =========================================
   1. POLICES LOCALES (Outfit & Space Mono)
   ========================================= */
/* outfit-300 - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300;
    src: url('../assets/fonts/outfit-v15-latin-300.woff2') format('woff2');
}

/* outfit-regular - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/fonts/outfit-v15-latin-regular.woff2') format('woff2');
}

/* outfit-500 - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 500;
    src: url('../assets/fonts/outfit-v15-latin-500.woff2') format('woff2');
}

/* outfit-600 - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 600;
    src: url('../assets/fonts/outfit-v15-latin-600.woff2') format('woff2');
}

/* outfit-700 - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    src: url('../assets/fonts/outfit-v15-latin-700.woff2') format('woff2');
}

/* outfit-800 - latin */
@font-face {
    font-display: swap;
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 800;
    src: url('../assets/fonts/outfit-v15-latin-800.woff2') format('woff2');
}

/* space-mono-regular - latin */
@font-face {
    font-display: swap;
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/fonts/space-mono-v17-latin-regular.woff2') format('woff2');
}

/* space-mono-700 - latin */
@font-face {
    font-display: swap;
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    src: url('../assets/fonts/space-mono-v17-latin-700.woff2') format('woff2');
}

/* =========================================
   2. VARIABLES & COULEURS (THEME NEON & BLEU/VIOLET)
   ========================================= */
:root {
    /* --- MODE CLAIR : ELEGANT BLUE/VIOLET (Défaut) --- */
    --bg-color: #f0f4f8;
    /* Fond Blanc légèrement bleuté (AliceBlue modernisé) */
    --text-color: #1e293b;
    /* Texte Bleu Gris foncé (Lisible et doux) */

    --accent-color: #7c3aed;
    /* VIOLET PROFOND (Plus foncé pour être lisible sur blanc) */
    --secondary-color: #0284c7;
    /* BLEU AZUR VIF */

    --dark-bg: #ffffff;
    /* Fond des cartes Blanc Pur */
    --glass-bg: rgba(255, 255, 255, 0.8);
    /* Effet verre blanc */
    --border-color: rgba(124, 58, 237, 0.15);
    /* Bordures violettes légères */

    /* Variable technique pour les transparences (Code RGB du violet #7c3aed) */
    --accent-rgb: 124, 58, 237;
}

/* --- MODE SOMBRE : NEON NIGHT --- */
.dark-mode {
    --bg-color: #050510;
    /* Fond presque noir (Bleu nuit profond) */
    --text-color: #ffffff;
    /* Texte blanc pur */

    --accent-color: #bd00ff;
    /* VIOLET ÉLECTRIQUE (Neon) - Couleur principale */
    --secondary-color: #00d4ff;
    /* CYAN FLUO - Pour les détails secondaires */

    --dark-bg: #11111f;
    /* Fond des cartes (Bleu très sombre) */
    --glass-bg: rgba(20, 20, 40, 0.6);
    /* Effet verre sombre */
    --border-color: rgba(189, 0, 255, 0.2);
    /* Bordures violettes subtiles */

    /* Variable technique pour les transparences (Code RGB du violet #bd00ff) */
    --accent-rgb: 189, 0, 255;
}

/* =========================================
   2. RESET & BASES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* =========================================
   3. ELEMENTS D'ARRIÈRE-PLAN (Formes)
   ========================================= */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    transition: background 0.5s ease;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    /* Cyan en dark, Bleu en light */
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-color);
    /* Violet électrique en dark, Violet profond en light */
    opacity: 0.25;
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(240, 244, 248, 0.9);
    /* Correspond à --bg-color light avec transparence */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.dark-mode header {
    background: rgba(5, 5, 16, 0.9);
    /* Correspond à --bg-color avec transparence */
}

.logo-container a {
    text-decoration: none;
    color: inherit;
}

.logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

.dot {
    color: var(--accent-color);
}

@keyframes logoAnimation {
    0% {
        color: var(--text-color);
    }

    50% {
        color: var(--secondary-color);
    }

    100% {
        color: var(--accent-color);
    }
}

.logo:hover {
    animation: logoAnimation 1.5s infinite alternate;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

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

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

/* Outils (Langue, Thème, Burger) */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 45px;
    /* Espace plus grand sur ordinateur */
}

.lang-switch {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
}

.lang-opt {
    opacity: 0.5;
    transition: 0.3s;
}

.lang-opt:hover,
.lang-opt.active {
    opacity: 1;
    color: var(--accent-color);
    font-weight: bold;
}

.divider {
    margin: 0 5px;
    opacity: 0.3;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--accent-color);
}

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

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* =========================================
   5. COMPOSANTS GLOBAUX (Boutons, Titres)
   ========================================= */
.section {
    padding: 100px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-section {
    padding-top: 150px;
    /* Espace pour le header fixe */
    min-height: 80vh;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
}

.section-title span {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px;
    cursor: pointer;
}

.primary-btn {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.primary-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    /* Le texte devient de la couleur du fond */
    box-shadow: 0 0 15px var(--accent-color);
    /* Petit effet néon au survol */
}

.secondary-btn {
    background-color: var(--dark-bg);
    color: var(--text-color);
    border: 2px solid var(--dark-bg);
}

.secondary-btn:hover {
    border-color: var(--text-color);
    background-color: transparent;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* =========================================
   7. SCROLL REVEAL ANIMATIONS
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.from-left {
    transform: translateX(-60px);
}

.reveal.from-right {
    transform: translateX(60px);
}

.reveal.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* =========================================
   8. RESPONSIVE (Menu Mobile)
   ========================================= */
@media screen and (max-width: 768px) {
    .nav-tools {
        gap: 45px;
        /* Même espace sur mobile */
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: calc(100% + 1px);
        background-color: var(--dark-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 70%;
        /* Un peu plus large sur mobile */
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999;
        border-left: 1px solid var(--border-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links li {
        opacity: 0;
        margin: 30px 0;
    }

    .burger {
        display: block;
    }
}

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

/* Animations Burger */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* =========================================
   9. SCROLL TO TOP BUTTON
   ========================================= */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollToTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.6);
}

@media screen and (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}