* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
}

.container {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.8s ease;
}

h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 30px;
  color: #222;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  padding-right: 40px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: #fff;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
  border-color: #ff7e5f;
  box-shadow: 0 0 6px rgba(255, 126, 95, 0.3);
  outline: none;
}

.eye-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  cursor: pointer;
  fill: #888;
  transition: fill 0.3s ease;
}

.eye-icon:hover {
  fill: #ff7e5f;
}

.g-recaptcha {
  margin-top: 5px;
}

#captchaError {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 6px;
  font-weight: 500;
  min-height: 18px;
}

button {
  background-color: #ff7e5f;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
}

button:hover {
  background-color: #e96a4d;
  transform: translateY(-1px);
}

.error-message {
  color: #d32f2f;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 18px;
}

.loading-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  margin-top: 10px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top: 2px solid #ff7e5f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Centrage horizontal du captcha */
.g-recaptcha {
  display: flex;
  justify-content: center;
  margin-top: 5px;
  margin-bottom: 10px;
}

/* Empêche le débordement sur petit écran */
@media (max-width: 480px) {
  .g-recaptcha {
    transform: scale(0.77);
    transform-origin: top center;
    width: 100%;
    justify-content: center;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


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

@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
  }

  h2 {
    font-size: 1.8rem;
  }

  button {
    font-size: 0.95rem;
    padding: 10px;
  }
}