/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE — Design moderne, split-screen, brand Cysteam
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --brand:       #3a3f47;
  --brand-dark:  #1f2328;
  --brand-light: #7a8390;
  --accent:      #5a6470;
}

body.login-body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  height: 100vh;
  overflow: hidden;
  background: #eceef0;
}

/* ── Layout principal ────────────────────────────────────── */
.login-page {
  display: flex;
  height: 100vh;
}

/* ── Panneau gauche : branding ───────────────────────────── */
.login-brand {
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(160deg, #0d0f11 0%, #1a1d21 45%, #252a30 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 3.5rem;
}

/* Décorations géométriques */
.brand-deco {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
  pointer-events: none;
}
.brand-deco--1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--brand-light), transparent 70%);
  top: -120px; right: -120px;
}
.brand-deco--2 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  bottom: -60px; left: -60px;
  opacity: .1;
}
.brand-deco--3 {
  width: 160px; height: 160px;
  border: 2px solid var(--brand-light);
  bottom: 120px; right: 60px;
  opacity: .08;
  border-radius: 50%;
}

.brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 340px;
}

/* Logo */
.brand-logo-wrap {
  width: 160px; height: 160px;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.6rem;
  backdrop-filter: blur(4px);
}

.brand-logo-img {
  width: 126px; height: 126px;
  object-fit: contain;
  filter: brightness(1.1);
}

.brand-name {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  margin-bottom: .3rem;
}

.brand-tagline {
  font-size: .85rem;
  font-weight: 500;
  color: var(--brand-light);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: .8;
}

/* Features list */
.brand-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255,255,255,.72);
  font-size: .88rem;
  font-weight: 400;
}

.brand-features li .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--brand-light);
  flex-shrink: 0;
  background: rgba(122,131,144,.15);
  padding: 5px;
  border-radius: 8px;
}

/* Footer bas */
.brand-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 0; right: 0;
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.25);
  letter-spacing: .04em;
}

/* ── Panneau droit : formulaire ──────────────────────────── */
.login-form-panel {
  flex: 1;
  background: #f4f5f6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.form-card {
  width: 100%;
  max-width: 420px;
  animation: fadeUp .45s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* En-tête formulaire */
.form-card__header { margin-bottom: 2rem; }

.form-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.04em;
  margin-bottom: .35rem;
}

.form-subtitle {
  font-size: .88rem;
  color: #64748b;
}

/* Messages d'alerte */
.form-messages { margin-bottom: 1.25rem; }

.form-alert {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .84rem;
  margin-bottom: .5rem;
}

.form-alert .material-symbols-outlined { font-size: 1.1rem; }

.form-alert--success {
  background: #d1fae5; color: #065f46;
}
.form-alert--error,
.form-alert--danger {
  background: #fee2e2; color: #991b1b;
}
.form-alert--warning {
  background: #fef3c7; color: #92400e;
}
.form-alert--info {
  background: #dbeafe; color: #1e40af;
}

/* Groupes de champs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #2c3138;
  margin-bottom: .5rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* Wrapper input avec icône */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #d4d8dc;
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(58,63,71,.12);
}

.input-icon {
  font-size: 1.1rem;
  color: #9aa0a8;
  padding: 0 0 0 1rem;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

.form-input {
  flex: 1;
  height: 50px;
  padding: 0 .9rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: .95rem;
  font-family: inherit;
  color: #0f172a;
}

.form-input::placeholder {
  color: #a8adb5;
}

/* Bouton toggle mot de passe */
.toggle-pass {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 .9rem;
  color: #9aa0a8;
  display: flex;
  align-items: center;
  transition: color .2s;
}

.toggle-pass:hover { color: var(--brand); }

.toggle-pass .material-symbols-outlined { font-size: 1.1rem; }

/* Lien mot de passe oublié */
.form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.75rem;
}

.form-link {
  font-size: .82rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .15s;
}

.form-link:hover { opacity: .7; text-decoration: underline; }

/* Bouton de connexion */
.btn-login {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  letter-spacing: .02em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 4px 18px rgba(31,35,40,.30);
  margin-bottom: 1.75rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(31,35,40,.40);
  filter: brightness(1.15);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(31,35,40,.25);
}

.btn-login .material-symbols-outlined { font-size: 1.1rem; }

/* Lien inscription */
.form-signup {
  text-align: center;
  font-size: .85rem;
  color: #64748b;
}

.form-link--accent {
  color: var(--brand);
  font-weight: 600;
  margin-left: .25rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  body.login-body { overflow: auto; }

  .login-page { flex-direction: column; height: auto; min-height: 100vh; }

  .login-brand {
    width: 100%;
    padding: 2.5rem 2rem;
  }

  .brand-features { display: none; }

  .brand-name { font-size: 1.8rem; }

  .login-form-panel { padding: 2rem 1.25rem 3rem; }
}
