/* ==========================================================
   Express Juridique · Lifting 2026
   Structure et composants = Design System v2 (design-system-preview.html)
   Ambiance = site vitrine 2026 : Sora + Inter, fonds papier/lavande,
   filets indigo, pictos fins arrondis, menthe pour le « terminé ».
   Couleurs de marque = logo 2026 (indigo #312782, violet #5D58D7, menthe #54EFAF).
   ========================================================== */
:root {
  --ej-font-display: "Sora", sans-serif;
  --ej-font-body: "Inter", sans-serif;

  /* Primary : indigo du logo, nuancé vers le violet */
  --ej-primary-900: #312782;
  --ej-primary-800: #3a2f95;
  --ej-primary-700: #4339a8;
  --ej-primary-600: #5d58d7;
  --ej-primary-500: #7570de;
  --ej-primary-400: #8f8ae4;
  --ej-primary-300: #b5b1ec;
  --ej-primary-200: #d6d3f3;
  --ej-primary-100: #e9e7f8;
  --ej-primary-50: #f3f2fb;

  /* Action : violet du logo (le « e ») */
  --ej-action-800: #3a3599;
  --ej-action-700: #4b46b8;
  --ej-action-600: #5d58d7;
  --ej-action-500: #7a75e5;
  --ej-action-400: #9994ec;
  --ej-action-300: #b9b6f3;
  --ej-action-200: #dcdaf9;
  --ej-action-100: #e9e7f8;
  --ej-action-50: #f5f4fd;

  /* Semantic : terminé = menthe foncée de la vitrine, en cours = violet */
  --ej-success-600: #097b53;
  --ej-success-100: #dcf8ec;
  --ej-warning-600: #a55904;
  --ej-warning-100: #fdf1dc;
  --ej-error-600: #c22f28;
  --ej-error-100: #fce6e4;
  /* Action requise : rose saumon historique d'EJ (le rouge reste réservé aux erreurs).
     Règle charte : sur un aplat #FB9390, le texte est toujours blanc. */
  --ej-attention-600: #fb9390;
  --ej-attention-500: #fb9390;
  --ej-attention-300: #f4a7a3;
  --ej-attention-100: #fde9e7;
  --ej-info-600: #4f49c9;
  --ej-info-100: #ecebfb;

  /* Neutres : gris teintés indigo (encre #221C55, gris #6B678C, papier #F7F6FC) */
  --ej-neutral-900: #221c55;
  --ej-neutral-800: #221c55;
  --ej-neutral-700: #403b68;
  --ej-neutral-600: #57537b;
  --ej-neutral-500: #6b678c;
  --ej-neutral-400: #9995b5;
  --ej-neutral-300: #cdc9e2;
  --ej-neutral-200: #e2dff0;
  --ej-neutral-100: #efedf8;
  --ej-neutral-50: #f7f6fc;
  --ej-white: #ffffff;
  --ej-hairline: rgba(49, 39, 130, 0.14);

  /* Accent (menthe du logo) */
  --ej-accent-600: #097b53;
  --ej-accent-400: #34d399;
  --ej-accent-200: #a7f3d0;
  --ej-accent-100: #dcf8ec;
  --ej-logo-mint: #54efaf;
  --ej-logo-indigo: #312782;

  /* Étiquettes cabinet (couleurs de l'app actuelle) */
  --ej-tag-coral: #d67b75;
  --ej-tag-periwinkle: #9e9beb;

  --ej-shadow-xs: 0 1px 2px rgba(33, 26, 94, 0.04);
  --ej-shadow-sm: 0 2px 6px -2px rgba(33, 26, 94, 0.08);
  --ej-shadow-md: 0 14px 34px -18px rgba(49, 39, 130, 0.35);
  --ej-shadow-lg: 0 18px 40px -16px rgba(33, 26, 94, 0.28);
  --ej-shadow-xl: 0 24px 60px -20px rgba(33, 26, 94, 0.35);

  --ej-radius-sm: 6px;
  --ej-radius-md: 8px;
  --ej-radius-lg: 10px;
  --ej-radius-xl: 14px;
  --ej-radius-full: 9999px;

  --ej-transition-fast: 150ms ease;
  --ej-transition-normal: 250ms ease;
  --ej-focus-ring: 0 0 0 2px #fff, 0 0 0 4px var(--ej-primary-400);
}

