/* Rajhi — pages d'authentification (s'appuie sur les variables :root de style.css) */

.auth-page {
  min-height: 100vh;
  position: relative;
  background: var(--bg-light);
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(47, 164, 169, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(31, 62, 86, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-light) 45%);
}

nav.auth-nav {
  position: relative;
  z-index: 10;
  background: var(--white);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
  height: 64px;
}

.auth-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-back-home {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-on-light);
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: color 0.25s;
  position: relative;
  padding-bottom: 2px;
}
.auth-back-home:hover {
  color: var(--blue-dark);
}
.auth-back-home::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.auth-back-home:hover::after {
  width: 100%;
}

.auth-main {
  position: relative;
  z-index: 1;
  padding: 48px 5% 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
}

.auth-wrap {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

.auth-header-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-header-logo img {
  max-width: 200px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-dark);
  text-align: center;
  margin-bottom: 8px;
}

.auth-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 24px;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert--success {
  background: rgba(47, 164, 169, 0.12);
  border: 1px solid rgba(47, 164, 169, 0.35);
  color: var(--teal-on-light);
}
.auth-alert--danger {
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: #991b1b;
}
.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.validation-errors {
  margin-bottom: 16px;
}
.validation-errors .error-message {
  font-size: 0.82rem;
  color: #991b1b;
  padding: 8px 12px;
  background: rgba(185, 28, 28, 0.06);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.auth-form .form-group {
  margin-bottom: 4px;
}

.auth-links {
  margin-top: 8px;
  margin-bottom: 8px;
}
.auth-links a {
  font-size: 0.82rem;
  color: var(--teal-on-light);
  font-weight: 600;
  text-decoration: none;
}
.auth-links a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
}
.auth-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider .text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-social-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-dark);
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.auth-social-google:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(31, 62, 86, 0.08);
}

.auth-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--teal-on-light);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover {
  text-decoration: underline;
  color: var(--blue-dark);
}

.auth-back-link {
  text-align: center;
  margin-top: 20px;
}
.auth-back-link a {
  font-size: 0.82rem;
  color: var(--teal-on-light);
  font-weight: 600;
  text-decoration: none;
}
.auth-back-link a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.auth-verify-block {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 22px;
}

.auth-card .form-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-verify-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: underline;
  padding: 8px 0;
}
.auth-btn-link:hover {
  color: var(--blue-dark);
}

.auth-spin {
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 22px;
  }
  .auth-back-home {
    font-size: 0.72rem;
  }
}
