/* =========================================
   [NOVA'S HOUSE] : CORE STYLESHEET V61.0 (FINAL PROD)
   ========================================= */

/* --- 1. VARIABLES & BASE --- */
:root {
    --cyan: #00f2ff;
    --magenta: #ff00ff;
    --gold: #d4af37;
    --green: #00ff41;
    --red: #ff3333;
    --bg: #000000;
    --card-bg: rgba(10, 10, 15, 0.95);
    --border: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body { 
    background: var(--bg); 
    color: #ffffff; 
    font-family: 'Orbitron', sans-serif; 
    overflow-x: hidden; 
    overscroll-behavior: none;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, span, label, input, button, a { color: #ffffff; }
a { text-decoration: none; }

/* --- 2. BACKGROUND ANIMÉ --- */
.void-bg { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: -1; 
    background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%); 
}
.stars-far { 
    position: absolute; width: 200%; height: 200%; 
    background-image: radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(2px 2px at 50% 80%, #fff, transparent); 
    background-size: 400px 400px; opacity: 0.5; animation: moveStars 120s linear infinite; 
}
.stars-mid { 
    position: absolute; width: 200%; height: 200%; 
    background-image: radial-gradient(3px 3px at 15% 15%, var(--cyan), transparent), radial-gradient(3px 3px at 45% 65%, #fff, transparent); 
    background-size: 550px 550px; opacity: 0.6; animation: moveStars 60s linear infinite; 
}
.nebula { 
    position: absolute; width: 100%; height: 100%; 
    background: radial-gradient(circle at 20% 80%, rgba(0, 242, 255, 0.1), transparent 40%), radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.05), transparent 40%); 
    filter: blur(60px); 
}
@keyframes moveStars { from { transform: translateY(0); } to { transform: translateY(-500px); } }

/* --- 3. MUR DE SÉCURITÉ (DESIGN RGB & FIX MOBILE) --- */
.overlay-full { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 2147483647; 
    background: rgba(0, 0, 0, 0.98); 
    backdrop-filter: blur(15px); 
    display: flex; align-items: center; justify-content: center; 
    padding: 20px;
}

/* Bordure animée RGB */
.rgb-border-box {
    position: relative;
    padding: 3px; 
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff, #ff0000);
    background-size: 400%;
    animation: rgbFlow 10s linear infinite;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    width: 100%; max-width: 450px;
}

@keyframes rgbFlow { 0% { background-position: 0 0; } 50% { background-position: 200% 0; } 100% { background-position: 0 0; } }

.protocol-content {
    background: #050508; padding: 30px; border-radius: 8px;
    text-align: center; display: flex; flex-direction: column; gap: 20px;
}

.rgb-header {
    font-size: 0.7rem; letter-spacing: 3px; color: #666; font-weight: bold;
    border-bottom: 1px solid #333; padding-bottom: 10px; align-self: center;
}

.glitch-title {
    font-size: 1.8rem; font-weight: 900; color: #fff; letter-spacing: 2px;
    margin: 0; text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
}

.protocol-text { font-size: 0.9rem; color: #ccc; line-height: 1.5; margin: 0; }

.interaction-zone { display: flex; flex-direction: column; gap: 25px; margin-top: 10px; }

.check-container {
    display: flex; align-items: center; justify-content: center; gap: 15px;
    background: rgba(255, 255, 255, 0.08); padding: 20px; border-radius: 6px;
    cursor: pointer; transition: 0.3s; border: 1px solid #333;
    user-select: none; position: relative;
}
.check-container:active { background: rgba(255, 255, 255, 0.15); }
.check-container input { position: absolute; opacity: 0; cursor: pointer; height: 100%; width: 100%; left: 0; top: 0; margin: 0; z-index: 5; }
.checkmark {
    height: 22px; width: 22px; background: #000; border: 2px solid #555; 
    position: relative; flex-shrink: 0; transition: 0.3s; z-index: 1;
}
.check-container input:checked ~ .checkmark { border-color: #fff; background: linear-gradient(45deg, #ff0000, #0000ff); box-shadow: 0 0 10px #ff00ff; }
.label-text { font-size: 0.85rem; font-weight: bold; color: #fff; position: relative; z-index: 1; }
.rgb-text { background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff); -webkit-background-clip: text; color: transparent; font-weight: 900; }

.rgb-btn {
    position: relative; width: 100%; padding: 18px; border: none;
    background: #111; color: #555; border: 1px solid #333;
    font-family: 'Orbitron'; font-weight: 900; font-size: 1rem; letter-spacing: 2px;
    cursor: not-allowed; overflow: hidden; transition: 0.3s;
}
.rgb-btn.active {
    color: #fff; border: 1px solid rgba(255,255,255,0.5);
    cursor: pointer; box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); background: transparent;
}
.rgb-btn.active .btn-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff, #ff0000);
    background-size: 300%; animation: rgbFlow 3s linear infinite; opacity: 0.4;
}
.btn-text { position: relative; z-index: 10; }

/* --- 4. LOGIN MODULE FIX (LE GROS CORRECTIF) --- */
.login-wrapper {
    width: 100%; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 80px 20px 40px 20px; 
    position: relative; z-index: 10;
    overflow-y: auto; 
}

.login-container {
    width: 100%; max-width: 420px; 
    background: #0a0a0f; 
    border: 1px solid rgba(255,255,255,0.2); 
    border-top: 3px solid var(--cyan);
    padding: 40px 30px; 
    position: relative; 
    box-shadow: 0 0 80px rgba(0,0,0,0.9);
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.login-header { text-align: center; margin-bottom: 30px; }
.login-title { font-size: 1.8rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
.scan-line { width: 100%; height: 2px; background: var(--cyan); margin-top: 10px; box-shadow: 0 0 10px var(--cyan); transition: 0.3s; }

/* ONGLETS */
.auth-tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 30px; }
.tab-btn { 
    flex: 1; background: transparent; border: none; padding: 15px; 
    color: #666; font-family: 'Orbitron'; font-weight: bold; cursor: pointer; 
    border-bottom: 2px solid transparent; transition: 0.3s;
}
.tab-btn.active { color: #fff; border-bottom-color: var(--cyan); text-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* --- FORMULAIRES (ANTI-SUPERPOSITION) --- */
.auth-form {
    /* Cache par défaut avec force */
    display: none !important; 
    flex-direction: column;
    gap: 20px; /* Espace entre les champs */
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Seul celui avec la classe active s'affiche */
.auth-form.active {
    display: flex !important; /* Force l'affichage */
    opacity: 1;
    transform: translateY(0);
}

/* INPUTS */
.input-group { position: relative; width: 100%; }
.input-group input {
    width: 100%; padding: 15px; font-size: 1rem; color: #fff !important;
    background: rgba(255,255,255,0.05); border: 1px solid #444; border-radius: 4px;
    font-family: 'Montserrat', sans-serif; outline: none; transition: 0.3s;
}
.input-group label {
    position: absolute; top: 15px; left: 15px; 
    color: #aaa; font-size: 0.8rem; pointer-events: none; transition: 0.3s;
}
.input-group input:focus { border-color: var(--cyan); background: rgba(0, 242, 255, 0.05); }
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label { 
    top: -10px; left: 0; font-size: 0.7rem; color: var(--cyan); 
}

/* BOUTONS */
.btn-submit {
    padding: 18px; width: 100%; border: none; font-family: 'Orbitron'; font-weight: 900; 
    cursor: pointer; margin-top: 10px; color: #000 !important; font-size: 1rem; 
    text-transform: uppercase; transition: 0.3s; border-radius: 4px;
}
.btn-submit:hover { transform: scale(1.02); }
.btn-submit.cyan { background: var(--cyan); box-shadow: 0 0 15px rgba(0, 242, 255, 0.3); }
.btn-submit.gold { background: var(--gold); box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); }
.btn-submit:disabled { background: #333 !important; color: #666 !important; cursor: not-allowed; box-shadow: none; }

/* RÈGLES MDP */
.pwd-rules { background: #000; padding: 15px; border: 1px solid #333; display: none; border-radius: 4px; }
.pwd-rules.show { display: block; }
.rule { font-size: 0.75rem; margin-bottom: 5px; color: #666; display: block; text-align: left; }
.rule.valid { color: var(--green); } .rule.invalid { color: var(--red); }

/* --- 5. UI COMMUNE & HERO (RESTE DU SITE) --- */
.top-neon-line { position: fixed; top: 0; width: 100%; height: 3px; background: var(--cyan); z-index: 2000; box-shadow: 0 0 15px var(--cyan); }
.main-nav { position: fixed; top: 3px; width: 100%; height: 70px; display: flex; align-items: center; border-bottom: 1px solid var(--border); padding: 0 20px; background: rgba(0,0,0,0.95); z-index: 100; }
.logo { font-weight: 900; font-size: 1.1rem; letter-spacing: 2px; }
.cat-tag { font-size: 0.6rem; color: var(--cyan); border: 1px solid var(--cyan); padding: 2px 8px; margin-left: 10px; vertical-align: middle; }

.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding-top: 60px; }
.hero-content { display: flex; flex-direction: column; align-items: center; width: 100%; }
.main-title { font-size: clamp(2.2rem, 8vw, 5rem); line-height: 1; font-weight: 900; margin: 0 0 40px 0; letter-spacing: -2px; }
.cyan-glow { -webkit-text-stroke: 1px var(--cyan); color: transparent; text-shadow: 0 0 30px rgba(0, 242, 255, 0.5); }
.scroll-down { position: absolute; bottom: 30px; font-size: 0.7rem; color: #fff; animation: bounce 2s infinite; letter-spacing: 2px; opacity: 0.8; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }

.hero-grid-container { width: 100%; max-width: 1400px; padding: 0 20px; }
.hero-grid { display: flex; gap: 30px; justify-content: center; width: 100%; }

.nav-box { 
    text-decoration: none; position: relative; border: 2px solid; width: 350px; height: 450px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    transition: 0.5s; background: rgba(10, 10, 20, 0.7); backdrop-filter: blur(10px); 
    overflow: hidden; flex-shrink: 0; 
}
.content-layer { z-index: 10; display: flex; flex-direction: column; align-items: center; }
.box-icon { font-size: 4rem; margin-bottom: 20px; color: #fff; text-shadow: 0 0 20px rgba(255,255,255,0.4); }
.box-brand { font-size: 0.7rem; letter-spacing: 4px; margin-bottom: 10px; opacity: 0.8; }
.box-type { font-size: 1.8rem; font-weight: 900; letter-spacing: 2px; }
.box-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.2; z-index: 1; background-size: 200% 200%; transition: 0.5s; }
.box-gold { border-color: var(--gold); } .box-gold .box-bg { background-image: linear-gradient(45deg, #000, var(--gold)); } .box-gold .box-type { color: var(--gold); }
.box-cyan { border-color: var(--cyan); } .box-cyan .box-bg { background-image: linear-gradient(135deg, #000, var(--cyan)); } .box-cyan .box-type { color: var(--cyan); }
.box-magenta { border-color: var(--magenta); } .box-magenta .box-bg { background-image: linear-gradient(90deg, #000, var(--magenta)); } .box-magenta .box-type { color: var(--magenta); }

/* --- 6. CARDS & SECTIONS --- */
.info-section { padding: 100px 40px 150px; background: #050505; position: relative; z-index: 2; }
.section-container { max-width: 1200px; margin: 0 auto; text-align: center; }
.section-title { font-size: 2.2rem; margin-bottom: 10px; letter-spacing: 4px; }
.section-subtitle { font-size: 0.8rem; color: #aaa; margin-bottom: 60px; letter-spacing: 1px; }
.cyan-text { color: var(--cyan); text-shadow: 0 0 15px var(--cyan); }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 80px; }
.feature-card { background-color: transparent; min-height: 320px; perspective: 1000px; cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; text-align: left; transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; }
.feature-card.flipped .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { 
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden; 
    border-radius: 8px; border: 1px solid var(--border); padding: 30px; 
    display: flex; flex-direction: column; justify-content: center; 
    box-shadow: 0 0 15px rgba(0,0,0,0.5); overflow: hidden; background: #0e0e12; 
}
.feature-card:hover .card-front { border-color: var(--cyan); }
.card-back { background: #000; border: 1px solid var(--cyan); transform: rotateY(180deg); }
.card-back h3 { color: var(--cyan); font-size: 1rem; border-bottom: 1px solid var(--cyan); padding-bottom: 10px; margin-bottom: 15px; }
.details-list { list-style: none; padding: 0; }
.details-list li { font-size: 0.85rem; color: #ddd; margin-bottom: 10px; padding-left: 15px; position: relative; }
.details-list li::before { content: ">"; color: var(--gold); position: absolute; left: 0; font-weight: bold; }
.details-list.compact li { font-size: 0.75rem; margin-bottom: 6px; }
.f-icon { font-size: 2.5rem; margin-bottom: 15px; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.f-icon.green { color: var(--green); } .f-icon.blue { color: #00aaff; } .f-icon.cyan { color: var(--cyan); } .f-icon.gold { color: var(--gold); } .f-icon.magenta { color: var(--magenta); }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: #fff; }
.feature-card p { font-size: 0.85rem; line-height: 1.5; color: #ccc; margin-bottom: 15px; }
.p-badge, .d-tag { font-size: 0.6rem; padding: 4px 8px; border-radius: 3px; border: 1px solid #666; color: #fff; font-weight: bold; background: rgba(255,255,255,0.1); display: inline-block; margin: 2px; }

.update-bar { background: #111; border: 1px solid var(--border); padding: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.update-label { font-size: 0.8rem; color: var(--cyan); animation: blink 2s infinite; }
.progress-track { flex-grow: 1; height: 4px; background: #333; overflow: hidden; }
.progress-fill { height: 100%; width: 60%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: loading 3s ease-in-out infinite; }
@keyframes loading { 0% { width: 30%; } 50% { width: 70%; } 100% { width: 30%; } }
@keyframes blink { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* --- 7. FOOTER --- */
.footer { position: fixed; bottom: 0; width: 100%; padding: 15px 20px; background: #000; border-top: 1px solid #333; z-index: 50; }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; font-size: 0.65rem; color: #888; letter-spacing: 1px; }
.f-status { display: flex; align-items: center; }
.dot { height: 6px; width: 6px; background: var(--green); border-radius: 50%; display: inline-block; margin-right: 5px; box-shadow: 0 0 5px var(--green); }
.server-status { margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; display: flex; justify-content: space-between; font-size: 0.7rem; color: #666; }

/* --- 8. ALERTES NOTIFICATIONS --- */
.nova-alert {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95); border: 1px solid var(--cyan); border-left: 5px solid var(--cyan);
    padding: 15px 25px; z-index: 9999; display: flex; align-items: center; gap: 15px;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3); border-radius: 4px; transition: top 0.5s ease; min-width: 300px;
}
.nova-alert.show { top: 30px; }
.alert-icon { font-size: 1.2rem; color: var(--cyan); font-weight: bold; }
.alert-msg { font-size: 0.9rem; color: #fff; font-family: 'Orbitron'; letter-spacing: 1px; }
.nova-alert.error { border-color: var(--red); box-shadow: 0 0 30px rgba(255, 51, 51, 0.3); }
.nova-alert.error .alert-icon { color: var(--red); }

/* --- 9. MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    .hero { align-items: flex-end; padding-bottom: 90px; }
    .main-title { font-size: 2.2rem; margin-bottom: 20px; }
    
    .hero-grid { 
        justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; 
        scroll-snap-type: x mandatory; width: 100vw; margin-left: -20px; padding: 10px 20px 20px 20px;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .hero-grid::-webkit-scrollbar { display: none; }
    .nav-box { scroll-snap-align: center; width: 85vw; height: 55vh; margin-right: 15px; opacity: 1; background: rgba(10,10,20,0.9); }
    
    .info-section { padding: 60px 20px; }
    .update-bar { flex-direction: column; text-align: center; }
    .progress-track { width: 100%; }

    .login-container { padding: 30px 20px; max-width: 100%; }
    .btn-submit { padding: 20px; font-size: 1.1rem; }
    
    .footer { padding: 10px; }
    .footer-wrap { flex-direction: column; gap: 5px; text-align: center; }
}