/* ============================================================================
   NAVIGATION MODERNE - Style cohérent avec l'identité ARG
   ============================================================================ */

/* Navigation principale */
#main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 26, 51, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(77, 148, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(0, 26, 51, 0.3);
}

/* Effet au scroll */
#main-navigation.scrolled {
    background: rgba(0, 26, 51, 0.95);
    backdrop-filter: blur(25px);
    border-bottom-color: rgba(77, 148, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 26, 51, 0.4);
}

/* Container principal de la nav */
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo / Branding */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-brand::before {
    content: '◈';
    font-size: 1.5rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(77, 148, 255, 0.6));
    animation: brandPulse 3s ease-in-out infinite;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.nav-brand:hover::before {
    animation-duration: 1s;
}

@keyframes brandPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(77, 148, 255, 0.6));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(77, 148, 255, 0.8));
        transform: scale(1.05);
    }
}

/* Menu principal */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

/* Effet de fond au hover */
.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 148, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.nav-menu a:hover::before {
    left: 100%;
}

.nav-menu a:hover {
    color: var(--text-primary);
    background: rgba(77, 148, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 26, 51, 0.2);
}

/* État actif */
.nav-menu a.active {
    color: var(--accent-primary);
    background: rgba(77, 148, 255, 0.15);
    box-shadow: 
        0 4px 15px rgba(0, 26, 51, 0.2),
        0 0 20px rgba(77, 148, 255, 0.1);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

/* Styles spéciaux pour certains liens */
.nav-menu a.home-link {
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-menu a.home-link:hover {
    background: rgba(77, 148, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.nav-menu a.vigil-link {
    color: #00ff88;
    position: relative;
}

.nav-menu a.vigil-link::after {
    content: '●';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.6rem;
    color: #00ff88;
    animation: vigilPulse 2s infinite;
}

@keyframes vigilPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.nav-menu a.vigil-link:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Liens de catégories spéciales */
.nav-menu a[href*="treasury"] {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.nav-menu a[href*="treasury"]:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    color: #ffd700;
}

.nav-menu a[href*="core-tenets"] {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(107, 70, 193, 0.05));
}

.nav-menu a[href*="core-tenets"]:hover {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.2), rgba(107, 70, 193, 0.1));
    color: var(--accent-corruption);
}

/* Menu Burger */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 8px rgba(77, 148, 255, 0.3);
}

.burger-menu:hover span {
    box-shadow: 0 0 12px rgba(77, 148, 255, 0.5);
}

/* Animation du burger */
.burger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Menu mobile */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
        height: 60px;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 60px);
        background: rgba(0, 26, 51, 0.98);
        backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: inset -1px 0 0 rgba(77, 148, 255, 0.2);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        opacity: 0;
        transform: translateX(-50px);
        transition: all 0.3s ease;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu a {
        width: 100%;
        padding: 1.2rem 2rem;
        border-radius: 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(77, 148, 255, 0.1);
        justify-content: flex-start;
    }
    
    .nav-overlay {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
        display: none;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
}

/* Overlay pour fermer le menu mobile */
.nav-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Ajustement du padding body pour compenser la nav fixe */
body {
    padding-top: 70px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}

/* Effet spécial pour The Vigil */
.nav-menu a.vigil-link {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), transparent);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Animation de la navigation au scroll */
@media (min-width: 769px) {
    #main-navigation.nav-hidden {
        transform: translateY(-100%);
    }
    
    #main-navigation.nav-visible {
        transform: translateY(0);
    }
}

/* Indicateur de page active plus visible */
.nav-menu a.active {
    position: relative;
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent-primary);
}

@media (max-width: 768px) {
    .nav-menu a.active::before {
        display: none;
    }
}

/* Effet de particules subtil sur la navigation */
.nav-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.nav-particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: navParticleFloat 20s infinite linear;
}

@keyframes navParticleFloat {
    0% {
        transform: translateY(100px) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-20px) translateX(50px);
        opacity: 0;
    }
}

/* ============================================================================
   FONCTIONNALITÉS AVANCÉES OPTIONNELLES POUR LA NAVIGATION
   À ajouter à la fin de navigation.css pour des effets supplémentaires
   ============================================================================ */

/* 1. EFFET HOLOGRAPHIQUE SUR LA NAVIGATION */
#main-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 148, 255, 0.05),
        rgba(179, 217, 255, 0.1),
        rgba(77, 148, 255, 0.05),
        transparent
    );
    animation: hologramSweep 8s infinite;
    pointer-events: none;
}

@keyframes hologramSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

/* 2. INDICATEUR DE CONNECTIVITÉ (STYLE ARG) */
.nav-status-indicator {
    position: absolute;
    top: 50%;
    right: 4rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px rgba(77, 148, 255, 0.7);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* 3. EFFET MATRIX SUR HOVER DE LA NAVIGATION */
.nav-matrix-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#main-navigation:hover .nav-matrix-effect {
    opacity: 0.3;
}

.matrix-char {
    position: absolute;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    animation: matrixFall 3s linear infinite;
}

