/* =============================================================================
   /inscription — styles spécifiques à la page d'inscription admin.
   Ne touche PAS cortexia.css. Réutilise au maximum les classes auth-*.
   ============================================================================= */

/* Carte légèrement plus large pour accueillir prénom + nom sur deux colonnes. */
.auth-card--wide {
  max-width: 540px;
}

/* Rangée à 2 colonnes (prénom / nom) — empile en mobile. */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .auth-row {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------------------------
   Checklist mot de passe fort.
   ----------------------------------------------------------------------------- */
.password-checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
@media (max-width: 520px) {
  .password-checklist { grid-template-columns: 1fr; }
}
.password-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.3;
}
.password-checklist .pwc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-border);
  flex: 0 0 auto;
  transition: background 0.15s;
}
.password-checklist li.is-ok { color: var(--c-text); }
.password-checklist li.is-ok .pwc-dot { background: #10b981; }
.password-checklist li.is-ko .pwc-dot { background: #f87171; }

/* -----------------------------------------------------------------------------
   Sélecteur de profil (proche / aidant) — deux gros boutons côte à côte.
   ----------------------------------------------------------------------------- */
.profile-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
@media (max-width: 520px) {
  .profile-picker { grid-template-columns: 1fr; }
}
.profile-option {
  appearance: none;
  background: var(--c-bg, #fff);
  border: 1.5px solid var(--c-border);
  border-radius: 14px;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  font-family: inherit;
  color: var(--c-text);
  text-align: left;
}
.profile-option:hover {
  border-color: var(--c-primary-light);
  background: var(--c-tint-cool, #f8fafc);
}
.profile-option.selected,
.profile-option[aria-checked="true"] {
  border-color: var(--c-primary);
  background: var(--c-primary-light, #e0f2fe);
  box-shadow: 0 0 0 3px rgba(0, 157, 152, 0.15);
}
.profile-option .profile-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text);
}
.profile-option .profile-desc {
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.35;
}

/* -----------------------------------------------------------------------------
   Consent row (case à cocher RGPD + lien modal).
   ----------------------------------------------------------------------------- */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--c-text);
  line-height: 1.4;
  cursor: pointer;
}
.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--c-primary);
  flex: 0 0 auto;
}
.inline-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--c-primary);
  text-decoration: underline;
  cursor: pointer;
}
.inline-link:hover { color: var(--c-primary-dark); }

/* -----------------------------------------------------------------------------
   Variante de bouton "ghost" pour le bouton Refuser de la modal.
   ----------------------------------------------------------------------------- */
.auth-btn--ghost {
  background: transparent;
  color: var(--c-muted);
  border: 1.5px solid var(--c-border);
}
.auth-btn--ghost:hover {
  background: var(--c-tint-cool, #f1f5f9);
  color: var(--c-text);
}

/* -----------------------------------------------------------------------------
   Modal politique de confidentialité.
   ----------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: var(--c-bg, #fff);
  border-radius: 18px;
  max-width: 600px;
  width: 100%;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
.modal-header {
  padding: 20px 24px 8px;
  border-bottom: 1px solid var(--c-border);
}
.modal-header h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: var(--c-text);
}
.modal-header .muted {
  margin: 0;
  font-size: 0.82rem;
  color: var(--c-muted);
}
.modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  color: var(--c-text);
  font-size: 0.92rem;
  line-height: 1.55;
}
.modal-body h3 {
  margin: 18px 0 6px;
  font-size: 0.98rem;
  color: var(--c-primary-dark, #0e7e7a);
}
.modal-body p { margin: 0 0 8px; }
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--c-border);
  justify-content: flex-end;
}
.modal-footer .auth-btn {
  width: auto;
  min-width: 120px;
}

/* -----------------------------------------------------------------------------
   Message de succès (mot de passe oublié + reset) + variante lien des boutons.
   ----------------------------------------------------------------------------- */
.auth-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 14px;
}
[data-theme="dark"] .auth-success {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.4);
}

/* Bouton qui se comporte comme un lien (utilisé sur les sections succès). */
.auth-btn--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* -----------------------------------------------------------------------------
   Auth alert — au cas où la classe n'est pas définie côté connexion.
   (Le style générique vient déjà de cortexia.css ; on ajoute seulement un
   filet de sécurité visuel si jamais.)
   ----------------------------------------------------------------------------- */
.auth-alert:not([hidden]) {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}
[data-theme="dark"] .auth-alert:not([hidden]) {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}
