/*
 * Juridex — système visuel final de l'espace client
 * Chargé après les styles historiques afin d'unifier toutes les vues sans
 * modifier leur structure ni leur logique métier.
 */

:root {
  --jx-navy-950: #071a33;
  --jx-navy-900: #0b2447;
  --jx-blue-800: #123b79;
  --jx-blue-700: #0b2d5f;
  --jx-blue-100: #eaf1fb;
  --jx-red-700: #cf2434;
  --jx-red-600: #ae1828;
  --jx-red-100: #fff0f1;
  --jx-ink: #142033;
  --jx-muted: #5e6b7d;
  --jx-muted-2: #758095;
  --jx-line: #dce4ee;
  --jx-line-strong: #c4cfdd;
  --jx-surface: #ffffff;
  --jx-surface-soft: #f5f7fb;
  --jx-surface-tint: #eef3f9;
  --jx-success: #137044;
  --jx-success-soft: #eaf8f0;
  --jx-warning: #7a5b00;
  --jx-warning-soft: #fff7d9;
  --jx-danger: #a91422;
  --jx-danger-soft: #ffeaec;
  --jx-focus: #1f60c4;
  --jx-radius-sm: 8px;
  --jx-radius-md: 12px;
  --jx-radius-lg: 16px;
  --jx-shadow-sm: 0 8px 24px rgba(7, 26, 51, 0.07);
  --jx-shadow-md: 0 16px 42px rgba(7, 26, 51, 0.1);
  --jx-font: Inter, "Segoe UI", Arial, sans-serif;
  --jx-text-xs: 0.78rem;
  --jx-text-sm: 0.875rem;
  --jx-text-base: 1rem;
  --jx-text-lg: clamp(1.05rem, 1.6vw, 1.16rem);
  --jx-title-2: clamp(1.3rem, 2.2vw, 1.65rem);
  --jx-title-1: clamp(2rem, 4.25vw, 3.45rem);
  --jx-brand-title-size: 1.35rem;
  --jx-brand-title-size-mobile: 1.2rem;
  --jx-brand-subtitle-size: 0.72rem;
}

html {
  color-scheme: light;
  font-family: var(--jx-font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: var(--jx-font);
}

body {
  color: var(--jx-ink);
}

* {
  box-sizing: border-box;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--jx-focus);
  outline-offset: 3px;
}

::selection {
  color: #fff;
  background: var(--jx-blue-800);
}

.jx-skip-link {
  z-index: 10000;
  color: var(--jx-navy-950);
  background: #fff;
  border: 2px solid var(--jx-blue-800);
  border-radius: var(--jx-radius-sm);
  box-shadow: var(--jx-shadow-sm);
}

/* Authentification ------------------------------------------------------- */

body:has(.client-auth-shell) {
  min-width: 320px;
  color: var(--jx-ink);
  background:
    radial-gradient(circle at 9% 10%, rgba(23, 81, 165, 0.1), transparent 30rem),
    linear-gradient(150deg, #f8fafe 0%, var(--jx-surface-soft) 48%, #eef3f9 100%);
}

.client-auth-shell {
  min-height: 100svh;
}

.client-auth-top {
  min-height: 76px;
  padding: 12px clamp(18px, 4.5vw, 64px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--jx-line);
  box-shadow: 0 8px 28px rgba(7, 26, 51, 0.06);
  backdrop-filter: blur(14px);
}

.client-auth-brand {
  gap: 11px;
  color: var(--jx-navy-950);
}

.client-auth-brand img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--jx-line);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(7, 26, 51, 0.09);
}

