:root {
  /* Couleurs */
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: rgba(67, 97, 238, 0.1);
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --info: #4895ef;
  --light: #f8f9fa;
  --dark: #212529;
  --white: #ffffff;
  
  /* Text Colors */
  --text-primary: #2b2d42;
  --text-secondary: #4a4e69;
  --text-muted: #8e9aaf;
  
  /* Backgrounds */
  --bg-light: #f8f9fa;
  --bg-dark: #212529;
  
  /* Borders */
  --border-color: #dee2e6;
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.unified-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: var(--space-xl);
  background-color: var(--bg-light);
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.unified-card {
  background: var(--white);
  border-radius: var(--border-radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  width: 100%;
  max-width: 1100px;
  min-height: 700px;
}

.unified-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  height: 100%;
}

.panel-left {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
}

.panel-right {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: var(--white);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.panel-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjA1KSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNwYXR0ZXJuKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==');
  opacity: 0.3;
}

.login-brand {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.login-brand a {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.login-brand a:hover {
  transform: scale(1.05);
}

.login-brand img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
}

.signup-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.signup-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-2xl);
  font-size: var(--font-size-lg);
  font-weight: 400;
}

.error-summary {
  background-color: rgba(247, 37, 133, 0.1);
  color: var(--danger);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  border-left: 4px solid var(--danger);
  font-size: var(--font-size-sm);
}

.error-summary i {
  font-size: var(--font-size-lg);
  margin-right: var(--space-sm);
}

.error-summary-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--danger);
  margin: 0;
}

.error-summary-list {
  padding-left: 1.25rem;
  margin: var(--space-sm) 0 0 0;
  list-style: none;
}

.error-summary-list li {
  margin-bottom: var(--space-xs);
}

.error-summary-list a {
  color: var(--danger);
  text-decoration: underline;
  font-weight: 500;
}

.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.required {
  color: var(--danger);
  margin-left: var(--space-xs);
}

.input-container {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 16px 12px 52px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-base);
  transition: var(--transition-fast);
  background-color: var(--bg-light);
  height: 52px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
  background-color: var(--white);
}

.form-input.is-valid {
  border-color: var(--success);
  background-image: none;
}

.form-input.is-invalid {
  border-color: var(--danger);
  background-image: none;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  z-index: 2;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-password:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

.help-text {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  padding-left: var(--space-xs);
}

.error-message {
  font-size: var(--font-size-sm);
  color: var(--danger);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  padding-left: var(--space-xs);
}

.error-message i {
  margin-right: var(--space-sm);
}

.captcha-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.captcha-question {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--bg-light);
  padding: var(--space-md);
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.terms-group {
  margin-top: var(--space-2xl);
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.custom-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: var(--space-md);
  accent-color: var(--primary);
  cursor: pointer;
  position: relative;
  top: 2px;
}

.custom-checkbox label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  flex: 1;
}

.custom-checkbox a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.custom-checkbox a:hover {
  text-decoration: underline;
}

.checkbox-error-tag {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: var(--space-xs);
  background-color: var(--danger);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  animation: fadeIn 0.3s ease;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.checkbox-error-tag::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--danger) transparent;
}

.custom-checkbox.error .checkbox-error-tag {
  display: block;
}

.btn-signup {
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  position: relative;
  overflow: hidden;
  height: 52px;
}

.btn-signup:hover {
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-signup:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  font-size: 1rem;
}

.spinner {
  display: none;
  position: absolute;
  right: var(--space-md);
}

.spinner i {
  animation: spin 1s linear infinite;
}

.signup-footer {
  text-align: center;
  margin-top: var(--space-2xl);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.signup-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.signup-footer a:hover {
  text-decoration: underline;
}

.copyright {
  margin-top: var(--space-md);
  font-size: var(--font-size-xs);
}

/* Panel Right Styles */
.panel-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.security-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius-xl);
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.security-badge i {
  margin-right: var(--space-sm);
}

.panel-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.panel-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2xl);
  font-size: var(--font-size-lg);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.stat-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  color: var(--white);
  flex-shrink: 0;
}

.stat-icon.bg-primary {
  background-color: rgba(67, 97, 238, 0.2);
}

.stat-icon.bg-success {
  background-color: rgba(76, 201, 240, 0.2);
}

.stat-icon.bg-info {
  background-color: rgba(72, 149, 239, 0.2);
}

.stat-icon.bg-warning {
  background-color: rgba(248, 150, 30, 0.2);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--white);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
}

.features-highlight {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  backdrop-filter: blur(5px);
}

.features-highlight h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--white);
  text-align: center;
}

.features-highlight ul {
  list-style: none;
  padding: 0;
}

.features-highlight li {
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-sm);
}

.features-highlight li i {
  margin-right: var(--space-sm);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-xl);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.trust-badge i {
  margin-right: var(--space-xs);
  color: var(--white);
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
  .unified-grid {
    grid-template-columns: 1fr;
  }
  
  .panel-right {
    display: none;
  }
  
  .panel-left {
    padding: var(--space-xl);
  }
  
  .unified-card {
    min-height: auto;
  }
}

@media (max-width: 575.98px) {
  .unified-card-wrapper {
    padding: var(--space-md);
  }
  
  .panel-left {
    padding: var(--space-lg);
  }
  
  .signup-title {
    font-size: var(--font-size-2xl);
  }
  
  .signup-subtitle {
    font-size: var(--font-size-base);
  }
  
  .form-input {
    padding: 12px 16px 12px 50px;
  }
  
  .toggle-password {
    right: 8px;
  }
}