:root {
  color-scheme: light;
  --fb-navy: #062f62;
  --fb-blue: #0b6ed0;
  --fb-blue-light: #edf6ff;
  --fb-gold: #ffc43b;
  --fb-green: #18a653;
  --fb-green-dark: #108342;
  --fb-text: #0a2b52;
  --fb-muted: #607286;
  --fb-border: #d9e6f2;
  --fb-surface: #ffffff;
  --fb-page: #eef4fb;
  --fb-danger: #b42318;
  --fb-danger-soft: #fff4f2;
  --fb-radius-large: 24px;
  --fb-radius-medium: 16px;
  --fb-radius-small: 11px;
  --fb-shadow-card: 0 24px 52px -20px rgba(6, 47, 98, 0.28);
  --fb-shadow-action: 0 12px 26px -12px rgba(6, 47, 98, 0.44);
  --fb-font-body: "Nunito Sans", Arial, Helvetica, sans-serif;
  --fb-font-display: "Baloo 2", "Nunito Sans", Arial, Helvetica, sans-serif;

  --brand-primary: var(--fb-blue);
  --brand-primary-light: #1c7fe6;
  --brand-primary-dark: #07569f;
  --brand-primary-rgb: 11, 110, 208;
  --brand-on-primary: #ffffff;
  --brand-secondary: var(--fb-gold);
  --brand-secondary-light: #ffd35e;
  --brand-secondary-dark: #e39b00;
  --brand-secondary-rgb: 255, 196, 59;
  --brand-on-secondary: #4a2e00;
  --brand-accent: var(--fb-navy);
  --brand-accent-rgb: 6, 47, 98;
}

.fb-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fb-brand-logo {
  display: block;
  width: auto;
  max-width: min(260px, 62vw);
  height: 50px;
  object-fit: contain;
  object-position: left center;
}

.fb-brand-copy { min-width: 0; }

.fb-brand-name {
  margin: 0;
  font-family: var(--fb-font-display);
  font-weight: 800;
  line-height: 1.05;
}

.fb-powered-by {
  display: none;
  margin-top: 3px;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .78;
}

html[data-branding-enabled="true"] .fb-powered-by { display: block; }

.fb-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.fb-loading-dots::before,
.fb-loading-dots::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: fb-pulse 1.1s ease-in-out infinite alternate;
}

.fb-loading-dots::after { animation-delay: .28s; }

@keyframes fb-pulse {
  from { opacity: .28; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .fb-loading-dots::before,
  .fb-loading-dots::after { animation: none; }
}

/* Composition commune des pages de connexion. */
.fb-auth-stage {
  width: min(1160px, calc(100% - 32px));
  margin: clamp(28px, 6vh, 72px) auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .82fr);
  gap: 24px;
  align-items: stretch;
}

.fb-auth-visual {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 30px;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(6, 47, 98, .18), rgba(6, 47, 98, .8)),
    url("/images/banner-1x.jpg") center 44% / cover no-repeat;
  box-shadow: 0 30px 70px -32px rgba(6, 47, 98, .52);
}

.fb-auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 196, 59, .38), transparent 19rem),
    linear-gradient(180deg, transparent 38%, rgba(4, 29, 60, .82));
}

.fb-auth-visual-content {
  position: absolute;
  z-index: 1;
  right: clamp(24px, 5vw, 52px);
  bottom: clamp(24px, 5vw, 48px);
  left: clamp(24px, 5vw, 52px);
}

.fb-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(3, 35, 72, .34);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fb-auth-visual h1 {
  max-width: 590px;
  margin: 15px 0 5px;
  color: #fff;
  font-family: var(--fb-font-display);
  font-size: clamp(34px, 5vw, 58px);
  line-height: .98;
  text-wrap: balance;
}

.fb-auth-visual p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 16px;
  line-height: 1.5;
}

.fb-auth-card {
  align-self: center;
  margin: 0;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(185, 204, 224, .72);
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--fb-shadow-card);
  backdrop-filter: blur(18px);
}

.fb-auth-card h2,
.fb-auth-card h1 {
  margin-top: 0;
  font-family: var(--fb-font-display);
  line-height: 1.08;
}

@media (max-width: 840px) {
  .fb-auth-stage { grid-template-columns: 1fr; width: min(620px, calc(100% - 24px)); margin-block: 20px 40px; }
  .fb-auth-visual { min-height: 220px; border-radius: 24px; }
  .fb-auth-visual h1 { font-size: clamp(30px, 8vw, 44px); }
  .fb-auth-card { border-radius: 22px; }
}

@media (max-width: 520px) {
  .fb-auth-stage { width: calc(100% - 20px); gap: 12px; margin-top: 10px; }
  .fb-auth-visual { min-height: 170px; border-radius: 20px; }
  .fb-auth-visual-content { inset: auto 20px 20px; }
  .fb-auth-visual p { display: none; }
  .fb-auth-card { padding: 22px 18px; border-radius: 20px; }
}
