/* =====================================================================
   v68 — Design « moderne » (préférence « design » = moderne, classe body.design-moderne)
   Couleurs vives par domaine (--d, --bcg-domaine), cartes arrondies, ombres douces, animations.
   Les couleurs de base restent celles du thème (Paramètres → Apparence).
   ===================================================================== */

/* ---------- Barre de progression et transitions de page (tous designs) */
.bcg-progression { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, var(--bcg-primaire), var(--bcg-accent, #f59e0b)); box-shadow: 0 0 8px rgba(var(--bcg-primaire-rgb), .5); }
.bcg-progression.actif { opacity: 1; animation: bcg-progression 8s cubic-bezier(.1, .7, .2, 1) forwards; }
.bcg-progression.fin { width: 100% !important; animation: none; transition: width .2s ease, opacity .3s ease .15s; opacity: 0; }
@keyframes bcg-progression { 0% { width: 0; } 10% { width: 35%; } 40% { width: 70%; } 100% { width: 92%; } }
@view-transition { navigation: auto; }
.bcg-topbar { view-transition-name: bcg-topbar; }
.bcg-menu-haut { view-transition-name: bcg-menu; }
.bcg-sidebar { view-transition-name: bcg-sidebar; }
::view-transition-old(root) { animation: .12s ease both bcg-vt-sortie; }
::view-transition-new(root) { animation: .22s ease both bcg-vt-entree; }
@keyframes bcg-vt-sortie { to { opacity: 0; } }
@keyframes bcg-vt-entree { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* ---------- Bouton « + Nouveau » (tous designs) */
.bcg-btn-nouveau { border-radius: 999px; padding: .38rem .9rem; font-weight: 600; }
.bcg-menu-nouveau { width: min(30rem, 92vw); padding: .6rem; }
.bcg-menu-nouveau .grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem; }
.bcg-menu-nouveau .dropdown-item { display: flex; align-items: center; gap: .6rem; white-space: normal; padding: .45rem .55rem; }
.bcg-menu-nouveau .ic { width: 2rem; height: 2rem; border-radius: .6rem; display: grid; place-items: center; flex-shrink: 0;
  background: var(--bcg-primaire-clair); color: var(--bcg-primaire-texte); }
.bcg-table-raccourcis td:first-child { white-space: nowrap; width: 1%; padding-right: 1.25rem; }

/* =====================================================================
   Design moderne
   ===================================================================== */
body.design-moderne { --bcg-rayon: 1rem; --bcg-rayon-petit: .65rem;
  --bcg-ombre: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --bcg-ombre-survol: 0 10px 30px rgba(16,24,40,.12);
  --bcg-domaine: var(--bcg-primaire);
  background:
    radial-gradient(1200px 380px at 12% -120px, color-mix(in srgb, var(--bcg-domaine) 13%, transparent), transparent 70%),
    radial-gradient(900px 300px at 95% -140px, color-mix(in srgb, var(--bcg-primaire) 10%, transparent), transparent 70%),
    var(--bcg-fond);
  background-attachment: fixed; }

/* Barre du haut */
body.design-moderne .bcg-topbar { background: color-mix(in srgb, var(--bcg-surface) 80%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--bcg-bordure) 70%, transparent); }
body.design-moderne .bcg-btn-nouveau { background: linear-gradient(135deg, var(--bcg-primaire), color-mix(in srgb, var(--bcg-primaire) 65%, #ec4899));
  border: 0; box-shadow: 0 6px 16px rgba(var(--bcg-primaire-rgb), .35); transition: transform .15s ease, box-shadow .15s ease; }
body.design-moderne .bcg-btn-nouveau:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(var(--bcg-primaire-rgb), .4); }
body.design-moderne .bcg-recherche-rapide { background: var(--bcg-surface); box-shadow: inset 0 1px 2px rgba(16,24,40,.04); }

/* Menu par module (couleur du domaine) */
.bcg-menu-domaines { background: var(--bcg-surface); }
.bcg-menu-domaines .bcg-menu-haut-barre { gap: .25rem; padding: .4rem 1rem; min-height: 54px; align-items: center; }
.bcg-menu-domaines .item { border-radius: 999px; border-bottom: 0; padding: .4rem .75rem .4rem .4rem; height: auto; gap: .45rem; font-weight: 600; font-size: .9rem; color: var(--bcg-menu-texte); }
.bcg-menu-domaines .bcg-menu-haut-barre > a.item { padding-left: .8rem; }
.bcg-menu-domaines .item:hover, .bcg-menu-domaines .item[aria-expanded="true"] { background: color-mix(in srgb, var(--d, var(--bcg-primaire)) 10%, transparent); color: var(--bcg-texte); }
.bcg-menu-domaines .item.actif { background: color-mix(in srgb, var(--d, var(--bcg-primaire)) 14%, transparent); color: var(--d, var(--bcg-primaire-texte));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--d, var(--bcg-primaire)) 30%, transparent); }
.bcg-menu-domaines .pastille { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .9rem; flex-shrink: 0;
  background: color-mix(in srgb, var(--d) 14%, transparent); color: var(--d); transition: transform .2s ease, background .2s ease; }
