@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&family=Mulish:wght@400;600&display=swap");

:root {
    --bg-core: #000000;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    
    --brand-glow: #ffffff;
    --brand-accent: #333333;
    --brand-cyan: #999999;
    
    --glass-surface: rgba(20, 20, 20, 0.8);
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --anim-bg: #000000;
    --anim-rgb-1: 255, 255, 255;
    --anim-rgb-2: 51, 51, 51;
    --anim-rgb-3: 153, 153, 153;

    --color-white: #ffffff;
    --color-black: #000000;
    
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --glass-highlight-hover: rgba(255, 255, 255, 0.08);
    
    --glass-header: #000000dd;
    
    --shadow-glow: #ffffff4d;
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.6);
    
    --nav-active-bg: #ffffff33;
    --nav-active-border: #3333334d;
    
    --profile-grad-start: #ffffff1a;
    --profile-grad-end: #3333331a;
    
    --footer-grad-start: #020203;
    --footer-grad-end: #000000;
    
    --social-bg: rgba(255, 255, 255, 0.1);
    --social-icon: rgba(255, 255, 255, 0.7);
    
    --radius-lg: 24px;
    --radius-sm: 12px;
    --spacing: 24px;
}

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

body {
    font-family: "Mulish", sans-serif;
    background-color: var(--bg-core);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* ARRIÈRE-PLAN CANVAS */
#flow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   2. HEADER
   ========================================= */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 80px;
    background: var(--glass-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--brand-glow),
        transparent
    );
    opacity: 0.5;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area img {
    height: 34px;
    display: block;
    filter: drop-shadow(0 0 10px var(--shadow-glow));
}

.header-inner > a {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: x-large;
    font-weight: bold;
}

.nav-center {
    display: flex;
    gap: 5px;
    background: var(--glass-highlight-hover); /* Note: was 0.03 in original, consolidated to 0.05/0.08 vars */
    padding: 5px;
    border-radius: 50px;
    border: 1px solid var(--glass-highlight);
}

.nav-link {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 40px;
}

.nav-link:hover {
    color: var(--color-white);
    background: var(--glass-highlight);
}

.nav-link.active {
    color: var(--color-white);
    background: linear-gradient(
        135deg,
        var(--nav-active-bg),
        var(--profile-grad-end) /* Reusing similar opacity var */
    );
    border: 1px solid var(--nav-active-border);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--text-secondary);
    padding: 5px 0;
    width: 140px;
    transition: 0.3s;
}

.search-box:focus-within {
    width: 200px;
    border-color: var(--brand-glow);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 14px;
    width: 100%;
    outline: none;
}

.btn-login {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-white);
    padding: 9px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    font-family: "Space Grotesk";
}

.btn-login:hover {
    background: var(--brand-glow);
    border-color: var(--brand-glow);
    box-shadow: 0 0 20px var(--shadow-glow);
}

/* =========================================
   3. LAYOUT & BANNIÈRE
   ========================================= */
.container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 var(--spacing);
    flex: 1;
    width: 100%;
}

.banner-wrapper {
    height: 240px;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 60px;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.banner-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.banner-wrapper:hover img {
    transform: scale(1.05);
}

/* Breadcrumb */
.breadcrumb-container {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: "Space Grotesk";
    display: flex;
    align-items: center;
}

.breadcrumb-item:hover {
    color: var(--brand-glow);
}

.breadcrumb-separator {
    margin: 0 8px;
    opacity: 0.4;
}

.breadcrumb-current {
    color: var(--color-white);
    font-weight: 600;
}

/* =========================================
   4. LISTE FORUM
   ========================================= */
.forum-section {
    margin-bottom: 50px;
}

.forum-header {
    font-family: "Space Grotesk";
    font-size: 26px;
    font-weight: 300;
    margin-bottom: 25px;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 15px;
}

.forum-header::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--brand-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-accent);
}

.forum-item {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.forum-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(
        to bottom,
        var(--brand-glow),
        var(--brand-accent)
    );
    opacity: 0;
    transition: 0.3s;
}

.forum-item:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

.forum-item:hover::before {
    opacity: 1;
}

.forum-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border); /* Note: consolidated slightly from 0.1 to 0.08 var */
    flex-shrink: 0;
}

.forum-item:hover .forum-avatar {
    border-color: var(--brand-glow);
}

a.forum-subject {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-white);
}

.forum-item:hover a.forum-subject {
    color: var(--brand-cyan);
}

.forum-author {
    font-size: 14px;
    color: var(--brand-accent);
    font-weight: 600;
    width: 130px;
}

.forum-author a {
    color: inherit;
}

.forum-messages {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    background: var(--glass-highlight);
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 90px;
    text-align: center;
}

