/* Écran de connexion (variante A, 21 oct. 2026) : la carte floutée derrière. */
.tm-login {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(250, 251, 253, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-sans, 'Geist', system-ui, sans-serif);
}
.tm-login[hidden] {
  display: none;
}
html.tm-login-open body > :not(.tm-login) {
  pointer-events: none;
  user-select: none;
}
.tm-login-card {
  width: min(380px, 100%);
  padding: 28px 28px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e1e7f2;
  box-shadow: 0 30px 60px -24px rgba(14, 31, 69, 0.5);
  color: #0e1f45;
}
.tm-login-card.is-sent {
  text-align: center;
}
.tm-login-brand {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.tm-login-logo {
  display: block;
  height: 34px;
  width: auto;
}
.tm-login-logo.is-dark {
  display: none;
}
html[data-theme='dark'] .tm-login-logo.is-light {
  display: none;
}
html[data-theme='dark'] .tm-login-logo.is-dark {
  display: block;
}
.tm-login-card h2 {
  margin: 0 0 6px;
  font-size: var(--type-h2-size);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}
.tm-login-lead {
  margin: 0 0 18px;
  color: #5b6478;
  font-size: var(--type-body-sm-size);
  line-height: 1.45;
}
.tm-login-lead b {
  color: #0e1f45;
  font-weight: var(--weight-semibold);
}
.tm-login-alert {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdf1e3;
  color: #8a4d06;
  font-size: var(--type-label-size);
  line-height: 1.4;
}
.tm-login-form {
  display: grid;
  gap: 10px;
}
.tm-login-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.tm-login-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #fff;
  color: #0e1f45;
  font: inherit;
  font-size: var(--type-body-size);
}
.tm-login-form input:focus {
  outline: none;
  border-color: #2f63d6;
  box-shadow: 0 0 0 3px rgba(47, 99, 214, 0.18);
}
.tm-login-submit {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #2f63d6;
  color: #fff;
  font: inherit;
  font-size: var(--type-body-size);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.tm-login-submit:hover {
  background: #1f4fbf;
}
.tm-login-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}
.tm-login-error {
  margin: 0;
  color: #8f2942;
  font-size: var(--type-label-size);
}
.tm-login-small {
  margin: 16px 0 0;
  color: #8a94a8;
  font-size: var(--type-label-size);
  line-height: 1.4;
}
.tm-login-small a,
.tm-login-link {
  color: #2f63d6;
  text-decoration: none;
  font-weight: var(--weight-medium);
}
.tm-login-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.tm-login-link:disabled {
  color: #8a94a8;
  cursor: default;
}
.tm-login-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: #eaf1fd;
  color: #2f63d6;
}

/* Mode sombre */
html[data-theme='dark'] .tm-login {
  background: rgba(7, 15, 38, 0.55);
}
html[data-theme='dark'] .tm-login-card {
  background: #101c3d;
  border-color: #253a66;
  color: #eef2fa;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
html[data-theme='dark'] .tm-login-lead {
  color: #a9b8d6;
}
html[data-theme='dark'] .tm-login-lead b {
  color: #fff;
}
html[data-theme='dark'] .tm-login-form input {
  background: #1a2a55;
  border-color: #4a64a0;
  color: #f4f7fd;
}
html[data-theme='dark'] .tm-login-form input:focus {
  border-color: #3fd3e2;
  box-shadow: 0 0 0 3px rgba(63, 211, 226, 0.2);
}
html[data-theme='dark'] .tm-login-submit {
  background: #3fd3e2;
  color: #05112b;
}
html[data-theme='dark'] .tm-login-small {
  color: #a9b8d6;
}
html[data-theme='dark'] .tm-login-small a,
html[data-theme='dark'] .tm-login-link {
  color: #3fd3e2;
}
html[data-theme='dark'] .tm-login-icon {
  background: rgba(63, 211, 226, 0.15);
  color: #3fd3e2;
}
html[data-theme='dark'] .tm-login-alert {
  background: rgba(231, 163, 62, 0.15);
  color: #f3c27a;
}
