/* style.css - version finale nettoyée et unifiée */

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

html, body {
    height: 100%;
}

body {
    background: #2e241f;
    font-family: 'Segoe UI', 'Garamond', serif;
    color: #eee;
    display: flex;
    flex-direction: column;
}

.site-wrapper {
    width: 100%;
    background: #3a2a24;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.main-header {
    background: #1e1612;
    padding: 1rem;
    border-bottom: 2px solid #c9a87b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.logo-area {
    flex: 1;
    text-align: center;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.02s linear, box-shadow 0.02s linear;
}
.logo-link:active {
    transform: translateY(3px);
    box-shadow: 0 0 12px rgba(201,168,123,0.8);
}
.logo-link:focus {
    outline: none;
}

.logo-kanji-columns {
    display: inline-flex;
    gap: 0.8rem;
    background: #2e241f;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    margin-bottom: 0.3rem;
}

.kanji-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.kanji-char {
    font-family: 'Noto Serif JP', 'KaiTi', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 800;
    color: #e6cc99;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.logo-romaji {
    font-size: 0.85rem;
    font-style: italic;
    color: #c9a87b;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.user-area {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-area .welcome {
    font-size: 0.9rem;
    color: #e6cc99;
}

.btn-login {
    background: #4a3a32;
    color: #f0e6d0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-login:hover {
    background: #6b4e3a;
}

.avatar-dropdown {
    position: relative;
    cursor: pointer;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c9a87b;
    transition: 0.1s;
}
.avatar-img:active {
    transform: translateY(2px);
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #1e1612;
    border: 1px solid #c9a87b;
    border-radius: 8px;
    min-width: 200px;
    display: none;
    z-index: 100;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #f0e6d0;
    text-decoration: none;
    transition: background 0.2s;
}
.dropdown-menu a:hover {
    background: #4a3a32;
}
.dropdown-menu .badge {
    background: #b43b1c;
    color: white;
    border-radius: 20px;
    padding: 0.1rem 0.5rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}
.avatar-dropdown.open .dropdown-menu {
    display: block;
}

.search-toggle-area {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}
.search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: transform 0.1s;
}
.search-toggle-btn:active {
    transform: translateY(2px);
}
.search-toggle-btn svg {
    display: block;
}

.search-area {
    position: relative;
    margin-left: 0.5rem;
    display: none;
}
#search-input {
    background: #2e241f;
    border: 1px solid #c9a87b;
    border-radius: 20px;
    padding: 0.3rem 1rem;
    color: #f0e6d0;
    outline: none;
    width: 200px;
}
#search-input:focus {
    border-color: #b43b1c;
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e1612;
    border: 1px solid #c9a87b;
    border-radius: 8px;
    width: 100%;
    display: none;
    z-index: 99;
    max-height: 300px;
    overflow-y: auto;
}
.search-results a {
    display: block;
    padding: 0.5rem;
    color: #f0e6d0;
    text-decoration: none;
}
.search-results a:hover {
    background: #4a3a32;
}
.search-results.show {
    display: block;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 10;
}
.burger-menu span {
    height: 3px;
    background-color: #c9a87b;
    border-radius: 2px;
    transition: all 0.3s;
}

.main-nav {
    width: 100%;
    order: 3;
    margin-top: 1rem;
}
.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}
.main-nav a {
    color: #f0e6d0;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.main-nav a:hover {
    background: #4a3a32;
}

.main-content {
    padding: 2rem;
    background: #fef7e8;
    color: #3a2a1f;
    flex: 1;
}

.main-footer {
    background: #1e1612;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #c9a87b;
    font-size: 0.8rem;
    color: #b89a6a;
}

/* Liens généraux (sauf boutons) */
a:not(.btn-wax):not(.btn-login):not(.btn-avatar):not(.btn-send):not(.btn-small):not(.btn-friend):not(.btn-message) {
    color: #3a2a1f;
    text-decoration: none;
    font-weight: bold;
}
a:not(.btn-wax):not(.btn-login):not(.btn-avatar):not(.btn-send):not(.btn-small):not(.btn-friend):not(.btn-message):hover {
    text-decoration: underline;
}

