/* B4U V2 — version épurée · Stock.
   Ce qui est propre à cet écran ; la trousse commune est dans epure.css.
   À gauche les articles (ou les personnes) avec leur nombre « à vendre » ; à droite la fiche : trois cases,
   « Où est mon stock ? » par personne et par taille, ce qui arrive, le bénéfice estimé. */

/* ───────── La liste ───────── */
.stk-seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--bord-fort); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.stk-seg a { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; background: var(--surface); font-weight: 700; font-size: 14px; color: var(--encre-2); white-space: nowrap; }
.stk-seg a:hover { text-decoration: none; color: var(--encre); }
.stk-seg a.actif { background: var(--encre); color: #fff; }
.stk-seg a:focus-visible { outline-offset: -2px; }
.lg.stk-l { padding: 13px 12px; gap: 12px; }
.lg.stk-l.stk-qui { grid-template-columns: auto minmax(0, 1fr) auto; }
.stk-l-c { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stk-moi { color: var(--encre-2); font-weight: 500; }
.stk-n { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stk-n b { font-size: 22px; font-weight: 800; }
.stk-n small { font-size: 12px; font-weight: 600; color: var(--encre-2); }
.stk-n.zero b { color: var(--encre-3); font-weight: 700; }
.stk-n.bleu b { color: var(--t-bleu); }
.stk-suite { display: block; width: 100%; padding: 14px 12px; border: 0; background: none; text-align: left; color: var(--encre-2); font-size: 13.5px; font-weight: 600; }
.stk-suite:hover { color: var(--bleu-600); text-decoration: underline; text-underline-offset: 2px; }
.stk-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stk-pied a { color: var(--encre-2); font-weight: 600; margin-left: auto; }
.stk-pied a:hover { color: var(--bleu-600); }

/* ───────── La fiche : trois cases ───────── */
.stk-cases { display: flex; flex-wrap: wrap; }
.stk-case { flex: 1 1 150px; min-width: 0; padding: 16px 22px; }
.stk-case + .stk-case { border-left: 1px solid var(--ligne); }
.stk-case.large { flex: 2 1 260px; }
.stk-case .v { font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-min { color: var(--encre-2); white-space: nowrap; }
.stk-route { display: block; font-size: 12.5px; font-weight: 700; color: var(--t-bleu); }
.stk-part { display: block; font-size: 13.5px; color: var(--encre-2); margin-top: 1px; }

/* ───────── Les cartes : une ligne par personne, par article, par commande ───────── */
.stk-p { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--ligne); min-width: 0; }
.stk-p .avatar { width: 34px; height: 34px; font-size: 12px; }
.stk-p .nom { flex: 0 0 86px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.stk-p .quoi { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.stk-p .tot { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.stk-t { display: inline-flex; align-items: baseline; gap: 5px; border: 1px solid var(--bord-fort); border-radius: 8px; padding: 3px 9px; background: var(--surface); color: var(--encre); font-weight: 800; font-size: 14.5px; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-t small { font-size: 12.5px; font-weight: 600; color: var(--encre-2); }
.stk-t:hover { border-color: var(--encre-3); background: var(--survol); }
.stk-note { font-size: 13.5px; color: var(--encre-2); font-weight: 400; }
.stk-attente { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.stk-bleu { display: inline-block; padding: 3px 9px; border-radius: 7px; background: var(--t-bleu-f); color: var(--t-bleu); font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.stk-attente .lien, .stk-mv .lien { font-size: 13.5px; white-space: nowrap; }
.stk-rien { padding: 6px 0 4px; color: var(--encre-2); border-top: 1px solid var(--ligne); padding-top: 12px; }
.stk-manque { padding: 9px 0 2px; border-top: 1px solid var(--ligne); }
.stk-art .art { flex: 0 0 44%; min-width: 0; display: flex; flex-direction: column; }
.stk-art .art a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre); }
.stk-art .art a:hover { color: var(--bleu-600); }
.stk-art .art small { font-size: 13.5px; color: var(--encre-2); }
.stk-arr .etats { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.stk-arr > a { white-space: nowrap; }
.stk-mv .quoi > span { min-width: 0; }
.stk-mv .quoi small { display: block; }
.stk-mv .gestes { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; }
.stk-mv .quand { white-space: nowrap; }
.stk-mv > a { white-space: nowrap; }
.stk-benef { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.stk-benef .corps { flex: 1; min-width: 240px; }
.stk-benef .formule { color: var(--encre-2); }
.stk-benef .resultat { font-size: 24px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-benef .resultat.vert { color: var(--t-vert); }

/* ───────── Historique ───────── */
.stk-h-outils { display: flex; flex-wrap: wrap; gap: 8px; }
.stk-h-outils .champ-recherche { flex: 1 1 170px; min-width: 150px; max-width: none; }
.stk-h-outils select.entree { width: auto; flex: 0 1 auto; max-width: 210px; }
.stk-histo { padding-top: 6px; padding-bottom: 6px; }
.stk-h { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--ligne); }
.stk-h:first-child { border-top: 0; }
.stk-h .q { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.stk-h .c { min-width: 0; overflow-wrap: anywhere; }
.stk-h .c small { display: block; font-size: 13.5px; color: var(--encre-2); }
.stk-h time { font-size: 13.5px; font-weight: 600; color: var(--encre-2); white-space: nowrap; }
.stk-h.annule .c b, .stk-h.annule .q { color: var(--encre-3); text-decoration: line-through; }
.stk-plus { padding: 12px 0 8px; border-top: 1px solid var(--ligne); text-align: center; }

/* ───────── Fenêtres : déplacer, corriger, perte, prix, tailles ───────── */
.dep-zone { display: flex; flex-direction: column; gap: 14px; }
.dep-recherche { max-width: none; flex: none; }
.champ .dep-recherche input { padding-left: 36px; }
.dep-zone .choix-article { max-height: 232px; }
.dep-vide { padding: 10px 2px; color: var(--encre-2); font-size: 13.5px; }
.dep-lien { align-self: flex-start; font-size: 13.5px; }
.dep-main { justify-content: flex-start; padding-top: 33px; }
.dep-resume { font-size: 13.5px; color: var(--encre-2); }
.dep-resume.rouge { color: var(--t-rouge); font-weight: 700; }
.dep-liens { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.dep-liens:empty { display: none; }
.mv-etat { margin-top: -6px; min-height: 18px; font-size: 13.5px; color: var(--encre-2); }
.stk-aide { font-size: 13.5px; color: var(--encre-2); }
.stk-parts { display: flex; flex-direction: column; gap: 6px; }
.stk-part-ligne { display: grid; grid-template-columns: 22px minmax(0, 1fr) 124px; gap: 10px; align-items: center; font-weight: 600; }
.stk-part-ligne .entree { text-align: right; min-width: 0; }
.stk-tailles .rg:first-child { border-top: 0; }
.stk-taille .corps { min-width: 0; }
.stk-taille .corps b { margin-right: 10px; }
.stk-taille .corps small { display: block; }
.stk-taille .copiable { white-space: nowrap; max-width: none; }

/* ───────── Écran moyen : la fiche est plus étroite ───────── */
@media (max-width: 1100px) {
  .stk-art { flex-wrap: wrap; row-gap: 8px; }
  .stk-art .art { flex: 1 1 0; }
  .stk-art .quoi { order: 5; flex: 1 1 100%; }
  .stk-art .tot { order: 2; }
}

/* ───────── Téléphone ───────── */
@media (max-width: 760px) {
  .stk-seg { display: flex; align-self: stretch; margin-top: 0; }
  .stk-seg a { flex: 1; justify-content: center; height: 42px; }
  /* Les trois cases tiennent sur une ligne compacte. */
  .stk-cases { flex-wrap: nowrap; }
  .stk-case { flex: 0 0 auto; padding: 12px 14px; }
  .stk-case.large { flex: 1 1 0; }
  .stk-case .etq { font-size: 12.5px; white-space: nowrap; }
  .stk-case .v { font-size: 21px; }
  .stk-case.large .v { display: block; }
  .stk-case .stk-min { font-size: 13px; }
  .stk-case .stk-min + .stk-min { display: none; }
  .stk-case .lien { font-size: 13px; }
  /* Une personne : son nom et son total, puis ses tailles sur toute la largeur. */
  .stk-p { flex-wrap: wrap; gap: 8px 10px; }
  .stk-p .nom { flex: 1 1 0; }
  .stk-p .quoi { order: 5; flex: 1 1 100%; }
  .stk-p .tot { order: 2; }
  .stk-art .art { flex: 1 1 0; }
  .stk-arr .quoi, .stk-mv .quoi { order: 0; }
  .stk-arr .etats { justify-content: flex-start; }
  .stk-mv .gestes { justify-content: flex-start; flex: 1 1 100%; }
  .stk-mv .gestes .btn { flex: 1; height: 42px; }
  .stk-attente .btn { height: 38px; }
  .stk-t { padding: 6px 11px; }
  .stk-benef { padding: 14px 16px; }
  .stk-benef .corps { min-width: 0; flex: 1 1 100%; }
  .stk-h-outils select.entree { flex: 1 1 calc(50% - 4px); max-width: none; height: 44px; font-size: 16px; }
  .stk-h { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; }
  .dep-main { padding-top: 0; }
  .stk-part-ligne .entree { height: 44px; font-size: 16px; }
}

/* ───────── Lot 6 (suite) — résumé du stock à vendre : au minimum − donné aux vendeurs = pour vous ───────── */
.stk-debrief { display: flex; flex-direction: column; gap: 8px; }
.duo-liste > .stk-debrief { margin: 0 12px 10px; padding: 12px 14px; }
.stk-debrief-t { font-size: 14px; }
.stk-debrief-l { display: flex; align-items: flex-end; gap: 6px 12px; flex-wrap: wrap; }
.stk-debrief-l > span:not(.op) { display: flex; flex-direction: column; min-width: 0; }
.stk-debrief-l small { font-size: 12.5px; color: var(--encre-2); }
.stk-debrief-l b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-debrief-l .op { font-size: 18px; font-weight: 700; color: var(--encre-2); padding-bottom: 1px; }
.stk-debrief-l .fort b { font-size: 21px; }
.stk-debrief-n { margin: 0; }
