/* Ventes épuré : une ligne par vendeur à gauche ; à droite ses ventes en trois cartes (à expédier, paiement
   attendu, payé et à reverser). On clique une vente pour la déplier. Préfixe des classes : « vt- ». */

/* ───────── Liste des vendeurs ───────── */
.lg.vt-v { display: flex; align-items: center; gap: 12px; padding: 13px 12px; }
.vt-v .avatar { width: 36px; height: 36px; font-size: 13px; }
.vt-v .vt-nb { background: var(--encre); }
.vt-v-c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vt-plein { background: var(--t-rouge); color: #fff; }

/* ───────── Fiche ───────── */
.vt-fiche { display: flex; flex-direction: column; gap: 16px; max-width: 1040px; min-width: 0; }
.vt-solo { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; min-width: 0; }
.vt-solo .tete-fiche { align-items: center; }
.vt-solo .tete-fiche h1 { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.vt-retour { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-weight: 700; }

.vt-carte { padding: 16px 22px 6px; overflow: hidden; }
.vt-carte-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; min-height: 26px; }
.vt-carte-tete h3 { font-size: 16px; font-weight: 800; }
.vt-carte-tete .sous { color: var(--encre-2); flex: 1; }
.vt-carte-tete .btn { margin: -7px 0; }
.vt-rien { padding: 11px 0 12px; border-top: 1px solid var(--ligne); color: var(--encre-2); }
.vt-outils { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.vt-outils .champ-recherche { max-width: none; }
.vt-outils select { width: auto; flex: none; height: 40px; }

/* Une vente : article, où elle en est, montant. La ligne entière se clique. */
.vt-l { border-top: 1px solid var(--ligne); margin: 0 -22px; }
.vt-s { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, auto); gap: 2px 14px; align-items: center; width: 100%; padding: 11px 22px; border: 0; background: none; text-align: left; color: inherit; }
button.vt-s:hover { background: var(--survol); }
button.vt-s:focus-visible { outline-offset: -2px; }
.vt-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vt-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-n b { font-weight: 700; }
.vt-c { color: var(--encre-2); font-size: 14px; }
.vt-d { color: var(--encre-2); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; justify-self: end; min-width: 0; }
.vt-e { text-align: right; font-weight: 800; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vt-autres { border-top: 1px solid var(--ligne); padding: 11px 0; }
.vt-autres .lien { justify-self: start; }
.vt-e .vt-inverse { font-size: 13px; font-weight: 600; color: var(--encre-2); }
.vt-autres .vt-e { font-size: 15px; font-weight: 600; color: var(--encre-2); }

/* Dépliée : la phrase sous l'article, puis les faits et le geste du moment, sur fond gris. */
.vt-l.ouverte { background: var(--fond); border-top-color: transparent; }
.vt-l.ouverte + .vt-l { border-top-color: transparent; }
.vt-l.ouverte button.vt-s:hover { background: none; }
.vt-l.ouverte .vt-n { white-space: normal; }
.vt-l.ouverte .vt-d, .vt-l.ouverte .vt-e { grid-row: 1 / span 2; }
.vt-p { grid-column: 1; grid-row: 2; color: var(--encre-2); font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.vt-p b { color: var(--encre); font-weight: 700; }
.vt-p .vt-gain { color: var(--t-vert); }
.vt-detail { padding: 2px 22px 14px; display: flex; flex-direction: column; gap: 12px; }
.vt-faits { margin: 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--bord); }
.vt-faits dt { color: var(--encre-2); font-weight: 600; }
.vt-faits dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vt-faits .copiable .ic { opacity: 1; }
.vt-meta { color: var(--encre-2); font-size: 13.5px; }
.vt-gestes { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.vt-gestes .btn { background: var(--surface); }

/* Reversements passés */
.vt-rev { border-top: 1px solid var(--ligne); padding: 0 0 10px; }
.vt-rev .vt-s { padding: 11px 0 6px; }
.vt-rev-v { display: flex; gap: 6px; flex-wrap: wrap; }

/* ───────── Fenêtres : saisie d'une vente, retours, reversement ───────── */
.vt-note { color: var(--encre-2); font-size: 13.5px; }
.vt-pile { display: flex; flex-direction: column; gap: 12px; }
.vt-pile[hidden] { display: none; }
.vt-resume { font-size: 14.5px; padding: 11px 13px; border-radius: 10px; background: var(--fond); }
.vt-resume:empty, .vt-resume[hidden] { display: none; }
.vt-resume.rouge-fort { background: var(--t-rouge-f); font-weight: 600; }
.vt-quoi { display: flex; flex-direction: column; gap: 8px; }
.vt-quoi .choix:empty { display: none; }
[data-modale="vente"] .choix input:disabled + span { opacity: .45; cursor: not-allowed; }
.vt-deux { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; align-items: start; }
.vt-alerte { font-size: 14px; margin-top: -6px; font-weight: 600; }
.vt-alerte[hidden] { display: none; }
.vt-plus { border-top: 1px solid var(--ligne); padding-top: 12px; }
.vt-plus > summary { cursor: pointer; font-weight: 700; color: var(--encre-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.vt-plus > summary::-webkit-details-marker { display: none; }
.vt-plus > summary:hover { color: var(--encre); }
.vt-plus > summary .ic { transition: transform var(--vite); }
.vt-plus[open] > summary .ic { transform: rotate(180deg); }
.vt-plus-corps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.vt-plus-corps .plein { grid-column: 1 / -1; }

@media (max-width: 1240px) {
  .vt-carte { padding: 14px 18px 4px; }
  .vt-l { margin: 0 -18px; }
  .vt-s, .vt-detail { padding-left: 18px; padding-right: 18px; }
  .vt-rev .vt-s, .vt-autres { padding-left: 0; padding-right: 0; }
}

@keyframes vt-apparition { from { opacity: 0; } to { opacity: 1; } }

/* ───────── Téléphone : l'article et le montant sur une ligne, le reste dessous ───────── */
@media (max-width: 760px) {
  .vt-solo .tete-fiche h1 { display: none; }
  .vt-solo .tete-fiche .sous { font-size: 15px; margin-top: 0; }
  .vt-solo { padding-bottom: 60px; }
  /* « + Vente » reste sous le pouce, au-dessus de la navigation. L'apparition de l'écran se fait sans
     déplacement : un déplacement décrocherait le bouton du bas de l'écran pendant l'animation. */
  .vue:has(> .vt-solo) { animation-name: vt-apparition; }
  .vt-solo .vt-plus-vente { position: fixed; left: 14px; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); height: 48px; font-size: 16px; z-index: 30; box-shadow: 0 0 0 13px var(--fond); }
  .vt-carte { padding: 14px 16px 4px; }
  .vt-l { margin: 0 -16px; }
  .vt-s { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; gap: 3px 12px; }
  .vt-detail { padding: 2px 16px 14px; }
  .vt-rev .vt-s, .vt-autres { padding-left: 0; padding-right: 0; }
  .vt-s .vt-t { grid-column: 1; grid-row: 1; }
  .vt-s .vt-e { grid-column: 2; grid-row: 1; }
  .vt-s .vt-d { grid-column: 1 / -1; grid-row: 2; justify-self: start; white-space: normal; flex-wrap: wrap; }
  .vt-l.ouverte .vt-d, .vt-l.ouverte .vt-e { grid-row: auto; }
  .vt-l.ouverte .vt-e { grid-row: 1; }
  .vt-l.ouverte .vt-d { grid-row: 2; }
  .vt-p { grid-column: 1 / -1; grid-row: 3; }
  .vt-autres > span:empty { display: none; }
  .vt-faits { grid-template-columns: 92px minmax(0, 1fr); }
  .vt-gestes .btn { flex: 1 1 100%; height: 46px; }
  .vt-gestes .lien { padding: 8px 0; }
  .vt-outils select { flex: 1 1 100%; width: 100%; }
  .vt-plus-corps { grid-template-columns: minmax(0, 1fr); }
}

/* ───────── Lot 6 — pastilles indépendantes (envoi, paiement, reversement), où est l'argent, historique ───────── */
.vt-d .statut { flex: none; }
.vt-ou { margin: -6px 2px 0; color: var(--encre-2); font-size: 13.5px; }
.vt-histo { border-top: 1px solid var(--bord); padding-top: 10px; }
.vt-histo-l { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.vt-histo-l li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; }
.vt-histo-l time { color: var(--encre-2); font-variant-numeric: tabular-nums; }
.vt-histo-l small { display: block; color: var(--encre-2); font-size: 12.5px; }
[data-modale="paiement-vente"] .grille-champs select.entree, [data-modale="reversement"] select.entree { width: 100%; }
@media (max-width: 760px) {
  .vt-d { flex-wrap: wrap; justify-content: flex-end; white-space: normal; }
  .vt-histo-l li { grid-template-columns: 1fr; gap: 0; }
}
