/* Page connexion — split layout (thème Twiga Power) */

html:has(body.login-page-body) {
  height: 100%;
  overflow: hidden;
}

body.login-page-body {
  padding-top: 0 !important;
  margin: 0;
  overflow: hidden;
  height: 100%;
}

body.login-page-body .loading-overlay {
  display: none !important;
}

.login-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: "Outfit", system-ui, sans-serif;
}

.login-page__brand {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem 1.25rem;
  color: #fff;
  background: linear-gradient(145deg, #021a2e 0%, var(--blue) 45%, #01365c 100%);
}

.login-page__brand-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(246, 175, 51, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.08) 0%, transparent 35%),
    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: auto, auto, 48px 48px, 48px 48px;
}

.login-page__brand-curves {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.login-page__brand-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.login-page__brand-title {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.login-page__brand-lead {
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}

.login-page__panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.login-page__panel-inner {
  width: 100%;
  max-width: 22rem;
  margin: auto 0;
}

.login-page__header {
  margin-bottom: 1.35rem;
}

.login-page__title {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue);
}

.login-page__subtitle {
  margin-bottom: 0.75rem;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #6b7280;
}

.login-page__brand .login-page__breadcrumb {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.15rem;
}

.login-page__brand .login-page__breadcrumb-list {
  justify-content: center;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.login-page__brand .login-page__breadcrumb-link {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-page__brand .login-page__breadcrumb-link:hover,
.login-page__brand .login-page__breadcrumb-link:focus-visible {
  color: var(--accent);
}

.login-page__brand .login-page__breadcrumb-sep {
  color: rgba(255, 255, 255, 0.4);
}

.login-page__brand .login-page__breadcrumb-current {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.login-page__alert {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.login-page__form {
  margin-bottom: 1.25rem;
}

.login-page__form .contact-page__field:first-of-type {
  margin-top: 0;
}

.login-page__form .contact-page__input.is-invalid {
  border-color: #dc3545;
}

.login-page__form .contact-page__input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.login-page__remember {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.login-page__remember .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  border-color: rgba(2, 47, 84, 0.35);
  cursor: pointer;
}

.login-page__remember .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.login-page__remember .form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 175, 51, 0.25);
}

.login-page__remember-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

.login-page__submit {
  margin-top: 0;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

.login-page__switch {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  color: #6b7280;
}

.login-page__switch-link {
  font-weight: 600;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-page__switch-link:hover,
.login-page__switch-link:focus-visible {
  color: var(--accent);
}

.login-page__panel--register .login-page__form .contact-page__field {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.login-page__panel--register .login-page__form .contact-page__field:first-of-type {
  margin-top: 0;
}

@media (min-width: 992px) {
  .login-page {
    flex-direction: row;
  }

  .login-page__brand {
    flex: 0 0 48%;
    max-width: 48%;
    height: 100%;
    min-height: 0;
    padding: 2rem 2.5rem;
  }

  .login-page__brand-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 38rem;
    height: 100%;
    max-height: 100%;
  }

  .login-page__brand-title {
    font-size: clamp(2.1rem, 2.8vw, 3.1rem);
    margin-bottom: 1.25rem;
    max-width: none;
  }

  .login-page__brand-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: none;
  }

  .login-page__panel {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    padding: 2rem 2rem;
    overflow-y: auto;
  }

  .login-page__panel-inner {
    max-width: 24rem;
  }

  .login-page__title {
    font-size: 1.85rem;
  }
}

@media (max-width: 991.98px) {
  .login-page__brand {
    max-height: 46vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-page__brand-title {
    font-size: 1.75rem;
    line-height: 1.28;
    margin-bottom: 0.85rem;
  }

  .login-page__brand-lead {
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }

  .login-page__panel {
    justify-content: flex-start;
    padding: 2.25rem 1.35rem 1.75rem;
  }

  .login-page__panel--register {
    padding-top: 2.75rem;
  }

  .login-page__panel-inner {
    margin: 0 auto;
    padding-top: 0.35rem;
  }

  .login-page__header {
    margin-bottom: 1.15rem;
  }
}
