/* ================================================================
 * ProVsup Design System — pv-login.css
 * Page d'identification.
 * Réutilise : pv-input, pv-label, pv-input-group (pv-inputs.css)
 *             pv-btn, pv-btn-primary, pv-btn--full (pv-buttons.css)
 *
 * Thème : suit automatiquement pv-variables.css
 *   light → --bg = #f4f5f7, --surface = #fff
 *   dark  → --bg = #18181a, --surface = #1e1f22
 *
 * Classes :
 *   .pv-login-page        — fond plein écran (flex center)
 *   .pv-login-card        — carte centrée
 *   .pv-login-header      — en-tête sombre (icône + nom + subtitle)
 *   .pv-login-logo-wrap   — conteneur de l'icône du site
 *   .pv-login-site-icon   — icône du site (font icon)
 *   .pv-login-site-name   — nom du site
 *   .pv-login-subtitle    — sous-titre atténué
 *   .pv-login-body        — zone formulaire
 *   .pv-login-error       — message d'erreur inline
 *   .pv-login-footer      — pied (branding Autoprog)
 * ================================================================ */


/* ── Fond de page ───────────────────────────────────────────────── */

/* Cache le template jusqu'à ce qu'Angular ait fini de le compiler */
.pv-login-page[ng-cloak],
.pv-login-page.ng-cloak {
  display: none !important;
}

.pv-theme .pv-login-page {
  position: fixed;
  top: var(--cmdbar-h);
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
  background: var(--bg);
  z-index: 5;
  animation: pv-login-fade 0.28s ease both;
}

@keyframes pv-login-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ── Carte ──────────────────────────────────────────────────────── */

.pv-theme .pv-login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  overflow: hidden;
  /* Force GPU layer : élimine les artefacts de border-radius */
  transform: translateZ(0);
}


/* ── En-tête ────────────────────────────────────────────────────── */

.pv-theme .pv-login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 30px 32px 22px;
  background: var(--cmd-bg);
  border-bottom: 1px solid oklch(1 0 0 / 0.07);
}

.pv-theme .pv-login-logo-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.pv-theme .pv-login-site-icon {
  font-size: 22px;
  color: var(--accent);
}

.pv-theme .pv-login-site-name {
  font-size: 17px;
  font-weight: 700;
  color: oklch(1 0 0 / 0.92);
  font-family: var(--font-ui);
  letter-spacing: -0.01em;
}

.pv-theme .pv-login-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: oklch(1 0 0 / 0.30);
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ── Corps ──────────────────────────────────────────────────────── */

.pv-theme .pv-login-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}

.pv-theme .pv-login-body .pv-input-group {
  margin-bottom: 0;
}


/* ── Erreur ─────────────────────────────────────────────────────── */

.pv-theme .pv-login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: oklch(0.98 0.02 20);
  border: 1px solid oklch(0.88 0.06 20);
  color: oklch(0.45 0.16 20);
  font-size: 12.5px;
  font-family: var(--font-ui);
}

.pv-theme .pv-login-error > i {
  color: oklch(0.58 0.20 20);
  font-size: 13px;
  flex: none;
}


/* ── Bouton pleine largeur ──────────────────────────────────────── */

.pv-theme .pv-login-body .pv-btn {
  border-radius: var(--r-sm);
  height: 40px;
  font-size: 13.5px;
  margin-top: 4px;
}


/* ── Pied branding ──────────────────────────────────────────────── */

.pv-theme .pv-login-footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.pv-theme .pv-login-footer:hover {
  opacity: 0.70;
}

.pv-theme .pv-login-footer-text {
  font-size: 10.5px;
  font-family: var(--font-ui);
  color: var(--text-2);
  letter-spacing: 0.04em;
}