.client-auth-brand strong {
  display: block;
  color: var(--jx-navy-950);
  font-family: var(--jx-font);
  font-size: var(--jx-brand-title-size);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.client-auth-brand small {
  display: block;
  margin-top: 3px;
  color: var(--jx-muted);
  font-family: var(--jx-font);
  font-size: var(--jx-brand-subtitle-size);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.005em;
}

.client-auth-back,
.client-auth-shell .jx-button {
  min-height: 44px;
  border-radius: 10px;
  font-family: var(--jx-font);
  font-size: 0.94rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.client-auth-back {
  padding: 0 20px;
  color: #fff;
  background: var(--jx-red-700);
  border-color: var(--jx-red-700);
  box-shadow: 0 7px 18px rgba(200, 23, 39, 0.18);
}

.client-auth-back:hover,
.client-auth-back:focus-visible,
.client-auth-shell .jx-button:hover,
.client-auth-shell .jx-button:focus-visible {
  transform: translateY(-1px);
}

.client-auth-back:hover,
.client-auth-back:focus-visible {
  background: var(--jx-red-600);
  border-color: var(--jx-red-600);
}

.client-auth-shell .client-auth-main {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 8vw, 96px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(36px, 7vw, 86px);
  align-items: center;
}

.client-auth-shell .client-auth-copy {
  max-width: 650px;
}

.client-auth-copy .jx-client-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0;
  padding: 6px 11px;
  color: var(--jx-blue-800);
  background: var(--jx-blue-100);
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  font-size: var(--jx-text-xs);
  font-weight: 800;
  letter-spacing: 0.055em;
}

.client-auth-shell .client-auth-copy h1 {
  min-width: 0;
  max-width: 720px;
  margin: 18px 0 18px;
  color: #fff;
  font-size: var(--jx-title-1);
  font-weight: 820;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.client-auth-shell .client-auth-copy p {
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--jx-text-lg);
  font-weight: 450;
  line-height: 1.7;
}

.client-auth-copy .auth-actions {
  margin-top: 26px;
}

.auth-panel {
  width: 100%;
  padding: clamp(22px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--jx-line);
  border-radius: var(--jx-radius-lg);
  box-shadow: var(--jx-shadow-md);
}

.auth-tabs {
  gap: 5px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--jx-surface-tint);
  border: 1px solid var(--jx-line);
  border-radius: 12px;
}

.auth-tabs a {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--jx-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 750;
}

.auth-tabs a.is-active {
  color: #fff;
  background: var(--jx-blue-800);
  box-shadow: 0 5px 14px rgba(18, 61, 130, 0.2);
}

.auth-panel label,
.jx-client-app .jx-card label {
  color: var(--jx-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-panel input,
.auth-panel select,
.auth-panel textarea,
.jx-client-app .jx-card :is(input, select, textarea) {
  min-height: 46px;
  color: var(--jx-ink);
  background: #fff;
  border: 1px solid var(--jx-line-strong);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 1px 0 rgba(7, 26, 51, 0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.auth-panel input:hover,
.auth-panel select:hover,
.auth-panel textarea:hover,
.jx-client-app .jx-card :is(input, select, textarea):hover {
  border-color: #9eacc0;
}

.auth-panel :is(input, select, textarea):focus,
.jx-client-app .jx-card :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--jx-blue-700);
  box-shadow: 0 0 0 4px rgba(120, 167, 255, 0.24);
}

.auth-panel :is(input, select, textarea):focus-visible,
.jx-client-app .jx-card :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--jx-focus);
  outline-offset: 2px;
}

.auth-consent-stack {
  display: grid;
  gap: 11px;
  margin: 5px 0 16px;
}

.auth-consent-stack label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  color: var(--jx-muted);
  font-size: var(--jx-text-sm);
  font-weight: 550;
}

.auth-consent-stack input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 2px 0 0;
  accent-color: var(--jx-blue-800);
}

.auth-consent-stack label > span {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.auth-consent-stack label > span a {
  color: var(--jx-blue-800);
  font-weight: 700;
  text-underline-offset: 2px;
}

.auth-panel .auth-helper a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-block: 8px;
}

.client-auth-shell .jx-button,
.jx-client-app .jx-button {
  max-width: 100%;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
}

.client-auth-shell .jx-button.red,
.jx-client-app .jx-button.red {
  color: #fff;
  background: var(--jx-red-700);
  border: 1px solid var(--jx-red-700);
}

.client-auth-shell .jx-button.blue,
.jx-client-app .jx-button.blue {
  color: #fff;
  background: var(--jx-blue-800);
  border: 1px solid var(--jx-blue-800);
}

.client-auth-shell .jx-button.ghost,
.jx-client-app .jx-button.ghost {
  color: var(--jx-blue-800);
  background: #fff;
  border: 1px solid #b9c8dc;
}

.client-auth-shell .jx-button:hover,
.jx-client-app .jx-button:hover {
  filter: brightness(0.95);
  box-shadow: 0 6px 16px rgba(7, 26, 51, 0.12);
}

.client-auth-shell .jx-button.red:hover,
.client-auth-shell .jx-button.red:focus-visible,
.jx-client-app .jx-button.red:hover,
.jx-client-app .jx-button.red:focus-visible {
  background: var(--jx-red-600);
  border-color: var(--jx-red-600);
}

.client-auth-shell .jx-button.blue:hover,
.client-auth-shell .jx-button.blue:focus-visible,
.jx-client-app .jx-button.blue:hover,
.jx-client-app .jx-button.blue:focus-visible {
  background: var(--jx-blue-700);
  border-color: var(--jx-blue-700);
}

