/*--------SIGN UP---------*/

/* ======================================
   FORMULAIRE DE CONNEXION MODERNE
   ====================================== */

/* Variables pour le formulaire de connexion */
:root {
  --login-primary: #f0b90b;
  --login-primary-dark: #d4a009;
  --login-secondary: #707070;
  --login-bg-dark: #1a1a1a;
  --login-bg-light: #2d2d2d;
  --login-text-light: #e0e0e0;
  --login-text-muted: #999;
  --login-error: #ff4757;
  --login-success: #2ecc71;
}




/* Fond animé */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
}
.animated-bg2 {
  background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
  z-index: 0;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(112, 112, 112, 0.1) 0%, transparent 50%);
  /* animation: bgAnimation 20s ease-in-out infinite; DISABLED - Performance issue: scales entire background */
}
.animated-bg2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(112, 112, 112, 0.1) 0%, transparent 50%);
  /* animation: bgAnimation 20s ease-in-out infinite; DISABLED - Performance issue: scales entire background */
}

@keyframes bgAnimation {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(10deg); }
}

/* Canvas des particules amélioré */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}
#particles2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}

/* login-page overrides → déplacés dans header.css et footer.css */




/* Container principal */
.login-container {
position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 50px;
}

.input-content-log{
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: auto 0px;
  width: 50%;
}

/* Logo section */
.logo-section {
  text-align: center;
  margin-bottom: 10px;
  animation: fadeInDown 0.8s ease-out;
}

.logo-section img {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 20px rgba(240, 185, 11, 0.5));
  transition: 0.5s;
}
.logo-section img:hover {
scale: 1.1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.logo-section h1 {
  color: var(--login-text-light);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
}

.logo-section p {
  color: var(--login-text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Carte de connexion moderne */
.login-card {
  border-radius: 20px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  width: 80%;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #ffffff82;
  border-bottom: 5px solid #f0b90b;
  border-top: 5px solid #f0b90b;
}
.login-card.forgot{
  width: 50%;
}

.flex-login-head {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  align-items: center;
}

#loginForm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 45px 30px;
  border-radius: 20px;
}
#registerForm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 45px 30px;
  border-radius: 20px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/*MDP oublié*/

.forgot-content{
  padding:30px;
}

/* Titre du formulaire */
.form-title {
  color: white;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  margin:0px;
}


/* Groupes d'input modernes */
.login-card .input-group {
  position: relative;
  margin-bottom: 25px;
}

.login-card .input-group:last-of-type {
  margin-bottom: 30px;
}

.login-card .input-group label {
  position: absolute;
  top: 47%;
  left: 45px;
  transform: translateY(-50%);
  color: var(--login-text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 5px;
}

.login-card .input-group input:focus + label,
.login-card .input-group input:not(:placeholder-shown) + label {
  top: -10px;
  left: 5px;
  font-size: 0.8rem;
  color: var(--login-primary);
}

.login-card .input-group i {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--login-text-muted);
  font-size: 1.1rem;
  transition: color 0.3s ease;
  z-index: 1;
}

.login-card .input-group input:focus ~ i {
  color: var(--login-primary);
}

.login-card .input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: rgb(255, 255, 255);
  border: 2px solid rgb(231, 231, 231);
  border-radius: 12px;
  color: #666;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.login-card .input-group input::placeholder {
  color: transparent;
}

.login-card .input-group input:focus {
  border-color: var(--login-primary);
  background: rgba(240, 185, 11, 0.05);
  box-shadow: 0 0 0 4px rgba(240, 185, 11, 0.1);
}

/* Options du formulaire */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  width: 100%;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--login-primary);
  cursor: pointer;
}

.remember-me label {
  color: var(--login-text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}

.forgot-password {
  color: var(--login-primary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.forgot-password:hover {
  color: var(--login-primary-dark);
  text-decoration: underline;
}

/* Bouton de connexion moderne */
.login-btn {
  width: auto;
  padding: 15px 50px;
  background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  justify-content: center;
  display: flex;
  margin: auto;
  gap: 10px;
  align-items: center;
}
.login-btn p{
  margin:0;
}


.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 185, 11, 0.3);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(240, 185, 11, 0.2);
}

.login-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.login-btn .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* Messages d'erreur/succès */
#loginMessage,
#loginError {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
 animation: fadeIn 0.3s ease-out;
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#loginMessage.error,
#loginError {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--login-error);
}

#loginMessage.success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: var(--login-success);
}

/* Séparateur */
.divider {
  text-align: center;
  margin: 30px 0 20px;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(68, 68, 68, 0.1);
}

