/* ============================================================
   auth.css – Styles pour login, register, account
   ============================================================ */

:root {
  --bg:       #0f1117;
  --card-bg:  #1a1d27;
  --text:     #e0e0e0;
  --muted:    #8892a4;
  --primary:  #4f8cff;
  --primary-hover: #6ba0ff;
  --danger:   #e74c3c;
  --success:  #27ae60;
  --border:   #2a2e3a;
  --radius:   10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  display: flex;
  gap: 48px;
  max-width: 900px;
  width: 100%;
  padding: 24px;
  align-items: flex-start;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  flex: 1;
  min-width: 340px;
}

.auth-card.wide {
  max-width: 560px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 1.6em;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--muted);
  font-size: 0.95em;
}

/* ── Forms ── */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95em;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--primary);
}

.password-strength {
  font-size: 0.8em;
  margin-top: 4px;
  min-height: 1.2em;
  font-weight: 600;
}

/* ── Buttons ── */

.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: rgba(79, 140, 255, 0.1); }

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.9em;
}

.btn-link:hover { color: var(--text); }

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-row .btn-primary,
.btn-row .btn-secondary {
  flex: 1;
  text-align: center;
}

/* ── Errors ── */

.error-msg {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9em;
  margin-bottom: 14px;
}

.success-msg {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid #2ecc71;
  color: #2ecc71;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9em;
  margin-bottom: 14px;
}

/* ── Panels ── */

.panel {
  margin: 20px 0;
}

.panel h2 {
  font-size: 1.2em;
  margin-bottom: 12px;
}

.sub-details {
  background: var(--bg);
  border-radius: 6px;
  padding: 16px;
  margin: 12px 0;
}

.sub-details p {
  margin: 6px 0;
  font-size: 0.93em;
  color: var(--muted);
}

.sub-details strong {
  color: var(--text);
}

.pricing-big {
  font-size: 1.15em;
  margin: 16px 0;
  text-align: center;
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}

/* ── Footer ── */

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-footer p {
  color: var(--muted);
  font-size: 0.9em;
}

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

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

/* ── Info / marketing panel ── */

.auth-info {
  flex: 0 0 300px;
  padding-top: 60px;
}

.auth-info h2 {
  font-size: 1.15em;
  margin-bottom: 16px;
}

.auth-info ul {
  list-style: none;
  padding: 0;
}

.auth-info li {
  padding: 8px 0;
  font-size: 0.93em;
  color: var(--muted);
}

.auth-info .pricing {
  margin-top: 20px;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 1em;
  color: var(--text);
}

/* ── Responsive ── */

@media (max-width: 700px) {
  .auth-container {
    flex-direction: column;
    gap: 24px;
    padding: 16px;
  }
  .auth-info { display: none; }
  .auth-card { min-width: auto; }
}

/* ════════════════════════════════════════════════════════════
   ANIMATIONS & PARTICLES
   ════════════════════════════════════════════════════════════ */

#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.auth-container {
  position: relative;
  z-index: 1;
}

/* Fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeInUp 0.6s ease-out;
}

.auth-info {
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

/* Glow effect on card */
.auth-card {
  box-shadow: 0 0 40px rgba(79, 140, 255, 0.08);
  transition: box-shadow 0.3s ease;
}

.auth-card:hover {
  box-shadow: 0 0 60px rgba(79, 140, 255, 0.15);
}

/* Button pulse animation */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(79, 140, 255, 0); }
}

.btn-primary {
  animation: pulse 2.5s infinite;
}

.btn-primary:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(79, 140, 255, 0.4);
}

/* Success page animation */
@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon {
  font-size: 4em;
  animation: bounceIn 0.6s ease-out;
  display: block;
  text-align: center;
  margin-bottom: 16px;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Feature list animation */
.auth-info li {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.auth-info li:nth-child(1) { animation-delay: 0.3s; }
.auth-info li:nth-child(2) { animation-delay: 0.4s; }
.auth-info li:nth-child(3) { animation-delay: 0.5s; }
.auth-info li:nth-child(4) { animation-delay: 0.6s; }

/* Input focus glow */
.form-group input:focus {
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}