.auth-error,
.auth-success {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  font-size: var(--jx-text-sm);
  font-weight: 650;
  line-height: 1.5;
}

.auth-error {
  color: var(--jx-danger);
  background: var(--jx-danger-soft);
  border: 1px solid #f4c7cc;
  border-left: 4px solid var(--jx-red-700);
}

.auth-success {
  color: var(--jx-success);
  background: var(--jx-success-soft);
  border: 1px solid #bfdfcd;
  border-left: 4px solid var(--jx-success);
}

.auth-helper {
  color: var(--jx-muted);
  font-size: var(--jx-text-sm);
  font-weight: 500;
  line-height: 1.55;
}

.auth-helper a {
  color: var(--jx-blue-800);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* Portail connecté ------------------------------------------------------- */

.jx-client-app {
  min-width: 320px;
  min-height: 100svh;
  color: var(--jx-ink);
  background:
    linear-gradient(180deg, #eef3f9 0, var(--jx-surface-soft) 220px, var(--jx-surface-soft) 100%);
  font-size: var(--jx-text-base);
}

.jx-client-top {
  min-height: 80px;
  padding: 12px clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--jx-line);
  box-shadow: 0 7px 25px rgba(7, 26, 51, 0.06);
  backdrop-filter: blur(14px);
}

.jx-client-brand {
  gap: 11px;
  color: var(--jx-navy-950);
}

.jx-client-brand img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--jx-line);
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(7, 26, 51, 0.08);
}

.jx-client-brand strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--jx-navy-950);
  font-family: var(--jx-font);
  font-size: var(--jx-brand-title-size);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.jx-client-brand small {
  display: block;
  margin-top: 3px;
  color: var(--jx-muted);
  font-family: var(--jx-font);
  font-size: var(--jx-brand-subtitle-size);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.005em;
}

.jx-client-actions {
  gap: 8px;
}

.jx-client-hello {
  min-width: 0;
  max-width: 26ch;
  margin-right: 4px;
  color: var(--jx-muted);
  font-size: var(--jx-text-sm);
  font-weight: 650;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.jx-client-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(18px, 2.3vw, 30px);
  width: min(1480px, 100%);
  padding: clamp(18px, 3vw, 34px);
}

.jx-client-sidebar {
  top: 106px;
  padding: 12px;
  color: #fff;
  background: linear-gradient(155deg, var(--jx-navy-900), var(--jx-navy-950));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--jx-radius-md);
  box-shadow: 0 16px 38px rgba(6, 23, 46, 0.17);
}

.jx-client-sidebar a {
  position: relative;
  min-height: 44px;
  margin-bottom: 3px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.jx-client-sidebar a:hover,
.jx-client-sidebar a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.jx-client-sidebar a:focus-visible,
.client-auth-copy .jx-button:focus-visible {
  outline-color: #fff;
}

.jx-client-sidebar a.is-active {
  color: #fff;
  background: var(--jx-blue-700);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.jx-client-sidebar a.is-active::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 3px;
  height: 20px;
  background: #fff;
  border-radius: 0 3px 3px 0;
  content: "";
  transform: translateY(-50%);
}

.jx-client-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.jx-client-hero,
.jx-client-panel {
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--jx-surface);
  border: 1px solid var(--jx-line);
  border-radius: var(--jx-radius-md);
  box-shadow: var(--jx-shadow-sm);
}

.jx-client-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  border-left: 1px solid var(--jx-line);
}

.jx-client-hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--jx-blue-700), var(--jx-red-700));
  content: "";
}

.jx-client-eyebrow {
  margin: 0 0 8px;
  color: var(--jx-blue-800);
  font-size: var(--jx-text-xs);
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1.3;
}

.jx-client-hero h1 {
  min-width: 0;
  max-width: 100%;
  margin: 0 0 9px;
  color: var(--jx-navy-950);
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 820;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.jx-readable {
  color: var(--jx-muted);
  font-size: clamp(0.96rem, 1.5vw, 1.04rem);
  line-height: 1.68;
}

.jx-grid,
.jx-service-summary {
  gap: 13px;
}

.jx-card {
  min-width: 0;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--jx-line);
  border-radius: 10px;
  box-shadow: none;
}

.jx-card > span:first-child {
  color: var(--jx-muted);
  font-size: var(--jx-text-sm);
  font-weight: 650;
}

.jx-card > strong,
.jx-card strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-top: 5px;
  color: var(--jx-navy-950);
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.jx-card.compact strong {
  font-size: 1.04rem;
  line-height: 1.4;
}

