/* ==========================================
   RESET & VARIABLES
   ========================================== */
:root {
    --bg-dark: #0f1011;
    --bg-lighter: #1a1b1e;
    --bg-card: #222428;
    --primary: #8a2be2; /* Violet EclipseRP */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.primary-color { color: var(--primary); font-weight: 700; }

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 30px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: filter 0.3s;
}

.btn-primary:hover { filter: brightness(1.2); }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(to bottom, rgba(15, 16, 17, 0.3), var(--bg-dark)), url('https://via.placeholder.com/1920x1080') center/cover;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.2rem;
    background: rgba(255,255,255,0.05);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-icons a:hover { color: #fff; background: var(--primary); }

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 3rem;
}

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

.btn-play {
    background-color: var(--primary);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.btn-play:hover { transform: scale(1.05); }

.online-count {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px; height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #22c55e;
}

/* ==========================================
   SECTIONS GLOBALES & SERVEURS GRID
   ========================================== */
section { padding: 80px 0; }
h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 40px; font-size: 0.95rem; }

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.server-card {
    background-color: var(--bg-lighter);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.server-bg {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.server-badge {
    position: absolute;
    top: 15px; left: 15px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}
.server-badge.gmod { background-color: #0ea5e9; }

.server-players {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 6px;
}

.server-info { padding: 20px; }
.server-info h3 { font-size: 1.2rem; margin-bottom: 5px; }
.server-info p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }

.server-actions { display: flex; gap: 10px; }
.btn-discord-small { background: #5865F2; padding: 10px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.btn-join { background: var(--primary); flex-grow: 1; text-align: center; padding: 10px; border-radius: 8px; font-weight: 700; }

/* ==========================================
   FAQ & FOOTER
   ========================================== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--bg-lighter);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.faq-item summary { padding: 20px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-content { padding: 0 20px 20px 20px; color: var(--text-muted); font-size: 0.95rem; }

footer { padding: 60px 0; border-top: 1px solid var(--border-color); background: var(--bg-dark); }
.footer-grid { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 40px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 20px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }

/* ==========================================
   PAGE LOGIN
   ========================================== */
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; background: radial-gradient(circle at center, var(--bg-card), var(--bg-dark)); }
.login-wrapper { width: 100%; max-width: 500px; padding: 20px; position: relative; }
.back-home { display: inline-block; color: var(--text-muted); margin-bottom: 20px; font-weight: 600; }
.back-home:hover { color: var(--text-main); }
.login-box { background: var(--bg-lighter); padding: 40px; border-radius: 16px; border: 1px solid var(--border-color); text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.login-logo { max-height: 80px; margin-bottom: 20px; }
.login-box h2 { font-size: 1.8rem; margin-bottom: 10px; }
.login-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.auth-buttons { display: flex; flex-direction: column; gap: 15px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; border-radius: 8px; font-weight: 700; font-size: 1rem; transition: transform 0.2s, filter 0.2s; }
.discord-btn { background: #5865F2; color: #fff; }
.steam-btn { background: #171a21; color: #fff; border: 1px solid #2a475e; }
.auth-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.login-terms { margin-top: 25px; font-size: 0.75rem !important; }

/* ==========================================
   PAGE WIKI & PAGE STATS (Layout commun)
   ========================================== */
.page-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 40px 20px; min-height: calc(100vh - 100px); }
.wiki-sidebar h3 { font-size: 1.1rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.wiki-nav { list-style: none; }
.wiki-nav li { margin-bottom: 10px; }
.wiki-nav a { display: block; padding: 10px 15px; color: var(--text-muted); border-radius: 8px; transition: background 0.2s, color 0.2s; }
.wiki-nav a:hover, .wiki-nav a.active { background: rgba(138, 43, 226, 0.1); color: var(--primary); font-weight: 700; }
.wiki-content h1 { font-size: 2.5rem; margin-bottom: 5px; color: var(--primary); }
.last-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 30px; }
.wiki-card { background: var(--bg-lighter); padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); }

/* ==========================================
   PAGE FORUM COMPLÈTE
   ========================================== */
.forum-container { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.page-title { font-size: 2rem; font-weight: 800; margin-bottom: 20px; }

/* Fil d'ariane */
.breadcrumb { background: var(--bg-lighter); padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; font-size: 0.9rem; border: 1px solid var(--border-color); }
.breadcrumb a { color: var(--primary); }
.breadcrumb .current { color: var(--text-muted); }
.breadcrumb .separator { margin: 0 10px; color: #555; }

/* Grille principale Forum */
.forum-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }

/* Catégories et lignes */
.category-block { background: var(--bg-lighter); border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 20px; overflow: hidden; }
.category-header { background: var(--bg-card); padding: 15px 20px; border-bottom: 1px solid var(--border-color); }
.category-header h2 { font-size: 1.2rem; margin: 0; }
.category-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 5px; }

.forum-row { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); transition: background 0.2s; }
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: rgba(255,255,255,0.02); }
.forum-icon { font-size: 2rem; color: var(--primary); margin-right: 20px; width: 40px; text-align: center; }
.forum-info { flex-grow: 1; }
.forum-title { color: var(--text-main); font-weight: 700; font-size: 1.1rem; display: block; margin-bottom: 5px; }
.forum-title:hover { color: var(--primary); }
.forum-desc { color: var(--text-muted); font-size: 0.85rem; }
.forum-stats { text-align: right; font-size: 0.85rem; color: var(--text-muted); min-width: 120px; display: flex; flex-direction: column; }

/* Barre latérale (Sidebar) */
.sidebar-widget { background: var(--bg-lighter); border-radius: 8px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; }

.profile-widget { display: flex; align-items: center; gap: 15px; }
.profile-widget .avatar { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 2px solid var(--primary); }
.profile-info { display: flex; flex-direction: column; }
.username { font-weight: 800; color: var(--primary); font-size: 1.2rem; }
.badge-role { background: #dc3545; color: white; padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; text-transform: uppercase; margin-top: 5px; width: fit-content; }

.stats-list { list-style: none; font-size: 0.9rem; }
.stats-list li { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--text-muted); }
.stats-list span { color: var(--text-main); font-weight: 600; }
.online-text { font-size: 0.9rem; color: var(--text-muted); }

/* ==========================================
   PAGE CGU (LEGAL)
   ========================================== */
.legal-content { background: var(--bg-lighter); padding: 40px; border-radius: 12px; border: 1px solid var(--border-color); margin-top: 20px; }
.legal-content h2 { font-size: 1.5rem; color: var(--primary); margin-top: 30px; margin-bottom: 15px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: 15px; line-height: 1.7; }
.legal-content ul { padding-left: 20px; margin-bottom: 20px; list-style-type: disc; }

/* ==========================================
   VIDEO BACKGROUND FIX
   ========================================== */
.video-background {
    position: fixed;
    top: -5%; /* Dépasse légèrement pour cacher les bords flous */
    left: -5%;
    width: 110vw;
    height: 110vh;
    z-index: -10; /* Reste bien au fond */
    overflow: hidden;
    pointer-events: none;
    filter: blur(15px) brightness(0.3);
}

.video-background iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 110vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================
   NAVBAR SEMI-TRANSPARENTE
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem; /* Un peu plus fine */
    position: sticky; /* Reste accrochée en haut quand on descend */
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(21, 23, 26, 0.85) !important; /* Semi-transparent */
    backdrop-filter: blur(12px); /* Effet verre flouté derrière */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================
   FORMULAIRES & EDITEUR (create_post)
   ========================================== */
.input-form {
    width: 100%;
    padding: 15px 20px;
    border-radius: 8px;
    background: var(--bg-lighter);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}
.input-form:focus { outline: none; border-color: var(--primary); }

/* Adaptation du thème Quill pour le mode sombre */
.ql-toolbar { background: var(--bg-lighter); border-color: var(--border-color) !important; border-radius: 8px 8px 0 0; }
.ql-container { background: var(--bg-card); border-color: var(--border-color) !important; border-radius: 0 0 8px 8px; min-height: 300px; font-family: 'Montserrat', sans-serif; font-size: 1rem; color: var(--text-main); }
.ql-stroke { stroke: var(--text-muted) !important; }
.ql-fill { fill: var(--text-muted) !important; }
.ql-picker-label { color: var(--text-muted) !important; }

/* ==========================================
   AFFICHAGE D'UN TOPIC (topic.php)
   ========================================== */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-lighter);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.topic-actions { display: flex; gap: 10px; }
