:root {
  --auth-primary: #C62828;
  --auth-primary-light: #EF5350;
  --auth-primary-dark: #8E0000;
  --auth-bg: #f5f5f5;
  --auth-card-bg: #ffffff;
  --auth-text: #333333;
  --auth-text-muted: #777777;
  --auth-border: #e0e0e0;
  --auth-radius: 12px;
  --auth-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--auth-bg);
}

.auth-page .auth-visual {
  flex: 1;
  background-image: url(../build/images/bg_2.jpg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: white;
}

.auth-page .auth-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

}

.auth-page .auth-visual-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.auth-page .auth-visual-inner .auth-logo {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.auth-page .auth-visual-inner h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-page .auth-visual-inner p {
  font-size: 1.1rem;
  opacity: 0.85;
}

.auth-page .auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-page .auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 0;
}

.auth-page .auth-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 0.25rem;
}

.auth-page .auth-card h2 strong {
  color: var(--auth-primary);
}

.auth-page .auth-card .auth-subtitle {
  color: var(--auth-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.auth-page .form-group {
  margin-bottom: 1.25rem;
}

.auth-page .form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--auth-text);
  margin-bottom: 0.5rem;
}

.auth-page .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--auth-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fff;
  color: var(--auth-text);
}

.auth-page .form-control:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.auth-page .form-control::placeholder {
  color: #bbb;
}

.auth-page .auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.auth-page .auth-options .remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.auth-page .auth-options .remember-me input {
  accent-color: var(--auth-primary);
  width: 16px;
  height: 16px;
}

.auth-page .auth-options a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-page .auth-options a:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

.auth-page .btn-auth {
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.auth-page .btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(198, 40, 40, 0.4);
}

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

.auth-page .auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--auth-text-muted);
}

.auth-page .auth-footer a {
  color: var(--auth-primary);
  text-decoration: none;
}

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

.auth-page .auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--auth-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.auth-page .auth-back-link:hover {
  color: var(--auth-primary);
}

/* 2FA code input */
.auth-2fa-code-input {
  font-size: 1.75rem !important;
  font-family: "Courier New", Courier, monospace !important;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5em;
  padding: 0.75rem 0.5rem 0.75rem 1rem !important;
}

.auth-2fa-code-input::placeholder {
  letter-spacing: 0.5em;
  font-family: "Courier New", Courier, monospace;
}

/* 2FA multiple providers */
.auth-2fa-providers {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.auth-2fa-provider-link {
  padding: 0.35rem 0.75rem;
  background: var(--auth-bg);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--auth-text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.auth-2fa-provider-link:hover {
  background: var(--auth-primary);
  color: white;
  text-decoration: none;
}

/* 2FA cancel link */
.auth-2fa-cancel {
  margin-top: 1rem;
  text-align: center;
}

.auth-2fa-cancel a {
  color: var(--auth-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.auth-2fa-cancel a:hover {
  color: var(--auth-primary);
}

/* Password strength indicator */
.auth-password-strength {
  margin-top: 0.5rem;
}

.auth-password-strength .strength-bar {
  height: 4px;
  background: var(--auth-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.auth-password-strength .strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.auth-password-strength .strength-text {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
}

/* Alert modern */
.auth-alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-alert-danger {
  background: #FDECEA;
  color: #C62828;
  border: 1px solid #F5C6CB;
}

.auth-alert-success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}

/* Modal for mentions légales / CGU */
.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--auth-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--auth-text);
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--auth-text-muted);
  line-height: 1;
}

.auth-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--auth-text);
}

.auth-modal-body h4 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  color: var(--auth-primary);
}

.auth-modal-body p {
  margin: 0 0 0.75rem;
}

/* Responsive */
@media (max-width: 991px) {
  .auth-page {
    flex-direction: column;
  }
  .auth-page .auth-visual {
    min-height: 200px;
  }
  .auth-page .auth-form-side {
    padding: 1.5rem;
  }
  .auth-page .auth-card {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .auth-page .auth-visual {
    display: none;
  }
  .auth-page .auth-form-side {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
}