/*
 * SR 19-10-2026 - Affichage 2 (Mon Compte > type d'affichage, classe html.affichage2) : menu principal et onglets des pages
 * en arborescence dans la colonne de gauche (inc_include/menu_arborescence.inc.php) ; le menu du haut et la barre d'onglets
 * des pages ne sont plus affichés. Les couleurs restent celles du mode d'affichage.
 */

/* menu du haut et onglets en haut des pages : remplacés par l'arborescence */
html.affichage2 .header_menu,
html.affichage2 #tabsSSMenu { display: none !important; }

/* colonne de gauche plus large */
html.affichage2 #menuGauche.avecMenuArbo { width: 250px; overflow-x: hidden; overflow-y: auto; padding-top: 60px; padding-bottom: 80px; box-sizing: border-box; }
html.affichage2 .div_principal.hasMenu.hasMenuArbo { padding-left: 250px; }
html.menu_replie.affichage2 #menuGauche.avecMenuArbo { width: 58px !important; overflow-y: auto; }
html.menu_replie.affichage2 .div_principal.hasMenu.hasMenuArbo { padding-left: 70px; }

/* arborescence */
.menuArbo ul { list-style: none; margin: 0; padding: 0; }
.menuArbo li { margin: 0; }
.menuArbo .arbo_ligne { display: flex; align-items: center; }
.menuArbo .arbo_ligne > a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; text-align: left;
    font-weight: bold; line-height: 1.25; padding: 9px 6px 9px 14px; }
