/*
 * Styles spécifiques à l'application Solvea.
 *
 * Le style structurel et les composants du framework sont fournis par Zen.
 * Utiliser ce fichier uniquement pour l'identité visuelle ou les adaptations
 * propres à cette application.
 *
 * Migration en cours : certaines règles historiques génériques peuvent encore
 * être candidates à un déplacement vers Zen après preuve runtime dédiée.
 */

.groupCriteria {
    padding: 4px;
    display: flex;
    flex-direction: row;
    flex-grow: 0;
    border: 1px solid darkgray;
    align-items: anchor-center;
    background: white;
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 4px 4px 0px 0px;
}
/*.settingGrid {
    display: flex;
    flex-direction: row;
    padding: 4px;
    flex-grow: 0;*/
/* border: 1px solid darkgray; */
/*align-items: anchor-center;
    background: white;
    position: absolute;
    right: 1px;
    top: 1;
    bottom: 1;
}*/


.settingGrid [data-popup-scope="grid"] {
    position: relative;
}

/*@media (max-width: 640px) {
    #gridMenuSettings.menuSettingsPopup {
        left: auto !important;
        right: 0 !important;
        top: calc(100% + 6px) !important;
        width: 220px;
        max-width: calc(100vw - 16px);
    }
}*/


/* gestion resultat calcul acier */
.calculing {
    position: absolute;
    align-self: center;
    justify-self: anchor-center;
}


.myCellOK {
    background: var(--zen-theme-success, green);
    --zen-ctrl-color: white;
    color: white;
}

.myCellWarning {
    background: var(--zen-theme-warning, orange);
    --zen-ctrl-color: white;
    color: white;
}

.myCellNOK {
    background: var(--zen-theme-danger, red);
    --zen-ctrl-color: white;
    color: white;
}

/* grille principale */
.rg-resultGrid {
    display: flex;
    width: 100%;
    align-items: stretch;
    width: max-content;
    min-width: 100%;
}

