/* ==========================================================================
   #FORUM STYLES - Thème Death Note
   ========================================================================== */

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
    max-width: 350px;
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success {
    background-color: #00b894;
    border-left: 4px solid #00a884;
}

.notification.error {
    background-color: #d63031;
    border-left: 4px solid #c0392b;
}

.notification.warning {
    background-color: #f39c12;
    border-left: 4px solid #e67e22;
}

.notification.info {
    background-color: #0984e3;
    border-left: 4px solid #0984e3;
}

/* États de chargement */
.loading-state,
.error-state,
.no-topics {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.loading-state .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    margin: 0 auto 1.5rem;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p,
.error-state p,
.no-topics p {
    color: #b3b3b3;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.error-state i {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 1rem;
    display: block;
}

/* Boutons */
#retryLoading,
#createFirstTopic {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#retryLoading:hover,
#createFirstTopic:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

/* En-tête du sujet avec bouton de suppression */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

/* Bouton de suppression */
.btn-delete-topic {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-delete-topic:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #ff6b6b;
    opacity: 1;
}

.btn-delete-topic i {
    font-size: 0.9rem;
}

/* Avatar de l'auteur */
.topic-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.topic-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenu du sujet */
.topic-content {
    flex: 1;
    min-width: 0; /* Pour éviter les problèmes de flexbox avec les textes longs */
}

/* Styles des cartes de sujet */
.topic-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    color: #e0e0e0;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #4CAF50;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.topic-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-category {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #9e9e9e;
    margin-top: 0.5rem;
}

.topic-author {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.topic-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid #4CAF50;
}

.topic-stats {
    display: flex;
    gap: 1rem;
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.topic-stat i {
    color: #4CAF50;
    font-size: 0.9rem;
}

/* Styles du pied de page */
.main-footer {
    background-color: #0a0a0a;
    color: #fff;
    padding: 4rem 0 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-section p {
    color: #b3b3b3;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #b3b3b3;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-newsletter p {
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 168, 77, 0.2);
}

.newsletter-form button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 77, 0.3);
}

.footer-bottom {
    background: #050505;
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-newsletter {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        padding: 0.75rem 1rem;
    }
}

/* Variables du thème */
:root {
    --primary-color: #00a84d;
    --primary-dark: #008a3d;
    --primary-light: #00c45d;
    --secondary-color: #007bff;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --background-color: #121212;
    --header-bg: rgba(18, 18, 18, 0.95);
    --surface: #181818;
    --surface-light: #1e1e1e;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.2);
    --accent: #1ed760;
    --success: #00c853;
    --danger: #ff3d00;
    --warning: #ffab00;
    --info: #00b0ff;
    --gradient-primary: linear-gradient(135deg, #00a84d, #00c45d);
    --gradient-secondary: linear-gradient(135deg, rgba(0, 168, 77, 0.1), rgba(0, 168, 77, 0.05));
    --hover-color: rgba(0, 168, 77, 0.1);
    --active-color: rgba(0, 168, 77, 0.2);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-accent: 'Garamond', serif;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 70px; /* Hauteur du header fixe */
}

/* Styles spécifiques pour le header du forum */
.main-header {
    background-color: var(--header-bg) !important;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 168, 77, 0.3);
    height: 70px;
}

/* Assurer que le contenu principal ne soit pas caché derrière le header fixe */
.main-container {
    padding-top: 1rem;
}

/* Les styles pour .user-avatar et .action-button sont définis dans header-unified.css */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Structure de base du forum */
.forum-container {
    display: flex;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1.5rem;
    position: relative;
}

.forum-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 90px; /* Hauteur du header + marge */
    align-self: flex-start;
    height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.forum-sidebar::-webkit-scrollbar {
    width: 6px;
}

.forum-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.forum-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.forum-content {
    flex: 1;
    min-width: 0;
}

/* En-tête du forum
   ========================================================================== */
.forum-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-primary);
    padding: 5rem 1.5rem 3.5rem;
    text-align: center;
    margin: -1.5rem -1.5rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.forum-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="rgba(255,255,255,0.03)" d="M30 10L50 30L70 10L90 30L70 50L90 70L70 90L50 70L30 90L10 70L30 50L10 30L30 10Z"/></svg>');
    opacity: 0.2;
    background-size: 100px;
    pointer-events: none;
}

.forum-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.forum-header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Barre d'outils du forum
   ========================================================================== */
.forum-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    box-shadow: var(--box-shadow);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: var(--font-main);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 168, 77, 0.3);
    outline: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.sort-options select {
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 1em auto;
    padding-right: 2.5em;
}

.sort-options select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 168, 77, 0.2);
    outline: none;
}

.sort-options select:hover {
    border-color: var(--primary-light);
}

/* Liste des sujets
   ========================================================================== */
