/* ==========================================================================
   EMJL — couche d'interface « registre & sceau »
   Chargée après Bootstrap/AdminLTE (versions RTL pour l'arabe, LTR pour le français).
   Propriétés logiques (inline-start/end) => un seul fichier pour les deux sens.
   ========================================================================== */

:root {
    /* Identité « moderne » : ardoise et bleu, cartes arrondies, ombres douces */
    /* Couleurs d'accent secondaires : une par type d'information, pour ne pas tout peindre en bleu */
    --c1: #2563EB; --c2: #059669; --c3: #D97706; --c4: #7C3AED; --c5: #E11D48;
    --ink: #0F172A;          /* menu latéral, titres */
    --ink-2: #1E293B;        /* survols du menu */
    --ink-text: #CBD5E1;     /* texte sur fond ardoise */
    --blue: #2563EB;         /* couleur d'action */
    --blue-hover: #1D4ED8;
    --tint: #EFF4FF;         /* repère actif, survols clairs */
    --paper: #F5F7FB;        /* fond de travail */
    --surface: #FFFFFF;
    --head: #F8FAFC;         /* en-têtes de tableaux, zones neutres */
    --hover: #F1F5FB;        /* survols */
    --text-2: #475569;
    --side: #0F172A;         /* fond du menu latéral */
    --rule: #E3E8F0;         /* filets, bordures */
    --rule-soft: #EDF1F7;
    --text: #1E293B;
    --muted: #5B6576;
    --seal: #DC2626;         /* suppression, alertes */
    --ledger: #15803D;       /* validation */
    --amber: #B45309;
    --brass: #2563EB;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
    --font: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, "Segoe UI", sans-serif;
    --display: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, "Segoe UI", sans-serif;
}
.emjl-ltr { --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; --display: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", sans-serif; }

/* --- Base -------------------------------------------------------------- */
body.emjl,
.emjl h1, .emjl h2, .emjl h3, .emjl h4, .emjl h5, .emjl h6,
.emjl .main-header .logo,
.emjl .form-control, .emjl .btn, .emjl select, .emjl textarea, .emjl input {
    font-family: var(--font);
}
body.emjl { font-size: 15px; line-height: 1.6; color: var(--text); background: var(--paper); }
.emjl .content-wrapper, .emjl .right-side { background: var(--paper); border: 0 !important; }
.emjl a { color: var(--blue); }
.emjl a:hover, .emjl a:focus { color: var(--blue-hover); }
.emjl-rtl { text-align: right; }
.emjl-ltr { text-align: left; }
.emjl-ltr th { text-align: left; }            /* style.css historique force th à droite */
.emjl-rtl th { text-align: right; }

.emjl :focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.emjl-skip {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 2000;
    background: var(--side); color: #fff !important; padding: 8px 14px; border-radius: var(--radius);
}
.emjl-skip:focus { top: 10px; }

/* --- En-tête -------------------------------------------------------------- */
.emjl .main-header { box-shadow: none; }
.emjl .main-header .navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    min-height: 60px;
}
.emjl .main-header .logo {
    background: var(--side) !important;
    color: #fff !important;
    height: 61px; line-height: 60px;
    border: 0 !important;
    font-weight: 600;
}
.emjl .main-header .logo .logo-lg { display: inline-flex; align-items: center; gap: 10px; }
.emjl .main-header .logo .logo-mini { align-items: center; justify-content: center; }
@media (min-width: 768px) {
    .emjl.sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini { display: flex !important; height: 60px; }
}
.emjl .emjl-brand { font-family: "IBM Plex Sans", sans-serif; letter-spacing: .14em; font-size: 16px; font-weight: 700; color: #fff; }
.emjl .main-header .sidebar-toggle {
    color: var(--muted) !important; height: 60px; padding: 20px 16px; background: transparent !important;
}
.emjl .main-header .sidebar-toggle:hover { background: var(--paper) !important; color: var(--ink) !important; }
.emjl .emjl-office { display: inline-block; line-height: 60px; color: var(--muted); font-size: 14px; padding-inline: 4px; }
.emjl .navbar-custom-menu > .navbar-nav > li > a {
    color: var(--text) !important; height: 60px; padding-top: 15px; padding-bottom: 15px;
}
.emjl .navbar-custom-menu > .navbar-nav > li > a:hover { background: var(--paper) !important; }

/* Logo : monogramme sur carré bleu */
.emjl-seal {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--blue); color: #fff; font-family: "IBM Plex Sans", sans-serif; font-weight: 700; font-size: 15px; line-height: 1;
}
.emjl-seal-xl { width: 72px; height: 72px; font-size: 32px; border-radius: 18px; }

/* Sélecteur de langue : segment à deux positions
   (sélecteurs renforcés pour passer devant les règles .navbar-custom-menu > .navbar-nav > li > a) */