.rg-resultFixed {
    display: grid;
    grid-template-columns: 60px 190px;
    grid-auto-rows: 20px;
    flex: 0 0 auto;
    border-right: 1px solid var(--zen-theme-border, #ccc);
    border-top: 1px solid var(--zen-theme-border, #ccc);
}

.rg-resultScroll {
    display: grid;
    grid-template-columns:
        minmax(140px, 1fr)
        minmax(140px, 1fr)
        minmax(140px, 1fr)
        minmax(190px, 1.25fr)
        minmax(190px, 1.25fr);
    grid-auto-rows: 32px;
    overflow-x: auto;
    overflow-y: visible;
    flex: 1 1 auto;
    min-width: 0;
    border-left: 1px solid var(--zen-theme-border, #ccc);
    border-top: 1px solid var(--zen-theme-border, #ccc);
}

    .rg-resultFixed > div,
    .rg-resultScroll > * {
        display: flex;
        align-items: center;
        padding: 0 6px;
        box-sizing: border-box;
    }

    .rg-resultScroll > .rg-headerCell {
        border-bottom: 1px solid var(--zen-theme-border-strong, #aaa);
    }

.rg-resultGrid {
    --rg-header-height: 30px;
    --rg-row-height: 20px;
}

.rg-resultFixed,
.rg-resultScroll {
    grid-template-rows: var(--rg-header-height);
    grid-auto-rows: var(--rg-row-height);
}

.rg-headerCell {
    white-space: nowrap;
    line-height: 1.1;
    min-width: 0;
    overflow-wrap: normal;
}

.mobile .rg-resultGrid {
    --rg-header-height: 60px;
    --rg-row-height: 30px;
}

.mobile .rg-resultScroll {
    grid-template-columns: 100px 100px 100px 150px 150px;
}

.mobile .rg-headerCell {
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.mobile .rg-labelCell {
    white-space: normal;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.mobile .rg-resultFixed > div,
.mobile .rg-resultScroll > * {
    padding-left: 4px;
    padding-right: 4px;
}

    .rg-resultScroll mynumericbox,
    .rg-resultScroll .myNumericBox {
        height: 100%;
        min-height: 0;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: end;
        padding-right: 4px !important;
        width: 100%
    }

    .rg-resultScroll > * {
        border-right: 1px solid var(--zen-theme-border, #ccc);
        border-bottom: 1px solid var(--zen-theme-border, #ccc);
    }

    .rg-resultFixed > * {
        border-bottom: 1px solid var(--zen-theme-border, #ccc);
        border-left: 1px solid var(--zen-theme-border, #ccc);
        padding: 4px 6px;
        white-space: nowrap;
    }

.rg-labelCell {
    text-align: left;
    padding-left: 8px;
    background: var(--zen-theme-surface-muted, #f5f5f5);
}

.rg-headerCell {
    background: var(--zen-theme-surface-muted, #fafafa);
}

.rg-section-elu {
    grid-row: span 8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--zen-theme-surface-muted, #f5f5f5);
    border-bottom: 1px solid var(--zen-theme-border, #ccc);
}

.rg-section-elu-acc {
    grid-row: span 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--zen-theme-surface-muted, #f5f5f5);
}

.rg-section-els {
    grid-row: span 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--zen-theme-surface-muted, #f5f5f5);
}

.rg-sectionCell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: var(--zen-theme-surface-muted, #f5f5f5);
}

.rg-resultWrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

/* mobile */

.mobile .rg-resultWrapper {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile .rg-resultGrid {
    display: flex;
    width: 100%;
    min-width: 0;
}

.mobile .rg-resultFixed {
    grid-template-columns: 60px 130px;
    flex: 0 0 auto;
}

.mobile .rg-resultScroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: calc(100vw - 215px);
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    display: grid;
    width: max-content;
    flex: 1 1 auto;
}

.mobile,
.mobile body,
.mobile .rg-resultWrapper,
.mobile .rg-resultGrid {
    overflow-x: hidden;
}

/* popup recherche */



/* ===== Ligne Affaire ===== */

.affaire-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*    padding: 10px 12px;*/
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

    .affaire-row:hover {
        background: var(--zen-theme-hover-bg, #f5f9ff);
    }


.affaire-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.affaire-line1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.affaire-num {
    font-weight: 600;
    color: var(--zen-theme-text, #2b4a6f);
    white-space: nowrap;
}

.affaire-libelle {
    font-weight: 500;
    color: var(--zen-theme-text, #222);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affaire-line1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.affaire-num {
    display: inline-block;
    min-width: 110px; /* 🔑 largeur stable pour tous les numéros */
    text-align: left;
    font-weight: 600;
    color: var(--zen-theme-text, #2b4a6f);
    white-space: nowrap;
}


.affaire-libelle {
    font-weight: 500;
    color: var(--zen-theme-text, #222);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affaire-line2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--zen-theme-text-muted, #666);
}

.affaire-sep {
    color: var(--zen-theme-text-muted, #999);
}

.affaire-chantier {
    font-weight: 400;
}

.affaire-client {
    font-style: italic;
}

.affaire-status {
    flex: 0 0 60px; /* largeur fixe */
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.statut {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.statut-en-cours {
    background: #dff5ea;
    color: #1e7f4d;
}

.statut-clos {
    background: #eeeeee;
    color: #555;
}

.statut-annule {
    background: #fde2e2;
    color: #a02020;
}

.statut-autre {
    background: #fff3cd;
    color: #8a6d3b;
}

.affaire-row.selected {
    background: var(--zen-theme-selection-bg, #cfe9ff);
    border-left: 4px solid var(--zen-theme-selection-accent, #2a7cff);
}


.grid .row-template .cell {
    border: none;
}

@media (max-width: 768px) {
    .affaire-libelle {
        white-space: normal; /* 🔓 autorise retour à la ligne */
        overflow: hidden;
        text-overflow: initial;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2; /* 🔑 2 lignes max */

        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.3;
    }
}


/* row contact */
.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

/* Colonne gauche */
.contact-left {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Icônes */
.contact-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Bloc principal */
.contact-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ligne identité */
.contact-line1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-civilite {
    background: var(--zen-theme-surface-muted, #eef2f7);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--zen-theme-text-muted, #555);
}

.contact-prenom {
    font-weight: 500;
    color: var(--zen-theme-text, #444);
}

.contact-nom {
    font-weight: 600;
    font-size: 1.05rem;
}

/* Fonction */
.contact-line2 {
    font-size: 0.85rem;
    color: var(--zen-theme-text-muted, #666);
}

/* Coordonnées */
.contact-line3 {
    font-size: 0.8rem;
    color: var(--zen-theme-text, #444);
    display: flex;
    gap: 14px;
}

.principal-badge {
    background: #ffd24d;
    color: #7a5500;
    padding: 3px 9px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 10px;
    width: 30px;
    height: 30px;
    gap: 0.5rem;
    display: flex;
    justify-content: center;
}

.contact-item {
    display: inline-flex; /* ou flex */
    align-items: center; /* <- alignement vertical */
    gap: 6px;
}

/* calcul row */
/* Ligne 1 : identité */
.user-name {
    font-weight: 500;
    color: #222;
}

/* Ligne 2 : statuts */
/* row client */
.client-row {
    display: flex;
    padding: 8px 10px;
    gap: 10px;
}

.client-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ligne 1 */
.client-line1 {
    display: flex;
    gap: 10px;
    align-items: center;
}

.client-nom {
    font-weight: 600;
    font-size: 1.05rem;
}

.client-type {
    background: var(--zen-theme-surface-muted, #eef2f7);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--zen-theme-text-muted, #555);
}

/* Ligne 2 */
.client-line2 {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 6px;
}

/* Ligne 3 */
.client-line3 {
    font-size: 0.85rem;
    color: #444;
}

/* Statut */
.client-status {
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.litige-on {
    background: #ffd6d6;
    color: #b40000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.client-line2,
.client-line3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--zen-theme-text-muted, #555);
}

.client-icon {
    opacity: 0.6;
    font-size: 0.9rem;
    min-width: 16px;
    text-align: center;
}

.client-adresse {
    color: var(--zen-theme-text, #444);
}

.client-cp,
.client-ville {
    color: var(--zen-theme-text-muted, #666);
}

/* Les contrôles readonly sont rendus dans leurs propres wrappers :
   on force ici l'espace visuel CP / Ville au lieu de dépendre du gap parent. */
.client-ville {
    padding-left: 7px;
}

.client-contact-nom {
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 500;
    color: var(--zen-theme-text, #333);
    white-space: nowrap;
    overflow: hidden;
}

    .client-contact-nom .myTextBox {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.client-contact-fct {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--zen-theme-text-muted, #777);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
}

    .client-contact-fct .myTextBox {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.client-row.litige-row {
    border-left: 4px solid #d9534f;
    background: linear-gradient(to right, #fff5f5, transparent 120px);
}

.litige-on {
    background: #ffe5e5;
    color: #b40000;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}


/* NumericThreshold */


/*****un peu de couleur pour le ribbon */
/* =========================
   Ribbon icon colors
========================= */

/* Ajouter / Nouveau */
.ribbon .fa-plus,
.myRibbon .fa-plus {
    color: var(--zen-theme-action, #0F6CB7);
}

/* Modifier */
.ribbon .fa-pen,
.ribbon .fa-pencil,
.myRibbon .fa-pen,
.myRibbon .fa-pencil {
    color: var(--zen-theme-action, #0F6CB7);
}

/* Enregistrer / Valider */
.ribbon .fa-save,
.ribbon .fa-floppy-disk,
.ribbon .fa-check,
.myRibbon .fa-save,
.myRibbon .fa-floppy-disk,
.myRibbon .fa-check {
    color: var(--zen-theme-success, #198754);
}

/* Supprimer */
.ribbon .fa-trash,
.ribbon .fa-trash-can,
.myRibbon .fa-trash,
.myRibbon .fa-trash-can {
    color: var(--zen-theme-danger, #dc3545);
}

/* Annuler / Retour */
.ribbon .fa-undo,
.ribbon .fa-rotate-left,
.ribbon .fa-arrow-left,
.myRibbon .fa-undo,
.myRibbon .fa-rotate-left,
.myRibbon .fa-arrow-left {
    color: var(--zen-theme-text-muted, #6c757d);
}

/* Options / Paramètres */
.ribbon .fa-gear,
.ribbon .fa-cog,
.ribbon .fa-sliders,
.myRibbon .fa-gear,
.myRibbon .fa-cog,
.myRibbon .fa-sliders {
    color: var(--zen-theme-text-muted, #495057);
}

/* Export */
.ribbon .fa-file-export,
.ribbon .fa-file-arrow-down,
.ribbon .fa-download,
.myRibbon .fa-file-export,
.myRibbon .fa-file-arrow-down,
.myRibbon .fa-download {
    color: var(--zen-theme-action, #0d6efd);
}

/* Documents Word */
.ribbon .fa-file-word,
.myRibbon .fa-file-word {
    color: #2b579a;
}

/* Recherche */
.ribbon .fa-search,
.ribbon .fa-magnifying-glass,
.myRibbon .fa-search,
.myRibbon .fa-magnifying-glass {
    color: var(--zen-theme-action, #0F6CB7);
}

/* Lecture / visibilité */
.ribbon .fa-eye,
.myRibbon .fa-eye {
    color: var(--zen-theme-action, #198754);
}

/* Menu */
.ribbon .fa-bars,
.myRibbon .fa-bars {
    color: var(--zen-theme-text-muted, #374151);
}

#onlyOffice {
    height: 100%;
    width: 100%;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

    #onlyOffice.onlyoffice-visible {
        display: flex !important;
    }

.onlyoffice-header {
    flex: 0 0 40px;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #0F6CBD;
    color: white;
    line-height: normal;
    padding: 0 8px;
    box-sizing: border-box;
}

.onlyoffice-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#cmdFermerOnlyOffice {
    flex: 0 0 auto;
}

#editor {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
}



/* =========================================================
   TEMPLATE ROW — SOCLE COMMUN
   ========================================================= */

.zen-template-row-decorator {
    display: block;
    width: 100%;
    min-width: 0;
}

/* ==========================================================================
   SOLVEA APPLICATION THEME - TEMPLATE ROW STANDARD

   ACTIF - NE PAS SUPPRIMER ET NE PAS MIGRER VERS ZEN PAR DEFAUT.

   Les classes .zen-template-row* definissent la presentation standard des
   TemplateRow utilises par les grilles Solvea. Elles donnent un langage
   visuel coherent aux lignes de grilles des differents modules.

   Le prefixe "zen-" indique ici le mecanisme de rendu (TemplateRow / grille),
   pas le proprietaire du style.

   Ce bloc peut contenir plusieurs variantes de .zen-template-row, notamment
   une regle principale et des variantes responsives.

   Proprietaire : Solvea / APPLICATION_THEME
   Role         : presentation standard des TemplateRow Solvea
   Etat         : actif
   ========================================================================== */
.zen-template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 1rem;
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    background: var(--zen-template-row-background, var(--zen-theme-surface, #ffffff));
    border: 1px solid var(--zen-template-row-border, var(--zen-theme-border, #d9e0e8));
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
    height: stretch;
    box-sizing: border-box;
}

    .zen-template-row:hover {
        background: var(--zen-template-row-hover-background, var(--zen-theme-hover-bg, #f8fbfe));
        border-color: var(--zen-template-row-hover-border, var(--zen-theme-border-strong, #b9ccdf));
        box-shadow: 0 2px 5px rgb(0 0 0 / 7%);
    }

.zen-template-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.zen-template-row__headline {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
}

.zen-template-row__reference {
    flex: 0 0 auto;
    color: var(--zen-theme-text, #26394d);
    font-weight: 600;
    white-space: nowrap;
}

.zen-template-row__title {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--zen-theme-text, #1f2f40);
    font-weight: 600;
    font-size: 1rem;
}

.zen-template-row__details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

/* A direct details block is a full-width second row below the optional aside. */
.zen-template-row > .zen-template-row__details {
    grid-column: 1 / -1;
}

.zen-template-row__line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    /*min-width: 0;*/
    width: 100%;
    color: var(--zen-theme-text-muted, #526273);
    font-size: 0.92rem;
}

.zen-template-row__icon {
    flex: 0 0 1.1rem;
    width: 1.1rem;
    color: var(--zen-theme-text-muted, #4f7192);
    text-align: center;
}

.zen-template-row__label {
    flex: 0 0 auto;
    color: var(--zen-theme-text-muted, #738191);
    font-size: 0.85rem;
}

.zen-template-row__value {
    min-width: 0;
}

.zen-template-row__separator {
    flex: 0 0 auto;
    color: var(--zen-theme-text-muted, #9ba6b1);
}

.zen-template-row__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    min-width: max-content;
}

.zen-template-row__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    padding: 0.15rem 0.65rem;
    color: var(--zen-theme-text-muted, #40536a);
    background: var(--zen-theme-surface-muted, #edf3f8);
    border: 1px solid var(--zen-theme-border, #d9e4ed);
    border-radius: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.zen-template-row__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--zen-theme-text-muted, #778492);
    font-size: 0.78rem;
}

.zen-template-row__meta-line {
    display: grid;
    grid-template-columns: 2.8rem auto auto;
    align-items: center;
    gap: 0.35rem;
}

.zen-template-row__meta-label {
    color: var(--zen-theme-text-muted, #8995a1);
}


/* =========================================================
   CONTRÔLES READONLY DANS LES TEMPLATE ROW
   ========================================================= */

.zen-template-row mytextbox,
.zen-template-row mydropdown,
.zen-template-row mydatetime,
.zen-template-row mycheckbox {
    display: block;
    width: 100%;
    min-width: 0;
}

.zen-template-row .myTextBox,
.zen-template-row .myDropdown,
.zen-template-row .myDateTime,
.zen-template-row .myCheckbox {
    width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    color: inherit;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    line-height: 1.35;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .zen-template-row {
        gap: 0.45rem 0.65rem;
        padding: 0.65rem 0.7rem;
    }

    .zen-template-row__headline {
        flex-wrap: wrap;
        gap: 0.2rem 0.65rem;
    }

    /*    .zen-template-row__title {
        flex-basis: 12rem;
    }*/

    .zen-template-row__line {
        align-items: flex-start;
    }

    .zen-template-row__aside {
        gap: 0.3rem;
    }

    .zen-template-row__meta-line {
        grid-template-columns: 2.3rem auto;
    }

    .zen-template-row__meta-user {
        grid-column: 2;
    }
}

/* =========================================================
   TEMPLATE ROW — CALCUL / AFFAIRE
   ========================================================= */

.zen-template-row--calcul {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
}

    .zen-template-row--calcul .zen-template-row__calcul-headline {
        align-items: center;
    }

    .zen-template-row--calcul .zen-template-row__badge {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .zen-template-row--calcul .zen-template-row__calcul-title {
        flex: 0 0 auto;
        padding-right: 0.25rem;
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .zen-template-row--calcul .zen-template-row__line--observation,
    .zen-template-row--calcul .zen-template-row__line--meta {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
    }

        /* En lecture, myTextBox marque une valeur vide par is-placeholder.
   Une observation vide ne laisse donc ni icône ni ligne fantôme. */
        .zen-template-row--calcul
        .zen-template-row__line--observation:has(.myTextBox.is-placeholder) {
            display: none;
        }

    .zen-template-row--calcul .zen-template-row__icon {
        flex: 0 0 1rem;
        width: 1rem;
        margin-top: 0.15rem;
        text-align: center;
    }

    .zen-template-row--calcul .zen-template-row__line--observation .zen-template-row__value,
    .zen-template-row--calcul .zen-template-row__line--meta .zen-template-row__meta {
        flex: 1 1 auto;
        min-width: 0;
    }

    .zen-template-row--calcul .zen-template-row__meta--inline {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.2rem 1rem;
        padding-left: 0;
    }

    .zen-template-row--calcul .zen-template-row__meta-line {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        min-width: 0;
    }

    .zen-template-row--calcul .zen-template-row__meta-label,
    .zen-template-row--calcul .zen-template-row__meta-user {
        flex: 0 0 auto;
    }

        /* Présentation technique compacte des matricules : [adm] */
        .zen-template-row--calcul
        .zen-template-row__meta-user
        .myTextBox:not(.is-placeholder)::before {
            content: "[";
        }

        .zen-template-row--calcul
        .zen-template-row__meta-user
        .myTextBox:not(.is-placeholder)::after {
            content: "]";
        }

        .zen-template-row--calcul
        .zen-template-row__meta-user:has(.myTextBox.is-placeholder) {
            display: none;
        }

@media (max-width: 767px) {
    .zen-template-row--calcul .zen-template-row__meta--inline {
        gap: 0.15rem 0.75rem;
    }

    .zen-template-row--calcul .zen-template-row__meta-line {
        display: flex;
    }
}

/* =========================================================
   TEMPLATE ROW — VALEURS VIDES
   ========================================================= */

/*
 * Contrat générique :
 * une icône qui qualifie immédiatement une valeur ne reste pas
 * affichée lorsque le contrôle en lecture est vide.
 */
.zen-template-row__icon:has( + .zen-template-row__value .is-placeholder ) {
    display: none;
}

/* =========================================================
   CLIENTS — CARD : localité et contact principal
   ========================================================= */
.client-localite {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.client-localite-separator {
    display: inline-block;
    flex: 0 0 1px;
    width: 1px;
}

.client-localite .client-ville {
    padding-left: 0;
}

.client-line3 {
    align-items: flex-start;
}

.client-contact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
    min-width: 0;
}

    .client-contact .client-contact-nom,
    .client-contact .client-contact-fct {
        display: block;
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

        .client-contact .client-contact-nom .myTextBox,
        .client-contact .client-contact-fct .myTextBox {
            display: block;
            width: 100%;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .client-contact .client-contact-fct {
        margin-top: 1px;
    }
