/* Ventes sur le Mac (screens/ventes/Desk.js, SalePanel.js ; maquette validée par Dylan le 28/09/2026, M8) : filtres,
   tableau à colonnes groupé par mois, fiche dans le panneau. Les colonnes se retirent quand la place manque (panneau
   ouvert sur une fenêtre de 1 440 px) : d'abord l'offre, puis la date et la commission. */
@media (min-width: 900px) {
  /* Une seule ligne de filtres, puis les totaux : la même hauteur quelle que soit la largeur (panneau ouvert ou non),
     sinon le tableau descendait sous la souris à l'ouverture du panneau */
  .dvt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
  .dvt-filters .chips { flex: 0 1 auto; min-width: 0; gap: 6px; } /* ne rétrécit (et ne défile) que s'il n'y a vraiment plus de place */
  .dvt-filters .chip { flex: none; }
  .dvt-filters .select { flex: none; }
  .dvt-filters .chip { min-height: 30px; padding: 0 11px; font-size: 12.5px; font-weight: 600; }
  .dvt-filters .select-trigger { min-height: 30px; }
  .dvt .dvt-q { flex: 1 1 110px; width: auto; min-width: 110px; max-width: 220px; height: 30px; min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
  .dvt-sums { display: flex; justify-content: flex-end; gap: 22px; margin: 8px 2px 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
  .dvt-sums b { color: var(--text); }
  .dvt .focus-bar { font-size: 14px; }

  .tbl { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .th, .tr { display: grid; grid-template-columns: 40px minmax(190px, 1.5fr) minmax(130px, 1fr) 84px 160px 100px 130px 96px; align-items: center; gap: 12px; padding: 0 14px; }
  .th { height: 34px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); background: var(--card-2, var(--fill)); border-bottom: 1px solid var(--line); }
  .th .r, .tr .r { text-align: right; justify-self: end; }
  .mh { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 6px; font-size: 13px; border-top: 1px solid var(--line); }
  .tbl > div:nth-child(2) .mh { border-top: 0; }
  .mh span { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .tr { min-height: 50px; border-top: 1px solid var(--line); cursor: default; outline: none; }
  .tr:hover { background: var(--fill); }
  .tr.sel, .tr.sel:hover { background: var(--accent-soft); }
  .tr .row-icon { width: 32px; height: 32px; font-size: 15px; }
  .tr-main { min-width: 0; display: flex; flex-direction: column; }
  .tr .row-title { font-size: 14px; font-weight: 600; }
  .tr .row-sub { font-size: 12.5px; }
  .tr .c-off { color: var(--text-2); }
  .tr-amt { font-size: 14px; font-weight: 650; }
  .tr .c-com { font-size: 13px; font-weight: 650; white-space: nowrap; }
  .tr .pill { min-height: 22px; font-size: 11.5px; }
  .sub-n { display: none; }
  .prog { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .prog .caption { margin: 0; }
  .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
  .bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent-bg); }
  .bar i.g { background: var(--green); } .bar i.s { background: var(--slate); }
  .prog .qa { width: 28px; min-height: 28px; padding: 0; opacity: 0; transition: opacity 0.12s; }
  .tr:hover .qa, .tr.sel .qa { opacity: 1; }
  @container (max-width: 1060px) {
    .th, .tr { grid-template-columns: 40px minmax(190px, 1fr) 84px 150px 100px 130px 96px; }
    .c-off, .sub-w { display: none; } .sub-n { display: inline; }
  }
  @container (max-width: 860px) {
    .th, .tr { grid-template-columns: 36px minmax(160px, 1fr) 130px 90px 96px; }
    .c-date, .c-com { display: none; }
  }
  .dvt-more { padding-top: 12px; }

  /* Fiche d'une vente dans le panneau */
  .sp-hd { gap: 4px; }
  .sp-av { width: 56px; height: 56px; font-size: 26px; margin-bottom: 4px; }
  .sp-nm { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }
  .sp-pills { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
  .sp-ech { display: grid; gap: 2px; }
  .ech-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: default; }
  .ech-row:hover:not(:disabled) { background: var(--fill); }
  .ech-row:disabled { opacity: 0.55; }
  .ech-row .chk { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--fill-2); color: transparent; transition: background 0.2s, box-shadow 0.2s; }
  .ech-row:hover:not(:disabled) .chk { box-shadow: inset 0 0 0 2px var(--accent); }
  .ech-row.done .chk { background: var(--green); box-shadow: none; color: #fff; }
  .ech-row .ed { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
  .ech-row .ed small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); }
  .ech-row.late .ed small { color: var(--red); }
  .ech-row .caption { margin: 0; }
  .sp-acts .btn { flex: 1; justify-content: center; }
  .sale-panel .sec-t { margin: 18px 2px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
}
