/* Chiffres sur le Mac (lot 6, maquette validée par Dylan le 28/09/2026, M10, M16, M17) : Commissions en tableau par
   année, Statistiques par période (graphique à barres, le panneau garde sa place : .desk-reserve), Factures en deux
   colonnes, aperçu d'une facture figée dans le panneau. Rien ne change de hauteur quand le panneau s'ouvre : les
   légendes tiennent sur une ligne, les colonnes ne passent pas l'une sous l'autre. */
@media (min-width: 900px) {
  /* Chiffres en tête : une ligne de légende, coupée si la place manque (sinon la liste descendrait) */
  .dco .akpi .caption { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dst .akpi-s { white-space: nowrap; overflow: hidden; }

  /* Commissions */
  .dco-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
  .th.tcom, .tr.tcom { grid-template-columns: minmax(150px, 1.3fr) 130px 190px 130px 150px 32px; }
  .tr.tcom .row-title { font-size: 14px; font-weight: 600; white-space: nowrap; }
  .tc-goal { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .tc-goal .caption { margin: 0; }
  .tr.tcom .c-fac { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
  .tc-chev { color: var(--text-3); display: flex; }
  @container (max-width: 900px) {
    .th.tcom, .tr.tcom { grid-template-columns: minmax(140px, 1.2fr) 130px 190px 130px 32px; }
    .tcom .c-fac { display: none; }
  }
  .dco-cap { margin: 4px 4px 0; }

  /* Panneau : titres de section, actions pleine largeur, point de couleur d'une entreprise */
  .desk-panel .sec-t { margin: 18px 2px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
  .mp-acts .btn { flex: 1; justify-content: center; }
  .mois-panel .kv .k .dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; vertical-align: 0; }
  .mois-panel .dkv + .dkv { margin-top: -2px; }
  .desk-panel .mp-list { padding: 4px; }
  .desk-panel .mp-list .drow { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; }
  .desk-panel .mp-list .drow:hover { background: var(--fill); }
  .desk-panel .sumup { padding: 12px 14px; margin: 0 0 4px; }
  .period-panel .goals .goal { padding: 10px 14px; }

  /* Factures : à facturer (5) | émises (7), toujours côte à côte */
  .dfa { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
  @container (max-width: 640px) { .dfa { grid-template-columns: minmax(0, 1fr); } }
  .dfa .dch .btn { min-height: 30px; font-size: 12.5px; }
  .dfa .drow { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: default; }
  .dfa .drow:hover { background: var(--fill); }
  .dfa .drow.sel, .dfa .drow.sel:hover { background: var(--accent-soft); }
  .dfa .row-icon { width: 32px; height: 32px; }
  .dfa .row-main { min-width: 0; }
  .dfa .row-title, .dfa .row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fd-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
  .fd-end .row-value { font-size: 14px; font-weight: 650; }
  .fd-end .pill { min-height: 20px; font-size: 11px; }
  .fd-y { list-style: none; margin: 10px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
  .dfa .dp-empty { padding: 26px 0 10px; }
  .dfa .dp-empty svg { color: var(--green); }

  /* Aperçu d'une facture : une feuille de papier, claire dans les deux thèmes */
  .paper { margin: 0 0 12px; padding: 18px 18px 16px; border-radius: 8px; background: #F7F8FB; color: #1C2436; font-size: 11px; line-height: 1.45; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18); border: 1px solid rgba(15, 23, 42, 0.08); }
  .paper small { display: block; color: #5A6680; }
  .pp-top { display: flex; justify-content: space-between; gap: 12px; }
  .pp-cl { text-align: right; }
  .paper h4 { margin: 12px 0 2px; font-size: 15px; }
  .pp-lines { margin-top: 10px; }
  .paper .pr { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
  .paper .pr small { display: inline; }
  .paper .pp-tva { border: 0; }
  .paper .pt { display: flex; justify-content: space-between; padding-top: 8px; font-size: 12.5px; font-weight: 700; }
  .paper .ment { display: grid; gap: 2px; margin-top: 10px; font-size: 10px; color: #5A6680; }
  .ip-kv { margin-top: 4px; }

  /* Statistiques */
  .dst-h { gap: 8px; }
  .dst-h .sp { flex: 1; }
  .dst-h .seg { flex: none; }
  .dst-h .select-trigger, .dst-h .btn { min-height: 32px; }
  .dst .dst-d { width: 150px; height: 32px; min-height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; }
  /* Une ligne, toujours : sinon choisir une barre changeait sa longueur et tout descendait sous la souris */
  .dst-cap { margin: -6px 2px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dst .dst-t { width: 224px; min-width: 224px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* largeur fixe : › ne bouge pas */
  .dst-g { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 16px; align-items: start; }
  @container (max-width: 760px) { .dst-g { grid-template-columns: minmax(0, 1fr); } }
  .dst-chart .dch { align-items: center; }
  .dst-chart .dch-cap { min-width: 0; }
  .dst-chart .dch .select-trigger { min-height: 28px; }
  .stbars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding: 26px 18px 0; }
  .stbc { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: default; }
  .stbc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
  .stbv { font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
  .stb { width: 100%; max-width: 64px; min-height: 2px; border-radius: 7px 7px 3px 3px; background: var(--fill-2); transition: background 0.15s; }
  .stbc:hover .stb { background: var(--accent-soft); }
  .stbc.on .stb { background: var(--accent-bg); }
  .stbc.on .stbv { color: var(--accent); }
  .stbc.fut { opacity: 0.35; pointer-events: none; }
  .stbl { display: flex; gap: 10px; padding: 8px 18px 14px; }
  .stbl span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-align: center; font-size: 11.5px; color: var(--text-3); }
  .stbl small { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 500; }
  .stbl span.on { color: var(--accent); font-weight: 700; }
  .dsn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 11px; padding: 8px 10px; }
  .dsn .row-icon { width: 32px; height: 32px; font-size: 15px; }
  .dsn .row-main { flex: 1; min-width: 0; }
  .dsn .row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dsn .row-value { font-weight: 650; }
  .dsn-bar { flex-basis: 100%; margin-left: 43px; height: 4px; }
}
