/* Temaprod Suivi — habillage aux couleurs de la charte Temaprod.
   Terracotta #B75233 et noir #0D1213 relevés sur le logo ; ocre et céladon issus du
   nuancier InDesign de la charte (c24m48y70k14 et c40m27y27k6).
   Titres en Bw Modelica, la police de la marque, avec repli sur la police système.
   Aucun JavaScript : les menus sont des <details>. */
:root {
  --fond: #f7f5f3; --carte: #ffffff; --bord: #eae5e1; --bord-fort: #dad3cd; --texte: #16191a; --muet: #726c66;
  --accent: #b75233; --accent-doux: #f6eae5; --noir: #16191a;
  --barre: #0d1213; --barre-2: #1e2526; --barre-texte: #c2bcb6;
  --ombre: 0 1px 2px rgba(22,25,26,.05), 0 6px 18px rgba(22,25,26,.05);
  --ombre-haut: 0 2px 4px rgba(22,25,26,.07), 0 12px 28px rgba(22,25,26,.11);
  --c-piste: #c6bfb8; --c-ao: #8aa9ab; --c-envoye: #d29a3e; --c-signe: #4a8a63; --c-acomptes: #93a862;
  --c-termine: #2e6246; --c-refuse: #c6bfb8; --c-emise: #5f8a8f; --c-payee: #4a8a63; --c-annulee: #c6bfb8;
  --c-brouillon: #e6e0da; --c-echue: #9b2f1e; --c-expire: #ce7b61;
  --c-prevu: #c6bfb8; --c-a-payer: #d29a3e; --c-paye: #5f8a8f;
  --titre: "Bw Modelica SS02", "Bw Modelica", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: var(--texte); background: var(--fond); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-family: var(--titre); letter-spacing: -.01em; }

