/* =============================================
   RESET & BASE
   ============================================= */

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

html {
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    height: 100%;
    overflow: hidden;
}

/* =============================================
   VARIABLES CSS
   ============================================= */

:root {
    /* Couleurs principales */
    --violet-principal: #9E67B8;
    --bleu-violet: #7560DB;
    --bleu-profond: #2E599E;
    --noir-profond: #070A12;
    --blanc-doux: #F2F5FA;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border radius */
    --radius-sm: 10px;
    --radius-md: 18px;
    
    /* Z-index layers */
    --z-background: -2;
    --z-scanline: 2;
    --z-header: 200;
    --z-hero: 300;
    --z-overlay: 9999;
}

/* =============================================
   STYLES GLOBAUX
   ============================================= */

body {
    background-color: var(--noir-profond);
    color: var(--blanc-doux);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.5;
    position: relative;
}

/* =============================================
   BACKGROUND EFFECTS
   ============================================= */

/* Background image avec effet flou */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.30;
    filter: blur(3px);
    z-index: var(--z-background);
    will-change: transform;
}

/* Effet scanline global */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(255, 255, 255, 0.045) 50%,
        transparent 60%
    );
    animation: scan-global 7s linear infinite;
    z-index: var(--z-scanline);
    mix-blend-mode: overlay;
    will-change: transform;
}

@keyframes scan-global {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */

header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    max-width: 1200px;
    padding: var(--spacing-sm) var(--spacing-xl);
    z-index: var(--z-header);
    
    background: rgba(8, 8, 15, 0.40);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(158, 103, 184, 0.25);
    
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(158, 103, 184, 0.15),
        inset 0 0 8px rgba(158, 103, 184, 0.12);
}

nav {
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 
        color var(--transition-normal),
        opacity var(--transition-fast);
    position: relative;
}

.nav-links a:hover:not(.disabled):not(.noclick) {
    color: var(--violet-principal);
}

/* Focus visible pour l'accessibilité */
.nav-links a:focus-visible {
    outline: 2px solid var(--violet-principal);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Liens non cliquables */
.nav-links a.noclick {
    pointer-events: none;
    cursor: default;
    color: rgba(255, 255, 255, 0.65);
}

/* Liens désactivés */
.nav-links a.disabled {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.45);
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding-top: 140px;
    padding-bottom: 50px;
    position: relative;
    z-index: var(--z-hero);
}

/* =============================================
   OVERLAY WARNING
   ============================================= */

.overlay-warning {
    background: rgba(120, 100, 0, 0.35);
    border: 1px solid rgba(255, 210, 40, 0.85);
    color: #ffeaaa;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 14px rgba(255, 210, 40, 0.45),
        inset 0 0 10px rgba(255, 210, 40, 0.25);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 1.6px;
    animation: overlayPulse 1.5s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-overlay);
}

@keyframes overlayPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* =============================================
   HERO CONTENT
   ============================================= */

.hero-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Titre principal */
.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 3px;
    font-size: clamp(3.5rem, 9vw, 8rem);
    position: relative;
    background: linear-gradient(
        135deg,
        var(--violet-principal),
        var(--bleu-violet),
        var(--bleu-profond)
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(158, 103, 184, 0.25));
    animation: heroGlow 6s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(158, 103, 184, 0.30));
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(158, 103, 184, 0.55));
    }
}

/* Description */
.hero-description {
    font-size: 1.05rem;
    opacity: 0.90;
    margin-top: 0.8rem;
}

/* =============================================
   LOGO
   ============================================= */

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    max-width: 400px;
    width: 100%;
    height: auto;
    max-height: 35vh;
    object-fit: contain;
    animation: pulseOpacity 8s ease-in-out infinite;
    filter:
        drop-shadow(0 0 18px rgba(158, 103, 184, 0.60))
        drop-shadow(0 0 28px rgba(60, 30, 140, 0.45));
    will-change: opacity;
}

@keyframes pulseOpacity {
    0%, 100% {
        opacity: 0.65;
    }
    50% {
        opacity: 0.40;
    }
}

/* =============================================
   HERO META
   ============================================= */

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.hero-date {
    color: var(--violet-principal);
    font-size: 1rem;
    font-weight: 600;
}

.hero-coords {
    font-size: 0.95rem;
    opacity: 0.78;
    letter-spacing: 1.5px;
}

/* =============================================
   UTILITAIRES
   ============================================= */

/* Préférence de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode sombre forcé */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}