/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--ej-font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ej-neutral-800);
  background-color: var(--ej-white);
  background-image: linear-gradient(180deg, var(--ej-neutral-50) 0%, var(--ej-neutral-50) 12%, var(--ej-white) 85%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
.page-title,
.section-title,
.row-title,
.overline,
.sidebar-section,
.btn,
.badge,
.tab,
.qf-pill,
[class$="-name"],
[class*="-title"] {
  font-family: var(--ej-font-display);
}
[class$="-name"] {
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}
img,
svg {
  display: block;
}
/* Pictos Lucide : la page écrit <span class="ms">nom</span>, ej-shell.js
   y injecte le SVG. Taille = font-size de la span. */
.ms {
  font-size: 20px;
  width: 1em;
  height: 1em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
}
.ms:not([data-lu]) {
  color: transparent !important;
}
.ms svg {
  width: 100%;
  height: 100%;
}
:focus-visible {
  outline: none;
  box-shadow: var(--ej-focus-ring);
  border-radius: var(--ej-radius-md);
}

/* ---------- Header (56px) ---------- */
.ej-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 20px;
  background: rgba(247, 246, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ej-hairline);
}
.ej-logo {
  display: flex;
  align-items: center;
}
.ej-logo img {
  height: 40px;
  width: auto;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-company {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ej-hairline);
  border-radius: var(--ej-radius-full);
  background: transparent;
  font-family: var(--ej-font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ej-primary-900);
  transition: border-color var(--ej-transition-fast), background var(--ej-transition-fast);
}
.header-company:hover {
  border-color: var(--ej-action-600);
  color: var(--ej-action-600);
}
.header-company .ms {
  font-size: 18px;
  color: var(--ej-neutral-400);
}
.header-sep {
  width: 1px;
  height: 24px;
  background: var(--ej-neutral-200);
}
.header-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ej-neutral-800);
  padding: 4px 6px 4px 4px;
  border-radius: var(--ej-radius-full);
  transition: background var(--ej-transition-fast);
}
.header-user:hover {
  background: var(--ej-neutral-100);
}
.header-user .ms {
  font-size: 18px;
  color: var(--ej-neutral-400);
}

/* ---------- Avatars ---------- */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ej-font-display);
  font-weight: 600;
  color: #fff;
  background: var(--ej-primary-900);
  flex-shrink: 0;
  position: relative;
}
.header-user .avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ej-logo-mint);
  border: 2px solid var(--ej-neutral-50);
}
.avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

/* ---------- Shell ---------- */
.app {
  display: flex;
  min-height: calc(100vh - 56px);
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: transparent;
  border-right: 1px solid var(--ej-hairline);
  padding: 22px 6px 24px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 20px);
  margin: 1px 10px;
  padding: 9px 12px;
  border-radius: var(--ej-radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ej-neutral-900);
  text-align: left;
  position: relative;
  transition: color var(--ej-transition-fast), background var(--ej-transition-fast);
}
.sidebar-item .ms {
  font-size: 21px;
  color: var(--ej-neutral-500);
  transition: color var(--ej-transition-fast);
}
.sidebar-item:hover {
  color: var(--ej-action-600);
  background: rgba(93, 88, 215, 0.07);
}
.sidebar-item:hover .ms {
  color: var(--ej-action-600);
}
.sidebar-item.active {
  color: var(--ej-primary-900);
  background: var(--ej-action-100);
  font-weight: 600;
}
.sidebar-item.active .ms {
  color: var(--ej-action-600);
}
.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ej-action-600);
}
.sidebar-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ej-neutral-400);
  margin-top: 1px;
}
.sidebar-item.active .sidebar-sub {
  color: var(--ej-action-400);
}
.sidebar-section {
  padding: 22px 22px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ej-neutral-400);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  flex: 1;
}
.page-narrow {
  max-width: 820px;
}
.page-wide {
  max-width: 1200px;
}

