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

:root {
  /* -- Couleurs de base -- */
  --color-background: #2a2e29;
  --color-surface: rgba(56, 62, 55, 0.8);
  --color-text: #f1f1f1;
  --color-text-subtle: #a0a89f;
  --color-white: #ffffff;
  --color-black-transparent-strong: rgba(0, 0, 0, 0.5);
  --color-black-transparent-medium: rgba(0, 0, 0, 0.08);

  /* -- Couleurs d'accentuation -- */
  --color-accent-orange: #a3b899;
  --color-accent-red: #78866b;
  --color-border: rgba(241, 241, 241, 0.15);
  
  /* -- Couleurs superpositions (overlays) -- */
  --color-hero-overlay: rgba(20, 25, 20, 0.8);

  /* -- Couleurs pour l'animation JS des feuilles -- */
  --leaf-color-1: #556B2F;
  --leaf-color-2: #6B8E23;
  --leaf-color-3: #808000;
  --leaf-color-4: #52633A;
  
  /* -- Typographie (statique) -- */
  --font-serif: "Lora", serif;
  --font-sans: "Lato", sans-serif;
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--color-background);
  font-family: var(--font-sans);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.7;
}
#falling-leaves-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
}
a {
  color: var(--color-accent-red);
  text-decoration: none;
  font-weight: 700;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
}

/* --- Header, Footer, Breadcrumb --- */
.site-header,
.breadcrumb,
.category-card,
.site-footer,
.post-item,
.auth-form,
.profile-sidebar {
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 24px;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  color: var(--color-text);
}
.logo {
  height: 32px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  font-weight: 700;
  color: var(--color-text-subtle);
}
.nav-link.active,
.nav-link:hover {
  color: var(--color-text);
  text-decoration: none;
}
.breadcrumb {
  padding: 12px 24px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  font-weight: 700;
}
.breadcrumb span a {
  color: var(--color-text-subtle);
}
.breadcrumb span a:hover {
  color: var(--color-text);
}
.breadcrumb span:last-child {
  color: var(--color-text);
}
.breadcrumb span:not(:last-child)::after {
  content: "›";
  margin: 0 8px;
  color: var(--color-text-subtle);
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 32px;
  margin-top: 48px;
  color: var(--color-text-subtle);
  font-size: 0.9rem;
}
.footer-column h4 {
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-column a {
  color: var(--color-text-subtle);
  font-weight: 400;
  display: block;
  padding: 4px 0;
}
.footer-column a:hover {
  color: var(--color-text);
}

/* --- Structure de page --- */
.page-title {
  font-size: 2.5rem;
  margin-bottom: 24px;
  font-family: var(--font-serif);
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.nav-button {
  background-color: var(--color-accent-red);
  color: var(--color-background);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.nav-button:hover {
  background-color: var(--color-text);
  text-decoration: none;
}

.hero-banner {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-bottom: 48px;
}
.banner-image {
  width: 100%;
  display: block;
}
.hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  background: linear-gradient(to top, var(--color-hero-overlay), transparent);
}
.hero-text h1 {
  font-size: 2.5rem;
  color: var(--color-white);
  text-shadow: 1px 1px 5px var(--color-black-transparent-strong);
}

/* --- Listes --- */
.category-card {
  padding: 32px;
  margin-bottom: 32px;
}
.category-card h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
}
.category-card h2 a {
  color: var(--color-text);
  text-decoration: none;
}
.category-card h2 a:hover {
  color: var(--color-accent-red);
}
.thread-list {
  display: flex;
  flex-direction: column;
}
.thread-item {
  position: relative;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
}
.thread-item:first-child {
  border-top: none;
  padding-top: 0;
}
.thread-item:hover .thread-title a {
  color: var(--color-accent-orange);
}
.thread-link-cover {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.thread-link-cover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
.thread-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.thread-meta {
  font-size: 0.9rem;
  color: var(--color-text-subtle);
}
.thread-meta a {
  position: relative;
  z-index: 2;
  color: var(--color-text);
  text-decoration: none;
}
.thread-meta a:hover {
  color: var(--color-accent-red);
  text-decoration: underline;
}
.thread-meta strong {
  font-weight: 700;
}
.category-list-full a.category-card {
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-list-full a.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px var(--color-black-transparent-medium);
}

/* --- Page de Sujet & Profil --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.post-item {
  display: flex;
  gap: 16px;
  padding: 24px;
}
.post-author {
  flex-shrink: 0;
  text-align: center;
  width: 120px;
}
.post-author a {
  color: var(--color-text);
  text-decoration: none;
}
.post-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 8px;
}
.post-content {
  padding-left: 16px;
  border-left: 1px solid var(--color-border);
}
.profile-grid {
  display: grid;
  grid-template-columns: 325px 1fr;
  gap: 32px;
}
.profile-sidebar {
  padding: 32px;
  text-align: center;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.profile-sidebar h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  word-break: break-all;
}
.profile-rank {
  color: var(--color-text-subtle);
  margin-bottom: 16px;
}
.profile-stats {
  list-style: none;
  text-align: left;
  font-size: 0.9rem;
}
.profile-stats hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 16px 0;
}
.profile-main .category-card {
  margin-bottom: 0;
}

/* --- Auth --- */
.auth-container {
  max-width: 450px;
  margin-top: 10vh;
  text-align: center;
}
.auth-container .logo-link {
  justify-content: center;
  margin-bottom: 24px;
}
.auth-form {
  padding: 32px;
}
.auth-form h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}
.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-background);
  font-family: var(--font-sans);
  font-size: 1rem;
}
.auth-form .nav-button {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 8px;
}
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--color-text-subtle);
}
.auth-switch a {
  color: var(--color-accent-red);
}

.category-list-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.category-list-full .category-card {
  padding: 24px;
  margin-bottom: 0;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-list-full .category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px var(--color-black-transparent-medium);
}

.category-list-full .category-card h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--color-text);
}

.category-list-full .category-card p {
  font-size: 0.95rem;
  color: var(--color-text-subtle);
  margin: 0;
}

@media (min-width: 768px) {
  .category-list-full {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.page-item,
.page-item-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-subtle);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-item:hover {
  background-color: var(--color-accent-orange);
  color: var(--color-background);
  text-decoration: none;
}

.page-item.active {
  background-color: var(--color-accent-red);
  color: var(--color-background);
  pointer-events: none;
}

.page-item-separator {
  background: transparent;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
}


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