.jx-card[class*="jx-tone-"] {
  border-left-width: 4px;
}

.jx-card.jx-tone-info {
  background: #f8fafe;
  border-left-color: var(--jx-blue-800);
}

.jx-card.jx-tone-warning {
  background: var(--jx-warning-soft);
  border-color: #ead798;
  border-left-color: var(--jx-warning);
}

.jx-card.jx-tone-warning strong {
  color: var(--jx-warning);
}

.jx-card.jx-tone-success {
  background: var(--jx-success-soft);
  border-color: #b9ddca;
  border-left-color: var(--jx-success);
}

.jx-card.jx-tone-success strong {
  color: var(--jx-success);
}

.jx-card.jx-tone-danger {
  background: var(--jx-danger-soft);
  border-color: #efbcc3;
  border-left-color: var(--jx-danger);
}

.jx-card.jx-tone-danger strong {
  color: var(--jx-danger);
}

.jx-panel-head {
  margin-bottom: 17px;
}

.jx-panel-head h2,
.jx-client-panel > h2 {
  min-width: 0;
  max-width: 100%;
  color: var(--jx-navy-950);
  font-size: var(--jx-title-2);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.jx-panel-head p {
  color: var(--jx-muted);
  font-size: 0.94rem;
  font-weight: 450;
  line-height: 1.55;
}

.jx-meta {
  color: var(--jx-muted);
  font-size: var(--jx-text-sm);
  font-weight: 500;
  line-height: 1.5;
}

.jx-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--jx-line);
  border-radius: 10px;
}