/* ---------- Page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-title {
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ej-primary-900);
}
.page-title .count {
  font-family: var(--ej-font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ej-neutral-500);
  margin-left: 8px;
}
.page-desc {
  font-size: 14px;
  color: var(--ej-neutral-500);
  margin-top: 4px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ej-primary-600);
  margin-bottom: 10px;
}
.back-link:hover {
  text-decoration: underline;
}
.back-link .ms {
  font-size: 18px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ej-primary-900);
}
.overline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ej-neutral-500);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--ej-radius-full);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--ej-transition-normal), border-color var(--ej-transition-normal),
    color var(--ej-transition-normal), box-shadow var(--ej-transition-normal),
    transform var(--ej-transition-normal);
}
.btn:not([disabled]):hover {
  transform: translateY(-1px);
}
.btn .ms {
  font-size: 20px;
}
.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
}
.btn-sm .ms {
  font-size: 16px;
}
.btn-primary {
  background: var(--ej-primary-900);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ej-action-600);
  box-shadow: 0 10px 24px -10px rgba(93, 88, 215, 0.55);
}
.btn-primary:active {
  background: var(--ej-action-800);
}
.btn-secondary {
  background: transparent;
  color: var(--ej-neutral-900);
  border-color: var(--ej-hairline);
}
.btn-secondary:hover {
  background: var(--ej-white);
  border-color: var(--ej-action-600);
  color: var(--ej-action-600);
}
.btn-tertiary {
  background: transparent;
  color: var(--ej-primary-700);
}
.btn-tertiary:hover {
  background: var(--ej-primary-50);
}
.btn-danger {
  background: var(--ej-error-600);
  color: #fff;
}
.btn-danger-ghost {
  background: transparent;
  color: var(--ej-error-600);
}
.btn-danger-ghost:hover {
  background: var(--ej-error-100);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--ej-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ej-neutral-500);
  transition: background var(--ej-transition-fast), color var(--ej-transition-fast);
}
.icon-btn:hover {
  background: var(--ej-neutral-100);
  color: var(--ej-neutral-800);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--ej-radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .ms {
  font-size: 14px;
}
.badge-action,
.badge-progress,
.badge-success,
.badge-error,
.badge-neutral {
  background: transparent;
}
/* Statuts cernés (contour + texte), comme dans l'app d'origine : pas d'aplat. */
.badge-action {
  color: var(--ej-attention-500);
  border-color: var(--ej-attention-500);
}
.badge-progress {
  color: var(--ej-info-600);
  border-color: color-mix(in srgb, var(--ej-info-600) 50%, transparent);
}
.badge-success {
  background: #eefdf7;
  color: #0b8f60;
  border-color: transparent;
  gap: 8px;
  padding: 0 14px;
  font-size: 12px;
}
/* Terminé : version validée par JS (fond menthe très pâle, texte et point menthe foncé). */
.badge-success::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0b8f60;
  flex-shrink: 0;
}
.badge-success .ms {
  display: none;
}
.badge-error {
  color: var(--ej-error-600);
  border-color: color-mix(in srgb, var(--ej-error-600) 50%, transparent);
}
.badge-neutral {
  color: var(--ej-neutral-500);
  border-color: var(--ej-neutral-400);
}
.badge-brand {
  background: var(--ej-action-100);
  color: var(--ej-action-700);
}