.menuArbo .arbo_ligne > a:hover { background-color: rgba(0, 0, 0, .15); }
.menuArbo .icone_menu { color: #fff; width: 20px; text-align: center; flex: 0 0 auto; }
.menuArbo .arbo_niveau0 > li > .arbo_ligne > a { font-size: 15px; }
.menuArbo .arbo_niveau0 > li > .arbo_ligne .icone_menu { font-size: 18px; }
.menuArbo .arbo_niveau1 > li > .arbo_ligne > a { font-size: 14px; padding-left: 30px; }
.menuArbo .arbo_niveau1 .icone_menu { font-size: 15px; }
.menuArbo .arbo_niveau2 > li > .arbo_ligne > a { font-size: 13px; font-weight: normal; padding-left: 46px; padding-top: 7px; padding-bottom: 7px; }
.menuArbo .arbo_niveau2 .icone_menu { font-size: 12px; }
.menuArbo .arbo_niveau3 > li > .arbo_ligne > a { font-size: 13px; font-weight: normal; padding-left: 62px; }

/* branches fermées par défaut, ouvertes sur la page affichée */
.menuArbo li.arbo_parent > ul { display: none; }
.menuArbo li.arbo_parent.arbo_ouvert > ul { display: block; }
.menuArbo .arbo_bascule { flex: 0 0 auto; width: 30px; height: 30px; margin-right: 4px; border: 0; background: transparent; color: #fff; cursor: pointer; border-radius: 6px; }
.menuArbo .arbo_bascule:hover { background-color: rgba(0, 0, 0, .15); }
.menuArbo .arbo_bascule i { transition: transform .15s; font-size: 12px; }
.menuArbo li.arbo_ouvert > .arbo_ligne > .arbo_bascule i { transform: rotate(90deg); }

/* page affichée */
.menuArbo li.arbo_actif > .arbo_ligne > a { background-color: rgba(0, 0, 0, .12); }
.menuArbo li.selected > .arbo_ligne > a { background-color: rgba(0, 0, 0, .28); border-left: 3px solid #fff; padding-left: calc(var(--arbo-retrait, 14px) - 3px); }
.menuArbo .arbo_niveau0 > li.selected > .arbo_ligne > a { --arbo-retrait: 14px; }
.menuArbo .arbo_niveau1 > li.selected > .arbo_ligne > a { --arbo-retrait: 30px; }
.menuArbo .arbo_niveau2 > li.selected > .arbo_ligne > a { --arbo-retrait: 46px; }
.menuArbo .arbo_niveau3 > li.selected > .arbo_ligne > a { --arbo-retrait: 62px; }

/* menu replié (bouton ☰) : icônes des modules seulement, libellé en infobulle */
html.menu_replie .menuArbo .libelleMenuGauche,
html.menu_replie .menuArbo .arbo_bascule,
html.menu_replie .menuArbo .arbo_niveau0 > li > ul { display: none !important; }
html.menu_replie .menuArbo .arbo_ligne > a { justify-content: center; padding: 11px 0 !important; gap: 0; }
html.menu_replie #menuGauche > nav.menuArbo.menuArbo { display: block !important; } /* plus fort que la règle qui masque le contenu replié */

/* libellés longs : retour à la ligne, la flèche reste visible */
.menuArbo .libelleMenuGauche { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
/* en-tête : sans le menu du haut, l'enveloppe et l'engrenage restent à droite */
html.affichage2 .topAppli .infosLive { margin-left: auto; }

/* SR 19-10-2026 - plus de bande en haut (logo, menu, enveloppe, engrenage) : les pages partent du haut de l'écran ;
   le logo, « Mails » et « Déconnexion » sont dans la colonne de gauche */
html.affichage2 .topFixed { display: none !important; }
html.affichage2 #menuGauche.avecMenuArbo { top: 0; height: 100%; padding-top: 0; }
html.affichage2 .div_principal.hasMenu { padding-top: 24px; }
html.affichage2 #menuGauche.avecMenuArbo .boutonOpen { position: static; display: block; width: 100%; height: 44px; background-position: 16px center; background-size: auto 60%; }
html.affichage2 #menuGauche .arbo_logo { display: block; height: 56px; margin: 0 14px 10px; background: url("../inc_images/design/logo_accueil.png") no-repeat left center; background-size: contain; }
html.menu_replie.affichage2 #menuGauche .arbo_logo { display: none; }
html.menu_replie.affichage2 #menuGauche.avecMenuArbo .boutonOpen { background-position: center; }
.menuArbo .arbo_extra { margin-bottom: 6px; }
.menuArbo .arbo_fin { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .35); padding-top: 6px; }
.menuArbo .arbo_badge { flex: 0 0 auto; min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px; border-radius: 11px; background: #e56a54; color: #fff; font-size: 12px; text-align: center; box-sizing: border-box; }
html.menu_replie .menuArbo .arbo_ligne > a { position: relative; }
html.menu_replie .menuArbo .arbo_badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 4px; }

/* éléments collés sous la bande du haut (70 px) : collés en haut de l'écran */
html.affichage2 .planning .vis-timeline,
html.affichage2 .table_liste_checklist .header,
html.affichage2 .plan_maintenance_haut { top: 0; }
html.affichage2 #contenu_module.soc_mode_ligne.soc_fiche_ouverte #contenu_module_page_droit { top: 10px; }
html.affichage2 .formActions.actions_page_droite { top: 24px; }

/* SR 19-10-2026 - colonne de gauche : texte et icônes foncés (couleur de l'ancienne bande du haut), en-tête de la colonne
   (☰ + logo R2) sur cette même couleur */
html.affichage2 #menuGauche.avecMenuArbo .boutonOpen { background-color: var(--color-bleu); }
html.affichage2 #menuGauche .arbo_logo { margin: 0 0 10px; height: 62px; background: var(--color-bleu) url("../inc_images/design/logo_accueil.png") no-repeat 14px center; background-size: auto 70%; }
.menuArbo .arbo_ligne > a,
.menuArbo .icone_menu,
.menuArbo .arbo_bascule { color: var(--color-bleu); }
.menuArbo li.selected > .arbo_ligne > a { background-color: rgba(255, 255, 255, .45); border-left-color: var(--color-bleu); }
.menuArbo li.arbo_actif > .arbo_ligne > a { background-color: rgba(255, 255, 255, .22); }
.menuArbo .arbo_ligne > a:hover, .menuArbo .arbo_bascule:hover { background-color: rgba(255, 255, 255, .3); }
.menuArbo .arbo_fin { border-top-color: rgba(1, 26, 48, .3); }

/* SR 19-10-2026 - ☰ sous le logo R2 (même fond foncé) */
html.affichage2 #menuGauche.avecMenuArbo { display: flex; flex-direction: column; }
html.affichage2 #menuGauche.avecMenuArbo > .arbo_logo { order: 1; margin-bottom: 0; }
html.affichage2 #menuGauche.avecMenuArbo > .boutonOpen { order: 2; flex: 0 0 auto; margin-bottom: 10px; }
html.affichage2 #menuGauche.avecMenuArbo > nav.menuArbo { order: 3; flex: 0 0 auto; }

/* SR 27-10-2026 - Liste des achats, des ventes, des devis (inc_include/apercu_liste.inc.php) : page coupée en deux,
   tableau à gauche (2/3), aperçu du document de la ligne cliquée à droite (1/3), qui reste visible en faisant défiler */
html.affichage2 .liste_apercu_conteneur { display: flex; align-items: flex-start; gap: 12px; }
html.affichage2 .liste_apercu_conteneur > .milieu_page { flex: 2 1 0; min-width: 0; overflow-x: auto; }
html.affichage2 .liste_apercu { flex: 1 1 0; min-width: 0; position: sticky; top: 10px; height: calc(100vh - 20px); box-sizing: border-box;
    display: flex; flex-direction: column; border: 1px solid #c9d3dd; border-radius: 6px; background: transparent; padding: 8px; }
html.affichage2 .liste_apercu_titre { font-weight: bold; color: var(--color-bleu); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
html.affichage2 .liste_apercu_info { display: inline-block; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; background: var(--color-bleu); color: #fff;
    font-size: 11px; font-style: italic; text-align: center; cursor: help; }
html.affichage2 .liste_apercu_docs { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 6px; flex: 0 0 auto; }
html.affichage2 .liste_apercu_docs th { text-align: left; background: var(--color-bleu); color: #fff; padding: 4px 6px; }
html.affichage2 .liste_apercu_docs td { padding: 4px 6px; border-bottom: 1px solid #e3e8ee; cursor: pointer; overflow-wrap: anywhere; }
html.affichage2 .liste_apercu_docs tr:hover td { background: rgba(47, 143, 224, .12); }
html.affichage2 .liste_apercu_docs tr.liste_apercu_selection td { background: rgba(47, 143, 224, .25); font-weight: bold; }
html.affichage2 .liste_apercu_doc { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
html.affichage2 .liste_apercu_doc > .filePreview, html.affichage2 .liste_apercu_doc iframe { flex: 1 1 auto; width: 100% !important; height: 100% !important; min-height: 0; border: 0; }
html.affichage2 .liste_apercu_doc > img.filePreview, html.affichage2 .liste_apercu_doc > object.filePreview { height: auto !important; max-width: 100%; }
html.affichage2 .liste_apercu_message { color: #667; font-style: italic; margin: 20px 6px; }
/* écran étroit : aperçu sous le tableau */
@media (max-width: 1100px) {
    html.affichage2 .liste_apercu_conteneur { flex-direction: column; align-items: stretch; }
    html.affichage2 .liste_apercu { position: static; height: 80vh; }
    /* TR 01-11-2026 - en colonne, une base de 0 (flex: 2 1 0) donnait au tableau une hauteur nulle : il prend sa hauteur */
    html.affichage2 .liste_apercu_conteneur > .milieu_page { flex: 0 0 auto; }
}

/* ========================================================================================================================
 * TR 31-10-2026 - Barre noire en haut de l'écran (inc_include/menu_barre_haut.inc.php) à la place de l'arborescence de
 * gauche : onglets principaux à l'horizontale, détail des sous-onglets au survol, sous-onglets du module affiché en fixe
 * dans une colonne à gauche. --hauteur-barres-haut (hauteur réelle des barres) est calculée par le script de la barre.
 * ====================================================================================================================== */
html.affichage2 { --hauteur-barre-noire: 50px; }

/* plus de colonne de gauche : les pages prennent toute la largeur et commencent sous les barres */
html.affichage2 #menuGauche { display: none !important; }
html.affichage2 .div_principal.hasMenu,
html.affichage2 .div_principal.hasMenu.hasMenuArbo,
html.menu_replie.affichage2 .div_principal.hasMenu.hasMenuArbo { padding-left: 0; padding-top: calc(var(--hauteur-barres-haut, var(--hauteur-barre-noire)) + 16px); }

/* éléments collés en haut des pages : sous les barres */
html.affichage2 .planning .vis-timeline,
html.affichage2 .table_liste_checklist .header,
html.affichage2 .plan_maintenance_haut { top: var(--hauteur-barres-haut, var(--hauteur-barre-noire)); }
html.affichage2 #contenu_module.soc_mode_ligne.soc_fiche_ouverte #contenu_module_page_droit { top: calc(var(--hauteur-barres-haut, var(--hauteur-barre-noire)) + 10px); }
html.affichage2 .formActions.actions_page_droite { top: calc(var(--hauteur-barres-haut, var(--hauteur-barre-noire)) + 24px); }
html.affichage2 .liste_apercu { top: calc(var(--hauteur-barres-haut, var(--hauteur-barre-noire)) + 10px); height: calc(100vh - var(--hauteur-barres-haut, var(--hauteur-barre-noire)) - 20px); }

/* --- barre noire --- */
#barreHaut { position: fixed; top: 0; left: 0; right: 0; z-index: 9400; height: var(--hauteur-barre-noire); display: flex; align-items: stretch;
    background: #000; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); font-family: inherit; }
#barreHaut a { color: #fff; text-decoration: none; }
#barreHaut .icone_menu { color: #fff; width: 18px; text-align: center; flex: 0 0 auto; font-size: 16px; opacity: .9; }
#barreHaut .barre_logo { flex: 0 0 auto; width: 64px; background: url("../inc_images/design/logo_accueil.png") no-repeat center; background-size: auto 62%; }
#barreHaut .barre_onglets { flex: 1 1 auto; min-width: 0; }
#barreHaut .barre_onglets > ul { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
#barreHaut .barre_onglet { position: relative; display: flex; }
#barreHaut .barre_onglet > a { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 14px; font-weight: bold; white-space: nowrap; }
#barreHaut .barre_onglet:hover > a,
#barreHaut .barre_onglet:focus-within > a { background: #262626; }
#barreHaut .barre_onglet.barre_actif > a { background: #1c1c1c; box-shadow: inset 0 -3px 0 var(--couleurPrincipaleClient, #5fb7b0); }
#barreHaut .barre_onglet.barre_avec_detail > a::after { content: "\f107"; font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", FontAwesome; font-weight: 900; font-size: 11px; opacity: .6; }
#barreHaut .barre_deconnexion { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 14px; border-left: 1px solid #333; white-space: nowrap; }
#barreHaut .barre_deconnexion:hover { background: #262626; }
#barreHaut .barre_badge { min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 10px; background: #e56a54; color: #fff; font-size: 12px; text-align: center; box-sizing: border-box; }

/* --- détail des sous-onglets au survol --- */
#barreHaut .barre_detail { position: absolute; top: 100%; left: 0; z-index: 9450; min-width: 250px; max-height: calc(100vh - 80px); overflow-y: auto;
    padding: 10px; background: #fff; color: var(--color-bleu, #011a30); border-radius: 0 0 8px 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
    visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .12s, visibility 0s linear .18s; }
#barreHaut .barre_onglet:hover > .barre_detail,
#barreHaut .barre_onglet:focus-within > .barre_detail { visibility: visible; opacity: 1; transform: none; transition-delay: .08s, .08s, 0s; }
/* TR 31-10-2026 - sous-onglets en arborescence verticale, sur une seule colonne : chaque niveau en retrait, relié à son
   parent par un trait vertical */
.barre_detail ul { list-style: none; margin: 0; padding: 0; }
.barre_detail { min-width: 280px; }
.barre_detail ul ul { margin: 2px 0 4px 18px; padding-left: 10px; border-left: 2px solid #e3e8ee; }
#barreHaut .barre_detail a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: var(--color-bleu, #011a30); text-decoration: none; font-size: 13px; line-height: 1.25; }
#barreHaut .barre_detail a:hover { background: rgba(47, 143, 224, .12); }
#barreHaut .barre_detail .icone_menu { opacity: 1; color: var(--couleurPrincipaleClient, #5fb7b0); width: 16px; text-align: center; font-size: 13px; flex: 0 0 auto; }
.barre_detail .barre_detail_niveau1 > li > a { font-weight: bold; font-size: 14px; }
.barre_detail .barre_detail_niveau1 > li + li { margin-top: 2px; }
.barre_detail .barre_detail_niveau3 > li > a { font-size: 12px; }
/* sous-onglet qui a lui-même des onglets : petit séparateur au-dessus pour aérer la colonne */
.barre_detail .barre_detail_niveau1 > li:has(> ul) + li { margin-top: 6px; padding-top: 6px; border-top: 1px solid #eef1f4; }
#barreHaut .barre_detail a.barre_courant { background: rgba(47, 143, 224, .2); font-weight: bold; }

/* --- arborescence épinglée sous l'onglet cliqué (reste ouverte sur toutes les pages jusqu'à un nouveau clic ou la croix) --- */
#barreHaut .barre_onglet.barre_epingle > .barre_detail { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; z-index: 9440;
    border-top: 3px solid var(--couleurPrincipaleClient, #5fb7b0); padding-top: 8px; }
#barreHaut .barre_onglet.barre_epingle > a { background: #262626; }
#barreHaut .barre_onglet.barre_epingle > a::after { content: "\f08d"; font-size: 10px; opacity: .8; } /* punaise à la place de la flèche */
/* l'onglet survolé passe au-dessus de l'arborescence épinglée */
#barreHaut .barre_onglet:hover > .barre_detail { z-index: 9460; }
/* TR 31-10-2026 - souris restée sur l'onglet après un clic ou à l'arrivée sur la page : pas d'ouverture au survol (menu_barre_haut.inc.php) */
html.barre_survol_attente #barreHaut .barre_onglet:not(.barre_epingle) > .barre_detail { visibility: hidden; opacity: 0; }
#barreHaut .barre_detail_entete { display: none; }
#barreHaut .barre_onglet.barre_epingle > .barre_detail > .barre_detail_entete { display: flex; align-items: center; gap: 8px; margin: -4px -2px 6px;
    padding: 0 0 6px 10px; border-bottom: 1px solid #e3e8ee; color: #8a96a3; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .03em; }
#barreHaut .barre_detail_entete > span { flex: 1 1 auto; min-width: 0; }
#barreHaut .barre_detail_fermer { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
    border: 0; border-radius: 6px; background: transparent; color: #8a96a3; font-size: 16px; cursor: pointer; }
#barreHaut .barre_detail_fermer i { pointer-events: none; }
#barreHaut .barre_detail_fermer:hover { background: #e56a54; color: #fff; }

/* « Mon Compte » et « Paramètres » : icônes seules poussées à droite, à côté de la déconnexion */
#barreHaut .barre_onglet_icone > a .barre_libelle,
#barreHaut .barre_onglet_icone > a::after { display: none; }
#barreHaut .barre_onglet_icone > a { padding: 0 14px; }
#barreHaut .barre_onglet_icone > a .icone_menu { font-size: 17px; }
#barreHaut .barre_onglets > ul > .barre_onglet_icone:nth-last-child(2) { margin-left: auto; border-left: 1px solid #333; }
/* les sous-onglets sans icône propre ont une flèche « › » (fa-angle-right) : inutile dans les barres */
#barreHaut .icone_menu.fa-angle-right,
.barre_detail .icone_menu.fa-angle-right { display: none; }

/* --- écrans moins larges : libellés plus petits, puis icônes seules (libellé en infobulle) sauf l'onglet affiché --- */
@media (max-width: 1500px) {
    #barreHaut .barre_onglet > a { padding: 0 10px; font-size: 13px; gap: 6px; }
}
/* la barre est juste trop large : onglets resserrés, libellés conservés */
html.barre_serree #barreHaut .barre_onglet > a { padding: 0 8px; gap: 5px; font-size: 12.5px; }
html.barre_serree #barreHaut .barre_onglet > a::after { display: none; }
html.barre_serree #barreHaut .barre_logo { width: 50px; }
html.barre_serree #barreHaut .barre_deconnexion { padding: 0 10px; }
/* la barre ne tient pas sur la largeur de l'écran (classe posée par le script de la barre) : icônes seules sauf l'onglet
   affiché, puis icônes seules partout ; le libellé reste en infobulle */
html.barre_compacte #barreHaut .barre_onglet:not(.barre_actif) > a .barre_libelle,
html.barre_compacte #barreHaut .barre_deconnexion .barre_libelle,
html.barre_tres_compacte #barreHaut .barre_onglet > a .barre_libelle { display: none; }
html.barre_compacte #barreHaut .barre_onglet > a { padding: 0 12px; }
html.barre_compacte #barreHaut .barre_onglet > a::after { display: none; }
html.barre_compacte #barreHaut .barre_logo { width: 52px; }

/* TR 31-10-2026 - onglets principaux en majuscules, répartis sur toute la largeur de la barre (chacun dans un cadre séparé
   par un filet) ; survol, clic (arborescence épinglée) et onglet de la page affichée : cadre en vert (vert des boutons
   d'action), texte blanc. Mon Compte et Paramètres restent des icônes à droite. */
#barreHaut { --vert-onglet: #00897b; }
#barreHaut .barre_onglet > a { text-transform: uppercase; padding: 0 8px; gap: 7px; font-size: 13px; }
#barreHaut .barre_onglet.barre_avec_detail > a::after { display: none; } /* place gagnée pour les libellés en majuscules */
#barreHaut .barre_onglets > ul > .barre_onglet:not(.barre_onglet_icone) { flex: 1 1 auto; }
#barreHaut .barre_onglets > ul > .barre_onglet:not(.barre_onglet_icone) > a { flex: 1 1 auto; justify-content: center; }
#barreHaut .barre_onglets > ul > .barre_onglet { border-left: 1px solid #333; }
#barreHaut .barre_onglet > a { transition: background-color .12s; }
#barreHaut .barre_onglet:hover > a,
#barreHaut .barre_onglet:focus-within > a,
#barreHaut .barre_onglet.barre_epingle > a,
#barreHaut .barre_onglet.barre_actif > a { background: var(--vert-onglet); color: #fff; box-shadow: none; }
#barreHaut .barre_onglet:hover > a .icone_menu,
#barreHaut .barre_onglet.barre_epingle > a .icone_menu,
#barreHaut .barre_onglet.barre_actif > a .icone_menu { color: #fff; opacity: 1; }
#barreHaut .barre_onglet.barre_actif > a { box-shadow: inset 0 -3px 0 #fff; } /* page affichée : filet blanc en bas en plus */

/* ========================================================================================================================
 * TR 31-10-2026 - Colonne d'actions de droite sur toutes les pages (inc_js/barre_droite.js) : boutons d'action et filtres
 * rangés par fonction (Créer, Filtres, Sélection, Actions, Affichage, Export), même présentation que les encadrés existants
 * (inc_css/boutons_actions.css). Les tableaux remontent sous la barre des onglets.
 * ====================================================================================================================== */
html.affichage2 .formActions.actions_page_droite { width: 250px; box-sizing: border-box; max-height: calc(100vh - var(--hauteur-barres-haut, var(--hauteur-barre-noire)) - 34px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.affichage2 .contenuPage:has(.actions_page_droite) { padding-right: 290px; }
html.affichage2.actions_reduites .formActions.actions_page_droite { width: 54px; overflow-x: hidden; }
html.affichage2.actions_reduites .contenuPage:has(.actions_page_droite) { padding-right: 90px; }
/* éléments déplacés masqués (tableau d'une autre vue) et zones de la page vidées */
html.affichage2 .bd_masque,
html.affichage2 .bd_vide { display: none !important; }
html.affichage2 .bd_colonne fieldset.bd_groupe legend { font-size: 16px; }
/* encadrés ajoutés dans une colonne existante (cadre d'enregistrement, colonne d'une fiche) : même aspect que ceux de la colonne */
/* TR 31-10-2026 - écrans de 1280 px et moins : application_responsive.css passe .formActions en flex (en ligne), encadrés empilés */
html.affichage2 .formActions.bd_colonne { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; }
html.affichage2 .bd_colonne fieldset.bd_groupe { display: block; width: auto; margin: 0 0 8px; padding: 4px 8px 8px; border: 1px solid #011a30; border-radius: 10px; }
html.affichage2 .bd_colonne fieldset.bd_groupe > .liste_boutons { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 5px; margin: 0; }
/* cadre d'enregistrement fixe (collé en bas à droite) devenu colonne d'actions : il ne monte plus sous la barre des onglets,
   il défile s'il est plus haut que l'écran */
html.affichage2 .cadreEnregistrementFixe.bd_colonne { max-height: calc(100vh - var(--hauteur-barres-haut, var(--hauteur-barre-noire)) - 50px); overflow-y: auto;
    overscroll-behavior: contain; scrollbar-width: thin; box-sizing: border-box; }
/* dans une colonne en flex de hauteur fixe (colonne d'une fiche), les encadrés ajoutés ne se tassent pas */
html.affichage2 fieldset.bd_groupe { flex: 0 0 auto; }

/* filtres : les uns sous les autres, sur toute la largeur de la colonne */
.bd_colonne .bd_groupe_filtres fieldset.FieldFiltre { border: 0; margin: 0; padding: 0; width: auto; min-width: 0; background: transparent; box-shadow: none; }
.bd_colonne .bd_groupe_filtres fieldset.FieldFiltre > legend { display: none; }
.bd_colonne .bd_groupe_filtres :is(.flexRow, .flexCol, .DivFiltre, .ButtonOK) { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap;
    gap: 6px; width: 100% !important; max-width: none; margin: 0 !important; padding: 0; float: none; box-sizing: border-box; }
.bd_colonne .bd_groupe_filtres .DivFiltre { gap: 3px; }
.bd_colonne .bd_groupe_filtres .DivFiltre > :is(span, label):first-child { font-size: 12px; font-weight: bold; color: var(--color-bleu, #011a30); }
.bd_colonne .bd_groupe_filtres :is(input:not([type=checkbox]):not([type=radio]), select, textarea, button.ui-multiselect, .select2-container, .chosen-container) {
    width: 100% !important; max-width: 100%; min-width: 0 !important; box-sizing: border-box; margin: 0 !important; }
.bd_colonne .bd_groupe_filtres :is(.ui-datepicker-trigger, img) { flex: 0 0 auto; }
.bd_colonne .bd_groupe_filtres .ButtonOK { margin-top: 4px !important; }
.bd_colonne .bd_groupe_filtres .ButtonOK .btn_action_text { width: 100%; margin: 0; }
/* recherche des tableaux */
.bd_colonne .bd_groupe_filtres .dt-search { width: 100%; margin: 0 0 4px; float: none; text-align: left; }
.bd_colonne .bd_groupe_filtres .dt-search :is(input, label) { width: 100% !important; margin: 0 !important; box-sizing: border-box; }
/* plusieurs recherches (une par vue) : une seule visible à la fois, gérée par le script */
.bd_colonne .bd_groupe .liste_boutons > * { max-width: 100%; }

/* boutons déplacés (boutons des tableaux, Actualiser / Réinitialiser…), dans la colonne de droite ou à droite de la ligne du
   titre (.bd_ligne_droite, TR 09-11-2026) : même présentation que les boutons d'action,
   en neutralisant le style d'origine (DataTables : fond foncé, display block, marges) */
:is(.bd_colonne, .bd_ligne_droite) .btn_action_text.bd_bouton { display: inline-flex !important; align-items: center; justify-content: center; height: auto;
    min-height: 40px; padding: 0 !important; margin: 0 !important; background: var(--bgAppliClient, #fff) !important; background-image: none !important;
    color: var(--color-bleu, #011a30) !important; font-size: 16px; line-height: 1.2; text-align: center; box-shadow: none !important; text-shadow: none; }
:is(.bd_colonne, .bd_ligne_droite) .btn_action_text.bd_bouton:hover { background: color-mix(in srgb, var(--ba, var(--couleurPrincipaleClient, #5fb7b0)) 22%, transparent) !important; }
:is(.bd_colonne, .bd_ligne_droite) .btn_action_text.bd_bouton > i { align-self: stretch; height: auto !important; min-height: 38px; }
:is(.bd_colonne, .bd_ligne_droite) .btn_action_text.bd_bouton .dt-button-down-arrow { order: 2; padding: 0 6px; font-size: 9px; opacity: .6; }
:is(.bd_colonne, .bd_ligne_droite) .btn_action_text.bd_bouton > i { order: 3; }

/* cases à cocher des filtres : case + libellé sur une ligne, le libellé passe à la ligne si besoin */
.bd_colonne .bd_groupe_filtres label:has(> input[type=checkbox]),
.bd_colonne .bd_groupe_filtres label:has(> input[type=radio]) { display: flex; align-items: center; gap: 6px; width: 100%; white-space: normal; font-weight: normal; }
.bd_colonne .bd_groupe_filtres :is(input[type=checkbox], input[type=radio]) { width: auto !important; flex: 0 0 auto; margin: 0 !important; }
/* sélecteurs de vue (onglets internes des pages) : les uns sous les autres, en boutons */
.bd_colonne .bd_groupe_affichage :is(.mvt_vues, .jrn_choix_journal, .cm_onglets, .rgl_onglets) { display: flex; flex-direction: column; align-items: stretch; gap: 5px; width: 100%;
    margin: 0; padding: 0; border: 0; float: none; }
.bd_colonne .bd_groupe_affichage :is(.mvt_vues, .jrn_choix_journal, .cm_onglets, .rgl_onglets) > * { width: 100% !important; margin: 0 !important; box-sizing: border-box;
    justify-content: flex-start; text-align: left; white-space: normal; }
/* bouton à icône seule : son infobulle sert de libellé (sur deux lignes au plus) */
.bd_colonne .btn_action_text > span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* colonne repliée : boutons seuls (icônes), les filtres ne tiennent pas dans 54 px */
html.actions_reduites .bd_colonne :is(.bd_groupe_filtres, .bd_groupe_affichage .mvt_vues, .bd_groupe_affichage .jrn_choix_journal) { display: none !important; }

/* TR 31-10-2026 - tableaux sur une seule page (inc_js/tableaux_toutes_lignes.js) : pas de boutons de pagination */
html.affichage2 .dt-container.dt_toutes_lignes .dt-paging { display: none !important; }
/* TR 01-11-2026 - défilement continu (Scroller) : le choix du nombre de lignes ne sert pas, les lignes arrivent en défilant */
html.affichage2 .dt-container.dt_defilement .dt-length { display: none !important; }

/* ========================================================================================================================
 * TR 31-10-2026 - Toute la largeur et toute la hauteur de l'écran : plus de marges autour des pages ni d'espaces entre
 * les tableaux, les zones d'aperçu et la colonne d'actions. Les zones d'aperçu restent fixes, de la barre des onglets
 * jusqu'en bas de l'écran. --largeur-actions : largeur de la colonne d'actions de droite (dépliée / repliée).
 * ====================================================================================================================== */
html.affichage2 { --haut-barres: var(--hauteur-barres-haut, var(--hauteur-barre-noire)); --largeur-actions: 250px; --trait-zones: 1px solid #c9d3dd; }
html.affichage2.actions_reduites { --largeur-actions: 54px; }

/* pages collées à la barre des onglets et aux bords de l'écran */
html.affichage2 .div_principal.hasMenu,
html.affichage2 .div_principal.hasMenu.hasMenuArbo,
html.menu_replie.affichage2 .div_principal.hasMenu.hasMenuArbo { padding: var(--haut-barres) 0 0 0; }
html.affichage2 .div_principal .contenuPage { padding: 0; }
html.affichage2 .div_principal .contenuPage:has(.actions_page_droite),
html.affichage2.actions_reduites .div_principal .contenuPage:has(.actions_page_droite) { padding-right: var(--largeur-actions); }

/* colonne d'actions : collée à droite, de la barre des onglets au bas de l'écran ; repliée, elle ne garde que ses icônes */
html.affichage2 .formActions.actions_page_droite,
html.affichage2.actions_reduites .formActions.actions_page_droite { top: var(--haut-barres); right: 0; bottom: 0; width: var(--largeur-actions); max-height: none;
    margin: 0; padding: 4px 6px; border-left: var(--trait-zones); box-sizing: border-box; }
html.affichage2.actions_reduites .formActions.actions_page_droite { padding: 4px; }
html.affichage2 .formActions.actions_page_droite > fieldset { margin: 0 0 6px; }
html.affichage2 .cadreEnregistrementFixe { right: 0; }
/* cadre d'enregistrement fixe qui sert de colonne d'actions à la page (ex. catalogue des articles) : même place que la colonne */
html.affichage2 .contenuPage .cadreEnregistrementFixe.bd_colonne { top: var(--haut-barres); right: 0; bottom: 0; width: var(--largeur-actions); max-height: none;
    padding: 4px 6px; border-left: var(--trait-zones); }
html.affichage2.actions_reduites .contenuPage .cadreEnregistrementFixe.bd_colonne { padding: 4px; }
html.affichage2 .div_principal .contenuPage:has(.cadreEnregistrementFixe.bd_colonne):not(:has(.cr_zone)) { padding-right: var(--largeur-actions); }
/* constructeur de comptes rendus : la grille garde sa 3e colonne pour le cadre */
@media (min-width: 1401px) {
    html.affichage2 .cr_zone { grid-template-columns: minmax(470px, 1fr) minmax(560px, 1203px) var(--largeur-actions); }
    html.affichage2 .cr_apercu_colonne { width: min(1203px, max(560px, calc(100% - var(--largeur-actions) - 470px))); }
}
@media (min-width: 1001px) and (max-width: 1400px) {
    html.affichage2 .cr_zone { grid-template-columns: minmax(420px, 1fr) minmax(480px, 700px) var(--largeur-actions); }
    html.affichage2 .cr_apercu_colonne { width: min(700px, max(480px, calc(100% - var(--largeur-actions) - 420px))); }
}
/* aperçu fixe sur sa colonne, de la barre des onglets au bas de l'écran */
@media (min-width: 1001px) {
    html.affichage2 .cr_apercu_colonne { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-actions); z-index: 400; }
    html.affichage2 .cr_apercu_colonne .cr_apercu { height: 100% !important; min-height: 0; }
}
/* TR 01-11-2026 - fiche d'un modèle de document : trois colonnes égales ; feuille A4 et aperçu fixes jusqu'au bas de l'écran
   (en % : largeur de la fenêtre sans sa barre de défilement). TR 07-11-2026 - plus de colonne d'actions : les trois colonnes
   se partagent toute la largeur ; en-tête fixe (titre et actions) sous la barre des onglets */
@media (min-width: 1001px) {
    html.affichage2 .mdl_page { --haut-entete-mdl: 54px; padding: var(--haut-entete-mdl) 0 0; }
    html.affichage2 .mdl_page .mdl_entete { position: fixed; top: var(--haut-barres); left: 0; right: 0; height: var(--haut-entete-mdl); box-sizing: border-box;
        margin: 0; padding: 0 12px; z-index: 401; flex-wrap: nowrap; background: var(--bgAppliClient, #fff); border-bottom: var(--trait-zones); }
    html.affichage2 .mdl_page .mdl_entete .page_title { height: auto; min-height: 0; padding: 0 !important; }
    html.affichage2 .mdl_page .mdl_entete .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html.affichage2 .mdl_page .cr_zone { grid-template-columns: var(--mdl-cols, repeat(3, minmax(0, 1fr))); }
    html.affichage2 .mdl_page .cr_gauche { grid-column: 1; padding: 8px 10px; align-content: start; }
    html.affichage2 .mdl_page :is(.mdl_feuille_colonne, .cr_apercu_colonne) { position: fixed; top: calc(var(--haut-barres) + var(--haut-entete-mdl)); bottom: 0;
        right: auto; width: calc(100% / 3); height: auto; z-index: 400; }
    /* TR 07-11-2026 - largeurs posées par ModelePage.echelle (inc_js/modele_feuille.js) : en A3 la feuille s'élargit, la gauche
       se réduit, l'aperçu garde sa largeur */
    html.affichage2 .mdl_page .mdl_feuille_colonne { left: var(--mdl-g, calc(100% / 3)); width: var(--mdl-c, calc(100% / 3)); border-left: var(--trait-zones); border-right: var(--trait-zones); }
    html.affichage2 .mdl_page .cr_apercu_colonne { left: calc(var(--mdl-g, calc(100% / 3)) + var(--mdl-c, calc(100% / 3)));
        width: var(--mdl-d, calc(100% / 3)); }
    html.affichage2 .mdl_page .cr_apercu_colonne .cr_apercu { height: 100% !important; border: 0; }
}
}
}

/* liste des achats, des ventes, des devis : tableau (2/3) et aperçu (1/3) bord à bord, aperçu fixe en pleine hauteur */
@media (min-width: 1101px) {
    html.affichage2 .liste_apercu_conteneur { gap: 0; }
    html.affichage2 .liste_apercu_conteneur > .milieu_page { flex: 0 0 66.667%; }
    html.affichage2 .liste_apercu { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-actions); z-index: 400;
        width: calc((100% - var(--largeur-actions)) / 3); height: auto; border: 0; border-left: var(--trait-zones); border-radius: 0;
        background: var(--bgAppliClient, #fff); }
    html.affichage2 .contenuPage:not(:has(.bd_colonne, .actions_page_droite)) .liste_apercu { right: 0; width: calc(100% / 3); }
}

/* fiche d'une vente : formulaire | aperçu du PDF | actions. L'aperçu et les actions sont fixes, de la barre des onglets au
   bas de l'écran, sur les colonnes que la grille leur réserve */
html.affichage2 .formFlex.vente_avec_apercu { gap: 0; grid-template-columns: minmax(0, 1fr) clamp(480px, 34vw, 800px) var(--largeur-actions); }
html.affichage2 .formFlex.vente_avec_apercu .vente_apercu { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-actions); z-index: 400;
    width: clamp(480px, 34vw, 800px); height: auto; min-height: 0; border-radius: 0; }
html.affichage2 .formFlex.vente_avec_apercu .formActions { position: fixed; top: var(--haut-barres); bottom: 0; right: 0; z-index: 400; width: var(--largeur-actions);
    overflow-y: auto; padding: 4px 6px; box-sizing: border-box; border-left: var(--trait-zones); background: var(--bgAppliClient, #fff); }

/* étape d'une intervention : formulaire (2/3) | aperçu (1/3) | actions, fixes comme pour une vente */
html.affichage2 .formFlex.etape_avec_apercu { --largeur-etape-actions: 225px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) var(--largeur-etape-actions); }
html.affichage2.actions_reduites .formFlex.etape_avec_apercu { --largeur-etape-actions: 56px; }
html.affichage2 .formFlex.etape_avec_apercu .formContent { padding-right: 0; }
html.affichage2 .formFlex.etape_avec_apercu .etape_apercu { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-etape-actions); z-index: 400;
    width: calc((100% - var(--largeur-etape-actions)) / 3); height: auto; box-sizing: border-box; }
html.affichage2 .formFlex.etape_avec_apercu .formActions { position: fixed; top: var(--haut-barres); bottom: 0; right: 0; z-index: 400; width: var(--largeur-etape-actions); height: auto; }

/* onglet Méthode, photos et documents : liste | aperçu */
html.affichage2 .mf_deux { gap: 0; }
html.affichage2 .mf_apercu { top: var(--haut-barres); height: calc(100vh - var(--haut-barres)); display: flex; flex-direction: column; border-radius: 0; box-sizing: border-box; }
html.affichage2 .mf_apercu_corps { flex: 1 1 auto; height: auto; min-height: 0; }

/* constructeur de comptes rendus et de modèles : blocs | aperçu | émission */
html.affichage2 .cr_zone { gap: 0; }
html.affichage2 .cr_apercu { border-radius: 0; }

/* explorateur de la GED : arbre | liste | aperçu sur toute la hauteur sous la barre */
html.affichage2 .explo_ged { height: calc(100vh - var(--haut-barres) - var(--haut-titre)); min-height: 0; gap: 0; }
html.affichage2 .explo_liste_zone { gap: 0; }
html.affichage2 :is(.explo_arbre, .explo_liste_conteneur, .explo_ariane, .explo_apercu.ea_ouvert) { border-radius: 0; }
html.affichage2 .explo_apercu.ea_ouvert { margin-left: 0; }
/* aperçu ouvert : fixe, de la barre des onglets au bas de l'écran (38 % de la place), le fil d'Ariane et la liste s'arrêtent avant */
@media (min-width: 1101px) {
    html.affichage2 .explo_ged:has(.explo_apercu.ea_ouvert) { padding-right: 38%; box-sizing: border-box; }
    html.affichage2 .explo_apercu.ea_ouvert { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-actions); z-index: 400;
        width: calc((100% - var(--largeur-actions)) * .38); border: 0; border-left: var(--trait-zones); background: var(--bgAppliClient, #fff); transition: none; }
    html.affichage2 .contenuPage:not(:has(.bd_colonne, .actions_page_droite)) .explo_apercu.ea_ouvert { right: 0; width: 38%; }
}
html.affichage2 .explo_separateur { flex-basis: 5px; }

/* fiche d'un arrivage : fiche (2/3) | documents et aperçu (1/3), fixes de la barre des onglets au bas de l'écran */
html.affichage2 .arr_grille { gap: 0; }
@media (min-width: 1401px) {
    html.affichage2 .arr_droite { position: fixed; top: var(--haut-barres); bottom: 0; right: var(--largeur-actions); z-index: 400; align-self: stretch;
        width: max(320px, calc((100% - var(--largeur-actions)) / 3)); overflow: hidden auto; display: flex; flex-direction: column; box-sizing: border-box;
        border-left: var(--trait-zones); background: var(--bgAppliClient, #fff); }
    html.affichage2 .contenuPage:not(:has(.bd_colonne, .actions_page_droite)) .arr_droite { right: 0; width: max(320px, calc(100% / 3)); }
    html.affichage2 .arr_droite > .arr_documents { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; min-width: 0; margin: 0; box-sizing: border-box; }
    html.affichage2 .arr_doc_apercu { flex: 1 1 auto; display: flex; flex-direction: column; width: auto !important; min-width: 0; margin-top: 0; }
    html.affichage2 .arr_doc_apercu > * { width: 100% !important; max-width: 100%; box-sizing: border-box; }
    html.affichage2 .arr_droite .arr_docs_table { width: 100% !important; table-layout: fixed; }
    html.affichage2 .arr_droite .arr_docs_table td { overflow-wrap: anywhere; }
    html.affichage2 .arr_doc_apercu iframe { flex: 1 1 auto; height: auto !important; min-height: 300px; border: 0; }
}

/* clients / fournisseurs : liste (63 %) | fiche de la ligne ouverte (37 %), fixe en pleine hauteur */
@media (min-width: 1101px) {
    html.affichage2 #contenu_module.soc_mode_ligne.soc_fiche_ouverte { gap: 0; }
    html.affichage2 #contenu_module.soc_mode_ligne.soc_fiche_ouverte #contenu_module_page_gauche { flex: 0 0 63%; width: 63%; margin: 0; }
    html.affichage2 #contenu_module.soc_mode_ligne.soc_fiche_ouverte #contenu_module_page_droit { position: fixed !important; top: var(--haut-barres) !important; bottom: auto;
        right: var(--largeur-actions); z-index: 400; width: calc((100% - var(--largeur-actions)) * .37) !important; height: calc(100vh - var(--haut-barres)) !important; max-height: none; margin: 0;
        box-sizing: border-box; transition: none; }
    html.affichage2 .contenuPage:not(:has(.bd_colonne, .actions_page_droite)) #contenu_module.soc_mode_ligne.soc_fiche_ouverte #contenu_module_page_droit { right: 0; width: 37% !important; }
}

/* planning : planning | liste des interventions à planifier, en pleine hauteur sous la barre */
html.affichage2 .planning_container { column-gap: 0; }
html.affichage2 .planning_container > .liste_inter_planning { top: var(--haut-barres); max-height: none; height: calc(100vh - var(--haut-barres)); border-left: var(--trait-zones); }

/* journaux (Comptabilité, Gestion commerciale) : aperçu du journal fixe en pleine hauteur, il défile seul ; la ligne qui ne
   garde que la bulle d'information passe en haut à droite de l'aperçu */
html.affichage2 .jrn_apercu { margin: 0; height: calc(100vh - var(--haut-barres) - var(--haut-titre)); overflow: auto; border: 0; border-radius: 0; box-sizing: border-box; }
/* texte d'aide au-dessus (ex. déclaration de TGC) : l'aperçu prend la hauteur restante, jusqu'en bas de l'écran */
html.affichage2 .jrn_page:has(.jrn_apercu):not(:has(#jrn_zone_journal[style*="none"])) { display: flex; flex-direction: column; height: calc(100vh - var(--haut-barres) - var(--haut-titre)); }
html.affichage2 .jrn_page > :has(> .jrn_apercu) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
html.affichage2 .jrn_page .jrn_apercu { flex: 1 1 auto; height: auto; min-height: 0; }
html.affichage2 .jrn_page > .cd_aide { margin: 0; }
html.affichage2 .jrn_page { position: relative; }
html.affichage2 .jrn_choix:not(:has(select, button, input, a)) { position: absolute; top: 6px; right: 8px; z-index: 5; margin: 0; width: auto; }

/* tableaux : plus de marge au-dessus et au-dessous (DataTables : 12 px) */
html.affichage2 .contenuPage .dt-container > .dt-layout-row.dt-layout-table { margin: 0; }
html.affichage2 .contenuPage .dt-container:not(:is(.popin, .ui-dialog) *) table.dataTable { width: 100% !important; }

/* zones fixes posées dans une grille ou un flex : sans « stretch », l'alignement de la page (align-self: end, flex-start)
   leur donne la hauteur de leur contenu au lieu de celle comprise entre top et bottom */
html.affichage2 :is(.liste_apercu, .formFlex.vente_avec_apercu .vente_apercu, .formFlex.vente_avec_apercu .formActions,
    .formFlex.etape_avec_apercu .etape_apercu, .formFlex.etape_avec_apercu .formActions, .cr_apercu_colonne, .explo_apercu.ea_ouvert) { align-self: stretch; justify-self: stretch; }

/* onglets internes des pages (ex. intervention) : contenu des onglets sans marge intérieure */
html.affichage2 .contenuPage .ui-tabs > .ui-tabs-panel { padding: 0; }

/* fiches en deux parties (formulaire | colonne d'actions, ex. Méthode) : la colonne d'actions de la page prend toute la
   hauteur à droite, comme la colonne des listes, au lieu de rester collée en bas avec un vide au-dessus */
html.affichage2 .formFlex:not(.vente_avec_apercu):not(.etape_avec_apercu) > .formActions.bd_colonne { position: fixed; top: var(--haut-barres); bottom: 0; right: 0;
    z-index: 450; width: var(--largeur-actions); max-height: none; margin: 0; padding: 4px 6px; overflow-y: auto; box-sizing: border-box; align-self: stretch;
    justify-content: flex-start; border-left: var(--trait-zones); background: var(--bgAppliClient, #fff); }
html.affichage2.actions_reduites .formFlex:not(.vente_avec_apercu):not(.etape_avec_apercu) > .formActions.bd_colonne { padding: 4px; }
html.affichage2 .formFlex:not(.vente_avec_apercu):not(.etape_avec_apercu):has(> .formActions.bd_colonne) { padding-right: var(--largeur-actions); box-sizing: border-box; }
html.affichage2 .formFlex:not(.vente_avec_apercu):not(.etape_avec_apercu):has(> .formActions.bd_colonne) > .formContent { width: auto; flex: 1 1 auto; min-width: 0; }

/* en-têtes de tableaux et colonnes collés à 70 px (hauteur de l'ancienne bande du haut) : collés sous la barre des onglets,
   sinon ils recouvrent la première ligne des tableaux qui commencent maintenant juste sous la barre */
html.affichage2 table.stickyHeaderPrincipal > thead th,
html.affichage2 :is(.pa_menu, .pa_deux_droite, .contentSticky) { top: var(--haut-barres); }

/* listes coupées en deux (liste 60 % | fiche de la ligne choisie 40 %, inc_css/liste_table.css) : bord à bord, la fiche est
   fixe de la barre des onglets au bas de l'écran (hors liste des clients / fournisseurs, réglée plus haut, et ouverture en grand) */
@media (min-width: 1101px) {
    html.affichage2 div#contenu_module:not(.soc_mode_ligne):has(> #contenu_module_page_droit:not(.OuvertureTabGrand)) { column-gap: 0; }
    html.affichage2 div#contenu_module:not(.soc_mode_ligne) > div#contenu_module_page_gauche { flex: 0 0 60%; width: 60%; min-width: 0; }
    html.affichage2 div#contenu_module:not(.soc_mode_ligne) > div#contenu_module_page_droit:not(.OuvertureTabGrand) { position: fixed !important; top: var(--haut-barres) !important;
        bottom: auto !important; right: var(--largeur-actions); z-index: 400; width: calc((100% - var(--largeur-actions)) * .4) !important;
        height: calc(100vh - var(--haut-barres)) !important; max-height: none; margin: 0; overflow-y: auto; box-sizing: border-box; transform: none !important;
        border-left: var(--trait-zones); background: var(--bgAppliClient, #fff); transition: none; }
    html.affichage2 .contenuPage:not(:has(.bd_colonne, .actions_page_droite)) div#contenu_module:not(.soc_mode_ligne) > div#contenu_module_page_droit:not(.OuvertureTabGrand) {
        right: 0; width: 40% !important; }
    html.affichage2 div#contenu_module:not(.soc_mode_ligne) > div#contenu_module_page_droit .content { position: static; }
}

/* TR 31-10-2026 - titre de page ajouté par inc_js/titre_page.js (pages du menu qui n'en avaient pas) : même bandeau que les
   autres pages ; les zones en pleine hauteur sous la barre retirent sa hauteur (--haut-titre) */
html.affichage2 .contenuPage { --haut-titre: 0px; }
html.affichage2 .contenuPage:has(.titre_auto) { --haut-titre: 65px; }
html.affichage2 .titre_auto .page_title { position: relative; }

/* TR 31-10-2026 - recherche à côté du titre de la page (inc_js/barre_droite.js) */
html.affichage2 .header_page > .bd_recherche { display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: 0 1 auto; min-width: 0; }
html.affichage2 .bd_recherche .dt-search { display: flex; align-items: center; margin: 0; float: none; }
html.affichage2 .bd_recherche :is(.dt-search, .DivFiltre) > label { display: none; }
html.affichage2 .bd_recherche .DivFiltre { display: flex; align-items: center; margin: 0; padding: 0; }
html.affichage2 .bd_recherche :is(.dt-search input, input[type=search], .search_bar) { width: 280px; max-width: 100%; height: 34px; margin: 0 !important; padding: 0 12px 0 32px;
    border: 1px solid #c9d3dd; border-radius: 17px; box-sizing: border-box; font-size: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2390a0b0' d='M505 442.7L405.3 343c28.4-34.9 45.7-79.3 45.7-127C451 103.5 354.5 7 241.5 7S32 103.5 32 216.5 128.5 426 241.5 426c47.7 0 92.1-17.3 127-45.7l99.7 99.7c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-34zM241.5 378C152.4 378 80 305.6 80 216.5S152.4 55 241.5 55 403 127.4 403 216.5 330.6 378 241.5 378z'/%3E%3C/svg%3E") no-repeat 11px center / 14px; }
html.affichage2 .bd_recherche :is(.dt-search input, input[type=search], .search_bar):focus { outline: none; border-color: var(--vert-onglet, #00897b); box-shadow: 0 0 0 2px rgba(0, 137, 123, .2); }

/* TR 01-11-2026 - menu déroulant resté collé à son bouton dans la colonne de droite (ex. « Créer un modèle » > familles) */
html.affichage2 .bd_colonne .bd_menu_bouton { position: static; min-width: 0; margin: 4px 0 2px; padding: 2px 0; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
html.affichage2 .bd_colonne .bd_menu_bouton a { display: block; padding: 6px 10px; white-space: normal; font-size: 13px; }

/* SR 01-11-2026 - défilement continu (Scroller) : DataTables interdit le retour à la ligne dans les cellules (div.dts … nowrap), ce qui
   élargissait toutes les colonnes ; choix de l'utilisateur : le texte revient à la ligne comme avant */
html.affichage2 div.dts tbody th, html.affichage2 div.dts tbody td { white-space: normal; }

/* TR 08-11-2026 - page sans colonne de droite (ligne du titre data-ligne-titre, inc_js/barre_droite.js) : recherche, Actualiser,
   Réinitialiser et boutons de la page à la suite, juste à droite du titre, centrés sur la ligne du titre (même hauteur) */
html.affichage2 .header_page[data-ligne-titre] { align-items: center; gap: 12px; }
html.affichage2 .header_page[data-ligne-titre] > .bd_recherche { padding: 0; }
html.affichage2 .header_page[data-ligne-titre] > .bouton_actualiser { margin: 0; }
html.affichage2 .header_page[data-ligne-titre] > .bd_ligne_titre { min-width: 0; flex: 0 0 auto; padding-left: 6px; box-sizing: border-box; }
html.affichage2 .header_page[data-ligne-titre] > .actions_header { margin-left: 0; gap: 12px; }
html.affichage2 .header_page[data-ligne-titre] > .actions_header > .btn_action_text { min-width: 0; padding-left: 6px; box-sizing: border-box; }
/* TR 09-11-2026 - autres boutons du tableau à droite de la ligne du titre (data-ligne-boutons) */
html.affichage2 .header_page[data-ligne-titre] > .bd_ligne_droite { margin-left: auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; }
html.affichage2 .header_page[data-ligne-titre] > .bd_ligne_droite > .btn_action_text { flex: 0 1 auto; min-width: 0; width: auto; padding-left: 8px !important; box-sizing: border-box; }
html.affichage2 .header_page[data-ligne-titre] > .bd_ligne_droite > .btn_action_text > span { min-width: 0; flex: 0 1 auto; white-space: normal; font-size: 14px; line-height: 1.15; }
/* titre à sa largeur naturelle quand la ligne porte aussi les boutons du tableau */
html.affichage2 .header_page[data-ligne-titre][data-ligne-boutons] > .page_title { min-width: 0; flex: 0 0 auto; white-space: nowrap; }
html.affichage2 .header_page[data-ligne-titre][data-ligne-boutons] > .actions_header { flex: 0 0 auto; }
html.affichage2 .header_page[data-ligne-titre][data-ligne-boutons] > .actions_header > .btn_action_text > span { white-space: nowrap; }
html.affichage2 .header_page[data-ligne-titre][data-ligne-boutons] > .bd_recherche { flex: 0 1 200px; min-width: 120px; }
/* TR 09-11-2026 - filtres gardés sur une ligne sous le titre (data-ligne-filtres) */
html.affichage2 fieldset.FieldFiltre.bd_filtres_ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; padding: 4px 10px; border: 0; }
html.affichage2 fieldset.FieldFiltre.bd_filtres_ligne > legend { display: none; }
html.affichage2 fieldset.FieldFiltre.bd_filtres_ligne > .DivFiltre { display: flex; align-items: center; gap: 6px; margin: 0; }
/* TR 08-11-2026 - clients / fournisseurs : trois parties égales sur toute la largeur et toute la hauteur sous la ligne du titre :
   tableau | fiche ouverte (« Mode modification ») | aperçu des documents GED de la fiche (chaque partie défile seule) */
@media (min-width: 1101px) {
    html.affichage2 #contenu_module.soc_trois { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr);
        gap: 0; height: calc(100vh - var(--haut-barres) - 65px); overflow: hidden; }
    html.affichage2 #contenu_module.soc_trois > #contenu_module_page_gauche { grid-column: 1; grid-row: 1; width: auto !important; flex: none !important;
        min-width: 0; height: 100%; min-height: 0; margin: 0; overflow: auto; }
    html.affichage2 .contenuPage #contenu_module.soc_trois.soc_trois.soc_trois.soc_mode_ligne > #contenu_module_page_droit { /* passe avant la largeur de 37 % */ grid-column: 2; grid-row: 1; position: relative !important;
        top: auto !important; right: auto !important; left: auto !important; width: auto !important; height: 100% !important; max-height: none; margin: 0;
        overflow: auto; z-index: auto; box-sizing: border-box; }
    /* fiche ouverte resserrée dans son tiers : tableaux, champs, dépôt du logo et boutons à la largeur disponible */
    html.affichage2 #contenu_module.soc_trois > #contenu_module_page_droit .ui-tabs-panel :is(table, fieldset) { width: 100% !important; max-width: 100%; min-width: 0; box-sizing: border-box; }
    html.affichage2 #contenu_module.soc_trois > #contenu_module_page_droit .ui-tabs-panel table { table-layout: fixed; }
    html.affichage2 #contenu_module.soc_trois > #contenu_module_page_droit .ui-tabs-panel td { overflow-wrap: anywhere; }
    html.affichage2 #contenu_module.soc_trois > #contenu_module_page_droit .ui-tabs-panel :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .ui-multiselect, .dropzone, .dz-preview, .dz-details, .btn_action_text) {
        max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
    html.affichage2 #contenu_module.soc_trois > .soc_apercu { grid-column: 3; grid-row: 1; position: static; height: 100%; margin: 0; box-sizing: border-box;
        display: flex; flex-direction: column; border-left: var(--trait-zones, 1px solid #d9e1e8); }
    html.affichage2 .soc_apercu .liste_apercu_doc { flex: 1 1 auto; min-height: 0; } /* document en pleine page dans la zone */
    html.affichage2 .soc_apercu .soc_telecharger { margin-left: auto; height: 30px; min-width: 0; }
    html.affichage2 .soc_apercu img.soc_apercu_image { width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
    /* tableau resserré pour tenir dans son tiers : cellules plus étroites, titres plus petits, flèches de tri par-dessus le titre */
    html.affichage2 #contenu_module.soc_trois .dt-container :is(th, td) { padding: 6px 3px !important; }
    html.affichage2 #contenu_module.soc_trois #Table_liste_societe td { font-size: 14px; overflow-wrap: anywhere; }
    html.affichage2 #contenu_module.soc_trois #Table_liste_societe td:first-child { overflow-wrap: normal; word-break: keep-all; } /* Type : mots entiers */
    html.affichage2 #contenu_module.soc_trois #Table_liste_societe td img { max-width: 40px; height: auto !important; max-height: 30px; }
    html.affichage2 #contenu_module.soc_trois .dt-container thead th { position: relative; top: 0 !important; } /* le tiers défile seul : pas d'en-tête collé sous la barre */
    html.affichage2 #contenu_module.soc_trois .dt-container thead th .Entete { font-size: 13px; }
    html.affichage2 #contenu_module.soc_trois .dt-container thead .dt-column-order { position: absolute !important; top: 3px; right: 0; width: 10px !important; margin: 0 !important; }
    html.affichage2 #contenu_module.soc_trois .dt-container thead .filtre_excel_bouton { min-width: 20px; }
}
/* TR 08-11-2026 - liste des équipements : tableau (3/5) | aperçu des documents de l'équipement choisi (2/5 de l'écran), sous la
   ligne du titre (recherche et boutons) et jusqu'en bas ; liste des documents en haut, document affiché sur le reste */
@media (min-width: 1101px) {
    html.affichage2 .eq_liste_page .liste_apercu_conteneur > .milieu_page { flex: 0 0 60%; max-width: 60%; }
    html.affichage2 .contenuPage .eq_liste_page .liste_apercu.eq_apercu { top: calc(var(--haut-barres) + 65px); right: 0; width: 40%; display: flex; flex-direction: column; }
}
html.affichage2 .eq_apercu .eq_apercu_nom { font-weight: normal; color: #556; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html.affichage2 .eq_apercu .eq_telecharger { margin-left: auto; height: 30px; min-width: 0; flex: 0 0 auto; }
html.affichage2 .eq_apercu .eq_apercu_liste { display: none; } /* TR 09-11-2026 - pas de liste des documents au-dessus de l'aperçu */
html.affichage2 .eq_apercu .eq_apercu_rubrique { color: #556; white-space: nowrap; width: 1%; }
html.affichage2 .eq_apercu .liste_apercu_doc { flex: 1 1 auto; min-height: 0; }
html.affichage2 .eq_apercu img.eq_apercu_image { width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
/* TR 09-11-2026 - docs techs complémentaires ouverts sous la ligne de l'équipement : à la largeur visible du tableau, même s'il défile en largeur */
html.affichage2 tr.eq_docs_ouvert > td { background: rgba(47, 143, 224, .12) !important; }
html.affichage2 td.eq_docs_compl_ligne { padding: 0 !important; background: #fff !important; border-bottom: 2px solid var(--couleurPrincipaleClient, #5fb7b0); }
html.affichage2 .eq_docs_compl_enfant { position: sticky; left: 0; margin: 0 !important; text-align: left; box-sizing: border-box; min-height: 120px; max-height: 70vh; overflow: auto; padding: 6px; }
/* TR 09-11-2026 - docs techs complémentaires ouverts sous la ligne d'un équipement : hauteur au plus juste, tous les boutons sur
   une ligne en haut, pas d'arborescence à gauche (les sous-dossiers sont des lignes du tableau) */
html.affichage2 .eq_docs_compl_enfant { min-height: 0; padding: 4px 6px; }
html.affichage2 .eq_docs_compl_enfant .explo_ged { height: auto !important; min-height: 0 !important; }
html.affichage2 .eq_docs_compl_enfant .explo_corps { display: flex; height: auto; align-items: stretch; } /* TR 09-11-2026 - arborescence | liste */
html.affichage2 .eq_docs_compl_enfant .explo_arbre { flex: 0 0 220px; max-height: 300px; min-height: 60px; } /* arborescence navigable (TR 09-11-2026) */
html.affichage2 .eq_docs_compl_enfant .explo_liste_zone { flex: 1 1 auto; min-width: 0; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; }
html.affichage2 .eq_docs_compl_enfant .explo_ariane { flex: 1 1 auto; min-width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; flex: 0 0 auto; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text { min-width: 0; height: 30px; padding-left: 6px; margin: 0; white-space: nowrap; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text > span { font-size: 13px; padding: 0 6px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text > i { width: 30px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .eq_explo_outils { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; padding: 0; flex: 0 0 auto; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .eq_explo_outils .dt-search input { width: 150px; height: 30px; }
html.affichage2 .eq_docs_compl_enfant .dt-scroll-body { height: auto !important; max-height: 300px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav { gap: 4px; }
html.affichage2 .eq_docs_compl_enfant .explo_ariane { min-width: 40px; flex: 0 1 auto; }
html.affichage2 .eq_docs_compl_enfant .explo_btn_copier_chemin { font-size: 0; } /* icône seule, libellé en infobulle */
html.affichage2 .eq_docs_compl_enfant .explo_btn_copier_chemin i { font-size: 13px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text > span { font-size: 12px; padding: 0 4px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .eq_explo_outils .dt-search input { width: 120px; }
html.affichage2 .eq_docs_compl_enfant :is(.explo_liste_conteneur, .explo_liste_conteneur .dt-container, .explo_liste_conteneur table.dataTable) { width: 100% !important; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .eq_explo_outils { width: auto !important; min-width: 0; padding: 0 !important; margin: 0 !important; justify-content: flex-start; flex: 0 0 auto !important; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .eq_explo_outils > * { margin: 0 !important; flex: 0 0 auto !important; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text > i { width: 26px; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav .explo_liste_actions .btn_action_text > span { padding: 0 3px; }
html.affichage2 .eq_docs_compl_enfant .explo_ariane { min-width: 30px; }
html.affichage2 .eq_docs_compl_enfant :is(.eq_docs_compl_integre, .explo_ged, .explo_barre_nav) { width: 100% !important; max-width: 100%; min-width: 0 !important; box-sizing: border-box; }
html.affichage2 .eq_docs_compl_enfant .explo_barre_nav { gap: 3px; overflow: hidden; }
html.affichage2 .eq_docs_compl_enfant .explo_ariane { flex: 1 1 30px; }
html.affichage2 .eq_docs_compl_enfant .explo_ged { display: block !important; }
html.affichage2 .eq_docs_compl_enfant .explo_apercu { display: none !important; } /* l'aperçu est celui de la page */
html.affichage2 .eq_docs_compl_enfant .explo_corps { width: 100% !important; margin: 4px 0 0 0 !important; }
/* TR 09-11-2026 - liste des équipements : page strictement fixe (ligne du titre, aperçu) ; seules les lignes du tableau défilent,
   docs techs complémentaires ouverts compris (ils sont dans le corps du tableau) */
@media (min-width: 1101px) {
    html.affichage2:has(.eq_liste_page), html.affichage2:has(.eq_liste_page) body { overflow: hidden !important; }
    html.affichage2 .eq_liste_page .liste_apercu_conteneur > .milieu_page { height: calc(100vh - var(--haut-barres) - 65px); overflow: hidden; }
}