.jx-scroll-hint {
  display: none;
  margin: 0 0 7px;
  color: var(--jx-muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.jx-table th {
  padding: 11px 13px;
  color: var(--jx-muted);
  background: var(--jx-surface-tint);
  border-bottom: 1px solid var(--jx-line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  overflow-wrap: anywhere;
}

.jx-table td {
  padding: 13px;
  color: var(--jx-ink);
  border-bottom: 1px solid #e8edf4;
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.jx-table tbody tr:last-child td {
  border-bottom: 0;
}

.jx-table tr:hover td {
  background: #f8fafd;
}

.jx-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.jx-status.is-ok {
  color: var(--jx-success);
  background: var(--jx-success-soft);
}

.jx-status.is-waiting {
  color: var(--jx-warning);
  background: var(--jx-warning-soft);
}

.jx-status.is-danger {
  color: var(--jx-danger);
  background: var(--jx-danger-soft);
}

.jx-status.is-neutral {
  color: #465266;
  background: #edf1f6;
}

.jx-empty,
.jx-note {
  padding: 15px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.55;
}

.jx-empty {
  color: var(--jx-muted);
  background: #f8fafd;
  border: 1px dashed #bbc7d6;
}

.jx-note {
  color: var(--jx-ink);
  background: #fff7f7;
  border: 1px solid #f0d1d4;
  border-left: 4px solid var(--jx-red-700);
}

.jx-prefecture {
  background: linear-gradient(135deg, #fff, #f5f8fd);
  border-left: 4px solid var(--jx-blue-700);
}

.jx-payment-confirmed,
.jx-onboarding {
  background: linear-gradient(135deg, #fff, #f1f8f4);
  border-color: #c9dfd2;
}

.jx-message-list {
  gap: 9px;
}

.jx-actions,
.auth-actions {
  gap: 9px;
}

.jx-client-app :is(input, select, textarea)::placeholder,
.client-auth-shell :is(input, select, textarea)::placeholder {
  color: var(--jx-muted);
  opacity: 1;
}

.jx-client-app input[type="checkbox"],
.jx-client-app input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--jx-blue-800);
}

.jx-client-app input[type="file"] {
  padding: 8px;
  background: var(--jx-surface-soft);
}

.jx-client-app input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 10px;
  padding: 6px 11px;
  color: var(--jx-blue-800);
  background: #fff;
  border: 1px solid #bac8da;
  border-radius: 7px;
  font: 700 0.84rem var(--jx-font);
  cursor: pointer;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1000px) {
  .jx-client-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .jx-client-main {
    width: 100%;
    min-width: 0;
  }

  .jx-client-sidebar {
    padding: 10px;
  }

  .js .jx-client-sidebar.is-open {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .jx-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .jx-client-sidebar a {
    margin: 0;
  }

  .jx-client-hero {
    display: grid;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .client-auth-shell .client-auth-main {
    width: min(680px, calc(100% - 32px));
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 40px 0 56px;
  }

  .client-auth-shell .client-auth-copy {
    max-width: 680px;
  }

  .client-auth-shell .client-auth-copy h1 {
    max-width: 620px;
  }

  .client-auth-shell .client-auth-copy p {
    max-width: 620px;
  }
}

@media (max-width: 760px) {
  .client-auth-brand strong,
  .jx-client-brand strong {
    font-size: var(--jx-brand-title-size-mobile);
  }
}

@media (max-width: 680px) {
  .client-auth-top,
  .jx-client-top {
    gap: 10px;
  }

  .client-auth-brand small,
  .jx-client-brand small,
  .jx-client-hello {
    display: none;
  }

  .client-auth-back {
    min-height: 44px;
    padding: 0 13px;
    font-size: 0.82rem;
  }

  .client-auth-shell .client-auth-main {
    width: min(100% - 24px, 620px);
    padding: 30px 0 44px;
  }

  .client-auth-shell .client-auth-copy h1 {
    margin: 15px 0 13px;
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .client-auth-shell .client-auth-main > .auth-panel {
    order: -1;
  }

  .client-auth-shell .client-auth-copy {
    order: 1;
  }

  .client-auth-shell .client-auth-copy p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .client-auth-copy .auth-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .client-auth-copy .auth-actions .jx-button {
    width: 100%;
  }

  .auth-panel {
    padding: 20px;
    border-radius: 13px;
  }

  .auth-name-grid {
    grid-template-columns: 1fr;
  }

  .jx-client-top {
    position: relative;
    padding: 11px 13px;
  }

  .jx-client-brand img {
    width: 42px;
    height: 42px;
  }

  .jx-client-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jx-client-actions form,
  .jx-client-actions .jx-button {
    width: 100%;
  }

  .jx-client-actions .jx-button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 0.78rem;
    white-space: normal;
  }

  .jx-client-shell {
    padding: 12px;
  }

  .js .jx-client-sidebar.is-open {
    grid-template-columns: 1fr;
  }

  .jx-client-hero,
  .jx-client-panel {
    margin-bottom: 13px;
    padding: 18px;
    border-radius: 10px;
  }

  .jx-client-hero h1 {
    font-size: 2.1rem;
  }

  .jx-scroll-hint {
    display: block;
  }

  .jx-panel-head {
    display: grid;
    gap: 10px;
  }

  .jx-panel-head .jx-actions,
  .jx-client-hero > .jx-button {
    width: 100%;
  }

  .jx-panel-head .jx-actions .jx-button,
  .jx-client-hero > .jx-button {
    width: 100%;
  }

  .jx-table {
    border-radius: 8px;
  }

  .jx-table th,
  .jx-table td {
    min-width: 130px;
    padding: 11px;
  }
}

@media (max-width: 420px) {
  .client-auth-brand strong,
  .jx-client-brand strong {
    font-size: var(--jx-brand-title-size-mobile);
  }

  .client-auth-brand img {
    width: 42px;
    height: 42px;
  }

  .client-auth-back {
    max-width: 140px;
    text-align: center;
  }

  .auth-tabs a {
    padding-inline: 7px;
    font-size: 0.82rem;
  }

  .jx-client-actions {
    grid-template-columns: 1fr 1fr;
  }

  .jx-client-actions form {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .jx-client-top,
  .jx-client-sidebar,
  .jx-mobile-menu,
  .jx-client-app .jx-button {
    display: none !important;
  }

  .jx-client-app,
  .jx-client-shell {
    display: block;
    background: #fff;
  }

  .jx-client-main {
    max-width: none;
  }

  .jx-client-hero,
  .jx-client-panel,
  .jx-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* En-tete de connexion coherent avec les espaces apporteur et partenaire. */
.client-auth-back {
  border: 1px solid #dce4ee;
  background: #fff;
  color: #123b79;
  box-shadow: 0 7px 18px rgba(16, 35, 63, .08);
  font-size: .92rem;
}
.client-auth-back:hover,
.client-auth-back:focus-visible {
  border-color: #c2cedd;
  background: #edf3fa;
  color: #0b2d5f;
}

/* CTA hierarchy: secondary return action uses the shared navy. */
.client-auth-back { background: #123b79 !important; border-color: #123b79 !important; color: #fff !important; }
.client-auth-back:hover, .client-auth-back:focus-visible { background: #0d2e60 !important; border-color: #0d2e60 !important; color: #fff !important; }
/* Align the client sign-in controls with the other secure portals. */.client-auth-main .auth-panel form > button.jx-button.red[type=submit] { width: 100% !important; min-height: 48px; justify-content: center; }.client-auth-main .auth-panel .auth-password-toggle { min-height: 40px; }