/* Boutons standards */
.btn-wax {
    background: #b43b1c;
    color: #ffefcf;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 4px 0 #6a2a10;
    transition: 0.05s linear;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 0.5rem;
}
.btn-wax:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #6a2a10;
}

/* Pages d'authentification */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff4e4;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #d4b87a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #6b3e1a;
}
.auth-form .form-group {
    margin-bottom: 1rem;
}
.auth-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}
.auth-form input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #c2a15b;
    border-radius: 8px;
    background: #fffef7;
}

.success-message, .error-message {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}
.success-message {
    background: #c5e0b4;
    border-left: 6px solid #3c8c2c;
    color: #2c5a1c;
}
.error-message {
    background: #f5cfcf;
    border-left: 6px solid #b33;
    color: #a11;
}

/* Accueil et actualités */
.hero {
    text-align: center;
    padding: 2rem 0;
    background: #e9dfc7;
    border-radius: 20px;
    margin-bottom: 2rem;
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #5a3a1a;
}
.latest-news h2, .actus-container h1, .roadmap-container h1, .contact-container h1 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #d4a373;
    display: inline-block;
    padding-bottom: 0.3rem;
}
.articles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.news-card {
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 16px;
    padding: 1.2rem;
    flex: 1 1 300px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.news-card:hover {
    transform: translateY(-5px);
}
.news-card h3 {
    color: #6b3e1a;
    margin-bottom: 0.5rem;
}
.news-date {
    font-size: 0.8rem;
    color: #8b6942;
    margin-bottom: 0.8rem;
}
.news-content {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.read-more {
    color: #b43b1c;
    text-decoration: none;
    font-weight: bold;
}
.read-more:hover {
    text-decoration: underline;
}

/* Contact */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #c2a15b;
    border-radius: 8px;
    background: #fffef7;
    font-family: inherit;
}

/* Roadmap */
.roadmap-list {
    list-style: none;
    padding: 0;
}
.roadmap-list li {
    background: #fffaf0;
    margin-bottom: 0.8rem;
    padding: 1rem;
    border-left: 6px solid #b43b1c;
    border-radius: 8px;
}
.roadmap-list strong {
    color: #6b3e1a;
}

/* Dashboard */
.dashboard-container {
    display: flex;
    gap: 2rem;
}
.dashboard-sidebar {
    width: 250px;
    background: #fff4e4;
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid #d4b87a;
}
.dashboard-sidebar ul {
    list-style: none;
}
.dashboard-sidebar li {
    margin-bottom: 0.5rem;
}
.dashboard-sidebar a {
    display: block;
    padding: 0.5rem;
    color: #6b3e1a;
    text-decoration: none;
    border-radius: 8px;
}
.dashboard-sidebar a:hover, .dashboard-sidebar a.active {
    background: #e9dfc7;
}
.dashboard-content {
    flex: 1;
    background: #fffaf0;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e1c694;
}

/* Profil */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.avatar-center {
    text-align: center;
    margin-bottom: 1rem;
}
.avatar-center img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #c9a87b;
    object-fit: cover;
    margin-bottom: 0.5rem;
}
.avatar-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.btn-avatar {
    background: #4a3a32;
    color: #f0e6d0;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.btn-avatar:hover {
    background: #6b4e3a;
}

/* Paramètres */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1c694;
}
.settings-section:last-child {
    border-bottom: none;
}
.settings-section h3 {
    margin-bottom: 1rem;
    color: #6b3e1a;
    font-size: 1.2rem;
}
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.settings-form label {
    font-weight: bold;
    color: #6b3e1a;
}
.settings-form input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #c2a15b;
    border-radius: 8px;
    background: #fffef7;
}
.settings-form button {
    width: 100%;
    background: #b43b1c;
    color: #ffefcf;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 2px 0 #6a2a10;
    transition: 0.05s linear;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.5rem;
}
.settings-form button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #6a2a10;
}