/* Étiquette cabinet (pastille + libellé) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--ej-neutral-200);
  border-radius: var(--ej-radius-full);
  background: var(--ej-white);
  font-size: 12px;
  color: var(--ej-neutral-700);
  max-width: 260px;
  white-space: nowrap;
}
.tag span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--ej-white);
  border: 1px solid var(--ej-hairline);
  border-radius: var(--ej-radius-lg);
  box-shadow: var(--ej-shadow-xs);
  transition: box-shadow var(--ej-transition-normal), border-color var(--ej-transition-normal),
    transform var(--ej-transition-normal);
}
a.card:hover,
.card.clickable:hover {
  box-shadow: var(--ej-shadow-md);
  border-color: rgba(93, 88, 215, 0.45);
  transform: translateY(-2px);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ej-neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-body {
  padding: 20px;
}
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--ej-neutral-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Liste « ligne » (rangée cliquable dans une carte) */
.list-card {
  background: var(--ej-white);
  border: 1px solid var(--ej-hairline);
  border-radius: var(--ej-radius-lg);
  box-shadow: var(--ej-shadow-xs);
  overflow: hidden;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ej-neutral-100);
  transition: background var(--ej-transition-fast);
}
.list-row:last-child {
  border-bottom: none;
}
a.list-row:hover,
.list-row.clickable:hover {
  background: var(--ej-primary-50);
}
.list-row .chev {
  color: var(--ej-neutral-400);
  margin-left: auto;
  transition: transform var(--ej-transition-fast), color var(--ej-transition-fast);
}
a.list-row:hover .chev {
  color: var(--ej-action-600);
  transform: translateX(2px);
}
.list-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--ej-radius-md);
  background: var(--ej-action-100);
  color: var(--ej-action-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ej-primary-900);
}
.row-meta {
  font-size: 13px;
  color: var(--ej-neutral-500);
}
.mono-num {
  font-variant-numeric: tabular-nums;
  color: var(--ej-neutral-500);
}

/* ---------- Toolbar / search / filters ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  flex: 1;
  max-width: 380px;
  border: 1px solid var(--ej-hairline);
  border-radius: var(--ej-radius-full);
  background: var(--ej-white);
  transition: border-color var(--ej-transition-fast), box-shadow var(--ej-transition-fast);
}
.search:focus-within {
  border-color: var(--ej-action-600);
  box-shadow: 0 0 0 3px rgba(93, 88, 215, 0.12);
}
.search input::placeholder {
  font-style: italic;
}
.search .ms {
  color: var(--ej-neutral-400);
}
.search input {
  border: none;
  outline: none;
  background: none;
  width: 100%;
  font-size: 14px;
}
.search input::placeholder {
  color: var(--ej-neutral-400);
}
.quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qf-pill {
  height: 34px;
  padding: 0 16px;
  border-radius: var(--ej-radius-full);
  border: 1px solid var(--ej-hairline);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ej-neutral-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--ej-transition-fast);
}
.qf-pill:hover {
  background: var(--ej-neutral-50);
}
.qf-pill.active {
  background: var(--ej-white);
  border-color: var(--ej-primary-900);
  color: var(--ej-primary-900);
}
.qf-pill.warning::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ej-attention-500);
}
.qf-pill.warning {
  color: var(--ej-neutral-900);
}
.qf-pill.active-warning {
  background: var(--ej-white);
  border-color: var(--ej-attention-500);
  color: var(--ej-attention-500);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--ej-hairline);
  margin-bottom: 24px;
}
.tab {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ej-neutral-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--ej-transition-fast), color var(--ej-transition-fast);
}
.tab:hover {
  color: var(--ej-action-600);
}
.tab.active {
  color: var(--ej-primary-900);
  border-bottom-color: var(--ej-action-600);
}
.tab .ms {
  font-size: 18px;
}
.tabs .tab-spacer {
  margin-left: auto;
}

/* ---------- Data table ---------- */
.data-table-wrap {
  background: var(--ej-white);
  border: 1px solid var(--ej-hairline);
  border-radius: var(--ej-radius-lg);
  box-shadow: var(--ej-shadow-xs);
  overflow: hidden;
}
.data-table-toolbar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ej-neutral-200);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--ej-neutral-50);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--ej-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ej-neutral-500);
  border-bottom: 1px solid var(--ej-hairline);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ej-neutral-800);
  border-bottom: 1px solid var(--ej-neutral-100);
  vertical-align: top;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background: var(--ej-primary-50);
}
.link {
  color: var(--ej-primary-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--ej-primary-200);
}
.link:hover {
  text-decoration-color: currentColor;
}

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--ej-neutral-600);
}
.pager-standalone {
  margin-top: 24px;
  padding: 0;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ej-neutral-700);
}
.form-helper {
  font-size: 13px;
  color: var(--ej-neutral-500);
}
.form-input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ej-neutral-300);
  border-radius: var(--ej-radius-md);
  background: var(--ej-white);
  font-size: 15px;
  color: var(--ej-neutral-800);
  outline: none;
  width: 100%;
  transition: border-color var(--ej-transition-fast), box-shadow var(--ej-transition-fast);
}
.form-input::placeholder {
  color: var(--ej-neutral-400);
}
.form-input:focus {
  border-color: var(--ej-action-600);
  box-shadow: 0 0 0 3px rgba(93, 88, 215, 0.12);
}
.form-input:disabled {
  background: var(--ej-neutral-100);
  color: var(--ej-neutral-500);
}
textarea.form-input {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.check,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ej-neutral-800);
  cursor: pointer;
}
.check input,
.radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid var(--ej-neutral-400);
  border-radius: 4px;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background var(--ej-transition-fast), border-color var(--ej-transition-fast);
}
.radio input {
  border-radius: 50%;
}
.check input:checked {
  background: var(--ej-action-600)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center no-repeat;
  border-color: var(--ej-action-600);
}
.radio input:checked {
  border-color: var(--ej-action-600);
}
.radio input:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ej-action-600);
}
.check:hover input,
.radio:hover input {
  border-color: var(--ej-action-500);
}

