/* ==========================================================================
   TITAN UI++ "DANFIELD LEGACY" (V8.0 - UNIFIED SYSTEM)
   --------------------------------------------------------------------------
   Author       : Gemini Architect & Community
   Status       : PRODUCTION GOLD
   Description  : Complete Design System including Staff Nexus & Core Pages.
   ========================================================================== */

/* ==========================================================================
   1. KERNEL & VARIABLES
   ========================================================================== */
   :root {
    /* ----------------------------------------------------------------------
       PALETTE: MONOCHROME (BASE DARK)
       ---------------------------------------------------------------------- */
    --color-void-50:  #fbfbfb;
    --color-void-400: #a1a1a6;
    --color-void-700: #3f3f46;
    --color-void-900: #18181b;
    --color-void-950: #050505; /* Main Background */

    /* ----------------------------------------------------------------------
       PALETTE: LEGACY GOLD (DANFIELD TRIBUTE)
       ---------------------------------------------------------------------- */
    --color-gold-300: #ffea70; /* Highlight */
    --color-gold-500: #FFD700; /* PRIMARY BRAND */
    --color-gold-600: #C5A000; /* Secondary */
    --color-gold-glow: rgba(255, 215, 0, 0.4);
    
    /* Alpha Variants for Glassmorphism */
    --gold-dim:       rgba(255, 215, 0, 0.15);
    --gold-subtle:    rgba(255, 215, 0, 0.05);

    /* ----------------------------------------------------------------------
       PALETTE: FUNCTIONAL
       ---------------------------------------------------------------------- */
    --color-discord: #5865F2;
    --success: #2ecc71;
    --danger:  #e74c3c;
    --rarity-common: #a0a0a0; /* Text Muted */

    /* ----------------------------------------------------------------------
       MATERIALS & SURFACES
       ---------------------------------------------------------------------- */
    --bg-dark:        var(--color-void-950);
    --bg-card:        #0f0f11;
    --bg-card-hover:  #161618;
    
    --glass-border:    rgba(255, 255, 255, 0.08);
    --glass-surface:   rgba(5, 5, 5, 0.85);
    --glass-blur:      12px;

    /* ----------------------------------------------------------------------
       TYPOGRAPHY & SPACING
       ---------------------------------------------------------------------- */
    --font-primary: 'Inter', sans-serif;
    --font-mono:    'Roboto Mono', monospace;
    --font-display: 'Oswald', sans-serif; /* Unifié sur Oswald pour les titres */

    --radius-sm:   8px;
    --radius-md:   16px;
    --radius-lg:   24px;
    
    --ease-out:    cubic-bezier(0.215, 0.61, 0.355, 1);
    
    /* Z-Index */
    --z-negative: -1;
    --z-sticky:   1000;
    --z-modal:    2000;
}

/* ==========================================================================
   2. RESET & GLOBAL
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(88, 101, 242, 0.03) 0%, transparent 25%);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold-600); }

/* Background Canvas */
#particle-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: var(--z-negative); opacity: 0.4; pointer-events: none;
}

/* ==========================================================================
   3. UTILITIES & TYPOGRAPHY
   ========================================================================== */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.text-gold { color: var(--color-gold-500) !important; }
.text-muted { color: var(--rarity-common) !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

.section-header { text-align: center; margin-bottom: 60px; }
.page-title { 
    font-family: var(--font-display); font-size: 3rem; margin-bottom: 10px; text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   4. NAVIGATION (STANDARD)
   ========================================================================== */
.main-header {
    position: fixed; top: 0; width: 100%; z-index: var(--z-sticky);
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo-area {
    font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 1px;
    display: flex; align-items: center; gap: 10px; color: #fff;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-item { 
    font-size: 0.9rem; font-weight: 600; color: var(--rarity-common); position: relative; 
    text-transform: uppercase; letter-spacing: 1px;
}
.nav-item:hover, .nav-item.active { color: white; }
.nav-item.active::after {
    content: ''; position: absolute; bottom: -24px; left: 0; width: 100%; height: 2px; background: var(--color-gold-500);
}

.nav-item.special-tribute {
    color: var(--color-gold-500); border: 1px solid var(--gold-dim); padding: 5px 15px; border-radius: 50px; background: var(--gold-subtle);
}
.nav-item.special-tribute:hover { background: var(--gold-dim); box-shadow: 0 0 15px var(--gold-dim); }

.user-chip { 
    padding: 4px 15px 4px 4px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px; gap: 10px; font-size: 0.85rem; font-weight: 600; display:flex; align-items:center; color: #fff; transition:0.3s;
}
.user-chip:hover { border-color: var(--color-gold-500); background: rgba(255,215,0,0.1); }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; }

/* ==========================================================================
   5. LAYOUT & HERO
   ========================================================================== */
.page-content { padding-top: 140px; padding-bottom: 80px; min-height: 80vh; }

.hero { position: relative; padding: 100px 0; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px;
    background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.3);
    border-radius: 100px; color: var(--color-gold-500); font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 30px;
}

/* ==========================================================================
   6. MODULE STAFF NEXUS (Nouveau CSS intégré)
   ========================================================================== */
.staff-controls {
    position: sticky; top: 80px; z-index: 900; background: rgba(5,5,5,0.95); 
    padding: 15px 0; border-bottom: 1px solid var(--glass-border); margin-bottom: 40px;
}
.filter-group { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.filter-btn { 
    background: transparent; border: 1px solid var(--glass-border); color: #888; 
    padding: 8px 20px; border-radius: 50px; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: 0.3s; white-space: nowrap; 
}
.filter-btn:hover, .filter-btn.active { 
    background: var(--color-gold-500); color: #000; border-color: var(--color-gold-500); 
}
.search-input { 
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); color: #fff; 
    padding: 10px 20px; border-radius: 50px; width: 100%; max-width: 300px; font-family: var(--font-primary);
}
.search-input:focus { outline: none; border-color: var(--color-gold-500); }

/* Sections Staff */
.dept-title { 
    font-family: var(--font-display); font-size: 2rem; color: var(--color-gold-500); 
    margin: 60px 0 30px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; 
    text-transform: uppercase; letter-spacing: 1px;
}

.staff-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; 
}

