/* ================================================
   SAHEL OFFICE - LOGIN PAGE DESIGN
   Couleurs de marque: #2D2F36 (principal) et #FECB45 (accent)
   ================================================ */

/* ===== ARRIÈRE-PLAN PRINCIPAL ===== */
body {
  background: linear-gradient(135deg, #2D2F36 0%, #3a3c43 50%, #2D2F36 100%);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== ÉLÉMENTS DÉCORATIFS ===== */
body::before {
  content: "";
  background: radial-gradient(circle, rgba(254, 203, 69, 0.1) 0%, transparent 70%);
  position: fixed;
  top: -200px;
  left: -250px;
  height: 500px;
  width: 500px;
  border-radius: 50%;
  z-index: 0;
}

body::after {
  content: "";
  background: radial-gradient(circle, rgba(254, 203, 69, 0.08) 0%, transparent 70%);
  position: fixed;
  bottom: -300px;
  right: -300px;
  height: 600px;
  width: 600px;
  border-radius: 50%;
  z-index: 0;
}

/* ===== EFFETS DÉCORATIFS ADDITIONNELS ===== */
body::after {
  box-shadow: 
    0 0 100px rgba(254, 203, 69, 0.1),
    inset 0 0 100px rgba(254, 203, 69, 0.05);
}

/* ===== CONTAINER ET POSITIONNEMENT ===== */
.container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.container .row {
  width: 100%;
}

/* ===== CARTE DE CONNEXION ===== */
.card-signin {
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 25px 50px rgba(45, 47, 54, 0.3),
    0 0 0 1px rgba(254, 203, 69, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(254, 203, 69, 0.2);
  overflow: hidden;
  position: relative;
}

.card-signin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FECB45, #e6b63d, #FECB45);
  z-index: 1;
}

.card-signin .card-body {
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 2;
}

/* Harmonisation avec le formulaire 2FA */
.card-signin.shadow-lg .card-body {
  padding: 1.5rem;
}

/* ===== LOGO AVEC CONTAINER ===== */
.logo-container {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.logo-container::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FECB45, transparent);
}

/* ===== TEXTE DE BIENVENUE ===== */
.welcome-text p {
  color: rgba(45, 47, 54, 0.7);
  font-size: 14px;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* ===== LOGO ===== */
.logo {
  max-width: 180px;
  border-radius: 15px;
  transform: translateX(-50%);
  margin-left: 50%;
  padding: 15px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(45, 47, 54, 0.1));
  transition: all 0.3s ease;
}

.logo:hover {
  transform: translateX(-50%) scale(1.05);
  filter: drop-shadow(0 6px 12px rgba(45, 47, 54, 0.2));
}

/* ===== TITRE DE CONNEXION ===== */
.card-signin h5 {
  color: #2D2F36;
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.card-signin h5::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #FECB45, #e6b63d);
  border-radius: 2px;
}

/* ===== CHAMPS DE FORMULAIRE ===== */
.form-signin .form-control {
  padding: 12px 20px;
  border: 2px solid rgba(45, 47, 54, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #2D2F36;
  font-size: 15px;
  transition: all 0.3s ease;
  text-align: left;
  margin-bottom: 0.8rem;
}

.form-signin .form-control::placeholder {
  color: rgba(45, 47, 54, 0.6);
  font-weight: 400;
}

.form-signin .form-control:focus {
  border-color: #FECB45;
  background: #ffffff;
  box-shadow: 
    0 0 0 3px rgba(254, 203, 69, 0.1),
    0 4px 12px rgba(254, 203, 69, 0.15);
  outline: none;
  transform: translateY(-2px);
}

.form-signin .form-control.is-invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* ===== BOUTON PRINCIPAL ===== */
.btn-primary {
  background: linear-gradient(135deg, #FECB45 0%, #e6b63d 100%);
  border: none;
  color: #2D2F36;
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(254, 203, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e6b63d 0%, #d1a235 100%);
  color: #2D2F36;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(254, 203, 69, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(254, 203, 69, 0.3);
}

/* ===== CHECKBOX PERSONNALISÉE ===== */
.custom-control-label {
  color: #2D2F36;
  font-weight: 500;
  margin-bottom: 0;
  margin-top: 2px;
  user-select: none;
}

.custom-control-label::before {
  background: rgba(254, 203, 69, 0.1);
  border: 2px solid rgba(45, 47, 54, 0.2);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background: #FECB45;
  border-color: #FECB45;
}

.custom-control-input:checked ~ .custom-control-label::after {
  color: #2D2F36;
}

/* ===== LIENS ===== */
.btn-link {
  color: #2D2F36;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.btn-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #FECB45;
  transition: width 0.3s ease;
}

.btn-link:hover {
  color: #FECB45;
  text-decoration: none;
}

.btn-link:hover::after {
  width: 100%;
}

.btn-register {
  color: #2D2F36;
  font-size: 16px;
  display: block;
  text-align: center;
  margin-top: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-register:hover {
  color: #FECB45;
  text-decoration: none;
}

/* ===== ALERTES ===== */
.alert-danger {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border-radius: 10px;
  border-left: 4px solid #e74c3c;
}

.alert-success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border-radius: 10px;
  border-left: 4px solid #2ecc71;
}

/* ===== MESSAGES D'ERREUR ===== */
.invalid-feedback {
  color: #e74c3c;
  font-size: 14px;
  font-weight: 500;
  margin-top: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body::before {
    top: -100px;
    left: -100px;
    height: 300px;
    width: 300px;
  }
  
  body::after {
    bottom: -100px;
    right: -100px;
    height: 400px;
    width: 400px;
  }
  
  .card-signin {
    margin: 1rem;
    border-radius: 15px;
  }
  
  .card-signin .card-body {
    padding: 2rem 1.5rem;
  }
  
  .logo {
    max-width: 150px;
  }
  
  .form-signin .form-control {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .btn-primary {
    padding: 12px 25px;
    font-size: 15px;
  }
}

/* ===== ANIMATION D'ENTRÉE DÉSACTIVÉE ===== */
/* Animation retirée pour correspondre au formulaire 2FA */

/* ===== EFFETS SUPPLÉMENTAIRES ===== */
.form-group {
  position: relative;
}

.form-group .form-control:focus + .floating-label {
  color: #FECB45;
}

/* ===== AJUSTEMENTS FINAUX ===== */
::selection {
  background: rgba(254, 203, 69, 0.3);
  color: #2D2F36;
}

::-moz-selection {
  background: rgba(254, 203, 69, 0.3);
  color: #2D2F36;
}

/* ===== COPYRIGHT ===== */
.copyright-text {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 100;
}

.copyright-text small {
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 20px;
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 2px 10px rgba(45, 47, 54, 0.1);
}