/* ---- structure ---- */
.app { display: flex; min-height: 100vh; }
.barre { width: 232px; flex: 0 0 232px; background: linear-gradient(180deg, var(--barre) 0%, var(--barre-2) 100%); color: var(--barre-texte); padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.barre .logo { font-family: var(--titre); font-weight: 700; font-size: 16.5px; color: #fff; padding: 2px 10px 22px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.barre .logo svg { flex: 0 0 30px; }
.barre a { display: flex; align-items: center; gap: 10px; color: var(--barre-texte); padding: 9px 12px; border-radius: 9px; margin: 2px 0; font-weight: 500; transition: background .12s, color .12s; }
.barre a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.barre a.actif { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.barre form.quitter { margin-top: 18px; padding: 0 2px; }
.barre form.quitter button { width: 100%; background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--barre-texte); font-size: 13px; }
.barre form.quitter button:hover { background: rgba(255,255,255,.08); color: #fff; }
.barre .sep { border-top: 1px solid rgba(255,255,255,.10); margin: 12px 8px; }
.barre .badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.contenu { flex: 1; min-width: 0; max-width: 100%; padding: 26px 32px 70px; overflow-x: hidden; }
/* un tableau large défile dans son cadre au lieu de pousser la page entière */
.defilant { overflow-x: auto; margin: 0 -2px; padding: 0 2px 2px; }
.entete { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.entete h1 { font-size: 26px; margin: 0; font-weight: 700; }
.entete form.recherche { margin-left: auto; }
.entete input[type=search] { width: 300px; padding: 9px 14px; border: 1px solid var(--bord-fort); border-radius: 10px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.sous-titre { color: var(--muet); margin: -8px 0 18px; }

/* ---- cartes ---- */
.carte { background: var(--carte); border-radius: 14px; box-shadow: var(--ombre); padding: 18px 20px; margin-bottom: 18px; border: 1px solid var(--bord); }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 20px; }
.cartes > * { min-width: 0; }
.kpi { --k: var(--accent); display: block; position: relative; background: var(--carte); border-radius: 14px; box-shadow: var(--ombre); padding: 16px 18px 14px; border: 1px solid var(--bord); color: inherit; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--k); }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-haut); border-color: var(--k); }
.kpi .ico { position: absolute; right: 14px; top: 12px; font-size: 22px; opacity: .9; }
.kpi .val { font-family: var(--titre); font-size: 26px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .lib { color: var(--muet); font-size: 13px; font-weight: 500; padding-right: 30px; }
.kpi.previsionnel { background: linear-gradient(180deg, #fffaf7, #fff); }
.kpi.previsionnel .val { font-size: 30px; }
@media (min-width: 1000px) { .kpi.previsionnel { grid-column: span 2; } }
.kpi .ttc { font-variant-numeric: tabular-nums; border-bottom: 1px dotted var(--bord-fort); }
.grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.grille > * { min-width: 0; }
@media (max-width: 1250px) { .grille { grid-template-columns: 1fr; } }

/* ---- groupes ---- */
details.groupe { margin-bottom: 16px; }
details.groupe > summary { font-family: var(--titre); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 6px; font-weight: 700; font-size: 15.5px; border-radius: 10px; }
details.groupe > summary:hover { background: rgba(22,25,26,.03); }
details.groupe > summary::-webkit-details-marker { display: none; }
details.groupe > summary::before { content: "▸"; color: var(--muet); font-size: 12px; transition: transform .15s; width: 10px; }
details.groupe[open] > summary::before { transform: rotate(90deg); }
details.groupe > summary .compte { font-family: inherit; color: var(--muet); font-weight: 600; font-size: 12.5px; background: #efeae6; border-radius: 10px; padding: 1px 9px; }
details.groupe > summary .total { margin-left: auto; color: var(--muet); font-weight: 600; font-size: 13px; }
details.groupe > summary .liseret { width: 6px; height: 22px; border-radius: 3px; }

/* ---- tableaux ---- */
table.tab { width: 100%; font-size: 13px; border-collapse: separate; border-spacing: 0; background: var(--carte); border-radius: 12px; box-shadow: var(--ombre); border: 1px solid var(--bord); }
table.tab tr:first-child th:first-child { border-top-left-radius: 12px; } table.tab tr:first-child th:last-child { border-top-right-radius: 12px; }
table.tab tr:last-child td:first-child { border-bottom-left-radius: 12px; } table.tab tr:last-child td:last-child { border-bottom-right-radius: 12px; }
table.tab th a.tri { color: inherit; }
table.tab th a.tri:hover { color: var(--accent); text-decoration: none; }
table.tab th a.tri .fleche { opacity: .3; font-size: 10px; }
table.tab th a.tri:hover .fleche { opacity: .7; }
table.tab th a.tri.actif { color: var(--accent); }
table.tab th a.tri.actif .fleche { opacity: 1; }
table.tab th { text-align: left; font-weight: 600; color: var(--muet); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 8px; border-bottom: 1px solid var(--bord); background: #faf8f6; line-height: 1.3; }
table.tab td { padding: 9px 8px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
table.tab tr:last-child td { border-bottom: 0; }
table.tab tr:hover td { background: #faf7f5; }
table.tab .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tab td.objet { max-width: 21ch; }
table.tab td.client { max-width: 20ch; }
/* un nom de service très long ne doit pas imposer sa largeur à tout le tableau */
table.tab td.objet, table.tab td.client { overflow-wrap: anywhere; }
details.groupe > div.defilant, .carte > div.defilant { width: 100%; }
table.tab th.coche, table.tab td.coche { width: 28px; padding-right: 0; text-align: center; }
.actions-groupe { display: flex; align-items: center; gap: 12px; margin: 10px 2px 4px; flex-wrap: wrap; }
table.tab tr.inactif td { color: var(--muet); }
.muet { color: var(--muet); }
.petit { font-size: 12px; }
.nowrap { white-space: nowrap; }
.numero { font-weight: 700; }
.numero a { color: var(--texte); }
.numero a:hover { color: var(--accent); }
.source { font-size: 10.5px; color: var(--muet); background: #efeae6; border-radius: 5px; padding: 1px 6px; margin-left: 5px; font-weight: 600; vertical-align: middle; }

/* ---- pastilles d'état (cliquables via <details>) ---- */
.pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 118px; padding: 5px 12px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 12.5px; white-space: nowrap; letter-spacing: .01em; box-shadow: inset 0 -1px 0 rgba(0,0,0,.08); }
.pastille.piste { background: var(--c-piste); color: #2c2926; } .pastille.ao_depose { background: var(--c-ao); color: #16292a; }
.pastille.envoye { background: var(--c-envoye); color: #2e2313; } .pastille.signe { background: var(--c-signe); }
.pastille.acomptes { background: var(--c-acomptes); color: #23290f; } .pastille.termine { background: var(--c-termine); }
.pastille.bons { background: var(--c-ao); color: #16292a; }
.pastille.refuse, .pastille.sans_suite, .pastille.remplace, .pastille.annulee { background: var(--c-refuse); color: #2c2926; }
.pastille.emise { background: var(--c-emise); } .pastille.payee { background: var(--c-payee); } .pastille.brouillon { background: var(--c-brouillon); color: #2c2926; }
.pastille.echue { background: var(--c-echue); } .pastille.expire { background: var(--c-expire); }
.pastille.prevu { background: var(--c-prevu); color: #2c2926; } .pastille.a_payer { background: var(--c-a-payer); color: #2e2313; } .pastille.paye { background: var(--c-paye); }
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary .pastille::after { content: "▾"; font-size: 10px; opacity: .75; margin-left: 6px; }
details.menu > summary:hover .pastille { filter: brightness(1.06); }
details.menu > .liste { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--bord); border-radius: 12px; box-shadow: var(--ombre-haut); padding: 8px; min-width: 220px; }
details.menu .liste button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 8px; font: inherit; cursor: pointer; }
details.menu .liste button:hover { background: var(--accent-doux); }
details.menu .liste .titre { font-size: 10.5px; color: var(--muet); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 4px; font-weight: 600; }
details.menu .liste .point { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; vertical-align: middle; }

/* ---- étiquettes ---- */
.etiquette { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; margin: 1px 3px 1px 0; white-space: nowrap; }
.etiquette form { display: inline; } .etiquette button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 5px; font-size: 11px; opacity: .8; }
.ajout-etiquette summary { display: inline-block; border: 1px dashed var(--bord-fort); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--muet); cursor: pointer; }
.ajout-etiquette summary:hover { border-color: var(--accent); color: var(--accent); }

/* ---- formulaires ---- */
.champ { display: grid; grid-template-columns: 170px 1fr; gap: 8px; align-items: center; margin: 7px 0; }
.champ > span { color: var(--muet); font-size: 13px; }
input[type=text], input[type=date], input[type=number], input[type=search], select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--bord-fort); border-radius: 9px; background: #fff; max-width: 100%; transition: border-color .12s, box-shadow .12s; }
select { min-width: 140px; max-width: 320px; }
textarea { width: 100%; min-height: 72px; }
button, .bouton { font: inherit; padding: 7px 14px; border-radius: 9px; border: 1px solid var(--bord-fort); background: #fff; cursor: pointer; font-weight: 500; transition: background .12s, box-shadow .12s; }
button:hover { background: #f5f2ef; }
button.principal, .bouton.principal { background: var(--noir); color: #fff; border-color: var(--noir); font-weight: 600; }
button.principal:hover { background: #2f3637; }
button.discret { border: 0; background: transparent; color: var(--accent); padding: 2px 6px; }
button.discret:hover { background: var(--accent-doux); }
form.filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.bandeau { border-radius: 10px; padding: 9px 14px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.bandeau.attente { background: #fbf3e9; border-color: #eedfc6; color: #6b4a16; }
.bandeau.souci { background: #fbeeec; border-color: #f0cfc9; color: #8c2c1c; }
.bandeau.fini { background: #eef4f0; border-color: #cbdfd3; color: #2e6246; }
.flash { background: #eef4f0; border: 1px solid #cbdfd3; color: #2e6246; border-radius: 10px; padding: 9px 14px; margin-bottom: 16px; font-weight: 500; }
.faits { width: 100%; } .faits th { text-align: left; color: var(--muet); font-weight: 500; width: 190px; padding: 6px 0; vertical-align: top; } .faits td { padding: 6px 0; }
.suggestion { background: #fbf3e9; border: 1px solid #eedfc6; border-radius: 10px; padding: 7px 12px; font-size: 12.5px; margin-bottom: 10px; }
h2 { font-size: 15px; margin: 20px 0 10px; font-weight: 700; }
h2:first-child { margin-top: 0; }
pre { background: #faf8f6; border: 1px solid var(--bord); border-radius: 10px; padding: 12px; white-space: pre-wrap; font-size: 12px; }
.vide { color: var(--muet); padding: 18px; text-align: center; background: var(--carte); border-radius: 12px; border: 1px dashed var(--bord-fort); }
ul.mouvements { list-style: none; margin: 0; padding: 0; }
ul.mouvements li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bord); }
ul.mouvements li:last-child { border-bottom: 0; }
ul.mouvements .quand { color: var(--muet); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 78px; }
ul.mouvements .passage { margin-left: auto; font-size: 12.5px; white-space: nowrap; }

.barre-progres { height: 7px; background: #efeae6; border-radius: 4px; overflow: hidden; width: 104px; display: block; }
.barre-progres > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-signe), var(--c-termine)); border-radius: 4px; }
td.avancement { line-height: 1.5; }
.montant-facture { display: block; font-size: 12px; font-weight: 600; color: var(--c-signe); margin-top: 3px; font-variant-numeric: tabular-nums; }
.reste { display: block; font-size: 12px; font-weight: 600; color: var(--c-envoye); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---- date de relance saisie dans la liste ---- */
form.relance { display: flex; align-items: center; gap: 4px; }
form.relance input[type=date] { padding: 4px 6px; font-size: 12.5px; border-radius: 7px; }
form.relance input[type=date].due { border-color: var(--c-echue); color: var(--c-echue); font-weight: 600; }
form.relance button { font-size: 12px; }


/* ---- tenir dans la largeur : on préfère une ligne plus haute à un défilement horizontal ---- */
/* dans un tableau, un état long va à la ligne plutôt que d'élargir toute la colonne */
table.tab .pastille { min-width: 84px; padding: 4px 8px; font-size: 11.5px; white-space: normal; text-align: center; line-height: 1.25; }
table.tab .barre-progres { width: 76px; }
table.tab td.client { max-width: 17ch; }
table.tab .etiquette { font-size: 10.5px; padding: 1px 7px; }
table.tab .ajout-etiquette > summary { font-size: 10.5px; }
table.tab td.etiq { max-width: 12ch; }
/* la liste des factures Qonto candidates ne doit pas imposer sa largeur à la colonne */
table.tab td.justificatif select { max-width: 160px; }
/* les colonnes de dates n'ont pas besoin d'air : leur contenu est court et fixe */
table.tab td.nowrap, table.tab th.nowrap { padding-left: 7px; padding-right: 7px; }
table.tab .source { font-size: 9.5px; padding: 1px 5px; margin-left: 4px; }
table.tab form.relance { gap: 2px; }
table.tab form.relance input[type=date] { width: 92px; padding: 3px 3px; font-size: 11.5px; }
table.tab form.relance button { padding: 2px 3px; font-size: 11px; }

/* ---- fiche clients : des champs de saisie qui ne poussent pas le tableau ---- */
table.tab-clients { table-layout: fixed; }
table.tab-clients input[type=text], table.tab-clients select { width: 100%; min-width: 0; padding: 5px 6px; font-size: 12.5px; }
table.tab-clients td.alias { overflow-wrap: anywhere; font-size: 11px; }
table.tab-clients button { padding: 4px 7px; font-size: 12px; margin-top: 4px; }

/* ---- un texte long est coupé proprement, le survol en donne la totalité ---- */
span.coupe { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 3; }
table.tab td.client span.coupe { -webkit-line-clamp: 2; }
table.tab td.client .petit { display: block; }
table.tab-clients td.alias span.coupe { -webkit-line-clamp: 4; }

/* ---- fenêtre étroite : on resserre plutôt que de couper ---- */
@media (max-width: 1240px) {
  .barre { width: 200px; flex: 0 0 200px; padding: 20px 12px; font-size: 13.5px; }
  .contenu { padding: 24px 22px 60px; }
  table.tab { font-size: 12.5px; }
  table.tab th { font-size: 10.5px; }
  table.tab td, table.tab th { padding-left: 7px; padding-right: 7px; }
  table.tab td.objet { max-width: 17ch; }
  table.tab td.client { max-width: 15ch; }
  table.tab .pastille { min-width: 76px; font-size: 11px; }
}
@media (max-width: 1140px) {
  table.tab { font-size: 12px; }
  table.tab td, table.tab th { padding-left: 6px; padding-right: 6px; }
  table.tab td.objet { max-width: 16ch; }
  table.tab td.client { max-width: 13ch; }
  table.tab th { font-size: 9.8px; letter-spacing: 0; }
  table.tab .pastille { min-width: 62px; font-size: 10.5px; padding: 3px 5px; }
  table.tab form.relance input[type=date] { width: 76px; font-size: 10.5px; }
  table.tab .ajout-etiquette > summary { font-size: 10px; }
  table.tab .ajout-etiquette .mot { display: none; }
  table.tab td.justificatif select { max-width: 130px; }
}
@media (max-width: 1080px) {
  .barre { width: 176px; flex: 0 0 176px; padding: 18px 10px; font-size: 13px; }
  .barre .logo { font-size: 15px; gap: 7px; }
  .barre .logo svg { flex: 0 0 24px; width: 24px; height: 18px; }
  .contenu { padding: 20px 16px 60px; }
  .entete h1 { font-size: 22px; }
  .entete input[type=search] { width: 200px; }
  table.tab td.objet { max-width: 12ch; }
  table.tab td.client { max-width: 11ch; }
}

.neutre { font-size: 10.5px; font-weight: 600; color: var(--muet); background: #efeae6; border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; }
h2.sous-groupe { font-size: 14px; margin: 18px 0 8px; display: flex; align-items: baseline; gap: 10px; }

/* ---- formulaires de déclaration dans un tableau : une ligne par champ, avec son intitulé ---- */
/* la colonne est dimensionnée par le tableau (td.declaration) : sans largeur imposée, des champs
   à min-width nul s'effondreraient à quelques pixels */
form.declarer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; align-items: end; width: 320px; }
/* .champ pose une grille « intitulé 170px | champ » : ici l'intitulé passe au-dessus */
form.declarer label.champ { display: grid; grid-template-columns: 1fr; gap: 2px; min-width: 0; margin: 0; }
form.declarer label.champ > span { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muet); font-weight: 600; }
/* sans min-width, la plus longue option d'une liste impose sa largeur et écrase les autres champs */
form.declarer input, form.declarer select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 12.5px; }
form.declarer button { justify-self: start; grid-column: 1 / -1; }
.bouton-menu { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--bord-fort); border-radius: 8px; padding: 3px 9px; font-size: 12px; color: var(--accent); background: #fff; }
details.menu > summary:hover .bouton-menu { background: var(--accent-doux); }
details.menu > .liste.large { min-width: 260px; right: 0; left: auto; }
details.menu .liste label.champ { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 4px 10px; margin: 0; }
details.menu .liste label.champ > span { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muet); font-weight: 600; }
details.menu .liste label.champ input, details.menu .liste label.champ select { width: 100%; padding: 5px 7px; font-size: 12.5px; }
details.menu .liste button.principal { margin: 8px 10px 4px; width: calc(100% - 20px); }


/* ---- charges récurrentes : le tableau reste, le formulaire s'ouvre sur la ligne ---- */
table.tab tr.en-edition td { background: var(--accent-doux); }
table.tab tr.edition > td { background: #fbf8f6; padding: 14px 16px; }
a.bouton-menu { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--bord-fort);
                border-radius: 8px; padding: 3px 9px; font-size: 12px; color: var(--accent); background: #fff; white-space: nowrap; }
a.bouton-menu:hover { background: var(--accent-doux); text-decoration: none; }
form.edition-charge { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px 12px; max-width: 900px; }
form.edition-charge label.champ { display: grid; grid-template-columns: 1fr; gap: 2px; min-width: 0; margin: 0; }
form.edition-charge label.champ.large { grid-column: span 2; }
form.edition-charge label.champ > span { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muet); font-weight: 600; }
form.edition-charge label.champ input, form.edition-charge label.champ select { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13px; }
form.edition-charge label.champ input:disabled { background: #efeae6; color: var(--muet); }
form.edition-charge .pied { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
form.edition-charge .pied a.discret { color: var(--accent); font-size: 12px; }
@media (max-width: 1140px) { form.edition-charge { grid-template-columns: repeat(2, minmax(110px, 1fr)); } }

.alerte { color: var(--c-echue); font-weight: 600; }

.detache { display: inline-block; font-size: 9.5px; font-weight: 600; color: var(--muet); background: #efeae6;
           border-radius: 999px; padding: 1px 6px; margin-left: 5px; white-space: nowrap; }

form.edition-charge label.champ.coche .ligne { display: flex; align-items: flex-start; gap: 7px; padding-top: 4px; }
form.edition-charge label.champ.coche input[type=checkbox] { width: auto; margin: 2px 0 0; flex: 0 0 auto; }

/* ---- courbe de trésorerie ---- */
svg.courbe { width: 100%; height: auto; min-width: 640px; display: block; }
svg.courbe .grille { stroke: var(--bord); stroke-width: 1; }
svg.courbe .zero { stroke: var(--muet); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.courbe .repere, svg.courbe .mois { fill: var(--muet); font-size: 11px; font-variant-numeric: tabular-nums; }
svg.courbe .aire { stroke: none; }
svg.courbe .aire.positif { fill: var(--c-signe); opacity: .14; }
svg.courbe .aire.negatif { fill: var(--c-echue); opacity: .14; }
svg.courbe .trait { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.courbe .trait.positif { stroke: var(--c-signe); }
svg.courbe .trait.negatif { stroke: var(--c-echue); }
svg.courbe .point { stroke: var(--carte); stroke-width: 2; }
svg.courbe .point.positif { fill: var(--c-signe); }
svg.courbe .point.negatif { fill: var(--c-echue); }
svg.courbe .valeur { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
svg.courbe .valeur.positif { fill: var(--c-termine); }
svg.courbe .valeur.negatif { fill: var(--c-echue); }

/* ---- planification des devis signés ---- */
.planif { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--ombre); }
.planif .tete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.planif .tete a { font-weight: 700; }
.planif .tete .client { font-weight: 600; }
.planif .tete .objet { flex: 1 1 200px; }
.planif .tete .chiffres { font-size: 12px; }
.planif table.menue { box-shadow: none; border: 0; margin: 6px 0; background: none; }
.planif table.menue td { border-bottom: 0; padding: 3px 0; }
form.echeance { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
form.echeance input[type=text] { padding: 5px 8px; font-size: 12.5px; }
form.echeance input[type=date] { padding: 5px 7px; font-size: 12.5px; }
form.echeance.ajout { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--bord); }
svg.courbe .unite { fill: var(--muet); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
svg.courbe .bord-mois { stroke: var(--bord-fort); stroke-width: 1; }
svg.courbe .annee { fill: var(--muet); font-size: 10px; font-weight: 600; }
svg.courbe .mois { font-size: 11.5px; font-weight: 600; }
svg.courbe .point.gros { stroke-width: 2.5; }
svg.courbe .survol { fill: transparent; }
svg.courbe .survol:hover { fill: var(--accent); opacity: .07; }

/* ---- sélecteur de mois et courbe de détail ---- */
.choix-mois { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.choix-mois a { display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--bord); border-radius: 10px;
                background: #fff; color: var(--texte); text-align: center; min-width: 78px; }
.choix-mois a:hover { border-color: var(--accent); text-decoration: none; }
.choix-mois a.actif { border-color: var(--accent); background: var(--accent-doux); box-shadow: inset 0 -2px 0 var(--accent); }
.choix-mois .nom { font-size: 11.5px; font-weight: 600; }
.choix-mois .solde { font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; }
svg.courbe.detail .point.entree { fill: var(--c-payee); }
svg.courbe.detail .etiquette { font-size: 10.5px; font-weight: 600; }
svg.courbe.detail .etiquette.entree { fill: var(--c-termine); }
svg.courbe.detail .etiquette.sortie { fill: var(--muet); }

table.tab tr.premier-du-jour td { border-top: 1px solid var(--bord); }
table.tab tr.total-jour td { background: #faf8f6; font-size: 12px; }

/* l'objet d'une facture peut faire deux cents signes : on en montre deux lignes, le survol donne le reste */
table.tab td.mouvement { max-width: 44ch; overflow-wrap: anywhere; }
table.tab td.mouvement span.coupe { -webkit-line-clamp: 2; }
.planif.inactive { opacity: .55; background: #faf8f6; }
.planif.inactive .tete .client { text-decoration: line-through; }
.planif .tete form { display: inline; }
.taux-tva { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; margin-bottom: 12px; }
.taux-tva label.champ { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; margin: 0; }
.taux-tva label.champ > span { grid-column: 1 / -1; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muet); font-weight: 600; }
.taux-tva label.champ input { width: 100%; min-width: 0; padding: 5px 7px; font-size: 12.5px; text-align: right; }

/* ---- page de connexion ---- */
body.page-connexion { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
main.connexion { background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre-haut);
                 padding: 30px 32px 26px; width: 100%; max-width: 380px; }
main.connexion .logo { display: flex; align-items: center; gap: 12px; font-family: var(--titre); font-weight: 700;
                       font-size: 19px; margin-bottom: 22px; }
main.connexion label.champ { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0 0 14px; }
main.connexion label.champ > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muet); font-weight: 600; }
main.connexion input { width: 100%; padding: 10px 12px; font-size: 15px; }
main.connexion button { width: 100%; padding: 10px; font-size: 15px; margin-top: 4px; }
main.connexion .souci { background: #fbecea; border: 1px solid var(--c-echue); color: var(--c-echue);
                        border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.barre .qui { font-size: 12px; color: #fff; font-weight: 600; padding: 4px 12px 8px; }
