/*
 * E-Jar v3.1.100 — Mission 4 : couche responsive assainie.
 * Objectif : limiter les corrections globales, cibler les shells E-Jar et réduire
 * les !important aux seuls cas de verrouillage responsive encore nécessaires.
 * Desktop : tableaux classiques. Tablette/mobile : lignes de tableaux en cartes natives.
 */

html body.ejar-responsive-ready :where(
    .ejar-responsive-scope,
    .ejar-responsive-scope *,
    .ejar-public-register-shell,
    .ejar-public-register-shell *,
    .ejar-admin-nav,
    .ejar-admin-nav *
) {
    box-sizing: border-box;
}

html body.ejar-responsive-ready {
    max-width: 100%;
}

/* ==========================================================
   1. Shells E-Jar : logique type Tableau financier partout.
   ========================================================== */
html body.ejar-responsive-ready :where(
    .ejar-responsive-scope,
    .ejar-dashboard,
    .ejar-admin-space,
    .ejar-admin-page,
    .ejar-admin-page-shell,
    .ejar-admin-control-dashboard,
    .ejar-admin-demande-page,
    .ejar-admin-document-page,
    .ejar-admin-relance-page,
    .ejar-entities-dashboard,
    .ejar-parc-dashboard,
    .ejar-contrats-dashboard,
    .ejar-edl-dashboard,
    .ejar-factures-dashboard,
    .ejar-pointage-dashboard,
    .ejar-financial-dashboard,
    .ejar-livre-compte-dashboard,
    .ejar-livre-compte-premium-dashboard,
    .ejar-sorties-wrap,
    .ejar-sorties-page,
    .ejar-agence-space,
    .ejar-agence-dashboard,
    .ejar-agence-page-shell,
    .ejar-agence-create-page,
    .ejar-agence-add-societe-page,
    .ejar-agence-add-vehicule-page,
    .ejar-agence-add-client-page,
    .ejar-client-space,
    .ejar-client-dashboard,
    .ejar-client-page-shell,
    .ejar-client-compte-page,
    .ejar-client-upload-page,
    .ejar-client-home,
    .ejar-client-page-shell,
    .ejar-profile-page,
    .ejar-demand-response-page,
    .ejar-auth-alert-page
) {
    width: 100%;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
    padding-left: clamp(14px, 2.4vw, 28px);
    padding-right: clamp(14px, 2.4vw, 28px);
}

/* E-Jar Mission 3 — exception métier : le tableau financier est conçu à 1180px. */
html body.ejar-responsive-ready .ejar-financial-dashboard.ejar-dashboard {
    --ejar-financial-dashboard-max-width: 1180px;
    width: min(100%, var(--ejar-financial-dashboard-max-width));
    max-width: var(--ejar-financial-dashboard-max-width);
}

/* Les shells imbriqués ne doivent pas ajouter une deuxième marge externe. */
html body.ejar-responsive-ready :where(
    .ejar-dashboard,
    .ejar-admin-page-shell,
    .ejar-agence-page-shell,
    .ejar-client-page-shell,
    .ejar-client-page-shell
) :where(
    .ejar-dashboard,
    .ejar-admin-page-shell,
    .ejar-agence-dashboard,
    .ejar-agence-page-shell,
    .ejar-client-dashboard,
    .ejar-client-page-shell,
    .ejar-client-page-shell
) {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

html body.ejar-responsive-ready :where(
    .ejar-card,
    .ejar-section,
    .ejar-form,
    .ejar-stat-card,
    .ejar-tool-card,
    .ejar-tool-section,
    .ejar-control-center,
    .ejar-subtabs-card,
    .ejar-parc-tabs-card,
    .ejar-parc-search-card,
    .ejar-smart-filter-panel,
    .ejar-sorties-panel,
    .ejar-agence-filter-panel,
    .ejar-agence-priority-panel,
    .ejar-agence-account-section,
    .ejar-agence-account-detail,
    .ejar-client-panel,
    .ejar-client-account-card,
    .ejar-client-compte-card,
    .ejar-client-véhicule-card,
    .ejar-client-upload-card,
    .ejar-contrats-form,
    .ejar-edl-form,
    .ejar-contrats-intro,
    .ejar-contrats-legal-details,
    .ejar-diagnostic-wrap,
    .ejar-diagnostic-group,
    .ejar-diagnostic-actions-card,
    .ejar-admin-cleanup-card,
    .ejar-admin-help-box,
    .ejar-edit-panel-card
) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

html body.ejar-responsive-ready :where(.ejar-responsive-scope img, .ejar-responsive-scope video, .ejar-responsive-scope canvas, .ejar-responsive-scope svg, .ejar-responsive-scope iframe, .ejar-public-register-shell img, .ejar-public-register-shell svg) {
    max-width: 100%;
    height: auto;
}

/* E-Jar v3.1.100 — les textes longs peuvent se couper, mais pas les montants, badges et boutons. */
html body.ejar-responsive-ready :where(
    .ejar-card p,
    .ejar-section p,
    .ejar-form p,
    .ejar-description,
    .ejar-address,
    .ejar-muted,
    .ejar-muted-value,
    .ejar-text-wrap,
    .ejar-client-note,
    .ejar-alert
) {
    overflow-wrap: anywhere;
}

html body.ejar-responsive-ready :where(
    .ejar-money,
    .ejar-money-cell,
    .ejar-solde-cell,
    .ejar-status-badge,
    .ejar-balance-badge,
    .ejar-date-badge,
    .ejar-button,
    .ejar-sorties-button,
    .ejar-phone
) {
    overflow-wrap: normal;
    word-break: normal;
}

/* ==========================================================
   2. Formulaires, champs et grilles.
   ========================================================== */
html body.ejar-responsive-ready :where(.ejar-responsive-scope input, .ejar-responsive-scope select, .ejar-responsive-scope textarea, .ejar-responsive-scope button, .ejar-public-register-shell input, .ejar-public-register-shell select, .ejar-public-register-shell textarea, .ejar-public-register-shell button, input[class*="ejar-"], select[class*="ejar-"], textarea[class*="ejar-"], button[class*="ejar-"]) {
    max-width: 100%;
    min-width: 0;
}

html body.ejar-responsive-ready :where(
    .ejar-form,
    .ejar-card,
    .ejar-section,
    .ejar-filter-bar,
    .filter-bar,
    .ejar-smart-filter-panel,
    .ejar-sorties-filters,
    .ejar-agence-filter-panel,
    .ejar-client-compte-selector
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%;
}

html body.ejar-responsive-ready :where(
    .ejar-field,
    .filter-group,
    .ejar-sorties-field,
    .ejar-smart-filter-field,
    .ejar-smart-filter-field-wide,
    .ejar-inline-edit-grid > *,
    .ejar-form-grid > *,
    .ejar-form-grid-2 > *,
    .ejar-form-grid-3 > *,
    .ejar-form-grid-4 > *
) {
    min-width: 0;
}

html body.ejar-responsive-ready :where(
    .ejar-stats-grid,
    .ejar-stats-grid-v2,
    .ejar-dashboard-grid,
    .ejar-actions-grid,
    .ejar-tool-grid,
    .ejar-diagnostic-actions-grid,
    .ejar-diagnostic-checks,
    .ejar-parc-summary-grid,
    .ejar-parc-alert-grid,
    .ejar-parc-mini-alerts,
    .ejar-agence-kpi-grid,
    .ejar-agence-premium-summary,
    .ejar-agence-priority-grid,
    .ejar-agence-quick-grid,
    .ejar-agence-account-grid,
    .ejar-agence-filter-grid,
    .ejar-client-kpi-grid,
    .ejar-client-action-grid,
    .ejar-client-véhicules-grid,
    .ejar-client-finance-grid,
    .ejar-client-alert-grid,
    .ejar-client-info-grid,
    .ejar-client-doc-tools,
    .ejar-contrats-stats-grid,
    .ejar-contrats-principles,
    .ejar-contrats-annexes-grid,
    .ejar-form-grid,
    .ejar-form-grid-2,
    .ejar-form-grid-3,
    .ejar-form-grid-4,
    .ejar-contrats-grid,
    .ejar-edl-grid,
    .ejar-two-columns,
    .ejar-parc-two-columns,
    .ejar-sorties-grid,
    .ejar-sorties-add-grid,
    .ejar-sorties-filters,
    .ejar-smart-filter-panel,
    .ejar-control-center-head,
    .ejar-table-toolbar,
    .filter-bar,
    .ejar-inline-field-row,
    .ejar-edit-panels-grid,
    .ejar-inline-edit-grid
) {
    min-width: 0;
}

/* ==========================================================
   3. Navigation / sous-menus : centrés, compacts, esthétiques.
      Le sticky/fixed admin est géré uniquement par ejar-base.js.
   ========================================================== */
html body.ejar-responsive-ready :where(.ejar-admin-nav-sticky-holder, .ejar-responsive-nav-holder) {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    left: auto;
    right: auto;
    min-width: 0;
}

html body.ejar-responsive-ready :where(.ejar-admin-nav, .ejar-subtabs, .ejar-parc-tabs, .ejar-edit-tabs, .ejar-contrats-tabs) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
}

