/* Login page: dark navy with gold waves in both themes (design "E · C sur fond sombre"),
   and the account menu opened from the initials in the top bar. */

#login {
  height: 100%;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0a1230;
  color: #fff;
  color-scheme: dark;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
}
#login[hidden] {
  display: none !important;
}
#login *,
#login *::before,
#login *::after {
  box-sizing: border-box;
}
#login .lg-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}

/* header: logo, language */
#login .lg-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 32px;
}
#login .logo {
  font-size: 18px;
}
#login .logo small {
  font-size: 8px;
}
#login .lg-head .cseg {
  margin-left: auto;
}

/* the form, centred */
#login .lg-main {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
}
#login .lg-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
#login .lg-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  text-align: center;
}
#login h1 {
  margin: 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 64px;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
/* fields */
#login label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
#login .lg-lab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}
#login .lg-lab label {
  margin-bottom: 0;
}
#login input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  background: #131d42;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
}
#login input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}
#login input:focus {
  outline: 2px solid #fff;
  outline-offset: 0;
}
/* the browser's autofill keeps the field's colours */
#login input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #131d42 inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}
#login input[aria-invalid="true"],
#login .lg-pw:has(input[aria-invalid="true"]) {
  border-color: #f27a6a;
}
/* password and its show / hide button share one frame */
#login .lg-pw {
  display: flex;
  background: #131d42;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
#login .lg-pw:focus-within {
  outline: 2px solid #fff;
}
#login .lg-pw input {
  flex: 1;
  min-width: 0;
  height: 44px;
  background: transparent;
  border: 0;
}
#login .lg-pw input:focus {
  outline: none;
}
#login .lg-pw button {
  min-width: 82px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
#login .lg-pw button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
#login .lg-forgot {
  padding: 0;
  background: none;
  border: 0;
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#login .lg-forgot:hover {
  color: #fcc419;
}

/* message: error in the concern colour, information (link sent, session expired) in gold */
#login .lg-msg {
  margin-top: -6px;
  padding: 10px 12px;
  border-left: 3px solid;
  font-size: 13.5px;
  line-height: 1.45;
}
#login .lg-msg[hidden] {
  display: none;
}
#login .lg-msg.error {
  border-color: #f27a6a;
  background: rgba(242, 122, 106, 0.12);
}
#login .lg-msg.info {
  border-color: #fcc419;
  background: rgba(252, 196, 25, 0.1);
}

/* buttons */
#login .lg-submit {
  font-family: var(--mono);
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
  height: 48px;
  background: #fff;
  color: #0a1230;
  border: 1px solid #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}
#login .lg-submit:hover:not(:disabled) {
  background: #fcc419;
  border-color: #fcc419;
}
#login button:disabled {
  opacity: 0.6;
  cursor: progress;
}
#login button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#login .lg-pw button:focus-visible {
  outline-offset: -2px;
}

#login .lg-foot {
  position: relative;
  flex: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 18px 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 480px) {
  #login .lg-head {
    padding: 16px;
  }
  #login .lg-main {
    padding: 8px 16px 32px;
  }
  #login h1 {
    font-size: 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #login .lg-submit {
    transition: none;
  }
}

/* ---------- account menu: under the initials of the top bar ---------- */
.umenu {
  position: fixed;
  z-index: 55;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}
.umenu[hidden] {
  display: none;
}
.umenu .um-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.umenu .um-who b {
  font-weight: 600;
  font-size: 13.5px;
}
.umenu .um-who b[hidden] {
  display: none;
}
.umenu .um-who span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink2);
  overflow-wrap: anywhere;
}
.umenu button {
  display: block;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.umenu button:hover {
  background: var(--hl2);
}
.umenu button:focus-visible {
  outline-offset: -2px;
}