/* Amis */
.friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}
.friend-card {
    text-align: center;
    width: 80px;
}
.friend-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #c9a87b;
}
.friend-card span {
    display: block;
    font-size: 0.8rem;
}
.badge-god {
    background: gold;
    color: #3a2a1f;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Messagerie (dashboard) */
.messaging-container {
    display: flex;
    gap: 2rem;
    min-height: 500px;
}
.conversations-list {
    width: 300px;
    background: #fff4e4;
    border-radius: 16px;
    border: 1px solid #d4b87a;
    padding: 1rem;
}
.conversations-list h3 {
    margin-bottom: 1rem;
    color: #6b3e1a;
    font-size: 1rem;
    border-bottom: 1px solid #e1c694;
    padding-bottom: 0.3rem;
}
.conversation-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #fffaf0;
    border-radius: 8px;
    text-decoration: none;
    color: #3a2a1f;
    transition: background 0.2s;
    cursor: pointer;
}
.conversation-item:hover, .conversation-item.active {
    background: #e9dfc7;
}
.conversation-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.conversation-item span {
    flex: 1;
}
.online-dot {
    width: 10px;
    height: 10px;
    background-color: #4caf50;
    border-radius: 50%;
    display: inline-block;
    margin-left: 0.5rem;
}
.chat-area {
    flex: 1;
    background: #fffaf0;
    border-radius: 16px;
    border: 1px solid #e1c694;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}
.chat-area h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e1c694;
}
.messages {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    margin-bottom: 1rem;
    padding: 0.5rem;
}
.message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.message.sent {
    align-items: flex-end;
}
.message.received {
    align-items: flex-start;
}
.message-text {
    background: #e9dfc7;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    color: #3a2a1f;
}
.message.sent .message-text {
    background: #b43b1c;
    color: white;
}
.message-time {
    font-size: 0.7rem;
    color: #8b6942;
    margin-top: 0.2rem;
}
.send-message {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}
.send-message textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #c2a15b;
    border-radius: 8px;
    background: #fffef7;
    font-family: inherit;
    resize: vertical;
}
.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #b43b1c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.1s;
    box-shadow: 0 2px 0 #6a2a10;
}
.btn-send:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #6a2a10;
}
.btn-send:hover {
    background: #9a2a10;
}

/* Notifications */
.notifications-list {
    background: #fffaf0;
    border-radius: 16px;
    padding: 1rem;
}
.notification-item {
    border-bottom: 1px solid #e1c694;
    padding: 0.8rem 0;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item p {
    margin-bottom: 0.3rem;
}
.notification-item small {
    color: #8b6942;
    font-size: 0.7rem;
}
.btn-small {
    background: #4a3a32;
    color: #f0e6d0;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: background 0.2s;
    display: inline-block;
}
.btn-small:hover {
    background: #6b4e3a;
}

/* Toast messages */
.message-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: #1e1612;
    border: 1px solid #c9a87b;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.message-toast .toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #4a3a32;
    padding-bottom: 5px;
    margin-bottom: 5px;
}
.message-toast .toast-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.message-toast .toast-header strong {
    flex: 1;
    color: #e6cc99;
}
.message-toast .toast-time {
    font-size: 0.7rem;
    color: #b89a6a;
}
.message-toast .toast-body {
    font-size: 0.9rem;
    color: #f0e6d0;
    word-break: break-word;
}

/* Fenêtres de chat flottantes */
.chat-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: #2a1f1a;
    border: 1px solid #c9a87b;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.chat-floating .chat-header {
    background: #1e1612;
    padding: 8px 12px;
    border-bottom: 1px solid #c9a87b;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px 12px 0 0;
}
.chat-floating .chat-header .chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-floating .chat-header .chat-name {
    flex: 1;
    font-weight: bold;
    color: #e6cc99;
}
.chat-floating .chat-header .chat-close {
    font-size: 1.2rem;
    cursor: pointer;
    color: #c9a87b;
}
.chat-floating .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #fef7e8;
}
.chat-message {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}
.chat-message.sent {
    align-items: flex-end;
}
.chat-message.received {
    align-items: flex-start;
}
.chat-message-text {
    background: #e9dfc7;
    padding: 5px 10px;
    border-radius: 16px;
    max-width: 80%;
    word-break: break-word;
    color: #3a2a1f;
}
.chat-message.sent .chat-message-text {
    background: #b43b1c;
    color: white;
}
.chat-message-time {
    font-size: 0.6rem;
    color: #8b6942;
    margin-top: 2px;
}
.chat-floating .chat-input {
    display: flex;
    gap: 5px;
    padding: 8px;
    border-top: 1px solid #c9a87b;
    background: #1e1612;
}
.chat-floating .chat-input textarea {
    flex: 1;
    padding: 5px;
    border: 1px solid #c2a15b;
    border-radius: 8px;
    background: #fffef7;
    resize: none;
    height: 50px;
    font-family: inherit;
}
.chat-floating .chat-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #b43b1c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.1s;
    box-shadow: 0 2px 0 #6a2a10;
}
.chat-floating .chat-input button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #6a2a10;
}

