/* ─── MSN Messenger 2.0 — Page de Connexion ────────────────────────────────── */

/* ─── Background animé ──────────────────────────────────────────────────────── */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 20%, rgba(0, 120, 212, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 0%, rgba(255, 149, 0, 0.08) 0%, transparent 40%),
              linear-gradient(160deg, #0a0e1a 0%, #0f1629 40%, #080d18 100%);
}

.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ─── Papillons ──────────────────────────────────────────────────────────────── */
.butterflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.butterfly-float {
  position: absolute;
  font-size: 20px;
  animation: butterflyFly linear infinite;
  opacity: 0.15;
  filter: hue-rotate(var(--hue, 0deg));
}

@keyframes butterflyFly {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.8); }
  25% { transform: translate(30px, -40px) rotate(10deg) scale(1); }
  50% { transform: translate(-20px, -80px) rotate(-5deg) scale(0.9); }
  75% { transform: translate(10px, -120px) rotate(8deg) scale(1.1); }
  100% { transform: translate(0, -160px) rotate(0deg) scale(0.8); opacity: 0; }
}

/* ─── Container principal ────────────────────────────────────────────────────── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeIn 0.6s ease;
}

/* ─── Header MSN ─────────────────────────────────────────────────────────────── */
.msn-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.msn-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.butterfly-logo {
  width: 64px;
  height: 64px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 149, 0, 0.5));
}

.butterfly-logo svg {
  width: 100%;
  height: 100%;
}

.msn-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.msn-text {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #0078d4, #00b4d8, #0078d4);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  line-height: 1;
  letter-spacing: -1px;
}

.messenger-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.version-badge {
  background: var(--gradient-orange);
  color: #1a1a2e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  align-self: flex-start;
}

.msn-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ─── Card de connexion ──────────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  background: rgba(15, 22, 41, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: scaleIn 0.4s var(--transition-bounce);
  transition: transform 0.3s ease;
}

.login-card:hover {
  transform: translateY(-2px);
}

/* ─── Tabs ──────────────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  letter-spacing: 0.3px;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-msn);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.tab-btn:hover { color: var(--text-primary); background: var(--bg-glass); }
.tab-btn.active { color: var(--msn-blue-light); }
.tab-btn.active::after { transform: scaleX(1); }

/* ─── Formulaires ────────────────────────────────────────────────────────────── */
.auth-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.3s ease;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label-icon { font-size: 14px; }

.input-password-wrap {
  position: relative;
}

.input-password-wrap input {
  padding-right: 42px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.toggle-pw:hover { opacity: 1; }

/* ─── Password strength ──────────────────────────────────────────────────────── */
.password-strength {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  margin-top: 4px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.password-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: var(--transition-smooth);
  width: var(--strength, 0%);
  background: var(--strength-color, #ff4444);
}

/* ─── Form options (checkboxes) ──────────────────────────────────────────────── */
.form-options {
  display: flex;
  gap: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  width: 16px;
  height: 16px;
  accent-color: var(--msn-blue);
  cursor: pointer;
}

/* ─── Card Footer ────────────────────────────────────────────────────────────── */
.card-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.2);
}

.security-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Page Footer ────────────────────────────────────────────────────────────── */
.page-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.footer-sub { font-size: 11px; opacity: 0.7; }
