@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-main: #0a0a0a;
    --text-main: #ededed;
    --text-muted: #999999;
    --border-color: rgba(255, 255, 255, 0.08);
    --danger: #ff4d4d;
    --bg-sidebar: #0f0f0f;
    --accent-orange: #d97b56; /* Seulement pour le Hub */
}

/* Thèmes dynamiques selon la page */
body.theme-hub { --bg-card: #141414; --accent-color: #d99a5a; }
body.theme-aegis { --bg-card: #141a24; --accent-color: #6496c8; }
body.theme-nocturne { --bg-card: #160f18; --accent-color: #8e44ad; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); }

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate { animation: fadeIn 0.6s ease forwards; }

/* --- BOUTONS --- */
.btn { display: inline-block; background-color: var(--text-main); color: var(--bg-main); padding: 0.8rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600; margin-top: 1.5rem; transition: 0.2s; text-align: center; width: 100%; box-sizing: border-box; border: none; cursor: pointer; }
.btn:hover { opacity: 0.9; }
.btn-back { display: inline-block; background: rgba(255,255,255,0.1); color: white; padding: 0.5rem 1rem; border-radius: 6px; text-decoration: none; margin-bottom: 2rem; transition: 0.2s;}
.btn-back:hover { background: rgba(255,255,255,0.2); }

/* --- MODAL MOT DE PASSE (Pop-up Staff) --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-box { background: var(--bg-card); padding: 2.5rem; border-radius: 16px; border: 1px solid var(--accent-color); text-align: center; width: 90%; max-width: 400px; transform: scale(0.9); transition: 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-box h3 { color: var(--text-main); margin-bottom: 0.5rem; font-size: 1.5rem;}
.modal-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.modal-box input { width: 100%; padding: 0.8rem; margin-bottom: 1rem; background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); color: white; border-radius: 8px; outline: none; transition: 0.2s; text-align: center; font-size: 1.2rem; letter-spacing: 2px;}
.modal-box input:focus { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(255,255,255,0.1); }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-bottom: 1rem; display: none; }
.btn-secondary { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); margin-top: 0.5rem; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: white; }

/* --- STRUCTURE PRINCIPALE (HUB) --- */
.layout-split { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 280px; background-color: var(--bg-sidebar); border-right: 1px solid var(--border-color); padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 2rem; z-index: 10; overflow-y: auto;}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; background: linear-gradient(90deg, var(--accent-color), var(--accent-orange)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-menu li a { text-decoration: none; color: var(--text-muted); padding: 0.8rem 1rem; border-radius: 8px; display: flex; align-items: center; gap: 10px; transition: 0.2s; font-weight: 600; font-size: 0.9rem; }
.nav-menu li a:hover, .nav-menu li a.active { background-color: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.main-content { flex: 1; overflow-y: auto; padding: 3rem 5rem; scroll-behavior: smooth; }
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-track { background: var(--bg-main); }
.main-content::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

/* --- COMPOSANTS GRAPHIQUES --- */
.section-title { font-size: 1.5rem; margin: 3rem 0 1.5rem 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); color: var(--accent-color); }
.card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; transition: 0.2s; }
.card:hover { border-color: rgba(255, 255, 255, 0.2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.hero { background: linear-gradient(145deg, var(--bg-card) 0%, rgba(20,20,20,0) 100%); padding: 3rem; border-radius: 16px; border: 1px solid var(--border-color); }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; line-height: 1.2; }
.hero p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; max-width: 800px; }

details { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 1rem; overflow: hidden; transition: 0.3s; }
summary { padding: 1.5rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--text-main); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--accent-color); transition: 0.3s; }
details[open] summary::after { content: '-'; }
details[open] summary { border-bottom: 1px solid var(--border-color); background-color: rgba(255,255,255,0.02); }
.details-content { padding: 1.5rem; color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* Factions & Hierarchie */
.factions { display: flex; gap: 2rem; }
.faction-card { flex: 1; padding: 2rem; border-radius: 16px; position: relative; }
.faction-aiden { background: linear-gradient(180deg, rgba(20, 30, 40, 0.8) 0%, var(--bg-card) 100%); border: 1px solid rgba(100, 150, 200, 0.2); }
.faction-marcus { background: linear-gradient(180deg, rgba(40, 20, 40, 0.8) 0%, var(--bg-card) 100%); border: 1px solid rgba(150, 80, 150, 0.2); }
.hierarchy-list { list-style: none; margin-top: 1.5rem; }
.hierarchy-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.role-badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; font-weight: 600; text-transform: uppercase; background: rgba(255,255,255,0.1); color: var(--accent-color); white-space: nowrap; margin-left: 10px; }
.recap-box { background: rgba(217, 154, 90, 0.05); border: 1px solid var(--accent-color); border-radius: 12px; padding: 2rem; text-align: center; }

/* Pages Orgas Spécifiques */
.page-orga { padding: 3rem 10%; }
.header-orga { text-align: center; margin-bottom: 4rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.header-orga h1 { font-size: 3rem; color: var(--accent-color); line-height: 1.2; }
.header-orga p { color: var(--text-muted); margin-top: 1rem; font-size: 1.2rem; }
.card h2 { color: var(--accent-color); margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; font-size: 1.3rem; }
.card ul { list-style: none; color: var(--text-muted); }
.card ul li { margin-bottom: 0.8rem; padding-left: 1.5rem; position: relative; line-height: 1.5; }
.theme-aegis .card ul li::before { content: "??"; position: absolute; left: 0; font-size: 0.8rem; top: 3px; }
.theme-nocturne .card ul li::before { content: "???"; position: absolute; left: 0; top: 3px; font-size: 0.8rem; }
.image-placeholder { width: 100%; height: 200px; background: #222; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 1rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .factions { flex-direction: column; }
}
@media (max-width: 768px) {
    .layout-split { flex-direction: column; height: auto; overflow: visible; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 1.5rem; align-items: center; }
    .nav-menu { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .main-content { padding: 2rem 1.5rem; overflow-y: visible; }
    .hero { padding: 2rem; }
    .hero h1 { font-size: 2.2rem; }
    .page-orga { padding: 1.5rem 5%; }
    .header-orga h1 { font-size: 2rem; }
}