/* TraininBlue — Login & registration (scoped to .tb-auth-page) */

.main-content-wrapper.tb-auth-layout {
  min-height: 0 !important;
  background: #f3f7fc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 24px !important;
}

.main-content-wrapper.tb-auth-layout ~ #main-footer {
  margin-top: 0 !important;
}

div:has(> .main-content-wrapper.tb-auth-layout) {
  background: #f3f7fc;
}

.tb-auth-page {
  --tb-auth-primary: #456fb8;
  --tb-auth-primary-hover: #3a5f9e;
  --tb-auth-text: #172f59;
  --tb-auth-muted: #6f82a3;
  --tb-auth-border: #d6e1f2;
  --tb-auth-background: #f3f7fc;
  --tb-auth-surface: #ffffff;
  --tb-auth-social-bg: #f7faff;
  --tb-auth-danger-bg: #fdf1ef;
  --tb-auth-danger-text: #b4372b;
  --tb-auth-success-bg: #edfbf4;
  --tb-auth-success-text: #16875c;
  --tb-auth-radius: 16px;
  --tb-auth-input-h: 44px;

  box-sizing: border-box;
  width: 100%;
  background: var(--tb-auth-background);
  padding: 16px;
  margin: 0;
}

.tb-auth-page *,
.tb-auth-page *::before,
.tb-auth-page *::after {
  box-sizing: border-box;
}

.tb-auth-page .tb-auth-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.tb-auth-page .tb-auth-card {
  background: var(--tb-auth-surface);
  border: 1px solid var(--tb-auth-border);
  border-radius: var(--tb-auth-radius);
  box-shadow: 0 10px 32px rgba(23, 47, 89, 0.07);
  padding: 26px 28px 22px;
}

/* En-tête maquette (icône + accroche) — pleine largeur */
.tb-auth-page .tb-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--tb-auth-border);
  text-align: left;
}

.tb-auth-page .tb-auth-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef4fc;
  color: var(--tb-auth-primary);
  font-size: 20px;
}

.tb-auth-page .tb-auth-brand__title {
  margin: 0 0 4px;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tb-auth-text);
  letter-spacing: -0.02em;
}

.tb-auth-page .tb-auth-brand__lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--tb-auth-muted);
}

/* Deux colonnes : ~62 % formulaire | ~38 % social */
.tb-auth-page .tb-auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.tb-auth-page .tb-auth-col-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tb-auth-text);
  text-transform: none;
  letter-spacing: 0;
}

.tb-auth-page .tb-auth-col-title--social {
  margin-bottom: 12px;
}

.tb-auth-page .tb-auth-col--social {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--tb-auth-social-bg);
  border: 1px solid #e3ecf8;
}

.tb-auth-page .tb-auth-col--form .tb-auth-form {
  margin: 0;
}

.tb-auth-page .tb-auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.tb-auth-page .tb-auth-label-row .tb-auth-label {
  margin-bottom: 0;
}

.tb-auth-page .tb-auth-link--inline {
  font-size: 0.8rem;
  white-space: nowrap;
}

.tb-auth-page .tb-auth-meta-link {
  margin: -4px 0 12px;
  text-align: right;
}

.tb-auth-page .tb-auth-switch {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--tb-auth-muted);
}

.tb-auth-page .tb-auth-oauth-unavailable {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--tb-auth-muted);
}

.tb-auth-page .tb-auth-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.tb-auth-page .tb-auth-alert--danger {
  background: var(--tb-auth-danger-bg);
  color: var(--tb-auth-danger-text);
  border: 1px solid #f2c9c3;
}

.tb-auth-page .tb-auth-alert--success {
  background: var(--tb-auth-success-bg);
  color: var(--tb-auth-success-text);
  border: 1px solid #bce8d4;
}

.tb-auth-page .tb-auth-field {
  margin-bottom: 12px;
}

.tb-auth-page .tb-auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tb-auth-text);
}

.tb-auth-page .tb-auth-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--tb-auth-border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-auth-page .tb-auth-input-wrap:focus-within {
  border-color: var(--tb-auth-primary);
  box-shadow: 0 0 0 3px rgba(69, 111, 184, 0.14);
}

.tb-auth-page .tb-auth-input-icon {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 14px;
  background: #fafbfd;
  border-right: 1px solid var(--tb-auth-border);
}

.tb-auth-page .tb-auth-input {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--tb-auth-input-h);
  border: 0;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--tb-auth-text);
  background: transparent;
}

.tb-auth-page .tb-auth-input::placeholder {
  color: #9aa8bc;
}

.tb-auth-page .tb-auth-input:focus {
  outline: none;
}

.tb-auth-page .tb-auth-toggle-pw {
  flex: 0 0 42px;
  border: 0;
  background: #fafbfd;
  border-left: 1px solid var(--tb-auth-border);
  color: #64748b;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.tb-auth-page .tb-auth-toggle-pw:hover {
  color: var(--tb-auth-primary);
}