.divider span {
  background: rgb(253, 253, 253);
  padding: 0 15px;
  color: var(--login-text-muted);
  font-size: 0.9rem;
  position: relative;
}

/* Lien d'inscription */
.signup-link {
  text-align: center;
  color: var(--login-text-muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.signup-link a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 5px 15px;
  gap: 10px;
  display: flex;
  align-items: center;
  background: #29b629;
  border-radius: 15px;
  opacity: 0.8;
}

.signup-link a:hover {
  opacity:1;
}

.insc-val-content{
  text-align: center;
}

/* Responsive */
@media (max-width: 480px) {



  .logo-section h1 {
    font-size: 1.6rem;
  }

  .login-card .input-group input {
    font-size: 0.95rem;
    padding: 12px 12px 12px 40px;
  }

  .login-btn {
    font-size: 1rem;
    padding: 12px;
  }
  .form-options {
  display: flex;
  flex-direction: column;
}
.forgot-password {
  margin-top: 20px;
}
}




/* ======================================
   FORMULAIRE D'INSCRIPTION MODERNE
   ====================================== */



/* Container principal pour inscription */

.container-log{
  background: linear-gradient(90deg,rgba(0, 0, 0, 0.15) 0%, rgba(216, 216, 216, 0.11) 50%, rgba(0, 0, 0, 0.15) 100%);
}

.signup-container {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
}

/* Carte d'inscription */
.signup-card {
  border-radius: 20px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  width: 80%;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 3% 5% 5% 5%;
  background-color: #ffffff82;
  border-bottom: 5px solid #f0b90b;
  border-top: 5px solid #f0b90b;
}
.signup-card.validation-mode {
  border-bottom: 5px solid #78be79;
  border-top: 5px solid #78be79;
}
.insc-head-title-val {
  padding: 30px;
  margin-bottom: 0px;
  border-radius: 18px 18px 0px 0px;
  background: #17882ec4;
    background-image: none;
  background-image: none;
  background-image: repeating-linear-gradient( 45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.05) 1px, #b4b4b414 1px, #fff0 5px );
  display: flex;
  justify-content: center;
  gap: 30px;
  align-items: center;
}
.insc-head-title-val i{
  animation: bounceIn 0.6s;
  color: white;
  font-size: 2rem;
}
.mess-val-content{
  padding: 50px;
}
.mess-val {
  border: 1px solid #40c05787;
  animation: active-pulse 2s infinite;
  background-color: #0080000a;
  border-radius: 12px; 
  padding: 30px; 
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
  background-image: repeating-linear-gradient( 45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.05) 1px, #b4b4b414 1px, #fff0 5px );
}
.astuce {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0px 50px 0px;
  display: flex;
  align-items: center;
}
.astuce h3{
  color: #856404;
  margin: 0;
  font-size: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.astuce p {
  color: #856404;
  margin: 0;
  font-size: 14px;
  text-align: center;
  width: 100%;
}


.fa-right-from-bracket {
    transform: rotate(180deg);
}
.btn-retour{
  display: flex;
  margin:20px;
}
.btn-retour a{
  margin:auto;
  background-color: #31302b;
  padding:10px 20px;
  color: #f0b90b;
  border-radius:5px;
  border:1px solid rgba(255, 255, 255, 0.1);
  transition:0.5s;
}
.btn-retour a:hover{
  color:whitesmoke;
  background-color: #31302b7c;
  border: 1px solid #f0bb0b86;
}
/* Adaptation des input groups pour inscription */
.signup-card .input-group {
  position: relative;
  margin-bottom: 20px;
}

.signup-card .input-group:last-of-type {
  margin-bottom: 30px;
}

.signup-card .input-group label {
  position: absolute;
  top: 50%;
  left: 45px;
  transform: translateY(-50%);
  color: var(--login-text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 5px;
}

.signup-card .input-group input:focus + label,
.signup-card .input-group input:not(:placeholder-shown) + label {
    top: -10px;
  left: 5px;
  font-size: 0.8rem;
  color: var(--login-primary);
}

.signup-card .input-group i {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--login-text-muted);
  font-size: 1.1rem;
  transition: color 0.3s ease;
  z-index: 1;
}

.signup-card .input-group input:focus ~ i {
  color: var(--login-primary);
}

.signup-card .input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: rgb(255, 255, 255);
  border: 2px solid rgb(231, 231, 231);
  border-radius: 12px;
  color: #666;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.signup-card .input-group input::placeholder {
  color: transparent;
}

.signup-card .input-group input:focus {
  border-color: var(--login-primary);
  background: rgba(240, 185, 11, 0.05);
  box-shadow: 0 0 0 4px rgba(240, 185, 11, 0.1);
}

/* Groupe spécial pour le code de parrainage */
.referral-group {
  position: relative;
  margin-bottom: 30px;
}

.referral-group::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 1px;
}

