/* ==========================================================================
   VENSA - Plateforme projet : page de connexion
   ========================================================================== */

:root {
  --ink:          #14161a;
  --ink-deep:     #0f1114;
  --surface:      #1c1f24;
  --surface-2:    #23262b;
  --surface-3:    #2c3037;
  --line:         rgba(255, 255, 255, .08);
  --line-strong:  rgba(255, 255, 255, .16);
  --gold:         #c9a227;
  --gold-bright:  #e5c55f;
  --gold-line:    rgba(201, 162, 39, .30);
  --gold-soft:    rgba(201, 162, 39, .10);
  --gold-glow:    rgba(201, 162, 39, .22);
  --text:         #efede7;
  --text-muted:   #a2a7ae;
  --text-faint:   #71767e;
  --danger:       #cc6a63;
  --font-ui:      'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 3px; }

.login {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 20px;
  overflow: hidden;
}

/* Halo dore en arriere-plan */
.login__glow {
  position: absolute;
  top: -18%;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 145vw);
  height: min(860px, 145vw);
  background: radial-gradient(circle, rgba(201, 162, 39, .13) 0%, rgba(201, 162, 39, .045) 38%, transparent 68%);
  pointer-events: none;
}

.login__card {
  position: relative;
  width: 100%;
  max-width: 424px;
  background: linear-gradient(180deg, rgba(201, 162, 39, .05), transparent 30%), var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: 18px;
  padding: 30px 34px 26px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .62);
  text-align: center;
}

.login__langs { display: flex; justify-content: center; margin-bottom: 24px; }

.langswitch {
  display: inline-flex;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  gap: 1px;
}

.langswitch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 4px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.langswitch button:hover { color: var(--text); }
.langswitch button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }

.login__logo {
  width: 196px;
  height: auto;
  margin: 0 auto 22px;
}

.login__kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .21em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 9px;
}

.login__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.24;
  margin: 0 0 8px;
  letter-spacing: -.008em;
}

.login__sub {
  font-size: 13.2px;
  color: var(--text-muted);
  margin: 0 0 26px;
  line-height: 1.58;
}

.login__form { text-align: left; }

.lfield { margin-bottom: 15px; }

.lfield__label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.lfield__wrap { position: relative; }

.lfield__input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.lfield__wrap .lfield__input { padding-right: 44px; }

.lfield__input:hover { border-color: rgba(255, 255, 255, .26); }

.lfield__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: var(--ink-deep);
}

.lfield__eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-faint);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .14s, background .14s;
}

.lfield__eye:hover { color: var(--gold-bright); background: var(--surface-3); }

.login__error {
  margin: 0 0 14px;
  padding: 9px 13px;
  background: rgba(204, 106, 99, .13);
  border: 1px solid rgba(204, 106, 99, .34);
  border-radius: 8px;
  color: #e08d86;
  font-size: 12.8px;
  line-height: 1.5;
}

.login__submit {
  width: 100%;
  appearance: none;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 9px;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background .15s, border-color .15s, transform .07s;
}

.login__submit:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.login__submit:active { transform: translateY(1px); }
.login__submit[disabled] { opacity: .6; cursor: progress; }

.login__spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(20, 22, 26, .3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login__note {
  font-size: 11.4px;
  line-height: 1.55;
  color: var(--text-faint);
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.login__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.login__foot-label {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.login__foot-logo { height: 22px; width: auto; opacity: .92; }

.login__local {
  margin: 14px 0 0;
  padding: 9px 13px;
  background: rgba(91, 147, 196, .10);
  border: 1px solid rgba(91, 147, 196, .26);
  border-radius: 8px;
  color: #8fb8dc;
  font-size: 11.8px;
  line-height: 1.5;
  text-align: left;
}

@media (max-width: 460px) {
  .login__card { padding: 24px 20px 20px; border-radius: 14px; }
  .login__logo { width: 164px; }
  .login__title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
