/* Page de connexion / création de compte — Paie Afrique
   Modale plein écran, HTML/CSS/JS vanilla, sans dépendance de build. */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #0b3350;
  overflow-x: hidden;
}

button {
  font-family: inherit;
}

/* ---------- Fond vidéo plein écran, flouté et en fondu enchaîné ---------- */

.login-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.login-video-bg__blur {
  position: absolute;
  inset: 0;
  transform: scale(1.08);
  filter: blur(16px);
}

.login-video-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 800ms ease-in-out;
}

.login-video-bg__video--front {
  opacity: 1;
}

.login-video-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

/* ---------- Page / modale ---------- */

.login-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-modal {
  width: 100%;
  max-width: 64rem;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
  .login-modal {
    flex-direction: column;
  }
}

/* ---------- Panneau gauche : dégradé bleu turquoise statique ---------- */

.login-panel-brand {
  position: relative;
  width: 50%;
  padding: 3rem;
  color: #fff;
  overflow: hidden;
  background-image: url("../images/signup-left-panel.webp");
  background-size: cover;
  background-position: center;
}

@media (max-width: 767px) {
  .login-panel-brand {
    width: 100%;
    min-height: 280px;
    padding: 2rem;
  }
}

.login-panel-brand__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 22, 36, 0.35) 0%, rgba(6, 22, 36, 0.05) 40%, rgba(6, 22, 36, 0.45) 100%);
}

.login-panel-brand__message {
  position: relative;
  z-index: 1;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767px) {
  .login-panel-brand__message {
    min-height: 6.5rem;
  }
}

.login-panel-brand__inner {
  opacity: 1;
  transition: opacity 500ms ease-in-out;
}

.login-panel-brand__inner.is-hidden {
  opacity: 0;
}

.login-panel-brand__headline {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.login-panel-brand__supporting {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ---------- Panneau droit : formulaire ---------- */

.login-panel-form {
  width: 50%;
  display: flex;
  flex-direction: column;
  padding: 3rem;
  background: #f7f7f7;
  color: #1a1a1a;
}

@media (max-width: 767px) {
  .login-panel-form {
    width: 100%;
    padding: 2rem;
  }
}

.login-panel-form__header {
  margin-bottom: 2rem;
}

.login-panel-form__title {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.login-panel-form__subtitle {
  margin: 0;
  text-align: left;
  opacity: 0.8;
}

/* Onglets */

.login-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.login-tabs[hidden] {
  display: none;
}

.login-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.login-tab:hover {
  color: #4b5563;
}

.login-tab.is-active {
  color: #1d6286;
  border-bottom-color: #1d6286;
}

/* Formulaire */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form[hidden] {
  display: none;
}

.login-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.login-field__control {
  position: relative;
}

.login-field__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #9ca3af;
  pointer-events: none;
}

.login-field__control input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #000;
}

.login-field__control input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #1d6286;
  border-color: #1d6286;
}

.login-field.has-error input {
  border-color: #ef4444;
}

.login-field__error {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #ef4444;
}

.login-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.login-remember input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  accent-color: #1d6286;
}

.login-forgot {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #1d6286;
  cursor: pointer;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-submit {
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #1d6286;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.login-submit:hover {
  background: #174e6b;
}

.login-server-message {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #ef4444;
}

.login-server-message:empty {
  margin: 0;
}

.login-server-message.is-success {
  color: #16a34a;
}
