/* ---------- Jetons ---------- */
:root {
  --encre: #1f2a37;
  --encre-douce: #5b6673;
  --trait: #d9dde2;
  --fond: #ffffff;
  --fond-bande: #f6f7f8;
  --vert: #1f6e4a;
  --vert-fond: #e8f1ec;
  --rouille: #a5432b;
  --focus: #1f6e4a;
  --police: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--police);
  color: var(--encre);
  background: var(--fond);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

a { color: var(--vert); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.entete {
  border-bottom: 1px solid var(--trait);
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}
.entete .dossier { font-weight: 600; margin-right: auto; }
.entete .dossier > a { color: var(--encre); }
.entete .dossier small { font-weight: 400; color: var(--encre-douce); margin-left: 0.5rem; }
.entete nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.entete nav a { color: var(--encre); }
.entete nav a.actif { color: var(--vert); font-weight: 600; }
.loupe { display: flex; gap: 0.25rem; flex: 1 1 100%; }
.loupe input {
  flex: 1; font: inherit; padding: 0.4rem 0.6rem;
  border: 1px solid var(--trait); border-radius: 4px; min-width: 0;
}
@media (min-width: 720px) {
  .loupe { flex: 0 1 18rem; }
}

/* ---------- Contenu ---------- */
main { padding: 1rem; max-width: 72rem; margin: 0 auto; }
h1 { font-size: 1.35rem; font-weight: 600; margin: 0.25rem 0 0.75rem; }
h1 small { font-weight: 400; color: var(--encre-douce); font-size: 0.95rem; display: block; }

.filtres {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: end;
  padding: 0.75rem; background: var(--fond-bande); border-radius: 6px; margin-bottom: 1rem;
}
.filtres label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--encre-douce); gap: 0.2rem; }
.filtres label.ligne { flex-direction: row; align-items: center; gap: 0.4rem; padding-bottom: 0.45rem; }
.filtres select, .filtres input[type=date] {
  font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--trait); border-radius: 4px; background: #fff;
}
.bouton {
  font: inherit; padding: 0.45rem 0.9rem; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--vert); background: var(--vert); color: #fff;
}
.bouton.secondaire { background: #fff; color: var(--vert); }

.avis { padding: 0.6rem 0.9rem; border-left: 4px solid var(--rouille); background: #fbf3f0; margin-bottom: 1rem; }
.avis.success, .avis.info { border-color: var(--vert); background: var(--vert-fond); }
.bouton.danger { background: var(--rouille); border-color: var(--rouille); }

/* ---------- Tableaux ---------- */
.tableau { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { text-align: left; font-weight: 600; color: var(--encre-douce); font-size: 0.85rem; position: sticky; top: 0; background: #fff; }
.tableau .num { text-align: right; white-space: nowrap; }
.tableau th.num { text-align: right; }
.tableau .credit { color: var(--encre); }
.tableau .negatif { color: var(--rouille); }
.tableau tr.classe td { background: var(--fond-bande); font-weight: 600; }
.tableau tr.total td { border-top: 2px solid var(--encre); border-bottom: 0; font-weight: 600; }
.tableau .compte b { font-weight: 600; }
.tableau .compte span { display: block; color: var(--encre-douce); font-size: 0.85rem; }
.tableau .date { white-space: nowrap; }
.tableau .lib small { display: block; color: var(--encre-douce); }
.brouillard { color: var(--rouille); font-size: 0.8rem; font-weight: 600; }
.etiquette { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--vert-fond); color: var(--vert); font-size: 0.8rem; }
.etiquette.brouillard { background: #fbf3f0; color: var(--rouille); }

/* Mobile : on masque les colonnes secondaires */
@media (max-width: 600px) {
  main { padding: 0.5rem; }
  .tableau th, .tableau td { padding: 0.4rem 0.3rem; font-size: 0.92rem; }
  .masque-mobile { display: none; }
}

/* ---------- Écrans pleine page (connexion, dossiers) ---------- */
.carte { max-width: 22rem; margin: 3rem auto; padding: 1.5rem; border: 1px solid var(--trait); border-radius: 8px; }
.carte h1 { margin-top: 0; }
.carte label { display: block; margin-bottom: 0.75rem; }
.carte input { display: block; width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--trait); border-radius: 4px; margin-top: 0.25rem; }
.liste-dossiers { list-style: none; padding: 0; margin: 0; }
.liste-dossiers li { margin-bottom: 0.5rem; }
.liste-dossiers button { width: 100%; text-align: left; }

.fiche dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.fiche dt { color: var(--encre-douce); }
.fiche dd { margin: 0; }

/* ---------- Saisie ---------- */
.journaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; margin-bottom: 1.5rem; }
.journaux a { display: block; padding: 0.9rem 1rem; border: 1px solid var(--trait); border-radius: 6px; color: var(--encre); }
.journaux a:hover { border-color: var(--vert); text-decoration: none; }
.journaux a b { display: block; color: var(--vert); }
.journaux a span { font-size: 0.85rem; color: var(--encre-douce); }
.entete-saisie { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem 1rem; margin-bottom: 1rem; }
.entete-saisie label, .grille label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--encre-douce); gap: 0.2rem; }
.entete-saisie label.large { grid-column: 1 / -1; }
input.champ, select.champ, .grille input, .grille select {
  font: inherit; padding: 0.4rem 0.5rem; border: 1px solid var(--trait); border-radius: 4px; background: #fff; min-width: 0; width: 100%;
}
.grille input.num { text-align: right; }
.grille { width: 100%; border-collapse: collapse; margin-bottom: 0.75rem; }
.grille th { text-align: left; font-weight: 600; color: var(--encre-douce); font-size: 0.85rem; padding: 0.3rem; }
.grille th.num { text-align: right; }
.grille td { padding: 0.2rem 0.25rem; vertical-align: middle; }
.grille td.retirer { width: 2rem; text-align: center; }
.grille .retirer button { font: inherit; border: 0; background: none; color: var(--encre-douce); cursor: pointer; font-size: 1.1rem; }
.grille tfoot td { padding-top: 0.5rem; font-weight: 600; border-top: 2px solid var(--encre); }
.grille tfoot td.num { text-align: right; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.actions .info { color: var(--encre-douce); margin-left: auto; }
.desequilibre { color: var(--rouille); font-weight: 600; }
.brouillons .lib small { display: block; color: var(--encre-douce); }
.brouillons form { display: inline; }
.brouillons .lien { font: inherit; background: none; border: 0; color: var(--vert); cursor: pointer; padding: 0; }
@media (max-width: 600px) {
  .grille th.masque-mobile, .grille td.masque-mobile { display: none; }
}

/* ---------- Tuiles de dépôt ---------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.tuile button {
  width: 100%; font: inherit; padding: 0.9rem 0.5rem; border: 1px solid var(--trait); border-radius: 8px;
  background: #fff; color: var(--encre); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.tuile button:hover { border-color: var(--vert); }
.tuile button:disabled { opacity: 0.6; cursor: wait; }
.tuile .ico { font-size: 1.6rem; }
.tuile small { color: var(--vert); font-weight: 600; }

/* ---------- Accueil : tuiles du menu ---------- */
.accueil-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.8rem; margin: 1rem 0 1.5rem; }
.accueil-tuiles a {
  display: flex; flex-direction: column; gap: 0.25rem; min-height: 8.5rem; padding: 1rem 1.1rem;
  border: 1px solid var(--trait); border-radius: 10px; color: var(--encre); background: #fff;
}
.accueil-tuiles a:hover { border-color: var(--vert); text-decoration: none; box-shadow: 0 1px 4px rgba(31, 42, 55, 0.08); }
.accueil-tuiles .ico { font-size: 1.7rem; line-height: 1; }
.accueil-tuiles b { font-size: 1.1rem; font-weight: 600; color: var(--vert); }
.accueil-tuiles span { font-size: 0.85rem; color: var(--encre-douce); }
.accueil-tuiles small { margin-top: auto; padding-top: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--encre-douce); }
.accueil-tuiles small.alerte { color: var(--rouille); }

