/**
 * Connexion AVASAN — République du Mali
 * Logo : public/images/avasan.png
 * Vert #14B53A · Or #FCD116 · Rouge #CE1126
 */
:root {
  --av-green: #14B53A;
  --av-green-mid: #0E8A2C;
  --av-green-deep: #0B5C24;
  --av-ink: #062814;
  --av-gold: #FCD116;
  --av-gold-soft: #FFE27A;
  --av-red: #CE1126;
  --av-cream: #FFF8EE;
  --av-muted: #6B5A44;
  --av-line: #E6D8C2;
  --av-night: #04180C;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-av {
  min-height: 100vh;
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  color: #1A140C;
  background: var(--av-night);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
  overflow-x: hidden;
}

.auth-av__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    152deg,
    #04180C 0%,
    #0B5C24 38%,
    #147A2E 68%,
    #7A6A12 100%
  );
}

.auth-av__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
}

.auth-av__orb--gold {
  width: min(72vw, 540px);
  height: min(72vw, 540px);
  top: -16%;
  right: -12%;
  background: rgba(252, 209, 22, 0.38);
}

.auth-av__orb--green {
  width: min(64vw, 460px);
  height: min(64vw, 460px);
  bottom: -18%;
  left: -10%;
  background: rgba(20, 181, 58, 0.34);
}

.auth-av__orb--red {
  width: min(40vw, 280px);
  height: min(40vw, 280px);
  bottom: 12%;
  right: 8%;
  background: rgba(206, 17, 38, 0.18);
}

.auth-av__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at center, #000 32%, transparent 78%);
}

.auth-av__stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  display: flex;
}

.auth-av__stripe i {
  flex: 1;
  display: block;
}

.auth-av__stripe i:nth-child(1) { background: var(--av-green); }
.auth-av__stripe i:nth-child(2) { background: var(--av-gold); }
.auth-av__stripe i:nth-child(3) { background: var(--av-red); }

.auth-av__shell {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(14px);
  animation: auth-av-in 0.55s ease-out both;
}

@keyframes auth-av-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-av__brand {
  padding: 52px 40px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(4, 24, 12, 0.28), rgba(11, 92, 36, 0.12));
}

.auth-av__seal {
  width: 196px;
  height: 196px;
  padding: 8px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 210deg,
      var(--av-green),
      var(--av-gold),
      var(--av-red),
      var(--av-green)
    );
  box-shadow:
    0 18px 40px rgba(0, 20, 8, 0.35),
    0 0 0 8px rgba(252, 209, 22, 0.22),
    0 0 42px rgba(252, 209, 22, 0.28);
  animation: auth-av-seal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.auth-av__seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

@keyframes auth-av-seal {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.auth-av__republic {
  margin: 22px 0 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--av-gold-soft);
}

.auth-av__motto {
  margin: 8px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(180, 245, 188, 0.92);
}

.auth-av__wordmark {
  margin: 10px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.auth-av__tagline {
  margin: 14px 0 0;
  max-width: 20.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.auth-av__ministry {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(252, 209, 22, 0.28);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7);
}

.auth-av__panel {
  background: var(--av-cream);
  padding: 44px 40px 28px;
  display: flex;
  flex-direction: column;
}

.auth-av__panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-av__panel-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(11, 92, 36, 0.16);
  border: 2px solid rgba(252, 209, 22, 0.55);
}

.auth-av__card-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--av-green-deep);
}

.auth-av__panel-head h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--av-ink);
  line-height: 1.05;
}

.auth-av__panel-head p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--av-muted);
}

.auth-av__form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-av__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 0.95rem;
}

.auth-av__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--av-ink);
}

.auth-av__control {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 0.35rem 0 0.15rem;
  border: 1.5px solid var(--av-line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-av__control > i {
  width: 44px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--av-green-deep);
  font-size: 1.12rem;
  flex-shrink: 0;
}

.auth-av__control input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1A140C;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 0.85rem 0.35rem;
  outline: none;
}

.auth-av__control input::placeholder {
  color: #B39B7E;
  font-weight: 500;
}

.auth-av__control:focus-within {
  border-color: var(--av-green);
  box-shadow: 0 0 0 4px rgba(20, 181, 58, 0.16);
}

.auth-av__control.is-invalid {
  border-color: var(--av-red);
  box-shadow: 0 0 0 4px rgba(206, 17, 38, 0.12);
}

.auth-av__toggle {
  border: 0;
  background: transparent;
  color: #8A7760;
  width: 44px;
  height: 52px;
  cursor: pointer;
  font-size: 1.12rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-av__toggle:hover {
  color: var(--av-green-deep);
}

.auth-av__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 1.15rem;
}

.auth-av__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--av-muted);
  cursor: pointer;
  user-select: none;
}

.auth-av__remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--av-green);
}

.auth-av__link {
  color: var(--av-green-deep);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-av__link:hover {
  color: var(--av-ink);
  text-decoration: underline;
}

.auth-av__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--av-green) 0%, var(--av-green-deep) 100%);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(11, 92, 36, 0.32);
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

a.auth-av__submit {
  text-decoration: none;
}

.auth-av__submit i {
  color: var(--av-gold);
  font-size: 1.2rem;
}

.auth-av__expired {
  margin: 0.35rem 0 1.35rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(252, 209, 22, 0.16), rgba(255, 248, 238, 0.9));
  border: 1px solid rgba(252, 209, 22, 0.45);
}

.auth-av__expired-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.auth-av__expired-mark i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--av-green-deep);
  color: var(--av-gold);
  font-size: 1.45rem;
  box-shadow: 0 8px 16px rgba(11, 92, 36, 0.22);
}

.auth-av__expired-mark span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--av-green-deep);
}

.auth-av__expired-lead {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--av-ink);
}

.auth-av__expired-note {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--av-muted);
}

.auth-av__submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 28px rgba(11, 92, 36, 0.4);
}

.auth-av__submit:active {
  transform: translateY(1px);
}

.auth-av__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-av__alert p {
  margin: 0;
}

.auth-av__alert--error {
  background: rgba(206, 17, 38, 0.08);
  border: 1px solid rgba(206, 17, 38, 0.22);
  color: #9B1218;
}

.auth-av__alert--info {
  background: rgba(20, 181, 58, 0.1);
  border: 1px solid rgba(20, 181, 58, 0.22);
  color: var(--av-green-deep);
}

.auth-av__invalid {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: var(--av-red);
}

.auth-av__footer {
  margin-top: auto;
  padding-top: 22px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(107, 90, 68, 0.78);
}

@media (max-width: 860px) {
  body.auth-av {
    padding: 16px 14px;
    align-items: flex-start;
  }

  .auth-av__shell {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .auth-av__brand {
    padding: 32px 24px 24px;
  }

  .auth-av__seal {
    width: 148px;
    height: 148px;
  }

  .auth-av__wordmark {
    font-size: 2.35rem;
  }

  .auth-av__tagline,
  .auth-av__ministry {
    max-width: none;
  }

  .auth-av__panel {
    padding: 28px 22px 22px;
  }
}

@media (max-width: 420px) {
  .auth-av__brand {
    padding: 26px 18px 18px;
  }

  .auth-av__panel {
    padding: 22px 16px 18px;
  }

  .auth-av__seal {
    width: 128px;
    height: 128px;
  }
}
