@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&display=swap");

:root {
    --font-primary: 'Manrope', sans-serif;
    --color-background: #FFFBF2;
    --color-surface: #FFFFFF;
    --color-text-primary: #3A3225;
    --color-text-secondary: #857865;
    --color-accent: #F59E0B;
    --color-border: #FBEFDB;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  margin: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}
a:hover {
  opacity: 0.7;
}

.zenith-layout {
  display: grid;
  grid-template-columns: 1fr minmax(auto, 850px) 1fr;
  gap: 24px;
  padding: 0 32px;
}

.main-feed {
  grid-column: 2 / 3;
}
.left-wing,
.right-wing {
  padding-top: 140px;
}

/* --- Header & Footer --- */
.main-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 32px;
}
.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 800; 
    font-size: 1.5rem; 
    color: var(--color-text-primary);
    /* Le logo prend la place à gauche */
    flex: 1; 
}
.logo-image { 
    height: 32px; 
    width: auto; 
}
.main-nav { 
    display: flex; 
    gap: 24px;
    /* La navigation est maintenant au centre */
    justify-content: center;
    flex: 2; /* Prend plus de place au centre */
}
.user-actions { 
    display: flex; 
    gap: 12px;
    /* Les actions sont alignées à droite */
    justify-content: flex-end;
    flex: 1;
}
.button {
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.button-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}
.button-primary:hover {
  opacity: 0.8;
}
.main-footer {
    margin-top: 40px;
    padding: 40px 32px;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}
.footer-column {
    display: flex;
    flex-direction: column;
}
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-column a {
    color: var(--color-text-secondary);
    font-weight: 400;
    padding: 4px 0;
}
.footer-column a:hover {
    color: var(--color-accent);
}
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* --- Composants du Main Feed --- */
.breadcrumb {
  padding: 24px 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.breadcrumb .separator {
  margin: 0 8px;
}
.hero-banner {
  border-radius: 12px;
  overflow: hidden;
  height: 150px;
  margin-bottom: 32px;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-block {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.category-block:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}
.category-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}
.category-block-header h2 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 800;
}
.thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.thread-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}
.thread-item:last-child {
  border-bottom: none;
}
.author-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.thread-title {
  font-weight: 600;
  color: var(--color-text-primary);
}
.thread-meta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* --- Widgets de la Sidebar --- */
.widget {
  padding: 16px;
}
.widget-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.widget-list li {
  margin-bottom: 12px;
}

/* --- PAGE DE SUJET (THREAD) --- */

.thread-header-block {
    padding: 24px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 24px;
}
.thread-header-block h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.post {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 24px;
}
.post-author-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
}
.author-name {
    font-weight: 700;
    font-size: 1.1rem;
}
.author-rank {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.post-meta-bar {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}
.post-body p {
    margin: 0 0 1em 0;
}

/* --- WIDGETS DE LA SIDEBAR DU THREAD --- */
.op-widget-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.op-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
}
.op-name { font-weight: 700; }
.op-meta { font-size: 0.8rem; color: var(--color-text-secondary); }

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
}
.pagination-link {
    font-weight: 700;
    color: var(--color-text-secondary);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 14px;
}
.pagination-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.pagination-link.active {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    pointer-events: none;
}

/* --- FORMULAIRE DE RÉPONSE --- */
.reply-form {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
}
.reply-form h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}
.reply-form textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-primary);
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 16px;
}

/* --- PAGE TOUTES LES CATÉGORIES --- */

.category-table-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}
.table-header, .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 24px;
    align-items: center;
    padding: 16px 24px;
}
.table-header {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.table-row {
    border-top: 1px solid var(--color-border);
}
.category-title {
    font-size: 1.2rem;
    font-weight: 700;
}
.category-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.stats-col {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}
.last-post-col {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}
.last-post-col a {
    color: var(--color-text-primary);
    display: block;
}

/* --- PAGE CATÉGORIE UNIQUE --- */

.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.page-header-actions h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
}
.thread-list-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}
.thread-list-full {
    list-style: none;
    padding: 0;
    margin: 0;
}
.thread-item-full {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}
.thread-item-full:last-child {
    border-bottom: none;
}
.widget-text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* --- PAGE PROFIL UTILISATEUR --- */

.profile-header {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-header-main {
    display: flex;
    align-items: center;
    gap: 24px;
}
.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}
.profile-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}
.profile-since {
    font-size: 1rem;
    color: var(--color-text-secondary);
}
.profile-header-actions {
    display: flex;
    gap: 12px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}
.profile-feed-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}
.info-list li:last-child {
    border-bottom: none;
}
.info-list li strong {
    font-weight: 700;
    color: var(--color-text-primary);
}
.activity-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}
.activity-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.activity-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}
.activity-snippet {
    margin: 0;
    color: var(--color-text-secondary);
    border-left: 3px solid var(--color-border);
    padding-left: 16px;
    font-style: italic;
}

/* --- PAGES LOGIN & REGISTER --- */

.form-wrapper {
    padding: 40px 0;
}

.form-container {
    max-width: 450px;
    margin: 0 auto;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px 40px;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 32px 0;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-container .button-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
}

.form-switch-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.post-body a,
.post-content a,
.activity-snippet a,
.comment a {
    color: var(--color-accent); 
    
    text-decoration: none; 
    font-weight: 600;
    
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease;
}

.post-body a:hover,
.post-content a:hover,
.activity-snippet a:hover,
.comment a:hover {
    background-size: 100% 2px;
}

/* .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;
} */