/* ---------- États comptables et fiscaux ---------- */
.onglets { display: flex; gap: 0.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--trait); margin-bottom: 1rem; }
.onglets a { padding: 0.5rem 0.9rem; color: var(--encre); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.onglets a:hover { text-decoration: none; border-color: var(--trait); }
.onglets a.actif { color: var(--vert); font-weight: 600; border-color: var(--vert); }
.bilan { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) { .bilan { grid-template-columns: 3fr 2fr; } }
.etat td:first-child { padding-left: 0.5rem; }
.etat tr.total td { background: var(--fond-bande); }
.etat tr.classe td { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; }
.etat .case { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--vert); }
.etat.efi td { padding: 0.3rem 0.5rem; }
.etat-titre { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.etat-titre small { font-weight: 400; color: var(--encre-douce); }
.legende { color: var(--encre-douce); font-size: 0.9rem; }
.negatif { color: var(--rouille); }

/* ---------- Totaux figés en tête de la balance ---------- */
.tableau th .total-tete { display: block; color: var(--encre); font-size: 1rem; font-weight: 600; margin-top: 0.15rem; }
.tableau thead th { border-bottom: 2px solid var(--encre); box-shadow: 0 1px 0 #fff; }

/* ---------- Pastille de l'utilisateur connecté ---------- */
.pastille {
  display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  border-radius: 50%; background: var(--vert); color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  cursor: default; vertical-align: middle;
}

/* ---------- Imprimés DGFiP (liasse 2033) ---------- */
.imprime { border: 2px solid var(--encre); border-radius: 4px; padding: 0.75rem 1rem 1rem; margin: 1.25rem 0 2rem; background: #fff; }
.imprime-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--encre); padding-bottom: 0.4rem; margin-bottom: 0.6rem; }
.imprime-entete .numero { font-weight: 700; letter-spacing: 0.02em; }
.imprime-entete .ref { font-weight: 700; color: var(--encre-douce); }
.imprime-ident { font-size: 0.9rem; margin-bottom: 0.75rem; display: grid; gap: 0.15rem; }
.imprime-ident span { color: var(--encre-douce); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; margin-right: 0.3rem; }
.imprime-ident span + span, .imprime-ident div span:not(:first-child) { margin-left: 1rem; }
.form { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.form th, .form td { border: 1px solid var(--trait); padding: 0.3rem 0.45rem; vertical-align: middle; }
.form th { font-weight: 600; text-align: left; background: var(--fond-bande); font-size: 0.8rem; }
.form th.mt { text-align: center; }
.form th small { font-weight: 400; color: var(--encre-douce); }
.form tr.groupe td { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--encre-douce); background: #fff; padding: 0.45rem 0.45rem 0.1rem; border-left: 0; border-right: 0; }
.form td.lib { min-width: 14rem; }
.form td.case { width: 2.4rem; text-align: center; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.8rem; font-weight: 700; color: var(--encre); background: #fff; border-right: 0; padding-right: 0.2rem; }
.form td.mt { text-align: right; min-width: 6rem; white-space: nowrap; border-left: 0; }
.form tr.t td { font-weight: 600; background: var(--fond-bande); }
.form tr.t td.case { background: var(--fond-bande); }
.form .dont { color: var(--encre-douce); font-size: 0.78rem; display: block; }
.form .dont .case { font-size: 0.75rem; }
.form.renvois td.lib { font-size: 0.8rem; color: var(--encre-douce); min-width: 0; }
.form.grille td.lib { min-width: 12rem; }
.form.grille td.mt { min-width: 4.5rem; }
@media (max-width: 900px) {
  .form.grille { display: block; overflow-x: auto; }
}
@media print {
  .entete, .onglets, .filtres, .avis, .legende { display: none !important; }
  main { max-width: none; padding: 0; }
  .imprime { break-after: page; border-width: 1px; }
  .form td.mt, .form td.case { min-width: 0; }
}

/* ---------- Plaquette (présentation cabinet) ---------- */
:root { --pq-bleu: #1f4e9c; --pq-bleu-clair: #eaf0fa; --pq-rouge: #8a1c1c; }
.pq-page { margin: 0 0 2.5rem; }
.pq-garde { min-height: 40rem; padding: 3.5rem 2.5rem 2rem; border: 1px solid var(--trait); border-radius: 6px; display: flex; flex-direction: column; justify-content: space-between; font-family: Arial, "Liberation Sans", Helvetica, sans-serif; }
.pq-titre { font-size: 2.6rem; font-weight: 400; color: #5b2d8e; margin: 0 0 1.6rem; letter-spacing: -0.01em; }
.pq-provisoire { font-size: 1rem; color: var(--rouille); border: 1px solid var(--rouille); border-radius: 4px; padding: 0.1rem 0.5rem; vertical-align: middle; }
.pq-societe { font-size: 1.7rem; margin: 0 0 1.4rem; color: #1a1a4a; }
.pq-exercice { font-size: 1.1rem; color: var(--encre); margin: 0; }
.pq-pied { font-size: 0.8rem; line-height: 1.35; color: var(--encre); }
.pq-pied b { display: block; color: #5b2d8e; font-size: 0.95rem; margin-bottom: 0.15rem; }
.pq-h2 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.05em; }
.pq-h2.centre { text-align: center; }
.pq-h3 { font-size: 0.95rem; color: var(--pq-rouge); text-transform: uppercase; letter-spacing: 0.03em; margin: 1.25rem 0 0.4rem; }
.pq-sommaire { font-size: 1.05rem; line-height: 1.5; font-weight: 600; list-style: none; padding: 0; margin: 2rem 0 0 3rem; }
.pq-sommaire li { margin-bottom: 1.2rem; }
.pq-sommaire small { display: block; font-weight: 400; color: var(--encre-douce); font-size: 0.85rem; }
.pq-intercalaire { position: relative; min-height: 14rem; border: 1px solid var(--trait); border-radius: 6px; }
.pq-intercalaire::after { content: ""; position: absolute; top: 0; bottom: 0; right: 1.5rem; width: 3px; background: #5b2d8e; }
.pq-onglet { position: absolute; top: 0; right: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.pq-onglet span { display: block; width: 2.4rem; height: 2rem; background: #7b2f8e; }
.pq-onglet span + span { background: #5b2d8e; }
.pq-onglet b { writing-mode: vertical-rl; transform: rotate(180deg); color: #5b2d8e; font-size: 1.25rem; font-weight: 700; margin-top: 0.6rem; padding-left: 0.5rem; }
.pq-onglet { z-index: 1; }
.pq-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--encre-douce); }
.pq-entete b { font-size: 1.1rem; color: var(--encre); }
table.pq { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; margin-bottom: 1rem; }
table.pq th { background: var(--pq-bleu); color: #fff; text-align: left; padding: 0.35rem 0.5rem; font-weight: 600; font-size: 0.85rem; }
table.pq th.num, table.pq td.num { text-align: right; white-space: nowrap; }
table.pq td { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--trait); }
table.pq td.cpt { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.85rem; width: 6rem; }
table.pq .pct { width: 4rem; color: var(--pq-bleu); }
table.pq .gras { font-weight: 600; }
table.pq tr.pq-groupe td { background: var(--fond-bande); color: var(--pq-rouge); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; padding-top: 0.45rem; }
table.pq tr.pq-bande td { background: var(--pq-bleu); color: #fff; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; }
table.pq tr.pq-soustotal td { font-weight: 600; border-top: 1px solid var(--encre); border-bottom: 1px solid var(--encre); }
table.pq tr.pq-total td { font-weight: 600; background: var(--fond-bande); color: var(--pq-rouge); }
table.pq tr.pq-bande.total td { color: #fff; }
table.pq tr.sig-l td:first-child { padding-left: 1rem; }
table.pq tr.sig-l td.num { background: var(--pq-bleu-clair); }
table.pq tr.sig-s td { font-weight: 700; border-top: 2px solid var(--encre); border-bottom: 2px solid var(--encre); text-transform: uppercase; }
table.pq tr.sig-r td { font-weight: 700; background: var(--pq-bleu); color: #fff; text-transform: uppercase; }
table.pq tr.sig-r td.pct { color: #fff; }
.plaquette .imprime { margin-top: 0; }
@media print {
  .pq-page { break-before: page; }
  .pq-page:first-child { break-before: auto; }
  .ecran-seul { display: none !important; }
  @page { size: A4; margin: 0; }   /* marge nulle : le navigateur n'imprime plus l'URL ni la date */
  main { padding: 12mm 12mm !important; max-width: none; }
  .pq-garde { border: 0; height: 268mm; min-height: 0; padding: 28mm 6mm 0; box-sizing: border-box; }
  .pq-garde .pq-pied { break-inside: avoid; }
  .pq-intercalaire { border: 0; height: 268mm; min-height: 0; }
  .pq-onglet { right: 0; }
  .pq-intercalaire::after { right: 0; }
  .pq-onglet span, .pq-onglet b { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .plaquette .imprime { break-after: page; }
  table.pq th, table.pq tr.pq-bande td, table.pq tr.sig-r td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Saisie d'achat à partir d'une facture déposée ---------- */
.bandeau-facture { display: flex; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; align-items: baseline; padding: 0.6rem 0.9rem; margin-bottom: 1rem; background: var(--vert-fond); border-left: 4px solid var(--vert); border-radius: 4px; }
.bandeau-facture small { color: var(--encre-douce); }
.actions-facture { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; }
.factures-attente { margin-bottom: 1rem; padding: 0.6rem 0.9rem; background: var(--fond-bande); border-radius: 6px; }
.factures-attente summary { cursor: pointer; font-weight: 600; }
.factures-attente ul { margin: 0.5rem 0 0; padding-left: 1.2rem; line-height: 1.8; }
.saisie-avec-piece.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .saisie-avec-piece.deux-colonnes { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.apercu-piece { position: sticky; top: 0.5rem; border: 1px solid var(--trait); border-radius: 6px; overflow: hidden; background: var(--fond-bande); }
.apercu-piece iframe { display: block; width: 100%; height: 80vh; border: 0; background: #fff; }
.apercu-piece img { display: block; width: 100%; height: auto; }
.apercu-piece .legende { margin: 0.4rem 0.6rem; }

/* ---------- Complétion des comptes et tiers ---------- */
.completion { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--trait); border-radius: 6px; box-shadow: 0 4px 14px rgba(31, 42, 55, 0.12); max-height: 18rem; overflow-y: auto; font-size: 0.9rem; }
.completion-item { padding: 0.35rem 0.6rem; cursor: pointer; display: flex; gap: 0.6rem; align-items: baseline; }
.completion-item b { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 600; color: var(--vert); white-space: nowrap; }
.completion-item span { color: var(--encre); }
.completion-item.actif, .completion-item:hover { background: var(--vert-fond); }
.libelle-compte { display: block; font-size: 0.75rem; color: var(--encre-douce); line-height: 1.2; margin-top: 0.1rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.libelle-compte.inconnu { color: var(--rouille); }

/* ---------- Défilement des comptes dans le grand livre ---------- */
.defilement-comptes { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.defilement-comptes h1 { flex: 1; margin: 0; }
.defilement-comptes .bouton { white-space: nowrap; font-variant-numeric: tabular-nums; }
.defilement-comptes .inactif { opacity: 0.35; cursor: default; }
@media (max-width: 600px) { .defilement-comptes { flex-wrap: wrap; } .defilement-comptes h1 { order: -1; flex-basis: 100%; } }

/* ---------- Boutons copier (aide EFI) ---------- */
.etat.efi td.copie { width: 5rem; text-align: center; }
button.copier { font: inherit; font-size: 0.8rem; padding: 0.1rem 0.5rem; border: 1px solid var(--trait); border-radius: 999px; background: #fff; color: var(--vert); cursor: pointer; }
button.copier:hover { border-color: var(--vert); }
button.copier.ok, .copier-tout.ok { background: var(--vert); color: #fff; border-color: var(--vert); }
.etat-titre .copier-tout { font-size: 0.8rem; padding: 0.2rem 0.6rem; margin-left: 0.75rem; vertical-align: middle; }
@media print { button.copier, .copier-tout, .etat.efi td.copie { display: none !important; } }

/* ---------- Rapprochement bancaire ---------- */
.cartouches { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; margin: 0.75rem 0 1rem; }
.cartouche { border: 1px solid var(--trait); border-radius: 8px; padding: 0.6rem 0.9rem; background: #fff; display: flex; flex-direction: column; gap: 0.15rem; }
.cartouche span { font-size: 0.8rem; color: var(--encre-douce); }
.cartouche b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.cartouche small { color: var(--encre-douce); font-size: 0.8rem; }
.cartouche.vert { border-color: var(--vert); background: var(--vert-fond); }
.cartouche.orange { border-color: #d59a3a; background: #fdf6ea; }
.cartouche.rouge { border-color: var(--rouille); background: #fbf3f0; }
.ok-vert { color: var(--vert); font-weight: 600; }
.nav-releves { float: right; display: inline-flex; gap: 0.6rem; font-size: 1.1rem; }
.nav-releves a { text-decoration: none; }
.nav-releves .inactif { opacity: 0.35; }
.tableau.rapprochement tr.statut-pointee td { color: var(--encre-douce); }
.tableau.rapprochement tr.statut-pointee td.lib, .tableau.rapprochement tr.statut-pointee td.num { color: var(--encre); }
.tableau.rapprochement tr.statut-a_traiter td { background: #fffbf2; }
.tableau.rapprochement tr.statut-ignoree td { color: var(--encre-douce); font-style: italic; }
.tableau.rapprochement td.pointage { min-width: 18rem; }
.tableau.rapprochement td.pointage a { display: inline-block; }
.proposition { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; position: relative; }
.proposition input { font: inherit; font-size: 0.9rem; padding: 0.2rem 0.4rem; border: 1px solid var(--trait); border-radius: 4px; }
.proposition .source { flex-basis: 100%; color: var(--encre-douce); font-size: 0.78rem; }
.proposition .libelle-compte { flex-basis: 100%; font-size: 0.78rem; color: var(--encre-douce); }
.pointage-manuel { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin-top: 0.3rem; font-size: 0.85rem; }
.pointage-manuel select { font: inherit; font-size: 0.85rem; max-width: 20rem; }
.pointage-manuel label.ligne { display: inline-flex; gap: 0.25rem; align-items: center; color: var(--encre-douce); }
.bouton.petit { padding: 0.15rem 0.6rem; font-size: 0.85rem; }
button.lien { font: inherit; font-size: 0.85rem; border: 0; background: none; color: var(--vert); cursor: pointer; text-decoration: underline; padding: 0; white-space: nowrap; }
td.actions-ligne { white-space: nowrap; }
@media (max-width: 600px) { .nav-releves { float: none; display: flex; } .tableau.rapprochement td.pointage { min-width: 0; } }
