html, body {
  background-color: #0a0f1c;
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  color: #eee;
}

header { 
  position: relative;
  background-color: #222831;
  color: #eee;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  gap: 40px;
}
  
header h1 { 
  margin: 0;
  color: #028a0f;
  font-size: 24px;
  flex-shrink: 0;
}
 
header nav {
  display: flex;
  gap: 30px;
  margin-left: 20px; 
  flex-shrink: 0;
} 
 
.nav-link { 
  background-color: #222831;
  color: #028a0f;
  padding: 5px 10px;
  font-size: 19px; 
  text-decoration: none;
  border-radius: 4px; 
  font-weight: normal; 
  transition: background-color 0.3s; 
} 
  
.nav-link.active { 
  background-color: #028a0f;
  color: white;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  font-weight: normal;
  color: #bbb;
}

.logout-button {
  background-color: #d9534f;
  color: white;
  padding: 5px 10px;
  font-size: 13px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: normal;
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #c9302c;
}

.site-icon {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  opacity: 0.8;
  pointer-events: none;
  display: block;
  margin: 0;
}

main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
}

.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.search-bar input {
  padding: 10px;
  width: 60%;
  max-width: 500px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #121923;
  color: #eee;
  box-shadow: 0 0 5px #4caf50;
  outline: none;
  transition: border-color 0.3s;
}

.search-bar input::placeholder { color: #999; }

.search-bar input:focus {
  border-color: #028a0f;
  box-shadow: 0 0 8px #4caf50;
}

.tools-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tool-card {
  position: relative;
  flex: 0 0 calc(20% - 20px);
  box-sizing: border-box;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #121923;
  color: #eee;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover {
  box-shadow: 0 0 12px #4caf50;
  border-color: #4caf50;
}

.tool-card img {
  width: 70px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.tool-card h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: #028a0f;
}

.tool-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
  color: #999;
}

.tool-card small::before { content: ''; display: none; }

.tool-card small span {
  background-color: rgba(129, 199, 132, 0.3);
  color: #81c784;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
}

.tool-card p {
  font-size: 14px;
  margin: 10px 0 15px;
  flex-grow: 1;
  color: #ccc;
}

.tool-card a {
  background-color: #74b72e;
  color: white;
  border: none;
  padding: 12px 10px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease;
  margin-top: 15px;
  display: block;
  text-align: center;
  text-decoration: none;
}

.tool-card a:hover { background-color: #5a8a24; }

.fav-btn {
  font-size: 24px;
  position: absolute;
  top: 10px;
  right: 10px; 
  cursor: pointer;
  color: #ccc;
  user-select: none;
  transition: color 0.3s ease;
}
.fav-btn.active { color: gold; }
.fav-btn:hover { color: orange; }

h2 {
  color: #028a0f;
  text-align: center;
  margin-bottom: 30px;
}

/* Liens internes génériques — remplace les doublons register-link / login-link */
.auth-text-link {
  color: #81c784;
  text-decoration: none;
}
.auth-text-link:hover {
  text-decoration: underline;
  color: #4caf50;
}

/* Anciennes classes conservées pour compatibilité (même style) */
.register-link, .login-link {
  color: #81c784;
  text-decoration: none;
}
.register-link:hover, .login-link:hover {
  text-decoration: underline;
  color: #4caf50;
}

/* ── Pages d'authentification (login, register, forgot, reset, stats_login) ── */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
}

.auth-wrapper.centered {
  align-items: center;
  min-height: calc(100vh - 60px);
}

.auth-card {
  background-color: #121923;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 40px 35px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.auth-card h2 {
  color: #028a0f;
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 22px;
}

.auth-card .subtitle {
  color: #888;
  font-size: 13px;
  text-align: center;
  margin-bottom: 25px;
  margin-top: -15px;
}

.auth-card label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #ccc;
  font-size: 14px;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 9px 10px;
  font-size: 14px;
  background-color: #0a0f1c;
  border: 1px solid #444;
  border-radius: 6px;
  color: #eee;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.auth-card input:focus {
  outline: none;
  border-color: #4caf50;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input { padding-right: 38px !important; }

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  color: #888;
}
.toggle-password:hover { color: #ccc; }

.btn-theme {
  margin-top: 25px;
  padding: 12px 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  background-color: #74b72e;
  color: white;
  border: none;
  border-radius: 6px;
  width: 100%;
  transition: background-color 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}
.btn-theme:hover { background-color: #5a8a24; }

.auth-card .error {
  background-color: rgba(217, 83, 79, 0.15);
  border: 1px solid #d9534f;
  color: #f08080;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}

.auth-card .success {
  background-color: rgba(76, 175, 80, 0.15);
  border: 1px solid #4caf50;
  color: #81c784;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}

.auth-links {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #888;
}

.auth-links a {
  color: #81c784;
  text-decoration: none;
}
.auth-links a:hover {
  text-decoration: underline;
  color: #4caf50;
}

.auth-divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 15px 0 0 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tool-card { flex: 0 0 calc(33.333% - 20px); }
}
@media (max-width: 720px) {
  .tool-card { flex: 0 0 calc(50% - 20px); }
}
@media (max-width: 480px) {
  .tool-card { flex: 0 0 100%; }
}