.referral-group i {
  color: var(--login-primary) !important;
  opacity: 0.7;
  top: 35% !important;
  left: 25px !important;
}

/* Bouton d'inscription */
.signup-btn {
width: 25%;
  padding: 15px;
  background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  justify-content: center;
  display: flex;
  margin: auto;
  gap: 10px;
  align-items: center;

}
.signup-btn p{
    margin:0;
}

.signup-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.signup-btn:hover::before {
  left: 100%;
}

.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 185, 11, 0.3);
}

.signup-btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(240, 185, 11, 0.2);
}

.signup-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Lien de connexion */
.login-link {
  text-align: center;
  color: var(--login-text-muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.login-link a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 5px 15px;
  gap: 10px;
  display: flex;
  align-items: center;
  background: #29b629;
  border-radius: 15px;
  opacity: 0.8;
}

.login-link a:hover {
  opacity:1;
}

/* Messages d'erreur pour inscription */
#signupError {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease-out;
  display: none;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--login-error);
}

/* Container réinitialisé pour inscription */
body.signup-page .container {
  background: none;
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive pour inscription */
@media (max-width: 480px) {
 
  .signup-card .input-group {
    margin-bottom: 15px;
  }
  
  .signup-card .input-group input {
    font-size: 0.95rem;
    padding: 12px 12px 12px 40px;
  }
  
  .signup-btn {
    font-size: 1rem;
    padding: 12px;
  }
  .signup-container {
  width: 100%;
}
}
/* ======================================
   ÉTATS DE VALIDATION ET ANIMATIONS
   ====================================== */

/* États de validation des champs */
.signup-card .input-group.weak input {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.05);
}

.signup-card .input-group.medium input {
  border-color: #ffa502;
  background: rgba(255, 165, 2, 0.05);
}

.signup-card .input-group.strong input {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.05);
}

.signup-card .input-group.error input {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.05);
  animation: shake 0.3s ease;
}

.signup-card .input-group.success input {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.05);
}

/* Animation de secousse pour les erreurs */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.captcha-section-login {
  transition: border 0.3s ease;
}

.signup-card.shake {
  animation: shake 0.5s ease;
}

/* États de focus améliorés */
.signup-card .input-group.focused {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

/* Indicateur de force du mot de passe */
.password-strength {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.signup-card .input-group:has(input[type="password"]:not(:placeholder-shown)) .password-strength {
  opacity: 1;
}

.password-strength-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

.weak .password-strength-bar {
  width: 33%;
  background: #ff4757;
}

.medium .password-strength-bar {
  width: 66%;
  background: #ffa502;
}

.strong .password-strength-bar {
  width: 100%;
  background: #2ecc71;
}

/* Couleurs des icônes selon l'état */
.text-danger { color: #ff4757 !important; }
.text-warning { color: #ffa502 !important; }
.text-success { color: #2ecc71 !important; }

/* Animation du spinner pour le bouton */
.signup-btn .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* Info-bulle pour le code de parrainage */
.referral-group {
  position: relative;
}

.referral-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-bottom: 5px;
}

.referral-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
}

.referral-group:hover .referral-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Amélioration visuelle du formulaire */
.signup-card form {
  position: relative;
}

/* Effet de progression */
.form-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--login-primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Animation de succès */
@keyframes successPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.signup-card.success {
  animation: successPulse 0.5s ease;
}

/* Tooltip pour la sécurité du mot de passe */
.password-requirements {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  position: absolute;
  left: 105%;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.password-requirements::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: rgba(0, 0, 0, 0.8);
}

.input-group:has(input[type="password"]:focus) .password-requirements {
  opacity: 1;
  visibility: visible;
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-requirements li {
  padding: 3px 0;
  display: flex;
  align-items: center;
}

.password-requirements li::before {
  content: '✓';
  margin-right: 8px;
  color: #ff4757;
}

.password-requirements li.valid::before {
  color: #2ecc71;
}

/* Responsive pour les tooltips */
@media (max-width: 768px) {
  .password-requirements {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    width: 90%;
    max-width: 300px;
  }
  
  .password-requirements::before {
    display: none;
  }
}
