/* --- Polices & Variables --- */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&family=Exo+2:wght@800&display=swap");

:root {
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Roboto Mono', monospace;
    --color-bg: #000000;
    --color-surface: #1a1a1a;
    --color-text: #f0f0f0;
    --color-text-muted: #a0a0a0;
    --color-pink: #007bff;
    --color-cyan: #00ff00;
    --color-border: #333333;
    --shadow-glow: 0 0 15px color-mix(in srgb, var(--color-pink) 30%, transparent);
    --border-radius: 4px;
}

/* --- Styles Généraux --- */
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
    background-image: url("https://www.transparenttextures.com/patterns/low-contrast-linen.png");
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.content-wrapper {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

a {
    color: var(--color-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px var(--color-cyan);
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px var(--color-cyan);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-top: 0;
    text-transform: uppercase;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Header & Footer --- */
.main-header {
    background-color: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-pink);
    text-shadow: 0 0 8px var(--color-pink);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    image-rendering: pixelated;
}

.main-nav a {
    margin-left: 2rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.main-footer {
    background: var(--color-surface);
    border-top: 2px solid var(--color-border);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    margin: 0 1rem;
    color: var(--color-text-muted);
    text-shadow: none;
}
.footer-links a:hover {
    color: var(--color-cyan);
}

/* --- Boutons --- */
.button {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 2px solid var(--color-pink);
    color: var(--color-pink);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 5px var(--color-pink), 0 0 5px var(--color-pink);
    display: inline-block;
    text-shadow: none;
}

.button:hover {
    background-color: var(--color-pink);
    color: var(--color-surface);
    box-shadow: inset 0 0 10px #000, 0 0 20px var(--color-pink);
    text-shadow: none;
}

/* --- Hero Banner --- */
.hero-banner {
    position: relative;
    height: 250px;
    border: 2px solid var(--color-border);
    background-color: var(--color-bg);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-banner .banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
    filter: grayscale(100%) contrast(1.2);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    padding: 2rem;
    background: radial-gradient(circle, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 70%);
}

.hero-overlay h1 {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 10px var(--color-pink), 2px 2px 0px var(--color-border);
    margin: 0;
    line-height: 1.2;
}

/* --- Fil d'Ariane (Breadcrumb) --- */
.breadcrumb {
    padding: 0.8rem 1rem;
    background-color: var(--color-surface);
    border-left: 4px solid var(--color-cyan);
    margin-bottom: 2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item {
    color: var(--color-text-muted);
    text-shadow: none;
}

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

.breadcrumb-separator {
    color: var(--color-pink);
    font-weight: bold;
}

/* --- Cartes Générales --- */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* --- FORUM LIST (Page d'accueil) --- */
.forum-section {
    margin-bottom: 2rem;
}

.forum-header {
    background: linear-gradient(90deg, var(--color-surface) 0%, transparent 100%);
    border-bottom: 2px solid var(--color-border);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-cyan);
    display: inline-block;
    min-width: 200px;
}

.forum-item {
    display: grid;
    /* Grid layout: Avatar | Subject | Author | Stats | Last Msg */
    grid-template-columns: 60px 1fr 150px 120px 200px;
    gap: 1rem;
    align-items: center;
    background-color: color-mix(in srgb, var(--color-surface) 50%, transparent);
    border: 1px solid var(--color-border);
    margin-bottom: -1px; /* Collapsed borders */
    padding: 1rem;
    transition: background-color 0.2s, transform 0.1s;
}

.forum-item:hover {
    background-color: var(--color-surface);
    border-color: var(--color-cyan);
    z-index: 10;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.forum-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    object-fit: cover;
}

.forum-subject {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    text-shadow: none;
    line-height: 1.3;
}

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

.forum-author,
.forum-messages, 
.forum-last-message {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.forum-author a {
    color: var(--color-pink);
    text-shadow: none;
}

.forum-last-message {
    text-align: right;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive Forum List */
@media (max-width: 900px) {
    .forum-item {
        grid-template-columns: 60px 1fr;
        grid-template-areas: 
            "avatar subject"
            "avatar meta";
    }
    .forum-avatar { grid-area: avatar; }
    .forum-subject { grid-area: subject; }
    
    /* On regroupe les infos méta */
    .forum-author, .forum-messages, .forum-last-message {
        display: inline-block;
        margin-right: 10px;
        grid-area: meta;
        font-size: 0.75rem;
    }
    .forum-last-message { text-align: left; }
}

/* --- THREAD VIEW (Sujets) --- */
/* Note: Le DOM a un style inline display: flex, on l'utilise */
.card[style*="display: flex"] {
    gap: 1.5rem;
    align-items: flex-start;
}

.post-author {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-right: 1px solid var(--color-border);
    height: 100%;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border: 2px solid var(--color-pink);
    padding: 4px;
    margin-bottom: 1rem;
    background-color: #000;
}

.post-author a strong {
    color: var(--color-pink);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.post-body {
    flex-grow: 1;
    padding: 0.5rem 1rem;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.post-body p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Responsive Thread */
@media (max-width: 768px) {
    .card[style*="display: flex"] {
        flex-direction: column;
    }
    .post-author {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        justify-content: flex-start;
        gap: 1rem;
        height: auto;
        padding: 0.5rem;
    }
    .author-avatar {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }
}

/* --- USER PROFILE (Profil) --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border: 4px solid var(--color-cyan);
    box-shadow: 0 0 15px var(--color-cyan);
}

.profile-info {
    flex-grow: 1;
}

.profile-info h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan);
}

.profile-stats ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border: 1px solid var(--color-border);
}

.profile-stats li {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.profile-stats span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-pink);
    font-family: var(--font-heading);
    line-height: 1;
}

/* Listes d'activités dans le profil */
.card h3 {
    border-bottom: 2px solid var(--color-pink);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.card > div {
    /* Cible les items de listes (threads/comments) qui sont des divs directs dans .card */
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.card > div:last-child {
    border-bottom: none;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--color-cyan);
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
}

.comment-thread-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.comment {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-left: 3px solid var(--color-border);
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- Formulaires --- */
.reply-form h3 {
    margin-bottom: 1rem;
    color: var(--color-cyan);
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-body);
    margin-bottom: 1rem;
    box-sizing: border-box; /* Important pour ne pas dépasser */
    resize: vertical;
    min-height: 100px;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

/* Ajustements visuels mineurs */
strong {
    color: var(--color-text);
}