/* Modern Login Page Styles */
* {
  box-sizing: border-box;
}

body.modern-login {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow-x: hidden;
  /* Prévient le saut d'animation causé par l'apparition de la scrollbar */
  overflow-y: scroll;
}

.login-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Hero Section (Left Side) */
.hero-section {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  color: white;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-visual {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
}

.floating-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  animation: float 6s ease-in-out infinite;
}

.floating-card.card-2 {
  animation-delay: 2s;
  margin-left: 2rem;
}

.floating-card.card-3 {
  animation-delay: 4s;
  margin-left: 1rem;
}

.floating-card i {
  font-size: 1.25rem;
}

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

/* Login Section (Right Side) */
.login-section {
  flex: 0 0 500px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  width: 80px;
  height: auto;
  margin-bottom: 1.5rem;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  z-index: 2;
}

.modern-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.modern-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper.focused {
  transform: translateY(-1px);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #667eea;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  display: none;
}

.checkbox-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  margin-right: 0.5rem;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-checkmark {
  background: #667eea;
  border-color: #667eea;
}

.checkbox-input:checked + .checkbox-checkmark::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.forgot-password {
  font-size: 0.875rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  color: #5a67d8;
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-login::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-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-icon {
  transition: transform 0.2s ease;
}

.btn-login:hover .btn-icon {
  transform: translateX(3px);
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
}

.footer-text {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.signup-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.signup-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Animations */
.animate-in {
  animation: slideInUp 0.8s ease-out;
}

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

/* Responsive Design */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
  }
  
  .hero-section {
    flex: none;
    min-height: 40vh;
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .hero-visual {
    display: none;
  }
  
  .login-section {
    flex: none;
    padding: 1.5rem;
    box-shadow: none;
  }
}


/* Modern Snackbar */
#snackbar {
    visibility: hidden;
    min-width: 300px;
    margin-left: -150px;
    background: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: slideInUp 0.4s ease-out, slideOutDown 0.4s ease-in 2.6s;
    animation: slideInUp 0.4s ease-out, slideOutDown 0.4s ease-in 2.6s;
}

@-webkit-keyframes slideInUp {
    from {
        bottom: 0;
        opacity: 0;
        transform: translateY(100%);
    } 
    to {
        bottom: 30px;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        bottom: 0;
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        bottom: 30px;
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes slideOutDown {
    from {
        bottom: 30px;
        opacity: 1;
        transform: translateY(0);
    } 
    to {
        bottom: 0;
        opacity: 0;
        transform: translateY(100%);
    }
}

@keyframes slideOutDown {
    from {
        bottom: 30px;
        opacity: 1;
        transform: translateY(0);
    }
    to {
        bottom: 0;
        opacity: 0;
        transform: translateY(100%);
    }
}