.bcg-menu-domaines .item:hover .pastille, .bcg-menu-domaines .item[aria-expanded="true"] .pastille, .bcg-menu-domaines .item.actif .pastille { background: var(--d); color: #fff; }
.bcg-menu-domaines .item[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.bcg-menu-domaines .chevron { transition: transform .2s ease; }

.bcg-mega-module { white-space: normal; padding: 0; border-radius: 1.1rem; overflow: hidden; border: 1px solid var(--bcg-bordure);
  box-shadow: 0 24px 60px rgba(16,24,40,.18); width: 21rem; max-height: calc(100vh - 140px); overflow-y: auto; }
.bcg-mega-module[data-colonnes="2"] { width: 38rem; }
.bcg-mega-module[data-colonnes="3"] { width: 54rem; }
.bcg-mega-module.show { animation: bcg-fondu .16s ease both; }
.bcg-mega-module .entete { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem;
  background: linear-gradient(120deg, color-mix(in srgb, var(--d) 16%, var(--bcg-surface)), var(--bcg-surface) 75%); border-bottom: 1px solid var(--bcg-bordure); }
.bcg-mega-module .entete .titre { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.bcg-mega-module .pastille.grande { width: 2.6rem; height: 2.6rem; border-radius: .85rem; font-size: 1.2rem; background: var(--d); color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--d) 40%, transparent); display: grid; place-items: center; flex-shrink: 0; }
.bcg-mega-module .filtre { width: 11rem; }
.bcg-mega-module .filtre .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--bcg-texte-doux); font-size: .8rem; }
.bcg-mega-module .filtre input { padding-left: 1.9rem; border-radius: 999px; }
.bcg-mega-module .grille { display: grid; grid-template-columns: 1fr; gap: .1rem .75rem; padding: .7rem .8rem .9rem; }
.bcg-mega-module[data-colonnes="2"] .grille { grid-template-columns: 1fr 1fr; }
.bcg-mega-module[data-colonnes="3"] .grille { grid-template-columns: 1fr 1fr 1fr; }
.bcg-mega-module .lien { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: .7rem; color: var(--bcg-texte);
  font-size: .9rem; white-space: normal; transition: background .12s ease, transform .12s ease; }
.bcg-mega-module .lien .bi { width: 1.2rem; text-align: center; color: var(--bcg-texte-doux); }
.bcg-mega-module .lien:hover, .bcg-mega-module .lien:focus-visible { background: color-mix(in srgb, var(--d) 9%, transparent); color: var(--bcg-texte); transform: translateX(2px); }
.bcg-mega-module .lien:hover .bi, .bcg-mega-module .lien.active .bi { color: var(--d); }
.bcg-mega-module .lien.active { background: color-mix(in srgb, var(--d) 13%, transparent); color: var(--d); font-weight: 600; }
.bcg-mega-module .lien .bcg-compteur { margin-left: auto; }

