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

:root {
  --font-main: "Inter", sans-serif;
  --color-bg: #0f1713;
  --color-surface: #1c2e25;
  --color-text: #ecfdf5;
  --color-text-muted: #86efac;
  --color-accent: #22c55e;
  --color-border: #294235;
  --radius: 8px;
}

/* --- Styles Généraux --- */
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  font-size: 16px;
}
a {
  text-decoration: none;
  color: var(--color-accent);
  font-weight: 700;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
h4 {
  font-weight: 800;
  margin: 0;
}

/* --- Mise en Page Principale --- */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
}
.main-content {
  padding: 2rem;
  min-height: 100vh;
  box-sizing: border-box;
}
.main-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-left: 1px solid var(--color-border);
  padding: 2rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* --- Contenu Principal (gauche) --- */
.content-header {
  margin-bottom: 2rem;
}
.breadcrumb {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.hero-banner {
  border-radius: var(--radius);
  overflow: hidden;
  height: 250px;
  margin-bottom: 2rem;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grille en Mosaïque (Homepage) */
.masonry-grid {
  column-count: 2;
  column-gap: 1.5rem;
}
.topic-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--color-text);
}
.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.topic-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.topic-card .topic-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.topic-card .topic-excerpt {
  margin-top: 1rem;
  font-size: 1rem;
}

/* --- Sidebar (droite) --- */
.sidebar-logo {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--color-text);
}
.sidebar-logo img {
  height: 32px;
  vertical-align: -4px;
  margin-right: 8px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-nav a {
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.sidebar-footer a {
  font-weight: 400;
  color: var(--color-text-muted);
}

/* --- Pages Classiques (catégories, sujet, etc.) --- */
.content-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.card-header h2 {
  font-size: 1.5rem;
}
.card-body {
  padding: 1.5rem;
}
.item-list > .item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.item-list > .item:last-child {
  border-bottom: none;
}
.item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.item-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--color-bg);
}
.item-info {
  flex-grow: 1;
}
.item-info h3 {
  font-size: 1.1rem;
}
.item-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.item-stats {
  text-align: right;
  color: var(--color-text-muted);
}

/* --- Page Sujet --- */
.post-author {
  width: 150px;
  text-align: center;
  flex-shrink: 0;
}
.post-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.post-author-name {
  font-weight: 700;
  margin-top: 0.5rem;
}
.post-body {
  flex-grow: 1;
}
.post-body p {
  margin: 0 0 1em 0;
}

/* --- NOUVEAU : Style pour les liens dans les messages --- */
.post-body a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  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 {
  background-size: 100% 2px;
}

/* --- Page Profil --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.profile-info h1 {
  font-size: 2rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.page-link {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.page-link.active {
  background-color: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

/* --- Formulaires --- */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.form-input {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
}
.form-container .button {
  width: 100%;
  padding: 12px;
  margin-top: 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: white;
  cursor: pointer;
}

.post-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.like-button:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  text-decoration: none;
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.profile-header-card .profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}
.profile-header-card h1 {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}
.profile-header-card .profile-fullname {
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--color-text-muted);
}
.profile-main-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}


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