/* Styles partagés pour toutes les pages d'authentification (login, signup,
   forgot-password, reset-password, verify-email, accept-invite, change-password).
   Externalisé pour ne pas dupliquer 60 lignes par page.

   v56 — White-label : couleurs exposées en CSS variables. `branding-loader.js`
   surcharge --brand-primary / --brand-accent au runtime depuis /api/branding
   selon le vertical résolu par host. Defaults Discall conservés. */
:root {
  color-scheme: light dark;
  --brand-primary: #2da44e;
  --brand-primary-hover: #2c974b;
  --brand-accent: #388bfd;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1117;
  color: #e6edf3;
}
@media (prefers-color-scheme: light) {
  body { background: #f5f7fa; color: #1f2328; }
  .card { background: #fff; border-color: #d0d7de; }
  input { background: #fff; color: #1f2328; border-color: #d0d7de; }
}
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}
h1 { margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 600; }
.subtitle { margin: 0 0 1.5rem; font-size: .85rem; opacity: .7; }
label { display: block; font-size: .85rem; margin-bottom: .35rem; }
input {
  width: 100%;
  padding: .55rem .75rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  font-size: .95rem;
}
input:focus { outline: 2px solid var(--brand-accent); outline-offset: 0; border-color: transparent; }
.field { margin-bottom: 1rem; }
button {
  width: 100%;
  padding: .6rem;
  border-radius: 6px;
  border: 0;
  background: var(--brand-primary);
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
}
button:hover { background: var(--brand-primary-hover); }
button:disabled { opacity: .5; cursor: default; }
.err { margin-top: .75rem; color: #f85149; font-size: .85rem; min-height: 1.25em; }
.ok  { margin-top: .75rem; color: #3fb950; font-size: .85rem; min-height: 1.25em; }
.note { margin-top: 1rem; font-size: .8rem; opacity: .7; line-height: 1.4; }
.links { margin: 1rem 0 0; font-size: .85rem; text-align: center; opacity: .85; }
.links a { color: var(--brand-accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.policy { margin-top: .5rem; font-size: .75rem; opacity: .65; line-height: 1.4; }

/* v56 — En-tête de marque (logo + nom du vertical) inséré au-dessus du
   titre des pages auth par branding-loader.js. Reste invisible jusqu'à
   ce que le loader pose --brand-display-name (évite un flash "Discall"
   sur sos-serrure.fr le temps que le fetch finisse). */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  min-height: 36px;
}
.brand-header img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--brand-primary);
}
.brand-header img[hidden] { display: none; }
.brand-header .brand-name {
  font-weight: 700;
  letter-spacing: -.2px;
  font-size: 1rem;
}

/* v85 — SSO Google : séparateur "ou" + bouton blanc-Google brand. */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0;
  font-size: .8rem;
  opacity: .55;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .3;
}
.btn-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: .7rem 1rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.btn-sso:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.btn-sso svg { flex: 0 0 18px; }
