/*
 * Écrans de travail (refonte UI du 22/11/2026, maquette « Écrans Scan ») : pages avec « ws » dans le bloc body_class.
 * Trois mises en page :
 *  - ordinateur (html[data-vue=ordinateur], par défaut sur PC) : pleine largeur, tableaux denses, panneau de détail ;
 *  - grands écrans (≥ 2200 px) : texte agrandi, troisième colonne ;
 *  - tablette (html[data-vue=tablette], automatique sur écran tactile ou choisie dans le menu « Vue ») : grandes cibles
 *    tactiles, lignes en cartes, panneau de détail en bas (portrait) ou à droite (paysage).
 * Couleurs reprises de ui.css (--ui-*) ; rien ici ne touche les pages sans body.ws.
 */
body.ws {
    --ws-bg: #f3f5f8;
    --ws-card: #fff;
    --ws-line: #e3e7ec;
    --ws-line-soft: #f0f2f5;
    --ws-ink: #212529;
    --ws-muted: #5f6b78;
    --ws-blue: #0062cc;
    --ws-navy: #0b3a6e;
    --ws-green: #1e7e34;
    --ws-sel: #e6effa;
    --ws-radius: 12px;
    --ws-gap: 20px;
    --ws-aside: 440px;
    background: var(--ws-bg);
}

/* ---------- Pleine largeur ---------- */
body.ws .container { max-width: none; }
@media (min-width: 1200px) {
    body.ws .container > .row { flex-wrap: nowrap; }
    body.ws .layout-sidebar { flex: 0 0 240px; max-width: 240px; }
    body.ws .layout-content { flex: 1 1 auto; max-width: none; min-width: 0; }
}
/* Grands écrans (2K, 4K) : tout grandit un peu, la place sert au contenu */
@media (min-width: 2200px) {
    html:has(body.ws) { font-size: 17px; }
    body.ws { --ws-aside: 520px; --ws-gap: 24px; }
    body.ws .layout-sidebar { flex-basis: 280px; max-width: 280px; }
}
@media (min-width: 3000px) {
    html:has(body.ws) { font-size: 20px; }
    body.ws { --ws-aside: 620px; }
}
/* Onglets de zones : la barre latérale porte les mêmes liens sur ordinateur */
html[data-vue=ordinateur] body.ws .zones-tabs { display: none; }

