* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../../public/images/login.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  padding: 20px;
}

/* Overlay semi-transparent */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.login-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 1000px;
  width: 100%;
  min-height: 600px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Panel gauche - Logo avec fond blanc */
.logo-panel {
  flex: 0 0 35%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}

.logo-content {
  text-align: center;
}

.logo-placeholder {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-placeholder img {
  max-width: 140%;
  max-height: 140%;
  object-fit: contain;
}

/* Panel droit - Formulaire avec effet glassmorphism */
.form-panel {
  flex: 0 0 65%;
  background: rgba(230, 230, 240, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Effet de lumière animé dans le panel formulaire */
.form-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: glow 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes glow {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(30px, 30px);
  }
}

.form-panel > * {
  position: relative;
  z-index: 1;
}

.login-title {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.header {
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 50px;
}

.header p {
  font-size: 14px;
  font-weight: 200;
}

.form-group {
  margin-bottom: 28px;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.input-field {
  width: 100%;
  padding: 16px 24px;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  color: white;
  outline: none;
  transition: all 0.3s ease;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input-field:focus {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Autocomplete styling */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus {
  -webkit-text-fill-color: white;
  -webkit-box-shadow: 0 0 0px 1000px rgba(100, 140, 180, 0.2) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.btn-submit {
  width: 60%;
  padding: 18px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  background: white;
  color: #387dc0;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.95);
}

.btn-submit:active {
  transform: translateY(-1px);
}

.input-error {
  border: 2px solid #dc2626 !important;
  background-color: rgba(220, 38, 38, 0.05);
  animation: shake 0.3s ease-in-out;
}

.input-error:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field-error-message {
  display: block;
  color: #dbaeae;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 900;
  margin-left: 5px;
  animation: slideDown 0.3s ease-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Supprimer le message d'erreur en haut si vous ne le voulez plus */
.error-message {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet */
@media (max-width: 968px) {
  .login-wrapper {
    max-width: 600px;
    flex-direction: column;
  }

  .logo-panel {
    padding: 50px 40px;
    min-height: 250px;
  }

  .form-group {
    width: 100%;
  }
  .btn-submit {
    width: 100%;
  }

  .logo-placeholder {
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
  }

  .logo-text {
    font-size: 24px;
  }

  .form-panel {
    padding: 50px 40px;
  }

  .login-title {
    font-size: 32px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 15px;
    background-attachment: scroll;
  }

  .login-wrapper {
    border-radius: 20px;
  }

  .logo-panel {
    padding: 50px 30px;
    min-height: 220px;
  }

  .logo-placeholder {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
  }

  .logo-text {
    font-size: 20px;
  }

  .form-panel {
    padding: 40px 30px;
  }

  .login-title {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .login-subtitle {
    font-size: 14px;
    margin-bottom: 30px;
  }

  .form-group {
    margin-bottom: 20px;
    width: 100%;
  }

  .form-label {
    font-size: 13px;
  }

  .input-field {
    padding: 12px 16px;
    font-size: 14px;
  }

  .btn-submit {
    padding: 14px;
    font-size: 15px;
    width: 100%;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .logo-panel {
    padding: 10px 10px;
  }

  .logo-placeholder {
    width: 100px;
    height: 100px;
  }

  .form-panel {
    padding: 30px 20px;
  }
  .form-group {
    width: 100%;
  }
  .login-title {
    font-size: 24px;
  }
  .btn-submit {
    width: 100%;
  }
}

/* Landscape mobile */
@media (max-width: 968px) and (orientation: landscape) {
  .login-wrapper {
    flex-direction: row;
    max-width: 900px;
  }

  .logo-panel {
    min-height: auto;
    padding: 30px 25px;
  }

  .logo-placeholder {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
  }

  .logo-text {
    font-size: 18px;
  }

  .form-panel {
    padding: 30px 35px;
  }

  .login-title {
    font-size: 26px;
    margin-bottom: 5px;
  }

  .login-subtitle {
    font-size: 13px;
    margin-bottom: 25px;
  }

  .form-group {
    margin-bottom: 16px;
    width: 100%;
  }
  .btn-submit {
    width: 100%;
  }
}
