/* ============================================
   CoCo Dakar 2026 — Login Screen
   ============================================ */

.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a2744 0%, #253561 60%, #1e3a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 2.5rem 2.2rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  text-align: center;
  animation: loginFadeIn .4s ease;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Logos */
.login-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.login-logos img {
  object-fit: contain;
  border-radius: 50%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.login-logos img:nth-child(1) { height: 48px; width: 48px; padding: 3px; }
.login-logos img:nth-child(2) { height: 64px; width: auto; border-radius: 8px; padding: 4px; }
.login-logos img:nth-child(3) { height: 48px; width: 48px; padding: 3px; }

/* Titre */
.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2744;
  margin-bottom: .3rem;
}
.login-sub {
  font-size: .85rem;
  color: #9ca3af;
  margin-bottom: 1.8rem;
}

/* Champ */
.login-field {
  margin-bottom: 1.2rem;
  text-align: left;
}
.login-field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .45rem;
}
.login-field label i {
  color: #c8a96e;
  margin-right: .35rem;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-wrap input {
  width: 100%;
  padding: .75rem 3rem .75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: #1f2937;
  background: #f9fafb;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.login-input-wrap input:focus {
  border-color: #c8a96e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,169,110,.18);
}
.login-input-wrap input.shake {
  animation: shake .4s ease;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.toggle-pw {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: .9rem;
  padding: .2rem;
  transition: color .2s;
}
.toggle-pw:hover { color: #c8a96e; }

/* Message d'erreur */
.login-error {
  display: none;
  margin-top: .5rem;
  padding: .5rem .8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: .82rem;
  font-weight: 500;
}
.login-error.visible { display: flex; align-items: center; gap: .4rem; }

/* Bouton connexion */
.login-btn {
  width: 100%;
  padding: .85rem;
  background: linear-gradient(135deg, #c8a96e, #a8894e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(200,169,110,.4);
  margin-bottom: 1rem;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,169,110,.5); }
.login-btn:active { transform: translateY(0); }

/* Lien retour */
.login-back {
  font-size: .82rem;
  color: #9ca3af;
}
.login-back a {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.login-back a:hover { color: #1a2744; }
.login-back a i { margin-right: .3rem; }

/* Masquer le dashboard quand non connecté */
.dashboard-hidden {
  display: none !important;
}