.emjl .navbar-custom-menu > .navbar-nav > li.emjl-lang,
.emjl .emjl-lang { display: flex !important; align-items: center; padding: 12px 8px; }
.emjl .navbar-custom-menu > .navbar-nav > li.emjl-lang > a,
.emjl .emjl-lang > a {
    display: inline-block; height: auto !important; padding: 5px 12px !important; line-height: 1.3;
    border: 1px solid var(--rule); color: var(--muted) !important; font-size: 13px; font-weight: 600;
    background: var(--surface) !important;
}
.emjl .emjl-lang > a:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
.emjl .emjl-lang > a:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); margin-inline-start: -1px; }
.emjl .navbar-custom-menu > .navbar-nav > li.emjl-lang > a:hover { background: var(--paper) !important; color: var(--ink) !important; }
.emjl .navbar-custom-menu > .navbar-nav > li.emjl-lang > a.is-current,
.emjl .emjl-lang > a.is-current { background: var(--side) !important; border-color: var(--side); color: #fff !important; }

/* Avatars (initiale, plus de photo de démonstration AdminLTE) */
.emjl-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: #E2E8F0; color: var(--ink); font-weight: 700; font-size: 14px;
    vertical-align: middle; margin-inline-end: 8px;
}
.emjl-avatar-lg { width: 64px; height: 64px; font-size: 26px; margin: 0 auto 8px; display: flex; }
.emjl .main-header .user-menu .dropdown-menu { border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 12px 28px rgba(15, 23, 42, .14); overflow: hidden; }
.emjl .main-header .user-menu .user-header { background: var(--side) !important; height: auto !important; padding: 18px 12px; }
.emjl .main-header .user-menu .user-header > p { color: #fff; font-size: 15px; margin-top: 4px; }
.emjl .main-header .user-menu .user-header > p > small { color: var(--ink-text); font-size: 13px; }
.emjl .main-header .user-menu .user-footer { background: var(--surface); padding: 10px; }

/* --- Barre latérale : ardoise foncée ---------------------------------------- */
.emjl .main-sidebar, .emjl .left-side { background: var(--side) !important; padding-top: 60px; border: 0 !important; }
.emjl .sidebar { padding-bottom: 24px; }
.emjl .emjl-user-panel {
    display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.emjl .emjl-user-panel .emjl-avatar { background: var(--ink-2); color: #fff; margin: 0; flex: none; }
.emjl .emjl-user-panel .info { position: static !important; padding: 0 !important; inset: auto !important; min-width: 0; }
.emjl .emjl-user-panel .info p { color: #fff; margin: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emjl .emjl-role { color: #94A3B8; font-size: 12.5px; }
.emjl .emjl-role .fa { font-size: 8px; vertical-align: 2px; color: #22C55E !important; }

.emjl .sidebar-menu > li.header {
    background: transparent !important; color: #64748B !important;
    font-size: 12.5px; padding: 18px 20px 6px; letter-spacing: 0;
}
.emjl .sidebar-menu > li > a {
    position: relative; display: flex; align-items: center; gap: 10px;
    color: var(--ink-text) !important; padding: 9px 12px; font-size: 14.5px; font-weight: 500;
    margin: 1px 10px; border-radius: 8px; border: 0;
}
.emjl .sidebar-menu > li > a > .fa:first-child { width: 18px; text-align: center; color: #94A3B8; flex: none; }
.emjl .sidebar-menu > li > a > span:not(.emjl-chevron):not(.emjl-count) { flex: 1; min-width: 0; white-space: normal; line-height: 1.35; }
.emjl .sidebar-menu .treeview-menu > li > a > span { white-space: normal; line-height: 1.4; }
.emjl.sidebar-collapse .sidebar-menu > li > a > span:not(.emjl-chevron):not(.emjl-count) { white-space: nowrap; }
.emjl .sidebar-menu > li:hover > a { background: var(--ink-2) !important; color: #fff !important; }
.emjl .sidebar-menu > li.active > a,
.emjl .sidebar-menu > li.menu-open > a { background: var(--blue) !important; color: #fff !important; font-weight: 600; }
.emjl .sidebar-menu > li.active > a > .fa:first-child,
.emjl .sidebar-menu > li.menu-open > a > .fa:first-child { color: #fff; }
.emjl .emjl-chevron { margin-inline-start: auto; transition: transform .2s ease; color: #64748B; }
.emjl .sidebar-menu li.active > a > .emjl-chevron,
.emjl .sidebar-menu li.menu-open > a > .emjl-chevron { transform: rotate(180deg); color: #fff; }
.emjl .sidebar-menu .pull-left-container, .emjl .sidebar-menu .pull-right-container { display: none; }

.emjl .sidebar-menu .treeview-menu { background: transparent !important; padding: 4px 0 8px !important; margin: 0 !important; }
.emjl .sidebar-menu .treeview-menu > li > a {
    display: flex; align-items: center; gap: 8px; color: #94A3B8 !important;
    padding: 6px 14px !important; margin-inline-start: 30px; margin-inline-end: 10px;
    font-size: 14px; border-inline-start: 1px solid #334155; border-radius: 0;
}
.emjl .sidebar-menu .treeview-menu > li > a > .fa { display: none; }
.emjl .sidebar-menu .treeview-menu > li > a:hover { color: #fff !important; background: transparent !important; }
.emjl .sidebar-menu .treeview-menu > li.active > a { color: #fff !important; font-weight: 600; border-inline-start: 2px solid #60A5FA; }
.emjl .emjl-count {
    margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 10px;
    background: var(--seal); color: #fff; font-size: 12px; text-align: center; font-weight: 600;
}

/* Barre réduite (sidebar-mini) */
@media (min-width: 768px) {
    .emjl.sidebar-mini.sidebar-collapse .sidebar-menu > li > a { justify-content: center; padding-inline: 0; }
    .emjl.sidebar-mini.sidebar-collapse .emjl-user-panel { justify-content: center; padding-inline: 0; }
    .emjl.sidebar-mini.sidebar-collapse .emjl-user-panel .info,
    .emjl.sidebar-mini.sidebar-collapse .emjl-chevron { display: none; }
}

/* --- Zone de contenu ---------------------------------------------------- */
/* En-tête de page : fil d'Ariane au-dessus, titre dessous (plus de chevauchement avec les titres longs),
   bouton d'action éventuel à droite du titre. */
.emjl .content-header { clear: both; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; padding: 18px 24px 4px; }
.emjl .content-header > h1 { flex: 1 1 auto; min-width: 0; font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.35; text-wrap: balance; }
.emjl .content-header::before, .emjl .content-header::after { display: none !important; }
.emjl .content-header > .breadcrumb { position: static !important; order: -1; flex: 0 0 100%; float: none; margin: 0; padding: 0 0 4px !important; }
.emjl .content-header > h1 > small { display: block; font-size: 14px; color: var(--muted); padding: 4px 0 0; margin: 0; }
.emjl .content-header > .breadcrumb { background: transparent; font-size: 12.5px; }
.emjl .content-header > .breadcrumb > li > a { color: var(--muted); }
.emjl .content-header > .breadcrumb > .active { color: var(--muted); }
.emjl .content { padding: 16px 24px 32px; }

.emjl-flash-zone { padding: 12px 24px 0; }
@media (min-width: 768px) {
    .emjl-flash-zone { margin-inline-start: 230px; }
    .emjl.sidebar-collapse .emjl-flash-zone { margin-inline-start: 50px; }
}
.emjl .alert { border-radius: var(--radius); border: 1px solid transparent; border-inline-start-width: 4px; }
.emjl .alert-success { background: #EAF4EE !important; color: #1F4D35 !important; border-color: #BFDCCB; border-inline-start-color: var(--ledger); }
.emjl .alert-danger, .emjl .alert-error { background: #FBECEA !important; color: #7A1D15 !important; border-color: #F0C8C3; border-inline-start-color: var(--seal); }
.emjl .alert-warning { background: #FBF4E6 !important; color: #6B4A0D !important; border-color: #EBD7AE; border-inline-start-color: var(--amber); }
.emjl .alert-info { background: #E7F0ED !important; color: #1D4ED8 !important; border-color: #BFDBFE; border-inline-start-color: var(--blue); }

/* Boîtes */
.emjl .box {
    background: var(--surface); border: 0; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.emjl .box.box-primary { border-top: 0; }
.emjl .box.box-danger { border-top: 0; box-shadow: inset 0 3px 0 var(--seal), var(--shadow); }
.emjl .box.box-success { border-top: 0; box-shadow: inset 0 3px 0 var(--ledger), var(--shadow); }
.emjl .box-header { padding: 14px 18px; }
.emjl .box-header.with-border { border-bottom: 1px solid var(--rule-soft); }
.emjl .box-header .box-title, .emjl .box-header h3 { font-family: var(--display); font-size: 16.5px; font-weight: 700; color: var(--ink); }
.emjl .box-body { padding: 16px 18px; }
.emjl .box-body::after { content: ""; display: table; clear: both; }
.emjl .box-solid { border: 1px solid var(--rule); }

/* Formulaires : hauteur unique, lisibles, alignés */
.emjl .form-control {
    border: 1px solid #CBD5E1; border-radius: 8px; box-shadow: none;
    height: 40px; font-size: 15px; color: var(--text); background: var(--surface);
}
.emjl .form-control.input-lg, .emjl .input-lg { height: 42px; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.emjl .form-control.input-sm, .emjl .input-sm { height: 36px; font-size: 14px; }
.emjl textarea.form-control { height: auto; min-height: 42px; line-height: 1.6; }
.emjl .form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.emjl .form-control::placeholder { color: #94A3B8; }
.emjl .box-body > [class*="col-"], .emjl form [class*="col-sm-"] { margin-bottom: 12px; }
.emjl label { font-weight: 600; color: var(--ink); font-size: 14px; }
.emjl select.form-control { padding-top: 6px; padding-bottom: 6px; }

/* Boutons */
.emjl .btn { border-radius: 8px; font-weight: 600; box-shadow: none; border-width: 1px; }
.emjl .btn.input-lg { height: 42px; line-height: 1.2; }
.emjl .btn-primary, .emjl .bouton_serech {
    background: var(--blue) !important; border-color: var(--blue) !important; color: #fff !important;
}
.emjl .btn-primary:hover, .emjl .btn-primary:focus, .emjl .bouton_serech:hover { background: var(--blue-hover) !important; border-color: var(--blue-hover) !important; }
.emjl .bouton_serech { border: 1px solid; border-radius: 8px; padding: 0 16px; height: 42px; font-weight: 600; cursor: pointer; }
.emjl .btn-danger { background: var(--seal); border-color: var(--seal); }
.emjl .btn-success { background: var(--ledger); border-color: var(--ledger); }
.emjl .btn-default { background: var(--surface); border-color: #CBD5E1; color: var(--ink); }
.emjl .btn-default:hover { background: var(--paper); }

/* Tableaux : lecture de registre */
.emjl .table { background: var(--surface); margin-bottom: 0; font-variant-numeric: tabular-nums; }
.emjl .table > thead > tr > th {
    background: var(--head); color: var(--ink); font-weight: 600; font-size: 14px;
    border-bottom: 2px solid var(--rule) !important; white-space: nowrap; vertical-align: middle;
}
.emjl .table > tbody > tr > td, .emjl .table > tbody > tr > th { border-top: 1px solid var(--rule-soft); vertical-align: middle; padding: 10px 12px; }
.emjl .table-bordered, .emjl .table-bordered > thead > tr > th, .emjl .table-bordered > tbody > tr > td { border-color: var(--rule-soft); }
.emjl .table-hover > tbody > tr:hover { background: var(--hover); }
.emjl .table-responsive { border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 16px; }
.emjl .table-responsive > .table { border: 0; }
.emjl .table td img[src$=".ico"] { width: 18px !important; height: 18px !important; opacity: .75; transition: opacity .15s; }
.emjl .table td a:hover img[src$=".ico"] { opacity: 1; }
.emjl .tr_color { background: #FFF7D6 !important; }

/* Pagination */
.emjl .pagination > li > a, .emjl .pagination > li > span { color: var(--blue); border-color: var(--rule); }
.emjl .pagination > .active > a, .emjl .pagination > .active > span { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Pied de page */
.emjl .main-footer.emjl-footer {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; padding: 12px 24px;
}

/* --- Tableau de bord ---------------------------------------------------- */
.emjl .emjl-dash-head > h1 { font-size: 24px; }
.emjl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.emjl-stat { display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; text-decoration: none !important; color: var(--ink) !important;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); border-top: 3px solid var(--blue); }

.emjl-stat:hover { background: var(--hover); }
.emjl-stat-value { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.emjl-stat-label { color: var(--muted); font-size: 14px; }
.emjl-stat.is-alert .emjl-stat-value { color: var(--seal); }

.emjl-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.emjl-quick a {
    display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--rule-soft); border-radius: var(--radius);
    color: var(--ink) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; line-height: 1.3;
}
.emjl-quick a:hover { border-color: var(--blue); background: var(--hover); }
.emjl-quick .fa { width: 22px; text-align: center; font-size: 17px; color: var(--blue); flex: none; }

.emjl-reminders { list-style: none; margin: 0; padding: 0; }
.emjl-reminders li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.emjl-reminders li:last-child { border-bottom: 0; }
.emjl-empty { text-align: center; padding: 36px 16px !important; color: var(--muted); }
.emjl-empty .fa { font-size: 34px; color: var(--ledger); opacity: .8; }
.emjl-empty p { margin: 10px 0 0; }
.emjl .box-body.no-padding .table-responsive { border: 0; border-radius: 0; margin: 0; }
.emjl-nowrap { white-space: nowrap; }
.emjl-row-actions .btn { margin-inline-start: 4px; }
.emjl-count-link { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 12px; background: var(--paper); color: var(--muted) !important; font-weight: 600; text-decoration: none !important; }
.emjl-count-link.has-items { background: var(--seal); color: #fff !important; }

.emjl-timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--rule); }
.emjl-timeline li { position: relative; padding: 0 0 22px; padding-inline-start: 22px; }
.emjl-timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.emjl-timeline li:first-child::before { background: var(--seal); border-color: var(--seal); }
.emjl-timeline time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.emjl-timeline h4 { margin: 2px 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
.emjl-timeline-body { color: var(--text-2); }
.emjl-rtl .emjl-print-btn { float: left !important; }
.emjl-ltr .emjl-print-btn { float: right !important; }

@media (max-width: 991px) {
    .emjl-stats { grid-template-columns: 1fr 1fr; }
}

/* --- Connexion ---------------------------------------------------------- */
.emjl-login { background: var(--paper); min-height: 100vh; margin: 0; }
.emjl-login-shell { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; min-height: 100vh; }
.emjl-login-identity {
    background: radial-gradient(520px 360px at 20% 0%, rgba(37, 99, 235, .35), transparent 70%), var(--side); color: #fff; display: flex; flex-direction: column; justify-content: center;
    padding: 48px 56px; gap: 18px;
}
.emjl-login-office { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.4; margin: 18px 0 0; max-width: 16em; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.emjl-login-domains { color: var(--ink-text); font-size: 16px; margin: 0; }
.emjl-login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; position: relative; }
.emjl-lang-login { position: absolute; top: 20px; inset-inline-end: 24px; display: flex; padding: 0 !important; }
.emjl-login-card {
    width: 100%; max-width: 400px; background: var(--surface); border: 0;
    border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px 32px 28px;
}

.emjl-login-card h1 { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.emjl-login-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.emjl-login-card .btn-primary { margin-top: 8px; height: 46px; }
.emjl-input-icon { position: relative; }
.emjl-input-icon > .fa { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: #94A3B8; }
.emjl-input-icon > .form-control { padding-inline-start: 40px; }
.emjl-login-foot { margin-top: 22px; display: flex; gap: 22px; font-size: 14px; }
.emjl-login-foot a { color: var(--muted); }
@media (max-width: 767px) {
    .emjl-login-shell { grid-template-columns: 1fr; }
    .emjl-login-identity { padding: 28px 24px; flex-direction: row; align-items: center; }
    .emjl-login-identity .emjl-seal-xl { width: 46px; height: 46px; font-size: 20px; flex: none; }
    .emjl-login-office { font-size: 17px; margin: 0; }
    .emjl-login-domains { display: none; }
    .emjl-login-panel { padding-top: 64px; }
    .emjl-login-card { padding: 24px 20px; }
}

/* --- Petits écrans ------------------------------------------------------ */
@media (max-width: 767px) {
    .emjl .content { padding: 12px; }
    .emjl .content-header { padding: 16px 12px 0; }
    .emjl .content-header > .breadcrumb { position: static; padding: 6px 0 0; }
    .emjl .emjl-office { display: none; }
    .emjl .main-sidebar { padding-top: 112px; }
}

@media (prefers-reduced-motion: reduce) {
    .emjl * { transition: none !important; animation: none !important; }
}

/* --- Impression --------------------------------------------------------- */
@media print {
    .emjl .main-header, .emjl .main-sidebar, .emjl .main-footer, .emjl-flash-zone, .emjl-skip { display: none !important; }
    .emjl .content-wrapper { margin: 0 !important; background: #fff; }
    .emjl .box { border: 0; }
}

/* --- Gestion locative (France) -------------------------------------------- */
.gl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.gl-head h1 { margin: 0; }
.gl-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--rule); width: 100%; margin-top: 6px; }
.gl-tabs a { padding: 8px 12px; color: var(--muted) !important; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.gl-tabs a:hover { color: var(--ink) !important; }
.gl-tabs a.is-active { color: var(--ink) !important; border-bottom-color: var(--seal); }
.gl-tabs .fa { color: var(--blue); margin-inline-end: 3px; }
.gl-crumb { color: var(--muted); margin: 0 0 12px; }
.gl-muted { color: var(--muted); }
.gl-small { font-size: 13px; }
.gl-mt { margin-top: 12px; }
.gl-num, .gl-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.emjl-stat-value.gl-money { font-size: 24px; }
.gl-due { color: var(--seal); font-weight: 600; }
.gl-inline { display: inline; }
.gl-label { display: block; font-weight: 700; margin-bottom: 5px; }
.gl-align-end { display: flex; align-items: flex-end; min-height: 59px; }
.gl-checks label { display: block; font-weight: 500; margin: 4px 0; }
.gl-checks { padding-top: 22px; }
.gl-danger-link { color: var(--seal) !important; }
.gl-delete-zone { margin: 4px 0 16px; text-align: end; }
.gl-invalid { border-color: var(--seal) !important; box-shadow: 0 0 0 2px rgba(220, 38, 38, .15) !important; }
.gl-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.gl-box-head .btn { margin-inline-start: auto; }
.gl-filter { display: flex; gap: 4px; }
.gl-filter a { padding: 3px 10px; border-radius: 14px; color: var(--muted) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.gl-filter a.is-active { background: var(--side); color: #fff !important; }
.gl-table > thead > tr > th { font-size: 12.5px; color: var(--muted); font-weight: 600; border-bottom-width: 1px; }
.gl-table td { vertical-align: middle !important; }

/* statuts */
.gl-status, .gl-chip, .gl-pay { display: inline-block; padding: 1px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.gl-chip { background: var(--paper); color: var(--muted); }
.gl-status.is-actif { background: #E3EFE8; color: var(--ledger); }
.gl-status.is-preavis { background: #F6ECD9; color: var(--amber); }
.gl-status.is-termine { background: var(--paper); color: var(--muted); }
.gl-pay.is-payee { background: #E3EFE8; color: var(--ledger); }
.gl-pay.is-partielle { background: #F6ECD9; color: var(--amber); }
.gl-pay.is-impayee { background: #F6E1DE; color: var(--seal); }
.gl-pay.is-a_venir { background: var(--paper); color: var(--muted); }
.gl-ledger tr.is-impayee td:first-child { box-shadow: inset 3px 0 0 var(--seal); }
.emjl-rtl .gl-ledger tr.is-impayee td:first-child { box-shadow: inset -3px 0 0 var(--seal); }

/* notes et alertes */
.gl-note { padding: 10px 14px; border-radius: var(--radius); background: var(--paper); border-inline-start: 3px solid var(--rule); margin: 0 0 12px; }
.gl-note.is-ok { background: #EEF6F1; border-color: var(--ledger); }
.gl-note.is-warning { background: #FBF4E7; border-color: var(--amber); }
.gl-note.is-danger { background: #FBEDEB; border-color: var(--seal); }
.gl-alerts { list-style: none; margin: 0; padding: 0; }
.gl-alerts li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); }
.gl-alerts li:last-child { border-bottom: 0; }
.gl-alerts li span { flex: 1; }
.gl-alerts .fa { width: 18px; text-align: center; font-size: 16px; }
.gl-alerts .is-danger .fa { color: var(--seal); }
.gl-alerts .is-warning .fa { color: var(--amber); }
.gl-alerts .is-info .fa { color: var(--blue); }
.gl-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.gl-kv dt { color: var(--muted); font-weight: 500; }
.gl-kv dd { margin: 0; font-weight: 600; }
.gl-list { list-style: none; padding: 0; margin: 0 0 12px; }
.gl-list li { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.gl-irl-big { font-size: 34px; font-weight: 700; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
.gl-sub { font-size: 15px; font-weight: 700; margin: 18px 0 10px; color: var(--ink); }

/* DPE */
.gl-dpe { display: inline-block; min-width: 22px; text-align: center; border-radius: 3px; color: #fff; font-weight: 700; font-size: 12px; line-height: 20px; }
.gl-dpe-A { background: #2A7D46; } .gl-dpe-B { background: #4E9B3A; } .gl-dpe-C { background: #9DBB2F; color: #1E293B; }
.gl-dpe-D { background: #E8C619; color: #1E293B; } .gl-dpe-E { background: #E9A23B; color: #1E293B; } .gl-dpe-F { background: #DC6B2F; } .gl-dpe-G { background: #C2312B; }
.gl-dpe-scale { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 3px; }
.gl-dpe-scale li { color: #fff; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 0 3px 3px 0; opacity: .35; }
.emjl-rtl .gl-dpe-scale li { border-radius: 3px 0 0 3px; }
.gl-dpe-scale li:nth-child(1) { width: 34%; } .gl-dpe-scale li:nth-child(2) { width: 44%; } .gl-dpe-scale li:nth-child(3) { width: 54%; }
.gl-dpe-scale li:nth-child(4) { width: 64%; } .gl-dpe-scale li:nth-child(5) { width: 74%; } .gl-dpe-scale li:nth-child(6) { width: 84%; } .gl-dpe-scale li:nth-child(7) { width: 94%; }
.gl-dpe-scale li.is-current { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.gl-checklist { list-style: none; padding: 0; margin: 0; }
.gl-checklist li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--rule-soft); position: relative; }
.emjl-rtl .gl-checklist li { padding: 8px 28px 8px 0; }
.gl-checklist li::before { font-family: FontAwesome; position: absolute; inset-inline-start: 4px; top: 8px; }
.gl-checklist .is-ok::before { content: "\f00c"; color: var(--ledger); }
.gl-checklist .is-missing::before { content: "\f128"; color: var(--amber); }
.gl-checklist .is-expired::before { content: "\f071"; color: var(--seal); }
.gl-checklist strong { min-width: 220px; }

/* fiche bail */
.gl-lease-head .box-body::before, .gl-lease-head .box-body::after, .gl-head::before, .gl-head::after { display: none; }
.gl-lease-head .box-body { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.gl-lease-id h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--ink); }
.gl-lease-id h2 .gl-status { vertical-align: middle; margin-inline-start: 6px; }
.gl-lease-id p { margin: 0; }
.gl-figures { display: flex; flex-wrap: wrap; gap: 0; margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.gl-figures > div { padding: 8px 16px; }
.gl-figures > div + div { border-inline-start: 1px solid var(--rule); }
.gl-figures dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.gl-figures dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.gl-figures .is-due dd { color: var(--seal); }
.gl-figures .is-clear dd { color: var(--ledger); }
/* frise des échéances légales : un filet daté, passé en plein, à venir en pointillé */
.gl-timeline { list-style: none; display: flex; margin: 0; padding: 14px 18px 16px; border-top: 1px solid var(--rule-soft); background: var(--head); overflow-x: auto; }
.gl-timeline li { flex: 1 0 120px; position: relative; padding-top: 18px; }
.gl-timeline li::before { content: ""; position: absolute; top: 5px; inset-inline: 0; border-top: 2px solid var(--ink); }
.gl-timeline li.is-next::before { border-top: 2px dashed var(--rule); }
.gl-timeline li::after { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--side); border: 2px solid var(--head); }
.gl-timeline li.is-next::after { background: var(--surface); border: 2px solid var(--blue); }
.gl-timeline li.is-alert::after { background: var(--seal); border-color: var(--seal); }
.gl-timeline li:last-child::before { inset-inline-end: auto; width: 0; }
.gl-tl-date { display: block; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; }
.gl-tl-label { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; padding-inline-end: 10px; }
.gl-lease-tabs .nav-tabs > li > a { font-weight: 600; }
.gl-lease-tabs .tab-content { padding: 18px; }
.gl-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.gl-step { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.gl-step h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.gl-step p { flex: 1; }
.gl-step .btn { align-self: flex-start; }
.gl-calc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.gl-formula { font-size: 18px; margin: 6px 0; font-variant-numeric: tabular-nums; }
.gl-type-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gl-type-pick legend { border: 0; margin-bottom: 5px; font-size: 14px; }
.gl-type-pick label { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; font-weight: 400; cursor: pointer; margin: 0; }
.gl-type-pick label:has(input:checked) { border-color: var(--blue); background: var(--hover); box-shadow: inset 0 0 0 1px var(--blue); }
.gl-type-pick input { margin-top: 4px; }
.gl-type-pick small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.gl-sticky { position: sticky; top: 70px; }
@media (max-width: 991px) {
    .gl-steps, .gl-type-pick { grid-template-columns: 1fr 1fr; }
    .gl-sticky { position: static; }
}
@media (max-width: 600px) {
    .gl-steps, .gl-type-pick { grid-template-columns: 1fr; }
    .gl-figures > div { flex: 1 0 50%; }
    .gl-figures > div:nth-child(3) { border-inline-start: 0; }
}

/* ==========================================================================
   Formulaires et tableaux — système commun (emjl-ui.js ajoute les classes)
   ========================================================================== */

/* --- En-têtes de boîte : titre + actions sur une ligne -------------------- */
.emjl .box-header.with-border { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 18px; }
.emjl .box-header.with-border::before, .emjl .box-header.with-border::after { display: none; }
.emjl .box-header.with-border > [class*="col-"] { float: none; width: auto; padding: 0; margin: 0; flex: 0 1 auto; }
.emjl .box-header.with-border > [class*="col-"]:first-child, .emjl .box-header.with-border > .box-title { flex: 1 1 auto; }
.emjl .box-header.with-border h3 { margin: 0; }
.emjl .box-header .pull-left, .emjl .box-header .pull-right { float: none !important; }
.emjl-print-action { margin-inline-start: auto; }
.emjl-print-action .fa { margin-inline-end: 4px; }

/* --- Formulaires ---------------------------------------------------------- */
.emjl .emjl-label { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.emjl .emjl-req { color: var(--seal); }
.emjl .form-control, .emjl .form-control.input-lg, .emjl .input-lg { height: 40px; font-size: 15px; padding: 7px 12px; }
.emjl .form-control.input-sm, .emjl .input-sm { height: 34px; font-size: 14px; padding: 5px 10px; }
.emjl textarea.form-control, .emjl textarea.form-control.input-lg { height: auto; min-height: 76px; }
.emjl .form-control:hover { border-color: #94A3B8; }
.emjl .form-control[readonly], .emjl .form-control[disabled] { background: var(--paper); color: var(--text-2); }
.emjl input[type="date"].form-control, .emjl input[type="time"].form-control { padding-top: 5px; padding-bottom: 5px; }
.emjl input[type="file"].form-control { height: auto; padding: 7px 10px; background: var(--head); border-style: dashed; }
.emjl input[type="checkbox"], .emjl input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; vertical-align: -3px; margin: 0; }

/* Grille des colonnes Bootstrap sans .row : espacement régulier */
.emjl .emjl-form [class*="col-"], .emjl .emjl-form-search [class*="col-"] { margin-bottom: 14px; min-height: 0; }
.emjl .emjl-form .box-body, .emjl .emjl-form-search .box-body { padding-bottom: 4px; }
.emjl .emjl-form .box-body::after, .emjl .emjl-form-search::after { content: ""; display: table; clear: both; }

/* Formulaire de saisie : un panneau calme, actions en pied */
.emjl form.emjl-form { position: relative; }
.emjl .emjl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; clear: both; }
.emjl .emjl-submit { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.emjl .emjl-actions .emjl-submit + .emjl-submit { margin: 0; }

/* Recherche : barre de filtres distincte de la saisie */
.emjl form.emjl-form-search { background: #F7F9FB; border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 6px 2px; margin: 8px 18px 16px; }
.emjl .box-body form.emjl-form-search, .emjl .col-sm-12 > form.emjl-form-search { margin-inline: 0; }
.emjl .emjl-form-legend { margin: 0 12px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.emjl .emjl-form-legend .fa { color: var(--blue); margin-inline-end: 4px; }
.emjl .emjl-form-search .form-control { background: var(--surface); }
.emjl .emjl-form-search .emjl-submit { height: 40px; }
.emjl .emjl-form-search .emjl-actions { padding-top: 21px; }

/* Cases à cocher en série → pastilles */
.emjl .emjl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.emjl .emjl-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 16px;
    background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; user-select: none; }
.emjl .emjl-chip:hover { border-color: #94A3B8; }
.emjl .emjl-chip:has(input:checked) { border-color: var(--blue); background: var(--hover); color: var(--ink); }
.emjl .emjl-chip b, .emjl .emjl-chip strong { font-weight: 500; }

/* --- Tableaux ------------------------------------------------------------- */
.emjl .emjl-table-wrap { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.emjl .box-body.no-padding .emjl-table-wrap { border: 0; border-radius: 0; margin: 0; }
.emjl table.emjl-table > thead > tr > th { background: var(--head); font-size: 13px; color: var(--text-2); padding: 10px 12px; border-bottom: 1px solid var(--rule) !important; white-space: nowrap; }
.emjl table.emjl-table > tbody > tr > td { padding: 10px 12px; border-top: 1px solid var(--rule-soft); font-size: 14.5px; }
.emjl table.emjl-table > tbody > tr:first-child > td { border-top: 0; }
.emjl table.emjl-table > tbody > tr:hover > td { background: var(--hover); }
.emjl table.emjl-table > tbody > tr[hidden] { display: none !important; }
.emjl .emjl-th-act, .emjl .emjl-cell-act { width: 1%; white-space: nowrap; text-align: center !important; }
.emjl .emjl-cell-act { padding-inline: 6px !important; }

/* Boutons d'action à icône : une couleur par action (ouvrir, modifier, supprimer, valider, neutre).
   Fond teinté au repos, couleur pleine au survol, infobulle tirée de l'aria-label. */
.emjl .emjl-icon-btn {
    --act: var(--blue); --act-bg: rgba(37, 99, 235, .09);
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 34px; border-radius: 10px; border: 0; padding: 0;
    background: var(--act-bg); color: var(--act) !important; font-size: 15px; line-height: 1; text-decoration: none !important; vertical-align: middle;
    cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.emjl .emjl-icon-btn + .emjl-icon-btn, .emjl form + .emjl-icon-btn { margin-inline-start: 6px; }
.emjl .emjl-icon-btn:hover, .emjl .emjl-icon-btn:focus-visible { background: var(--act); color: #fff !important; transform: translateY(-1px); box-shadow: 0 4px 12px -4px var(--act); }
.emjl .emjl-icon-btn:active { transform: none; box-shadow: none; }
.emjl .emjl-icon-btn:focus-visible { outline: 3px solid var(--act-bg); outline-offset: 2px; }
.emjl .emjl-icon-btn .fa { font-size: 15px; width: auto; }
.emjl .emjl-icon-btn.is-open { --act: #2563EB; --act-bg: rgba(37, 99, 235, .10); }
.emjl .emjl-icon-btn.is-edit { --act: #B45309; --act-bg: rgba(217, 119, 6, .12); }
.emjl .emjl-icon-btn.is-danger { --act: #DC2626; --act-bg: rgba(220, 38, 38, .10); }
.emjl .emjl-icon-btn.is-ok { --act: #15803D; --act-bg: rgba(22, 163, 74, .11); }
.emjl .emjl-icon-btn.is-neutral { --act: #475569; --act-bg: rgba(100, 116, 139, .12); }
.emjl .emjl-icon-btn img { width: 18px !important; height: 18px !important; }
/* infobulle */
.emjl .emjl-icon-btn[data-tip]::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translate(-50%, 4px);
    padding: 4px 8px; border-radius: 6px; background: #0F172A; color: #fff; font: 600 12px/1.3 var(--font); white-space: nowrap;
    pointer-events: none; opacity: 0; transition: opacity .12s ease, transform .12s ease; z-index: 30;
}
.emjl .emjl-icon-btn[data-tip]:hover::after, .emjl .emjl-icon-btn[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .emjl .emjl-icon-btn, .emjl .emjl-icon-btn::after { transition: none; } .emjl .emjl-icon-btn:hover { transform: none; } }
/* cellules d'action : boutons sur une ligne */
.emjl td.emjl-cell-act, .emjl .emjl-row-actions { white-space: nowrap; }
.emjl td.emjl-cell-act > form, .emjl .emjl-row-actions > form { display: inline-block; margin: 0; }
/* colonne entièrement vide (masquée par emjl-ui.js) */
.emjl .emjl-col-empty { display: none !important; }
/* mode sombre : teintes un peu plus franches */
html.emjl-dark .emjl .emjl-icon-btn.is-open { --act: #6EA8FF; --act-bg: rgba(91, 155, 255, .16); }
html.emjl-dark .emjl .emjl-icon-btn.is-edit { --act: #FBBF24; --act-bg: rgba(251, 191, 36, .14); }
html.emjl-dark .emjl .emjl-icon-btn.is-danger { --act: #F87171; --act-bg: rgba(248, 113, 113, .15); }
html.emjl-dark .emjl .emjl-icon-btn.is-ok { --act: #4ADE80; --act-bg: rgba(74, 222, 128, .14); }
html.emjl-dark .emjl .emjl-icon-btn.is-neutral { --act: #CBD5E1; --act-bg: rgba(203, 213, 225, .12); }
html.emjl-dark .emjl .emjl-icon-btn.is-edit:hover, html.emjl-dark .emjl .emjl-icon-btn.is-ok:hover, html.emjl-dark .emjl .emjl-icon-btn.is-neutral:hover { color: #0F172A !important; }

/* Tri */
.emjl .emjl-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.emjl .emjl-sort::after { content: "\f0dc"; font-family: FontAwesome; font-size: 11px; color: #94A3B8; }
.emjl [aria-sort="ascending"] .emjl-sort::after { content: "\f0de"; color: var(--blue); }
.emjl [aria-sort="descending"] .emjl-sort::after { content: "\f0dd"; color: var(--blue); }
.emjl .emjl-sort:focus-visible { outline: 2px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 2px; }

/* Barre d'outils au-dessus du tableau */
.emjl .emjl-table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 10px; }
.emjl .emjl-table-filter { position: relative; margin: 0; flex: 0 1 280px; }
.emjl .emjl-table-filter .fa { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.emjl .emjl-table-filter .form-control { padding-inline-start: 32px; height: 36px; font-weight: 400; }
.emjl .emjl-table-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.emjl .emjl-table-nomatch { color: var(--muted); padding: 14px; text-align: center; border: 1px dashed var(--rule); border-radius: var(--radius); margin: -6px 0 16px; }

/* --- Mobile --------------------------------------------------------------- */
@media (max-width: 767px) {
    .emjl .content { padding: 12px 10px; }
    .emjl .box-body { padding: 14px 12px; }
    .emjl .emjl-actions { flex-direction: column; align-items: stretch; }
    .emjl .emjl-submit { width: 100%; }
    .emjl form.emjl-form-search { margin-inline: 0; }
    .emjl .emjl-form-search .emjl-actions { padding-top: 0; }
    .emjl .emjl-table-filter { flex: 1 1 100%; }

    /* Tableau → cartes : chaque ligne devient une fiche « libellé : valeur » */
    .emjl .emjl-table-wrap:has(> table.emjl-cards) { border: 0; background: transparent; overflow: visible; }
    .emjl table.emjl-cards, .emjl table.emjl-cards > tbody { display: block; width: 100%; background: transparent; }
    .emjl table.emjl-cards > thead { display: none; }
    .emjl table.emjl-cards > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; background: var(--surface);
        border: 1px solid var(--rule); border-radius: var(--radius); padding: 4px 14px 10px; margin-bottom: 10px; }
    .emjl table.emjl-cards > tbody > tr > td { display: grid; grid-template-columns: minmax(92px, 36%) minmax(0, 1fr); gap: 10px; width: 100% !important; min-width: 0 !important; max-width: none !important;
        padding: 8px 0 !important; border: 0 !important; border-bottom: 1px solid var(--rule-soft) !important; text-align: start !important; white-space: normal; background: none !important; }
    .emjl table.emjl-cards > tbody > tr > td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
    .emjl table.emjl-cards > tbody > tr > td:not([data-label])::before { content: none; }
    .emjl table.emjl-cards > tbody > tr > td:not([data-label]) { display: block; }
    .emjl table.emjl-cards > tbody > tr > td.emjl-cell-empty { display: none; }
    .emjl table.emjl-cards > tbody > tr > td.emjl-cell-act { order: 99; display: inline-flex; width: auto !important; border: 0 !important; padding: 10px 0 0 !important; }
    .emjl table.emjl-cards > tbody > tr > td.emjl-cell-act::before { content: none; }
    .emjl table.emjl-cards > tbody > tr > td.emjl-cell-act:empty { display: none; }
    .emjl table.emjl-cards > tbody > tr > td:nth-last-child(1 of :not(.emjl-cell-act):not(.emjl-cell-empty)) { border-bottom: 0 !important; }
    .emjl .emjl-icon-btn { width: 40px; height: 40px; border-radius: 12px; }
}

@media print {
    .emjl-table-tools, .emjl-print-action, .emjl-form-legend, .emjl-table-nomatch { display: none !important; }
    .emjl .emjl-icon-btn { display: none !important; }
}
.emjl .emjl-v { min-width: 0; overflow-wrap: break-word; }

/* Menu latéral sur mobile : tiroir masqué, ouvert par le bouton (côté droit en arabe) */
@media (max-width: 767px) {
    .emjl .main-sidebar { transition: transform .25s ease; }
    .emjl-rtl .main-sidebar { left: auto !important; right: 0 !important; transform: translateX(100%) !important; }
    .emjl-rtl.sidebar-open .main-sidebar { transform: translateX(0) !important; box-shadow: -8px 0 24px rgba(15, 26, 44, .25); }
    .emjl-ltr .main-sidebar { transform: translateX(-100%) !important; }
    .emjl-ltr.sidebar-open .main-sidebar { transform: translateX(0) !important; box-shadow: 8px 0 24px rgba(15, 26, 44, .25); }
    .emjl .content-wrapper, .emjl .main-footer { margin-inline: 0 !important; transform: none !important; }
}
.emjl .box-header.with-border > [class*="col-"]:only-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; flex: 1 1 100%; }
.emjl .box-header.with-border > [class*="col-"]:only-child > h3 { order: -1; }
.emjl .box-header.with-border p { margin: 0; }
.emjl .emjl-label + br, .emjl .emjl-has-label + br, .emjl .emjl-has-label + br + br { display: none; }
/* Intertitres des longs formulaires (déclarations, biens…) */
.emjl .box-body h3:not(.box-title), .emjl .box-body h4, .emjl form legend {
    font-size: 16px; font-weight: 700; color: var(--ink); margin: 22px 0 12px; padding-top: 14px; border-top: 1px solid var(--rule-soft); border-bottom: 0;
}
.emjl .box-body > h3:first-child, .emjl .box-body > .col-sm-12:first-child > h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.emjl .content button:not(.btn):not(.emjl-sort):not(.close):not([class*="fc-"]) {
    border: 1px solid #CBD5E1; background: var(--surface); color: var(--ink); border-radius: 4px; padding: 6px 14px; font-weight: 600; font-size: 14px;
}
.emjl .content button:not(.btn):not(.emjl-sort):not(.close):not([class*="fc-"]):hover { background: var(--paper); }
/* Formulaires empilés → grille fluide */
.emjl .emjl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; align-items: end; }
.emjl .emjl-grid::before, .emjl .emjl-grid::after { display: none !important; }
.emjl .emjl-grid > [class*="col-"] { float: none; width: auto; padding: 0; }
.emjl .emjl-grid > .emjl-span, .emjl .emjl-grid > :not([class*="col-"]) { grid-column: 1 / -1; }
.emjl .emjl-grid > br, .emjl .emjl-grid > input[type="hidden"] { display: none; }
/* Anciennes classes d'impression utilisées comme intertitres à l'écran */
@media screen {
    .emjl .imprim_labl, .emjl .imprim_span, .emjl .imprim_span_left { font-family: var(--font); font-size: 15px; }
    .emjl label.imprim_labl, .emjl .box-body > .imprim_labl { color: var(--ink); font-weight: 700; }
}
/* Cases à cocher / boutons radio Bootstrap : case et texte côte à côte */
.emjl .checkbox label, .emjl .radio label, .emjl label.checkbox-inline, .emjl label.radio-inline {
    display: inline-flex; align-items: center; gap: 8px; padding-inline-start: 0; min-height: 24px; font-weight: 500;
}
.emjl .checkbox input[type="checkbox"], .emjl .radio input[type="radio"], .emjl .checkbox-inline input, .emjl .radio-inline input {
    position: static; margin: 0 !important; float: none;
}
@media (max-width: 767px) {
    .gl-head { display: block; }
    .gl-head h1 { font-size: 22px; }
    .gl-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .gl-tabs::-webkit-scrollbar { display: none; }
    .gl-tabs a { white-space: nowrap; flex: none; }
    .gl-lease-tabs .nav-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .gl-lease-tabs .nav-tabs > li { float: none; flex: none; }
    .gl-lease-tabs .nav-tabs > li > a { white-space: nowrap; padding: 10px 12px; }
    .gl-lease-tabs .tab-content { padding: 12px; }
}

/* --- Agenda --------------------------------------------------------------- */
.emjl-cal-head { gap: 8px !important; }
.emjl-cal-head .box-title { flex: 0 1 auto !important; min-width: 150px; text-align: center; }
.emjl-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-inline-start: 1px solid var(--rule); }
.emjl-cal-wd { padding: 6px 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--head); border-inline-end: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: center; }
.emjl-cal-day { min-height: 92px; padding: 4px 6px 6px; border-inline-end: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.emjl-cal-day.is-out { background: var(--head); }
.emjl-cal-num { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.emjl-cal-day.is-today { background: var(--tint); }
.emjl-cal-day.is-today .emjl-cal-num { color: #fff; background: var(--blue); border-radius: 11px; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.emjl-cal-ev { display: block; font-size: 12px; line-height: 1.35; padding: 2px 6px; border-radius: 4px; background: var(--tint); color: var(--ink) !important;
    border-inline-start: 3px solid var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.emjl-cal-ev:hover { background: var(--hover); }
.emjl-cal-ev time { font-weight: 700; font-variant-numeric: tabular-nums; }
.emjl-cal-list { list-style: none; margin: 0; padding: 0; }
.emjl-cal-list li { border-bottom: 1px solid var(--rule-soft); }
.emjl-cal-list a { display: block; padding: 8px 0; color: var(--text) !important; }
.emjl-cal-list strong { display: block; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
    .emjl-cal-wd { font-size: 0; padding: 4px 0; }
    .emjl-cal-wd::first-letter { font-size: 12px; }
    .emjl-cal-day { min-height: 56px; padding: 3px; }
    .emjl-cal-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; border: 0; background: var(--blue); }
}

/* Case « rester connecté 30 jours » */
.emjl-remember { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.emjl-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }

/* --- Tableau de bord : panneaux d'activité --------------------------------- */
.emjl .emjl-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.emjl .emjl-box-head > a { font-size: 13.5px; font-weight: 600; }
.emjl .emjl-box-head::before, .emjl .emjl-box-head::after { display: none; }
.emjl-muted { color: var(--muted); margin: 0; }

.emjl-activity { list-style: none; margin: 0; padding: 0; }
.emjl-activity li {
    display: grid; grid-template-columns: minmax(6em, auto) 1fr; gap: 2px 14px;
    padding: 11px 0; border-bottom: 1px solid var(--rule-soft);
}
.emjl-activity li:last-child { border-bottom: 0; }
.emjl-activity-action {
    grid-row: span 2; align-self: start; justify-self: start; padding: 1px 9px; border-radius: 3px;
    background: var(--tint); color: var(--blue); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.emjl-activity-text { color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.emjl-activity-meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.emjl-agenda { list-style: none; margin: 0; padding: 0; }
.emjl-agenda li { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); }
.emjl-agenda li:last-child { border-bottom: 0; }
.emjl-agenda-date {
    flex: none; width: 52px; text-align: center; border: 1px solid var(--rule); border-top: 3px solid var(--blue);
    border-radius: var(--radius); padding: 3px 0; line-height: 1.15; font-variant-numeric: tabular-nums;
}
.emjl-agenda-date strong { display: block; font-size: 19px; color: var(--ink); }
.emjl-agenda-date small { color: var(--muted); font-size: 11.5px; }
.emjl-agenda-body { display: flex; flex-direction: column; min-width: 0; }
.emjl-agenda-body strong { color: var(--ink); font-weight: 600; }
.emjl-agenda-body small { color: var(--muted); }

.emjl-files { list-style: none; margin: 0; padding: 0; }
.emjl-files a {
    display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 9px 6px; margin-inline: -6px;
    border-bottom: 1px solid var(--rule-soft); color: var(--text) !important; text-decoration: none !important; border-radius: var(--radius);
}
.emjl-files li:last-child a { border-bottom: 0; }
.emjl-files a:hover { background: var(--tint); }
.emjl-files-num { grid-row: span 2; align-self: center; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.emjl-files-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emjl-files-nature { color: var(--muted); font-size: 13px; }

/* Icônes d'action dans les listes (remplacent les anciennes images .ico) */
.emjl .emjl-ico { font-size: 17px; width: 22px; text-align: center; color: var(--muted); vertical-align: middle; transition: color .15s ease; }
.emjl a:hover > .emjl-ico, .emjl a:focus-visible > .emjl-ico { color: var(--blue); }
.emjl .emjl-ico.is-danger { color: #B91C1C; }
.emjl a:hover > .emjl-ico.is-danger { color: var(--seal); }
.emjl .emjl-ico.is-ok { color: var(--ledger); }

/* ===================================================================== */
/* Lisibilité des listes, formulaires et navigation                      */
/* ===================================================================== */

/* Actions : une seule ligne, sans les <br> des anciennes vues */
.emjl .emjl-cell-act br { display: none; }
.emjl .emjl-cell-act { white-space: nowrap; }

/* Dates et montants mis en forme par le script */
.emjl .emjl-cell-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.emjl .emjl-cell-num { text-align: end !important; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Liste vide */
.emjl .emjl-empty-row { text-align: center !important; color: var(--muted); padding: 32px 16px !important; font-size: 15px; }
.emjl .emjl-empty-row .fa { display: block; font-size: 28px; color: #CBD5E1; margin-bottom: 8px; }
.emjl table.emjl-table-empty thead { display: none; }
@media (max-width: 767px) { .emjl table.emjl-cards > tbody > tr > td.emjl-empty-row::before { content: none; } }

/* Pastilles d'état */
.emjl-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--text-2); }
.emjl-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.emjl-badge.is-ok { background: #DCFCE7; color: #166534; }
.emjl-badge.is-off { background: #FEE2E2; color: #991B1B; }
.emjl-badge.is-wait { background: #FEF3C7; color: #92400E; }

/* Titre de boîte identique au titre de page : masqué, la barre garde ses outils */
.emjl .emjl-dup-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.emjl .box-header.emjl-box-head-tools { min-height: 0; padding-block: 8px; display: flex; justify-content: flex-end; }
.emjl .box-header.emjl-box-head-tools:not(:has(button, a, .box-tools)) { display: none; }

/* Champ fichier */
.emjl .emjl-file { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 14px; margin: 0;
    border: 1.5px dashed #CBD5E1; border-radius: var(--radius); background: var(--head); color: var(--muted); font-weight: 500; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.emjl .emjl-file:hover, .emjl .emjl-file.is-drag { border-color: var(--blue); background: var(--tint); color: var(--blue); }
.emjl .emjl-file.has-file { border-style: solid; border-color: var(--ledger); background: #F0FDF4; color: #166534; }
.emjl .emjl-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.emjl .emjl-file:focus-within { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.emjl .emjl-file-text { overflow-wrap: anywhere; }

/* Erreur sous le champ */
.emjl .form-control.is-invalid { border-color: #DC2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important; }
.emjl .emjl-field-error { margin: 6px 0 0; color: #B91C1C; font-size: 13px; font-weight: 500; }
.emjl .emjl-field-error::before { content: "\f071"; font-family: FontAwesome; margin-inline-end: 6px; }

/* Longs formulaires : sommaire collant + barre d'enregistrement */
.emjl .emjl-toc { position: sticky; top: 8px; z-index: 5; margin: 0 0 16px; padding: 8px 10px; display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.emjl .emjl-toc-title { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.emjl .emjl-toc ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.emjl .emjl-toc a { display: block; padding: 5px 10px; border-radius: 999px; color: var(--text) !important; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; }
.emjl .emjl-toc a:hover { background: var(--paper); }
.emjl .emjl-toc a.is-current { background: var(--tint); color: var(--blue) !important; font-weight: 600; }
.emjl .emjl-form-long legend, .emjl .emjl-form-long .legend_form { scroll-margin-top: 80px; }
.emjl .emjl-savebar { position: sticky; bottom: 0; z-index: 6; display: flex; justify-content: flex-end; gap: 10px; margin: 16px -15px -15px; padding: 12px 16px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--rule); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.emjl .emjl-savebar .emjl-submit { margin: 0 !important; width: auto !important; }

/* Fenêtre de confirmation */
.emjl-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.emjl-modal[hidden] { display: none; }
.emjl-modal-box { width: min(420px, 100%); background: var(--surface); border-radius: 16px; padding: 24px; box-shadow: 0 24px 64px -16px rgba(15, 23, 42, .45); text-align: center; animation: emjl-pop .16s ease-out; }
.emjl-modal-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #FEE2E2; color: #DC2626; font-size: 20px; margin-bottom: 12px; }
.emjl-modal-box h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.emjl-modal-box p { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }
.emjl-modal-actions { display: flex; gap: 10px; justify-content: center; }
.emjl-modal-actions .btn { min-width: 120px; border-radius: 8px; font-weight: 600; }
body.emjl-modal-open { overflow: hidden; }
@keyframes emjl-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* Recherche dans le menu */
.emjl .emjl-menu-search { position: relative; margin: 12px 12px 4px; }
.emjl .emjl-menu-search .fa { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: #64748B; font-size: 13px; pointer-events: none; }
.emjl .emjl-menu-search input { width: 100%; height: 36px; padding-inline: 32px 10px; border-radius: 8px; border: 1px solid #1E293B; background: #1E293B; color: #fff; font-size: 13.5px; }
.emjl .emjl-menu-search input::placeholder { color: #94A3B8; }
.emjl .emjl-menu-search input:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .3); }
.emjl.sidebar-collapse .emjl-menu-search { display: none; }
.emjl .sidebar-menu.is-filtering > li.header { display: none; }

/* Accessibilité : contraste des textes secondaires du menu, focus visible partout */
.emjl .sidebar-menu > li.header { color: #94A3B8 !important; }
.emjl .main-sidebar a:focus-visible, .emjl .main-sidebar button:focus-visible { outline: 2px solid #60A5FA; outline-offset: 2px; }
.emjl a:focus-visible, .emjl button:focus-visible, .emjl .btn:focus-visible, .emjl input:focus-visible, .emjl select:focus-visible, .emjl textarea:focus-visible { outline: 3px solid rgba(37, 99, 235, .5); outline-offset: 2px; }

/* Impression : en-tête du bureau, sans menus ni boutons */
.emjl-print-head { display: none; }
@media print {
    @page { margin: 14mm 12mm; }
    .emjl { background: #fff !important; font-size: 12pt; }
    .emjl-print-head { display: flex !important; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #0F172A; padding-bottom: 8px; margin-bottom: 14px; }
    .emjl-print-head strong { font-size: 15pt; }
    .emjl-print-head span { color: var(--text-2); font-size: 10pt; }
    .emjl .content-header .breadcrumb, .emjl-toc, .emjl-savebar, .emjl-menu-search, .emjl .emjl-submit, .emjl .emjl-file, .emjl .btn, .emjl-modal { display: none !important; }
    .emjl .box { box-shadow: none !important; break-inside: auto; }
    .emjl table { break-inside: auto; }
    .emjl tr, .emjl .emjl-badge { break-inside: avoid; }
    .emjl thead { display: table-header-group; }
    .emjl a[href]::after { content: none !important; }
    body.emjl .content-wrapper, body.emjl .main-footer { margin: 0 !important; padding: 0 !important; min-height: 0 !important; transition: none !important; }
    .emjl .content { padding: 0 !important; }
    .emjl .emjl-sort::after, .emjl .emjl-sort .fa, .emjl th .fa-sort { display: none !important; }
    .emjl .emjl-sort { pointer-events: none; }
    .emjl table { font-size: 9pt; width: 100% !important; min-width: 0 !important; table-layout: auto; }
    .emjl table * { white-space: normal !important; overflow-wrap: anywhere; }
    .emjl table .emjl-cell-date, .emjl table .emjl-cell-date * { white-space: nowrap !important; overflow-wrap: normal; }
    .emjl table th, .emjl table td { white-space: normal !important; min-width: 0 !important; padding: 4px 6px !important; overflow-wrap: anywhere; }
    .emjl .table-responsive { overflow: visible !important; }
    .emjl .emjl-th-act, .emjl .emjl-cell-act { display: none !important; }
    .emjl .emjl-badge { background: none !important; padding: 0; }
}

/* --- Fiche dossier : bandeau ------------------------------------------- */
.emjl-dossier-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 20px; padding: 20px 22px;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.emjl-dossier-num { margin: 0; font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.emjl-dossier-name { margin: 2px 0 8px; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.emjl-dossier-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; color: var(--muted); font-size: 13.5px; }
.emjl-dossier-meta .fa { margin-inline-end: 4px; }
.emjl-dossier-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.emjl-dossier-tiles a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; height: 100%;
    padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--text) !important; text-decoration: none !important; transition: border-color .15s, background .15s; }
.emjl-dossier-tiles a:hover { border-color: var(--blue); background: var(--tint); }
.emjl-dossier-tiles .fa { grid-row: 1 / 3; font-size: 18px; color: var(--blue); width: 22px; text-align: center; }
.emjl-dossier-tiles strong { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.emjl-dossier-tiles span { font-size: 12.5px; color: var(--muted); }
.emjl-dossier-tiles .is-money { grid-column: span 2; }
.emjl-dossier-tiles .is-money strong { font-size: 18px; }
.emjl-dossier-tiles .is-neg { color: #B91C1C; }
.emjl-dossier-timeline h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.emjl-dossier-timeline h3 a { font-size: 13px; font-weight: 600; }
.emjl-dossier-timeline ol { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--rule); }
.emjl-dossier-timeline li { position: relative; display: grid; grid-template-columns: 86px 1fr; gap: 2px 12px; padding: 6px 0; padding-inline-start: 14px; font-size: 13.5px; }
.emjl-dossier-timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.emjl-dossier-timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.emjl-dossier-timeline small { grid-column: 2; color: var(--muted); }
@media (min-width: 1200px) {
    .emjl-dossier-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .emjl-dossier-tiles { align-self: start; }
    .emjl-dossier-id, .emjl-dossier-tiles { grid-column: 1; }
    .emjl-dossier-timeline { grid-column: 2; grid-row: 1 / 3; border-inline-start: 1px solid var(--rule); padding-inline-start: 20px; }
}
@media print { .emjl-dossier-tiles a { border-color: #CBD5E1; } .emjl-dossier-timeline { display: none; } }

/* ===================================================== Recherche rapide (Ctrl+K) */
.emjl-palette { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.emjl-palette[hidden] { display: none; }
.emjl-palette-box { width: 100%; max-width: 620px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(15, 23, 42, .28); overflow: hidden; }
.emjl-palette-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--rule); color: var(--muted); }
.emjl-palette-field input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--text); background: transparent; min-width: 0; }
.emjl-palette-field input::-webkit-search-cancel-button { display: none; }
.emjl-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.emjl-palette li[role="option"] { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.emjl-palette li[role="option"] .fa { grid-row: span 2; color: var(--muted); padding-top: 3px; text-align: center; }
.emjl-palette li .t { color: var(--text); font-weight: 600; }
.emjl-palette li .s { color: var(--muted); font-size: 13px; }
.emjl-palette li .s:empty { display: none; }
.emjl-palette li[aria-selected="true"] { background: var(--tint); }
.emjl-palette li[aria-selected="true"] .fa, .emjl-palette li[aria-selected="true"] .t { color: var(--blue); }
.emjl-palette-empty { padding: 18px 10px; color: var(--muted); text-align: center; }
.emjl-palette-foot { margin: 0; padding: 8px 16px; border-top: 1px solid var(--rule-soft); color: var(--muted); font-size: 12px; background: var(--paper); }
.emjl kbd, .emjl-palette kbd, .emjl-help kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; background: var(--paper); color: var(--muted); font: 600 11px/1.6 var(--font); box-shadow: none; direction: ltr; }
.emjl-palette-btn { float: inline-start; display: inline-flex; align-items: center; gap: 8px; margin: 13px 8px; height: 34px; padding: 0 10px; min-width: 220px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.emjl-palette-btn span { flex: 1; text-align: start; }
.emjl-palette-btn:hover { border-color: var(--blue); color: var(--text); }
.emjl-palette-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 991px) { .emjl-palette-btn { min-width: 0; } .emjl-palette-btn span, .emjl-palette-btn kbd { display: none; } }

/* Aide raccourcis */
.emjl-help h2 { font-size: 18px; margin: 0 0 14px; }
.emjl-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 16px; align-items: center; }
.emjl-help dt { font-weight: 400; text-align: end; }
.emjl-help dd { margin: 0; color: var(--text); }

/* ===================================================== Notifications toast */
.emjl-toasts { position: fixed; z-index: 1900; inset-block-end: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.emjl-toasts .emjl-toast { pointer-events: auto; margin: 0 !important; border-radius: var(--radius) !important; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); animation: emjl-toast-in .22s ease-out; }
.emjl-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes emjl-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===================================================== Brouillon */
.emjl-draft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid #FCD34D; border-inline-start: 4px solid var(--amber); border-radius: var(--radius); background: #FFFBEB; color: #78350F; }
.emjl-draft-bar > span { flex: 1; min-width: 200px; }

/* ===================================================== Sélecteur de date */
.emjl-date-wrap { position: relative; display: flex; align-items: stretch; }
.emjl-date-wrap .emjl-date { flex: 1; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; text-align: start; }
.emjl-date-btn { border: 1px solid var(--rule); border-inline-start: 0; background: var(--paper); color: var(--muted); padding: 0 11px; border-start-end-radius: 8px; border-end-end-radius: 8px; cursor: pointer; }
.emjl-date-btn:hover { color: var(--blue); }
.emjl-dp { position: absolute; z-index: 2100; width: 272px; padding: 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(15, 23, 42, .2); font-variant-numeric: tabular-nums; }
.emjl-dp[hidden] { display: none; }
.emjl-dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.emjl-dp-head strong { font-weight: 600; }
.emjl-dp button { border: 0; background: transparent; font: inherit; color: var(--text); cursor: pointer; border-radius: 6px; }
.emjl-dp-head button { width: 32px; height: 32px; font-size: 18px; }
.emjl-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.emjl-dp-dow { font-size: 11px; color: var(--muted); padding: 4px 0; }
.emjl-dp-day { height: 34px; }
.emjl-dp button:hover { background: var(--tint); }
.emjl-dp-day.is-today { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.emjl-dp-day.is-sel { background: var(--blue) !important; color: #fff; }
.emjl-dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule-soft); }
.emjl-dp-foot button { padding: 4px 10px; color: var(--blue); font-weight: 600; }

/* ===================================================== Graphiques tableau de bord */
.emjl-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 0 0 20px; }
.emjl-chart { margin: 0; padding: 16px 18px 10px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.emjl-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.emjl-chart figcaption strong { color: var(--text); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.emjl-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.emjl-chart text { fill: var(--muted); font: 11px var(--font); }
.emjl-chart-grid { stroke: var(--rule-soft); stroke-width: 1; }
.emjl-chart rect.emjl-bar { fill: var(--blue); }
.emjl-chart rect.emjl-bar.is-out { fill: #94A3B8; }
.emjl-chart rect:hover { opacity: .8; }
.emjl-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.emjl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--blue); }
.emjl-legend i.is-out { background: #94A3B8; margin-inline-start: 8px; }
.emjl-legend b, .emjl-chart figcaption strong { color: var(--text); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ===================================================== Cloche */
.emjl-bell { position: relative; }
.emjl-bell-btn { position: relative; height: 60px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.emjl-bell-btn:hover, .emjl-bell-btn[aria-expanded="true"] { color: var(--blue); }
.emjl-bell-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -6px; border-radius: 8px; }
.emjl-bell-count { position: absolute; top: 12px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--seal); color: #fff; font: 600 11px/18px var(--font); text-align: center; }
.emjl-bell-menu { position: absolute; top: 100%; inset-inline-end: 0; z-index: 1100; width: 280px; padding: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(15, 23, 42, .16); }
.emjl-bell-menu[hidden] { display: none; }
.emjl-bell-menu ul { list-style: none; margin: 0; padding: 0; }
.emjl-bell-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; color: var(--muted) !important; text-decoration: none !important; }
.emjl-bell-menu a span { flex: 1; }
.emjl-bell-menu a b { min-width: 24px; padding: 1px 7px; border-radius: 10px; background: var(--paper); text-align: center; font-variant-numeric: tabular-nums; }
.emjl-bell-menu a.has-count { color: var(--text) !important; }
.emjl-bell-menu a.has-count b { background: var(--tint); color: var(--blue); }
.emjl-bell-menu a:hover, .emjl-bell-menu a:focus { background: var(--tint); }
.emjl-bell-menu p { margin: 4px 10px 8px; color: var(--muted); font-size: 13px; }

@media print { .emjl-palette-btn, .emjl-bell, .emjl-toasts, .emjl-draft-bar, .emjl-date-btn, .emjl-dp { display: none !important; } }

/* Espace client : derniers documents */
.emjl-doclist { list-style: none; margin: 0; padding: 0; }
.emjl-doclist li + li { border-top: 1px solid var(--rule-soft); }
.emjl-doclist a { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; color: var(--text) !important; }
.emjl-doclist a:hover span { color: var(--blue); text-decoration: underline; }
.emjl-doclist .fa { color: var(--muted); text-align: center; }
.emjl-doclist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emjl-doclist time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ===================================================== Accents par type d'information
   Bleu = actions et liens ; les chiffres et repères reçoivent chacun leur couleur (--c1 à --c5). */
.emjl-stat { border-top: 3px solid var(--acc, var(--c1)); }
.emjl-stats > :nth-child(4n+1) { --acc: var(--c1); }
.emjl-stats > :nth-child(4n+2) { --acc: var(--c2); }
.emjl-stats > :nth-child(4n+3) { --acc: var(--c4); }
.emjl-stats > :nth-child(4n+4) { --acc: var(--c3); }
.emjl-stat .emjl-stat-value { color: var(--acc); }
.emjl-stat.is-alert { --acc: var(--seal); }
.emjl-dossier-tiles li:nth-child(5n+1) .fa { color: var(--c1); }
.emjl-dossier-tiles li:nth-child(5n+2) .fa { color: var(--c4); }
.emjl-dossier-tiles li:nth-child(5n+3) .fa { color: var(--c3); }
.emjl-dossier-tiles li:nth-child(5n+4) .fa { color: var(--c2); }
.emjl-dossier-tiles li:nth-child(5n+5) .fa { color: var(--c5); }
.emjl-dossier-tiles .is-money .fa { color: var(--c2); }
.emjl-chart rect.emjl-bar, .emjl-legend i { fill: var(--c2); background: var(--c2); }
.emjl-chart rect.emjl-bar.is-out, .emjl-legend i.is-out { fill: var(--c3); background: var(--c3); }
.emjl-chart.is-dossiers rect.emjl-bar { fill: var(--c4); }
.emjl-bell-menu a .fa-tasks { color: var(--c3); }
.emjl-bell-menu a .fa-envelope-o { color: var(--c1); }
.emjl-bell-menu a .fa-calendar { color: var(--c4); }
.emjl-palette li[role="option"] .fa-folder-o, .emjl-palette li[role="option"] .fa-folder-open-o { color: var(--c1); }
.emjl-palette li[role="option"] .fa-user-o, .emjl-palette li[role="option"] .fa-user { color: var(--c2); }

/* Bouton d'apparence (à côté de la cloche) */
.emjl-theme-btn { height: 60px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.emjl-theme-btn:hover { color: var(--c3); }
.emjl-theme-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -6px; border-radius: 8px; }
.emjl-login .emjl-theme-btn { display: none; }

/* ===================================================== Administration > Base de données */
.emjl-db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.emjl-db-grid > .box { margin-bottom: 16px; }
.emjl-db-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 16px; }
.emjl-db-facts dt { color: var(--muted); font-weight: 400; }
.emjl-db-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.emjl-db-uptodate { color: var(--c2); font-weight: 600; margin: 0; }
.emjl-db-confirm { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 4px 0 14px; cursor: pointer; }
.emjl-db-confirm input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.emjl-db-log pre { margin: 0; max-height: 420px; overflow: auto; background: var(--head); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; text-align: left; }
.emjl-db-log.is-ok { border-top: 3px solid var(--c2); }
.emjl-db-log.is-ko { border-top: 3px solid var(--seal); }
.emjl-db-table code { background: none; color: var(--text-2); padding: 0; font-size: 12.5px; }
.emjl-db-table td .emjl-muted { margin-inline-start: 8px; font-size: 12.5px; }

/* ===================================================== Fiche dossier : onglets */
.emjl-dossier-tabs { border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: visible; }
.emjl-dossier-tabs > .nav-tabs { display: flex; flex-wrap: wrap; align-items: stretch; }
.emjl-dossier-tabs > .nav-tabs > li { float: none; }
.emjl-dossier-tabs .emjl-tab-print { margin-inline-start: auto; }
.emjl-tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 10px; background: var(--hover); color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.emjl-dossier-tabs .nav-tabs > li.active .emjl-tab-count { background: var(--tint); color: var(--blue); }
.emjl-dossier-tabs > .tab-content { padding: 16px 18px; }
.emjl-tab-empty { margin: 8px 0; padding: 28px 16px; border: 1px dashed var(--rule); border-radius: var(--radius); color: var(--muted); text-align: center; }
.emjl-tab-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; }
.emjl-tab-filter label { margin: 0; font-weight: 600; }
.emjl-tab-filter select { width: auto; min-width: 220px; }
.emjl-tab-filter .btn-default { margin-inline-start: auto; }
.emjl-row-actions { white-space: nowrap; text-align: end; }
.emjl-doc-link { display: inline-flex; align-items: center; gap: 8px; }
.emjl-doc-link .fa { color: var(--muted); width: 16px; text-align: center; }
.emjl-history-form { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; margin: 0 0 16px; }
.emjl-history-form textarea { grid-column: 1; resize: vertical; }
.emjl-history-form .btn { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.emjl-meubles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.emjl-meubles-group { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.emjl-meubles-group.is-wide { grid-column: 1 / -1; }
.emjl-meubles-group h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.emjl-meubles-group ul { margin: 0; padding-inline-start: 18px; }
.emjl-meubles-group li + li { margin-top: 4px; }
.emjl-news { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--rule); }
.emjl-news li { position: relative; padding: 0 0 18px; padding-inline-start: 18px; }
.emjl-news li::before { content: ""; position: absolute; top: 6px; inset-inline-start: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--c4); box-shadow: 0 0 0 3px var(--surface); }
.emjl-news time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.emjl-news h3 { margin: 2px 0 6px; font-size: 15px; font-weight: 600; }
.emjl-news-body { color: var(--text-2); }
@media (max-width: 767px) {
    .emjl-history-form { grid-template-columns: 1fr; }
    .emjl-history-form .btn { grid-column: 1; grid-row: auto; }
}
@media print { .emjl-dossier-tabs > .nav-tabs, .emjl-tab-filter, .emjl-history-form, .emjl-row-actions, .emjl-dossier-tabs .pagination { display: none !important; } }

/* ===================================================== Administration > Traductions */
.emjl-meter { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.emjl-meter span { display: block; height: 100%; background: var(--acc, var(--c2)); border-radius: 3px; }
.emjl-badge.is-info { background: var(--tint); color: var(--blue); }
.emjl-tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.emjl-tr-settings .help-block { margin-top: 4px; }
.emjl-tr-action + .emjl-tr-action { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule-soft); }
.emjl-tr-action label { display: block; font-weight: 600; }
.emjl-tr-test { display: flex; gap: 8px; }
.emjl-tr-test .form-control { flex: 1; }
.emjl-tr-result { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--head); }
.emjl-tr-result.is-ok { border-inline-start: 3px solid var(--c2); }
.emjl-tr-result.is-ko { border-inline-start: 3px solid var(--seal); color: var(--seal); }
.emjl-tr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.emjl-tr-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-end: auto; }
.emjl-tr-filters a { padding: 5px 10px; border-radius: 16px; border: 1px solid var(--rule); color: var(--text-2) !important; font-size: 13px; text-decoration: none !important; }
.emjl-tr-filters a span { color: var(--muted); font-variant-numeric: tabular-nums; margin-inline-start: 2px; }
.emjl-tr-filters a[aria-current] { background: var(--tint); border-color: var(--blue); color: var(--blue) !important; }
.emjl-tr-toolbar .emjl-tr-q { width: 260px; }
.emjl-tr-list { list-style: none; margin: 0; padding: 0; }
.emjl-tr-list > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule-soft); }
.emjl-tr-source { padding: 8px 12px; border-radius: var(--radius); background: var(--head); line-height: 1.7; font-family: var(--font-ar, inherit); white-space: pre-wrap; }
.emjl-tr-edit textarea { resize: vertical; }
.emjl-tr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.emjl-tr-buttons { margin-inline-start: auto; display: inline-flex; gap: 4px; }
@media (max-width: 991px) { .emjl-tr-list > li, .emjl-tr-row { grid-template-columns: 1fr; } .emjl-tr-toolbar .emjl-tr-q { flex: 1 1 200px; width: auto; } }

/* ===================================================== Mode sombre
   Activé par la classe emjl-dark sur <html> : choix de l'utilisateur (bouton de l'en-tête, cookie emjl_theme)
   ou, en mode « auto », réglage du système. Jamais à l'impression. */
@media screen {

    html.emjl-dark {
        color-scheme: dark;
        --ink: #ECEEF2; --ink-2: #26292F; --ink-text: #D4D8DF; --side: #0F1013;
        --blue: #5B9BFF; --blue-hover: #8AB8FF; --brass: #5B9BFF;
        --tint: rgba(91, 155, 255, .14);
        --paper: #131417; --surface: #1C1E23; --head: #23262C; --hover: #2A2D34;
        --rule: #33373F; --rule-soft: #2A2D34;
        --text: #ECEEF2; --text-2: #B4BAC5; --muted: #9AA1AD;
        --seal: #FF7A7A; --ledger: #4ADE80; --amber: #FBBF24;
        --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .3);
        --c1: #5B9BFF; --c2: #34D399; --c3: #FBBF24; --c4: #C084FC; --c5: #FB7185;
    }
    html.emjl-dark .emjl,
    html.emjl-dark .emjl .wrapper,
    html.emjl-dark .emjl .content-wrapper,
    html.emjl-dark .emjl .right-side { background: var(--paper) !important; color: var(--text); }
    html.emjl-dark .emjl h1,
    html.emjl-dark .emjl h2,
    html.emjl-dark .emjl h3,
    html.emjl-dark .emjl h4,
    html.emjl-dark .emjl h5,
    html.emjl-dark .emjl h6,
    html.emjl-dark .emjl .box-title,
    html.emjl-dark .emjl label,
    html.emjl-dark .emjl .control-label,
    html.emjl-dark .emjl legend { color: var(--text); }
    html.emjl-dark .emjl a { color: var(--blue); }
    html.emjl-dark .emjl a:hover, html.emjl-dark .emjl a:focus { color: var(--blue-hover); }
    html.emjl-dark .emjl .text-muted, html.emjl-dark .emjl small, html.emjl-dark .emjl .help-block { color: var(--muted) !important; }
    html.emjl-dark .emjl legend, html.emjl-dark .emjl hr { border-color: var(--rule); }

    html.emjl-dark .emjl .main-header .navbar,
    html.emjl-dark .emjl .main-header .logo,
    html.emjl-dark .emjl .main-footer { background: var(--surface) !important; border-color: var(--rule) !important; }
    html.emjl-dark .emjl .main-header .logo { background: var(--side) !important; }
    html.emjl-dark .emjl .content-header > .breadcrumb { background: transparent; }

    html.emjl-dark .emjl .box,
    html.emjl-dark .emjl .box-header,
    html.emjl-dark .emjl .box-body,
    html.emjl-dark .emjl .box-footer,
    html.emjl-dark .emjl .nav-tabs-custom,
    html.emjl-dark .emjl .nav-tabs-custom > .tab-content,
    html.emjl-dark .emjl .panel,
    html.emjl-dark .emjl .panel-body,
    html.emjl-dark .emjl .well,
    html.emjl-dark .emjl .list-group-item,
    html.emjl-dark .emjl .modal-content,
    html.emjl-dark .emjl .popover,
    html.emjl-dark .emjl .callout,
    html.emjl-dark .emjl .info-box,
    html.emjl-dark .emjl .small-box,
    html.emjl-dark .emjl .direct-chat-messages,
    html.emjl-dark .emjl .mailbox-messages,
    html.emjl-dark .emjl .thumbnail {
        background-color: var(--surface) !important; border-color: var(--rule) !important; color: var(--text);
    }
    html.emjl-dark .emjl .panel-heading,
    html.emjl-dark .emjl .panel-footer,
    html.emjl-dark .emjl .modal-header,
    html.emjl-dark .emjl .modal-footer,
    html.emjl-dark .emjl .box-header.with-border,
    html.emjl-dark .emjl .box-footer { border-color: var(--rule) !important; }
    html.emjl-dark .emjl .panel-default > .panel-heading { background: var(--head) !important; color: var(--text); }
    html.emjl-dark .emjl .nav-tabs-custom > .nav-tabs { border-color: var(--rule); }
    html.emjl-dark .emjl .nav-tabs-custom > .nav-tabs > li > a { color: var(--muted); }
    html.emjl-dark .emjl .nav-tabs-custom > .nav-tabs > li.active > a,
    html.emjl-dark .emjl .nav-tabs-custom > .nav-tabs > li.active:hover > a { background: var(--surface); color: var(--text); }
    html.emjl-dark .emjl .nav-tabs > li > a:hover,
    html.emjl-dark .emjl .nav > li > a:hover,
    html.emjl-dark .emjl .nav > li > a:focus { background: var(--hover); }

    html.emjl-dark .emjl .table, html.emjl-dark .emjl table { background: transparent; color: var(--text); }
    html.emjl-dark .emjl .table > thead > tr > th,
    html.emjl-dark .emjl .table > tbody > tr > td,
    html.emjl-dark .emjl .table > tbody > tr > th,
    html.emjl-dark .emjl .table > tfoot > tr > td,
    html.emjl-dark .emjl .table-bordered,
    html.emjl-dark .emjl .table-bordered > thead > tr > th,
    html.emjl-dark .emjl .table-bordered > tbody > tr > td,
    html.emjl-dark .emjl td,
    html.emjl-dark .emjl th { border-color: var(--rule) !important; }
    html.emjl-dark .emjl .table > thead > tr > th { background: var(--head); color: var(--text-2); }
    html.emjl-dark .emjl .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255, 255, 255, .025); }
    html.emjl-dark .emjl .table > tbody > tr.active > td, html.emjl-dark .emjl .table > tbody > tr > td.active { background: var(--hover); }
    html.emjl-dark .emjl [style*="background-color: white"], html.emjl-dark .emjl [style*="background: #EEEEEE"] { background: var(--surface) !important; }

    html.emjl-dark .emjl .form-control,
    html.emjl-dark .emjl select,
    html.emjl-dark .emjl textarea,
    html.emjl-dark .emjl input[type="text"],
    html.emjl-dark .emjl input[type="email"],
    html.emjl-dark .emjl input[type="number"],
    html.emjl-dark .emjl input[type="password"],
    html.emjl-dark .emjl input[type="search"],
    html.emjl-dark .emjl input[type="tel"],
    html.emjl-dark .emjl input[type="date"],
    html.emjl-dark .emjl .input-group-addon,
    html.emjl-dark .emjl .select2-container .select2-selection,
    html.emjl-dark .emjl .select2-dropdown {
        background-color: var(--head) !important; color: var(--text) !important; border-color: var(--rule) !important;
    }
    html.emjl-dark .emjl .form-control::placeholder,
    html.emjl-dark .emjl input::placeholder,
    html.emjl-dark .emjl textarea::placeholder { color: #64748B; }
    html.emjl-dark .emjl .form-control:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, .25); }
    html.emjl-dark .emjl .form-control[readonly], html.emjl-dark .emjl .form-control[disabled] { background: var(--paper) !important; color: var(--muted) !important; }

    html.emjl-dark .emjl .btn-default { background: var(--surface) !important; border-color: var(--rule) !important; color: var(--text) !important; }
    html.emjl-dark .emjl .btn-default:hover { background: var(--hover) !important; }
    html.emjl-dark .emjl .dropdown-menu { background: var(--surface); border-color: var(--rule); }
    html.emjl-dark .emjl .dropdown-menu > li > a { color: var(--text); }
    html.emjl-dark .emjl .dropdown-menu > li > a:hover { background: var(--hover); color: var(--text); }
    html.emjl-dark .emjl .dropdown-menu .divider { background: var(--rule); }
    html.emjl-dark .emjl .pagination > li > a, html.emjl-dark .emjl .pagination > li > span { background: var(--surface); border-color: var(--rule); color: var(--text); }
    html.emjl-dark .emjl .pagination > .active > a, html.emjl-dark .emjl .pagination > .active > span { background: var(--blue); border-color: var(--blue); color: #fff; }
    html.emjl-dark .emjl .close { color: var(--text); text-shadow: none; }
    html.emjl-dark .emjl .nav-pills > li > a, html.emjl-dark .emjl .nav-stacked > li > a { color: var(--text-2); }
    html.emjl-dark .emjl .nav-pills > li.active > a { color: #fff; }

    html.emjl-dark .emjl .alert-success { background: rgba(74, 222, 128, .1) !important; color: #BBF7D0 !important; border-color: rgba(74, 222, 128, .3); }
    html.emjl-dark .emjl .alert-danger, html.emjl-dark .emjl .alert-error { background: rgba(248, 113, 113, .1) !important; color: #FECACA !important; border-color: rgba(248, 113, 113, .3); }
    html.emjl-dark .emjl .alert-warning { background: rgba(251, 191, 36, .1) !important; color: #FDE68A !important; border-color: rgba(251, 191, 36, .3); }
    html.emjl-dark .emjl .alert-info { background: rgba(59, 130, 246, .12) !important; color: #BFDBFE !important; border-color: rgba(59, 130, 246, .3); }
    html.emjl-dark .emjl-toasts .emjl-toast { box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

    html.emjl-dark .emjl-badge.is-ok { background: rgba(74, 222, 128, .14); color: #86EFAC; }
    html.emjl-dark .emjl-badge.is-off { background: rgba(248, 113, 113, .14); color: #FCA5A5; }
    html.emjl-dark .emjl-badge.is-wait { background: rgba(251, 191, 36, .14); color: #FCD34D; }
    html.emjl-dark .emjl-draft-bar { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); color: #FDE68A; }
    html.emjl-dark .gl-note.is-ok { background: rgba(74, 222, 128, .08); }
    html.emjl-dark .emjl-chart rect.emjl-bar.is-out { fill: #64748B; }
    html.emjl-dark .emjl-palette, html.emjl-dark .emjl-modal { background: rgba(0, 0, 0, .6); }
    html.emjl-dark .emjl .main-header .emjl-avatar { background: var(--hover); color: var(--text); }
    html.emjl-dark .gl-dpe-scale li.is-current { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

    /* Sombre : surfaces graphite neutres, chaque niveau un ton différent ; accents conservés */
    html.emjl-dark .main-sidebar, html.emjl-dark .left-side { background: var(--side) !important; }
    html.emjl-dark .emjl .main-header .navbar { background: #17181C !important; }
    html.emjl-dark .emjl-stat { background: var(--surface); }
    html.emjl-dark .emjl-chart-grid { stroke: #2E3138; }
    html.emjl-dark .emjl .btn-primary { background: #3B82F6; border-color: #3B82F6; }
    html.emjl-dark .emjl .table > thead > tr > th { background: #202228; color: var(--text-2); }
    html.emjl-dark .emjl-dossier-head { background: linear-gradient(135deg, #1E2026 0%, #1A1C21 60%, #1E1A24 100%); }
    html.emjl-dark .emjl-theme-btn:hover { color: var(--c3); }
    html.emjl-dark .emjl-agenda-date { background: var(--head); border-top-color: var(--c4); }
    html.emjl-dark .emjl form.emjl-form-search { background: var(--head); }
    html.emjl-dark .emjl .tr_color { background: rgba(251, 191, 36, .1) !important; }
    html.emjl-dark .gl-status.is-actif, html.emjl-dark .gl-pay.is-payee { background: rgba(52, 211, 153, .14); color: #6EE7B7; }
    html.emjl-dark .gl-status.is-preavis, html.emjl-dark .gl-pay.is-partielle { background: rgba(251, 191, 36, .14); color: #FCD34D; }
    html.emjl-dark .gl-pay.is-impayee { background: rgba(251, 113, 133, .14); color: #FDA4AF; }
    html.emjl-dark .gl-note.is-warning { background: rgba(251, 191, 36, .08); }
    html.emjl-dark .gl-note.is-danger { background: rgba(251, 113, 133, .08); }
    html.emjl-dark .emjl .emjl-icon-btn.is-danger:hover { background: rgba(251, 113, 133, .14); }
    html.emjl-dark .emjl .emjl-icon-btn.is-ok:hover { background: rgba(52, 211, 153, .14); }
    html.emjl-dark .emjl .emjl-file.has-file { background: rgba(52, 211, 153, .1); color: #6EE7B7; }
    html.emjl-dark .emjl-modal-icon { background: rgba(251, 113, 133, .16); color: #FDA4AF; }
    html.emjl-dark .emjl .alert-info { border-inline-start-color: var(--c1); }
}

/* --- Fiche dossier : onglets chiffrés --------------------------------------------- */
/* Chaque rubrique est une carte : icône, nombre en grand, nom. 9 cartes = une rangée large,
   ou une grille régulière quand la place manque (jamais de rangée coupée au hasard). */
.emjl-dtabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.emjl-dtab { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center;
    padding: 12px 12px 11px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--text) !important; text-decoration: none !important;
    box-shadow: var(--shadow); transition: border-color .15s, background-color .15s; min-width: 0; }
.emjl-dtab:hover { border-color: var(--blue); }
.emjl-dtab .fa { grid-row: 1; font-size: 17px; width: 20px; text-align: center; color: var(--blue); }
.emjl-dtab strong { grid-row: 1; font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.emjl-dtab span { grid-column: 1 / -1; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); line-height: 1.3; overflow-wrap: anywhere; }
.emjl-dtab.is-zero strong { color: var(--muted); font-weight: 600; }
.emjl-dtab.is-zero .fa { color: var(--muted); }
.emjl-dtab.is-current { border-color: var(--blue); background: var(--tint); box-shadow: inset 0 -3px 0 var(--blue), var(--shadow); }
.emjl-dtab.is-current strong, .emjl-dtab.is-current span { color: var(--blue); }
.emjl-dtab:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
@media (max-width: 1500px) { .emjl-dtabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 900px) { .emjl-dtabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
    .emjl-dtabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
    .emjl-dtab { flex: 0 0 132px; scroll-snap-align: start; }
}

.emjl-dtab-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.emjl-dtab-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.emjl-dtab-title .fa { color: var(--blue); }
.emjl-dtab-title .emjl-tab-count { background: var(--tint); color: var(--blue); font-size: 12.5px; line-height: 20px; }
.emjl-dtab-tools { display: flex; align-items: center; gap: 8px; }

/* Chiffres financiers du bandeau */
.emjl-dossier-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; align-self: start; align-items: start; }
.emjl-dossier-money > div { padding: 11px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.emjl-dossier-money dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.emjl-dossier-money dt a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.emjl-dossier-money dd { margin: 3px 0 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.emjl-dossier-money .is-in { color: #15803D; }
.emjl-dossier-money .is-out { color: #B91C1C; }
.emjl-dossier-money .is-total { border-color: var(--ink); }
.emjl-dossier-money .is-neg { color: #B91C1C; }
@media (max-width: 640px) { .emjl-dossier-money { gap: 6px; } .emjl-dossier-money > div { padding: 9px 10px; } .emjl-dossier-money dd { font-size: 15px; } }
@media print {
    /* papier : 3 colonnes, chiffre et nom sur une ligne */
    .emjl-dtabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; margin-bottom: 10px; }
    .emjl-dtab { grid-template-columns: 18px auto 1fr; box-shadow: none !important; padding: 4px 8px; border-color: #ccc; background: none !important; }
    .emjl-dtab strong { font-size: 12pt; color: #000 !important; }
    .emjl-dtab span { grid-column: auto; grid-row: 1; margin: 0 0 0 6px; color: #000 !important; font-size: 9.5pt; }
    .emjl-dtab.is-current { border-color: #000; }
    .emjl-dtab-tools { display: none !important; }
}
.emjl .emjl-dup-title { display: none !important; }
.emjl .box-header:has(> .emjl-dup-title):not(:has(.box-tools, .btn, a, button, form)) { display: none; }
.emjl .emjl-empty-box .emjl-tab-empty .fa { margin-inline-end: 6px; opacity: .7; }

/* --- Messagerie -------------------------------------------------------------------- */
.emjl .emjl-inbox { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.emjl .emjl-inbox-nav { display: grid; gap: 4px; position: sticky; top: 76px; }
.emjl .emjl-inbox-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text) !important; font-weight: 600; text-decoration: none !important; }
.emjl .emjl-inbox-nav a .fa { width: 18px; text-align: center; color: var(--muted); }
.emjl .emjl-inbox-nav a:hover { background: var(--hover); }
.emjl .emjl-inbox-nav a.is-current { background: var(--tint); color: var(--blue) !important; }
.emjl .emjl-inbox-nav a.is-current .fa { color: var(--blue); }
.emjl .emjl-inbox-badge { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.emjl .emjl-inbox-list { padding: 0; overflow: hidden; }
.emjl .emjl-inbox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.emjl .emjl-inbox-search { position: relative; flex: 1 1 260px; max-width: 420px; margin: 0; font-weight: 400; }
.emjl .emjl-inbox-search .fa { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.emjl .emjl-inbox-search input { width: 100%; height: 38px; padding-inline: 34px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.emjl .emjl-inbox-items { list-style: none; margin: 0; padding: 0; }
.emjl .emjl-inbox-items > li + li { border-top: 1px solid var(--rule-soft, var(--rule)); }
.emjl .emjl-inbox-items a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text) !important; text-decoration: none !important; }
.emjl .emjl-inbox-items a:hover { background: var(--hover); }
.emjl .emjl-inbox-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--blue); font-weight: 700; font-size: 14px; flex: none; }
.emjl .emjl-inbox-main { display: grid; min-width: 0; }
.emjl .emjl-inbox-from { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emjl .emjl-inbox-subject { color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emjl .emjl-inbox-subject strong { font-weight: 600; color: var(--text); }
.emjl .emjl-inbox-date { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.emjl .emjl-inbox-items .is-unread a { background: color-mix(in srgb, var(--tint) 55%, transparent); }
.emjl .emjl-inbox-items .is-unread .emjl-inbox-from, .emjl .emjl-inbox-items .is-unread .emjl-inbox-subject strong { font-weight: 800; color: var(--ink); }
.emjl .emjl-inbox-items .is-unread .emjl-inbox-date { color: var(--blue); font-weight: 700; }
.emjl .emjl-inbox-items .is-unread .emjl-inbox-avatar { background: var(--blue); color: #fff; }
.emjl .emjl-inbox-empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.emjl .emjl-inbox-empty .fa { font-size: 36px; color: #16A34A; margin-bottom: 8px; }
.emjl .emjl-inbox-read { padding: 0; }
.emjl .emjl-inbox-read-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.emjl .emjl-inbox-read-head > div { display: grid; }
.emjl .emjl-inbox-read-head time { color: var(--muted); font-size: 13px; }
.emjl .emjl-inbox-read-body { padding: 20px; font-size: 15px; line-height: 1.75; min-height: 160px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .emjl .emjl-inbox { grid-template-columns: 1fr; }
    .emjl .emjl-inbox-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
}

/* --- Liste de documents (espace abonné) ------------------------------------------- */
.emjl .emjl-docrows { list-style: none; margin: 0; padding: 0; }
.emjl .emjl-docrows > li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 18px; }
.emjl .emjl-docrows > li + li { border-top: 1px solid var(--rule); }
.emjl .emjl-docrows > li:hover { background: var(--hover); }
.emjl .emjl-docrows-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(100, 116, 139, .12); color: #475569; font-size: 19px; }
.emjl .emjl-docrows-icon.is-pdf { background: rgba(220, 38, 38, .1); color: #DC2626; }
.emjl .emjl-docrows-icon.is-word { background: rgba(37, 99, 235, .1); color: #2563EB; }
.emjl .emjl-docrows-icon.is-excel { background: rgba(22, 163, 74, .11); color: #15803D; }
.emjl .emjl-docrows-icon.is-image { background: rgba(147, 51, 234, .1); color: #7E22CE; }
.emjl .emjl-docrows-main { display: grid; min-width: 0; }
.emjl .emjl-docrows-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emjl .emjl-docrows-main small { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 600px) { .emjl .emjl-docrows > li { grid-template-columns: 36px minmax(0, 1fr); } .emjl .emjl-docrows > li > .btn { grid-column: 2; justify-self: start; } }

/* Menu latéral : titres de sections ; un titre sans entrée (modules désactivés, droits) disparaît */
.emjl .sidebar-menu > li.emjl-nav-section { margin-top: 12px; padding-top: 10px !important; padding-bottom: 4px !important; border-top: 1px solid rgba(255, 255, 255, .06); }
.emjl .sidebar-menu > li.emjl-nav-section:has(+ li.header), .emjl .sidebar-menu > li.emjl-nav-section:last-child { display: none; }
.emjl.sidebar-collapse .sidebar-menu > li.emjl-nav-section { display: none; }
.emjl .emjl-timeline-more { margin-top: 8px; }
.emjl .emjl-timeline-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; font-weight: 600; color: var(--blue); list-style: none; }
.emjl .emjl-timeline-more > summary::-webkit-details-marker { display: none; }
.emjl .emjl-timeline-more > summary::before { content: "\f107"; font-family: FontAwesome; }
.emjl .emjl-timeline-more[open] > summary::before { content: "\f106"; }
.emjl .emjl-timeline-more[open] > summary { margin-bottom: 10px; }
@media print { .emjl .emjl-timeline-more > summary { display: none; } .emjl .emjl-timeline-more > ol { display: block !important; } }
.emjl-quick a { min-width: 0; overflow-wrap: break-word; }

/* ---------- pagination sans rechargement ---------- */
.emjl [aria-busy="true"].emjl-loading { position: relative; }
.emjl .emjl-loading > * { opacity: .45; transition: opacity .15s; pointer-events: none; }
.emjl .emjl-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid var(--rule); border-top-color: var(--blue); border-radius: 50%; animation: emjl-spin .7s linear infinite; }
@keyframes emjl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .emjl .emjl-loading::after { animation-duration: 2s; } }
.emjl a.is-busy { opacity: .5; pointer-events: none; }
.emjl .box-header .emjl-count-pill { margin-inline-start: 8px; display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--rule-soft); color: var(--muted, #5b6472); font-size: 12px; font-weight: 600; text-align: center; vertical-align: middle; }
.emjl .box-footer .pagination { margin: 0; }
.emjl-reminders u { text-decoration: none; font-weight: 600; }
/* pages côté navigateur pour les longues listes */
@media screen { .emjl tr.emjl-page-off { display: none !important; } }
.emjl .emjl-cpager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin: 12px 0 4px; }
.emjl .emjl-cpager .pagination { margin: 0; }
.emjl .emjl-cpager .pagination > li > button { position: relative; float: left; padding: 6px 12px; margin-left: -1px; line-height: 1.42857; color: var(--blue); background: #fff; border: 1px solid var(--rule); font: inherit; cursor: pointer; }
[dir="rtl"] .emjl .emjl-cpager .pagination > li > button { float: right; margin-left: 0; margin-right: -1px; }
.emjl .emjl-cpager .pagination > li:first-child > button { border-start-start-radius: 4px; border-end-start-radius: 4px; }
.emjl .emjl-cpager .pagination > li:last-child > button { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.emjl .emjl-cpager .pagination > .active > button { background: var(--blue); border-color: var(--blue); color: #fff; cursor: default; }
.emjl .emjl-cpager .pagination > .disabled > button { color: #9aa3ae; cursor: not-allowed; }
.emjl .emjl-cpager .pagination > li > button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; z-index: 3; }
.emjl .emjl-cpager-range { font-size: 13px; color: var(--muted, #5b6472); }
html.emjl-dark .emjl .emjl-cpager .pagination > li > button { background: var(--surface); border-color: var(--rule); color: var(--text); }
html.emjl-dark .emjl .emjl-cpager .pagination > .active > button { background: var(--blue); border-color: var(--blue); color: #fff; }
@media print { .emjl-cpager, .emjl .box-footer .pagination { display: none !important; } }

/* mobile : menu de l'en-tête sur une seule ligne, en arabe aussi */
@media (max-width: 767px) {
    .emjl .main-header .navbar-custom-menu, .emjl .main-header .navbar-custom-menu > .navbar-nav { margin: 0 !important; padding: 0 !important; }
}

/* ---------- reçu (écran et impression) ---------- */
.emjl .emjl-receipt-tools { display: flex; gap: 10px; margin: 0 0 16px; }
.emjl .emjl-receipt {
    max-width: 820px; margin: 0 auto 22px; padding: 22px 26px; background: #fff; color: #0F172A;
    border: 1px solid var(--rule, #E3E8F0); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    font-size: 14.5px; line-height: 1.6;
}
.emjl .emjl-receipt + .emjl-receipt { border-top-style: dashed; }
.emjl-receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid #0F172A; }
.emjl-receipt-office { margin: 0; font-size: 16px; font-weight: 700; }
.emjl-receipt-copy { margin: 2px 0 0; font-size: 12.5px; color: #64748B; }
.emjl-receipt-no { display: flex; flex-direction: column; align-items: flex-end; text-align: end; font-size: 12.5px; color: #475569; }
.emjl-receipt-no strong { font-size: 22px; line-height: 1.2; color: #0F172A; font-variant-numeric: tabular-nums; }
[dir="rtl"] .emjl-receipt-no { align-items: flex-start; }
.emjl-receipt-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0 0 14px; }
.emjl-receipt-meta dt { font-size: 11.5px; font-weight: 600; color: #64748B; }
.emjl-receipt-meta dd { margin: 0; font-weight: 600; min-height: 1.4em; border-bottom: 1px dotted #CBD5E1; }
.emjl-receipt-body { margin: 0 0 10px; }
.emjl-receipt-body b { font-weight: 700; }
.emjl-receipt-amount { padding: 0 4px; background: #F1F5F9; border-radius: 4px; }
.emjl-receipt-subject { margin: 0 0 10px; color: #334155; }
.emjl-receipt-subject span { font-weight: 600; color: #64748B; margin-inline-end: 6px; }
.emjl-receipt-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; }
.emjl-receipt-note { margin: 0; font-size: 12px; color: #64748B; max-width: 60%; }
.emjl-receipt-sign { min-width: 180px; padding-top: 44px; border-bottom: 1px solid #94A3B8; text-align: center; font-size: 12.5px; color: #475569; }
html.emjl-dark .emjl .emjl-receipt { background: #fff; color: #0F172A; }
@media (max-width: 600px) { .emjl-receipt-meta { grid-template-columns: 1fr; } .emjl-receipt-head { flex-direction: column; } .emjl-receipt-no { align-items: flex-start; } }

/* ---------- statuts, montants, dates dans les listes ---------- */
.emjl-badge.is-neutral { background: #EEF2F7; color: #334155; }
.emjl-badge.is-done { background: #E2E8F0; color: #475569; }
.emjl-badge.is-done::before { background: #94A3B8; }
html.emjl-dark .emjl-badge.is-ok { background: rgba(34, 197, 94, .16); color: #86EFAC; }
html.emjl-dark .emjl-badge.is-off { background: rgba(239, 68, 68, .16); color: #FCA5A5; }
html.emjl-dark .emjl-badge.is-wait { background: rgba(245, 158, 11, .16); color: #FCD34D; }
html.emjl-dark .emjl-badge.is-neutral, html.emjl-dark .emjl-badge.is-done { background: rgba(148, 163, 184, .16); color: #CBD5E1; }
.emjl table .emjl-num { text-align: end !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.emjl table td.emjl-num.is-in { color: #15803D; font-weight: 600; }
.emjl table td.emjl-num.is-out { color: #B91C1C; font-weight: 600; }
.emjl table td.emjl-num.is-zero { color: var(--muted, #94A3B8); }
html.emjl-dark .emjl table td.emjl-num.is-in { color: #4ADE80; }
html.emjl-dark .emjl table td.emjl-num.is-out { color: #F87171; }
.emjl .emjl-when { display: block; width: max-content; margin-top: 3px; padding: 0 8px; border-radius: 999px; background: #DBEAFE; color: #1E40AF; font-size: 11.5px; font-weight: 600; line-height: 1.7; }
.emjl .emjl-when.is-urgent { background: #FEF3C7; color: #92400E; }
html.emjl-dark .emjl .emjl-when { background: rgba(59, 130, 246, .18); color: #93C5FD; }
@media print { .emjl .emjl-when { display: none !important; } .emjl-badge { background: none !important; border: 1px solid #999; color: #000 !important; } }

/* ---------- listes : affichage, export, sélection, en-tête collant ---------- */
.emjl .emjl-table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.emjl .emjl-table-side { display: flex; gap: 8px; margin-inline-start: auto; }
.emjl .emjl-table-view { position: relative; }
.emjl .emjl-table-view > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.emjl .emjl-table-view > summary::-webkit-details-marker { display: none; }
.emjl .emjl-table-menu {
    position: absolute; z-index: 40; inset-inline-end: 0; top: calc(100% + 6px); min-width: 230px; max-height: 360px; overflow: auto;
    padding: 10px 12px; background: var(--surface, #fff); border: 1px solid var(--rule, #E3E8F0); border-radius: 10px;
    box-shadow: 0 12px 32px -12px rgba(15, 23, 42, .3);
}
.emjl .emjl-table-menu label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 2px; font-weight: 500; font-size: 13.5px; cursor: pointer; }
.emjl .emjl-table-menu input { accent-color: var(--blue, #2563EB); margin: 0; }
.emjl .emjl-table-menu-t { margin: 6px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted, #64748B); }
.emjl .emjl-table-menu-t:first-child { margin-top: 0; }
.emjl .emjl-col-hidden { display: none !important; }
.emjl .is-compact table.emjl-table > tbody > tr > td, .emjl .is-compact table.emjl-table > thead > tr > th { padding-top: 5px !important; padding-bottom: 5px !important; }
.emjl .emjl-row-check { width: 16px; height: 16px; margin: 0 8px 0 0 !important; vertical-align: -3px; accent-color: var(--blue, #2563EB); cursor: pointer; }
[dir="rtl"] .emjl .emjl-row-check { margin: 0 0 0 8px !important; }
.emjl table.emjl-table tr.is-selected > td { background: var(--f-ring, rgba(37, 99, 235, .08)) !important; }
.emjl .emjl-bulk {
    position: sticky; top: 8px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0;
    padding: 8px 12px; border-radius: 10px; background: #0F172A; color: #fff;
}
.emjl .emjl-bulk[hidden] { display: none; }
.emjl .emjl-bulk-n { font-weight: 600; margin-inline-end: 6px; }
.emjl .emjl-bulk .btn-default { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.emjl .emjl-bulk .btn-link { color: #CBD5E1; }
.emjl .emjl-table-scroll { max-height: min(75vh, 860px); overflow: auto !important; }
.emjl .emjl-table-scroll > table.emjl-table > thead > tr > th { position: sticky; top: 0; z-index: 3; background: var(--head, #F8FAFC); box-shadow: inset 0 -1px 0 var(--rule, #E3E8F0); }
html.emjl-dark .emjl .emjl-table-scroll > table.emjl-table > thead > tr > th { background: var(--surface); }
@media print {
    .emjl .emjl-table-scroll { max-height: none !important; overflow: visible !important; }
    .emjl .emjl-table-side, .emjl .emjl-bulk, .emjl .emjl-row-check { display: none !important; }
    .emjl table.emjl-table tr.is-selected > td { background: none !important; }
}

/* --- Fiche dossier : prochaine audience, actions rapides, fil, bandeau compact --- */
.emjl .emjl-dossier-next { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0; padding: 6px 12px; border-radius: 10px; background: #EFF6FF; color: #1E3A8A; font-size: 13.5px; }
.emjl .emjl-dossier-next strong { font-variant-numeric: tabular-nums; }
.emjl .emjl-dossier-next small { color: #3B5BA9; }
.emjl .emjl-dossier-next.is-soon { background: #FEF3C7; color: #78350F; }
.emjl .emjl-dossier-next.is-soon small { color: #92400E; }
html.emjl-dark .emjl .emjl-dossier-next { background: rgba(59, 130, 246, .15); color: #BFDBFE; }
html.emjl-dark .emjl .emjl-dossier-next small { color: #93C5FD; }
.emjl .emjl-dossier-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.emjl .emjl-dossier-quick .btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding-inline: 12px; }
.emjl .emjl-dossier-quick .fa { color: var(--blue, #2563EB); }
.emjl-dossier-timeline li { grid-template-columns: 26px 78px 1fr !important; }
.emjl-dossier-timeline li::before { display: none; }
.emjl-dossier-timeline .emjl-tl-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 24px; height: 24px; margin-inline-start: -27px; border-radius: 50%; background: var(--surface); border: 2px solid var(--rule); color: var(--muted); font-size: 11px; }
.emjl-dossier-timeline small { grid-column: 3 !important; }
.emjl-dossier-timeline time { grid-column: 2; }
.emjl-dossier-timeline li > span:not(.emjl-tl-ico) { grid-column: 3; }
.emjl-dossier-timeline li.is-money .emjl-tl-ico, .emjl-dossier-timeline li.is-receipt .emjl-tl-ico { color: #15803D; border-color: #BBF7D0; }
.emjl-dossier-timeline li.is-case .emjl-tl-ico { color: #7C3AED; border-color: #DDD6FE; }
.emjl-dossier-timeline li.is-news .emjl-tl-ico { color: var(--blue, #2563EB); border-color: #BFDBFE; }
.emjl-dossier-timeline li.is-doc .emjl-tl-ico { color: #B45309; border-color: #FDE68A; }
.emjl-dossier-timeline b.is-in { color: #15803D; }
.emjl-dossier-timeline b.is-out { color: #B91C1C; }
.emjl-dossier-timeline ol { padding-inline-start: 14px !important; margin-inline-start: 12px !important; }
.emjl-dossier-bar {
    position: fixed; z-index: 1030; top: 0; inset-inline: 0; display: flex; align-items: center; gap: 14px;
    padding: 8px 20px; background: rgba(15, 23, 42, .96); color: #fff; font-size: 14px;
    transform: translateY(-100%); transition: transform .18s ease; box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .5);
}
.emjl-dossier-bar.is-on { transform: none; }
@media (min-width: 768px) { .emjl .emjl-dossier-bar { inset-inline-start: 250px; } .emjl.sidebar-collapse .emjl-dossier-bar { inset-inline-start: 50px; } }
.emjl-dossier-bar-num { font-weight: 700; color: #93C5FD; font-variant-numeric: tabular-nums; }
.emjl-dossier-bar-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emjl-dossier-bar-bal { font-variant-numeric: tabular-nums; color: #BBF7D0; white-space: nowrap; }
.emjl-dossier-bar-bal.is-neg { color: #FCA5A5; }
.emjl-dossier-bar-actions { display: flex; gap: 4px; }
.emjl-dossier-bar-actions a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #E2E8F0 !important; }
.emjl-dossier-bar-actions a:hover, .emjl-dossier-bar-actions a:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }
@media (max-width: 600px) { .emjl-dossier-bar-bal { display: none; } }
@media (prefers-reduced-motion: reduce) { .emjl-dossier-bar { transition: none; } }
@media print { .emjl-dossier-bar, .emjl-dossier-quick { display: none !important; } }

/* ---------- tableau de bord : ce mois-ci, à faire aujourd'hui ---------- */
.emjl .emjl-month { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 12px; margin: 0 0 18px; }
.emjl .emjl-month-t { display: flex; flex-direction: column; justify-content: center; margin: 0; padding-inline-end: 6px; font-weight: 700; color: var(--ink); }
.emjl .emjl-month-t small { font-weight: 500; color: var(--muted); }
.emjl .emjl-month-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; gap: 2px 10px; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius, 10px); color: var(--text) !important; text-decoration: none !important; }
.emjl .emjl-month-item:hover { border-color: var(--blue); }
.emjl .emjl-month-label { grid-column: 1 / 3; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.emjl .emjl-month-value { font-size: 21px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.emjl .emjl-month-item.is-in .emjl-month-value { color: #15803D; }
.emjl .emjl-month-item.is-out .emjl-month-value { color: #B91C1C; }
html.emjl-dark .emjl .emjl-month-item.is-in .emjl-month-value { color: #4ADE80; }
html.emjl-dark .emjl .emjl-month-item.is-out .emjl-month-value { color: #F87171; }
.emjl .emjl-delta { font-size: 12px; font-weight: 700; white-space: nowrap; }
.emjl .emjl-delta.is-up { color: #15803D; }
.emjl .emjl-delta.is-down { color: #B91C1C; }
.emjl .emjl-delta.is-new { color: var(--blue); }
.emjl .emjl-month-item.is-out .emjl-delta.is-up { color: #B91C1C; }
.emjl .emjl-month-item.is-out .emjl-delta.is-down { color: #15803D; }
@media (max-width: 900px) { .emjl .emjl-month { grid-template-columns: repeat(3, minmax(0, 1fr)); } .emjl .emjl-month-t { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; } }
@media (max-width: 560px) { .emjl .emjl-month { grid-template-columns: 1fr; } }
.emjl .emjl-today .box-header { display: flex; align-items: center; gap: 8px; }
.emjl .emjl-today-list { list-style: none; margin: 0; padding: 4px 0; }
.emjl .emjl-today-list li + li { border-top: 1px solid var(--rule-soft, #EDF1F7); }
.emjl .emjl-today-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 18px; color: var(--text) !important; text-decoration: none !important; }
.emjl .emjl-today-list a:hover { background: var(--hover); }
.emjl .emjl-today-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #EFF6FF; color: var(--blue); font-size: 15px; }
.emjl .emjl-today-list .is-case .emjl-today-ico { background: #F3E8FF; color: #7C3AED; }
.emjl .emjl-today-list .is-contract .emjl-today-ico { background: #FEF3C7; color: #B45309; }
html.emjl-dark .emjl .emjl-today-ico { background: rgba(59, 130, 246, .15); }
.emjl .emjl-today-txt { display: flex; flex-direction: column; min-width: 0; }
.emjl .emjl-today-txt strong { font-weight: 600; color: var(--ink); }
.emjl .emjl-today-txt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emjl .emjl-today-when { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.emjl .emjl-today-when .emjl-when { margin: 0 0 2px; }
.emjl .emjl-today-empty { margin: 0; padding: 18px; color: var(--muted); }
.emjl .emjl-today-empty .fa { color: #16A34A; margin-inline-end: 6px; }

/* ---------- en-tête du cabinet (documents imprimés, reçus, bons) ---------- */
.emjl-doc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.emjl-doc-head > div { display: flex; flex-direction: column; min-width: 0; }
.emjl-doc-head strong { font-size: 15.5px; font-weight: 700; color: #0F172A; line-height: 1.3; }
.emjl-doc-head span { font-size: 12px; color: #475569; line-height: 1.45; }
.emjl-doc-logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #1D4ED8; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.02em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.emjl .emjl-doc-head.is-preview { padding: 14px; border: 1px dashed var(--rule); border-radius: 10px; background: #fff; }
.emjl-receipt-head { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 16px; }
.emjl-receipt-head .emjl-receipt-copy { margin-top: 2px; font-weight: 600; color: #64748B; }
.emjl-receipt-qr { width: 76px; height: 76px; }
.emjl-receipt-qr:empty { display: none; }
.emjl-receipt-qr svg { width: 100%; height: 100%; display: block; }
.emjl-voucher-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: #F1F5F9; }
.emjl-voucher-amount span { font-size: 12px; font-weight: 600; color: #475569; }
.emjl-voucher-amount strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.emjl-receipt.is-in .emjl-voucher-amount strong { color: #15803D; }
.emjl-receipt.is-out .emjl-voucher-amount strong { color: #B91C1C; }
.emjl-voucher-amount em { flex-basis: 100%; font-style: normal; color: #334155; }
.emjl-voucher-amount em::first-letter { text-transform: uppercase; }
@media (max-width: 600px) { .emjl-receipt-head { grid-template-columns: 1fr auto !important; } .emjl-receipt-qr { grid-column: 2; grid-row: 1; } }
.emjl-print-head .emjl-doc-head strong { font-size: 13pt; }

/* ---------- espace client : avancement, appel à l'action, colonnes ---------- */
.emjl .emjl-progress { display: flex; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; }
.emjl .emjl-progress li { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; color: var(--muted); }
.emjl .emjl-progress li + li::before { content: ""; position: absolute; top: 14px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--rule); z-index: 0; }
.emjl .emjl-progress li.is-done + li::before, .emjl .emjl-progress li.is-done + li.is-done::before { background: #16A34A; }
.emjl .emjl-progress-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--rule); font-weight: 700; color: var(--muted); }
.emjl .emjl-progress li.is-done .emjl-progress-dot { background: #16A34A; border-color: #16A34A; color: #fff; }
.emjl .emjl-progress li.is-current .emjl-progress-dot { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px var(--f-ring, rgba(37, 99, 235, .15)); }
.emjl .emjl-progress li.is-current .emjl-progress-t { color: var(--ink); font-weight: 700; }
.emjl .emjl-progress li.is-done .emjl-progress-t { color: var(--text); }
.emjl .emjl-client-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.emjl .emjl-client-cta .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding-inline: 18px; border-radius: 10px; }
@media (max-width: 600px) {
    .emjl .emjl-progress { flex-direction: column; gap: 10px; }
    .emjl .emjl-progress li { flex-direction: row; text-align: start; gap: 12px; }
    .emjl .emjl-progress li + li::before { top: -12px; inset-inline-start: 14px; inset-inline-end: auto; width: 2px; height: 12px; }
    .emjl .emjl-client-cta .btn { flex: 1 1 100%; justify-content: center; }
}
/* mobile : documents et accès rapide avant les actualités */
@media (max-width: 991px) {
    .emjl .emjl-client-cols { display: flex; flex-direction: column; }
    .emjl .emjl-client-side { order: 1; }
    .emjl .emjl-client-main { order: 2; }
}
.emjl .emjl-dossier-head.is-client .emjl-dossier-money { margin: 0; }

/* ---------- finitions : état vide avec action, chargement en squelette ---------- */
.emjl .emjl-empty-cta { display: flex; align-items: center; gap: 6px; margin: 14px auto 0; }
/* pendant un rechargement AJAX : lignes grisées animées plutôt qu'un sablier au milieu */
.emjl .emjl-loading::after { display: none; }
.emjl .emjl-loading > * { opacity: 1; }
.emjl .emjl-loading table tbody td, .emjl .emjl-loading .emjl-reminders li > span {
    color: transparent !important; position: relative;
}
.emjl .emjl-loading table tbody td > *, .emjl .emjl-loading .emjl-reminders li > span > * { visibility: hidden; }
.emjl .emjl-loading table tbody td::after, .emjl .emjl-loading .emjl-reminders li > span::after {
    content: ""; position: absolute; inset: 12px 10px; border-radius: 6px;
    background: linear-gradient(90deg, var(--rule-soft, #EDF1F7) 25%, var(--rule, #E3E8F0) 50%, var(--rule-soft, #EDF1F7) 75%) 0 0 / 300% 100%;
    animation: emjl-shimmer 1.1s linear infinite;
}
@keyframes emjl-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .emjl .emjl-loading table tbody td::after, .emjl .emjl-loading .emjl-reminders li > span::after { animation: none; } }