.forum-last-message {
    font-size: 13px;
    color: var(--text-secondary);
    width: 180px;
    text-align: right;
    opacity: 0.8;
}

/* =========================================
   5. THREADS (MESSAGES)
   ========================================= */
.thread-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.thread-title {
    font-family: "Space Grotesk";
    font-size: 32px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 10px;
}

.thread-meta {
    color: var(--text-secondary);
    font-size: 14px;
}

.comment-block {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
}

.comment-sidebar {
    width: 120px;
    text-align: center;
    flex-shrink: 0;
    border-right: 1px solid var(--glass-border);
    padding-right: 20px;
}

.comment-content {
    flex: 1;
}

.comment-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--glass-border);
}

.comment-pseudo {
    display: block;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
}

.comment-text {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.7;
}

.comment-text a {
    color: var(--brand-cyan);
    text-decoration: underline;
}

/* =========================================
   6. PROFILE
   ========================================= */
.profile-header {
    background: linear-gradient(
        135deg,
        var(--profile-grad-start),
        var(--profile-grad-end)
    );
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--brand-glow);
}

.profile-info h1 {
    font-family: "Space Grotesk";
    font-size: 36px;
    margin-bottom: 5px;
}

.profile-job {
    color: var(--brand-cyan);
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat-box {
    text-align: center;
    background: var(--bg-stat-box);
    padding: 10px 20px;
    border-radius: 10px;
}

.stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-white);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   7. AUTH (LOGIN/REGISTER)
   ========================================= */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
}

.auth-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 50px var(--shadow-heavy);
}

.auth-title {
    font-family: "Space Grotesk";
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--color-white);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: var(--color-white);
    font-family: "Mulish";
    outline: none;
    transition: 0.3s;
}

.form-input:focus {
    border-color: var(--brand-glow);
    background: var(--glass-highlight-hover);
}

.btn-block {
    width: 100%;
    background: var(--brand-glow);
    color: var(--color-white);
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-block:hover {
    background: var(--brand-accent);
    box-shadow: 0 0 20px var(--glow-accent);
}

.auth-footer {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--brand-cyan);
}

/* =========================================
   8. FOOTER
   ========================================= */
.modern-footer {
    margin-top: auto;
    background: linear-gradient(
        to top,
        var(--footer-grad-start),
        var(--footer-grad-end)
    );
    border-top: 1px solid var(--glass-border);
    padding-top: 70px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h4 {
    font-family: "Space Grotesk";
    font-size: 16px;
    color: var(--color-white);
    margin-bottom: 25px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--brand-cyan);
    padding-left: 5px;
}

.newsletter-input {
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: var(--color-white);
    width: 100%;
    margin-bottom: 10px;
}

.newsletter-btn {
    background: var(--brand-accent);
    color: var(--color-white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid var(--footer-border-top);
    padding: 25px 0;
    text-align: center;
    color: var(--footer-copyright);
    font-size: 13px;
}

/* =========================================
   9. UTILITIES & CLEANUP
   ========================================= */
/* Header icons */
.search-icon {
    font-size: 14px;
    opacity: 0.5;
}

/* Categories Grid Icons */
.cat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.bg-glow {
    background: var(--brand-glow);
}
.bg-accent {
    background: var(--brand-accent);
}
.bg-cyan {
    background: var(--brand-cyan);
}

/* Footer Socials */
.footer-socials {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 30px;
    height: 30px;
    background: var(--social-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--social-icon);
}

/* Thread Helpers */
.text-accent {
    color: var(--brand-accent);
}

.admin-badge {
    font-size: 11px;
    opacity: 0.5;
    display: block;
}

/* Profile Helpers */
.profile-joined {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.profile-quote {
    font-style: italic;
    color: var(--text-secondary);
}

.profile-section-title {
    font-family: "Space Grotesk";
    margin-bottom: 20px;
    color: var(--color-white);
    margin-top: 40px;
    border-left: 4px solid var(--brand-glow);
    padding-left: 15px;
}

.date-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link,
.current-page {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.page-link {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-white);
}

.page-link:hover {
    background: var(--color-white);
    color: var(--color-black);
}

.current-page {
    background: var(--brand-glow);
    color: var(--color-white);
    border: 1px solid var(--brand-glow);
}

/* Mobile */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .nav-center {
        overflow-x: auto;
        max-width: 100%;
    }

    .forum-item,
    .comment-block,
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .comment-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 15px;
        padding-right: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }
}

.comment-text>a {
  text-decoration: none;
  color: var(--brand-cyan);
}

.comment-text>a:hover {
  color: var(--brand-accent);
  font-weight: bold;
}