.connexion-boite { max-width: 380px; margin: 8vh auto; padding: 0 20px; }
.connexion-marque { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; color: #1f5fa8; margin-bottom: 20px; }
.connexion-marque .badge-konte { width: 40px; height: 40px; }
.connexion-boite h1 { font-size: 22px; }

/* Espace employe (portail) */
.portail-tete { display: flex; align-items: center; justify-content: space-between; background: var(--vert); color: #fff; padding: 12px 20px; }
.portail-marque { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.portail-droite { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.portail-quitter { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.portail-contenu { max-width: 760px; margin: 24px auto; padding: 0 20px; }

:root {
  --vert: #1f5fa8;
  --vert-fonce: #184c87;
  --bg: #f4f6f5;
  --carte: #ffffff;
  --texte: #1c2522;
  --gris: #6b7770;
  --bordure: #dde3e0;
  --danger: #b3261e;
  --accent: #eaf2fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--bg);
  line-height: 1.5;
}

/* En-tete mobile */
.entete {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--vert);
  color: #fff;
  padding: 10px 16px;
}
.menu-btn {
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
}
.marque { font-weight: 600; }

/* Barre de navigation laterale */
.barre {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 210px;
  background: var(--vert);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}
.barre-marque {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 18px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.barre-marque:hover .marque-txt { text-decoration: underline; }
.entete-marque {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.barre-section {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #b6cde8;
  cursor: default;
}
.barre-marque .marque-txt { display: flex; flex-direction: column; }
.badge-konte { flex: none; border-radius: 7px; }
.entete .badge-konte { width: 26px; height: 26px; }
.barre-marque .sous-marque {
  font-size: 12px;
  font-weight: 400;
  color: #b6cde8;
  margin-top: 2px;
}
.barre a {
  color: #d6e4f5;
  text-decoration: none;
  padding: 8px 22px;
  font-size: 15px;
  flex: none;
}
.barre a:hover { background: var(--vert-fonce); color: #fff; }
.barre a.actif { background: var(--vert-fonce); color: #fff; font-weight: 600; border-left: 3px solid #fff; }
.barre-deconnexion { flex: none; margin-top: auto; padding: 12px 22px; }
.barre-deconnexion button { background: none; border: 1px solid rgba(255,255,255,.4); color: #d6e4f5; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; width: 100%; }
.barre-deconnexion button:hover { background: var(--vert-fonce); color: #fff; }

.contenu {
  margin-left: 210px;
  padding: 28px 36px;
  max-width: 1000px;
}
h1 { margin-top: 0; font-size: 26px; }
h2 { font-size: 20px; margin-top: 32px; }

/* Boutons */
.bouton {
  display: inline-block;
  background: var(--vert);
  color: #fff;
  text-decoration: none;
  padding: 9px 16px;
  border: none;
  border-radius: 7px;
  font-size: 15px;
  cursor: pointer;
}
.bouton:hover { background: var(--vert-fonce); }
.bouton.secondaire { background: #e7eef6; color: var(--texte); }
.bouton.secondaire:hover { background: #d8e2ef; }
.bouton.danger { background: var(--danger); }
.bouton.petit { padding: 4px 10px; font-size: 14px; }
.bouton.suggestion { background: #fff7e6; color: #8a5a00; border: 1px solid #f0c877; margin-bottom: 6px; }
.bouton.suggestion:hover { background: #ffefcc; }
.fusion-bloc { border: 1px solid #f0c877; background: #fff7e6; margin-top: 22px; }
.fusion-bloc h2 { margin-top: 0; color: #8a5a00; }
.corriger-app { margin-top: 26px; }
.corriger-app summary { cursor: pointer; font-weight: 600; color: var(--vert); padding: 8px 0; }
.corriger-app table { margin-top: 8px; }
.corriger-rech { width: 100%; max-width: 400px; padding: 8px 11px; margin: 6px 0;
  border: 1px solid var(--bordure); border-radius: 6px; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.enligne { display: inline; }
a.carte { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
a.carte:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }

/* Tableaux */
table { width: 100%; border-collapse: collapse; background: var(--carte); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--bordure); }
th { background: #eef1f7; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--gris); }
tbody tr:hover { background: #f7faf8; }
tfoot td { font-weight: 600; background: #eef1f7; }
.droite { text-align: right; }
td a { color: var(--vert); font-weight: 500; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* Formulaires */
.formulaire { background: var(--carte); padding: 22px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); max-width: 620px; }
.formulaire label, .filtre label { display: block; margin-bottom: 14px; font-size: 14px; color: var(--gris); }
.formulaire input, .formulaire textarea, .formulaire select {
  display: block; width: 100%; margin-top: 5px;
  padding: 9px 11px; border: 1px solid var(--bordure); border-radius: 6px;
  font-size: 15px; color: var(--texte); background: #fff;
}
.formulaire .case { display: flex; align-items: center; gap: 8px; }
.formulaire .case input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--bordure); border-radius: 6px; margin-bottom: 14px; }
legend { padding: 0 6px; color: var(--gris); font-size: 13px; }
.duo { display: flex; gap: 16px; }
.duo label { flex: 1; }
.autocomplete { position: relative; }
.ac-liste { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--bordure); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.14); z-index: 30; display: none; max-height: 280px; overflow-y: auto; }
.ac-item { padding: 9px 12px; cursor: pointer; font-size: 14px; }
.ac-item:hover { background: var(--accent); }
.ac-creer { color: var(--vert); font-weight: 500; border-top: 1px solid var(--bordure); }
.enligne-form { display: flex; gap: 6px; margin-bottom: 6px; }
.enligne-form select { flex: 1; min-width: 160px; padding: 6px; border: 1px solid var(--bordure); border-radius: 5px; }
.enligne-form .autocomplete { flex: 1; min-width: 160px; }
.enligne-form .contre-rech { width: 100%; padding: 6px; border: 1px solid var(--bordure); border-radius: 5px; font-size: 14px; }
.enligne-form .bouton { background: var(--vert-fonce); font-weight: 600; }
.enligne-form .bouton:hover { background: #123c6d; }
.duo-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .duo-3 { grid-template-columns: 1fr; } }
.aide { font-size: 13px; color: var(--gris); background: var(--accent); padding: 8px 12px; border-radius: 6px; }
.erreur { color: #fff; background: var(--danger); padding: 10px 14px; border-radius: 6px; }
.succes { color: #fff; background: var(--vert); padding: 10px 14px; border-radius: 6px; }
/* Toast : message flottant qui apparait puis s'efface (retour visuel pres de l'action). */
.toast {
  position: fixed; top: 72px; right: 20px; z-index: 60; max-width: 320px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: 0; pointer-events: none;
  animation: toast-fade 3.2s ease forwards;
}
@keyframes toast-fade {
  0%   { opacity: 0; transform: translateY(-10px); }
  8%   { opacity: 1; transform: translateY(0); }
  78%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}
/* La ligne sur laquelle on atterrit (#tx-<id>) clignote brievement. */
tr:target td { animation: ligne-flash 1.8s ease-out; }
@keyframes ligne-flash { 0% { background: #fff3cd; } 100% { background: transparent; } }
/* Plan de travail d'appariement depots <-> factures (2 colonnes + barre). */
.appariement { display: flex; gap: 20px; align-items: flex-start; }
.appariement .col { flex: 1; min-width: 0; max-height: 62vh; overflow-y: auto;
  border: 1px solid #dde3ea; border-radius: 8px; padding: 10px; }
.appariement .col h3 { margin: 0 0 8px; position: sticky; top: -10px; background: #fff;
  padding: 6px 0; z-index: 1; }
.appariement-barre { position: sticky; bottom: 0; display: flex; gap: 22px; align-items: center;
  flex-wrap: wrap; background: #fff; border-top: 2px solid var(--vert); padding: 12px 14px;
  margin-top: 12px; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.appariement-barre button { margin-left: auto; }
@media (max-width: 700px) { .appariement { flex-direction: column; } }
.vide { color: var(--gris); background: var(--carte); padding: 24px; border-radius: 8px; text-align: center; }

/* Zone de depot de fichier (rectangle cliquable + glisser-deposer) */
.zone-fichier { position: relative; display: block; border: 2px dashed var(--bordure);
  border-radius: 10px; background: var(--accent); padding: 28px 20px; text-align: center;
  cursor: pointer; margin-bottom: 14px; transition: border-color .15s, background .15s; }
.zone-fichier:hover { border-color: var(--vert); }
.zone-fichier.survol { border-color: var(--vert); background: #dceaf6; }
.zone-fichier.rempli { border-style: solid; border-color: var(--vert); background: #eef6ee; }
.zone-fichier input[type="file"] { position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.zone-contenu { pointer-events: none; }
.zone-icone { font-size: 30px; display: block; margin-bottom: 8px; }
.zone-txt { color: var(--gris); font-size: 14px; }
.zone-txt small { color: var(--gris); }
.zone-txt strong { color: var(--texte); font-size: 15px; }

/* Cartes (tableau de bord, taxes) */
.cartes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0; }
.carte { background: var(--carte); padding: 18px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.carte h3 { margin: 0 0 8px; font-size: 13px; color: var(--gris); text-transform: uppercase; letter-spacing: .03em; }
.carte .gros { font-size: 24px; font-weight: 700; margin: 0; }
.carte .petit { color: var(--gris); margin: 4px 0 0; }
.carte div { display: flex; justify-content: space-between; padding: 4px 0; }
.carte div.total { border-top: 2px solid var(--bordure); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.carte.accent { background: var(--accent); }
.petit { font-size: 13px; color: var(--gris); }

/* Graphiques du tableau de bord */
.jauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.jauge-carte { display: flex; justify-content: center; padding: 10px; }
.jauge { width: 100%; max-width: 240px; height: auto; }
.jauge-val { font-size: 30px; font-weight: 700; }
.jauge-lbl { font-size: 13px; fill: var(--gris); }
.panneau { background: var(--carte); border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin: 18px 0; }
.panneau h2 { margin-top: 0; }
.courbe { width: 100%; height: auto; display: block; }
.courbe .axe { fill: var(--gris); font-size: 12px; }
/* Survol des courbes (ligne verticale + infobulle, cable par konte.js) */
.courbe-io { position: relative; }
.panneau-tete { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.hero-montant { margin: 0 0 8px; font-size: 30px; font-weight: 700; }
.graf-croix { position: absolute; width: 1px; background: var(--gris); opacity: .55; pointer-events: none; }
.graf-tip {
  position: absolute; pointer-events: none; z-index: 10;
  background: var(--texte); color: #FBF6EA;
  padding: 8px 11px; border-radius: 7px; font-size: 13px; line-height: 1.45;
  box-shadow: 0 3px 10px rgba(0,0,0,.25); white-space: nowrap;
}
.graf-tip strong { display: block; margin-bottom: 2px; }
.tip-ligne { display: block; }
.tip-pastille { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
@media (max-width: 760px) { .jauges { grid-template-columns: 1fr; } }
.badge { padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.brouillon { background: #eceff1; color: #607d8b; }
.badge.envoyee { background: #fff3cd; color: #8a6d00; }
.badge.payee { background: #d6e8f8; color: var(--vert-fonce); }
.badge.annulee { background: #f8d7da; color: var(--danger); }

/* Lignes de facture (formulaire) */
.table-lignes { width: 100%; table-layout: fixed; overflow: visible; }
/* La cellule contenant l'autocompletion ne doit pas rogner le menu deroulant. */
.table-lignes td { overflow: visible; }
.table-lignes input, .table-lignes select { width: 100%; padding: 8px; border: 1px solid var(--bordure); border-radius: 5px; box-sizing: border-box; }
.table-lignes .sel-produit { min-width: 150px; }
.table-lignes .desc { min-width: 240px; }
.table-lignes col.col-produit { width: 22%; }
.table-lignes col.col-desc { width: 34%; }
.table-lignes col.col-qte { width: 9%; }
.table-lignes col.col-prix { width: 13%; }
.table-lignes col.col-taxe { width: 14%; }
.table-lignes col.col-x { width: 5%; }
.formulaire.large { max-width: 940px; }
.filtre { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }

/* Document facture (affichage / impression) */
.facture-doc { background: #fff; padding: 36px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.facture-entete { display: flex; justify-content: space-between; margin-bottom: 24px; }
.facture-entete h2 { margin: 0; }
.facture-logo { max-width: 228px; max-height: 148px; border-radius: 6px; margin-bottom: 8px; display: block; }
.facture-pied { margin-top: 28px; border-top: 1px solid var(--bordure); padding-top: 12px; text-align: center; }
.facture-notes { margin-top: 16px; }

/* Etat des resultats */
.etat { max-width: 620px; }
.etat td { padding: 8px 14px; }
.etat .section td { background: #eef1f7; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--gris); padding-top: 12px; }
.etat .soustotal td { border-top: 1px solid var(--bordure); font-weight: 600; }
.etat .total td { border-top: 2px solid var(--texte); font-size: 18px; font-weight: 700; }

/* Sous-navigation des etats financiers */
.sousnav { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.sousnav a { padding: 7px 14px; border-radius: 7px; text-decoration: none; color: var(--texte); background: #e7eef6; font-size: 14px; }
.sousnav a:hover { background: #d8e2ef; }
.sousnav a.actif { background: var(--vert); color: #fff; }

/* Bilan en deux colonnes */
.bilan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .bilan-cols { grid-template-columns: 1fr; } }

/* Journal des ecritures */
.ecriture { background: var(--carte); border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ecriture .petit { margin: 0 0 6px; }
table.mini { box-shadow: none; overflow: visible; }
table.mini td { padding: 4px 10px; border-bottom: 1px solid #eef1f7; overflow: visible; }
.facture-client { margin-bottom: 20px; }
.facture-table { box-shadow: none; }
.facture-totaux { margin-left: auto; max-width: 320px; margin-top: 16px; }
.facture-totaux div { display: flex; justify-content: space-between; padding: 5px 0; }
.facture-totaux .grand-total { border-top: 2px solid var(--texte); font-size: 18px; font-weight: 700; margin-top: 6px; padding-top: 8px; }

/* Mobile */
@media (max-width: 760px) {
  /* En-tete (avec le bouton menu) toujours au-dessus du menu et cliquable pour le refermer. */
  .entete { display: flex; position: sticky; top: 0; z-index: 30; }
  .barre { transform: translateX(-100%); transition: transform .2s; z-index: 20; padding-top: 60px; }
  body.menu-ouvert .barre { transform: translateX(0); }
  .contenu { margin-left: 0; padding: 18px; }
  .cartes { grid-template-columns: 1fr 1fr; }
  .duo { flex-direction: column; gap: 0; }
}

/* Impression : on cache la navigation */
@media print {
  .barre, .entete, .actions, .noimpr, .filtre, .recherche-boite { display: none !important; }
  body { background: #fff; }
  /* margin:0 => le navigateur n'a plus de bande pour son en-tete/pied
     (titre, URL, date) : ils disparaissent sans decocher quoi que ce soit.
     Les marges d'impression sont recreees par le padding de .contenu. */
  @page { margin: 0; }
  .contenu { margin: 0; max-width: 100%; padding: 12mm 14mm; }
  .contenu h1 { font-size: 13px; margin: 0 0 6px; }
  .facture-doc { box-shadow: none; padding: 0; }
  .facture-entete { margin-bottom: 12px; }
  .facture-entete h2 { font-size: 15px; }
  .facture-entete p { margin: 2px 0; }
  .facture-logo { max-height: 102px; margin-bottom: 4px; }
  .facture-doc .facture-client { margin-bottom: 8px; padding: 8px 12px; }
  .facture-doc .facture-client p,
  .facture-doc .facture-client .nom,
  .facture-doc .facture-client .fc-coord { margin: 1px 0; font-size: 10.5px; }
  .facture-doc .facture-table thead th { padding: 0 8px 5px; font-size: 10px; }
  .facture-doc .facture-table tbody td { padding: 2px 8px; font-size: 10.5px; line-height: 1.3; }
  .facture-totaux { margin-top: 8px; }
  .facture-totaux div { padding: 2px 0; font-size: 12px; }
  .facture-totaux .grand-total { font-size: 14px; padding-top: 6px; margin-top: 4px; }
  .facture-notes { margin-top: 8px; }
  .facture-pied { margin-top: 12px; padding-top: 8px; }
  h2 { margin-top: 0; }
}

/* --- Fenetre modale (nouveau client) --- */
.modal-fond { display: none; position: fixed; inset: 0; background: rgba(20,40,70,.45);
  z-index: 1000; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-fond.ouvert { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 22px 24px; width: 100%; max-width: 460px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 14px; color: var(--vert-fonce); }
.modal label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--texte); }
.modal input, .modal textarea, .modal select { display: block; width: 100%; margin-top: 4px;
  padding: 8px 10px; border: 1px solid #c7d3e0; border-radius: 7px; font-size: 14px; font-weight: 400;
  box-sizing: border-box; font-family: inherit; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* --- Banniere brouillon en cours sur la liste des factures --- */
.banniere-brouillon { align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); border: 1px solid #b9d2ef; border-left: 4px solid var(--vert);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.banniere-brouillon .bb-actions { display: flex; gap: 8px; flex: none; }

/* --- Rabais + totaux en direct sur le formulaire de facture --- */
.facture-bas { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
  justify-content: space-between; margin-top: 18px; }
.champ-rabais { font-weight: 600; max-width: 180px; }
.champ-rabais input { width: 90px; padding: 8px; border: 1px solid var(--bordure);
  border-radius: 5px; box-sizing: border-box; margin-top: 4px; }
.totaux-live { margin-left: auto; min-width: 260px; background: var(--carte);
  border: 1px solid var(--bordure); border-radius: 8px; padding: 12px 16px; }
.totaux-live div { display: flex; justify-content: space-between; padding: 5px 0; }
.totaux-live .tl-rabais { color: #b3402f; }
.totaux-live .tl-total { border-top: 2px solid var(--texte); font-size: 18px;
  font-weight: 700; margin-top: 6px; padding-top: 8px; }
.facture-totaux .rabais { color: #b3402f; }

/* --- Pointage entree/sortie (espace employe, mobile) --- */
.pointage-carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: 14px;
  padding: 22px; text-align: center; margin: 6px 0 22px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pointage-carte.en-cours { background: var(--accent); border-color: #b9d2ef; }
.pointage-carte p { margin: 0 0 12px; }
.chrono { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--vert-fonce); }
.bouton-pointer { display: block; width: 100%; padding: 22px; font-size: 21px; font-weight: 700;
  border: none; border-radius: 12px; color: #fff; cursor: pointer; }
.bouton-pointer.commencer { background: var(--vert); }
.bouton-pointer.commencer:hover { background: var(--vert-fonce); }
.bouton-pointer.terminer { background: var(--danger); }

/* --- Feuillets fiscaux T4 / RL-1 --- */
.feuillets-paire { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.feuillets-paire .feuillet { flex: 1 1 340px; }
.feuillet { border: 1px solid var(--bordure, #d7dde5); border-radius: 10px; padding: 14px 16px;
  margin-bottom: 16px; background: #fff; }
.feuillet h3 { margin: 0 0 4px; color: var(--vert); font-size: 16px; }
.feuillet table { margin-top: 8px; }
.feuillet .case-no { font-weight: 700; width: 46px; color: var(--vert-fonce); }
.feuillet-entete { display: flex; flex-wrap: wrap; gap: 24px; margin: 8px 0 18px;
  padding: 12px 16px; background: var(--accent, #eaf2fb); border-radius: 10px; }
.feuillet-entete > div { flex: 1 1 200px; line-height: 1.4; }
.feuillet-annee { font-size: 22px; font-weight: 700; color: var(--vert); }
.avert { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 8px;
  background: #fdeaea; color: var(--danger, #b3261e); font-size: 12px; font-weight: 600; }
@media print { .noimpr { display: none !important; } }

/* --- Widget autocompletion generique (web.autocomplete + konte.js) --- */
.autocomplete .ac-rech { width: 100%; box-sizing: border-box; }

/* --- Scanner une facture : ecran de revision --- */
.suggestion { background: #eef6ec; border-left: 3px solid #4a8f43;
  padding: 8px 10px; border-radius: 4px; }
fieldset.type-depense { border: 1px solid var(--bord, #d8dce0); border-radius: 6px;
  padding: 8px 12px; margin: 0 0 6px; }
fieldset.type-depense legend { font-size: 12px; font-weight: 600; color: #555; padding: 0 4px; }
details.apercu-ocr { margin: 8px 0; font-size: 13px; }
details.apercu-ocr summary { cursor: pointer; color: #446; }
details.apercu-ocr pre { max-height: 220px; overflow: auto; background: #f6f7f8;
  padding: 8px; border-radius: 4px; white-space: pre-wrap; font-size: 12px; }


/* =====================================================================
   THEME CREME / DORE « 2 » — KONTE                        ▼ DÉBUT ▼
   ---------------------------------------------------------------------
   Remplace le theme sombre « 1b ». Colle a la fin de app/static/style.css.
   - Ne touche a aucune structure HTML ni au code Python.
   - Tout est encapsule dans @media screen : l'IMPRESSION (factures,
     feuillets fiscaux, etats) reste identique a l'original, fond blanc.
   - Pour REVENIR au theme clair d'origine : supprimez tout ce bloc
     (entre les deux reperes ▼ DÉBUT ▼ et ▲ FIN ▲). Rien d'autre a defaire.
   ===================================================================== */
@media screen {

  /* ---- Palette : on repeint via les variables existantes ---- */
  :root {
    --vert:        #B6862A;                 /* accent principal (dore) */
    --vert-fonce:  #96690F;                 /* accent survol */
    --bg:          #F1EAD9;                 /* fond de l'app (creme) */
    --carte:       #FBF6EA;                 /* cartes / panneaux */
    --texte:       #2C2418;                 /* texte principal (brun encre) */
    --gris:        #8A7F68;                 /* texte secondaire */
    --bordure:     #E4DBC4;                 /* filets */
    --danger:      #C9552F;                 /* erreurs / danger */
    --accent:      #F0E6C9;                 /* surface d'appoint (dore pale) */
  }

  /* ---- Barre laterale (creme soutenu, accents dores) ---- */
  .barre { background: #F6EFDF; border-right: 1px solid var(--bordure); }
  .barre a { color: #6A6150; }
  .barre a:hover { background: rgba(182,134,42,0.10); color: #2C2418; }
  .barre a.actif { background: rgba(182,134,42,0.16); color: #96690F; border-left-color: #B6862A; }
  .barre-marque { color: #2C2418; }
  .barre-marque .sous-marque { color: #9A9078; }
  .barre-section { color: #9A9078; }
  .barre-deconnexion button { color: #6A6150; border-color: #D8CDB2; }
  .barre-deconnexion button:hover { background: rgba(182,134,42,0.10); color: #2C2418; }

  /* ---- En-tetes (mobile + portail employe) ---- */
  .entete { background: #F6EFDF; color: #2C2418; border-bottom: 1px solid var(--bordure); }
  .menu-btn { color: #2C2418; }
  .portail-tete { background: #F6EFDF; color: #2C2418; border-bottom: 1px solid var(--bordure); }
  .portail-quitter { border-color: #C9BC9C; color: #2C2418; }
  .connexion-marque { color: #2C2418; }

  /* ---- Boutons (dore, texte fonce pour le contraste) ---- */
  .bouton { color: #2A2110; background: linear-gradient(180deg, #CAA042, #B6862A);
    box-shadow: 0 6px 14px -8px rgba(182,134,42,0.7); font-weight: 600; }
  .bouton:hover { background: linear-gradient(180deg, #C09638, #A87A20); color: #2A2110; }
  .bouton.secondaire { background: #F3ECDA; color: #2C2418; box-shadow: none;
    border: 1px solid var(--bordure); }
  .bouton.secondaire:hover { background: #ECE3CE; }
  .bouton.danger { background: var(--danger); color: #fff; box-shadow: none; }
  .bouton.suggestion { background: #FDF6E3; color: #8A5A00; border-color: #E4C87E; box-shadow: none; }
  .bouton.suggestion:hover { background: #FBEFCE; }
  .enligne-form .bouton { background: #96690F; color: #FDF8EC; }
  .enligne-form .bouton:hover { background: #7D5609; }

  /* ---- Cartes / panneaux : coins plus doux, ombre chaude ---- */
  .carte, .panneau, .formulaire, table, .ecriture, .pointage-carte, .vide {
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(64,52,28,0.05), 0 10px 26px -16px rgba(64,52,28,0.18);
  }
  .carte, .panneau, .formulaire { border: 1px solid var(--bordure); }

  /* ---- Tableaux ---- */
  th { background: #F3ECDA; color: #8A7F68; }
  th, td { border-bottom-color: #ECE3CE; }
  tbody tr:hover { background: #F6EFDD; }
  tfoot td { background: #F3ECDA; }
  td a { color: #96690F; }

  /* ---- Formulaires / champs ---- */
  .formulaire input, .formulaire textarea, .formulaire select {
    background: #FFFDF6; color: #2C2418; border-color: #D8CDB2;
  }
  .table-lignes input, .table-lignes select {
    background: #FFFDF6; color: #2C2418; border-color: #D8CDB2;
  }
  .champ-rabais input { background: #FFFDF6; color: #2C2418; border-color: #D8CDB2; }

  /* ---- Autocompletion ---- */
  .ac-liste { background: #FFFDF6; border-color: #D8CDB2; }
  .ac-item:hover { background: #F0E6C9; }
  .ac-creer { color: #96690F; border-top-color: #ECE3CE; }

  /* ---- Messages / encarts ---- */
  .aide { color: #6A6150; background: #F0E6C9; }
  .succes { background: #2F7A37; color: #fff; }
  .erreur { background: var(--danger); }

  /* ---- Sous-navigation des etats financiers ---- */
  .sousnav a { background: #F3ECDA; color: #2C2418; }
  .sousnav a:hover { background: #ECE3CE; }
  .sousnav a.actif { background: #B6862A; color: #2A2110; }

  /* ---- Appariement depots / factures ---- */
  .appariement .col { border-color: var(--bordure); background: var(--carte); }
  .appariement .col h3 { background: var(--carte); }
  .appariement-barre { background: var(--carte); border-top-color: #B6862A; }

  /* ---- Zone de depot de fichier ---- */
  .zone-fichier { background: #F0E6C9; border-color: #D8CDB2; }
  .zone-fichier:hover, .zone-fichier.survol { border-color: #B6862A; }
  .zone-fichier.survol { background: #ECDFBB; }
  .zone-fichier.rempli { border-color: #2F7A37; background: #EBF0DF; }

  /* ---- Badges de statut (pastels sur creme) ---- */
  .badge.brouillon { background: #ECE8DE; color: #6E675A; }
  .badge.envoyee   { background: #F8ECCB; color: #8A5A00; }
  .badge.payee     { background: #E2EFD9; color: #2F6B2F; }
  .badge.annulee   { background: #F7DFD4; color: #A9401F; }

  /* ---- Fenetre modale ---- */
  .modal-fond { background: rgba(64,52,28,0.40); }
  .modal { background: #FBF6EA; }
  .modal h3 { color: #96690F; }
  .modal label { color: #2C2418; }
  .modal input, .modal textarea, .modal select {
    background: #FFFDF6; color: #2C2418; border-color: #D8CDB2;
  }

  /* ---- Banniere brouillon ---- */
  .banniere-brouillon { background: #F0E6C9; border-color: #E0D3AC; border-left-color: #B6862A; }

  /* ---- Pointage (espace employe) ---- */
  .pointage-carte.en-cours { background: #F0E6C9; border-color: #E0D3AC; }
  .chrono { color: #96690F; }
  .bouton-pointer.commencer { background: #B6862A; color: #2A2110; }
  .bouton-pointer.commencer:hover { background: #A87A20; }

  /* ---- Etat des resultats (affichage ecran) ---- */
  .etat .section td { background: #F3ECDA; color: #8A7F68; }
  .etat .soustotal td { border-top-color: #E0D3AC; }
  .etat .total td { border-top-color: #2C2418; }

  /* ---- Feuillets fiscaux T4 / RL-1 (affichage ecran) ---- */
  .feuillet { background: #FBF6EA; border-color: var(--bordure); }
  .feuillet h3 { color: #96690F; }
  .feuillet .case-no { color: #96690F; }
  .feuillet-entete { background: #F0E6C9; }
  .feuillet-annee { color: #96690F; }
  .avert { background: #F7DFD4; color: #A9401F; }

  /* ---- Scanner une facture : ecran de revision ---- */
  .suggestion { background: #EBF0DF; border-left-color: #6B9E4E; }
  fieldset.type-depense legend { color: #8A7F68; }
  details.apercu-ocr summary { color: #96690F; }
  details.apercu-ocr pre { background: #F3ECDA; color: #4A4335; }

  /* ---- Graphiques (jauges + courbe) ---- */
  .jauge-lbl { fill: #8A7F68; }
  .courbe .axe { fill: #9A9078; }

  /* ---- Liens dans les encarts de contenu (bienvenue, aides) ---- */
  .vide a, .aide a, .petit a { color: #96690F; font-weight: 600; }

  /* ---- Flash de la ligne ciblee (#tx-…) sur fond creme ---- */
  tr:target td { animation: ligne-flash-creme 1.8s ease-out; }
  @keyframes ligne-flash-creme {
    0%   { background: rgba(182,134,42,0.28); }
    100% { background: transparent; }
  }

  /* =================================================================
     DOCUMENT FACTURE — reste « papier » (fond blanc, texte fonce),
     coherent avec l'impression. On reinjecte les variables claires.
     ================================================================= */
  .facture-doc {
    --texte:   #1c2522;
    --gris:    #6b7770;
    --bordure: #dde3e0;
    --carte:   #ffffff;
    color: #1c2522;
    background: #fff;
  }
  .facture-doc table { background: #fff; }
  .facture-doc td { color: #1c2522; }
  .facture-doc th { background: #eef1f7; color: #6b7770; }
  .facture-doc th, .facture-doc td { border-bottom-color: #dde3e0; }
  .facture-doc tbody tr:hover { background: transparent; }
  .facture-doc td a { color: #1f5fa8; }
}
/* =====================================================================
   THEME CREME / DORE « 2 » — KONTE                           ▲ FIN ▲
   ===================================================================== */

/* =====================================================================
   LOGOS DE CATÉGORIE SUR LES LIGNES DE FACTURE
   ===================================================================== */
.facture-table .ligne-desc { display: flex; align-items: center; gap: 10px; }
.facture-table .cat-ico { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: transparent !important; border: none !important; box-shadow: none !important; }
.facture-table .cat-ico img { width: 24px; height: 24px;
  filter: brightness(0) saturate(100%) invert(56%) sepia(38%) saturate(560%) hue-rotate(3deg) brightness(92%) contrast(88%); }
@media print { .facture-table .cat-ico { border: none; background: transparent; } }

/* =====================================================================
   MODÈLE DE FACTURE — VERSION PRO
   ===================================================================== */
.facture-doc { position: relative; padding: 48px 52px; border-radius: 12px;
  box-shadow: 0 10px 40px -16px rgba(0,0,0,.35); max-width: 820px; overflow: hidden; }
.facture-doc::before { content: none; }
.facture-masthead { text-align: center; margin-bottom: 28px; }
.facture-masthead .facture-logo { margin: 0 auto 10px; }
.facture-masthead .fc-emet-nom { margin: 0; font-size: 21px; font-weight: 700; color: #1c2522; letter-spacing: -.01em; }
.facture-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 34px; }
.facture-entete .emetteur { max-width: 55%; }
.facture-logo { max-width: 78px; max-height: 78px; margin-bottom: 12px; display: block; }
.facture-entete .emetteur .fc-emet-nom { margin: 0 0 5px; font-size: 18px; font-weight: 700; color: #1c2522; }
.facture-entete .emetteur .fc-emet-coord,
.facture-entete .emetteur .petit { margin: 1px 0; font-size: 12.5px; color: #6b7770; line-height: 1.5; }
.facture-entete .bloc-facture { text-align: right; flex: none; }
.facture-entete .bloc-facture .mot-facture { margin: 0 0 3px; font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: #C6A15B; }
.facture-entete .bloc-facture .num-facture { margin: 0 0 12px; font-size: 21px; font-weight: 700; color: #1c2522; }
.facture-meta { display: grid; grid-template-columns: auto auto; gap: 3px 16px; margin: 0; font-size: 12.5px; }
.facture-meta dt { text-align: right; color: #9aa09a; }
.facture-meta dd { margin: 0; text-align: right; font-weight: 600; color: #1c2522; }
.facture-client { background: #FAF7F1; border: 1px solid #ECE4D6; border-radius: 9px; padding: 15px 18px; margin-bottom: 28px; }
.facture-client .lbl { margin: 0 0 5px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #B08A47; }
.facture-client .nom { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: #1c2522; }
.facture-client .fc-coord { margin: 0; font-size: 12.5px; color: #5c635e; line-height: 1.5; }
.facture-table { box-shadow: none; }
.facture-table thead th { background: none; border: none; border-bottom: 2px solid #1c2522;
  padding: 0 12px 9px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a9088; }
.facture-table tbody td { padding: 13px 12px; border-bottom: 1px solid #EDE9E1; font-size: 13.5px; color: #1c2522; }
.facture-table tbody tr:hover { background: transparent; }
.facture-totaux { margin-left: auto; max-width: 320px; margin-top: 22px; }
.facture-totaux div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; color: #5c635e; }
.facture-totaux div span:last-child { color: #1c2522; font-weight: 600; }
.facture-totaux .rabais span:last-child { color: #b3402f; }
.facture-totaux .grand-total { margin-top: 8px; padding: 13px 16px; border: 1px solid #D9CBAE; background: #E4D8BE; border-radius: 9px; }
.facture-totaux .grand-total span { color: #1c2522; font-size: 15px; font-weight: 700; }
.facture-totaux .grand-total span:last-child { color: #8A6A2E; font-size: 18px; }
.facture-totaux .acompte span:last-child { color: #1a7f37; }   /* acompte reçu (crédit) en vert */
.facture-totaux .solde-du span:last-child { color: #b3402f; }  /* solde dû en rouge */
.facture-notes { margin-top: 30px; padding: 14px 18px; background: #FAF7F1; border-left: 3px solid #C6A15B;
  border-radius: 0 8px 8px 0; }
.facture-paiement { margin-top: 14px; padding: 14px 18px; background: #FAF7F1; border-left: 3px solid #C6A15B;
  border-radius: 0 8px 8px 0; }
.facture-notes .lbl, .facture-paiement .lbl { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #B08A47; }
.facture-notes .petit, .facture-paiement .petit { margin: 0; color: #5c635e; line-height: 1.5; }
.facture-pied { margin-top: 28px; border-top: 1px solid #EDE9E1; padding-top: 14px;
  text-align: center; font-size: 12px; color: #9aa09a; }
@media print {
  .facture-doc { box-shadow: none; padding: 0; padding-top: 10px; }
}


/* --- Recherche globale (boite avec loupe, tableau de bord) --- */
.recherche-boite { display: flex; align-items: center; gap: 10px; background: var(--carte);
  border: 1px solid var(--bordure); border-radius: 10px; padding: 11px 14px;
  margin: 0 0 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.recherche-boite:focus-within { border-color: var(--vert); box-shadow: 0 0 0 3px var(--accent); }
.recherche-loupe { color: var(--gris); display: flex; flex: none; }
.recherche-boite input { flex: 1; border: none; outline: none; font: inherit;
  font-size: 16px; background: transparent; color: var(--texte); min-width: 0; }
.recherche-compte { color: var(--gris); font-weight: normal; font-size: 14px;
  background: var(--accent); border-radius: 10px; padding: 2px 9px; vertical-align: middle; }
.recherche-resultats h2 { margin-top: 26px; }

/* --- Tableau de bord : en-tetes de section et montants signes ---------- */
.section-tete { display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 2px 16px; margin: 26px 0 0; }
.section-tete h2 { margin: 0; }
.section-tete .petit { margin: 0; color: var(--gris); }
.carte .gros.positif { color: #2F7F52; }
.carte .gros.negatif { color: #B4442A; }
.carte .petit { line-height: 1.35; }
@media (prefers-color-scheme: dark) {
  .carte .gros.positif { color: #6FBF8C; }
  .carte .gros.negatif { color: #E08268; }
}

/* =====================================================================
   THEME COULEURS « 3 » — KONTE (bleu, vert, rouge, orange)  ▼ DÉBUT ▼
   ---------------------------------------------------------------------
   Ajoute APRES le theme creme « 2 », qu'il recouvre (le bloc creme
   reste en place, intact).
   - Ne touche a aucune structure HTML ni au code Python.
   - Tout est dans @media screen : l'IMPRESSION ne change pas.
   - Le document FACTURE (.facture-doc) n'est pas touche.
   - Pour REVENIR au theme creme : supprimez tout ce bloc
     (entre ▼ DÉBUT ▼ et ▲ FIN ▲). Rien d'autre a defaire.
   ===================================================================== */
@media screen {

  :root {
    --vert:        #2563EB;   /* accent principal (bleu vif) */
    --vert-fonce:  #1D4ED8;
    --bg:          #EEF3F9;   /* fond de l'app (gris-bleu tres pale) */
    --carte:       #FFFFFF;
    --texte:       #172033;
    --gris:        #5B6B82;
    --bordure:     #DCE4EF;
    --danger:      #DC3545;   /* rouge */
    --accent:      #E3EDFF;   /* bleu pale */
    --k-vert:      #16A34A;
    --k-orange:    #F59E0B;
    --k-rouge:     #DC3545;
    --k-violet:    #7C3AED;
    --k-turquoise: #0EA5B7;
  }

  /* ---- Barre laterale : bleu nuit, accents colores ---- */
  .barre { background: linear-gradient(180deg, #13284A 0%, #1B3A6B 100%); border-right: none; }
  .barre a { color: #C8D5EA; }
  .barre a:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .barre a.actif { background: rgba(56,189,248,0.18); color: #fff; border-left-color: #38BDF8; }
  .barre-marque { color: #fff; }
  .barre-marque .sous-marque { color: #8FA6C9; }
  .barre-section { color: #FBBF24; }
  .barre-deconnexion button { color: #C8D5EA; border-color: rgba(255,255,255,0.25); }
  .barre-deconnexion button:hover { background: rgba(255,255,255,0.10); color: #fff; }
  .badge-konte rect { fill: #2563EB; }
  .badge-konte path { fill: #fff; stroke: none; }

  /* ---- En-tetes (mobile + portail employe) ---- */
  .entete { background: #13284A; color: #fff; border-bottom: none; }
  .menu-btn { color: #fff; }
  .portail-tete { background: #13284A; color: #fff; border-bottom: none; }
  .portail-quitter { border-color: rgba(255,255,255,0.5); color: #fff; }
  .connexion-marque { color: #13284A; }

  /* ---- Boutons ---- */
  .bouton { color: #fff; background: linear-gradient(180deg, #3B82F6, #2563EB);
    box-shadow: 0 6px 14px -8px rgba(37,99,235,0.7); font-weight: 600; }
  .bouton:hover { background: linear-gradient(180deg, #2563EB, #1D4ED8); color: #fff; }
  .bouton.secondaire { background: #fff; color: #1D4ED8; box-shadow: none;
    border: 1px solid #BFD3F7; }
  .bouton.secondaire:hover { background: #EAF1FF; }
  .bouton.danger { background: var(--danger); color: #fff; box-shadow: none; }
  .bouton.suggestion { background: #ECFDF3; color: #15803D; border-color: #86EFAC; box-shadow: none; }
  .bouton.suggestion:hover { background: #DCFCE7; }
  .enligne-form .bouton { background: #1D4ED8; color: #fff; }
  .enligne-form .bouton:hover { background: #1E40AF; }

  /* ---- Cartes / panneaux ---- */
  .carte, .panneau, .formulaire, table, .ecriture, .pointage-carte, .vide {
    box-shadow: 0 1px 2px rgba(23,32,51,0.05), 0 10px 26px -16px rgba(23,32,51,0.22);
  }
  /* Cartes de chiffres : un liseré de couleur different pour chacune */
  .cartes > .carte { border-top: 4px solid var(--vert); }
  .cartes > .carte:nth-child(4n+2) { border-top-color: var(--k-vert); }
  .cartes > .carte:nth-child(4n+3) { border-top-color: var(--k-orange); }
  .cartes > .carte:nth-child(4n+4) { border-top-color: var(--k-violet); }

  /* ---- Tableaux ---- */
  th { background: #EAF1FB; color: #3B5378; }
  th, td { border-bottom-color: #E6ECF4; }
  tbody tr:hover { background: #F3F8FF; }
  tfoot td { background: #EAF1FB; }
  td a { color: #1D4ED8; }

  /* ---- Formulaires / champs ---- */
  .formulaire input, .formulaire textarea, .formulaire select,
  .table-lignes input, .table-lignes select, .champ-rabais input {
    background: #fff; color: #172033; border-color: #C9D5E6;
  }
  .formulaire input:focus, .formulaire textarea:focus, .formulaire select:focus {
    border-color: #2563EB; outline: 2px solid #BFD7FF; outline-offset: 0;
  }

  /* ---- Autocompletion ---- */
  .ac-liste { background: #fff; border-color: #C9D5E6; }
  .ac-item:hover { background: #E3EDFF; }
  .ac-creer { color: #1D4ED8; border-top-color: #E6ECF4; }

  /* ---- Messages / encarts ---- */
  .aide { color: #1E3A6E; background: #EAF2FF; border-left: 4px solid #F59E0B; }
  .succes { background: #16A34A; color: #fff; }
  .erreur { background: var(--danger); }

  /* ---- Sous-navigation ---- */
  .sousnav a { background: #E3EDFF; color: #1D4ED8; }
  .sousnav a:hover { background: #D2E2FF; }
  .sousnav a.actif { background: #2563EB; color: #fff; }

  /* ---- Appariement ---- */
  .appariement .col { border-color: var(--bordure); background: var(--carte); }
  .appariement .col h3 { background: var(--carte); }
  .appariement-barre { background: var(--carte); border-top-color: #2563EB; }

  /* ---- Zone de depot de fichier ---- */
  .zone-fichier { background: #F3F8FF; border-color: #BFD3F7; }
  .zone-fichier:hover, .zone-fichier.survol { border-color: #2563EB; }
  .zone-fichier.survol { background: #E3EDFF; }
  .zone-fichier.rempli { border-color: #16A34A; background: #ECFDF3; }

  /* ---- Badges de statut ---- */
  .badge.brouillon { background: #E9EDF3; color: #4B5B73; }
  .badge.envoyee   { background: #DBEAFE; color: #1D4ED8; }
  .badge.payee     { background: #DCFCE7; color: #15803D; }
  .badge.annulee   { background: #FDE2E4; color: #B91C1C; }

  /* ---- Fenetre modale ---- */
  .modal-fond { background: rgba(15,23,42,0.45); }
  .modal { background: #fff; }
  .modal h3 { color: #1D4ED8; }
  .modal label { color: #172033; }
  .modal input, .modal textarea, .modal select {
    background: #fff; color: #172033; border-color: #C9D5E6;
  }

  /* ---- Banniere brouillon ---- */
  .banniere-brouillon { background: #EAF2FF; border-color: #BFD3F7; border-left-color: #F59E0B; }

  /* ---- Pointage (espace employe) ---- */
  .pointage-carte.en-cours { background: #ECFDF3; border-color: #86EFAC; }
  .chrono { color: #15803D; }
  .bouton-pointer.commencer { background: #16A34A; color: #fff; }
  .bouton-pointer.commencer:hover { background: #15803D; }

  /* ---- Etat des resultats (ecran) ---- */
  .etat .section td { background: #EAF1FB; color: #3B5378; }
  .etat .soustotal td { border-top-color: #BFD3F7; }
  .etat .total td { border-top-color: #172033; }

  /* ---- Feuillets fiscaux (ecran) ---- */
  .feuillet { background: #fff; border-color: var(--bordure); }
  .feuillet h3, .feuillet .case-no, .feuillet-annee { color: #1D4ED8; }
  .feuillet-entete { background: #E3EDFF; }
  .avert { background: #FDE2E4; color: #B91C1C; }

  /* ---- Scanner une facture ---- */
  .suggestion { background: #ECFDF3; border-left-color: #16A34A; }
  fieldset.type-depense legend { color: #5B6B82; }
  details.apercu-ocr summary { color: #1D4ED8; }
  details.apercu-ocr pre { background: #F3F6FA; color: #2B3A52; }

  /* ---- Graphiques (couleurs du SVG recouvertes sans toucher au Python) ---- */
  .jauge-lbl { fill: #5B6B82; }
  .jauge-val { fill: #172033; }
  .jauge path[stroke="#E8DFC8"] { stroke: #E3EAF3; }
  .jauge path[stroke="#C9922A"] { stroke: #F59E0B; }   /* jauge « moyen » : orange */
  .jauge path[stroke="#C9552F"] { stroke: #DC3545; }   /* jauge negative : rouge */
  .jauge path[stroke="#2F9E5B"] { stroke: #16A34A; }   /* jauge bonne : vert */
  .courbe .axe { fill: #6B7C95; }
  .courbe line[stroke="#ECE3CE"] { stroke: #E6ECF4; }
  .courbe circle[stroke="#FBF6EA"] { stroke: #fff; }
  .courbe path[stroke="#A87C1E"] { stroke: #F97316; }
  .courbe circle[fill="#A87C1E"], .courbe rect[fill="#A87C1E"] { fill: #F97316; }
  .courbe stop[stop-color="#A87C1E"] { stop-color: #F97316; }

  /* ---- Liens dans les encarts ---- */
  .vide a, .aide a, .petit a { color: #1D4ED8; font-weight: 600; }

  /* ---- Montants signes (vert / rouge plus francs) ---- */
  .carte .gros.positif { color: #16A34A; }
  .carte .gros.negatif { color: #DC3545; }

  /* ---- Flash de la ligne ciblee ---- */
  tr:target td { animation: ligne-flash-bleu 1.8s ease-out; }
  @keyframes ligne-flash-bleu {
    0%   { background: rgba(37,99,235,0.22); }
    100% { background: transparent; }
  }

  /* ---- Le document FACTURE garde son allure « papier » ---- */
  .facture-doc { --texte: #1c2522; --gris: #6b7770; --bordure: #dde3e0; --carte: #ffffff; }
  .facture-doc .cartes > .carte { border-top: none; }
}
/* =====================================================================
   THEME COULEURS « 3 » — KONTE                               ▲ FIN ▲
   ===================================================================== */

/* =====================================================================
   LOGO KONTE (menu, en-tete mobile, connexion)               ▼ DÉBUT ▼
   Affiche l'icone complete (filigranes + contour) au lieu de la pastille
   simplifiee, 25 % plus grande. Aucun code Python touche.
   Pour REVENIR : supprimez ce bloc (entre ▼ DÉBUT ▼ et ▲ FIN ▲).
   ===================================================================== */
@media screen {
  .badge-konte { width: 40px; height: 40px; border-radius: 9px;
    background: url(/static/konte_icon.svg?v=6) center / cover no-repeat; }
  .badge-konte rect, .badge-konte path { display: none; }
  .entete .badge-konte { width: 33px; height: 33px; }
  .connexion-marque .badge-konte { width: 50px; height: 50px; }
}
/* =====================================================================
   LOGO KONTE                                                 ▲ FIN ▲
   ===================================================================== */
