:root {
    --font-main: 'Montserrat', sans-serif;
    --color-bg: #F0F4F8;
    --color-text: #102A43;
    --color-border: #D9E2EC;
    --color-muted: #627D98;
    --color-accent-1: #0EA5E9;
    --color-accent-2: #F97316;
    --color-surface: #FFFFFF;
    --color-text-inverted: #FFFFFF;
    --color-text-muted-dark: #486581;
    --color-text-muted-light: #9FB3C8;
    --color-accent-2-hover: #F06A0B;
    --overlay-dark-gradient: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* --- STRUCTURE & LAYOUT --- */
.container {
    width: 100%;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -2px;
}
.logo-image {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-accent-yellow);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
}
.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}
.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

/* --- HERO SECTION (BANNER) --- */
.hero {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}
.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark-gradient);
    z-index: 1;
}
.hero__content {
    position: relative;
    z-index: 2;
    color: var(--color-text-inverted);
    max-width: 700px;
    padding: 0 1rem;
}
.hero__title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 0.8rem;
}
.hero__subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
}


/* --- CONTENU HOME --- */
.category-block {
    margin-bottom: 4rem;
}
.category-header {
    margin-bottom: 1.5rem;
}
.category-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
}
.category-divider {
    border: 0;
    height: 4px;
    width: 50px;
    background-color: var(--color-accent-blue);
    margin: 0.5rem 0 0 0;
}

.thread-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.thread-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 2px solid var(--color-text);
    position: relative;
    transition: transform 0.3s ease;
}
.thread-item:hover {
    transform: translate(-5px, -5px);
}
.thread-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent-yellow);
    z-index: -1;
    transition: all 0.3s ease;
}
.thread-item:hover::before {
    top: 0;
    left: 0;
}

.thread-item__type {
    font-weight: 700;
    color: var(--type-color, var(--color-text));
    margin-bottom: 1rem;
}
.thread-item__title {
    font-size: 1.2rem;
    font-weight: 700;
    flex-grow: 1;
    margin-bottom: 1rem;
}
.thread-item__author {
    font-size: 0.9rem;
    font-weight: 500;
}
.thread-item__replies {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    font-weight: 900;
    background-color: var(--color-accent-yellow);
    color: var(--color-text);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 2px solid var(--color-text);
}

/* --- PAGE CATEGORIES --- */
.category-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}
.category-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border: 2px solid var(--color-text);
    transition: all 0.3s ease;
}
.category-card:hover {
    border-color: var(--color-accent-blue);
    transform: scale(1.02);
}
.category-card__icon {
    width: 24px;
    height: 6px;
    background-color: var(--icon-bg);
    margin-bottom: 1.5rem;
}
.category-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}
.category-card__description {
    font-size: 1rem;
    color: var(--color-muted);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.category-card__stats {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    gap: 1.5rem;
    color: var(--color-muted);
}
.category-card__stats span {
    color: var(--color-text);
}

/* --- PAGE CATEGORY (LISTE) --- */
.thread-list-full {
    border: 2px solid var(--color-border);
}
.thread-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 0.8rem 1.5rem;
    background-color: var(--color-surface);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-muted);
    border-bottom: 2px solid var(--color-border);
}
.header-stats, .header-activite {
    text-align: right;
}
.thread-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1.5rem;
    align-items: center;
    border-bottom: 2px solid var(--color-border);
    transition: background-color 0.3s ease;
}
.thread-list-item:last-child {
    border-bottom: none;
}
.thread-list-item:hover {
    background-color: var(--color-surface);
}
.thread-title {
    font-size: 1.2rem;
    font-weight: 700;
}
.thread-stats, .thread-activity {
    text-align: right;
    font-size: 0.9rem;
    color: var(--color-muted);
}
.thread-stats span {
    margin-left: 1rem;
}
.thread-stats strong {
    color: var(--color-text);
    font-weight: 900;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pagination-link, .pagination-ellipsis {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    font-weight: 700;
    transition: all 0.3s ease;
}
.pagination-link:hover {
    border-color: var(--color-text);
    background-color: var(--color-surface);
}
.pagination-link.current {
    background-color: var(--color-text);
    color: var(--color-text-inverted);
    border-color: var(--color-text);
}


/* --- PAGE THREAD (POSTS) --- */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.post-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    background-color: var(--color-surface);
    border: 2px solid var(--color-border);
}
.post-item--op {
    border-color: var(--color-accent-blue);
}
.post-author-info {
    padding: 1.5rem;
    text-align: center;
    border-right: 2px solid var(--color-border);
    background-color: var(--color-bg);
}
.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}
.author-name {
    font-weight: 700;
}
.author-role {
    font-size: 0.8rem;
    color: var(--color-muted);
}
.post-item--op .author-role {
    color: var(--color-accent-blue);
    font-weight: 700;
}
.post-content {
    padding: 1.5rem;
    line-height: 1.8;
}
.post-content p {
    margin-bottom: 1em;
}

