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

:root {
    --primary-color: #0066FF;
    --secondary-color: #1a1a1a;
    --text-light: #e0e0e0;
    --text-dark: #1a1a1a;
    --accent-color: #0080FF;
    --border-color: #333;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-light);
    line-height: 1.6;
}

/* === LOADER SCREEN === */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 2.5s forwards;
    padding: 20px;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.loader {
    text-align: center;
    max-width: 90vw;
}

.loader-text {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #0066FF, #0080FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.loader-bar {
    width: 80vw;
    max-width: 300px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, transparent, #0066FF, transparent);
    width: 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* === SCROLL PROGRESS BAR TOP LEFT === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #0066FF, #0080FF);
    z-index: 9998;
    transition: width 0.1s ease-out;
}

/* Layout Principal */
.container {
    display: flex;
    min-height: 100vh;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: rgba(0, 102, 255, 0.15);
    border: 2px solid #0066FF;
    border-radius: 6px;
    cursor: pointer;
    z-index: 150;
    gap: 6px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background-color: #0066FF;
    border-radius: 1px;
    transition: all 0.3s ease;
    position: absolute;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 12px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 21px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 30px;
}

/* État normal - 3 traits */
.mobile-menu-toggle:not(.active) span:nth-child(1) {
    width: 20px;
    transform: rotate(0deg);
    opacity: 1;
}

.mobile-menu-toggle:not(.active) span:nth-child(2) {
    width: 20px;
    transform: rotate(0deg);
    opacity: 1;
}

.mobile-menu-toggle:not(.active) span:nth-child(3) {
    width: 20px;
    transform: rotate(0deg);
    opacity: 1;
}

