/* CJ Facturation – devis, factures, avoirs, provisions, barème. */
.cj-champ :is(input[type=text], input[type=date], input[type=number], select, textarea) {
	width: 100%; max-width: 100%; min-height: 40px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 6px 10px; font-size: 14px; font-family: inherit; background: #fff; color: inherit; box-sizing: border-box;
}
.cj-champ :is(input, select, textarea):focus, .cjb-lignes :is(input, select):focus { border-color: #23417a; box-shadow: 0 0 0 2px rgba(35, 65, 122, .15); outline: none; }
.cjb-onglets { flex-wrap: wrap; }
.cjb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.cjb-actions form { margin: 0; }
.cjb-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.cjb-chiffres > .cj-carte { margin: 0; display: flex; flex-direction: column; gap: 2px; border-top: 4px solid #23417a; }
.cjb-chiffres span { font-size: 13px; color: #5b6475; }
.cjb-chiffres strong { font-size: 21px; color: #14284b; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cjb-chiffres small { font-size: 12px; color: #6b7385; }
.cjb-chiffres .cjb-rouge { border-top-color: #c0392b; }
.cjb-chiffres .cjb-vert { border-top-color: #1e6b45; }
.cjb-chiffres .cjb-orange { border-top-color: #b9770e; }
.cjb-alerte-carte { border-left: 4px solid #b9770e; }
.cjb-alerte-carte h2 .dashicons { color: #b9770e; }
.cjb-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.cjb-deux > .cj-carte { margin: 0; }
.cjb-entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.cjb-entete .cjb-actions { margin: 0; }
.cjb-table-wrap { width: 100%; overflow-x: auto; }
.cjb-table td, .cjb-lignes td { vertical-align: top; }
.cjb-d { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cjb-annule td { color: #8a93a3; }
.cjb-annule td:nth-child(3) { text-decoration: line-through; }
.cjb-somme { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.cjb-somme td { padding: 7px 4px; border-bottom: 1px solid #eef1f5; }
.cjb-somme td:last-child { text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cjb-infos td:last-child { text-align: left; }
.cjb-infos td:first-child { color: #5b6475; width: 34%; }
.cjb-fort td { border-top: 2px solid #14284b; font-weight: 700; color: #14284b; }
.cjb-liste-simple { list-style: none; margin: 0; padding: 0; }
.cjb-liste-simple li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.cjb-liste-simple a { color: #14284b; }
.cjb-ligne { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.cjb-ligne :is(input[type=text], select) { min-height: 36px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 4px 8px; font: inherit; font-size: 13px; background: #fff; max-width: 100%; }
.cjb-ligne input[type=text] { flex: 1 1 160px; }
.cjb-act { white-space: nowrap; }
.cjb-annul > summary { list-style: none; display: inline-flex; cursor: pointer; }
.cjb-annul > summary::-webkit-details-marker { display: none; }
.cjb-annul[open] { white-space: normal; }
.cjb-annul-doc { margin: 0 0 12px; }
.cjb-volet > summary { list-style: none; cursor: pointer; }
.cjb-volet > summary::-webkit-details-marker { display: none; }
.cjb-volet > summary h2 { display: inline-block; margin: 0; }
.cjb-volet > summary h2::before { content: "▸ "; color: #b8892b; }
.cjb-volet[open] > summary h2::before { content: "▾ "; }
.cjb-natures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.cjb-nat { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #c3cbd8; border-radius: 9px; cursor: pointer; background: #fff; }
.cjb-nat:has(input:checked) { border-color: #23417a; background: #f1f4fa; box-shadow: 0 0 0 1px #23417a; }
.cjb-nat span { display: flex; flex-direction: column; }
.cjb-nat small { color: #5b6475; font-size: 12.5px; }
.cjb-nat.cjb-inactif { opacity: .55; cursor: not-allowed; }
.cjb-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cjb-grille .cj-large { grid-column: 1 / -1; }
.cjb-gros { font-size: 18px !important; font-weight: 600; }
.cjb-paiement { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.cjb-paiement h3 { margin: 0 0 10px; font-size: 15px; color: #14284b; }
.cjb-boutons { margin: 4px 0 14px; }
.cjb-supprimer { margin-bottom: 20px; }
.cjb-filtres { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 12px; align-items: end; }
.cjb-filtre-bouton { align-self: end; }
.cjb-empreinte code { font-size: 11px; }
/* Lignes de facture */
.cjb-lignes { min-width: 720px; }
.cjb-lignes td { padding: 6px 4px; }
.cjb-lignes :is(input[type=text], select) { width: 100%; min-height: 38px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 4px 8px; font: inherit; font-size: 13.5px; background: #fff; box-sizing: border-box; }
.cjb-lignes td:nth-child(1) { width: 17%; }
.cjb-lignes td:nth-child(3) { width: 8%; }
.cjb-lignes td:nth-child(4) { width: 15%; }
.cjb-lignes td:nth-child(5) { width: 8%; white-space: nowrap; }
.cjb-lignes td:nth-child(6) { width: 13%; padding-top: 14px; }
.cjb-lignes .cjb-qte, .cjb-lignes .cjb-montant { text-align: right; }
[data-cjb-totaux] { max-width: 420px; margin-left: auto; }
/* Barème */
.cjb-bar { padding: 0; }
.cjb-bar > summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cjb-bar > summary::-webkit-details-marker { display: none; }
.cjb-bar > summary::before { content: "▸"; color: #b8892b; margin-right: -4px; }
.cjb-bar[open] > summary::before { content: "▾"; }
.cjb-bar-titre { flex: 1 1 260px; }
.cjb-bar-form { padding: 0 16px 16px; }
.cjb-bar-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cjb-tranches { margin: 4px 0 12px; padding: 10px 12px; background: #f6f8fb; border-radius: 9px; }
.cjb-tranches p { margin: 0 0 8px; }
.cjb-tranche { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; margin-bottom: 6px; }
.cjb-tranche label { display: flex; flex-direction: column; font-size: 12.5px; color: #5b6475; gap: 3px; }
.cjb-tranche input { min-height: 38px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 4px 8px; font: inherit; background: #fff; width: 100%; box-sizing: border-box; }
.cjb-volet-acte .cjb-cout { font-size: 20px; font-weight: 700; color: #14284b; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cjb-volet-acte .cjb-cout .cj-statut { font-size: 12px; font-weight: 600; }
.cjb-volet-acte form { margin-top: 8px; }
@media (max-width: 960px) {
	.cjb-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.cjb-deux, .cjb-natures, .cjb-filtres { grid-template-columns: minmax(0, 1fr) !important; }
	.cjb-grille { grid-template-columns: minmax(0, 1fr) !important; }
	.cj-champ :is(input[type=text], input[type=date], input[type=number], select, textarea), .cjb-ligne :is(input, select), .cjb-tranche input { font-size: 16px; }
	.cjb-chiffres strong { font-size: 18px; }
	/* Tableaux en cartes */
	.cjb-table thead, .cjb-lignes thead { display: none; }
	.cjb-table, .cjb-table tbody, .cjb-table tr, .cjb-table td, .cjb-lignes, .cjb-lignes tbody, .cjb-lignes tr, .cjb-lignes td { display: block; width: 100% !important; box-sizing: border-box; }
	.cjb-lignes { min-width: 0; }
	.cjb-table tr, .cjb-lignes tr { border: 1px solid #e3e7ee; border-radius: 9px; margin-bottom: 10px; padding: 6px 10px; }
	.cjb-table td, .cjb-lignes td { border: 0 !important; padding: 4px 0 !important; text-align: left; white-space: normal; }
	.cjb-table td[data-label]::before, .cjb-lignes td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: #6b7385; text-transform: uppercase; letter-spacing: .03em; }
	.cjb-lignes .cjb-qte, .cjb-lignes .cjb-montant { text-align: left; font-size: 16px; }
	.cjb-lignes :is(input[type=text], select) { font-size: 16px; }
	.cjb-act { white-space: normal; }
	[data-cjb-totaux] { max-width: none; }
}