.btn-danger { background: #ef4444; color: white; padding: 8px 15px; border-radius: 6px; font-weight: bold; border: none; cursor: pointer; transition: 0.2s; }
.btn-danger:hover { background: #dc2626; }

.post-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 20px; }
.post-header { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-color); padding: 15px 20px; background: rgba(255,255,255,0.02); }
.post-avatar { width: 50px; height: 50px; border-radius: 8px; border: 2px solid var(--primary); object-fit: cover; }
.post-meta { flex-grow: 1; }
.post-author { font-weight: 800; font-size: 1.1rem; color: var(--primary); display: block; }
.post-date { font-size: 0.8rem; color: var(--text-muted); }
.post-body { padding: 20px; color: var(--text-muted); line-height: 1.7; }
.post-body strong { color: var(--text-main); }

/* ==========================================
   NOTIFICATIONS & AVATAR NAVBAR
   ========================================== */
.flash-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease;
}

.flash-banner.success {
    background-color: rgba(34, 197, 94, 0.9);
    border: 1px solid #16a34a;
    color: white;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    color: var(--text-main);
    font-weight: 700;
    transition: background 0.3s;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-profile-btn img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.video-background {
    position: fixed;      /* reste fixe pendant le scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;          /* passe derrière tout le contenu */
    overflow: hidden;
    pointer-events: none; /* la vidéo ne capte pas les clics */
}

.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;       /* 9/16 de la largeur */
    min-height: 100vh;
    min-width: 177.78vh;   /* 16/9 de la hauteur */
    transform: translate(-50%, -50%);
    border: 0;
}

.servers-section,
.faq-section,
footer {
    position: relative;
    z-index: 1;                  /* passe au-dessus de la vidéo (z-index: -1) */
    background-color: #0e0f12;   /* mets ici la couleur de fond sombre de ton thème */
}

table.sanc th { background: #131a27; color: var(--p-accent); padding: 13px 8px; text-align: center; font-size: 0.82rem; border: 1px solid var(--p-border); }