* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f0f2f5;
}
.login-card {
  display: flex;
  width: 640px;
  max-width: 95vw;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  border-radius: 4px;
  overflow: hidden;
}
.brand {
  background: #4DB6AC;
  width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.brand-text {
  color: #8B3A1F;
  font-weight: 800;
  font-size: 22px;
  text-align: center;
  line-height: 1.2;
}
.form-side { flex: 1; padding: 24px 28px; }
.hidden { display: none !important; }

/* Sélecteur de langue FR / EN */
.lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 8px; }
.lang-switch .lang-btn {
  border: 1px solid #4DB6AC; background: #fff; color: #4DB6AC;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; cursor: pointer;
}
.lang-switch .lang-btn.active { background: #4DB6AC; color: #fff; }

/* Onglets Espace administrateur / Espace client */
.space-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.space-tab {
  flex: 1; border: 1px solid #4DB6AC; background: #fff; color: #4DB6AC;
  padding: 8px 6px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 4px;
}
.space-tab:hover { background: #e8f6f4; }
.space-tab.active { background: #4DB6AC; color: #fff; }
.title {
  color: #4DB6AC;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: 1px;
}
.field {
  border: 1px solid #4DB6AC;
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 14px;
  position: relative;
}
.field label {
  position: absolute;
  top: -9px;
  left: 10px;
  background: #fff;
  padding: 0 6px;
  font-size: 12px;
  color: #4DB6AC;
}
.field input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 4px;
  font-size: 15px;
  font-style: italic;
  color: #666;
}
/* Champ mot de passe avec bouton oeil */
.field-password input { padding-right: 34px; }
.toggle-password {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: #4DB6AC;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-password:hover { color: #8B3A1F; }
.toggle-password .eye-closed { display: none; }
.toggle-password.showing .eye-open { display: none; }
.toggle-password.showing .eye-closed { display: block; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  font-size: 13px;
}
.remember { color: #444; display: flex; gap: 6px; align-items: center; }
.forgot { color: #8B3A1F; text-decoration: none; font-weight: 600; }
.forgot:hover { text-decoration: underline; }
.actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn {
  border: 0;
  padding: 9px 28px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
}
.btn-cancel { background: #4a4a4a; }
.btn-submit { background: #8B3A1F; }
.btn-cancel:hover { background: #333; }
.btn-submit:hover { background: #6e2d18; }
.message { font-size: 13px; margin-bottom: 8px; min-height: 18px; }
.message.error { color: #c0392b; }
.message.success { color: #27ae60; }

/* ─── Comptes récents (reconnexion en 1 clic) ─── */
.accounts-hint { color: #666; font-size: 13px; margin: 0 0 14px; }
.accounts-list { display: flex; flex-direction: column; gap: 8px; }
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  transition: background .12s, border-color .12s;
}
.account:hover { background: #e8f6f4; border-color: #4DB6AC; }
.account:disabled { opacity: .55; cursor: default; }
.account-avatar {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 50%;
  background: #4DB6AC;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-avatar.client { background: #8B3A1F; }
.account-info { flex: 1; min-width: 0; }
.account-name { font-weight: 600; color: #222; font-size: 14px; }
.account-sub {
  color: #777;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-remove {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: #aaa;
  font-size: 17px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 2px;
}
.account-remove:hover { color: #c0392b; background: #f6e7e4; }
.link-btn {
  margin-top: 14px;
  border: 0;
  background: none;
  color: #8B3A1F;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }
