@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=VT323&display=swap");
:root {
	--font-heading: "VT323", monospace;
	--font-body: "Fira Code", monospace;
	--sidebar-width: 260px;
	--color-bg: #03010a;
	--color-surface: #100c24;
	--color-text: #c0b8e0;
	--color-text-muted: #817c9c;
	--color-text-light: #f5f3ff;
	--color-transparent: transparent;
	--color-primary: #9d72ff;
	--color-secondary: #00e5ff;
	--color-accent: #6f42c1;
	--color-primary-transparent-5: rgba(157, 114, 255, 0.05);
	--color-primary-transparent-10: rgba(157, 114, 255, 0.1);
	--color-primary-transparent-20: rgba(157, 114, 255, 0.2);
	--color-primary-transparent-30: rgba(157, 114, 255, 0.3);
	--color-secondary-transparent-5: rgba(0, 229, 255, 0.05);
	--color-secondary-transparent-10: rgba(0, 229, 255, 0.1);
	--color-secondary-transparent-30: rgba(0, 229, 255, 0.3);
	--color-accent-transparent-5: rgba(111, 66, 193, 0.05);
	--color-border: var(--color-primary-transparent-20);
	--shadow-glow-primary: 0 0 12px var(--color-primary-transparent-30);
	--shadow-glow-primary-strong: 0 0 8px var(--color-primary);
	--shadow-glow-secondary: 0 0 12px var(--color-secondary-transparent-30);
	--shadow-glow-accent: 0 0 5px var(--color-accent);
	--shadow-glow-accent-strong: 0 0 8px var(--color-accent);
	--text-shadow-primary: 0 0 5px var(--color-primary);
	--text-shadow-primary-strong: 0 0 15px var(--color-primary), 0 0 25px var(--color-primary);
	--text-shadow-light: 0 0 5px var(--color-text-light);
}

/* --- Styles Généraux & Nouvelle Grille Principale --- */
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
  font-size: 15px;
}

.site-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.main-content-area {
  grid-column: 2 / 3;
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  color: var(--color-text-light);
  text-shadow: var(--shadow-glow-primary-strong);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-primary);
  margin: 0;
  text-transform: uppercase;
}

/* --- Barre Latérale (Sidebar) --- */
.sidebar {
  grid-column: 1 / 2;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-sticky-content {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.sidebar .logo {
  text-align: center;
  margin-bottom: 3rem;
  display: block;
}

.logo-image {
  max-width: 100px;
  height: auto;
  transition: filter 0.3s ease;
}

.logo:hover .logo-image {
  filter: drop-shadow(var(--shadow-glow-primary-strong));
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-grow: 1;
}

.main-nav a {
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--color-transparent);
}

.main-nav a:hover {
  border-left-color: var(--color-secondary);
  background-color: var(--color-secondary-transparent-5);
}

.main-nav a.nav-active {
  color: var(--color-text-light);
  border-left-color: var(--color-primary);
  background-color: var(--color-primary-transparent-5);
  text-shadow: var(--text-shadow-primary);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Boutons --- */
.btn {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 10px 20px;
  text-align: center;
  border: 2px solid;
  background-color: var(--color-transparent);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.btn-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-transparent-10);
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-transparent-10);
  box-shadow: var(--shadow-glow-secondary);
}

/* --- Hero Banner --- */
.hero-banner {
  position: relative;
  border: 1px solid var(--color-border);
  padding: 4rem 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3;
  filter: grayscale(50%);
}

.hero-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    0deg,
    var(--color-transparent),
    var(--color-transparent) 2px,
    var(--color-primary-transparent-5) 3px
  );
  pointer-events: none;
  animation: scanlines 10s linear infinite;
  z-index: 2;
}

@keyframes scanlines {
  from {
    background-position-y: 0;
  }

  to {
    background-position-y: 100px;
  }
}

.hero-content {
  z-index: 3;
  position: relative;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--color-text-light);
  text-shadow: var(--text-shadow-light), var(--text-shadow-primary-strong);
  position: relative;
}

.hero-content h1::before,
.hero-content h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-transparent);
  overflow: hidden;
  clip-path: inset(50% 0 50% 0);
  animation: intermittent-glitch 5s infinite steps(2, end);
}

.hero-content h1::before {
  text-shadow: -2px 0 var(--color-secondary);
}

.hero-content h1::after {
  text-shadow: 2px 0 var(--color-accent);
  animation-duration: 4.95s;
}