/* Carte Staff 3D */
.staff-card {
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 30px 20px; text-align: center; display: flex; flex-direction: column; align-items: center;
    position: relative; overflow: hidden; height: 100%; min-height: 350px;
    transition: transform 0.1s, box-shadow 0.3s, border-color 0.3s;
    transform-style: preserve-3d; will-change: transform; cursor: pointer;
}
.staff-card:hover { 
    border-color: var(--color-gold-500); box-shadow: 0 10px 40px rgba(0,0,0,0.6); transform: translateY(-5px);
}
.staff-card::before { 
    content: ''; position: absolute; inset: 0; opacity: 0; 
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%); 
    transition: 0.3s; pointer-events: none; 
}
.staff-card:hover::before { opacity: 1; }

.avatar-box { position: relative; margin-bottom: 20px; }
.avatar-img { 
    width: 110px; height: 110px; border-radius: 50%; object-fit: cover; 
    border: 3px solid transparent; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.staff-card:hover .avatar-img { transform: scale(1.1); }

.staff-name { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; color:white; }
.role-badge { 
    padding: 5px 15px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; 
    text-transform: uppercase; margin-bottom: 20px; letter-spacing: 1px; display: inline-block;
}

.discord-tag { 
    background: #151515; padding: 10px 15px; border-radius: 8px; font-family: var(--font-mono); 
    font-size: 0.85rem; color: #888; cursor: copy; transition: 0.3s; width: 100%; 
    display: flex; align-items: center; justify-content: center; gap: 8px; z-index: 10; position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}
.discord-tag:hover { background: var(--color-discord); color: #fff; border-color: var(--color-discord); }
.discord-tag.copied { background: var(--success); color: #000; border-color: var(--success); }

/* Actions Overlay sur Carte */
.card-actions { 
    position: absolute; top: 15px; right: 15px; opacity: 0; transform: translateX(10px); transition: 0.3s; 
}
.staff-card:hover .card-actions { opacity: 1; transform: translateX(0); }
.eye-btn { 
    width: 35px; height: 35px; background: rgba(255,255,255,0.1); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: white;
}
.eye-btn:hover { background: var(--color-gold-500); color: black; }

/* ==========================================================================
   7. MODALS (Unifié)
   ========================================================================== */
.modal-overlay { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: var(--z-modal); 
    display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); 
}
.modal-overlay.active { display: flex; }

/* Staff Modal Specific */
.staff-modal-card { 
    background: #111; width: 90%; max-width: 450px; border-radius: 20px; 
    border: 1px solid var(--glass-border); overflow: hidden; position: relative; animation: pop 0.3s ease; 
}
.modal-header-banner { height: 100px; background: linear-gradient(45deg, var(--color-gold-500), #e67e22); }
.modal-close { 
    position: absolute; top: 15px; right: 15px; cursor: pointer; background: rgba(0,0,0,0.3); 
    width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; 
}
.modal-body { padding: 50px 30px 30px; text-align: center; }
.modal-avatar-large { 
    width: 90px; height: 90px; border-radius: 50%; border: 4px solid #111; 
    margin-top: -95px; background: #222; object-fit: cover; position: relative; z-index: 2;
}

.modal-name { font-size: 2rem; font-family: var(--font-display); margin: 10px 0 5px; color: white; }
.note-display { font-style: italic; color: #888; margin: 20px 0; display: block; font-size: 1.1rem; }

.modal-stats { 
    display: flex; gap: 30px; border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 25px; margin-top: 25px; justify-content: center; 
}
.m-stat { text-align: center; }
.m-val { display: block; font-size: 1.4rem; font-weight: 700; color: #fff; }
.m-lbl { font-size: 0.7rem; color: #666; text-transform: uppercase; letter-spacing: 1px; }

/* Edition Note */
.note-edit-area { display: none; margin-top: 15px; }
.note-input { 
    width: 100%; padding: 10px; background: #222; border: 1px solid #444; color: white; 
    border-radius: 6px; margin-bottom: 10px; 
}
.btn-save { 
    background: var(--color-gold-500); border: none; padding: 8px 20px; border-radius: 6px; 
    font-weight: bold; cursor: pointer; color: black; 
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer { 
    border-top: 1px solid var(--glass-border); padding: 60px 0 40px; 
    background: #020202; margin-top: auto; 
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h2 { font-family: var(--font-display); color: var(--color-gold-500); margin-bottom: 15px; }
.footer-links h4 { color: white; margin-bottom: 20px; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a { color: var(--rarity-common); }
.footer-links a:hover { color: white; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; color: #666; font-size: 0.9rem; }

/* ==========================================================================
   9. ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.8s ease-out forwards; opacity: 0; }

@media (max-width: 900px) {
    .nav-links, .user-chip span { display: none; }
    .staff-controls { top: 60px; }
    .hero h1 { font-size: 3rem; }
    .filter-group { justify-content: flex-start; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
}