:root {
  --cyan: #00FFEF;
  --cyan-dim: #00c8ba;
  --cyan-glow: rgba(0,255,239,0.12);
  --blue: #1A00FF;
  --black: #000000;
  --surface: #080808;
  --surface2: #0f0f0f;
  --border: rgba(0,255,239,0.12);
  --border-hover: rgba(0,255,239,0.4);
  --text: #e8f8f7;
  --text-muted: rgba(232,248,247,0.45);
  --font-display: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-display);
  min-height: 100vh;
  /* Défilable + centrage vertical */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Grille de fond */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,239,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,239,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Lueurs ambiantes */
.glow-top {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 360px;
  background: radial-gradient(ellipse, rgba(0,255,239,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: breathe 6s ease-in-out infinite;
}

.glow-bottom {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(26,0,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

@keyframes scanline {
  0%   { top: -2px; }
  100% { top: 100%; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CARTE ─── */
.card-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px 40px;
  position: relative;
  overflow: hidden;
}

/* Ligne cyan en haut */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--cyan) 40%, var(--cyan) 60%, transparent 100%);
  opacity: 0.6;
}

/* Scanline animée */
.auth-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,239,0.15), transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}

/* ─── LOGO ─── */
.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  animation: fadeUp 0.5s 0.1s ease both;
}

.logo-icon {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(0,255,239,0.5));
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cyan);
}

.logo-name em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.2em;
  font-size: 11px;
}

/* ─── TITRE ─── */
.title-block {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeUp 0.5s 0.15s ease both;
}

.title-block h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.title-block p {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

/* ─── FORMULAIRE ─── */
.form-group {
  margin-bottom: 22px;
  animation: fadeUp 0.5s 0.2s ease both;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  outline: none;
  /* Suppression du style natif navigateur sans -webkit-appearance */
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input::placeholder {
  color: rgba(232,248,247,0.2);
  font-size: 14px;
}

.form-input:hover {
  border-color: rgba(0,255,239,0.25);
  background: #111;
}

.form-input:focus {
  border-color: var(--cyan-dim);
  background: #0a0a0a;
  box-shadow: 0 0 0 3px rgba(0,255,239,0.07), 0 0 16px rgba(0,255,239,0.08);
}

/* Barre accent gauche au focus */
.input-wrap::after {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--cyan);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.input-wrap:focus-within::after {
  opacity: 1;
}

.input-wrap:focus-within .form-input {
  padding-left: 18px;
}

/* ─── MOT DE PASSE OUBLIÉ ─── */
.forgot {
  text-align: right;
  margin-top: 8px;
}

.forgot a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.forgot a:hover {
  color: var(--cyan);
}

/* ─── BOUTON ŒIL ─── */
.input-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.input-eye:hover { color: var(--cyan); }

.form-input.has-eye { padding-right: 44px; }

/* ─── BOUTONS ─── */
.button-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  animation: fadeUp 0.5s 0.3s ease both;
}

.btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: transparent;
  color: var(--cyan-dim);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--cyan);
  background: var(--cyan-glow);
}

.btn-primary {
  background: var(--cyan);
  color: #000;
  padding: 12px 32px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}

.btn-primary:hover::before { background: rgba(255,255,255,0.1); }
.btn-primary:active { transform: scale(0.98); }

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.success {
  box-shadow: 0 0 20px rgba(0,255,239,0.4);
}

/* ─── SÉPARATEUR ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  animation: fadeUp 0.5s 0.35s ease both;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ─── CONNEXION SOCIALE ─── */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.5s 0.4s ease both;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-social:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--cyan-glow);
  transform: translateY(-1px);
}

.btn-social:active { transform: scale(0.98); }

/* ─── PIED DE CARTE ─── */
.card-footer {
  text-align: center;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  animation: fadeUp 0.5s 0.45s ease both;
}

.card-footer a {
  color: var(--cyan-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.card-footer a:hover { color: var(--cyan); }

/* ─── LIEN RETOUR ─── */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s;
  animation: fadeUp 0.5s 0.5s ease both;
}

.back-link:hover { color: var(--cyan); }

.back-link svg { transition: transform 0.15s; }
.back-link:hover svg { transform: translateX(-3px); }

/* ─── ERREURS ─── */
.form-error {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #ff4e4e;
  margin-top: 6px;
  display: none;
}

.form-group.has-error .form-input {
  border-color: rgba(255,78,78,0.5);
}

.form-group.has-error .form-error {
  display: block;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
  .auth-card { padding: 36px 24px 28px; }
  .button-group { flex-direction: column-reverse; }
  .btn-secondary, .btn-primary { width: 100%; text-align: center; }
}

/* SCROLL BAR */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,255,239,0.2);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,255,239,0.5);
}