@keyframes intermittent-glitch {
  0% {
    transform: none;
    clip-path: inset(50% 0 50% 0);
  }

  94% {
    transform: none;
    clip-path: inset(50% 0 50% 0);
  }

  95% {
    transform: translate(-5px, 2px);
    clip-path: inset(10% 0 85% 0);
  }

  96% {
    transform: translate(5px, -3px);
    clip-path: inset(70% 0 5% 0);
  }

  97% {
    transform: translate(-3px, 1px);
    clip-path: inset(40% 0 40% 0);
  }

  98% {
    transform: translate(3px, -1px);
    clip-path: inset(80% 0 10% 0);
  }

  99% {
    transform: translate(-2px, 3px);
    clip-path: inset(20% 0 50% 0);
  }

  100% {
    transform: none;
    clip-path: inset(50% 0 50% 0);
  }
}

/* --- Fil d'Ariane --- */
.breadcrumb {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.breadcrumb .separator {
  color: var(--color-primary);
  margin: 0 0.5rem;
}

/* --- Grille principale & Titres de section --- */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.5rem;
}

/* --- Cartes de Catégorie --- */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px var(--color-primary-transparent-20);
}

.card-header,
.card-body,
.card-footer {
  padding: 1rem 1.5rem;
}

.card-header {
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  font-size: 1.5rem;
}

.card-body p {
  margin: 0;
  color: var(--color-text-muted);
}

.card-footer {
  font-size: 0.9rem;
  color: var(--color-accent);
}

/* --- Liens dans les posts --- */
.post-content a {
  color: var(--color-accent);
  text-shadow: var(--shadow-glow-accent);
  text-decoration: underline;
  text-decoration-style: dashed;
}

.post-content a:hover {
  color: var(--color-text-light);
  text-shadow: var(--shadow-glow-accent-strong);
}

/* --- Liste d'activité récente --- */
#threads .thread-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--color-transparent);
  transition: background-color 0.3s, border-color 0.3s;
}

#threads .thread-item:hover {
  background-color: var(--color-accent-transparent-5);
  border-color: var(--color-accent);
}

.thread-title {
  color: var(--color-text);
}

.thread-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.thread-replies {
  color: var(--color-primary);
  font-weight: 600;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.pagination a,
.pagination span {
  padding: 5px 12px;
  border: 1px solid var(--color-border);
}

.pagination a:hover {
  background-color: var(--color-surface);
  color: var(--color-primary);
}

.pagination .current-page {
  background-color: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}

/* --- Footer Détaillé --- */
.main-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
  padding: 1rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul a {
  color: var(--color-text-muted);
}

.footer-column ul a:hover {
  color: var(--color-secondary);
  text-shadow: none;
  padding-left: 5px;
}

.footer-column .logo-image {
  max-width: 50px;
  opacity: 0.7;
}

.footer-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-socials a {
  font-weight: 600;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.page-title {
  font-size: 2.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

/* --- Liste de sujets (Page Catégorie) --- */
.thread-list-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  gap: 1.5rem;
}

.thread-icon img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
}

.thread-info {
  flex-grow: 1;
}

.thread-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.thread-stats {
  font-size: 1rem;
  color: var(--color-accent);
  text-align: right;
  min-width: 100px;
}

.thread-stats span {
  font-size: 1.5rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  display: block;
}

/* --- Posts (Page Sujet) --- */
.post {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}

.post-author {
  flex-shrink: 0;
  width: 160px;
  text-align: center;
  border-right: 1px solid var(--color-border);
  padding-right: 1.5rem;
}

.author-avatar {
  width: 96px;
  height: 96px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.author-name {
  font-size: 1.2rem;
  font-weight: 600;
  display: block;
}

.author-role,
.author-stats {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.post-body {
  flex-grow: 1;
}

.post-meta {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.5rem;
}

.post-content p {
  margin-top: 0;
}

/* --- Profil Utilisateur --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}

.profile-name {
  font-size: 3rem;
  color: var(--color-text-light);
}

.profile-role,
.profile-joined {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.profile-grid {
  margin-top: 2rem;
}

/* --- Formulaires (Login/Register) --- */
.form-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.form-container .page-title {
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.form-input {
  width: 95%;
  padding: 12px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}

.form-container .btn {
  width: 100%;
  margin-top: 1rem;
}

.form-switch-link {
  text-align: center;
  margin-top: 1.5rem;
  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;
} */
