/* CSS unifié pour toutes les pages du Forum de l’Imperium - style sombre, simple, compact */
body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.4;
  overscroll-behavior: none;
  background-attachment: fixed;
  background: linear-gradient(to bottom, #000000, #001f3f);
}

.background-container {
  /* background: linear-gradient(to bottom, #000000, #001f3f); */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: #003d7e transparent transparent transparent; /* Bleu */
  animation: float 5s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes float {
  0% {
    transform: translateY(0);
    }
  50% {
    transform: translateY(-10px);
    }
  100% {
    transform: translateY(0);
    }
}

.navbar {
  background-color: rgba(0, 0, 0, 0);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.navbar a {
  color: #b0b0b0;
  text-decoration: none;
  font-size: 14px;
  margin: 0 10px;
}

.navbar a:hover {
  color: #ffffff;
}

.navbar .search-btn {
  background-color: #2a2a2a;
  color: #b0b0b0;
  padding: 6px 12px;
  border: 1px solid #444;
  font-size: 13px;
  cursor: pointer;
}

.navbar .search-btn:hover {
  background-color: #3a3a3a;
  color: #ffffff;
}

.container {
  max-width: 1000px;
  margin: 10px auto;
  padding: 15px;
  border: 1px solid #333;
  background-color: rgba(22, 22, 22, 0.6);
}


.index .container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 10px;
}

.thread .container, .new-thread .container, .search .container {
  max-width: 800px;
}

/* Index page specific */
.main-content {
  background-color: rgba(0, 0, 0, 0);
  border: 1px solid #333;
}

.sidebar {
  background-color: rgba(0, 0, 0, 0);
  border: 1px solid #333;
  padding: 10px;
}

.header {
  background-color: rgba(16, 33, 49, 0.6);
  color: #ffffff;
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #333;
}

.header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.box {
  background-color: rgba(0, 0, 0, 0);
  margin: 10px;
  border-bottom: 1px solid #333;
}

.box h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #ffffff;
}

.sidebar-box {
  margin-bottom: 15px;
}

.sidebar-box h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #ffffff;
}

.sidebar-box p {
  font-size: 12px;
  color: #b0b0b0;
  margin: 0 0 8px;
}

.stats-box ul {
  list-style: none;
  padding: 0;
  font-size: 12px;
  color: #b0b0b0;
}

.stats-box li {
  margin-bottom: 4px;
}

/* Thread and search page common */
.thread {
  padding: 8px;
  border-bottom: 1px solid #333;
}

.thread a {
  color: #4a90e2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.thread a:hover {
  color: #6ab0ff;
}

.thread-meta {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* Thread page specific */
.thread-header {
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.thread-header h1 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #ffffff;
}

.thread-btn {
		color: #4a90e2;
}

.thread-content {
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(30, 30, 30, 0.6);
  border: 1px solid #333;
}

.thread-content p, .message-content p {
  margin: 0 0 8px;
}

.thread-content a, .message-content a {
  color: #4a90e2;
  text-decoration: none;
}

.thread-content a:hover, .message-content a:hover {
  color: #6ab0ff;
}

.thread-content ul, .thread-content ol, .message-content ul, .message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.thread-content blockquote, .message-content blockquote {
  border-left: 2px solid #4a90e2;
  padding-left: 10px;
  margin: 8px 0;
  color: #b0b0b0;
}

.thread-content code, .message-content code {
  background-color: #333;
  padding: 2px 4px;
  font-family: monospace;
}

.thread-content pre, .message-content pre {
  background-color: #333;
  padding: 8px;
  overflow-x: auto;
  font-family: monospace;
}

.messages {
  margin-bottom: 15px;
}

.message {
  padding: 8px;
  border-bottom: 1px solid #333;
}

.message-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.message-content {
  font-size: 13px;
  color: #e0e0e0;
}

.reply-form h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #ffffff;
}

.reply-form textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #444;
  background-color: rgba(30, 30, 30, 0.6);
  color: #e0e0e0;
  font-size: 13px;
  box-sizing: border-box;
  resize: vertical;
  height: 80px;
}

.reply-form button {
  background-color: #4a90e2;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.reply-form button:hover {
  background-color: #3a80d2;
}

/* New-thread and search page specific */
.post-form h2, .search-form h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
}

.post-form input[type="text"], .post-form textarea,
.search-form input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #444;
  background-color: rgba(30, 30, 30, 0.6);
  color: #e0e0e0;
  font-size: 13px;
  box-sizing: border-box;
}

#login-form input, #signup-form input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #444;
  background-color: rgba(30, 30, 30, 0.6);
  color: #e0e0e0;
  font-size: 13px;
  box-sizing: border-box;
}


.post-form textarea {
  height: 100px;
  resize: vertical;
}

.post-form button, .search-form button , #login-form button, #signup-form button, #logout-btn {
  background-color: #4a90e2;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.post-form button:hover, .search-form button:hover , #login-form button:hover , #signup-form button:hover, #logout-btn:hover{
  background-color: #3a80d2;
}

.search-results {
  padding: 10px 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #888;
  border: 1px solid #333;
  background-color: rgba(0, 0, 0, 0);

}

/* Responsive design */
@media (max-width: 600px) {
  body {
    overscroll-behavior: none;
  }
  
  .index .container {
    grid-template-columns: 1fr;
    margin: 5px;
  }

  .thread .container, .new-thread .container, .search .container {
    margin: 5px;
    padding: 10px;
  }

  .header h1 {
    font-size: 18px;
  }

  .thread-header h1, .post-form h2, .search-form h2 {
    font-size: 16px;
  }

  .box h2 {
    font-size: 14px;
  }

  .sidebar-box h3 {
    font-size: 13px;
  }

  .navbar {
    background-color: rgba(0, 0, 0, 0);
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .navbar a {
    margin: 3px 0;
  }
}