.topics-list {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.topic-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #2d2d2d;
    position: relative;
    display: flex;
    gap: 1rem;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

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

.topic-card:hover {
    background: var(--surface-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
    border-left-color: var(--primary-light);
}

.topic-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1.25rem 0.5rem 0;
    min-width: 60px;
    border-right: 1px solid var(--border);
}

.vote-count {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-family: var(--font-accent);
}

.vote-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.topic-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.topic-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    line-height: 1.4;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-card:hover .topic-title {
    color: var(--primary-light);
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.topic-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.topic-meta .author::before {
    content: '👤';
    font-size: 1em;
    opacity: 0.7;
}

.topic-meta .date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.topic-meta .date::before {
    content: '📅';
    font-size: 1em;
    opacity: 0.7;
}

.topic-excerpt {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

/* Badge de catégorie */
.topic-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.75rem;
}

/* Style pour les cartes de sujets vides */
.no-topics {
    text-align: center;
    padding: 2rem;
    background: var(--surface-light);
    border-radius: 8px;
    border: 1px dashed var(--border);
    color: var(--text-secondary);
}

.no-topics p {
    margin-bottom: 1.5rem;
}

/* Style pour le bouton de création de sujet */
#createFirstTopic {
    margin: 0 auto;
    display: inline-block;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    align-items: center;
}

.topic-category {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.topic-category.news { background: rgba(25, 118, 210, 0.1); color: #64b5f6; border-color: rgba(100, 181, 246, 0.3); }
.topic-category.manga { background: rgba(56, 142, 60, 0.1); color: #81c784; border-color: rgba(129, 199, 132, 0.3); }
.topic-category.anime { background: rgba(255, 171, 0, 0.1); color: #ffd54f; border-color: rgba(255, 213, 79, 0.3); }
.topic-category.debate { background: rgba(142, 36, 170, 0.1); color: #ce93d8; border-color: rgba(206, 147, 216, 0.3); }
.topic-category.help { background: rgba(57, 73, 171, 0.1); color: #9fa8da; border-color: rgba(159, 168, 218, 0.3); }

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
    padding: 0 1rem;
    border-left: 1px solid var(--border);
}

.topic-replies, .topic-views {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.topic-replies {
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-primary);
}

.topic-replies i, .topic-views i {
    color: var(--primary-color);
    font-size: 1rem;
}

.topic-activity {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    min-width: 140px;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.topic-time {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.topic-author {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* État "Aucun sujet"
   ========================================================================== */
.no-topics {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border);
    margin: 1.5rem 0;
}

.no-topics i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
    opacity: 0.7;
}

.no-topics p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.no-topics .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0 1.5rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-weight: 500;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 77, 0.2);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface);
}

.pagination button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.pagination button i {
    font-size: 0.8rem;
}

/* Barre latérale
   ========================================================================== */
.sidebar-widget {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.sidebar-widget:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-accent);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.4rem;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

.category-list a:hover, 
.category-list li.active a {
    background: var(--primary-color);
    color: white;
    padding-left: 1.25rem;
    border-color: var(--primary-color);
}

.category-list .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: var(--transition);
}

.category-list a:hover .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.rules-list {
    padding-left: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.rules-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.rules-list li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1.5em;
    position: absolute;
    left: 0;
    top: 0;
}

/* Boutons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
    gap: 0.5rem;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 77, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 168, 77, 0.05);
}

/* Modal Nouveau Sujet
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    animation: modalFadeIn 0.3s ease forwards;
}

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

.modal-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    line-height: 1;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: var(--font-main);
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 77, 0.2);
    outline: none;
    background: rgba(0, 0, 0, 0.3);
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Badges et indicateurs
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Réactivité
   ========================================================================== */
@media (max-width: 1200px) {
    .forum-container {
        gap: 1.5rem;
    }
    
    .forum-sidebar {
        flex: 0 0 260px;
    }
}

@media (max-width: 992px) {
    .forum-container {
        flex-direction: column;
    }
    
    .forum-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        position: static;
        margin-bottom: 2rem;
    }
    
    .topic-card {
        flex-wrap: wrap;
        padding: 1.25rem;
    }
    
    .topic-content {
        order: 1;
        width: 100%;
        margin-top: 1rem;
        padding: 0;
    }
    
    .topic-votes {
        border-right: none;
        padding-right: 0.5rem;
    }
    
    .topic-stats {
        border-left: none;
        padding-left: 0.5rem;
        margin-left: auto;
    }
    
    .topic-activity {
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        text-align: left;
        align-items: flex-start;
        padding-left: 0;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

@media (max-width: 768px) {
    .forum-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
        width: 100%;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .topic-card {
        padding: 1.25rem 1rem;
    }
    
    .topic-votes, 
    .topic-stats {
        min-width: auto;
    }
    
    .topic-stats {
        margin-left: auto;
    }
    
    .modal-body {
        padding: 1.25rem 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .forum-header {
        padding: 3.5rem 1rem 2.5rem;
        margin: -1rem -1rem 1.5rem;
    }
    
    .forum-header h1 {
        font-size: 2.2rem;
    }
    
    .forum-header p {
        font-size: 1.05rem;
    }
    
    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .topic-category {
        margin-top: 0.25rem;
    }
    
    .topic-activity {
        min-width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        text-align: left;
        align-items: flex-start;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination button {
        padding: 0.5rem 0.75rem;
        min-width: 36px;
    }
    
    .sidebar-widget {
        padding: 1.25rem 1rem;
    }
    
    .category-list a {
        padding: 0.6rem 0.9rem;
    }
}
