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

:root {
  --font-main: "Poppins", sans-serif;
  --radius: 20px;
  --color-bg: #2d3748;
  --color-text: #a0aec0;
  --color-text-title: #e2e8f0;
  --color-accent: #4299e1;
  --shadow-light: rgba(255, 255, 255, 0.08);
  --shadow-dark: rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  font-size: 16px;
  display: flex;
  justify-content: center;
  padding: 2rem;
}
.container {
  width: 100%;
  max-width: 1200px;
}
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
a:hover {
  opacity: 0.8;
}
h1,
h2,
h3 {
  font-family: var(--font-main);
  color: var(--color-text-title);
  font-weight: 700;
}
.main-title,
.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}
.section-title {
  margin-top: 3rem;
}

/* --- Header --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
  margin-bottom: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-title);
}
.logo img {
  height: 40px;
}
.main-nav {
  display: flex;
  gap: 1.5rem;
}
.nav-link {
  color: var(--color-text);
  font-weight: 500;
}
.nav-link.active {
  color: var(--color-accent);
}
.user-actions {
  display: flex;
  gap: 1rem;
}

/* --- Boutons --- */
.button {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 1em;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: -5px -5px 10px var(--shadow-light),
    5px 5px 10px var(--shadow-dark);
  transition: all 0.2s ease-in-out;
}
.button:active,
.button.active {
  box-shadow: inset -5px -5px 10px var(--shadow-light),
    inset 5px 5px 10px var(--shadow-dark);
  color: var(--color-accent);
}
.button-primary {
  color: var(--color-accent);
}

/* --- Bannière & Fil d'Ariane --- */
.hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 3rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.banner-content {
  flex-grow: 1;
}
.banner-content h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
}
.banner-content p {
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0;
}
.banner-image {
  max-width: 400px;
  border-radius: var(--radius);
  box-shadow: -5px -5px 10px var(--shadow-light),
    5px 5px 10px var(--shadow-dark);
}

.breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.9em;
}
.breadcrumb ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--color-text);
}

/* --- Cartes de Catégorie --- */
.forum-list {
  display: grid;
  gap: 2rem;
}
.card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.card-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  color: var(--color-accent);
  box-shadow: inset -5px -5px 10px var(--shadow-light),
    inset 5px 5px 10px var(--shadow-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon span {
  font-size: 2rem;
  font-weight: 700;
}
.card-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}
.card-content h2 a {
  color: var(--color-text-title);
}
.card-content p {
  margin: 0;
}
.card-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9em;
  padding-left: 2rem;
  border-left: 1px solid var(--shadow-dark);
}
.stat-item strong {
  color: var(--color-text-title);
}

/* --- Style pour les liens dans les threads --- */
.post-link-preview {
  margin-top: 1rem;
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.8;
}
.post-link-preview a,
.post-content a {
  font-weight: 700;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
}
.post-link-preview a:hover,
.post-content a:hover {
  color: var(--color-text-title);
  border-bottom-color: var(--color-text-title);
}

/* --- Liste de sujets (Category.html) --- */
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.thread-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.thread-author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.thread-content {
  flex-grow: 1;
}
.thread-content h3 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem 0;
  font-weight: 500;
}
.thread-content h3 a {
  color: var(--color-text-title);
}
.thread-content p {
  font-size: 0.9em;
  margin: 0;
}
.thread-author-link {
  color: var(--color-accent);
  font-weight: 500;
}
.thread-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9em;
  color: var(--color-text);
}

/* --- Messages (Thread.html) --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.post {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.post-author {
  flex: 0 0 150px;
  text-align: center;
}
.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.author-name {
  font-weight: 700;
  color: var(--color-text-title);
  display: block;
}
.author-rank {
  font-size: 0.9em;
}
.author-posts {
  font-size: 0.8em;
  margin-top: 0.5rem;
  display: block;
  opacity: 0.7;
}
.post-body {
  flex-grow: 1;
}
.post-meta {
  font-size: 0.9em;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--shadow-dark);
}
.post-content p {
  margin: 0;
}

/* --- Profil Utilisateur --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 3rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
}
.profile-info h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
}
.profile-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

/* --- Formulaires --- */
.form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2.5rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.form-container h1 {
  text-align: center;
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  background-color: var(--color-bg);
  font-family: var(--font-main);
  color: var(--color-text-title);
  box-shadow: inset -5px -5px 10px var(--shadow-light),
    inset 5px 5px 10px var(--shadow-dark);
}
.form-input:focus {
  outline: none;
}
.form-container .button {
  width: 100%;
  margin-top: 1rem;
}

/* --- Pagination & Footer --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}
.page-button {
  padding: 10px 20px;
}
.main-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  padding: 2.5rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: -8px -8px 16px var(--shadow-light),
    8px 8px 16px var(--shadow-dark);
}
.footer-column {
  display: flex;
  flex-direction: column;
}
.footer-column.footer-brand p {
  font-size: 0.9em;
  margin-top: 1rem;
}
.footer-column h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1em;
  color: var(--color-text-title);
}
.footer-column a {
  color: var(--color-text);
  margin-bottom: 0.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;
} */
