:root {
  --primary-gradient: linear-gradient(135deg, #feca57, rgba(2, 2, 2, 1) 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --jaune: rgba(255, 193, 7, 0.8);
  --glass-border: rgba(255, 255, 255, 0.5);
  --noir: #020202;
  --fotsy: #ffffff;
}
* {
  box-sizing: border-box;
}
.errorColor {
  color: var(--jaune);
  font-size: 14px;
  display: block;
  margin-bottom: 5px;
}
body {
  background: var(--primary-gradient);
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.floating-shapes:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: -2s;
}

.floating-shapes:nth-child(2) {
  top: 70%;
  right: 5%;
  animation-delay: -4s;
  width: 150px;
  height: 150px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  padding: 20px;
}

.login-card {
  display: flex;
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 900px;
  min-height: 500px;
  animation: slideIn 0.8s ease-out;
  overflow: hidden;
}
h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  text-align: center;
  color: #ffffff;
  font-style: italic;
  margin-bottom: 20px;
}
#ligne {
  background-color: #ffffff;
  width: 50%;
  height: 3px;
  margin: 0 auto;
  text-align: center;
  margin: 0 auto 20px auto;
}
#gauche {
  background-color: var(--jaune);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px 0px 0px 20px;
  padding: 20px;
  min-height: 500px;
}
#gauche img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}
#droite1 {
  border-radius: 0px 20px 20px 0px;
  background-color: var(--noir);
  border: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 500px;
}
#droite {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#droite .form-control::placeholder {
  color: var(--glass-border);
  font-size: 14px;
}
#droite .form-control {
  border: none;
  color: var(--fotsy);
  border-bottom: 3px solid var(--glass-border);
  border-radius: 0;
  padding: 15px 0;
  background: transparent;
  font-size: 14px;
  transition: border-color 0.3s ease;
  width: 100%;
}
#droite .form-control:focus {
  color: var(--fotsy);
  border-bottom-color: var(--jaune);
  box-shadow: none;
  outline: none;
  transform: translateY(-2px);
}

.btn-login {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--jaune);
  border-radius: 30px;
  padding: 12px 30px;
  color: white;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 2px var(--jaune);
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}
#btn {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.btn-login::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.btn-login:hover::before {
  width: 500px;
  height: 300px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--jaune);
  border: 2px solid var(--jaune);
  color: white;
}
.password-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 10%;
  background: none;
  border: none;
  color: var(--glass-border);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
}

.password-toggle:hover {
  color: var(--jaune);
}

.password-toggle:focus {
  outline: none;
  color: var(--jaune);
}
.password-toggle i {
  font-size: 16px;
  pointer-events: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
/* tablette et petit écrans--------- */
@media (max-width: 992px) {
  .login-card {
    max-width: 700px;
    min-height: 450px;
  }
  #gauche,
  #droite1 {
    min-height: 450px;
  }

  #droite {
    padding: 25px;
  }
}

/* Tablettes en mode portrait */
@media (max-width: 768px) {
  .login-container {
    padding: 15px;
  }

  .login-card {
    flex-direction: column;
    max-width: 500px;
    min-height: auto;
  }

  #gauche {
    border-radius: 20px 20px 0 0;
    min-height: 200px;
    padding: 15px;
  }

  #gauche img {
    max-height: 120px;
  }

  #droite1 {
    border-radius: 0 0 20px 20px;
    min-height: auto;
  }

  #droite {
    padding: 20px;
  }

  h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  #ligne {
    margin-bottom: 15px;
  }

  .floating-shapes {
    width: 80px;
    height: 80px;
  }

  .floating-shapes:nth-child(2) {
    width: 120px;
    height: 120px;
  }
}

/* Smartphones */
@media (max-width: 576px) {
  .login-container {
    padding: 10px;
    min-height: 100vh;
  }

  .login-card {
    max-width: 100%;
    margin: 0;
    border-radius: 15px;
  }

  #gauche {
    border-radius: 15px 15px 0 0;
    min-height: 150px;
    padding: 10px;
  }

  #gauche img {
    max-height: 100px;
  }

  #droite1 {
    border-radius: 0 0 15px 15px;
  }

  #droite {
    padding: 15px;
  }

  h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-top: 10px;
  }

  #ligne {
    width: 60%;
    margin-bottom: 10px;
  }

  .form-control {
    padding: 12px 0;
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  .btn-login {
    padding: 14px 25px;
    font-size: 14px;
    max-width: 100%;
  }

  #btn {
    margin-top: 15px;
  }

  .mb-4 {
    margin-bottom: 1rem !important;
  }

  .floating-shapes {
    width: 60px;
    height: 60px;
  }

  .floating-shapes:nth-child(2) {
    width: 90px;
    height: 90px;
  }
}

/* Très petits écrans */
@media (max-width: 375px) {
  .login-container {
    padding: 5px;
  }

  #droite {
    padding: 10px;
  }

  h3 {
    font-size: 1rem;
  }

  .form-control {
    padding: 10px 0;
  }

  .btn-login {
    padding: 12px 20px;
    font-size: 13px;
  }
}

/* Mode paysage pour smartphones */
@media (max-height: 500px) and (max-width: 900px) {
  .login-container {
    padding: 10px;
  }

  .login-card {
    flex-direction: row;
    max-width: 100%;
    min-height: auto;
  }

  #gauche {
    border-radius: 15px 0 0 15px;
    min-height: auto;
    padding: 10px;
  }

  #gauche img {
    max-height: 80px;
  }

  #droite1 {
    border-radius: 0 15px 15px 0;
    min-height: auto;
  }

  #droite {
    padding: 15px;
  }

  h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .form-control {
    padding: 8px 0;
  }

  .btn-login {
    padding: 10px 20px;
  }
}
