/* HARVESTSOFT Finance – feuille de style */
:root { --tbf-primary: #305446; --tbf-side: #1f3a30; --hs-gold: #a98425; --hs-gold-clair: #e1bf62; --hs-vert: #305446; --hs-creme: #f3f0e4; }
body { background: #f4f6f9; font-size: .9rem; }
.sidebar { width: 245px; min-height: 100vh; background: var(--tbf-side); color: #cfd9e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.sidebar .brand { background: rgba(0,0,0,.18); color: #fff; }
.sidebar .menu-title { text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; padding: .8rem 1rem .25rem; color: #8fa7c0; }
.sidebar .menu-link { display: block; padding: .32rem 1rem; color: #dbe5f0; text-decoration: none; font-size: .85rem; border-left: 3px solid transparent; }
.sidebar .menu-link i { width: 1.3rem; display: inline-block; opacity: .85; }
.sidebar .menu-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .menu-link.active { background: rgba(255,255,255,.12); border-left-color: #6cb2ff; color: #fff; }
.main { min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e3e7ec; position: sticky; top: 0; z-index: 1020; }
.card { border-color: #e3e7ec; }
.kpi .fs-5 { color: var(--tbf-primary); }
.kpi.negatif .fs-5, .text-negatif { color: #b02a37 !important; }
table.grid { font-size: .82rem; margin-bottom: 0; }
table.grid th { white-space: nowrap; font-weight: 600; font-size: .76rem; }
.table-responsive { max-height: 72vh; }
tr.genere td { background-color: #eef5ff !important; }
tr.annule td { text-decoration: line-through; color: #999; }
tr.anomalie td:first-child { box-shadow: inset 3px 0 0 #dc3545; }
tr.report td { background: #fffbe6 !important; font-style: italic; }
.badge.text-wrap { max-width: 260px; font-weight: 500; }
.filters .form-select, .filters .form-control { min-width: 120px; }
.ts-wrapper.form-select-sm .ts-control { padding: .2rem .5rem; min-height: calc(1.5em + .5rem + 2px); font-size: .875rem; }
.quick .card-body { background: #fbfcfe; }
.public { background: linear-gradient(160deg, #e9f0f8, #f8fafc); min-height: 100vh; }
.matrice td, .matrice th { text-align: center; }
.step { display: inline-block; padding: .2rem .6rem; border-radius: 1rem; background: #e9ecef; margin-right: .3rem; font-size: .8rem; }
.step.on { background: var(--tbf-primary); color: #fff; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -260px; z-index: 1040; transition: left .2s; }
  .sidebar.show { left: 0; }
}
@media print {
  body { background: #fff; }
  .card { border: 0; }
  .table-responsive { max-height: none; overflow: visible; }
}

.brand-name { letter-spacing: .02em; }
.brand-mark, .brand-logo { display: inline-flex; align-items: center; justify-content: center; background: var(--hs-gold); color: #133b26; font-weight: 800; border-radius: 6px; }
.brand-mark { width: 24px; height: 24px; font-size: 15px; margin-right: 4px; }
.brand-logo { width: 56px; height: 56px; font-size: 32px; border-radius: 12px; }
.brand-sub { color: var(--hs-gold); font-weight: 600; }
.sidebar .menu-link.active { border-left-color: var(--hs-gold); }
.btn-primary { --bs-btn-bg: #305446; --bs-btn-border-color: #305446; --bs-btn-hover-bg: #26443a; --bs-btn-hover-border-color: #26443a; --bs-btn-active-bg: #1f3a30; --bs-btn-disabled-bg: #305446; }
.btn-outline-primary { --bs-btn-color: #305446; --bs-btn-border-color: #305446; --bs-btn-hover-bg: #305446; --bs-btn-hover-border-color: #305446; --bs-btn-active-bg: #26443a; }
.sidebar details > summary { list-style: none; cursor: pointer; }
.sidebar details > summary::-webkit-details-marker { display: none; }
.sidebar details[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.lettres { font-style: italic; }
.fiche-print { max-width: 800px; margin: auto; }
.pivot td, .pivot th { white-space: nowrap; }
.tree-1 { padding-left: 1.2rem !important; } .tree-2 { padding-left: 2.4rem !important; }

/* ---------------------------------------------------------------- v0.4 : identité HARVESTSOFT Finance et navigation */
a { color: #2c6a55; }
.text-gold { color: var(--hs-gold) !important; }
.btn-gold { --bs-btn-color: #fff; --bs-btn-bg: var(--hs-gold); --bs-btn-border-color: var(--hs-gold); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #8f6f1d; --bs-btn-hover-border-color: #8f6f1d; --bs-btn-active-bg: #7c6019; --bs-btn-active-color: #fff; }
.sidebar { width: 262px; background: linear-gradient(180deg, #23443a 0%, var(--tbf-side) 55%, #182f27 100%); display: flex; flex-direction: column; }
.sidebar .brand { background: transparent; border-bottom: 1px solid rgba(225,191,98,.18); }
.brand-logo-img { width: 100%; max-width: 220px; height: auto; display: block; }
.brand-entreprise { color: #c9d6cf; }
.menu-recherche { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.menu-recherche::placeholder { color: #9fb3aa; }
.menu-recherche:focus { background: rgba(255,255,255,.14); color: #fff; border-color: var(--hs-gold-clair); box-shadow: none; }
.sidebar .menu { flex: 1 1 auto; padding-bottom: .5rem; }
.sidebar .menu-groupe { border-bottom: 1px solid rgba(255,255,255,.05); }
.sidebar .menu-title { display: flex; align-items: center; gap: .55rem; text-transform: none; font-size: .84rem; letter-spacing: 0; font-weight: 600; color: #e9efe9; padding: .55rem 1rem; }
.sidebar .menu-title > .bi:first-child { color: var(--hs-gold-clair); width: 1.1rem; }
.sidebar .menu-title .bi-chevron-down { font-size: .7rem; opacity: .6; transition: transform .15s; }
.sidebar .menu-title:hover { background: rgba(255,255,255,.05); }
.sidebar details[open] > summary { color: #fff; }
.sidebar .menu-link { padding: .28rem 1rem .28rem 2.35rem; font-size: .82rem; color: #cfdcd5; }
.sidebar .menu-link i { width: 1.25rem; font-size: .85rem; }
.sidebar .menu-link.active { background: rgba(225,191,98,.14); border-left-color: var(--hs-gold-clair); color: #fff; font-weight: 600; }
.sidebar .menu-cta { color: var(--hs-gold-clair); font-weight: 600; }
.sidebar .menu-cta:hover { color: #fff; }
.sidebar-pied { color: #8ea89c; border-top: 1px solid rgba(255,255,255,.06); font-size: .7rem; }
.topbar { border-bottom: 2px solid var(--hs-gold); }
.kpi { border-left: 3px solid var(--hs-gold); }
.nav-tabs .nav-link.active { color: var(--hs-vert); font-weight: 600; border-top: 2px solid var(--hs-gold); }
.nav-tabs .nav-link { color: #4a5f57; }
/* fenêtre de décaissement */
.fenetre .card-header { background: linear-gradient(90deg, var(--hs-creme), #fff); }
.section-titre { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hs-vert); font-weight: 700; border-bottom: 1px solid #e6e2d3; padding-bottom: .2rem; margin-bottom: .6rem; }
.plan-section select:invalid { border-color: #dc3545; }
.pj-zone input[type=file] { background: #fbfaf5; }
.public { background: radial-gradient(1200px 600px at 10% 0%, #f3f0e4 0%, #eef3f0 45%, #f8fafc 100%); }
.login-logo { width: 100%; max-width: 340px; height: auto; }
@media (max-width: 991.98px) { .sidebar { left: -280px; width: 262px; } }
