/* Page de connexion Skan — mêmes couleurs et typographie que l'application. */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --red: #dc2626;
  --font: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: #f8fafc;
  min-height: 100vh;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

/* --- Colonne de gauche : présentation --- */
.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px;
  color: #fff;
  background: linear-gradient(150deg, #0b1b3f 0%, #12306e 48%, #1d4ed8 100%);
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.45), transparent 65%);
  filter: blur(10px);
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-80px, 60px); }
}

.hero-content { position: relative; max-width: 460px; }

.hero-avatar { position: relative; width: 84px; height: 84px; margin-bottom: 28px; }

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

.hero-status {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid #12306e;
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 32px;
}

.hero-points { list-style: none; display: grid; gap: 14px; }

.hero-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: #dbeafe;
}

.hero-points .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

/* --- Colonne de droite : formulaire --- */
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  animation: rise 0.5s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.card-brand { display: none; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 20px; }
.card-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.login-card h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.card-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 28px; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span:first-child { font-size: 0.88rem; font-weight: 600; color: var(--text-body); }

.field input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-dark);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 92px; }

.toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.toggle-pw:hover { background: #eff6ff; }

.login-error {
  font-size: 0.9rem;
  color: var(--red);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.login-btn {
  position: relative;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.login-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.login-btn:disabled { cursor: wait; opacity: 0.85; transform: none; }

.btn-spinner {
  display: none;
  position: absolute;
  right: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-btn.loading .btn-spinner { display: block; }

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

.card-foot { margin-top: 22px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .card-brand { display: flex; }
  .login-card { padding: 32px 24px; }
}