html body.ejar-responsive-ready :where(.ejar-admin-nav) {
    padding: 10px;
    border-radius: 22px;
}

html body.ejar-responsive-ready :where(.ejar-admin-nav a, .ejar-subtab, .ejar-parc-tab, .ejar-edit-tab, .ejar-contrats-type-tab) {
    min-width: 0;
    text-align: center;
    line-height: 1.18;
}

html body.ejar-responsive-ready :where(.ejar-admin-nav a) {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 13px;
}

html body.ejar-responsive-ready :where(.ejar-responsive-nav) {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* ==========================================================
   4. Tableaux desktop : tableaux intacts dans leurs wrappers.
   ========================================================== */
html body.ejar-responsive-ready :where(
    .ejar-responsive-table-wrap,
    .ejar-table-responsive,
    .ejar-mobile-scroll,
    .ejar-sorties-scroll,
    .ejar-pointage-table-wrap,
    .ejar-parc-table-wrap,
    .ejar-finance-table-wrap,
    .ejar-livre-compte-table-wrap,
    .ejar-search-results-table-wrap,
    .ejar-table-scroll-fallback,
    .ejar-mobile-card-table-wrap
) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border-radius: 18px;
}

html body.ejar-responsive-ready :where(.ejar-generated-mobile-cards) {
    display: none !important;
    visibility: hidden !important;
}

html body.ejar-responsive-ready :where(
    table.ejar-table,
    table.ejar-finance-table,
    table.ejar-pointage-paiements-table,
    table.ejar-parc-table,
    table.ejar-documents-bulk-table,
    table.ejar-livre-compte-table,
    table.ejar-livre-compte-premium-table,
    table.ejar-agence-accounts-table,
    table.ejar-agence-simple-table,
    table.ejar-agence-documents-table,
    table.ejar-agence-demandes-table,
    table.ejar-client-doc-table,
    table.ejar-client-demande-table,
    table.ejar-edl-room-table,
    table.ejar-contrat-contract-table,
    table.ejar-sorties-summary-table,
    table.ejar-sorties-rent-table,
    table.ejar-sorties-table,
    .ejar-card:not(.ejar-no-card-table) table,
    .ejar-section:not(.ejar-no-card-table) table
) {
    display: table;
    width: 100%;
    max-width: none;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) thead { display: table-header-group; }
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) tbody { display: table-row-group; }
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) tr { display: table-row; }
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) :where(th, td) {
    display: table-cell;
    width: auto;
    min-width: 0;
    vertical-align: top;
    overflow-wrap: normal;
    word-break: normal;
}
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) td::before { content: none !important; display: none !important; }
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) tr[hidden],
html body.ejar-responsive-ready :where(table.ejar-table, table.ejar-finance-table, table.ejar-pointage-paiements-table, table.ejar-parc-table, table.ejar-documents-bulk-table, table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table, table.ejar-agence-accounts-table, table.ejar-agence-simple-table, table.ejar-agence-documents-table, table.ejar-agence-demandes-table, table.ejar-client-doc-table, table.ejar-client-demande-table, table.ejar-edl-room-table, table.ejar-contrat-contract-table, table.ejar-sorties-summary-table, table.ejar-sorties-rent-table, table.ejar-sorties-table, .ejar-card:not(.ejar-no-card-table) table, .ejar-section:not(.ejar-no-card-table) table) tr.ejar-table-row-hidden { display: none !important; }


@media (min-width: 1181px) {
    html body.ejar-responsive-ready :where(
        .ejar-money,
        .ejar-money-cell,
        .ejar-solde-cell,
        .ejar-nowrap-actions
    ) {
        white-space: nowrap;
    }
}


@media (min-width: 1181px) {
html body.ejar-responsive-ready :where(table.ejar-finance-table) { min-width: 980px; }
html body.ejar-responsive-ready :where(table.ejar-pointage-paiements-table) { min-width: 1080px; }
html body.ejar-responsive-ready :where(table.ejar-parc-table) { min-width: 1100px; }
html body.ejar-responsive-ready :where(table.ejar-documents-bulk-table) { min-width: 1180px; }
html body.ejar-responsive-ready :where(table.ejar-livre-compte-table, table.ejar-livre-compte-premium-table) { min-width: 980px; }
html body.ejar-responsive-ready :where(table.ejar-agence-accounts-table) { min-width: 1040px; }
html body.ejar-responsive-ready :where(table.ejar-agence-demandes-table, table.ejar-agence-documents-table) { min-width: 900px; }
html body.ejar-responsive-ready :where(table.ejar-agence-simple-table) { min-width: 620px; }
html body.ejar-responsive-ready :where(table.ejar-client-doc-table, table.ejar-client-demande-table) { min-width: 760px; }
html body.ejar-responsive-ready :where(table.ejar-client-véhicule-table, table.ejar-client-finance-table) { min-width: 1060px; }
html body.ejar-responsive-ready :where(table.ejar-edl-room-table, table.ejar-contrat-contract-table) { min-width: 720px; }
html body.ejar-responsive-ready :where(table.ejar-sorties-summary-table) { min-width: 1320px; }
html body.ejar-responsive-ready :where(table.ejar-sorties-rent-table) { min-width: 1380px; }
html body.ejar-responsive-ready :where(table.ejar-sorties-table) { min-width: 1760px; }
}
@media (max-width: 1180px) {
    html body.ejar-responsive-ready :where(
        table.ejar-finance-table,
        table.ejar-pointage-paiements-table,
        table.ejar-parc-table,
        table.ejar-documents-bulk-table,
        table.ejar-livre-compte-table,
        table.ejar-livre-compte-premium-table,
        table.ejar-agence-accounts-table,
        table.ejar-agence-demandes-table,
        table.ejar-agence-documents-table,
        table.ejar-agence-simple-table,
        table.ejar-client-doc-table,
        table.ejar-client-demande-table,
        table.ejar-client-véhicule-table,
        table.ejar-client-finance-table,
        table.ejar-edl-room-table,
        table.ejar-contrat-contract-table,
        table.ejar-sorties-summary-table,
        table.ejar-sorties-rent-table,
        table.ejar-sorties-table
    ) {
        min-width: 0;
    }
}


html body.ejar-responsive-ready :where(
    .ejar-responsive-table-wrap,
    .ejar-table-responsive,
    .ejar-sorties-scroll,
    .ejar-pointage-table-wrap,
    .ejar-parc-table-wrap,
    .ejar-finance-table-wrap,
    .ejar-livre-compte-table-wrap
) :where(table.ejar-table) {
    margin: 0;
}

/* ==========================================================
   5. Actions et boutons.
   ========================================================== */
html body.ejar-responsive-ready :where(
    .ejar-actions-stack,
    .ejar-inline-actions,
    .ejar-sorties-actions,
    .ejar-parc-actions,
    .ejar-parc-shortcuts,
    .ejar-agence-actions,
    .ejar-client-actions,
    .ejar-client-actions,
    .ejar-client-card-actions,
    .ejar-quick-search-actions,
    .ejar-admin-actions-row
) {
    min-width: 0;
    max-width: 100%;
}

html body.ejar-responsive-ready :where(
    .ejar-button,
    a.ejar-button,
    button.ejar-button,
    input[type="submit"].ejar-button,
    .ejar-sorties-button,
    .ejar-notification-button,
    .ejar-open-button,
    .ejar-delete-button,
    .ejar-relance-button,
    .ejar-reset-button,
    .ejar-button-light,
    .ejar-action-card-light
) {
    max-width: 100%;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
}

html body.ejar-responsive-ready :where(td, th, .ejar-actions-cell) :where(
    .ejar-actions-stack,
    .ejar-inline-actions,
    .ejar-sorties-actions,
    .ejar-parc-actions,
    .ejar-agence-actions,
    .ejar-client-card-actions
) {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: max-content;
    max-width: 420px;
}

@media (min-width: 1181px) {
    html body.ejar-responsive-ready :where(td, th, .ejar-actions-cell) :where(
        .ejar-button,
        a.ejar-button,
        button.ejar-button,
        input[type="submit"].ejar-button,
        .ejar-sorties-button,
        .ejar-notification-button,
        .ejar-open-button,
        .ejar-delete-button,
        .ejar-relance-button
    ) {
        width: auto;
        min-width: max-content;
        max-width: none;
        white-space: nowrap;
    }
}

/* ==========================================================
   6. Autocomplete / recherches rapides : contraste fiable au survol.
   ========================================================== */