/* Carte de choix (radio en tuile) */
.choice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ej-neutral-300);
  border-radius: var(--ej-radius-lg);
  background: var(--ej-white);
  cursor: pointer;
  transition: border-color var(--ej-transition-fast), background var(--ej-transition-fast),
    box-shadow var(--ej-transition-fast);
}
.choice:hover {
  border-color: var(--ej-action-400);
}
.choice:has(input:checked) {
  border-color: var(--ej-action-600);
  background: var(--ej-action-50);
  box-shadow: 0 0 0 3px var(--ej-action-100);
}

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: var(--ej-radius-lg);
  font-size: 14px;
  line-height: 1.5;
}
.alert .ms {
  font-size: 20px;
  margin-top: 1px;
}
.alert-info {
  background: var(--ej-info-100);
  color: var(--ej-info-600);
}
.alert-success {
  background: var(--ej-success-100);
  color: var(--ej-success-600);
}
.alert-warning {
  background: var(--ej-warning-100);
  color: var(--ej-warning-600);
}
.alert-error {
  background: var(--ej-error-100);
  color: var(--ej-error-600);
}
.alert-brand {
  background: var(--ej-action-100);
  color: var(--ej-action-800);
}
.alert strong {
  font-weight: 500;
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: var(--ej-neutral-200);
  margin: 24px 0;
}

/* ---------- Footer ---------- */
.ej-footer {
  border-top: 1px solid var(--ej-hairline);
  background: transparent;
  padding: 14px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 12px;
  color: var(--ej-neutral-500);
}
.ej-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.ej-footer a:hover {
  color: var(--ej-action-600);
}
.ej-footer .version {
  font-variant-numeric: tabular-nums;
  color: var(--ej-neutral-400);
}

/* ---------- Help bubble ---------- */
.help-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ej-primary-900);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ej-shadow-lg);
  transition: background var(--ej-transition-normal), transform var(--ej-transition-normal);
}
.help-bubble:hover {
  background: var(--ej-action-600);
  transform: translateY(-2px);
}
.help-bubble .ms {
  font-size: 24px;
}

/* ---------- Utilities ---------- */
.muted {
  color: var(--ej-neutral-500);
}
.small {
  font-size: 13px;
}
.xs {
  font-size: 12px;
}
.strong {
  font-weight: 500;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wrap {
  flex-wrap: wrap;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-16 {
  margin-bottom: 16px;
}
