* {
  box-sizing: border-box;
}

body.auth-page {
  --auth-ink: #12233f;
  --auth-muted: #63738a;
  --auth-accent: #1b9b70;
  --auth-border: #dce5ed;
  min-height: 100vh;
  margin: 0;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 10% 12%, rgba(32, 164, 120, 0.12), transparent 34%),
    radial-gradient(ellipse at 92% 84%, rgba(53, 117, 204, 0.1), transparent 30%),
    #f3f6fa;
  color: var(--auth-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.auth-layout {
  width: min(100%, 1020px);
  min-height: 620px;
  margin: auto;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border: 1px solid rgba(215, 225, 235, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(30, 50, 75, 0.14);
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(10, 28, 48, 0.82), rgba(15, 49, 75, 0.58)),
    url("../carousels/slide10.webp") center / cover no-repeat;
}

.auth-showcase::before,
.auth-showcase::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.auth-showcase::before {
  width: 390px;
  height: 390px;
  right: -210px;
  top: 90px;
}

.auth-showcase::after {
  width: 300px;
  height: 300px;
  right: -166px;
  top: 135px;
}

.auth-brand,
.auth-showcase-copy,
.auth-showcase-note {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.auth-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.auth-showcase-copy {
  max-width: 390px;
  padding: 36px 0;
}

.auth-showcase-kicker,
.auth-eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-showcase-kicker {
  color: #9de3c8;
}

.auth-showcase-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.auth-showcase-copy > p:last-child {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.75;
}

.auth-showcase-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.auth-showcase-note::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8ce2b9;
  content: "";
  box-shadow: 0 0 0 5px rgba(140, 226, 185, 0.13);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px clamp(28px, 6vw, 76px);
}

.auth-form {
  width: 100%;
  max-width: 410px;
}

.auth-eyebrow {
  margin-bottom: 10px;
  color: var(--auth-accent);
}

.auth-form h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.auth-intro {
  margin: 10px 0 28px;
  color: var(--auth-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.auth-field {
  margin-bottom: 19px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: #263a53;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-field input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  outline: none;
  background: #fbfcfe;
  color: var(--auth-ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field input::placeholder {
  color: #9aa8b8;
}

.auth-field input:focus {
  border-color: #42a987;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(27, 155, 112, 0.12);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  padding-right: 74px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 6px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #287c68;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-password-toggle:focus-visible,
.auth-links a:focus-visible,
.auth-submit:focus-visible {
  outline: 3px solid rgba(27, 155, 112, 0.35);
  outline-offset: 3px;
}

.auth-hint {
  display: block;
  margin-top: 8px;
  color: var(--auth-muted);
  font-size: 0.78rem;
}

.auth-strength {
  margin-top: 12px;
}

.auth-strength-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.auth-strength-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #d94343;
  transition: width 220ms ease, background-color 220ms ease;
}

.auth-strength[data-level="mauvais"] .auth-strength-bar {
  background: #d94343;
}

.auth-strength[data-level="moyen"] .auth-strength-bar {
  background: #df9a26;
}

.auth-strength[data-level="bon"] .auth-strength-bar {
  background: #4a9b50;
}

.auth-strength[data-level="tres-bon"] .auth-strength-bar {
  background: #168661;
}

.auth-strength-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--auth-muted);
  font-size: 0.76rem;
}

.auth-strength-label {
  color: #77869a;
  font-weight: 700;
}

.auth-strength[data-level="mauvais"] .auth-strength-label {
  color: #c63737;
}

.auth-strength[data-level="moyen"] .auth-strength-label {
  color: #a76b0e;
}

.auth-strength[data-level="bon"] .auth-strength-label {
  color: #357c3b;
}

.auth-strength[data-level="tres-bon"] .auth-strength-label {
  color: #117451;
}

.auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(110deg, #168661, #1ba879);
  box-shadow: 0 9px 18px rgba(22, 134, 97, 0.2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(22, 134, 97, 0.27);
}

.auth-links {
  margin-top: 20px;
  color: var(--auth-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  text-align: center;
}

.auth-links p {
  margin: 10px 0 0;
}

.auth-links a {
  color: #167c60;
  font-weight: 700;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links .auth-forgot {
  display: block;
  margin-top: 12px;
  text-align: right;
}

.auth-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #f1c8c8;
  border-radius: 10px;
  background: #fff5f5;
  color: #a73434;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-alert-success {
  border-color: #bde8d3;
  background: #f0fbf5;
  color: #176844;
}

.auth-footer {
  padding-top: 20px;
  color: #78879a;
  font-size: 0.78rem;
  text-align: center;
}

body.auth-page > footer {
  margin-top: 32px !important;
  border-radius: 16px 16px 0 0;
  background: #12354a !important;
}

body.auth-page .footer-contacts {
  gap: 10px;
}

body.auth-page .footer-phone {
  color: #12354a;
}

@media (max-width: 760px) {
  body.auth-page {
    padding: 18px 14px;
  }

  .auth-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .auth-showcase {
    min-height: 210px;
    padding: 25px 28px;
  }

  .auth-showcase-copy {
    padding: 26px 0 10px;
  }

  .auth-showcase-copy h1 {
    max-width: 440px;
    font-size: clamp(1.8rem, 7vw, 2.45rem);
  }

  .auth-showcase-copy > p:last-child {
    margin-top: 10px;
    font-size: 0.9rem;
  }

  .auth-showcase-note {
    display: none;
  }

  .auth-panel {
    padding: 34px 28px 38px;
  }
}

@media (max-width: 420px) {
  body.auth-page {
    padding: 10px;
  }

  .auth-showcase {
    min-height: 190px;
    padding: 20px;
  }

  .auth-panel {
    padding: 28px 20px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