html body.ejar-responsive-ready :where(
    .ejar-autocomplete-option:hover,
    .ejar-autocomplete-option:focus,
    .ejar-autocomplete-option.is-active,
    .ejar-quick-search-option:hover,
    .ejar-quick-search-option:focus,
    .ejar-quick-search-option.is-active,
    .ejar-sorties-vehicule-suggestion:hover,
    .ejar-sorties-vehicule-suggestion.is-active
) {
    background: linear-gradient(135deg, #111111, #2a2419);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

html body.ejar-responsive-ready :where(
    .ejar-autocomplete-option:hover *,
    .ejar-autocomplete-option:focus *,
    .ejar-autocomplete-option.is-active *,
    .ejar-quick-search-option:hover *,
    .ejar-quick-search-option:focus *,
    .ejar-quick-search-option.is-active *,
    .ejar-sorties-vehicule-suggestion:hover *,
    .ejar-sorties-vehicule-suggestion.is-active *
) {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* ==========================================================
   7. Générateur de contrats : boutons de choix = formulaire, pas menu.
   ========================================================== */
html body.ejar-responsive-ready :where(.ejar-contrats-toggle-row) {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    overflow: visible;
    max-width: 100%;
}

html body.ejar-responsive-ready :where(.ejar-contrats-toggle-row label) {
    flex: 1 1 210px;
    min-width: min(210px, 100%);
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
}

/* ==========================================================
   8. Utilitaires / structures E-Jar.
   ========================================================== */
html body.ejar-responsive-ready .ejar-muted { color: #666; }
html body.ejar-responsive-ready .ejar-muted-small,
html body.ejar-responsive-ready .ejar-help-text {
    color: #666;
    font-size: 12px;
    line-height: 1.45;
}
html body.ejar-responsive-ready .ejar-help-text { display: block; margin-top: 4px; }
html body.ejar-responsive-ready .ejar-help-text-block { margin: 6px 0 0; }
html body.ejar-responsive-ready .ejar-subtabs-card-spaced { margin-bottom: 22px; }
html body.ejar-responsive-ready .ejar-subtabs-card-inline { margin: 18px 0 22px; }
html body.ejar-responsive-ready .ejar-edit-panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}
html body.ejar-responsive-ready .ejar-edit-panel-card {
    border: 1px solid #eeeeee;
    border-radius: 18px;
    padding: 20px;
    background: #fafafa;
    min-width: 0;
}
html body.ejar-responsive-ready .ejar-section-separator { margin: 18px 0; border: 0; border-top: 1px solid #eeeeee; }
html body.ejar-responsive-ready .ejar-field-separated { border-top: 1px solid #eeeeee; padding-top: 18px; margin-top: 10px; }
html body.ejar-responsive-ready .ejar-field-spaced { margin-bottom: 10px; }
html body.ejar-responsive-ready .ejar-bulk-toolbar { margin: 18px 0 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
html body.ejar-responsive-ready .ejar-bulk-field { margin: 0; min-width: 260px; }
html body.ejar-responsive-ready .ejar-table-select-col { width: 46px; text-align: center; }
html body.ejar-responsive-ready .ejar-table-select-cell { text-align: center; vertical-align: middle; }
html body.ejar-responsive-ready .ejar-table-control { max-width: 100%; }
html body.ejar-responsive-ready .ejar-table-control-xs { width: 120px; }
html body.ejar-responsive-ready .ejar-table-control-sm { width: 150px; }
html body.ejar-responsive-ready .ejar-table-control-md { width: 180px; }
html body.ejar-responsive-ready .ejar-table-control-lg { width: 220px; }
html body.ejar-responsive-ready .ejar-year-input { width: 85px; }
html body.ejar-responsive-ready .ejar-button-gold { background: #e2c08d; color: #000; font-weight: 700; }
html body.ejar-responsive-ready .ejar-button-danger { background: #b42318; border-color: #b42318; color: #ffffff; }
html body.ejar-responsive-ready .ejar-button-dark { background: #1a1a1a; color: #ffffff; }
html body.ejar-responsive-ready .ejar-text-danger { color: #d9363e; }
html body.ejar-responsive-ready .ejar-text-critical { color: #a8071a; }
html body.ejar-responsive-ready .ejar-text-success { color: #107c41; }
html body.ejar-responsive-ready .ejar-inline-form { display: inline-block; margin: 0; }
html body.ejar-responsive-ready .ejar-inline-form-spaced { margin-right: 6px; }
html body.ejar-responsive-ready .ejar-empty-table-cell { text-align: center; padding: 50px; color: #999999; }
html body.ejar-responsive-ready .ejar-soft-card { background: #fbfaf7; }
html body.ejar-responsive-ready .ejar-table-cell-flush { padding: 0; }
html body.ejar-responsive-ready .ejar-inline-edit-grid {
    display: grid;
    grid-template-columns: 150px 180px minmax(220px, 1fr) 160px 230px;
    gap: 10px;
    align-items: center;
    padding: 12px;
}
html body.ejar-responsive-ready .ejar-full-input { width: 100%; }
html body.ejar-responsive-ready .ejar-feature-card-left { border-left: 5px solid #111111; }
html body.ejar-responsive-ready .ejar-feature-icon { font-size: 36px; margin: 20px 0; }
html body.ejar-responsive-ready .ejar-list-compact { margin: 10px 0 0 18px; }
html body.ejar-responsive-ready .ejar-search-results-section { margin-top: 25px; }
html body.ejar-responsive-ready .ejar-nested-group { margin-left: 20px; }
html body.ejar-responsive-ready .ejar-nested-group-vehicule { margin-top: 18px; }
html body.ejar-responsive-ready .ejar-nested-group-client { margin-top: 14px; }
html body.ejar-responsive-ready .ejar-hidden-search-empty { display: none; margin-top: 14px; }
html body.ejar-responsive-ready .ejar-action-paragraph { margin-top: 14px; }
html body.ejar-responsive-ready .ejar-tight-top { margin-top: -4px; }

/* ==========================================================
   9. Création & affiliation E-Jar : formulaires sans chevauchement.
   ========================================================== */
html body.ejar-responsive-ready :where(.ejar-entities-dashboard .ejar-form) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}

html body.ejar-responsive-ready :where(
    .ejar-entities-dashboard .ejar-form > h2,
    .ejar-entities-dashboard .ejar-form > h3,
    .ejar-entities-dashboard .ejar-form > p,
    .ejar-entities-dashboard .ejar-form > .ejar-alert,
    .ejar-entities-dashboard .ejar-form > button,
    .ejar-entities-dashboard .ejar-form > .ejar-button,
    .ejar-entities-dashboard .ejar-form > .ejar-field-separated,
    .ejar-entities-dashboard .ejar-form > .ejar-smart-filter-panel,
    .ejar-entities-dashboard .ejar-form > .ejar-form-grid,
    .ejar-entities-dashboard .ejar-form > .ejar-form-grid-2,
    .ejar-entities-dashboard .ejar-form > .ejar-form-grid-3,
    .ejar-entities-dashboard .ejar-form > .ejar-form-grid-4
) {
    grid-column: 1 / -1;
}

html body.ejar-responsive-ready :where(.ejar-entities-dashboard .ejar-smart-filter-panel) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    align-items: end;
}

html body.ejar-responsive-ready :where(.ejar-entities-dashboard .ejar-smart-filter-field-wide) {
    grid-column: 1 / -1;
}

html body.ejar-responsive-ready :where(.ejar-entities-dashboard .ejar-form > button, .ejar-entities-dashboard .ejar-form > .ejar-button) {
    justify-self: start;
}

/* ==========================================================
   11. Tablette et mobile : seules les tables opt-in .ejar-responsive-table
       préparées par le JS deviennent des cartes responsive.
   ========================================================== */
@media (max-width: 1180px) {
    html body.ejar-responsive-ready :where(
        .ejar-admin-nav-sticky-holder,
        .ejar-responsive-nav-holder
    ) {
        width: 100% !important;
        max-width: calc(100% - 28px) !important;
    }

    html body.ejar-responsive-ready :where(.ejar-admin-nav, .ejar-subtabs, .ejar-parc-tabs, .ejar-edit-tabs, .ejar-contrats-tabs) {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scroll-snap-type: x proximity !important;
    }

    html body.ejar-responsive-ready :where(.ejar-admin-nav a, .ejar-subtab, .ejar-parc-tab, .ejar-edit-tab, .ejar-contrats-type-tab) {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready) {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready thead) {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready tbody) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
        width: 100% !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready tr) {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: clamp(16px, 3vw, 22px) !important;
        border: 1px solid rgba(212, 175, 55, .28) !important;
        border-radius: 22px !important;
        background: linear-gradient(180deg, #ffffff, #fffdf7) !important;
        box-shadow: 0 12px 28px rgba(17, 17, 17, .07) !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready tr:hover) {
        transform: none !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready tr[hidden], .ejar-card-table-ready tr.ejar-table-row-hidden) {
        display: none !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td, .ejar-card-table-ready th) {
        display: grid !important;
        grid-template-columns: minmax(104px, 36%) minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 12px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(17, 17, 17, .07) !important;
        background: transparent !important;
        color: #1f1f1f;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.55 !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td:last-child, .ejar-card-table-ready th:last-child) {
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td::before, .ejar-card-table-ready th::before) {
        content: attr(data-label) !important;
        display: block !important;
        min-width: 0 !important;
        font-weight: 900 !important;
        color: #6f581f !important;
        -webkit-text-fill-color: #6f581f !important;
        line-height: 1.35 !important;
        overflow-wrap: anywhere !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td[data-ejar-card-full="1"], .ejar-card-table-ready th[data-ejar-card-full="1"], .ejar-card-table-ready .ejar-actions-cell) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td[data-ejar-card-full="1"]::before, .ejar-card-table-ready th[data-ejar-card-full="1"]::before, .ejar-card-table-ready .ejar-actions-cell::before) {
        margin-bottom: 8px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready .ejar-empty-table-cell) {
        display: block !important;
        text-align: center !important;
        padding: 28px 16px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready .ejar-money, .ejar-card-table-ready .ejar-money-cell, .ejar-card-table-ready .ejar-solde-cell, .ejar-card-table-ready .ejar-phone, .ejar-card-table-ready .ejar-status-badge, .ejar-card-table-ready .ejar-date-badge) {
        white-space: normal !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td > *, .ejar-card-table-ready th > *) {
        max-width: 100% !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td :is(.ejar-actions-stack, .ejar-inline-actions, .ejar-sorties-actions, .ejar-parc-actions, .ejar-agence-actions, .ejar-client-card-actions)) {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td :is(.ejar-button, a.ejar-button, button.ejar-button, input[type="submit"].ejar-button, .ejar-sorties-button, .ejar-notification-button, .ejar-open-button, .ejar-delete-button, .ejar-relance-button)) {
        width: auto !important;
        min-width: min(100%, 132px) !important;
        min-height: 44px !important;
        padding: 11px 15px !important;
        border-radius: 15px !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    html body.ejar-responsive-ready :where(.ejar-responsive-table-wrap, .ejar-table-responsive, .ejar-mobile-scroll, .ejar-sorties-scroll, .ejar-pointage-table-wrap, .ejar-parc-table-wrap, .ejar-finance-table-wrap, .ejar-livre-compte-table-wrap, .ejar-search-results-table-wrap, .ejar-table-scroll-fallback, .ejar-mobile-card-table-wrap) {
        overflow-x: visible !important;
        border-radius: 0 !important;
    }
}

/* ==========================================================
   12. Tablette.
   ========================================================== */
@media (min-width: 783px) and (max-width: 1180px) {
    html body.ejar-responsive-ready :where(
        .ejar-responsive-scope,
        .ejar-dashboard,
        .ejar-admin-space,
        .ejar-admin-page,
        .ejar-admin-page-shell,
        .ejar-admin-control-dashboard,
        .ejar-parc-dashboard,
        .ejar-contrats-dashboard,
        .ejar-edl-dashboard,
        .ejar-factures-dashboard,
        .ejar-pointage-dashboard,
        .ejar-financial-dashboard,
        .ejar-livre-compte-dashboard,
        .ejar-livre-compte-premium-dashboard,
        .ejar-sorties-wrap,
        .ejar-sorties-page,
        .ejar-agence-space,
        .ejar-agence-dashboard,
        .ejar-agence-page-shell,
        .ejar-client-space,
        .ejar-client-dashboard,
        .ejar-client-page-shell,
        .ejar-client-compte-page,
        .ejar-client-home,
        .ejar-client-page-shell,
        .ejar-profile-page,
        .ejar-demand-response-page
    ) {
        width: 100%;
        max-width: 1180px;
        padding-left: 18px;
        padding-right: 18px;
    }

    html body.ejar-responsive-ready :where(
        .ejar-stats-grid,
        .ejar-stats-grid-v2,
        .ejar-dashboard-grid,
        .ejar-actions-grid,
        .ejar-tool-grid,
        .ejar-diagnostic-actions-grid,
        .ejar-diagnostic-checks,
        .ejar-parc-summary-grid,
        .ejar-parc-alert-grid,
        .ejar-parc-mini-alerts,
        .ejar-agence-kpi-grid,
        .ejar-agence-premium-summary,
        .ejar-agence-priority-grid,
        .ejar-agence-quick-grid,
        .ejar-agence-account-grid,
        .ejar-agence-filter-grid,
        .ejar-client-kpi-grid,
        .ejar-client-action-grid,
        .ejar-client-véhicules-grid,
        .ejar-client-finance-grid,
        .ejar-client-alert-grid,
        .ejar-client-info-grid,
        .ejar-client-doc-tools,
        .ejar-contrats-stats-grid,
        .ejar-contrats-principles,
        .ejar-contrats-annexes-grid,
        .ejar-form-grid,
        .ejar-form-grid-2,
        .ejar-form-grid-3,
        .ejar-form-grid-4,
        .ejar-contrats-grid,
        .ejar-edl-grid,
        .ejar-two-columns,
        .ejar-parc-two-columns,
        .ejar-sorties-grid,
        .ejar-sorties-add-grid,
        .ejar-sorties-filters,
        .ejar-control-center-head,
        .ejar-table-toolbar,
        .filter-bar,
        .ejar-inline-field-row
    ) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* ==========================================================
   13. Smartphone.
   ========================================================== */
@media (max-width: 782px) {
    html body.ejar-responsive-ready :where(
        .ejar-responsive-scope,
        .ejar-dashboard,
        .ejar-admin-space,
        .ejar-admin-page,
        .ejar-admin-page-shell,
        .ejar-admin-control-dashboard,
        .ejar-admin-demande-page,
        .ejar-admin-document-page,
        .ejar-admin-relance-page,
            .ejar-entities-dashboard,
        .ejar-parc-dashboard,
        .ejar-contrats-dashboard,
        .ejar-edl-dashboard,
        .ejar-factures-dashboard,
        .ejar-pointage-dashboard,
        .ejar-financial-dashboard,
        .ejar-livre-compte-dashboard,
        .ejar-livre-compte-premium-dashboard,
        .ejar-sorties-wrap,
        .ejar-sorties-page,
        .ejar-agence-space,
        .ejar-agence-dashboard,
        .ejar-agence-page-shell,
        .ejar-agence-create-page,
        .ejar-agence-add-societe-page,
        .ejar-agence-add-vehicule-page,
        .ejar-agence-add-client-page,
        .ejar-client-space,
        .ejar-client-dashboard,
        .ejar-client-page-shell,
        .ejar-client-compte-page,
        .ejar-client-upload-page,
        .ejar-client-home,
        .ejar-client-page-shell,
        .ejar-profile-page,
        .ejar-demand-response-page,
            .ejar-auth-alert-page
    ) {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        min-width: 0 !important;
    }

    html body.ejar-responsive-ready :where(
        .ejar-card,
        .ejar-section,
        .ejar-form,
        .ejar-stat-card,
        .ejar-tool-card,
        .ejar-control-center,
        .ejar-subtabs-card,
        .ejar-parc-tabs-card,
        .ejar-parc-search-card,
        .ejar-sorties-panel,
        .ejar-agence-filter-panel,
        .ejar-agence-priority-panel,
        .ejar-agence-account-section,
        .ejar-agence-account-detail,
        .ejar-client-panel,
        .ejar-client-account-card,
        .ejar-client-compte-card,
        .ejar-client-véhicule-card,
        .ejar-client-upload-card,
        .ejar-contrats-form,
        .ejar-edl-form,
        .ejar-contrats-intro,
        .ejar-contrats-legal-details,
        .ejar-diagnostic-group,
        .ejar-diagnostic-actions-card,
        .ejar-admin-cleanup-card,
        .ejar-admin-help-box,
        .ejar-edit-panel-card
    ) {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 16px !important;
        border-radius: 18px !important;
    }

    html body.ejar-responsive-ready :where(
        .ejar-dashboard-header,
        .ejar-page-hero,
        .ejar-agence-hero,
        .ejar-client-hero,
        .ejar-sorties-header,
        .ejar-agence-account-detail-header,
        .ejar-agence-account-card-top,
        .ejar-client-section-title,
        .ejar-client-véhicule-top,
        .ejar-client-account-head,
        .ejar-control-center-head
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 12px !important;
        text-align: left !important;
    }

    html body.ejar-responsive-ready :where(.ejar-dashboard-header h1, .ejar-page-hero h1, .ejar-agence-hero h1, .ejar-client-hero h1) {
        max-width: 100% !important;
        font-size: clamp(22px, 7vw, 30px) !important;
        line-height: 1.12 !important;
        overflow-wrap: anywhere !important;
    }

    html body.ejar-responsive-ready :where(
        .ejar-stats-grid,
        .ejar-stats-grid-v2,
        .ejar-dashboard-grid,
        .ejar-actions-grid,
        .ejar-tool-grid,
        .ejar-diagnostic-actions-grid,
        .ejar-diagnostic-checks,
        .ejar-parc-summary-grid,
        .ejar-parc-alert-grid,
        .ejar-parc-mini-alerts,
        .ejar-agence-kpi-grid,
        .ejar-agence-premium-summary,
        .ejar-agence-priority-grid,
        .ejar-agence-quick-grid,
        .ejar-agence-account-grid,
        .ejar-agence-filter-grid,
        .ejar-client-kpi-grid,
        .ejar-client-action-grid,
        .ejar-client-véhicules-grid,
        .ejar-client-finance-grid,
        .ejar-client-alert-grid,
        .ejar-client-info-grid,
        .ejar-client-doc-tools,
        .ejar-contrats-stats-grid,
        .ejar-contrats-principles,
        .ejar-contrats-annexes-grid,
        .ejar-form-grid,
        .ejar-form-grid-2,
        .ejar-form-grid-3,
        .ejar-form-grid-4,
        .ejar-contrats-grid,
        .ejar-edl-grid,
        .ejar-two-columns,
        .ejar-parc-two-columns,
        .ejar-sorties-grid,
        .ejar-sorties-add-grid,
        .ejar-sorties-filters,
        .ejar-smart-filter-panel,
        .ejar-control-center-head,
        .ejar-table-toolbar,
        .filter-bar,
        .ejar-inline-field-row,
        .ejar-edit-panels-grid,
        .ejar-inline-edit-grid
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-actions-stack, .ejar-inline-actions, .ejar-sorties-actions, .ejar-parc-actions, .ejar-parc-shortcuts, .ejar-agence-actions, .ejar-client-actions, .ejar-client-actions, .ejar-client-card-actions, .ejar-quick-search-actions, .ejar-admin-actions-row) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body.ejar-responsive-ready :where(.ejar-button, a.ejar-button, button.ejar-button, input[type="submit"].ejar-button, .ejar-sorties-button, .ejar-notification-button, .ejar-open-button, .ejar-delete-button, .ejar-relance-button, .ejar-reset-button, .ejar-button-light, .ejar-action-card-light) {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td :is(.ejar-button, a.ejar-button, button.ejar-button, input[type="submit"].ejar-button, .ejar-sorties-button, .ejar-notification-button, .ejar-open-button, .ejar-delete-button, .ejar-relance-button)) {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.ejar-responsive-ready :where(.ejar-bulk-field, .ejar-year-input, .ejar-table-control, .ejar-table-control-xs, .ejar-table-control-sm, .ejar-table-control-md, .ejar-table-control-lg) {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.ejar-responsive-ready .ejar-nested-group {
        margin-left: 0;
        padding-left: 12px;
        border-left: 2px solid rgba(212, 175, 55, .32);
    }

    html body.ejar-responsive-ready .ejar-nowrap-actions {
        white-space: normal;
    }


    html body.ejar-responsive-ready :where(.ejar-card-table-ready td, .ejar-card-table-ready th) {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 7px !important;
    }
}

@media (max-width: 520px) {
    html body.ejar-responsive-ready :where(
        .ejar-dashboard,
        .ejar-admin-page-shell,
        .ejar-admin-control-dashboard,
        .ejar-agence-dashboard,
        .ejar-agence-page-shell,
        .ejar-client-dashboard,
        .ejar-client-page-shell,
        .ejar-client-page-shell,
        .ejar-profile-page,
        .ejar-demand-response-page
    ) {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-card, .ejar-section, .ejar-form, .ejar-control-center, .ejar-sorties-panel, .ejar-client-panel, .ejar-agence-filter-panel, .ejar-edit-panel-card) {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-admin-nav a) {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* Bouton retour haut — conservé, isolé de la mise en page. */
html body.ejar-responsive-ready #ejar-scroll-top {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8b15a, #b8860b);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 35px rgba(0,0,0,0.18), inset 0 2px 8px rgba(255,255,255,0.25);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    border: 2px solid rgba(255,255,255,0.15);
    box-sizing: border-box;
}
html body.ejar-responsive-ready #ejar-scroll-top span {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-2px);
}
html body.ejar-responsive-ready #ejar-scroll-top.ejar-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (max-width: 782px) {
    html body.ejar-responsive-ready #ejar-scroll-top {
        width: 46px;
        height: 46px;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
    }
    html body.ejar-responsive-ready #ejar-scroll-top span { font-size: 24px; }
}

@media print {
    html body.ejar-responsive-ready :where(.ejar-generated-mobile-cards) { display: none !important; }
    html body.ejar-responsive-ready :where(table.ejar-responsive-table, table.ejar-card-table-ready) {
        display: table !important;
        width: 100% !important;
        overflow: visible !important;
        min-width: 0 !important;
    }
    html body.ejar-responsive-ready :where(table.ejar-responsive-table, table.ejar-card-table-ready) thead { display: table-header-group !important; }
    html body.ejar-responsive-ready :where(table.ejar-responsive-table, table.ejar-card-table-ready) tbody { display: table-row-group !important; }
    html body.ejar-responsive-ready :where(table.ejar-responsive-table, table.ejar-card-table-ready) tr { display: table-row !important; }
    html body.ejar-responsive-ready :where(table.ejar-responsive-table, table.ejar-card-table-ready) :where(th, td) { display: table-cell !important; }
}

/* ==========================================================
   14. Page publique "Créer mon espace E-Jar" — bloc unique isolé.
   IMPORTANT : cette page ne doit plus dépendre des shells admin/agence,
   ne doit plus utiliser 100vw, et ne doit jamais modifier les conteneurs
   du thème WordPress/Astra (#content, .entry-content, .site-content, etc.).
   ========================================================== */
html body.ejar-registration-context .ejar-registration-external-ghost,
html body.ejar-responsive-ready .ejar-registration-external-ghost {
    display: none !important;
    visibility: hidden !important;
}

html body.ejar-registration-context .ejar-public-register-shell,
html body.ejar-responsive-ready .ejar-public-register-shell {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: clamp(22px, 4vw, 48px) auto;
    padding: 0 clamp(16px, 3vw, 28px);
    color: #171717;
    -webkit-text-fill-color: initial;
    overflow: visible;
    transform: none;
}

html body.ejar-registration-context .ejar-public-register-shell,
html body.ejar-registration-context .ejar-public-register-shell *,
html body.ejar-responsive-ready .ejar-public-register-shell,
html body.ejar-responsive-ready .ejar-public-register-shell * {
    box-sizing: border-box;
}

html body.ejar-registration-context .ejar-public-register-layout,
html body.ejar-responsive-ready .ejar-public-register-layout {
    display: grid;
    grid-template-columns: minmax(300px, .92fr) minmax(420px, 1.08fr);
    align-items: stretch;
    gap: 22px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 18px;
    overflow: visible;
    border-radius: 30px;
    border: 1px solid rgba(212,175,55,.30);
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,250,241,.96));
    box-shadow: 0 22px 58px rgba(12,10,6,.12);
}

html body.ejar-registration-context .ejar-registration-hero,
html body.ejar-registration-context .ejar-registration-panel,
html body.ejar-responsive-ready .ejar-registration-hero,
html body.ejar-responsive-ready .ejar-registration-panel {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    overflow: visible;
}

html body.ejar-registration-context .ejar-registration-hero,
html body.ejar-responsive-ready .ejar-registration-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(26px, 3.2vw, 42px);
    background: radial-gradient(circle at 15% 0%, rgba(212,175,55,.30), transparent 34%), linear-gradient(135deg, #070707 0%, #151515 58%, #292929 100%);
    color: #fff;
    border: 1px solid rgba(212,175,55,.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

html body.ejar-registration-context .ejar-registration-brand,
html body.ejar-responsive-ready .ejar-registration-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 9px 15px;
    border-radius: 999px;
    background: var(--ejar-gold-gradient);
    color: #111;
    -webkit-text-fill-color: #111;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html body.ejar-registration-context .ejar-registration-hero h2,
html body.ejar-responsive-ready .ejar-registration-hero h2 {
    margin: 0;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: clamp(25px, 3vw, 39px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.035em;
    overflow-wrap: normal;
}

html body.ejar-registration-context .ejar-registration-benefits,
html body.ejar-responsive-ready .ejar-registration-benefits {
    display: grid;
    gap: 12px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

html body.ejar-registration-context .ejar-registration-benefits li,
html body.ejar-responsive-ready .ejar-registration-benefits li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 0;
    padding: 0;
    color: rgba(255,255,255,.88);
    -webkit-text-fill-color: rgba(255,255,255,.88);
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: normal;
}

html body.ejar-registration-context .ejar-registration-benefits li::before,
html body.ejar-responsive-ready .ejar-registration-benefits li::before {
    content: "◆";
    display: inline-block;
    color: var(--ejar-gold-2, #d4af37);
    -webkit-text-fill-color: var(--ejar-gold-2, #d4af37);
    font-size: 12px;
    line-height: 1.75;
}

html body.ejar-registration-context .ejar-registration-panel,
html body.ejar-responsive-ready .ejar-registration-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(24px, 3vw, 38px);
    background: #fff;
    border: 1px solid rgba(212,175,55,.18);
    box-shadow: 0 12px 34px rgba(12,10,6,.06);
    color: #181818;
    -webkit-text-fill-color: initial;
}

html body.ejar-registration-context .ejar-registration-head,
html body.ejar-responsive-ready .ejar-registration-head {
    display: grid;
    gap: 8px;
    margin: 0;
}

html body.ejar-registration-context .ejar-registration-eyebrow,
html body.ejar-responsive-ready .ejar-registration-eyebrow {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff7df;
    border: 1px solid rgba(212,175,55,.34);
    color: #6b4f0b;
    -webkit-text-fill-color: #6b4f0b;
    font-size: 12px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html body.ejar-registration-context .ejar-registration-panel h3,
html body.ejar-responsive-ready .ejar-registration-panel h3 {
    margin: 0;
    color: #121212;
    -webkit-text-fill-color: #121212;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -.03em;
}

html body.ejar-registration-context .ejar-registration-intro,
html body.ejar-responsive-ready .ejar-registration-intro {
    margin: 0;
    max-width: 58ch;
    color: #57534a;
    -webkit-text-fill-color: #57534a;
    font-size: 15px;
    line-height: 1.62;
}

html body.ejar-registration-context .ejar-registration-content,
html body.ejar-responsive-ready .ejar-registration-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

html body.ejar-registration-context .ejar-registration-content .ejar-alert,
html body.ejar-responsive-ready .ejar-registration-content .ejar-alert {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 15px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 750;
}

html body.ejar-registration-context .ejar-registration-content .ejar-alert:last-child,
html body.ejar-responsive-ready .ejar-registration-content .ejar-alert:last-child {
    margin-bottom: 0;
}

html body.ejar-registration-context .ejar-registration-connected-alert,
html body.ejar-responsive-ready .ejar-registration-connected-alert {
    background: #ecfdf3;
    border: 1px solid rgba(22, 163, 74, .30);
    color: #166534;
    -webkit-text-fill-color: #166534;
}

html body.ejar-registration-context .ejar-public-register-form,
html body.ejar-registration-context form.ejar-public-register-form,
html body.ejar-responsive-ready .ejar-public-register-form,
html body.ejar-responsive-ready form.ejar-public-register-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 15px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html body.ejar-registration-context .ejar-registration-field,
html body.ejar-responsive-ready .ejar-registration-field {
    display: grid;
    gap: 7px;
    align-content: start;
    min-width: 0;
}

html body.ejar-registration-context .ejar-registration-field label,
html body.ejar-responsive-ready .ejar-registration-field label {
    color: #211b12;
    -webkit-text-fill-color: #211b12;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 850;
}

html body.ejar-registration-context .ejar-registration-field input,
html body.ejar-registration-context .ejar-registration-field select,
html body.ejar-registration-context .ejar-registration-field textarea,
html body.ejar-responsive-ready .ejar-registration-field input,
html body.ejar-responsive-ready .ejar-registration-field select,
html body.ejar-responsive-ready .ejar-registration-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(120,103,69,.24);
    background: #fffdf8;
    color: #161616;
    -webkit-text-fill-color: #161616;
    font-size: 15px;
    line-height: 1.35;
    box-shadow: none;
}

html body.ejar-registration-context .ejar-registration-field input:focus,
html body.ejar-registration-context .ejar-registration-field select:focus,
html body.ejar-registration-context .ejar-registration-field textarea:focus,
html body.ejar-responsive-ready .ejar-registration-field input:focus,
html body.ejar-responsive-ready .ejar-registration-field select:focus,
html body.ejar-responsive-ready .ejar-registration-field textarea:focus {
    outline: none;
    border-color: rgba(212,175,55,.75);
    box-shadow: 0 0 0 3px rgba(212,175,55,.16);
}

html body.ejar-registration-context .ejar-registration-help,
html body.ejar-responsive-ready .ejar-registration-help {
    color: #746a5d;
    -webkit-text-fill-color: #746a5d;
    font-size: 12px;
    line-height: 1.45;
}


html body.ejar-registration-context .ejar-registration-followup-note,
html body.ejar-responsive-ready .ejar-registration-followup-note {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(212,175,55,.28);
    background: linear-gradient(135deg, #fffaf0, #ffffff);
    color: #5a4a2b;
    -webkit-text-fill-color: #5a4a2b;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 650;
}

html body.ejar-registration-context .ejar-honeypot-field,
html body.ejar-responsive-ready .ejar-honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

html body.ejar-registration-context .ejar-registration-field-role,
html body.ejar-registration-context .ejar-registration-field-full,
html body.ejar-registration-context .ejar-registration-submit,
html body.ejar-responsive-ready .ejar-registration-field-role,
html body.ejar-responsive-ready .ejar-registration-field-full,
html body.ejar-responsive-ready .ejar-registration-submit {
    grid-column: 1 / -1;
}

html body.ejar-registration-context .ejar-registration-submit,
html body.ejar-responsive-ready .ejar-registration-submit,
html body.ejar-registration-context .ejar-public-register-form button[type="submit"],
html body.ejar-responsive-ready .ejar-public-register-form button[type="submit"] {
    justify-self: start;
    width: auto;
    max-width: 100%;
    min-height: 48px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    white-space: normal;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 950;
}

/* Alignement desktop du formulaire d'inscription : rangées cohérentes et champs lisibles. */
@media (min-width: 921px) {
    html body.ejar-registration-context .ejar-public-register-shell,
    html body.ejar-responsive-ready .ejar-public-register-shell {
        max-width: 1120px;
    }

    html body.ejar-registration-context .ejar-registration-panel,
    html body.ejar-responsive-ready .ejar-registration-panel {
        align-self: stretch;
    }

    html body.ejar-registration-context .ejar-public-register-form,
    html body.ejar-registration-context form.ejar-public-register-form,
    html body.ejar-responsive-ready .ejar-public-register-form,
    html body.ejar-responsive-ready form.ejar-public-register-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    html body.ejar-registration-context .ejar-registration-field-role,
    html body.ejar-responsive-ready .ejar-registration-field-role {
        grid-column: 1 / -1;
    }

    html body.ejar-registration-context .ejar-registration-submit,
    html body.ejar-responsive-ready .ejar-registration-submit,
    html body.ejar-registration-context .ejar-public-register-form button[type="submit"],
    html body.ejar-responsive-ready .ejar-public-register-form button[type="submit"] {
        justify-self: stretch;
        width: 100%;
        grid-column: 1 / -1;
    }
}

@media (max-width: 920px) {
    html body.ejar-registration-context .ejar-public-register-shell,
    html body.ejar-responsive-ready .ejar-public-register-shell {
        max-width: 760px;
        padding-left: clamp(14px, 3vw, 22px);
        padding-right: clamp(14px, 3vw, 22px);
    }

    html body.ejar-registration-context .ejar-public-register-layout,
    html body.ejar-responsive-ready .ejar-public-register-layout {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
        border-radius: 26px;
    }

    html body.ejar-registration-context .ejar-registration-hero,
    html body.ejar-registration-context .ejar-registration-panel,
    html body.ejar-responsive-ready .ejar-registration-hero,
    html body.ejar-responsive-ready .ejar-registration-panel {
        border-radius: 22px;
    }
}

@media (max-width: 640px) {
    html body.ejar-registration-context .ejar-public-register-shell,
    html body.ejar-responsive-ready .ejar-public-register-shell {
        margin-top: 14px;
        margin-bottom: 22px;
        padding-left: 12px;
        padding-right: 12px;
    }

    html body.ejar-registration-context .ejar-public-register-layout,
    html body.ejar-responsive-ready .ejar-public-register-layout {
        padding: 9px;
        gap: 10px;
    }

    html body.ejar-registration-context .ejar-registration-hero,
    html body.ejar-registration-context .ejar-registration-panel,
    html body.ejar-responsive-ready .ejar-registration-hero,
    html body.ejar-responsive-ready .ejar-registration-panel {
        padding: 20px;
        border-radius: 20px;
    }

    html body.ejar-registration-context .ejar-public-register-form,
    html body.ejar-registration-context form.ejar-public-register-form,
    html body.ejar-responsive-ready .ejar-public-register-form,
    html body.ejar-responsive-ready form.ejar-public-register-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    html body.ejar-registration-context .ejar-registration-submit,
    html body.ejar-responsive-ready .ejar-registration-submit,
    html body.ejar-registration-context .ejar-public-register-form button[type="submit"],
    html body.ejar-responsive-ready .ejar-public-register-form button[type="submit"] {
        justify-self: stretch;
        width: 100%;
    }
}


/* ==========================================================
   15. Garde-fou thème WordPress/Astra limité au contexte E-Jar.
   Ce bloc reste volontairement non prioritaire : il corrige le logo uniquement
   lorsque la classe body E-Jar est présente, sans combattre le thème.
   ========================================================== */
html body.ejar-responsive-ready :where(
    #masthead .custom-logo-link,
    #masthead .site-logo-img,
    #masthead .ast-site-identity,
    .site-header .custom-logo-link,
    .site-header .site-logo-img,
    .site-header .ast-site-identity,
    .main-header-bar .site-branding,
    .ast-primary-header-bar .site-branding
) {
    max-width: 100%;
    min-width: 0;
}

html body.ejar-responsive-ready :where(
    #masthead img,
    #masthead .custom-logo,
    #masthead .custom-logo-link img,
    #masthead .site-logo-img img,
    #masthead .ast-site-identity img,
    header.site-header img,
    .wp-block-template-part header img,
    .site-header .custom-logo,
    .site-header .custom-logo-link img,
    .site-header .site-logo-img img,
    .site-header .ast-site-identity img,
    .main-header-bar .custom-logo,
    .main-header-bar .custom-logo-link img,
    .ast-primary-header-bar .custom-logo,
    .ast-primary-header-bar .custom-logo-link img
) {
    display: block;
    width: auto;
    max-width: min(620px, 70vw);
    max-height: 178px;
    height: auto;
    object-fit: contain;
}

html body.ejar-responsive-ready :where(
    #masthead .ast-container,
    #masthead .main-header-container,
    .site-header .ast-container,
    .main-header-bar .ast-container,
    .ast-primary-header-bar .ast-container
) {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

html body.ejar-responsive-ready :where(
    #masthead .main-header-bar,
    #masthead .ast-primary-header-bar,
    .site-header .main-header-bar,
    .site-header .ast-primary-header-bar
) {
    min-height: 0;
}

@media (max-width: 782px) {
    html body.ejar-responsive-ready :where(
        #masthead img,
        #masthead .custom-logo,
        #masthead .custom-logo-link img,
        #masthead .site-logo-img img,
        #masthead .ast-site-identity img,
        header.site-header img,
        .wp-block-template-part header img,
        .site-header .custom-logo,
        .site-header .custom-logo-link img,
        .site-header .site-logo-img img,
        .site-header .ast-site-identity img
    ) {
        max-width: min(420px, 82vw);
        max-height: 128px;
    }
}


/* ==========================================================
   E-Jar v3.1.100 — respiration visuelle globale des tableaux scellée.
   Objectif : rendre les listes admin/agence/client plus aérées,
   sans modifier la logique responsive en cartes déjà stabilisée.
   ========================================================== */
html body.ejar-responsive-ready :where(
    .ejar-responsive-scope,
    .ejar-dashboard,
    .ejar-admin-page-shell,
    .ejar-admin-control-dashboard,
    .ejar-agence-dashboard,
    .ejar-agence-page-shell,
    .ejar-client-dashboard,
    .ejar-client-page-shell,
    .ejar-financial-dashboard,
    .ejar-pointage-dashboard,
    .ejar-parc-dashboard,
    .ejar-entities-dashboard,
    .ejar-sorties-wrap,
    .ejar-livre-compte-dashboard,
    .ejar-livre-compte-premium-dashboard,
    .ejar-contrats-dashboard,
    .ejar-factures-dashboard
) {
    --ejar-table-cell-x: clamp(16px, 1.05vw, 24px);
    --ejar-table-cell-y: clamp(14px, .9vw, 20px);
    --ejar-table-head-x: clamp(16px, 1vw, 22px);
    --ejar-table-head-y: clamp(13px, .8vw, 17px);
    --ejar-table-row-gap: 8px;
    --ejar-table-line-height: 1.55;
    --ejar-table-button-gap: 10px;
}

@media (min-width: 1181px) {
    html body.ejar-responsive-ready :where(
        .ejar-responsive-table-wrap,
        .ejar-table-responsive,
        .ejar-mobile-scroll,
        .ejar-pointage-table-wrap,
        .ejar-parc-table-wrap,
        .ejar-finance-table-wrap,
        .ejar-livre-compte-table-wrap,
        .ejar-search-results-table-wrap,
        .ejar-table-scroll-fallback,
        .ejar-mobile-card-table-wrap
    ) {
        padding: 8px;
        background: linear-gradient(180deg, #fffdf7, #ffffff);
        border: 1px solid rgba(212, 175, 55, .22);
        border-radius: 24px;
        box-shadow: 0 12px 30px rgba(17, 17, 17, .045);
    }

    html body.ejar-responsive-ready :where(.ejar-sorties-scroll) {
        padding: 6px;
        border-radius: 22px;
        background: #fffdf7;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table,
        table.ejar-finance-table,
        table.ejar-pointage-paiements-table,
        table.ejar-parc-table,
        table.ejar-agence-accounts-table,
        table.ejar-agence-simple-table,
        table.ejar-agence-documents-table,
        table.ejar-agence-demandes-table,
        table.ejar-client-doc-table,
        table.ejar-client-demande-table,
        table.ejar-livre-compte-table,
        table.ejar-livre-compte-premium-table,
        table.ejar-sorties-summary-table,
        table.ejar-sorties-rent-table,
        .ejar-card:not(.ejar-no-card-table) table,
        .ejar-section:not(.ejar-no-card-table) table
    ) {
        border-collapse: separate;
        border-spacing: 0 var(--ejar-table-row-gap);
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table thead th,
        table.ejar-finance-table thead th,
        table.ejar-pointage-paiements-table thead th,
        table.ejar-parc-table thead th,
        table.ejar-agence-accounts-table thead th,
        table.ejar-agence-simple-table thead th,
        table.ejar-agence-documents-table thead th,
        table.ejar-agence-demandes-table thead th,
        table.ejar-client-doc-table thead th,
        table.ejar-client-demande-table thead th,
        table.ejar-livre-compte-table thead th,
        table.ejar-livre-compte-premium-table thead th,
        table.ejar-sorties-summary-table thead th,
        table.ejar-sorties-rent-table thead th,
        .ejar-card:not(.ejar-no-card-table) table thead th,
        .ejar-section:not(.ejar-no-card-table) table thead th
    ) {
        padding: var(--ejar-table-head-y) var(--ejar-table-head-x);
        line-height: 1.35;
        vertical-align: middle;
        border: 0;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-finance-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-pointage-paiements-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-parc-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-accounts-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-simple-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-documents-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-demandes-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-client-doc-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-client-demande-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-premium-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-sorties-summary-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-sorties-rent-table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-card:not(.ejar-no-card-table) table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-section:not(.ejar-no-card-table) table tbody tr:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td
    ) {
        padding: var(--ejar-table-cell-y) var(--ejar-table-cell-x);
        line-height: var(--ejar-table-line-height);
        vertical-align: middle;
        border-top: 1px solid rgba(17, 17, 17, .055);
        border-bottom: 1px solid rgba(17, 17, 17, .055);
        background: #ffffff;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-finance-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-pointage-paiements-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-parc-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-accounts-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-simple-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-documents-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-demandes-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-client-doc-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-client-demande-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-premium-table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-card:not(.ejar-no-card-table) table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-section:not(.ejar-no-card-table) table tbody tr:nth-child(even):not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td
    ) {
        background: #fff8ea;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-finance-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-pointage-paiements-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-parc-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-accounts-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-simple-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-documents-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-agence-demandes-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-client-doc-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        table.ejar-livre-compte-premium-table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-card:not(.ejar-no-card-table) table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td,
        .ejar-section:not(.ejar-no-card-table) table tbody tr:hover:not(.category-row):not(.type-entree):not(.type-sortie):not(.ejar-notification-row):not(.ejar-alert-row) td
    ) {
        background: #fff2cf;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody td:first-child,
        table.ejar-finance-table tbody td:first-child,
        table.ejar-pointage-paiements-table tbody td:first-child,
        table.ejar-parc-table tbody td:first-child,
        table.ejar-agence-accounts-table tbody td:first-child,
        table.ejar-agence-simple-table tbody td:first-child,
        table.ejar-agence-documents-table tbody td:first-child,
        table.ejar-agence-demandes-table tbody td:first-child,
        table.ejar-client-doc-table tbody td:first-child,
        table.ejar-client-demande-table tbody td:first-child,
        table.ejar-livre-compte-table tbody td:first-child,
        table.ejar-livre-compte-premium-table tbody td:first-child,
        .ejar-card:not(.ejar-no-card-table) table tbody td:first-child,
        .ejar-section:not(.ejar-no-card-table) table tbody td:first-child
    ) {
        border-left: 1px solid rgba(17, 17, 17, .055);
        border-radius: 18px 0 0 18px;
        padding-left: calc(var(--ejar-table-cell-x) + 4px);
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody td:last-child,
        table.ejar-finance-table tbody td:last-child,
        table.ejar-pointage-paiements-table tbody td:last-child,
        table.ejar-parc-table tbody td:last-child,
        table.ejar-agence-accounts-table tbody td:last-child,
        table.ejar-agence-simple-table tbody td:last-child,
        table.ejar-agence-documents-table tbody td:last-child,
        table.ejar-agence-demandes-table tbody td:last-child,
        table.ejar-client-doc-table tbody td:last-child,
        table.ejar-client-demande-table tbody td:last-child,
        table.ejar-livre-compte-table tbody td:last-child,
        table.ejar-livre-compte-premium-table tbody td:last-child,
        .ejar-card:not(.ejar-no-card-table) table tbody td:last-child,
        .ejar-section:not(.ejar-no-card-table) table tbody td:last-child
    ) {
        border-right: 1px solid rgba(17, 17, 17, .055);
        border-radius: 0 18px 18px 0;
        padding-right: calc(var(--ejar-table-cell-x) + 4px);
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table tbody td,
        table.ejar-agence-accounts-table tbody td,
        table.ejar-parc-table tbody td,
        table.ejar-pointage-paiements-table tbody td
    ) :where(strong, b) {
        line-height: 1.42;
    }

    html body.ejar-responsive-ready :where(
        .ejar-actions-stack,
        .ejar-inline-actions,
        .ejar-sorties-actions,
        .ejar-parc-actions,
        .ejar-agence-actions,
        .ejar-client-card-actions
    ) {
        gap: var(--ejar-table-button-gap);
    }

    html body.ejar-responsive-ready :where(td, th, .ejar-actions-cell) :where(
        .ejar-button,
        a.ejar-button,
        button.ejar-button,
        input[type="submit"].ejar-button,
        .ejar-sorties-button,
        .ejar-notification-button,
        .ejar-open-button,
        .ejar-delete-button,
        .ejar-relance-button
    ) {
        min-height: 42px;
        padding: 10px 16px;
        border-radius: 15px;
        line-height: 1.2;
        margin: 0;
    }

    html body.ejar-responsive-ready :where(
        .ejar-status-badge,
        .ejar-date-badge,
        .ejar-balance-badge,
        .ejar-agence-pill,
        .ejar-societe-badge
    ) {
        padding: 8px 13px;
        line-height: 1.2;
        border-radius: 999px;
    }

    html body.ejar-responsive-ready :where(
        .ejar-agence-accounts-table td small,
        .ejar-table td small,
        .ejar-card table td small,
        .ejar-section table td small
    ) {
        display: inline-block;
        margin-top: 4px;
        line-height: 1.45;
    }
}

/* E-Jar v3.1.100 — doublon d’aération mobile fusionné dans le bloc principal. */


/* E-Jar v3.1.100 — préservation des couleurs métier après aération. */
html body.ejar-responsive-ready :where(.ejar-sorties-table tr.category-row td) {
    background: #f2e6d3;
    color: #171717;
    -webkit-text-fill-color: #171717;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}
html body.ejar-responsive-ready :where(.ejar-sorties-table tr.type-entree td) {
    background: #f1fbf4;
}
html body.ejar-responsive-ready :where(.ejar-sorties-table tr.type-sortie td) {
    background: #fffafa;
}
html body.ejar-responsive-ready :where(.ejar-notification-row td) {
    background: #fff7ed;
}
html body.ejar-responsive-ready :where(.ejar-notification-row:hover td) {
    background: #ffedd5;
}

/* Mission 14 — Navigation groupée : comportement tablette/mobile */
@media (max-width: 1180px) {
    html body.ejar-responsive-ready .ejar-admin-nav.ejar-admin-nav-grouped {
        align-items: center;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-groups {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-group {
        flex: 0 0 auto;
        align-items: center;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-group-links {
        flex-wrap: nowrap;
    }
}

@media (max-width: 640px) {
    html body.ejar-responsive-ready .ejar-admin-nav.ejar-admin-nav-grouped {
        gap: 8px;
        padding: 8px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-group {
        gap: 6px;
        padding: 5px;
        border-radius: 18px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-group-title {
        min-height: 30px;
        padding: 0 8px;
        font-size: 9px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav.ejar-admin-nav-grouped a.ejar-admin-nav-link {
        min-height: 34px;
        padding: 8px 10px;
        font-size: 12px;
    }
}



/* Mission 17D — off-canvas admin nav overrides responsive legacy group rules */
@media (max-width: 1180px) {
    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-pill {
        display: flex;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-groups {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        justify-content: stretch;
        flex: none;
        gap: 12px;
        width: 100%;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-group {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        padding: 13px;
        border-radius: 22px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-group-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        flex-wrap: initial;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode a.ejar-admin-nav-link {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-pill {
        gap: 8px;
        padding: 6px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-brand {
        min-height: 38px;
        padding: 7px 10px;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-brand span {
        display: none;
    }

    html body.ejar-responsive-ready .ejar-admin-nav-offcanvas-mode .ejar-admin-nav-group-title {
        min-height: 0;
        padding: 0;
        font-size: 11px;
    }
}

/* E-Jar Mission 17F — respiration mobile/tablette.
 * Garde l’interface compacte sur petit écran sans coller les contenus aux bords.
 */
@media (max-width: 782px) {
    html body.ejar-responsive-ready {
        --ejar-card-padding: clamp(16px, 4vw, 22px);
        --ejar-card-padding-sm: clamp(14px, 3.6vw, 18px);
        --ejar-content-gap: 12px;
        --ejar-section-gap: 16px;
    }

    html body.ejar-responsive-ready :where(
        .ejar-card,
        .ejar-section,
        .ejar-form,
        .ejar-control-center,
        .ejar-tool-section,
        .ejar-tool-card,
        .ejar-subtabs-card,
        .ejar-parc-tabs-card,
        .ejar-parc-search-card,
        .ejar-smart-filter-panel,
        .ejar-sorties-panel,
        .ejar-agence-filter-panel,
        .ejar-agence-account-section,
        .ejar-agence-account-detail,
        .ejar-client-panel,
        .ejar-edit-panel-card,
        .ejar-contrats-intro,
        .ejar-contrats-legal-details,
        .ejar-dashboard .filter-bar,
        .ejar-admin-page-shell .filter-bar,
        .ejar-agence-page-shell .filter-bar,
        .ejar-client-page-shell .filter-bar
    ) {
        padding: var(--ejar-card-padding) !important;
        border-radius: 18px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-alert, .ejar-help-text-block, .ejar-admin-help-text, .ejar-action-card-light, .ejar-client-action-card, .ejar-agence-quick-card) {
        padding: var(--ejar-card-padding-sm) !important;
    }

    html body.ejar-responsive-ready :where(.ejar-dashboard-header, .ejar-page-hero, .ejar-agence-hero, .ejar-client-home, .ejar-auth-alert-page) {
        padding: clamp(20px, 5vw, 28px) !important;
        border-radius: 20px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-subtabs, .ejar-parc-tabs, .ejar-edit-tabs, .ejar-parc-shortcuts, .ejar-client-actions) {
        gap: 8px !important;
    }

    html body.ejar-responsive-ready :where(.ejar-subtab, .ejar-parc-tab, .ejar-edit-tab, .ejar-button, .ejar-button-light) {
        min-height: 40px;
        padding-left: 12px;
        padding-right: 12px;
    }

    html body.ejar-responsive-ready :where(.ejar-card-table-ready td, .ejar-card-table-ready th) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}



/* ==========================================================
   E-Jar v3.1.116 — Mission 17O : vérification responsive globale
   Tables admin / agence / client : scroll propre, lisibilité mobile,
   sans modifier les calculs ni les données.
   ========================================================== */
@media (max-width: 1180px) {
    html body.ejar-responsive-ready :where(
        .ejar-admin-page-shell,
        .ejar-agence-page-shell,
        .ejar-client-page-shell,
        .ejar-client-page-shell,
        .ejar-dashboard,
        .ejar-responsive-scope
    ) :where(.ejar-responsive-table-wrap, .ejar-table-responsive, .ejar-sorties-scroll) {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-table,
        table.ejar-finance-table,
        table.ejar-pointage-paiements-table,
        table.ejar-parc-table,
        table.ejar-documents-bulk-table,
        table.ejar-livre-compte-table,
        table.ejar-livre-compte-premium-table,
        table.ejar-agence-accounts-table,
        table.ejar-agence-simple-table,
        table.ejar-agence-documents-table,
        table.ejar-agence-demandes-table,
        table.ejar-client-véhicule-table,
        table.ejar-client-finance-table,
        table.ejar-client-doc-table,
        table.ejar-client-demande-table,
        table.ejar-sorties-summary-table,
        table.ejar-sorties-rent-table,
        table.ejar-sorties-table
    ) {
        min-width: max-content;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-client-véhicule-table,
        table.ejar-client-finance-table,
        table.ejar-agence-accounts-table,
        table.ejar-client-doc-table,
        table.ejar-client-demande-table,
        table.ejar-agence-documents-table,
        table.ejar-agence-demandes-table,
        table.ejar-agence-simple-table
    ) {
        min-width: 860px;
    }

    html body.ejar-responsive-ready :where(
        table.ejar-parc-table,
        table.ejar-documents-bulk-table,
        table.ejar-finance-table,
        table.ejar-livre-compte-table,
        table.ejar-livre-compte-premium-table,
        table.ejar-pointage-paiements-table
    ) {
        min-width: 980px;
    }
}

@media (max-width: 760px) {
    html body.ejar-responsive-ready :where(
        table.ejar-client-véhicule-table,
        table.ejar-client-finance-table,
        table.ejar-agence-accounts-table,
        table.ejar-client-doc-table,
        table.ejar-client-demande-table,
        table.ejar-agence-documents-table,
        table.ejar-agence-demandes-table,
        table.ejar-agence-simple-table
    ) {
        min-width: 760px;
    }

    html body.ejar-responsive-ready :where(.ejar-responsive-table-wrap, .ejar-table-responsive, .ejar-sorties-scroll)::after {
        content: "Glissez horizontalement pour voir toutes les colonnes";
        display: block;
        padding: 8px 4px 0;
        color: var(--ejar-muted);
        font-size: 12px;
        font-weight: 850;
    }
}
