/* ===================================================
   ORYS · base.css — Styles partagés entre toutes les pages
   Utilise des custom properties CSS pour la couleur accent (--neon)
   définie par chaque page dans son fichier CSS spécifique.
   =================================================== */

/* ── Variables par défaut (blue index) ── */
:root {
    --neon: #0096C7;
    --neon-rgb: 0, 150, 199;
    --black: #020202;
    --surface: #1A1A1A;
    --grid: #404040;
    --text: #E0E0E0;
    --muted: #808080;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--black);
    color: var(--text);
    cursor: none;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background-color: var(--neon);
    color: var(--black);
}

/* ── Background blueprint grid ── */
.blueprint-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image:
        linear-gradient(rgba(var(--neon-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--neon-rgb), 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* ── WebGL background canvas ── */
#webgl-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

/* ── Scanline scroll effect ── */
.scanline {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background-color: rgba(var(--neon-rgb), 0.5);
    box-shadow: 0 0 10px var(--neon);
    opacity: 0;
    z-index: 50;
    pointer-events: none;
}

/* ── HUD Cursor ── */
#hud-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
    mix-blend-mode: difference;
}

.hud-corner {
    position: absolute;
    width: 10px; height: 10px;
    border-color: var(--neon);
    border-style: solid;
}
.hud-tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.hud-tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.hud-bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.hud-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.cursor-active #hud-cursor { width: 60px; height: 60px; }
.cursor-active .hud-corner { border-color: #fff; }

#cursor-data {
    position: absolute;
    bottom: -20px;
    right: -40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--neon);
    white-space: nowrap;
}

/* ── Animations partagées ── */
.blink-caret { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Bouton glitch ── */
.btn-glitch {
    position: relative;
    background: transparent;
    border: 1px solid var(--neon);
    color: var(--neon);
    text-transform: uppercase;
    overflow: hidden;
    transition: color 0s;
    cursor: none;
}
.btn-glitch::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--neon);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.1s cubic-bezier(0.19, 1, 0.22, 1);
}
.btn-glitch:hover { color: var(--black); font-weight: bold; }
.btn-glitch:hover::before { transform: scaleX(1); transform-origin: left; }

/* ── Layout helpers ── */
.content-layer { position: relative; z-index: 10; }
.section-padding { padding: 120px 0; }

/* =======================================================
   NAVIGATION — Burger menu & liens
   ======================================================= */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 2, 2, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(var(--neon-rgb), 0.12);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    gap: 1rem;
}

/* Logo */
.nav-logo img {
    height: 4rem;
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
}
.nav-logo img.scrolled { height: 2rem; }

/* Liens desktop */
.nav-links {
    display: none;
    gap: 2rem;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
@media (min-width: 768px) {
    .nav-links { display: flex; }
    #burger-btn { display: none !important; }
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
    position: relative;
    padding-bottom: 2px;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--neon);
    transition: width 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--neon); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Indicateur statut */
.nav-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--neon);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}
@media (max-width: 480px) { .nav-status { display: none; } }

/* Burger button */
#burger-btn {
    background: none;
    border: 1px solid var(--neon);
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: none;
    transition: border-color 0.15s;
    flex-shrink: 0;
}
#burger-btn span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--neon);
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform-origin: center;
}
#burger-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
#burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#burger-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Menu mobile */
#mobile-menu {
    display: none;
    flex-direction: column;
    padding: 0.8rem 1.5rem 1.2rem;
    border-top: 1px solid rgba(var(--neon-rgb), 0.1);
    gap: 0;
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-decoration: none;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.15s, padding-left 0.15s;
}
#mobile-menu a:hover,
#mobile-menu a.active {
    color: var(--neon);
    padding-left: 0.5rem;
}
#mobile-menu a:last-child { border-bottom: none; }

/* Décalage du contenu pour compenser la nav fixe */
main.content-layer { padding-top: 5rem; }