@keyframes matrixFall {
    0% { transform: translateY(-100px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* 4. BARRE DE PROGRESSION DE PAGE */
.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* 5. NOTIFICATION SYSTÈME DANS LA NAV */
.nav-notification {
    position: absolute;
    top: 50%;
    right: 8rem;
    transform: translateY(-50%);
    background: rgba(107, 70, 193, 0.9);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border: 1px solid var(--accent-corruption);
    animation: notificationGlow 2s infinite ease-in-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-notification.active {
    opacity: 1;
}

@keyframes notificationGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(107, 70, 193, 0.5); }
    50% { box-shadow: 0 0 15px rgba(107, 70, 193, 0.8); }
}

/* 6. EFFET DE SCAN LATÉRAL */
.nav-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--accent-primary),
        transparent
    );
    animation: scanLine 4s infinite;
    opacity: 0.7;
}

@keyframes scanLine {
    0% { left: 0; }
    50% { left: calc(100% - 2px); }
    100% { left: 0; }
}

/* 7. EFFET DE CORRUPTION PROGRESSIF POUR DEEP PAGES */
.nav-corruption-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(107, 70, 193, 0.05) 10px,
        rgba(107, 70, 193, 0.05) 20px
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Activer la corruption sur certaines pages */
body[data-corruption="true"] .nav-corruption-overlay {
    opacity: 1;
    animation: corruptionPulse 8s infinite ease-in-out;
}

@keyframes corruptionPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* 8. AMÉLIORATION DU MENU MOBILE AVEC SECTIONS */
@media (max-width: 768px) {
    .nav-menu-section {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(77, 148, 255, 0.1);
        font-family: var(--font-mono);
        font-size: 0.8rem;
        color: var(--accent-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .nav-menu-section:first-child {
        padding-top: 2rem;
    }
    
    /* Groupes de navigation mobile */
    .nav-group-public .nav-menu a {
        border-left: 3px solid transparent;
        transition: border-left-color 0.3s ease;
    }
    
    .nav-group-public .nav-menu a:hover {
        border-left-color: var(--accent-primary);
    }
    
    .nav-group-restricted .nav-menu a {
        border-left: 3px solid transparent;
    }
    
    .nav-group-restricted .nav-menu a:hover {
        border-left-color: var(--accent-danger);
    }
}

/* 9. ADAPTATION POUR DIFFÉRENTS THÈMES DE PAGES */
/* Surface Level */
body.page-surface #main-navigation {
    background: rgba(240, 248, 255, 0.8);
}

body.page-surface .nav-menu a {
    color: var(--glacier-deep);
}

body.page-surface .nav-brand::before {
    color: var(--glacier-medium);
}

/* Deep Level */
body.page-deep #main-navigation {
    background: rgba(0, 26, 51, 0.9);
    border-bottom-color: rgba(107, 70, 193, 0.3);
}

body.page-deep .nav-menu a:hover {
    background: rgba(107, 70, 193, 0.1);
    border-color: var(--accent-corruption);
}

/* 10. EASTER EGG : KONAMI CODE */
.nav-konami-activated {
    animation: konami-rainbow 2s infinite;
}

@keyframes konami-rainbow {
    0% { filter: hue-rotate(0deg); }
    25% { filter: hue-rotate(90deg); }
    50% { filter: hue-rotate(180deg); }
    75% { filter: hue-rotate(270deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ============================================================================
   UTILISATION AVANCÉE
   ============================================================================ */

/*
Pour activer ces fonctionnalités, ajouter dans le JavaScript :

// Indicateur de status
const statusIndicator = document.createElement('div');
statusIndicator.className = 'nav-status-indicator';
statusIndicator.innerHTML = '<div class="status-dot"></div><span>ONLINE</span>';
navContainer.appendChild(statusIndicator);

// Barre de progression
const progressBar = document.createElement('div');
progressBar.className = 'nav-progress';
navContainer.appendChild(progressBar);

// Mettre à jour la progression au scroll
window.addEventListener('scroll', () => {
    const scrollPercent = (window.scrollY / (document.body.scrollHeight - window.innerHeight)) * 100;
    progressBar.style.width = scrollPercent + '%';
});

// Notification système
const notification = document.createElement('div');
notification.className = 'nav-notification';
notification.textContent = 'PATTERN ACTIVE';
navContainer.appendChild(notification);

// Activer notification périodiquement
setInterval(() => {
    notification.classList.add('active');
    setTimeout(() => notification.classList.remove('active'), 3000);
}, 15000);

// Effet Matrix
const matrixEffect = document.createElement('div');
matrixEffect.className = 'nav-matrix-effect';
navContainer.appendChild(matrixEffect);

// Créer des caractères matrix
for (let i = 0; i < 10; i++) {
    const char = document.createElement('div');
    char.className = 'matrix-char';
    char.textContent = Math.random() > 0.5 ? '1' : '0';
    char.style.left = Math.random() * 100 + '%';
    char.style.animationDelay = Math.random() * 3 + 's';
    matrixEffect.appendChild(char);
}
*/