/* ---------- Composants ---------- */
.ws-page { display: flex; flex-direction: column; gap: 16px; color: var(--ws-ink); }
.ws-page * { text-transform: none; }
.ws-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ws-head__title { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--ws-ink); }
.ws-head__crumb { font-size: .875rem; font-weight: 600; color: var(--ws-blue); }
.ws-head__code { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #e9ecef; }
.ws-head__sub { color: var(--ws-muted); }
.ws-head__actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.ws-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-kpi { padding: 4px 10px; border-radius: 14px; background: var(--ws-card); border: 1px solid var(--ws-line); font-size: .85rem; }
.ws-kpi b { font-weight: 700; }

.ws-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #ced4da; background: #fff;
    color: var(--ws-ink); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ws-btn:hover { background: #f1f3f5; color: var(--ws-ink); text-decoration: none; }
.ws-btn--primary { border-color: var(--ws-blue); background: var(--ws-blue); color: #fff; }
.ws-btn--primary:hover { background: #0052ad; color: #fff; }
.ws-btn--ok { border-color: var(--ws-green); background: var(--ws-green); color: #fff; }
.ws-btn--ok:hover { background: #196b2c; color: #fff; }
.ws-btn--danger { border-color: #c82333; color: #a71d2a; }
.ws-btn[disabled] { opacity: .5; cursor: default; }

.ws-card { background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: var(--ws-radius); padding: 16px 18px; min-width: 0; }
.ws-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ws-card__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ws-ink); }
.ws-card__link { font-size: .85rem; font-weight: 600; }
.ws-muted { color: var(--ws-muted); }
.ws-mono { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }
.ws-empty { color: var(--ws-muted); padding: 10px 0; margin: 0; }

.ws-badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.ws-badge--ok { color: #1e5e2e; background: #e3f4e8; }
.ws-badge--warn { color: #7a4a00; background: #fff3d6; }
.ws-badge--bad { color: #8a1c1c; background: #fde8e8; }
.ws-badge--info { color: var(--ws-navy); background: #e6effa; }

/* Tuiles « Mon travail » */
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.ws-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--ws-radius); background: var(--ws-card); border: 1px solid var(--ws-line);
    color: var(--ws-ink); text-decoration: none; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.ws-tile:hover { border-color: #b8c4d2; color: var(--ws-ink); text-decoration: none; box-shadow: 0 2px 6px rgba(16, 24, 40, .08); }
.ws-tile__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-tile__title { font-size: .95rem; font-weight: 700; }
.ws-tile__count { font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--ws-navy); }
.ws-tile__count.is-zero { color: #9aa5b1; }
.ws-tile__unit { color: var(--ws-muted); margin-left: 6px; }
.ws-tile__detail { color: var(--ws-muted); font-size: .85rem; min-height: 1.2em; }
.ws-tile__action { align-self: flex-start; margin-top: 4px; padding: 6px 14px; border-radius: 8px; background: var(--ws-blue); color: #fff; font-weight: 600; font-size: .85rem; }

/* Grilles */
.ws-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ws-main { display: flex; gap: var(--ws-gap); align-items: flex-start; }
.ws-main > .ws-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ws-main > .ws-side { width: 400px; flex: none; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 2200px) { .ws-main > .ws-side { width: 480px; } }
@media (max-width: 1399.98px) { .ws-main { flex-direction: column; align-items: stretch; } .ws-main > .ws-side { width: auto; } .ws-grid2 { grid-template-columns: 1fr; } }

/* Tableau dense */
.ws-table-wrap { overflow-x: auto; }
table.ws-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 0; background: transparent; }
.page table.ws-table th, .page table.ws-table td { text-transform: none; }
table.ws-table thead th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: .75rem; font-weight: 600; color: var(--ws-muted); background: #f8f9fb;
    padding: 9px 10px; border-bottom: 1px solid var(--ws-line); white-space: nowrap; }
table.ws-table thead th.num, table.ws-table td.num { text-align: right; }
table.ws-table thead th button { all: unset; cursor: pointer; }
table.ws-table td { padding: 8px 10px; border-top: 1px solid var(--ws-line-soft); vertical-align: middle; color: var(--ws-ink); background: transparent; }
table.ws-table tbody tr { cursor: default; }
table.ws-table.is-selectable tbody tr { cursor: pointer; }
table.ws-table tbody tr:hover td { background: #f8fafc; }
table.ws-table tbody tr.is-selected td { background: var(--ws-sel); }
table.ws-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--ws-blue); }
table.ws-table tbody tr.is-negative td { color: #8a1c1c; }
table.ws-table td.num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ws-table .ws-cell-name { font-weight: 600; }
table.ws-table .ws-cell-sub { display: block; color: var(--ws-muted); font-size: .75rem; }

/* Puces de filtre */
.ws-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--ws-line); }
.ws-filters .ws-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid #ced4da; border-radius: 8px; background: #fff; width: 380px; max-width: 100%; }
.ws-filters .ws-search input { flex: 1; border: 0; outline: 0; min-width: 0; font-size: .875rem; background: transparent; }
.ws-chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid #ced4da; background: #fff; color: var(--ws-ink); font-size: .85rem; cursor: pointer; }
.ws-chip.is-active { background: var(--ws-navy); border-color: var(--ws-navy); color: #fff; }
.ws-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--ws-line); color: var(--ws-muted); font-size: .85rem; }

/* Liste + panneau de détail */
.ws-split { display: flex; gap: var(--ws-gap); align-items: flex-start; }
.ws-split__list { flex: 1; min-width: 0; padding: 0; overflow: hidden; }
.ws-split__aside { width: var(--ws-aside); flex: none; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.ws-detail__place { color: var(--ws-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; }
.ws-detail__name { font-size: 1.25rem; font-weight: 700; margin-top: 2px; }
.ws-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.ws-fact { padding: 10px; border-radius: 8px; background: var(--ws-bg); }
.ws-fact span { display: block; font-size: .75rem; color: var(--ws-muted); }
.ws-fact strong { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-form-row { display: flex; gap: 8px; align-items: flex-end; }
.ws-form-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--ws-muted); margin: 0; }
.ws-form-row input { height: 38px; padding: 0 10px; border: 1px solid #ced4da; border-radius: 8px; font-size: 1rem; }
.ws-actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ws-actions3 .ws-btn { justify-content: center; }
.ws-feed { list-style: none; margin: 0; padding: 0; }
.ws-feed li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--ws-line-soft); font-size: .85rem; }
.ws-feed li:first-child { border-top: 0; }
.ws-feed__time { flex: none; width: 92px; color: var(--ws-muted); }
.ws-feed__what { flex: 1; min-width: 0; }
.ws-feed__qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-feed__qty.is-plus { color: #1e5e2e; }
.ws-feed__qty.is-minus { color: #8a1c1c; }
.ws-detail-empty { color: var(--ws-muted); text-align: center; padding: 30px 10px; }
@media (max-width: 1399.98px) { html[data-vue=ordinateur] .ws-split { flex-direction: column; } html[data-vue=ordinateur] .ws-split__aside { width: auto; align-self: stretch; position: static; } }

/* ---------- Vue tablette ---------- */
html[data-vue=tablette] body.ws { font-size: 17px; }
html[data-vue=tablette] .ws-btn { height: 48px; padding: 0 18px; font-size: 1rem; border-radius: 10px; }
html[data-vue=tablette] .ws-chip { height: 44px; padding: 0 16px; border-radius: 22px; font-size: .95rem; font-weight: 600; }
html[data-vue=tablette] .ws-filters .ws-search { height: 52px; width: 100%; border: 2px solid var(--ws-blue); border-radius: 12px; }
html[data-vue=tablette] .ws-filters .ws-search input { font-size: 1.05rem; }
html[data-vue=tablette] .ws-tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
html[data-vue=tablette] .ws-tile { min-height: 170px; padding: 18px; border-radius: 16px; }
html[data-vue=tablette] .ws-tile__action { align-self: stretch; text-align: center; padding: 12px; border-radius: 10px; margin-top: auto; }
html[data-vue=tablette] .ws-main, html[data-vue=tablette] .ws-grid2 { flex-direction: column; align-items: stretch; grid-template-columns: 1fr; }
html[data-vue=tablette] .ws-main > .ws-side { width: auto; }
/* Lignes de tableau en cartes tactiles */
html[data-vue=tablette] table.ws-cards thead { display: none; }
html[data-vue=tablette] table.ws-cards, html[data-vue=tablette] table.ws-cards tbody { display: block; }
html[data-vue=tablette] table.ws-cards tbody { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
html[data-vue=tablette] table.ws-cards tbody tr { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: "loc name qty" "pal sub state";
    align-items: center; gap: 2px 14px; min-height: 68px; padding: 10px 14px; border: 1px solid var(--ws-line); border-radius: 12px; background: #fff; }
html[data-vue=tablette] table.ws-cards tbody tr.is-selected { border: 2px solid var(--ws-blue); background: var(--ws-sel); }
html[data-vue=tablette] table.ws-cards td { display: block; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; }
html[data-vue=tablette] table.ws-cards td[data-area] { grid-area: var(--area); }
html[data-vue=tablette] table.ws-cards td.num { font-size: 1.15rem; }
html[data-vue=tablette] table.ws-cards td.ws-hide-tablet { display: none; }
/* Panneau de détail : à droite en paysage, en bas de l'écran en portrait */
html[data-vue=tablette] .ws-split__aside { width: 380px; }
html[data-vue=tablette] .ws-form-row input { height: 56px; font-size: 1.3rem; border-radius: 10px; }
html[data-vue=tablette] .ws-actions3 .ws-btn { height: 50px; }
@media (orientation: portrait), (max-width: 1000px) {
    html[data-vue=tablette] .ws-split { flex-direction: column; }
    html[data-vue=tablette] .ws-split__aside { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 1040; max-height: 62vh; overflow: auto;
        padding: 12px 14px 16px; background: #fff; border-top: 1px solid var(--ws-line); box-shadow: 0 -8px 24px rgba(16, 24, 40, .18); border-radius: 16px 16px 0 0; }
    html[data-vue=tablette] .ws-split__aside:not(.is-open) { display: none; }
    html[data-vue=tablette] .ws-split__aside .ws-card { border: 0; padding: 4px 2px; }
    html[data-vue=tablette] .ws-split__close { display: inline-flex; }
}
.ws-split__close { display: none; margin-left: auto; }

/* Menu « Vue » de la barre du haut */
.topbar__vue summary { display: inline-flex; align-items: center; gap: 8px; }
.topbar__vue .topbar__dropdown-item.is-active { font-weight: 700; }
.topbar__vue .topbar__dropdown-item { width: 100%; text-align: left; background: none; border: 0; }

/* Styles hérités neutralisés sur les écrans de travail (liens colorés de .page, largeur de .sorders) */
.ws-page.sorders { max-width: none; }
.page a.ws-btn, .page a.ws-btn:hover { color: var(--ws-ink); text-decoration: none; }
.page a.ws-btn--primary, .page a.ws-btn--primary:hover, .page a.ws-btn--ok, .page a.ws-btn--ok:hover, .page a.ws-tile .ws-tile__action { color: #fff; }
.page a.ws-chip { display: inline-flex; align-items: center; color: var(--ws-ink); text-decoration: none; }
.page a.ws-chip.is-active { color: #fff; }
.page a.ws-tile, .page a.ws-tile:hover { color: var(--ws-ink); }
.ws-filters .ws-search { flex: 0 1 380px; }
/* Taille du texte des tableaux (la règle .page table du site la réduisait) */
.page table.ws-table td, .page table.ws-table td a { font-size: .875rem; }
html[data-vue=tablette] .page table.ws-table td, html[data-vue=tablette] .page table.ws-table td a { font-size: 1rem; }
html[data-vue=tablette] .page table.ws-cards td.num { font-size: 1.15rem; }

/* Contraste fond / cartes (retour du 22/11/2026) : la zone de contenu (.page, blanche dans app.css) prend une teinte
   gris-bleu, les cartes et panneaux restent blancs et ressortent ; fond des fenêtres modales plus sombre */
body.ws { --ws-page: #e9edf2; --ws-line: #d9dfe6; }
/* Un seul fond pour toute la page (avant : zone de contenu teintée posée sur un fond plus clair = rectangle à bord net) */
body.ws { background: var(--ws-page); }
body.ws .layout-content.page { background: transparent; box-shadow: none; }
body.ws .ws-card, body.ws .ws-tile, body.ws .ws-split__list { border-color: var(--ws-line); box-shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04); }
body.ws .modal-backdrop.show { opacity: .62; }
/* Pastille de code de l'en-tête (« Création », référence) : son gris #e9ecef se confondait avec ce fond de page */
body.ws .ws-head__code { background: #fff; box-shadow: inset 0 0 0 1px var(--ws-line); }
body.ws .modal-content { border: 0; border-radius: 14px; box-shadow: 0 18px 48px rgba(16, 24, 40, .28); }

/* Listes déroulantes avec recherche (public/js/ws-select.js) : le select d'origine reste dessous, transparent */
.ws-select { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; }

.ws-select > select.ws-select__native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.ws-select__btn { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 120px; text-align: left; cursor: pointer;
    background-color: #fff; background-image: none; }
.ws-select__btn.custom-select, .ws-select__btn.form-control { padding-right: 10px; }
.ws-select__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-select__chev { flex: none; font-size: .7rem; color: var(--ws-muted, #5f6b78); }
.ws-select__btn[aria-expanded="true"] { border-color: var(--ws-blue, #0062cc); box-shadow: 0 0 0 3px rgba(0, 98, 204, .15); }
.ws-select__btn.is-invalid { border-color: #c82333; }
.ws-select__pop { position: absolute; z-index: 1060; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(460px, 92vw);
    background: #fff; border: 1px solid var(--ws-line, #d9dfe6); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); overflow: hidden; }
.ws-select__pop.is-up { top: auto; bottom: calc(100% + 4px); }
.ws-select__search { position: relative; padding: 8px; border-bottom: 1px solid var(--ws-line-soft, #f0f2f5); }
.ws-select__search .fa { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ws-muted, #5f6b78); font-size: .8rem; }
.ws-select__search input { width: 100%; height: 34px; padding: 0 10px 0 30px; border: 1px solid #ced4da; border-radius: 8px; font-size: .9rem; }
.ws-select__search input:focus { outline: none; border-color: var(--ws-blue, #0062cc); }
.ws-select__list { list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow-y: auto; }
.ws-select__list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .9rem; color: var(--ws-ink, #212529); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-select__list li.is-active { background: var(--ws-sel, #e6effa); }
.ws-select__list li.is-selected { font-weight: 700; }
.ws-select__list li.is-disabled { color: #9aa5b1; cursor: default; }
.ws-select__list li.ws-select__group { padding: 8px 10px 3px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ws-muted, #5f6b78); cursor: default; }
.ws-select__list li.ws-select__empty { color: var(--ws-muted, #5f6b78); cursor: default; }
html[data-vue=tablette] .ws-select__search input { height: 48px; font-size: 1rem; }
html[data-vue=tablette] .ws-select__list li { padding: 13px 12px; font-size: 1rem; }
html[data-vue=tablette] .ws-select__list { max-height: 50vh; }
.ws-select__btn[aria-disabled="true"] { opacity: .6; cursor: default; background-color: #e9ecef; }
.ws-select__btn:focus-visible { outline: none; border-color: var(--ws-blue, #0062cc); box-shadow: 0 0 0 3px rgba(0, 98, 204, .15); }

/* Alignements dans les barres (relevés par tests/e2e/layout-check.js) : app.css « form input { margin-bottom: 10px } »
   et Bootstrap « label { margin-bottom: .5rem } » décalent de 4 à 5 px vers le haut les champs d'une rangée flex
   (c'est la boîte de marge qui est centrée). Les pages ws espacent par « gap ». */
body.ws form input:not([type=checkbox]):not([type=radio]), body.ws label.ws-search { margin-bottom: 0; }
/* Barre de filtres : listes ws-select.js (elles prennent la hauteur en em de .form-control) et champs à la hauteur de
   la recherche et des boutons, en 2K comme en tablette
   (spécificité minimale par :where : les règles des zones gardent la main) */
:where(.ws-filters) .ws-select__btn, :where(.ws-filters) select.form-control, :where(.ws-filters) input.form-control { height: 34px; padding-top: 0; padding-bottom: 0; }
:where(html[data-vue=tablette] .ws-filters) .ws-select__btn, :where(html[data-vue=tablette] .ws-filters) select.form-control,
:where(html[data-vue=tablette] .ws-filters) input.form-control { height: 48px; }
/* Vue tablette : cibles tactiles ≥ 44 px pour les composants du socle (pastilles cliquables, liens d'en-tête et de carte,
   en-têtes de colonnes triables, cases à cocher sans libellé autour) */
html[data-vue=tablette] a.ws-kpi, html[data-vue=tablette] a.ws-head__crumb, html[data-vue=tablette] a.ws-card__link { display: inline-flex; align-items: center; min-height: 44px; }
html[data-vue=tablette] a.ws-kpi { padding: 4px 14px; border-radius: 22px; }
html[data-vue=tablette] table.ws-table th.ws-sortable { height: 44px; }
html[data-vue=tablette] body.ws input[type=checkbox]:not(label input):not(.custom-control-input) { width: 44px; height: 44px; }
/* Ligne de saisie du panneau (.ws-form-row) en tablette : bouton à la hauteur du champ (56 px), passage à la ligne quand
   la colonne est étroite (bouton « Enregistrer le comptage » hors de l'écran en paysage) */
html[data-vue=tablette] .ws-form-row { flex-wrap: wrap; }
html[data-vue=tablette] .ws-form-row .ws-btn { height: 56px; }
/* Recherche des barres de filtres : le champ occupe toute la hauteur du cadre (27 px touchables sur 52 en tablette) ;
   fil d'activité et boutons de tri des en-têtes à 44 px en tablette */
.ws-filters .ws-search input { align-self: stretch; height: auto; }
html[data-vue=tablette] a.ws-feed__what { display: flex; align-items: center; min-height: 44px; }
html[data-vue=tablette] table.ws-table thead th button { display: inline-flex; align-items: center; min-height: 44px; }
/* Pastilles d'en-tête en tablette (repasse globale) : celles qui sont des liens passent en inline-flex à 44 px, ce qui
   supprimait l'espace entre l'icône et le texte (« 🔔3 alerte(s) ») et laissait les pastilles simples, étirées à la
   hauteur de la rangée, avec leur texte en haut. Toutes centrées, écart fixe entre icône, nombre et libellé. */
html[data-vue=tablette] .ws-kpi { display: inline-flex; align-items: center; gap: .3em; }
/* Même cause pour les liens d'en-tête et de carte passés en inline-flex en tablette : « ←Liste des utilisateurs » */
html[data-vue=tablette] a.ws-head__crumb, html[data-vue=tablette] a.ws-card__link { gap: .3em; }
/* Page courte (tablette surtout) : sous le corps de page apparaissait le fond plus clair de html (#f3f5f8), bande nette
   au-dessus de la barre d'onglets ; même teinte que body.ws (--ws-page) */
html:has(body.ws) { background: #e9edf2; }
/* Écran tactile : touch.css « .layout-content td > a:not(.btn) { display: inline-block; padding: 10px 0 } » prenait le
   pas sur les liens-boutons .ws-btn des cellules (libellé et icône collés en haut du bouton, marges latérales perdues) */
@media (pointer: coarse) {
    body.ws .layout-content td > a.ws-btn { display: inline-flex; padding-top: 0; padding-bottom: 0; }
    body.ws .layout-content td > a.ws-btn { padding-left: 14px; padding-right: 14px; }
    html[data-vue=tablette] body.ws .layout-content td > a.ws-btn { padding-left: 18px; padding-right: 18px; }
}
/* Listes ws-select.js des barres de filtres : texte à la taille des champs voisins (elles gardaient 1rem du select
   d'origine : « Tous les codes », « Tous les profils » plus gros que la recherche) ; spécificité minimale */
:where(.ws-filters) .ws-select__btn { font-size: .875rem; }
:where(html[data-vue=tablette] .ws-filters) .ws-select__btn { font-size: 1rem; }
/* En-têtes de colonnes triables en tablette : 44 px de large au moins (« % », « Réf. », « Fiche » faisaient 21 à 39 px) */
html[data-vue=tablette] body.ws thead th > button { min-width: 44px; }
/* Pastilles-liens (.page a.ws-chip, inline-flex) : écart fixe entre icône et libellé (« Gammes », « Marques » collés) */
.page a.ws-chip { gap: .35em; }
