/* ============================================
   1. LOGIN.CSS - Page de connexion
   ============================================ */

/* === CONTENEUR PRINCIPAL === */
.login-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2.5rem;
  background-color: white;
  border: 2px solid #9a3e35;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === NAVIGATION === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #9a3e35;
}

/* === EN-TÊTE === */
.login-header {
  margin-bottom: 2rem;
}

.title {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: #9a3e35;
}

.subtitle {
  margin: 0;
  font-size: 1rem;
  color: #666;
}

/* === LOGO === */
.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

/* === FORMULAIRE === */
.login-form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid rgba(154, 62, 52, 0.2);
  border-radius: 8px;
  background-color: white;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #9a3e35;
  box-shadow: 0 0 0 2px rgba(154, 62, 53, 0.2);
}

.form-group input::placeholder {
  color: #999;
}

/* === CHAMP MOT DE PASSE === */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: #9a3e35;
}

/* === OPTIONS DU FORMULAIRE === */
.form-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0;
}

#remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
}

#remember input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #9a3e35;
  cursor: pointer;
}

.forgot-password {
  color: #9a3e35;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.forgot-password:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* === BOUTONS === */
.btns {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 0 0;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background-color: #9a3e35;
  color: white;
}

.btn-primary:hover {
  background-color: #8a352e;
}

.btn-secondary {
  background-color: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background-color: #d0d0d0;
}

/* === SECTION D'INSCRIPTION === */
.register {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(154, 62, 52, 0.1);
  font-size: 0.9rem;
}

.register p {
  margin: 0;
  color: #666;
}

.register a {
  color: #9a3e35;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.register a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* === MESSAGES D'ERREUR === */
.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .login-container {
    margin: 2rem auto;
    padding: 2rem;
    max-width: 90%;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .btns {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-container {
    margin: 1rem auto;
    padding: 1.5rem;
    max-width: 95%;
  }
  
  .title {
    font-size: 1.375rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 0.625rem;
  }
  
  .register {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}