:root {
  /* -- Couleurs -- */
  --color-background: #2c1a1d;
  --color-surface: #442a2e;
  --color-text: #f1e0e2;
  --color-text-subtle: #a88a8e;
  --color-gold: #b87333;
  --color-gold-dark: #965a28;
  --color-border: #5c3a3e;

  /* -- Couleur pour le JS (en format R, G, B) -- */
  --js-star-color-rgb: 184, 115, 51;

  /* -- Typographie (statique) -- */
  --font-headings: 'Cinzel Decorative', serif;
  --font-body: 'Montserrat', sans-serif;
}

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

body {
  background-color: var(--color-background);
  background-image: linear-gradient(var(--color-surface) 1px, transparent 1px),
    linear-gradient(
      to right,
      var(--color-surface) 1px,
      var(--color-background) 1px
    );
  background-size: 20px 20px;
  background-position: -1px -1px;
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.6;
}

#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.page-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px;
}

a {
  color: var(--color-gold);
  text-decoration: none;
}
h2 a,
h3 a {
  color: inherit;
}

/* --- Effet de Scintillement --- */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--color-gold-dark),
    var(--color-gold),
    #fff,
    var(--color-gold),
    var(--color-gold-dark)
  );
  background-size: 250% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* --- Header & Footer --- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  margin-bottom: 48px;
  border-top: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
}
.logo-link {
  font-family: var(--font-headings);
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  height: 40px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-weight: 500;
  color: var(--color-text-subtle);
  position: relative;
  padding: 8px 0;
}
.nav-link::before,
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}
.nav-link::before {
  top: 0;
  left: 0;
}
.nav-link::after {
  bottom: 0;
  right: 0;
}
.nav-link:hover::before,
.nav-link:hover::after,
.nav-link.active::before,
.nav-link.active::after {
  width: 100%;
}
.nav-button {
  background-color: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 8px 16px;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.nav-button:hover {
  background-color: var(--color-gold);
  color: var(--color-background);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  margin-top: 48px;
  color: var(--color-text-subtle);
  font-size: 0.9rem;
}
.footer-decoration {
  width: 50px;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--color-gold),
    var(--color-gold-dark)
  );
}
.footer-nav {
  display: flex;
  gap: 24px;
}

/* --- Structure de page --- */
.page-title {
  font-family: var(--font-headings);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 48px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.page-header .page-title {
  margin-bottom: 0;
}
.hero-banner {
  margin-bottom: 64px;
}
.banner-frame {
  border: 1px solid var(--color-gold);
  padding: 8px;
  background-color: var(--color-surface);
}
.banner-image {
  width: 100%;
  display: block;
}

.category-section {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 32px;
  margin-bottom: 48px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 24px;
}
.section-header h2 {
  font-family: var(--font-headings);
  font-size: 1.75rem;
  margin: 0;
  flex-shrink: 0;
}
.header-decoration {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-gold),
    transparent
  );
}
.category-list-full {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.category-item-full {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.3s ease;
}
.category-item-full:hover {
  border-color: var(--color-gold);
}
.category-item-full h2 {
  font-family: var(--font-headings);
  font-size: 1.5rem;
}
.category-item-full p {
  color: var(--color-text-subtle);
}
.category-item-full .category-stats {
  text-align: right;
  font-weight: 500;
}

/* --- Listes de sujets --- */
.thread-list {
  display: flex;
  flex-direction: column;
}
.thread-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}
.thread-item:last-child {
  border-bottom: none;
}
.thread-title a {
  color: var(--color-text);
}
.thread-item:hover .thread-title a {
  color: var(--color-gold);
}
.thread-title {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.thread-meta {
  font-size: 0.9rem;
  color: var(--color-text-subtle);
}
.thread-meta a {
  color: var(--color-text-subtle);
  font-weight: 500;
  position: relative;
  z-index: 2;
}
.thread-meta a:hover {
  color: var(--color-gold);
}
.thread-link-cover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
.thread-stats {
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-gold);
  flex-shrink: 0;
  margin-left: 24px;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.page-item {
  border: 1px solid var(--color-border);
  padding: 8px 14px;
}
.page-item.active {
  background-color: var(--color-gold);
  color: var(--color-background);
  border-color: var(--color-gold);
}

/* --- Page de Sujet --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background-color: var(--color-border);
  border: 1px solid var(--color-border);
}
.post-item {
  display: flex;
  gap: 24px;
  padding: 24px;
  background-color: var(--color-surface);
}
.post-author {
  flex: 0 0 150px;
  text-align: center;
}
.post-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  margin-bottom: 16px;
}
.post-author-name {
  font-family: var(--font-headings);
  font-weight: 700;
  display: block;
}
.post-author-rank {
  color: var(--color-text-subtle);
  font-size: 0.9rem;
}
.post-body {
  flex-grow: 1;
}
.post-meta {
  font-size: 0.9rem;
  color: var(--color-text-subtle);
  margin-bottom: 16px;
}

/* --- Page de Profil --- */
.profile-header {
  text-align: center;
  padding: 48px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 32px;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  margin-bottom: 16px;
}
.profile-meta {
  color: var(--color-text-subtle);
}

/* --- Pages d'Auth --- */
.auth-container {
  text-align: center;
  padding-top: 10vh;
}
.auth-form {
  display: inline-block;
  padding: 48px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  max-width: 400px;
  width: 100%;
  text-align: left;
}
.auth-form .logo-link {
  justify-content: center;
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-text-subtle);
}
.form-group input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.auth-form .nav-button {
  width: 100%;
  text-align: center;
}

/* --- Fil d'Ariane (Breadcrumb) --- */
.breadcrumb {
    padding-bottom: 24px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.breadcrumb li {
    display: flex;
    align-items: center;
}
.breadcrumb .separator {
    margin: 0 12px;
    color: var(--color-text-subtle);
}
.breadcrumb a {
    color: var(--color-text-subtle);
    transition: color 0.2s ease;
}
.breadcrumb a:hover {
    color: var(--color-gold);
}
.breadcrumb span:not(.separator) {
    color: var(--color-text);
    font-weight: 500;
}

.post-content p a{
  text-decoration: none;
  font-style: var(--font-headings);
  color: var(--color-gold);
}

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