/* Pages d'authentification - cohérentes avec la landing */

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f9fafb;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: -30%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(59, 130, 246, 0.12) 30%,
    rgba(147, 197, 253, 0.18) 50%,
    rgba(59, 130, 246, 0.12) 70%,
    transparent 100%
  );
  opacity: 1;
  z-index: -1;
  transform: translate3d(0, -30%, 0);
  animation: auth-bg-diagonal 16s ease-out 1 forwards;
}

@keyframes auth-bg-diagonal {
  0% {
    transform: translate3d(0, -30%, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 30%, 0);
    opacity: 1;
  }
}

.half,
.half .container > .row {
  min-height: 100vh;
}

.half {
  display: flex;
  align-items: stretch;
}

.half .bg,
.half .contents {
  width: 50%;
}

@media (max-width: 1199.98px) {
  .half {
    flex-direction: column;
  }

  .half .bg,
  .half .contents {
    width: 100%;
  }
}

.half .bg {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  animation: auth-float 18s ease-in-out infinite;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.half .contents {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullpage-center {
  width: 100%;
}

/* Variante full-center (utilisée pour login centré) */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-page .form-modern {
  max-width: 420px;
  width: 100%;
}

.form-modern {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.9rem 1.8rem;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(209, 213, 219, 0.9);
  max-width: 420px;
  margin: 0 auto;
}

.form-modern .form-control {
  padding-left: 10px !important;
}

.form-modern .text-center.mb-4 h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.form-modern .text-center.mb-4 p {
  font-size: 0.92rem;
  color: #6b7280;
  margin-bottom: 0;
}

.form-modern .input-group-text {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 6px 0 0 6px;
}

.form-modern .form-control {
  border: 1px solid #e5e7eb;
  border-left: none;
  border-radius: 0 6px 6px 0;
}

.form-modern .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.half .btn {
  border-radius: 999px;
  height: 48px;
}

.half a {
  color: #6b7280;
  text-decoration: underline;
}

.half a:hover {
  color: #111827;
}

.half .forgot-pass {
  font-size: 0.9rem;
}

.d-flex.justify-content-between .forgot-pass {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 991.98px) {
  .half .bg {
    min-height: 260px;
  }
}

@media (max-width: 768px) {
  .form-modern {
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    padding: 1.6rem 1.5rem;
  }
}

/* Apparition douce de la carte sur toutes les pages auth */
.form-modern {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    animation: auth-card-in 400ms ease-out forwards;
  }
  
  @keyframes auth-card-in {
    0% {
      opacity: 0;
      transform: translateY(18px) scale(0.97);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  /* Micro-interaction sur le bouton principal */
  .form-modern .btn.btn-primary {
    transition:
      transform 0.12s ease-out,
      box-shadow 0.12s ease-out;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  }
  
  .form-modern .btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
  }
  
  /* Légère mise en avant des liens secondaires au survol */
  .form-modern .forgot-pass {
    transition: color 0.15s ease-out, opacity 0.15s ease-out;
    opacity: 0.85;
  }
  
  .form-modern .forgot-pass:hover {
    opacity: 1;
    color: #111827;
  }