/* Page publique user.php */
.user-public {
    max-width: 800px;
    margin: 0 auto;
    background: #fffaf0;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid #e1c694;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.user-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1c694;
}
.user-header .user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #c9a87b;
    object-fit: cover;
    margin-bottom: 1rem;
}
.user-header h1 {
    font-size: 1.8rem;
    color: #6b3e1a;
    margin: 0.5rem 0;
}
.btn-friend, .btn-message {
    display: inline-block;
    margin-top: 1rem;
    background: #b43b1c;
    color: #ffefcf;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 2px 0 #6a2a10;
    transition: 0.05s linear;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    margin-right: 0.5rem;
}
.btn-friend:active, .btn-message:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #6a2a10;
}
.btn-friend.disabled, .btn-friend.pending {
    background: #4a3a32;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-message {
    background: #4a3a32;
    box-shadow: 0 2px 0 #2a1f1a;
}
.user-posts {
    margin-top: 2rem;
}
.user-posts h2 {
    font-size: 1.4rem;
    color: #6b3e1a;
    margin-bottom: 1rem;
    border-left: 4px solid #b43b1c;
    padding-left: 0.8rem;
}

/* FORUM - Styles entièrement refondus */
.forum-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Catégories en grille */
.forum-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 16px;
    padding: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.category-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.category-card h2 a {
    color: #6b3e1a;
    text-decoration: none;
}
.category-card h2 a:hover {
    text-decoration: underline;
}
.category-card p {
    margin: 0.5rem 0;
    color: #5a3e2a;
}
.category-card small {
    color: #8b6942;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.5rem;
}

/* Tableau des sujets */
.forum-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
}
.forum-table th,
.forum-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e1c694;
    text-align: left;
}
.forum-table th {
    background: #e9dfc7;
    color: #6b3e1a;
    font-weight: bold;
}
.forum-table tr:last-child td {
    border-bottom: none;
}
.forum-table a {
    color: #3a2a1f;
    font-weight: bold;
    text-decoration: none;
}
.forum-table a:hover {
    text-decoration: underline;
}
.forum-table .badge {
    background: #b43b1c;
    color: white;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    display: inline-block;
}

/* Post individuel */
.post {
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 16px;
    margin-bottom: 1.2rem;
    padding: 1.2rem;
    transition: box-shadow 0.2s;
}
.post:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e1c694;
}
.post-author img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c9a87b;
}
.post-author strong {
    font-size: 1rem;
    color: #6b3e1a;
}
.post-author small {
    color: #8b6942;
    font-size: 0.8rem;
}
.post-content {
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0.2rem 0;
}
.post-reactions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e1c694;
}
.reaction-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    transition: background 0.2s;
    color: #6b3e1a;
}
.reaction-btn:hover {
    background: #e9dfc7;
}

/* Formulaire de réponse */
.reply-form {
    margin-top: 2rem;
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 16px;
    padding: 1.2rem;
}
.reply-form h3 {
    margin-bottom: 1rem;
    color: #6b3e1a;
}
.reply-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #c2a15b;
    border-radius: 12px;
    background: #fffef7;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}
.reply-form textarea:focus {
    outline: none;
    border-color: #b43b1c;
}