/* Marque : nom du logiciel (la société connectée est affichée à côté) */
.bcg-marque-appli .logo { width: 2.2rem; height: 2.2rem; border-radius: .7rem; display: grid; place-items: center; font-weight: 800; color: var(--bcg-sur-primaire);
  background: linear-gradient(135deg, var(--bcg-primaire), color-mix(in srgb, var(--bcg-primaire) 60%, #ec4899)); box-shadow: 0 4px 12px rgba(var(--bcg-primaire-rgb), .3); }
.bcg-marque-appli .nom { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--bcg-texte); white-space: nowrap; }

/* Menu latéral (disposition « à gauche ») */
body.design-moderne .bcg-sidebar { background: var(--bcg-surface); border-right: 1px solid color-mix(in srgb, var(--bcg-bordure) 70%, transparent); }
body.design-moderne .bcg-sidebar .nav-link { border-radius: .65rem; }

/* En-tête des pages */
body.design-moderne .bcg-page-header h1 { font-size: 1.55rem; }
.bcg-ph-icone { width: 2.9rem; height: 2.9rem; border-radius: .95rem; display: grid; place-items: center; flex-shrink: 0; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, var(--bcg-domaine), color-mix(in srgb, var(--bcg-domaine) 70%, #000));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--bcg-domaine) 35%, transparent); }
body.design-moderne .bcg-page-header .breadcrumb-item.active { color: var(--bcg-domaine); font-weight: 600; }

/* Cartes, indicateurs, tableaux */
body.design-moderne .card { border-color: color-mix(in srgb, var(--bcg-bordure) 75%, transparent); box-shadow: var(--bcg-ombre); }
body.design-moderne .card-header { background: transparent; }
body.design-moderne .bcg-kpi { position: relative; overflow: hidden; }
body.design-moderne .bcg-kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--bcg-domaine), color-mix(in srgb, var(--bcg-domaine) 30%, transparent)); opacity: .85; }
body.design-moderne .bcg-kpi:hover, body.design-moderne a .bcg-kpi:hover, body.design-moderne a.card:hover { transform: translateY(-2px); box-shadow: var(--bcg-ombre-survol); }
body.design-moderne .bcg-table thead th { background: color-mix(in srgb, var(--bcg-domaine) 5%, var(--bcg-surface-2)); }
body.design-moderne .bcg-table tbody tr:hover > td { background: color-mix(in srgb, var(--bcg-domaine) 5%, var(--bcg-surface)); }
body.design-moderne .bcg-onglets a.active { color: var(--bcg-domaine); border-bottom-color: var(--bcg-domaine); }
body.design-moderne .btn { border-radius: .65rem; }
body.design-moderne .btn-primary { transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
body.design-moderne .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(var(--bcg-primaire-rgb), .3); }
body.design-moderne .form-control:focus, body.design-moderne .form-select:focus { box-shadow: 0 0 0 .22rem rgba(var(--bcg-primaire-rgb), .15); }
body.design-moderne .badge { letter-spacing: .02em; }

/* Animations d'apparition */
@keyframes bcg-apparition { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
/* v117 : « backwards » et non « both » — après l'animation aucune transformation ne reste, sinon chaque bloc formait une couche
   qui recouvrait les menus déroulants du bloc précédent (ex. « Journaux de saisie » caché sous le tableau de la trésorerie) */
body.design-moderne .bcg-contenu > * { animation: bcg-apparition .35s cubic-bezier(.2, .7, .2, 1) backwards; }
body.design-moderne .bcg-contenu > *:nth-child(2) { animation-delay: .04s; }
body.design-moderne .bcg-contenu > *:nth-child(3) { animation-delay: .08s; }
body.design-moderne .bcg-contenu > *:nth-child(4) { animation-delay: .12s; }
body.design-moderne .bcg-contenu > *:nth-child(n+5) { animation-delay: .16s; }
/* menus déroulants : fondu seulement (leur position est faite par « transform ») */
@keyframes bcg-fondu { from { opacity: 0; } to { opacity: 1; } }
body.design-moderne .dropdown-menu.show:not(.bcg-mega-domaine) { animation: bcg-fondu .14s ease both; }
body.design-moderne .modal.fade .modal-dialog { transition: transform .22s cubic-bezier(.2, .7, .2, 1), opacity .2s ease; transform: translateY(14px) scale(.98); }
body.design-moderne .modal.show .modal-dialog { transform: none; }
body.design-moderne .alert { animation: bcg-apparition .3s ease backwards; }
@media (prefers-reduced-motion: reduce) {
  body.design-moderne .bcg-contenu > *, body.design-moderne .dropdown-menu.show, .bcg-mega-domaine.show, body.design-moderne .alert { animation: none !important; }
}

/* ---------- Accueil : « Ma journée » */
.bcg-carte-journee .card-body { padding: 1.1rem 1.15rem; }
.bcg-ic-titre { width: 2rem; height: 2rem; border-radius: .65rem; display: grid; place-items: center; color: #fff; background: var(--d, var(--bcg-primaire)); }
.bcg-a-traiter { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: .7rem; text-decoration: none; color: var(--bcg-texte);
  transition: background .12s ease, transform .12s ease; }
.bcg-a-traiter:hover { background: color-mix(in srgb, var(--d) 9%, transparent); transform: translateX(2px); }
.bcg-a-traiter .ic { width: 1.9rem; height: 1.9rem; border-radius: .6rem; display: grid; place-items: center; color: var(--d); background: color-mix(in srgb, var(--d) 13%, transparent); }
.bcg-a-traiter .nb { min-width: 1.8rem; text-align: center; font-weight: 800; font-size: .8rem; padding: .15rem .5rem; border-radius: 999px; background: var(--d); color: #fff; }
.bcg-tout-va-bien { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: .8rem; background: var(--bcg-succes-fond); color: var(--bcg-succes); }
.bcg-tout-va-bien .bi { font-size: 1.6rem; }
.bcg-tout-va-bien .text-secondary { color: inherit !important; opacity: .8; }
.bcg-actions-rapides { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .45rem; }
.bcg-actions-rapides a { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .65rem .7rem; border-radius: .8rem; text-decoration: none;
  color: var(--bcg-texte); font-size: .84rem; font-weight: 600; border: 1px solid var(--bcg-bordure); background: var(--bcg-surface); transition: all .15s ease; }
.bcg-actions-rapides a:hover { border-color: var(--bcg-primaire); background: var(--bcg-primaire-clair); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(var(--bcg-primaire-rgb), .15); }
.bcg-actions-rapides .ic { width: 2rem; height: 2rem; border-radius: .6rem; display: grid; place-items: center; background: var(--bcg-primaire-clair); color: var(--bcg-primaire-texte); }
.bcg-actions-rapides a:hover .ic { background: var(--bcg-primaire); color: var(--bcg-sur-primaire); }
.bcg-recents { display: flex; flex-direction: column; gap: .15rem; }
.bcg-recent { display: flex; align-items: center; gap: .6rem; padding: .42rem .55rem; border-radius: .65rem; text-decoration: none; color: var(--bcg-texte); font-size: .875rem; }
.bcg-recent:hover { background: color-mix(in srgb, var(--d, var(--bcg-primaire)) 9%, transparent); }
.bcg-recent .ic { width: 1.8rem; height: 1.8rem; border-radius: .55rem; display: grid; place-items: center; flex-shrink: 0;
  color: var(--d, var(--bcg-primaire-texte)); background: color-mix(in srgb, var(--d, var(--bcg-primaire)) 13%, transparent); }
.bcg-recent .lib { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcg-domaines-accueil { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.bcg-tuile-domaine { border-radius: 1rem; background: var(--bcg-surface); border: 1px solid color-mix(in srgb, var(--bcg-bordure) 75%, transparent); box-shadow: var(--bcg-ombre);
  overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.bcg-tuile-domaine:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--d) 18%, transparent); }
.bcg-tuile-domaine .tete { display: flex; align-items: center; gap: .65rem; padding: .8rem .95rem;
  background: linear-gradient(120deg, color-mix(in srgb, var(--d) 15%, var(--bcg-surface)), var(--bcg-surface)); }
.bcg-tuile-domaine .tete .ic { width: 2.2rem; height: 2.2rem; border-radius: .75rem; display: grid; place-items: center; background: var(--d); color: #fff; font-size: 1.05rem; }
.bcg-tuile-domaine .nom { font-weight: 800; }
.bcg-tuile-domaine .liens { display: flex; flex-wrap: wrap; gap: .3rem; padding: .65rem .8rem .85rem; }
.bcg-tuile-domaine .liens a { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; text-decoration: none; padding: .25rem .6rem;
  border-radius: 999px; color: var(--d); background: color-mix(in srgb, var(--d) 9%, transparent); transition: background .12s ease; }
.bcg-tuile-domaine .liens a:hover { background: var(--d); color: #fff; }

/* Mode sombre */
[data-bs-theme="dark"] body.design-moderne .bcg-mega-domaine { box-shadow: 0 24px 60px rgba(0,0,0,.55); }
@media print { .bcg-progression { display: none !important; } body.design-moderne { background: #fff; } body.design-moderne .bcg-contenu > * { animation: none !important; } }

/* ---------- Plus d'air (design moderne) : texte plus grand, champs, tableaux et formulaires plus espacés */
body.design-moderne { font-size: .95rem; }
body.design-moderne .bcg-contenu { padding-top: 1.6rem; }
body.design-moderne .form-control, body.design-moderne .form-select { padding-top: .55rem; padding-bottom: .55rem; font-size: .93rem; }
body.design-moderne .form-control-sm, body.design-moderne .form-select-sm { padding-top: .3rem; padding-bottom: .3rem; font-size: .84rem; }
body.design-moderne .form-label { font-size: .85rem; margin-bottom: .4rem; }
body.design-moderne .bcg-table tbody td { padding-top: .8rem; padding-bottom: .8rem; }
body.design-moderne .card-body { padding: 1.35rem; }
body.design-moderne .modal-body { padding: 1.6rem 1.75rem; }
body.design-moderne .modal-body > .row { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.1rem; }
/* Formulaires : au plus 3 champs par ligne, sections en bandeaux */
@media (min-width: 768px) {
  body.design-moderne .modal-body .row > .col-md-3 { width: 33.3333%; }
  body.design-moderne .modal-body .row > .col-md-2 { width: 25%; }
}
body.design-moderne .bcg-section-form { margin: 1.6rem -.25rem .3rem; padding: .6rem .9rem; border: 0; border-radius: .7rem; font-size: .74rem;
  background: color-mix(in srgb, var(--bcg-domaine) 8%, var(--bcg-surface-2)); color: var(--bcg-domaine); border-left: 4px solid var(--bcg-domaine); }
body.design-moderne .modal-body .row > .col-12:first-child .bcg-section-form { margin-top: 0; }
.bcg-tableau-lignes .table td { vertical-align: middle; }
.bcg-tableau-lignes .table input[type=date] { min-width: 9.5rem; }

/* ---------- Saisie par journal (présentation des logiciels comptables classiques) */
.bcg-sj { --sj-vert: #2e9e4f; --sj-vert-fond: color-mix(in srgb, #2e9e4f 16%, var(--bcg-surface)); --sj-entete: #3a3d42; }
.bcg-sj .sj-haut { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; justify-content: space-between; margin-bottom: .9rem; }
.bcg-sj .sj-choix { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.bcg-sj .sj-choix label { display: block; font-size: .78rem; color: var(--bcg-texte-doux); margin-bottom: .2rem; }
.bcg-sj .sj-choix select { min-width: 18rem; }
.bcg-sj .sj-contrepartie { font-size: .8rem; color: var(--bcg-texte-doux); align-self: center; }
.bcg-sj .sj-soldes { display: grid; grid-template-columns: auto 10rem 10rem; border: 1px solid var(--bcg-bordure); border-radius: .5rem; overflow: hidden;
  background: var(--bcg-surface-3); font-size: .9rem; min-width: 30rem; }
.bcg-sj .sj-soldes > div { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .8rem; }
.bcg-sj .sj-soldes .lib { text-align: right; }
.bcg-sj .sj-soldes .lib .ancien { color: var(--sj-vert); }
.bcg-sj .sj-soldes .col-d, .bcg-sj .sj-soldes .col-c { border-left: 1px solid var(--bcg-bordure); text-align: right; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--bcg-surface-3) 60%, var(--bcg-surface)); }
.bcg-sj .sj-soldes span { min-height: 1.35rem; }
.bcg-sj .sj-modele { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 0; }
.bcg-sj .sj-modele label { font-size: .88rem; }
.bcg-sj .sj-modele select { width: 13rem; }
.bcg-sj .sj-modele input { flex: 1 1 18rem; }
.bcg-sj .sj-ligne { display: grid; grid-template-columns: 3.5rem 9.5rem 7rem 7rem 8rem 8rem minmax(12rem, 1fr) 9rem 7.5rem 7.5rem; gap: .25rem;
  padding: .45rem 0; border-top: 1px solid var(--bcg-bordure); overflow-x: auto; }
.bcg-sj .sj-ligne .form-control { border-radius: .2rem; }
.bcg-sj .sj-boutons { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; padding: .25rem 0 .6rem; }
.bcg-sj .sj-boutons .btn { border-radius: .2rem; }
.bcg-sj .sj-grille { border: 1px solid var(--bcg-bordure); max-height: 58vh; overflow: auto; background: var(--bcg-surface); }
.bcg-sj .sj-grille table { font-size: .88rem; white-space: nowrap; }
.bcg-sj .sj-grille thead th { position: sticky; top: 0; z-index: 2; background: var(--sj-entete); color: #fff; font-weight: 500; border-right: 1px solid #55595f; padding: .4rem .55rem; }
.bcg-sj .sj-grille tbody td { padding: .28rem .55rem; border-right: 1px solid var(--bcg-bordure); border-bottom: 0; }
.bcg-sj .sj-grille tbody tr:nth-child(even) td { background: var(--bcg-surface-2); }
.bcg-sj .sj-grille tbody tr:hover td { background: color-mix(in srgb, var(--bcg-primaire) 7%, var(--bcg-surface)); }
.bcg-sj .sj-grille tr.brouillard td { color: #8a5a00; }
.bcg-sj .sj-grille tr.sj-attente td { background: color-mix(in srgb, #0ea5e9 10%, var(--bcg-surface)) !important; cursor: pointer; }
.bcg-sj .sj-grille tr.sj-attente.choisie td { font-weight: 600; }
.bcg-sj .sj-grille tr.sj-attente.contrepartie td { color: var(--bcg-texte-doux); cursor: default; }
.bcg-sj .sj-grille tr.sj-vide-ligne td { height: 1.85rem; }
.bcg-sj .sj-pied { display: grid; grid-template-columns: 1fr minmax(28rem, 1fr); gap: .5rem; margin-top: .5rem; }
.bcg-sj .sj-pied > div { border: 1px solid var(--sj-vert); border-radius: .35rem; padding: .5rem .75rem; font-size: .9rem; }
.bcg-sj .sj-pied-totaux { display: grid; grid-template-columns: auto 1fr 1fr; padding: 0 !important; overflow: hidden; background: var(--sj-vert-fond); }
.bcg-sj .sj-pied-totaux > div { display: flex; flex-direction: column; padding: .45rem .75rem; text-align: right; font-variant-numeric: tabular-nums; }
.bcg-sj .sj-pied-totaux .val { border-left: 1px solid var(--sj-vert); }
.bcg-sj .sj-pied-totaux span, .bcg-sj .sj-pied-totaux strong { min-height: 1.35rem; }
@media (max-width: 991.98px) { .bcg-sj .sj-soldes { min-width: 0; width: 100%; } .bcg-sj .sj-pied { grid-template-columns: 1fr; } }

/* ---------- Pied de page fixe (bandeau d'abonnement), sur toutes les pages */
.bcg-pied-fixe { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; margin: 0 !important; border-radius: 0 !important;
  padding: .45rem 1.25rem !important; font-size: .85rem; border-top: 1px solid var(--bcg-bordure);
  background: color-mix(in srgb, var(--bcg-surface) 92%, transparent) !important; backdrop-filter: blur(8px); box-shadow: 0 -4px 16px rgba(16,24,40,.06); }
body:has(.bcg-pied-fixe) .bcg-contenu { padding-bottom: 4rem; }
@media (min-width: 992px) { body.menu-gauche .bcg-pied-fixe { left: var(--bcg-sidebar-largeur); } }
@media print { .bcg-pied-fixe { display: none !important; } }

/* Âge calculé sous les dates de naissance */
.bcg-age { font-size: .76rem; color: var(--bcg-primaire-texte); font-weight: 600; margin-top: .2rem; min-height: 0; }
.bcg-age:empty { display: none; }
.bcg-sj .sj-ligne .sj-auto { background: var(--bcg-surface-3); color: var(--bcg-texte-doux); font-weight: 600; cursor: default; }
/* Saisie par journal : totaux toujours visibles, lignes cliquables */
.bcg-sj .sj-pied { position: sticky; bottom: 0; z-index: 3; background: var(--bcg-fond); padding: .5rem 0; margin-top: 0; }
body:has(.bcg-pied-fixe) .bcg-sj .sj-pied { bottom: 2.75rem; }
.bcg-sj .sj-grille tr.sj-ligne-ecriture { cursor: pointer; }
.bcg-sj .sj-grille tr.sj-ligne-ecriture:focus-visible td { outline: 0; background: color-mix(in srgb, var(--bcg-primaire) 12%, var(--bcg-surface)) !important; }
.bcg-sj .sj-grille tr.choisie-enr td { background: color-mix(in srgb, var(--bcg-primaire) 16%, var(--bcg-surface)) !important; font-weight: 600; }

/* Menu « Plus » : blocs par module en colonnes, défilement si trop long, au-dessus du pied de page fixe */
.bcg-menu-haut .dropdown-menu { z-index: 1045; }
.bcg-menu-haut [data-plus-menu] { columns: auto; column-count: auto; display: none; width: min(56rem, calc(100vw - 2rem)); min-width: 0;
  max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; padding: .5rem; }
.bcg-menu-haut [data-plus-menu].show { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .25rem .75rem; align-items: start; }
.bcg-menu-haut [data-plus-menu] .bcg-plus-bloc { min-width: 0; padding-bottom: .4rem; }
.bcg-menu-haut [data-plus-menu] .dropdown-item { white-space: normal; }
.bcg-mega-module, .bcg-menu-haut [data-favoris-menu] { max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; }
body:has(.bcg-pied-fixe) .bcg-menu-haut [data-plus-menu], body:has(.bcg-pied-fixe) .bcg-mega-module { max-height: calc(100vh - 200px); }
.bcg-menu-haut [data-plus-menu] .bcg-plus-filtre { grid-column: 1 / -1; position: sticky; top: -.5rem; z-index: 2; background: var(--bcg-surface); padding: .25rem 0 .5rem; }
.bcg-menu-haut [data-plus-menu] .bcg-plus-filtre .bi { position: absolute; left: .7rem; top: .78rem; font-size: .8rem; color: var(--bcg-texte-doux); }
.bcg-menu-haut [data-plus-menu] .bcg-plus-filtre input { padding-left: 2rem; border-radius: 999px; }

/* v72 : menu du haut en icônes seules (préférence « Menu du haut ») — le nom s'affiche au survol et en tête du menu ouvert */
body.barre-icones .bcg-menu-domaines .item .libelle-barre, body.barre-icones .bcg-menu-domaines .item .chevron { display: none; }
body.barre-icones .bcg-menu-domaines .bcg-menu-haut-barre { gap: .15rem; }
body.barre-icones .bcg-menu-domaines .item { padding-inline: .35rem; position: relative; }
body.barre-icones .bcg-menu-domaines .item .pastille { width: 2.15rem; height: 2.15rem; font-size: 1.05rem; }
body.barre-icones .bcg-menu-domaines .item.actif .pastille { box-shadow: 0 0 0 2px var(--d, var(--bcg-primaire)); }
body.barre-icones .bcg-menu-domaines .item > .bcg-compteur { position: absolute; top: -.1rem; right: -.1rem; transform: scale(.85); }

/* v76b — menus des modules en rubriques titrées (Opérations, Trésorerie, Suivi et rapports, Paramétrage) */
.bcg-mega-module[data-rubriques][data-colonnes="4"] { width: min(72rem, calc(100vw - 2rem)); }
.bcg-mega-module[data-rubriques][data-colonnes="4"] .grille { grid-template-columns: repeat(4, 1fr); }
.bcg-mega-module .grille.rubriques { align-items: start; gap: .25rem 1rem; }
.bcg-mega-module .rubrique { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bcg-mega-module .rubrique + .rubrique { border-left: 1px solid var(--bcg-bordure); padding-left: .9rem; }
.bcg-mega-module .titre-rubrique { display: flex; align-items: center; gap: .45rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--d); padding: .35rem .65rem .45rem; }
.bcg-mega-module .titre-rubrique .bi { font-size: .85rem; }
.bcg-mega-module .rubrique .lien { padding: .45rem .65rem; }
.bcg-mega-module .rubrique:not(:has(.lien:not([hidden]):not(.d-none))) { display: none; }