/* État actif - Croix (X) */
.mobile-menu-toggle.active span:nth-child(1) {
    width: 24px;
    transform: rotate(45deg) translate(0, 8px);
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -1px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(0, -8px);
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -1px;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #0f0f0f;
    padding: 30px 20px;
    border-right: 2px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.logo-section h1 {
    font-size: 28px;
    color: var(--text-light);
    letter-spacing: 2px;
    font-weight: 700;
}

.logo-section h2 {
    font-size: 32px;
    color: var(--primary-color);
    letter-spacing: 3px;
    font-weight: 900;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 12px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.version-info {
    background-color: rgba(0, 102, 255, 0.1);
    padding: 12px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 30px;
    border-radius: 4px;
}

.version-title {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

.menu-principal h3 {
    font-size: 11px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
    margin-top: 30px;
}

.menu-principal ul {
    list-style: none;
    display: grid;
    grid-auto-flow: row;
}

.menu-principal li {
    margin-bottom: 8px;
    display: grid;
}

/* Force l'ordre du menu - Solution définitive */
.menu-principal li:nth-child(1) { order: 1; }  /* Accueil */
.menu-principal li:nth-child(2) { order: 2; }  /* Lexique */
.menu-principal li:nth-child(3) { order: 3; }  /* Règlement Général */
.menu-principal li:nth-child(4) { order: 4; }  /* Règles de Roleplay */
.menu-principal li:nth-child(5) { order: 5; }  /* Sanctions */
.menu-principal li:nth-child(6) { order: 6; }  /* Secteur Légal */
.menu-principal li:nth-child(7) { order: 7; }  /* Secteur Illégal */
.menu-principal li:nth-child(8) { order: 8; }  /* Contacts & Staff */

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-link:hover {
    background-color: rgba(0, 102, 255, 0.2);
    color: var(--primary-color);
    padding-left: 16px;
}

.nav-link.active {
    background-color: rgba(0, 102, 255, 0.3);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    padding-left: 12px;
}

.footer-sidebar {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: #666;
}

.footer-sidebar p {
    margin-bottom: 8px;
}

.copyright {
    font-size: 11px;
    color: #555;
}

/* Main Content */
.main-content {
    margin-left: 300px;
    flex: 1;
    padding: 0;
}

/* Header Banner */
.header-banner {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-subtitle {
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 600;
}

.banner-title {
    font-size: 64px;
    font-weight: 900;
    color: var(--text-light);
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 40px;
}

.banner-title .highlight {
    color: var(--primary-color);
    display: block;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-box {
    background-color: rgba(0, 102, 255, 0.1);
    padding: 20px;
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Welcome Section */
.welcome-section {
    padding: 40px;
    background-color: #1a1a1a;
}

.welcome-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.welcome-section p {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.8;
}

.alert-banner {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-icon {
    font-size: 28px;
}

.alert-banner p {
    margin: 0;
}

/* Quick Access Cards */
.quick-access {
    padding: 40px;
    background-color: #0f0f0f;
}

.quick-access h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-light);
}

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

.quick-card {
    background-color: #1a1a1a;
    border: 2px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-card:hover {
    background-color: #252525;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.quick-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-light);
}

.quick-card p {
    font-size: 14px;
    color: #888;
}

/* Pages générales */
.page-content {
    padding: 40px;
}

.page-title {
    font-size: 48px;
    margin-bottom: 30px;
    color: var(--text-light);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

.section {
    margin-bottom: 40px;
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.section h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section p {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 15px;
}

.section ul {
    list-style: none;
    padding-left: 20px;
}

.section li {
    margin-bottom: 12px;
    color: #aaa;
    padding-left: 20px;
    position: relative;
}

.section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* === LEXIQUE STYLES === */
.lexique-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.lexique-sidebar {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.lexique-sidebar h3 {
    font-size: 16px;
    color: #0066FF;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lexique-sidebar ul {
    list-style: none;
}

.lexique-sidebar li {
    margin-bottom: 10px;
}

.lexique-sidebar button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px;
    color: #aaa;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lexique-sidebar button:hover,
.lexique-sidebar button.active {
    background-color: rgba(0, 102, 255, 0.2);
    color: #0066FF;
}

.lexique-content {
    display: grid;
    gap: 30px;
}

.lexique-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.lexique-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lexique-section h2 {
    font-size: 24px;
    color: #0066FF;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066FF;
    padding-bottom: 10px;
}

.lexique-list {
    display: grid;
    gap: 15px;
}

.lexique-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 15px;
    background-color: rgba(0, 102, 255, 0.05);
    border-left: 3px solid #0066FF;
    border-radius: 4px;
    align-items: start;
}

.lexique-term {
    font-weight: 700;
    color: #0066FF;
    font-size: 14px;
}

.lexique-definition {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
}

.lexique-subitem {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 102, 255, 0.2);
}

.lexique-subitem strong {
    color: #FFD700;
    display: block;
    margin-bottom: 5px;
}

.lexique-subitem p {
    color: #999;
    font-size: 13px;
    margin-left: 10px;
}

/* === STAFF PAGE STYLES === */

.staff-page {
    padding: 40px;
}

.staff-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.staff-badge {
    background-color: rgba(255, 215, 0, 0.15);
    border: 1px solid #FFD700;
    color: #FFD700;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.staff-intro {
    color: #aaa;
    margin-bottom: 40px;
    font-size: 15px;
    line-height: 1.8;
}

/* Staff Grid - Petite grille compacte */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 50px;
}

/* Staff Cards */
.staff-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.staff-card:hover {
    border-color: #0066FF;
    background-color: #252525;
    transform: translateY(-2px);
}

/* Hover Bar Animation */
.staff-card-hover-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    animation: none;
    transition: none;
}

.staff-card:hover .staff-card-hover-bar {
    animation: expandBar 0.8s ease-in-out infinite;
}

@keyframes expandBar {
    0% {
        width: 0;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0;
        left: 100%;
    }
}

.staff-avatar {
    font-size: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF8C00, #FFB84D);
    margin-left: auto;
    margin-right: auto;
}

.staff-name {
    font-size: 15px;
    color: #e0e0e0;
    margin: 10px 0 8px 0;
    font-weight: 700;
}

.staff-role {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
    border: 1px solid;
}

/* Role Colors */
.staff-role.owner {
    background-color: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border-color: #FFD700;
}

.staff-role.co-owner {
    background-color: rgba(255, 165, 0, 0.15);
    color: #FFA500;
    border-color: #FFA500;
}

.staff-role.gerant {
    background-color: rgba(0, 255, 136, 0.15);
    color: #00FF88;
    border-color: #00FF88;
}

.staff-role.admin {
    background-color: rgba(0, 102, 255, 0.15);
    color: #0066FF;
    border-color: #0066FF;
}

.staff-role.moderator {
    background-color: rgba(100, 150, 255, 0.15);
    color: #6496FF;
    border-color: #6496FF;
}

.staff-role.helper {
    background-color: rgba(100, 200, 255, 0.15);
    color: #64C8FF;
    border-color: #64C8FF;
}

.staff-role.support {
    background-color: rgba(150, 150, 255, 0.15);
    color: #9696FF;
    border-color: #9696FF;
}

.staff-discord {
    color: #888;
    font-size: 11px;
    margin-top: 8px;
}

/* Contact Section */
.contact-section {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #0066FF;
    margin-bottom: 30px;
}

.contact-section h2 {
    font-size: 24px;
    color: #0066FF;
    margin-bottom: 15px;
}

.contact-section p {
    color: #aaa;
    margin-bottom: 15px;
}

.contact-section ul {
    list-style: none;
    padding-left: 20px;
}

.contact-section li {
    margin-bottom: 12px;
    color: #aaa;
    padding-left: 20px;
    position: relative;
}

.contact-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #0066FF;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
    }

    .banner-title {
        font-size: 48px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .lexique-container {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        padding: 80px 20px 20px 20px;
        transition: left 0.3s ease;
        z-index: 120;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .banner-title {
        font-size: 36px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .page-content {
        padding: 20px;
    }

    .scroll-progress {
        height: 3px;
    }

    .lexique-container {
        grid-template-columns: 1fr;
    }

    .lexique-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }

    .lexique-sidebar ul {
        display: contents;
    }

    .lexique-sidebar button {
        padding: 8px;
        font-size: 12px;
    }

    .lexique-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .banner-subtitle {
        font-size: 12px;
    }

    .page-title {
        font-size: 32px;
    }

    .header-banner {
        padding: 40px 20px;
    }

    .welcome-section,
    .quick-access {
        padding: 20px;
    }

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

    .staff-card {
        padding: 15px 10px;
    }

    .staff-avatar {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .staff-name {
        font-size: 13px;
    }

    .staff-page {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 70px 15px 15px 15px;
    }

    .logo-section h1 {
        font-size: 20px;
    }

    .logo-section h2 {
        font-size: 24px;
    }

    .banner-title {
        font-size: 28px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-box {
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }

    .quick-cards {
        grid-template-columns: 1fr;
    }

    .lexique-sidebar {
        grid-template-columns: 1fr;
    }

    .lexique-item {
        padding: 12px;
    }

    .lexique-term {
        font-size: 12px;
    }

    .lexique-definition {
        font-size: 12px;
    }

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

    .staff-card {
        padding: 12px 8px;
    }

    .staff-avatar {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }

    .staff-name {
        font-size: 12px;
    }

    .staff-role {
        font-size: 8px;
        padding: 3px 8px;
    }

    .staff-discord {
        font-size: 10px;
    }
}