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

:root {
  --font-main: "Inter", sans-serif;
  --radius: 12px;
  --color-bg: #101D33;
  --color-surface: #192A48;
  --color-border: #2A4065;
  --color-text: #D0D8E6;
  --color-text-muted: #8FA4C7;
  --color-heading: #FFFFFF;
  --gradient-accent: linear-gradient(90deg, #22D3EE, #34D399);
}

/* --- Styles Généraux --- */
*,
*::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;
}
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 0;
}
a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-heading);
}
h1,
h2,
h3 {
  font-family: var(--font-main);
  color: var(--color-heading);
  font-weight: 700;
}
.main-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.main-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: 0;
  margin-bottom: 2rem;
}
.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* --- Header & Hero --- */
.main-header {
  display: flex;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: auto;
}
.logo img {
  height: 32px;
}
.main-nav {
  display: flex;
  gap: 1.5rem;
}
.nav-link {
  font-weight: 500;
  position: relative;
  color: var(--color-text-muted);
}
.nav-link span {
  padding-bottom: 8px;
  display: block;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-heading);
}
.nav-link.active span {
  background-image: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.nav-link.active span::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
}
.user-actions {
  display: flex;
  gap: 1rem;
  margin-left: 2rem;
}
.button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: transparent;
  transition: all 0.2s ease;
}
.button:hover {
  border-color: var(--color-text);
  color: var(--color-heading);
}
.button-primary {
  background: var(--gradient-accent);
  border: none;
  color: var(--color-heading);
}
.button-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}
.hero {
    position: relative;
    text-align: center;
    padding: 5rem 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(17, 24, 39, 0.7);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-title {
    font-size: 3rem;
    margin: 0;
    background: var(--gradient-accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem;
    max-width: 60ch;
    margin: 1rem auto 0 auto;
    color: var(--color-text-muted);
}
.breadcrumb {
  font-size: 0.9em;
  color: var(--color-text-muted);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
}
.breadcrumb a {
  color: var(--color-text-muted);
  font-weight: 500;
}
.breadcrumb a:hover {
  color: var(--color-text);
}
.breadcrumb span::before {
  content: "/";
  margin-right: 0.5rem;
}

/* --- Listes Homepage --- */
.category-section-list {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
.category-block {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color 0.3s ease;
}
.category-block:hover {
  border-color: #8b5cf6;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.card-initials {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card-initials::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gradient-accent);
  border-radius: inherit;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.card-initials span {
  font-weight: 700;
}
.card-content {
  flex-grow: 1;
}
.card-content h3 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem 0;
}
.card-content h3 a:hover {
  color: var(--color-text-muted);
}
.card-content p {
  margin: 0;
  font-size: 0.9em;
  color: var(--color-text-muted);
}
.card-stats {
  font-size: 0.9em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.thread-preview-list {
  padding: 0.5rem 1.5rem;
}
.thread-preview-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.thread-preview-item:last-child {
  border-bottom: none;
}
.thread-title {
  flex-grow: 1;
  font-weight: 500;
}
.thread-author {
  font-size: 0.9em;
  color: var(--color-text-muted);
  width: 150px;
  flex-shrink: 0;
}
.thread-replies {
  font-size: 0.9em;
  color: var(--color-text-muted);
  width: 100px;
  flex-shrink: 0;
  text-align: right;
}

/* --- Page de Catégorie (Grille de sujets) --- */
.category-page-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.thread-grid {
  display: grid;
  gap: 1.5rem;
}
.thread-card {
  display: block;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.thread-card:hover {
  transform: translateY(-5px);
  border-color: #8b5cf6;
}
.thread-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.thread-card-content {
  padding: 1rem 1.25rem;
}
.thread-card-content h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  color: var(--color-text);
}
.thread-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  color: var(--color-text-muted);
}

/* --- Page de sujet --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.post {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.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-heading);
  display: block;
}
.author-posts {
  font-size: 0.8em;
  margin-top: 0.5rem;
  display: block;
  color: var(--color-text-muted);
}
.post-body {
  flex-grow: 1;
}
.post-meta {
  font-size: 0.9em;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.post-content p {
  margin: 0;
}
.post-content a {
  color: var(--color-text);
  background-image: var(--gradient-accent);
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
}

/* --- Page de profil --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}
.profile-info h1 {
  font-size: 2rem;
  margin: 0 0 0.25rem 0;
}
.profile-joined {
  color: var(--color-text-muted);
}
.profile-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}
.profile-stats span {
  font-size: 1.1em;
}
.profile-stats strong {
  color: var(--color-heading);
}

/* --- Formulaires --- */
.form-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.form-title {
  text-align: center;
  margin-bottom: 2rem;
  background-image: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
}
.form-input:focus {
  outline: none;
  border-color: #8b5cf6;
}
.form-container .button {
  width: 100%;
  margin-top: 1rem;
  padding: 12px;
}

/* --- Pagination & Footer --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.main-footer {
    padding: 3rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--color-border);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-column .logo {
    margin-bottom: 1rem;
}
.footer-tagline {
    font-size: 0.9em;
    color: var(--color-text-muted);
}
.footer-column h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--color-heading);
}
.footer-column a {
    display: block;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
}
.footer-column a:hover {
    color: var(--color-text);
}
.footer-column p {
    font-size: 0.9em;
    color: var(--color-text-muted);
}
.newsletter-form {
    display: flex;
    margin-top: 1rem;
}
.newsletter-form input {
    flex-grow: 1;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    color: var(--color-text);
    padding: 10px;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.newsletter-form button {
    border: none;
    background: var(--gradient-accent);
    color: var(--color-heading);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1.2rem;
}
.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9em;
    color: var(--color-text-muted);
}

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