@import url("root.css");

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cinzel", "Palatino Linotype", serif;
  background-color: var(--background-color);
  background-image: url("../img/fantasy-bg.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cinzel Decorative", "Times New Roman", serif;
  margin-bottom: 1rem;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--hover-color);
  text-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

ul {
  list-style-type: none;
}

/* Header */
header {
  background: linear-gradient(
    to bottom,
    rgba(26, 29, 41, 0.9),
    rgba(44, 62, 80, 0.8)
  );
  padding: 1.5rem 0;
  text-align: center;
  border-bottom: 2px solid var(--accent-color);
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

header h1::before,
header h1::after {
  content: "✧";
  color: var(--accent-color);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

header h1::before {
  left: -2rem;
}

header h1::after {
  right: -2rem;
}

.magical-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

/* nav#navigation */
nav#nav {
  background: rgba(26, 29, 41, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

nav#nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}

nav#nav li {
  margin: 0;
  position: relative;
}

nav#nav a {
  display: block;
  padding: 1rem 1.2rem;
  color: var(--text-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  position: relative;
}

nav#nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav#nav a:hover::after {
  width: 80%;
}

nav#nav a.ac {
  position: relative; /* Nécessaire pour ::after en absolute */
}

nav#nav a.ac::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%; /* Largeur visible */
  height: 2px;
  background: var(--accent-color, #3b82f6); /* couleur par défaut */
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 1rem;
}

.hamburger-menu span {
  width: 2rem;
  height: 0.25rem;
  background: var(--accent-color);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
}

.main-content {
  min-height: calc(100vh - 300px);
}

/* Forum Preview Section */
.forum-preview {
  flex: 2;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-preview h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
}

.topic {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.topic:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  border-left: 3px solid var(--accent-color);
}

.topic h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.topic p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

/* Sidebar */
.sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar > div {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--accent-color);
}

/* Login Form */
.login-form form {
  display: flex;
  flex-direction: column;
}

.login-form label {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.login-form input.text {
  padding: 0.8rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  font-family: "Palatino Linotype", serif;
}

.login-form input.text:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
}

.button {
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, var(--accent-color), #e67e22);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.button:hover {
  background: linear-gradient(135deg, #e67e22, var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.message {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 5px;
  text-align: center;
}

.success {
  background-color: rgba(39, 174, 96, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.error {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Statistics */
.statistics ul {
  padding-left: 1rem;
}

.statistics li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.statistics li::before {
  content: "✦";
  color: var(--accent-color);
  margin-right: 0.5rem;
}

/* Discord Section */
.sdiscord {
  text-align: center;
}

.sdiscord h3 {
  margin-bottom: 1rem;
}

.sdiscord img {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.sdiscord img:hover {
  transform: scale(1.05);
}

.interval1,
.interval2 {
  display: none;
  animation: fadeIn 0.5s ease;
}

.interval1.active,
.interval2.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Footer */
footer {
  background: linear-gradient(
    to top,
    rgba(26, 29, 41, 0.9),
    rgba(44, 62, 80, 0.8)
  );
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 2px solid var(--accent-color);
}

footer p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .hamburger-menu {
    display: flex;
    z-index: 1010;
  }

  nav#nav ul {
    flex-direction: column;
    position: absolute;
    background: rgba(26, 29, 41, 0.95);
    width: 100%;
    top: 100%;
    left: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }

  nav#nav ul.show {
    height: auto;
    border-bottom: 1px solid var(--border-color);
  }

  nav#nav a::after {
    display: none;
  }

  nav#nav a:hover {
    background: rgba(243, 156, 18, 0.2);
  }

  header h1::before,
  header h1::after {
    display: none;
  }

  header h1 {
    font-size: 1.8rem;
  }
}

/* Special Effects */
.pointer {
  cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e67e22;
}

/* Font Imports */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cinzel+Decorative:wght@400;700;900&display=swap");
