/* auth.css - Page d'authentification */

.auth-page {
  min-height: calc(100vh - 200px);
  padding: var(--space-10) 0;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.auth-wrapper--centered {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Info Panel */
.auth-info {
  position: sticky;
  top: var(--space-8);
}

.auth-info__content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-8);
  box-shadow: var(--shadow);
}

.auth-info__title {
  font: 700 2rem/1.2 "Poppins", sans-serif;
  margin: 0 0 var(--space-4);
}

.auth-info__text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 var(--space-8);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.auth-feature {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.auth-feature__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 226, 166, 0.15), rgba(46, 225, 181, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand);
  flex-shrink: 0;
}

.auth-feature h3 {
  font: 600 1.1rem/1.3 "Poppins", sans-serif;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.auth-feature p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Forms Container */
.auth-forms {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-forms--centered {
  max-width: 480px;
  width: 100%;
}

/* Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  padding: var(--space-4);
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--speed-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.auth-tab:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--brand);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), #2ee1b5);
}

/* Forms */
.auth-form {
  padding: var(--space-8);
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn var(--speed-2) ease;
}

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

.auth-form__header {
  margin-bottom: var(--space-6);
  text-align: center;
}

.auth-form__header h2 {
  font: 700 1.8rem/1.2 "Poppins", sans-serif;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.auth-form__header p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Form Fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--speed-1);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 226, 166, 0.1);
}

.form-field select {
  cursor: pointer;
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Pro Fields */
.pro-fields {
  display: none;
  animation: slideDown var(--speed-2) ease;
}

.pro-fields.show {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 300px; }
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: var(--space-6) 0;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--brand);
}

.form-checkbox label {
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
}

.form-checkbox a {
  color: var(--brand);
  text-decoration: underline;
}

/* Links */
.forgot-link {
  display: inline-block;
  margin: -0.5rem 0 var(--space-6);
  color: var(--brand);
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity var(--speed-1);
}

.forgot-link:hover {
  opacity: 0.8;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(180deg, var(--brand), #2ee1b5);
  color: #05332a;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--speed-1);
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 226, 166, 0.3);
}

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

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit.loading .btn-submit__text {
  opacity: 0;
}

.btn-submit__loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(5, 51, 42, 0.3);
  border-top-color: #05332a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-submit__loader {
  display: block;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Divider "ou" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Bouton Google */
.btn-google {
  width: 100%;
  padding: 12px 24px;
  background: white;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--speed-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:active {
  background: #f1f3f4;
}

.btn-google svg {
  flex-shrink: 0;
}

/* Alerts */
.alert {
  margin-top: var(--space-4);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.alert.show {
  display: block;
  animation: fadeIn var(--speed-2) ease;
}

.alert.error {
  background: rgba(255, 92, 98, 0.15);
  border: 1px solid rgba(255, 92, 98, 0.3);
  color: var(--danger);
}

.alert.success {
  background: rgba(110, 231, 168, 0.15);
  border: 1px solid rgba(110, 231, 168, 0.3);
  color: var(--ok);
}

/* Responsive */
@media (max-width: 968px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }
  
  .auth-info {
    position: static;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .auth-form {
    padding: var(--space-6);
  }
}