/* --- PAGE USER (PROFIL) --- */
.profile-header {
    background: var(--color-surface);
    border: 2px solid var(--color-text);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--color-text);
}
.profile-name {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1;
}
.profile-meta {
    font-weight: 500;
    color: var(--color-muted);
}
.profile-stats {
    margin-left: auto;
    display: flex;
    gap: 2rem;
    text-align: right;
}
.stat-value {
    font-size: 2rem;
    font-weight: 900;
    display: block;
    color: var(--color-accent-blue);
}
.stat-label {
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- PAGES LOGIN & REGISTER --- */
.form-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.form-container {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border: 2px solid var(--color-text);
    background-color: var(--color-surface);
}
.form-container .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
}
.form-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--color-border);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    background-color: var(--color-surface);
}
.form-button {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-text);
    background-color: var(--color-accent-yellow);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.form-button:hover {
    background-color: var(--color-text);
    color: var(--color-text-inverted);
}
.form-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-weight: 500;
}
.form-switch a {
    color: var(--color-accent-blue);
    font-weight: 700;
    text-decoration: underline;
}

/* --- FOOTER --- */
.site-footer {
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
    border-top: 2px solid var(--color-border);
    background-color: var(--color-surface);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-column--about .logo {
    margin-bottom: 1rem;
}
.footer-about-text {
    font-size: 0.9rem;
    color: var(--color-text-muted-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}
.footer-socials {
    display: flex;
    gap: 1rem;
}
.footer-socials a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-muted);
    transition: all 0.3s ease;
}
.footer-socials a:hover {
    background-color: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
    color: var(--color-text-inverted);
    transform: scale(1.1);
}
.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li {
    margin-bottom: 0.8rem;
}
.footer-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted-dark);
    position: relative;
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-blue);
    transition: width 0.3s ease;
}
.footer-links a:hover {
    color: var(--color-text);
}
.footer-links a:hover::after {
    width: 50%;
}
.footer-column--subscribe p {
    font-size: 0.9rem;
    color: var(--color-text-muted-dark);
    margin-bottom: 1rem;
}
.subscribe-form {
    display: flex;
    height: 44px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}
.subscribe-form input {
    flex-grow: 1;
    border: none;
    padding: 0 1rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    background-color: var(--color-bg);
}
.subscribe-form input:focus {
    outline: none;
    background-color: var(--color-surface);
}
.subscribe-form button {
    border: none;
    background-color: var(--color-accent-yellow);
    color: var(--color-text);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.subscribe-form button:hover {
    background-color: var(--color-accent-yellow-hover);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted-light);
}

.breadcrumb-container {
    padding-bottom: 2rem;
}

.breadcrumb-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb-nav li {
    display: flex;
    align-items: center;
}

.breadcrumb-nav li:not(:last-child)::after {
    content: '›'; /* Utilise un chevron plus élégant */
    margin: 0 0.75rem;
    color: var(--color-muted);
}

.breadcrumb-nav a {
    color: var(--color-muted);
    font-weight: 500;
}

.breadcrumb-nav a:hover {
    color: var(--color-accent-blue);
}

.breadcrumb-nav span {
    color: var(--color-text);
    font-weight: 700;
}

/* .forum-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 3fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.forum-item:first-of-type {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.forum-item:last-of-type {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-bottom: 0;
}
.forum-item:only-of-type {
    border-radius: 8px;
} */

.forum-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: block;
}

/* .forum-subject {
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
}
.forum-subject:hover {
    text-decoration: underline;
}

.forum-author,
.forum-messages,
.forum-last-message {
    font-size: 0.9rem;
}

.forum-author a {
    font-weight: 600;
    text-decoration: none;
}
.forum-author a:hover {
    text-decoration: underline;
}

.forum-messages {
    text-align: center;
}

.forum-last-message {
    text-align: right;
    white-space: nowrap;
} */
