/* MatchHub — Auth modal CSS */

.mh-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: mh-fade-in .2s ease;
}
.mh-auth-overlay[hidden] { display: none; }

.mh-auth-modal {
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 0 80px rgba(124,58,237,.25);
}

.mh-auth-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--mh-text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.mh-auth-close:hover { color: var(--mh-text); }

/* Onglets */
.mh-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--mh-border);
  margin-bottom: 24px;
  gap: 4px;
}
.mh-auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--mh-text-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: all var(--mh-transition);
}
.mh-auth-tab.active,
.mh-auth-tab[aria-selected="true"] {
  color: var(--mh-primary-light);
  border-bottom-color: var(--mh-primary);
}

.mh-auth-panel[hidden] { display: none; }

/* Étapes inscription */
.mh-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.mh-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}
.mh-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--mh-border);
}
.mh-step.active:not(:last-child)::after,
.mh-step.done:not(:last-child)::after { background: var(--mh-primary); }

.mh-step__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--mh-bg-elevated);
  border: 2px solid var(--mh-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--mh-text-muted);
  transition: all .3s;
  z-index: 1;
}
.mh-step.active .mh-step__num {
  background: var(--mh-primary);
  border-color: var(--mh-primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(124,58,237,.5);
}
.mh-step.done .mh-step__num {
  background: var(--mh-success);
  border-color: var(--mh-success);
  color: #fff;
}
.mh-step__label { font-size: 11px; color: var(--mh-text-faint); font-weight: 600; text-transform: uppercase; }
.mh-step.active .mh-step__label { color: var(--mh-primary-light); }

/* Étapes formulaire */
.mh-register-step { display: flex; flex-direction: column; gap: 16px; }
.mh-register-step[hidden] { display: none; }

/* Mot de passe */
.mh-field--password { position: relative; }
.mh-pwd-toggle {
  position: absolute;
  right: 12px; bottom: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--mh-text-muted);
}
.mh-pwd-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 6px;
  background: var(--mh-border);
  overflow: hidden;
}
.mh-pwd-strength::before {
  content: '';
  display: block;
  height: 100%;
  width: var(--strength, 0%);
  background: var(--strength-color, var(--mh-danger));
  transition: width .3s, background .3s;
}

/* Status champs */
.mh-field-status {
  font-size: 12px;
  margin-top: 2px;
}
.mh-field-status.ok    { color: var(--mh-success); }
.mh-field-status.error { color: var(--mh-danger); }
.mh-field-status.loading { color: var(--mh-text-muted); }

/* Badge génération */
.mh-generation-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  background: rgba(124,58,237,.15);
  color: var(--mh-primary-light);
  border-radius: 12px;
  margin-top: 4px;
}

/* Erreur */
.mh-auth-error {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
  border-radius: var(--mh-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
}

/* Btns rangée */
.mh-btn-row { display: flex; gap: 10px; justify-content: space-between; }

/* Légal */
.mh-auth-legal {
  font-size: 11px;
  color: var(--mh-text-faint);
  text-align: center;
  margin-top: 8px;
}
.mh-auth-legal a { color: var(--mh-primary-light); }
.mh-auth-forgot { text-align: center; font-size: 13px; }
.mh-auth-forgot a { color: var(--mh-text-muted); }

/* Intérêts dans le modal */
.mh-interests-label { font-size: 13px; font-weight: 600; color: var(--mh-text-muted); margin: 0; }

/* Picker compact dans le modal */
.mh-auth-panel .mh-interests-picker {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius-sm);
  padding: 8px;
}

/* Vérification email */
.mh-verify-box {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.mh-verify-icon { display: block; font-size: 56px; margin-bottom: 20px; }
.mh-verify-box h2 { font-size: 24px; margin-bottom: 12px; color: var(--mh-text); }
.mh-verify-box p  { color: var(--mh-text-muted); margin-bottom: 20px; }
.mh-verify-box--success .mh-verify-icon { filter: none; }
.mh-verify-box--error   { }

/* Mobile */
@media (max-width: 480px) {
  .mh-auth-modal {
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
    max-width: 100%;
    padding: 24px 20px;
  }
  .mh-auth-overlay { align-items: flex-end; padding: 0; }
}