.tb-auth-page .tb-auth-toggle-pw:focus-visible {
  outline: 2px solid var(--tb-auth-primary);
  outline-offset: -2px;
}

.tb-auth-page .tb-auth-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--tb-auth-primary);
  text-decoration: none;
}

.tb-auth-page .tb-auth-link:hover {
  color: var(--tb-auth-primary-hover);
  text-decoration: underline;
}

.tb-auth-page .tb-auth-link-btn {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.tb-auth-page .tb-auth-primary-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 2px 0 0;
  border: 0;
  border-radius: 10px;
  background: var(--tb-auth-primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.tb-auth-page .tb-auth-primary-btn:hover {
  background: var(--tb-auth-primary-hover);
}

.tb-auth-page .tb-auth-primary-btn:active {
  transform: translateY(1px);
}

.tb-auth-page .tb-auth-primary-btn:focus-visible {
  outline: 2px solid var(--tb-auth-primary);
  outline-offset: 2px;
}

.tb-auth-page .tb-auth-primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.tb-auth-page .tb-auth-hint {
  margin: 6px 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--tb-auth-muted);
}

.tb-auth-page .tb-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--tb-auth-muted);
}

.tb-auth-page .tb-auth-check input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--tb-auth-primary);
}

.tb-auth-page .tb-auth-check a {
  color: var(--tb-auth-primary);
  font-weight: 600;
  text-decoration: none;
}

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

.tb-auth-page .tb-auth-social {
  display: grid;
  gap: 8px;
}

.tb-auth-page .tb-auth-social-form {
  margin: 0;
}

.tb-auth-page .tb-auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--tb-auth-border);
  border-radius: 10px;
  background: #fff;
  color: var(--tb-auth-text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tb-auth-page .tb-auth-social-btn:hover {
  background: #fff;
  border-color: #b8cae4;
}

.tb-auth-page .tb-auth-social-btn:focus-visible {
  outline: 2px solid var(--tb-auth-primary);
  outline-offset: 2px;
}

.tb-auth-page .tb-auth-social-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.tb-auth-page .tb-auth-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--tb-auth-border);
  text-align: center;
  font-size: 0.86rem;
  color: var(--tb-auth-muted);
}

.tb-auth-page .tb-auth-footer p {
  margin: 0 0 8px;
}

.tb-auth-page .tb-auth-footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .tb-auth-page .tb-auth-split {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
  }

  .tb-auth-page .tb-auth-card {
    padding: 22px 20px 18px;
  }

  .tb-auth-page .tb-auth-col--social {
    padding: 14px 12px;
  }
}

@media (max-width: 767px) {
  .main-content-wrapper.tb-auth-layout {
    justify-content: flex-start;
    padding-top: var(--tb-layout-top, 70px) !important;
  }

  .tb-auth-page .tb-auth-split {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tb-auth-page .tb-auth-col--social {
    margin-top: 18px;
    background: var(--tb-auth-social-bg);
  }

  .tb-auth-page .tb-auth-brand {
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .tb-auth-page .tb-auth-brand__title {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .tb-auth-page {
    padding: 12px 10px 20px;
  }

  .tb-auth-page .tb-auth-card {
    padding: 18px 16px 16px;
  }

  .tb-auth-page .tb-auth-social-btn {
    min-height: 46px;
  }

  .tb-auth-page .tb-auth-label-row {
    flex-wrap: wrap;
  }
}

/* Parcours RH « Contacter ce formateur » — styles limités au contexte audit */
.tb-auth-page.tb-auth-audit-context .tb-auth-alert--info {
  background: #eef3fb;
  color: var(--tb-auth-text);
  border: 1px solid var(--tb-auth-border);
}

.tb-auth-page.tb-auth-audit-context .tb-auth-audit-choices {
  margin-bottom: 4px;
}

.tb-auth-page.tb-auth-audit-context .tb-auth-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--tb-auth-muted);
  font-size: 0.875rem;
}

.tb-auth-page.tb-auth-audit-context .tb-auth-or-divider::before,
.tb-auth-page.tb-auth-audit-context .tb-auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tb-auth-border);
}

.tb-auth-page.tb-auth-audit-context .tb-auth-or-divider span {
  flex: 0 0 auto;
}

.tb-auth-page.tb-auth-audit-context a.tb-auth-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  line-height: 1.25;
  color: #fff !important;
  text-decoration: none !important;
  box-sizing: border-box;
}

.tb-auth-page.tb-auth-audit-context a.tb-auth-primary-btn:hover,
.tb-auth-page.tb-auth-audit-context a.tb-auth-primary-btn:focus-visible {
  color: #fff !important;
  text-decoration: none !important;
}

.tb-auth-page.tb-auth-audit-context .tb-auth-primary-btn--block {
  width: 100%;
  text-align: center;
}
