/* ================== Base ================== */
/* Palette alignée sur l'identité de la plateforme (voir
   assets/css/theme-plateforme.css) — navy sombre + léger accent
   bleu/rose, au lieu du dégradé sarcelle d'origine sans rapport
   avec le reste de l'application. */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0a0f1f, #05070d);
  color: #fff;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

.login-container {
  display: flex;
  height: 100vh;
}

/* ---------------- Slider ---------------- */
.login-slider {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.login-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: fade 30s infinite; /* 24 */
}

.login-slider .slide:nth-child(1) {
    animation-delay: 0s;
}

.login-slider .slide:nth-child(2) {
    animation-delay: 10s; /* 8s */
}

.login-slider .slide:nth-child(3) {
    animation-delay: 20s; /* 16 */
}

/* .login-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: fade 25s infinite;
  will-change: opacity;
}

.login-slider .slide:nth-child(1) { animation-delay: 0s; }
.login-slider .slide:nth-child(2) { animation-delay: 5s; }
.login-slider .slide:nth-child(3) { animation-delay: 10s; } */

.login-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: fill; 
  object-position: center;
  display: block;
}

/* Voile dégradé par-dessus les photos — masque proprement le halo blanc
   intégré dans les images d'origine et teinte l'ensemble avec les couleurs
   de la marque, quel que soit le recadrage (object-fit: cover). */
.login-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* linear-gradient(180deg, rgba(10, 15, 31, .15) 0%, rgba(10, 15, 31, .65) 100%), */
    /* linear-gradient(135deg, rgba(13, 110, 253, .18) 0%, transparent 55%), */
    linear-gradient(315deg, rgba(236, 20, 120, .16) 0%, transparent 55%);
  pointer-events: none;
}

.login-slider h2 {
  position: absolute;
  left: 30px;
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0px 3px 8px rgba(0,0,0,0.6);
  animation: slideUp 1s ease-in-out;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Transitions resserrées (fondu ~0.5s au lieu de ~1s) pour éviter que 2
   images restent visibles en même temps trop longtemps ("double
   exposition"). */

/* @keyframes fade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  30%  { opacity: 1; }
  33%  { opacity: 0; }
  100% { opacity: 0; }
} */

@keyframes fade {

    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    35% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }

}

/* ---------------- Formulaire ---------------- */
.login-form {
  flex: 0.6;
  background: #fff;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.form-box {
  width: 100%;
  max-width: 400px;
}

.form-box h3 {
  text-align: center;
  font-weight: 700;
  color: #0a0f1f;
  margin-bottom: 20px;
}

/* Cadre doux autour du portrait — au lieu de l'image flottant seule. */
.login-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #f4f8ff, #eef1f8);
  box-shadow: 0 10px 30px rgba(13, 110, 253, .15), 0 0 0 1px rgba(13, 110, 253, .08);
}

/* Spécificité alignée sur .form-floating > .form-control de Bootstrap
(chargé après ce fichier) pour que le padding ne soit pas écrasé et que
l'icône ne chevauche plus le texte. */
.form-floating > .form-control {
  border-radius: 12px !important;
  padding-left: 40px !important;
}

.form-floating > .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.form-floating > label {
  padding-left: 40px !important;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #888;
}

/* Même fond que le header/sidebar (theme-plateforme.css) — navy avec un
léger halo bleu/rose, pas de violet appuyé. Couleur du texte forcée en
!important : la classe Bootstrap .btn (chargée après ce fichier) impose
sinon sa propre couleur de texte sombre et rend le bouton illisible. */
.btn-login {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, .18) 0%, transparent 40%),
    radial-gradient(circle at bottom right, rgba(236, 20, 120, .16) 0%, transparent 45%),
    linear-gradient(135deg, #0a0f1f, #05070d);
  color: #fff !important;
  font-size: 1rem;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: 0.3s;
}

.btn-login:hover {
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 4px 20px rgba(13, 110, 253, .25);
}

.alert {
  border-radius: 12px;
  text-align: center;
}

/* ================== Responsive ================== */

/* Tablette & mobile */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column; /* slider au dessus, formulaire en dessous */
    height: auto;
    min-height: 100vh;
  }

  .login-slider {
    height: 200px;
  }

  .login-form {
    flex: none;
    padding: 30px 20px;
  }

  .form-box {
    max-width: 100%;
  }

  .login-slider h2 {
    font-size: 1.5rem;
    left: 20px;
  }
}

/* Petits écrans */
@media (max-width: 576px) {
  .login-slider {
    height: 150px;
  }

  .login-logo-frame {
    width: 130px;
    height: 130px;
  }

  .btn-login {
    font-size: 0.95rem;
    padding: 10px;
  }

  .form-floating > .form-control {
    padding-left: 35px !important;
  }

  .form-floating > label {
    padding-left: 35px !important;
    font-size: 0.85rem;
  }

  .input-icon {
    font-size: 1rem;
  }
}
