:root {
  --bg: #0a0a0d;
  --bg-card: #12121a;
  --bg-input: #1a1a24;
  --border: #252533;
  --text: #e8e8ec;
  --text-muted: #6b6b7a;
  --accent: #7c3aed;
  --accent-hover: #9570f7;
  --success: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* Masquer le curseur système partout (inputs, boutons, liens, etc.) */
body,
body *,
input, textarea, button, select, a, label, [role="button"] {
  cursor: none !important;
}

@media (pointer: coarse) {
  body, body * { cursor: auto !important; }
  .cursor-dot, .cursor-trail { display: none !important; }
}

.cursor-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.95);
  pointer-events: none;
  z-index: 99999;
  left: -5px;
  top: -5px;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.6);
  transition: box-shadow 0.3s ease;
}

.cursor-dot:hover {
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.8);
}

.cursor-trail {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(234, 179, 8, 0.4);
  pointer-events: none;
  z-index: 99998;
  left: -14px;
  top: -14px;
  transition: border-color 0.2s ease;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-form button {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-form button:hover {
  background: var(--accent-hover);
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.nav-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-weight: 500;
  margin-right: auto;
  margin-left: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.navbar-home {
  background: rgba(23, 23, 28, 0.8);
  backdrop-filter: blur(12px);
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeIn 0.4s ease-out;
}

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

.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(124, 58, 237, 0.2);
}

.card-animate {
  animation: cardFadeIn 0.5s ease-out;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input,
.form-group select {
  padding: 0.6rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.url-display {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.url-display a {
  color: var(--accent);
  word-break: break-all;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.server-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: all 0.25s ease;
}

.server-item:hover {
  background: rgba(30, 30, 36, 0.8);
  border-color: rgba(124, 58, 237, 0.15);
  transform: translateX(4px);
}

.server-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.server-info strong {
  font-weight: 600;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.badge-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.server-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.server-channels {
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.channel-item {
  font-size: 0.85rem;
}

.channel-item select {
  min-height: 80px;
}

.hidden {
  display: none !important;
}

.trigger-list, .schedules-list {
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.trigger-item, .schedule-item {
  padding: 0.5rem;
  background: var(--bg-input);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.trigger-item small, .schedule-item small {
  color: var(--text-muted);
}

.empty {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
}

.modal-content h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.modal-content .form-group {
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.modal-actions .btn {
  flex: 1;
  text-align: center;
}

.emoji-inputs {
  display: flex;
  gap: 0.5rem;
}

.emoji-inputs input {
  width: 3rem;
  text-align: center;
  padding: 0.5rem;
}

.home-page {
  min-height: 100vh;
  padding: 2rem;
}

.hero-home {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 0;
}

.hero-home h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.admin-grid .card.full-width { grid-column: 1 / -1; }

.admin-grid .card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.client-list .server-item {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.power-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.power-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.server-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.status-running { color: var(--success); }
.status-starting { color: var(--warn); }
.status-offline { color: var(--danger); }

/* Smooth scroll offset for anchor links */
:target {
  scroll-margin-top: 80px;
}

/* Input focus animations */
.form-group input:focus,
.form-group select:focus,
.auth-form input:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Footer site */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.footer-section h4 {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
}
.footer-section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.footer-section a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.footer-section a:hover {
  color: var(--accent);
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
