/* ============================================================================
   Nyx Player — Site de redirection Auth
   CSS partagé par toutes les pages (dark theme, centré, responsive)
   ============================================================================ */

/* ---------- Reset & Base ---------- */

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

html {
  font-size: 100%;
  /* 16px base */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #0d0d1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  line-height: 1.6;
}

/* ---------- Card Container ---------- */

.card {
  background: linear-gradient(145deg, #1a1a2e, #16162a);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  max-width: 28rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.4);
}

/* ---------- Logo / Brand ---------- */

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.subtitle {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
}

/* ---------- Messages ---------- */

.message {
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.message--success {
  background: rgba(34, 197, 94, 0.1);
  border: 0.0625rem solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.message--error {
  background: rgba(239, 68, 68, 0.1);
  border: 0.0625rem solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.message--info {
  background: rgba(167, 139, 250, 0.1);
  border: 0.0625rem solid rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}

/* ---------- Spinner ---------- */

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 0.2rem solid rgba(167, 139, 250, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-text {
  color: #888;
  font-size: 0.9rem;
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  color: #e0e0e0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 0.15rem rgba(167, 139, 250, 0.15);
}

.form-input::placeholder {
  color: #555;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.25rem 1rem rgba(124, 58, 237, 0.3);
}

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

/* ---------- Links ---------- */

a {
  color: #a78bfa;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #555;
}

/* ---------- Hidden ---------- */

.hidden {
  display: none !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 30rem) {
  .card {
    padding: 1.5rem 1.25rem;
    border-radius: 0.75rem;
  }

  .brand {
    font-size: 1.25rem;
  }
}

/* ---------- Legal Pages ---------- */

.card--legal {
  max-width: 42rem;
  text-align: left;
}

.legal-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.legal-nav a {
  font-size: 0.85rem;
  color: #a78bfa;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(167, 139, 250, 0.08);
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.legal-nav a:hover {
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
  text-decoration: none;
}

.legal-nav a.active {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
  font-weight: 600;
}

.legal-updated {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 0.0625rem solid rgba(167, 139, 250, 0.15);
}

.legal-content h2:first-child {
  margin-top: 0.5rem;
}

.legal-content p {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-content ul {
  list-style: none;
  padding-left: 1rem;
  margin-bottom: 0.75rem;
}

.legal-content ul li {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.7;
  padding-left: 0.75rem;
  position: relative;
}

.legal-content ul li::before {
  content: '•';
  color: #a78bfa;
  position: absolute;
  left: -0.25rem;
}

.legal-content strong {
  color: #e0e0e0;
}

.legal-content a {
  color: #a78bfa;
}

.legal-footer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.legal-footer-links a {
  color: #666;
  transition: color 0.2s ease;
}

.legal-footer-links a:hover {
  color: #a78bfa;
}

.legal-footer-links span {
  color: #333;
}