/* Lien de retour */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #6b3e1a;
    text-decoration: none;
    font-weight: bold;
    padding: 0.2rem 0;
}
.back-link:hover {
    text-decoration: underline;
}

/* Posts populaires (accueil forum) */
.popular-posts {
    margin-top: 2rem;
    background: #fffaf0;
    border: 1px solid #e1c694;
    border-radius: 16px;
    padding: 1.2rem;
}
.popular-posts h2 {
    color: #6b3e1a;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e1c694;
    padding-bottom: 0.3rem;
}
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.popular-post-item {
    background: #fffef7;
    border: 1px solid #e1c694;
    border-radius: 12px;
    padding: 0.8rem;
    transition: transform 0.1s;
}
.popular-post-item:hover {
    transform: translateX(5px);
}
.popular-post-item .post-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}
.popular-post-item .small-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #c9a87b;
}
.popular-post-item .post-date {
    font-size: 0.7rem;
    color: #8b6942;
}
.popular-post-item .likes-badge {
    background: #b43b1c;
    color: white;
    border-radius: 20px;
    padding: 0.1rem 0.6rem;
    font-size: 0.7rem;
    margin-left: auto;
}
.popular-post-item .post-excerpt a {
    color: #3a2a1f;
    text-decoration: none;
}
.popular-post-item .post-excerpt a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem;
    }
    .logo-area {
        flex: 1;
        text-align: center;
    }
    .logo-kanji-columns {
        gap: 0.4rem;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .kanji-char {
        font-size: 1rem;
        line-height: 1.1;
    }
    .logo-romaji {
        font-size: 0.65rem;
        margin-top: 0;
    }
    .burger-menu {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    .user-area {
        margin-left: 0;
        gap: 0.5rem;
    }
    .btn-login {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
    }
    .welcome {
        font-size: 0.8rem;
    }
    .main-nav {
        display: none;
        order: 4;
        width: 100%;
        margin-top: 1rem;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .main-nav a {
        display: block;
        text-align: center;
        padding: 0.8rem;
        border-radius: 8px;
    }
    .main-content {
        padding: 1rem;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .articles-list {
        flex-direction: column;
    }
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
    }
    .messaging-container {
        flex-direction: column;
    }
    .conversations-list {
        width: 100%;
    }
    .search-area {
        margin-right: 0;
        order: 2;
        width: 100%;
        margin-top: 0.5rem;
    }
    #search-input {
        width: 100%;
    }
    .avatar-img {
        width: 35px;
        height: 35px;
    }
    .dropdown-menu {
        top: 40px;
    }
    .user-public {
        margin: 1rem;
        padding: 1rem;
    }
    .user-header .user-avatar {
        width: 100px;
        height: 100px;
    }
    .forum-categories {
        grid-template-columns: 1fr;
    }
    /* Tableau responsive */
    .forum-table,
    .forum-table tbody,
    .forum-table tr,
    .forum-table td {
        display: block;
        width: 100%;
    }
    .forum-table thead {
        display: none;
    }
    .forum-table tr {
        border-bottom: 1px solid #e1c694;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }
    .forum-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3rem 0;
        border: none;
    }
    .forum-table td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        color: #6b3e1a;
    }
}

/* Effets divers */
.logo-flash {
    filter: brightness(1.3);
    transition: filter 0.08s ease-out;
}

*:focus {
    outline: none !important;
}

/* --- FORCAGE DES COULEURS CLAIRES POUR TOUS LES MENUS --- */

/* Liens du menu principal (Accueil, etc.) */
.main-nav a {
    color: #f0e6d0 !important;
}
.main-nav a:hover {
    background: #4a3a32 !important;
    color: #f0e6d0 !important;
}

/* Liens du menu déroulant de l'avatar */
.avatar-dropdown .dropdown-menu a {
    color: #f0e6d0 !important;
}
.avatar-dropdown .dropdown-menu a:hover {
    background: #4a3a32 !important;
    color: #f0e6d0 !important;
}

/* Badges dans le menu déroulant */
.dropdown-menu .badge {
    background: #b43b1c !important;
    color: white !important;
}

/* Couleur des barres du burger menu */
.burger-menu span {
    background-color: #c9a87b !important;
}