@charset "UTF-8";

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

body {
  min-height: 100vh;
  background: #07111f;
  color: #f8fafc;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,0.16) 0%, transparent 70%);
  filter: blur(60px);
  top: -200px; left: -200px;
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  filter: blur(70px);
  bottom: -150px; right: -150px;
  animation: drift 14s ease-in-out infinite alternate-reverse;
  pointer-events: none; z-index: 0;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(50px,40px) scale(1.1); }
}

/* -- Nav -- */
.topnav {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(7,17,31,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  z-index: 10;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #99f6e4;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 1rem;
  border-radius: 2rem;
  border: 1px solid rgba(45,212,191,0.35);
  background: rgba(13,148,136,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.01em;
  transition: color 0.2s, border-color 0.2s, background 0.2s,
              transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
}
.back-btn:hover {
  color: #ccfbf1;
  border-color: rgba(45,212,191,0.6);
  background: rgba(13,148,136,0.16);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateX(-4px);
}

.nav-brand {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.02em; color: #f8fafc;
}
.nav-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(13,148,136,0.5)); }

/* -- Page -- */
.page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2.5rem 1rem;
  position: relative;
  z-index: 1;
}

/* -- Carte glass -- */
.box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 1.5rem;
  padding: 2.75rem 2.25rem;
  width: 100%;
  max-width: 560px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 32px 80px rgba(0,0,0,0.5);
  animation: fadeUp 0.6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -- Icone -- */
.logo {
  text-align: center;
  margin-bottom: 0.75rem;
}
.logo-img {
  width: 72px; height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(13,148,136,0.5)) brightness(1.1);
  animation: float 5s ease-in-out infinite;
  border-radius: 50%;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

h1 {
  font-size: 1.9rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, #fff 0%, #99f6e4 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  text-align: center;
  color: #f1f5f9;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

/* Info box */
.info-box {
  background: rgba(13,148,136,0.08);
  border: 1px solid rgba(13,148,136,0.2);
  border-radius: 0.65rem;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  color: #99f6e4;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* -- Form -- */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.4rem;
}

input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f8fafc;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder { color: #64748b; }
input:focus {
  border-color: rgba(45,212,191,0.5);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}

.password-wrap { position: relative; }
.toggle-pw {
  position: absolute;
  right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: #f1f5f9; cursor: pointer;
  font-size: 1rem; padding: 0; line-height: 1;
  transition: color 0.2s;
}
.toggle-pw:hover { color: #e2e8f0; }

/* Barre de force */
.strength-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  margin-top: 0.5rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.3s, background 0.3s;
}
.strength-label {
  font-size: 0.72rem;
  margin-top: 0.25rem;
  color: #f1f5f9;
}

/* Erreur */
.error-box {
  background: rgba(127,29,29,0.25);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 0.6rem;
  padding: 0.65rem 1rem;
  color: #fca5a5;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  display: none;
}

/* -- Boutons -- */
.btn-primary {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #0d9488 0%, #0369a1 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,148,136,0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  margin-top: 0.5rem;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 60%);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(3,105,161,0.5);
  filter: brightness(1.07);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
  color: #f1f5f9;
  font-size: 0.78rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-login {
  display: block;
  width: 100%;
  padding: 0.8rem;
  background: rgba(255,255,255,0.04);
  color: #99f6e4;
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-login:hover {
  background: rgba(13,148,136,0.1);
  border-color: rgba(45,212,191,0.45);
  color: #ccfbf1;
  transform: translateY(-1px);
}

/* ------------------------------
   RESPONSIVE - MOBILE
------------------------------ */
@media (max-width: 440px) {
  .nav-brand { display: none; }
  .box { padding: 2rem 1.25rem; border-radius: 1.25rem; }
  h1 { font-size: 1.4rem; }
}

@media (max-width: 340px) {
  .back-btn span { display: none; }
  .box { padding: 1.75rem 1rem; }
}
