/* ================================================================
   Rubrique Journaux (comptabilité générale et modèle du cabinet) :
   liste des journaux, fiche journal, fiche famille de journaux.
   Tous les sélecteurs sont sous .jx-root (racine de chaque vue).
   ================================================================ */

/* ── Liste : entêtes sur deux lignes plutôt que superposées ── */
.jx-root .ax-table-head thead th {
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.25;
}

/* ── Liste : largeur minimale + défilement horizontal commun (entête et corps défilent ensemble) ── */
.jx-root .ax-table-border {
    overflow-x: auto;
    overflow-y: hidden;
}
.jx-root .jx-liste .ax-table-head-wrap,
.jx-root .jx-liste .ax-table-body-scroll {
    min-width: 1080px;
}
.jx-root .jx-liste-modele .ax-table-head-wrap,
.jx-root .jx-liste-modele .ax-table-body-scroll {
    min-width: 900px;
}

/* ── Compte affecté : numéro + libellé sur deux lignes voulues.
   Libellé en gris ardoise foncé (#475569, contraste ≈ 7:1 sur blanc) : l'ancien gris clair (--ax-text-muted, ≈ 2,5:1)
   était difficile à lire, surtout sur les lignes alternées. ── */
.jx-root .ax-table tbody td.jx-compte {
    height: auto;
    line-height: 1.3;
    padding-top: 6px;
    padding-bottom: 6px;
}
.jx-root .jx-compte-libelle {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    color: #475569;
}

/* ── Nature du journal : pastilles Banque / Caisse, À nouveau, Vente, Achat ── */
.jx-root .jx-nature {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}
.jx-root .jx-nature .ax-badge {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.jx-root .jx-nature .fa-lock {
    margin-left: 4px;
}

/* ── Numérotation : la pastille suit la largeur de la colonne (le DS impose 140 px minimum) ── */
.jx-root .ax-badge-numerotation {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Fiche : case non cliquable (grisée, pointillés, cadenas, curseur interdit) ── */
.jx-root .ax-form-check-card.jx-case-off {
    position: relative;
    padding-right: 32px;
    border-style: dashed;
    border-color: #d5dbe3;
    background: var(--ax-bg-subtle, #f5f6f8);
    box-shadow: none;
    cursor: not-allowed;
}
.jx-root .ax-form-check-card.jx-case-off:hover {
    border-color: #d5dbe3;
    box-shadow: none;
}
.jx-root .ax-form-check-card.jx-case-off md-checkbox {
    cursor: not-allowed;
    opacity: .55;
}
.jx-root .ax-form-check-card.jx-case-off::after {
    content: "\f023"; /* fa-lock */
    font-family: FontAwesome;
    position: absolute;
    right: 12px;
    font-size: 13px;
    color: #94a3b8;
}

/* ── Fiche : « Affectation compte » = un champ de la hauteur des autres (38 px) et son bouton « Choisir » accolé (CT-10) ── */
.jx-root .jx-compte-picker {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 38px;
    border: 1px solid var(--ax-border-input, #cbd5e1);
    border-radius: var(--ax-radius-sm, 8px);
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jx-root .jx-compte-picker:hover {
    border-color: var(--ax-primary, #3f51b5);
}
.jx-root .jx-compte-picker:focus-within {
    border-color: var(--ax-primary, #3f51b5);
    box-shadow: 0 0 0 3px rgba(var(--ax-primary-rgb, 63, 81, 181), .15);
}
.jx-root .jx-compte-picker-champ {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 14px;
    color: var(--ax-text, #1e293b);
    cursor: pointer;
}
.jx-root .jx-compte-picker-champ:focus {
    outline: none;
}
.jx-root .jx-compte-picker-icone {
    color: #94a3b8;
    font-size: 14px;
}
.jx-root .jx-compte-picker-numero {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: var(--ax-radius-xs, 6px);
    background: var(--ax-primary-50, #e8eaf6);
    color: var(--ax-primary-dark, #303f9f);
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.jx-root .jx-compte-picker-libelle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jx-root .jx-compte-picker-vide {
    color: #94a3b8;
}
.jx-root .jx-compte-picker-retirer {
    flex-shrink: 0;
    width: 38px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}
.jx-root .jx-compte-picker-retirer:hover,
.jx-root .jx-compte-picker-retirer:focus {
    outline: none;
    color: var(--ax-danger, #dc2626);
    background: #fef2f2;
}
.jx-root .jx-compte-picker-choisir {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 0;
    border-left: 1px solid var(--ax-border-input, #cbd5e1);
    background: #fff;
    color: var(--ax-primary, #3f51b5);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}
.jx-root .jx-compte-picker-choisir:hover,
.jx-root .jx-compte-picker-choisir:focus {
    outline: none;
    background: var(--ax-primary-50, #e8eaf6);
}
.jx-root .jx-compte-picker-alerte {
    margin: 6px 0 0;
    font-size: 13px;
    color: #b45309;
}

/* Fiche famille : bloc trésorerie masqué pour une famille à nouveau, avec une animation douce
   (hauteur + opacité). overflow visible une fois déplié : la liste déroulante nya-bs-select n'est pas coupée. */
.jx-root .jx-repliable {
    max-height: 260px;
    opacity: 1;
    overflow: visible;
    transition: max-height .3s ease, opacity .25s ease, margin .3s ease;
}
.jx-root .jx-repliable.jx-replie {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
}
