[data-theme="custom"], :root{
	--primary-color-hue: 216;
	--primary-color-saturation: 25%;
	--primary-color-lightness: 42%;
	--banner-background: url(../img/banner.svg);
}

.login-page {
	--login-logo: url("https://prod-extranet.tidii.ch/img/login_logo.svg"); /* for relative path, must be relative to the css file or use full url starting by http:// */
}

/* ---- webportaltiers ---- */
/*
 * WebportalTiers - Dock-Avenue WebPortal customizations
 * Injected into the portal via the webPortalCustomCss hook.
 * (Previously these rules lived inside public/webportal/css/global.css.php)
 */

/**
 * 1.229 — Menu déroulant des langues (drapeau + code ; la liste montre drapeau + nom)
 * <details class="wpt-lang"> : s'ouvre sans JavaScript ; styles propres (indépendants de Pico).
 */
nav.primary-top-nav li.wpt-lang-item {
  display: flex;
  align-items: center;
  padding: 0 0.35rem;
}
details.wpt-lang {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
}
details.wpt-lang > summary.wpt-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.1rem;
  margin: 0;
  padding: 0 0.55rem;
  border: 1px solid hsla(var(--primary-color-hue), 15%, 50%, 0.28);
  border-radius: 999px;
  background: #fff;
  color: hsl(var(--primary-color-hue), var(--primary-color-saturation), 30%);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  cursor: pointer;
  list-style: none;
  user-select: none;
  white-space: nowrap;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
details.wpt-lang > summary.wpt-lang__btn::-webkit-details-marker { display: none; }
details.wpt-lang > summary.wpt-lang__btn::after { content: none !important; display: none !important; }
details.wpt-lang > summary.wpt-lang__btn:hover,
details.wpt-lang[open] > summary.wpt-lang__btn {
  border-color: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.6);
  box-shadow: 0 0 0 3px hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.12);
}
details.wpt-lang > summary.wpt-lang__btn:focus-visible {
  outline: 2px solid hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness));
  outline-offset: 2px;
}
.wpt-lang svg.wpt-flag {
  width: 1.35rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  display: block;
}
.wpt-lang__caret {
  width: 0.65rem;
  height: 0.45rem;
  flex: 0 0 auto;
  opacity: 0.7;
}
details.wpt-lang[open] .wpt-lang__caret { transform: rotate(180deg); }
details.wpt-lang > ul.wpt-lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 1000;
  min-width: 11rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(20, 30, 50, 0.28);
}
details.wpt-lang > ul.wpt-lang__menu li {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
}
a.wpt-lang__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: #26303d;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
a.wpt-lang__item:hover,
a.wpt-lang__item:focus-visible {
  background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.1);
  color: #111;
  text-decoration: none;
}
a.wpt-lang__item.is-active { font-weight: 700; }
.wpt-lang__name { flex: 1 1 auto; }
.wpt-lang__check {
  width: 1rem;
  height: 1rem;
  color: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness));
}
/* Téléphone : drapeau + flèche seulement (le code « FR » tient sur tablette et ordinateur) */
@media (max-width: 576px) {
  nav.primary-top-nav li.wpt-lang-item { padding: 0 0.15rem; }
  details.wpt-lang > summary.wpt-lang__btn { padding: 0 0.45rem; gap: 0.3rem; }
  details.wpt-lang:not(.wpt-lang--login) .wpt-lang__code { display: none; }
}

/**
 * Home - Dashboard tiles
 */
.home-links-grid.grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  padding-bottom: 2rem;
}

.home-links-card {
  --card-accent: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 1);
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card-background-color, #fff);
  border: 1px solid var(--card-border-color, rgba(0, 0, 0, 0.1));
  box-shadow: 0 2px 16px -6px rgba(0, 0, 0, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  margin: 0;
  padding: 0;
}

.home-links-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent);
  z-index: 1;
}

.home-links-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.2);
}

.home-links-card__link {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem 1.5rem 1.25rem;
  color: inherit;
  text-decoration: none;
  background: none;
  outline-offset: -3px;
}
.home-links-card__link:hover,
.home-links-card__link:focus {
  color: inherit;
  text-decoration: none;
  background: none;
}

.home-links-card__icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.1);
  color: var(--card-accent);
  flex-shrink: 0;
}
.home-links-card__icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.home-links-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.home-links-card__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-links-card__desc {
  display: block;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.6;
}

.home-links-card__arrow {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--card-accent);
  transition: transform 0.2s ease;
}
.home-links-card:hover .home-links-card__arrow {
  transform: translateX(5px);
}

/* Per-section accent colours */
.home-links-card.--propal-list  { --card-accent: hsl(265, 65%, 55%); }
.home-links-card.--order-list   { --card-accent: hsl(210, 78%, 50%); }
.home-links-card.--invoice-list { --card-accent: hsl(145, 58%, 40%); }
.home-links-card.--stock-list   { --card-accent: hsl(30, 90%, 48%); }

.home-links-card.--propal-list  .home-links-card__icon { background: hsla(265, 65%, 55%, 0.1); }
.home-links-card.--order-list   .home-links-card__icon { background: hsla(210, 78%, 50%, 0.1); }
.home-links-card.--invoice-list .home-links-card__icon { background: hsla(145, 58%, 40%, 0.1); }
.home-links-card.--stock-list   .home-links-card__icon { background: hsla(30, 90%, 48%, 0.1); }

/* Tuiles d'alerte "produits à lier" (accent ambre + pastille de compteur) */
.home-links-card.--tolink { --card-accent: hsl(35, 92%, 50%); }
.home-links-card.--tolink .home-links-card__icon { background: hsla(35, 92%, 50%, 0.12); overflow: visible; }
.home-tolink-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: hsl(0, 72%, 51%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/**
 * List tables - row hover and empty state
 */
#webportal-invoice-list tbody tr:not(.stock-detail-row):hover td,
#webportal-order-list   tbody tr:hover td,
#webportal-propal-list  tbody tr:hover td {
  background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.05);
}

#webportal-invoice-list tbody td[colspan],
#webportal-order-list   tbody td[colspan],
#webportal-propal-list  tbody td[colspan],
#webportal-stock-list   tbody td[colspan] {
  text-align: center;
  padding: 3rem 1rem;
  font-style: italic;
}

/**
 * Stock list - hide redundant title/count line (KPI cards already show it)
 */
#webportal-product-pagination > ul:not(.pages-nav-list) {
  display: none;
}

/**
 * Stock list - table row styling
 */
#webportal-stock-list {
  border-collapse: collapse;
}

#webportal-stock-list tbody tr:not(.stock-detail-row) td {
  background: var(--card-background-color, #fff);
  border-bottom: 1px solid hsla(210, 15%, 91%, 1);
  transition: background 0.15s;
}

#webportal-stock-list tbody tr:not(.stock-detail-row) td:first-child {
  box-shadow: inset 3px 0 0 transparent;
  transition: background 0.15s, box-shadow 0.15s;
}

#webportal-stock-list tbody tr:not(.stock-detail-row):hover td {
  background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.04);
}

#webportal-stock-list tbody tr:not(.stock-detail-row):hover td:first-child {
  box-shadow: inset 3px 0 0 hsl(30, 90%, 48%);
}

/**
 * Stock product detail panel
 */

/* Toggle link in the label column */
a.stock-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s;
  cursor: pointer;
}

a.stock-detail-toggle:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.stock-detail-arrow {
  font-size: 0.65em;
  transition: transform 0.25s ease;
  display: inline-block;
  line-height: 1;
  color: var(--muted-color, #888);
}

a.stock-detail-open .stock-detail-arrow {
  transform: rotate(180deg);
}

/* Hidden row that holds the panel */
tr.stock-detail-row {
  background: none !important;
}

/* Cell wrapping the whole panel */
td.stock-detail-cell {
  padding: 0 !important;
  border-top: none !important;
}

/* The visual panel itself */
.stock-detail-panel {
  margin: 0.2rem 0.5rem 0.8rem 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid hsla(210, 20%, 88%, 0.7);
  border-left: 3px solid hsl(30, 90%, 48%);
  background: var(--card-background-color, #fff);
  box-shadow: 0 4px 16px -8px hsla(210, 30%, 40%, 0.16), 0 1px 4px -2px hsla(210, 20%, 60%, 0.08);
  animation: stockDetailFadeIn 0.22s ease;
}

@keyframes stockDetailFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Compact spec grid : petites vignettes de largeur égale, autant que la ligne en contient */
.stock-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.5rem;
}

/* Each spec card (compact) */
.stock-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  background: hsla(0, 0%, 100%, 0.7);
  border: 1px solid hsla(210, 20%, 85%, 0.5);
  border-radius: 0.35rem;
  padding: 0.3rem 0.5rem;
}

/* Label row (inside spec card, or above description) */
.stock-detail-item > .stock-detail-label,
.stock-detail-description > .stock-detail-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsla(210, 15%, 50%, 1);
}

/* Value */
.stock-detail-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: hsla(215, 25%, 20%, 1);
}

/* Description block (full width) */
.stock-detail-description {
  border-top: 1px solid hsla(210, 20%, 85%, 0.5);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stock-detail-desc-text {
  margin: 0;
  font-size: 0.9rem;
  color: hsla(215, 20%, 30%, 1);
  line-height: 1.5;
  white-space: pre-wrap;
}

/**
 * Page « Mes produits » (refonte 26/07/2026) : le panneau de détail d'une unité est découpé
 * en blocs, un par endroit où son stock peut se trouver (chez nous / en prélèvement / chez
 * Amazon) + le bloc de saisie des dimensions de l'unité.
 */
.stock-block__title {
  margin: 0.85rem 0 0.35rem;
  padding-top: 0.6rem;
  border-top: 1px solid hsla(210, 20%, 85%, 0.5);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsla(215, 25%, 30%, 1);
}

/* Premier bloc : pas de filet de séparation au-dessus */
.stock-detail-panel > .stock-block__title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Petits tableaux internes (conditionnements, lots, stock par pays Amazon) : ils doivent
   pouvoir défiler seuls sur mobile, jamais élargir la page. */
.stock-subtable {
  width: auto;
  min-width: 260px;
  margin-top: 0.25rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.stock-subtable th {
  text-align: left;
  padding: 0.15rem 1rem 0.25rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsla(210, 15%, 50%, 1);
  border-bottom: 1px solid hsla(210, 20%, 85%, 0.6);
  white-space: nowrap;
}

.stock-subtable td {
  padding: 0.2rem 1rem 0.2rem 0;
  border-bottom: 1px solid hsla(210, 20%, 90%, 0.5);
  white-space: nowrap;
}

.stock-subtable td:not(:first-child),
.stock-subtable th:not(:first-child) {
  text-align: right;
}

/* Colonnes de TEXTE (référence, lot, DLC, MSKU, désignation…) : alignées à gauche comme la
   première colonne. Sans cela, un « — » ou un code se retrouvait collé à droite d'une
   colonne de libellé — c'est ce qui donnait l'impression que rien n'était aligné. */
.stock-subtable td.t,
.stock-subtable th.t {
  text-align: left;
}

.stock-detail-description > .stock-subtable {
  display: block;
  overflow-x: auto;
}

/**
 * Sous-onglets du panneau produit (« Détail produit » / « Détail du stock »).
 * Pastille VERTE = renseigné, ORANGE = il reste quelque chose à faire : le client repère
 * l'onglet à ouvrir sans avoir à le déplier.
 */
/* Les 2 sous-menus vivent dans la DERNIÈRE colonne de la ligne produit : empilés, compacts,
   ils ne doivent pas concurrencer les chiffres de stock. */
.stock-tabs-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.stock-subtabs {
  display: flex;
  flex-direction: column;
  /* flex-end (et non stretch) : chaque bouton se limite à SON texte au lieu de s'étirer sur
     toute la largeur de la cellule. */
  align-items: flex-end;
  gap: 2px;
}

.stock-subtab {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  text-align: left;
  padding: 0.1rem 0.45rem 0.1rem 0.95rem;
  border-radius: 999px;
  border: 1px solid hsla(210, 20%, 82%, 0.9);
  background: hsla(0, 0%, 100%, 0.75);
  color: hsla(215, 20%, 40%, 1);
  position: relative;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* La pastille de couleur */
.stock-subtab::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--subtab-dot, hsl(210, 10%, 65%));
}

.stock-subtab.--ok   { --subtab-dot: hsl(145, 58%, 40%); }
.stock-subtab.--todo { --subtab-dot: hsl(35, 92%, 50%); }

.stock-subtab:hover { background: hsla(210, 30%, 96%, 1); }

.stock-subtab.--active {
  border-color: hsla(215, 25%, 45%, 0.85);
  background: #fff;
  box-shadow: 0 1px 4px -1px hsla(210, 30%, 40%, 0.25);
}

/**
 * Volet « Détail produit » : saisie des dimensions, réponse EN LIGNE (aucune bannière en haut
 * de page, aucun rechargement) et boutons de source compacts.
 */
.stk-fldrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stk-fld {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.stk-fld input.stk-in {
  margin: 0;
  padding: 0.2rem 0.4rem;
  font-size: 0.88rem;
}

/* Champ non renseigné : signalé en ambre pour attirer l'œil sur ce qui reste à compléter. */
input.stk-in.--empty {
  background: hsla(35, 92%, 50%, 0.1);
  border-color: hsl(35, 88%, 52%);
}

input.stk-in.--empty:focus {
  background: #fff;
}

/* La réponse d'une action : une seule ligne, à l'endroit où on vient de cliquer. */
.stk-feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.stk-feedback[hidden] { display: none; }

.stk-feedback.--ok   { background: hsla(145, 58%, 40%, 0.09); border-color: hsla(145, 45%, 40%, 0.45); }
.stk-feedback.--warn { background: hsla(35, 92%, 50%, 0.12);  border-color: hsl(35, 80%, 55%); }
.stk-feedback.--err  { background: hsla(0, 72%, 51%, 0.09);   border-color: hsla(0, 60%, 50%, 0.45); }
.stk-feedback.--wait { background: hsla(210, 20%, 50%, 0.08); border-color: hsla(210, 20%, 60%, 0.4); opacity: 0.8; }

.stk-feedback form { margin: 0; }

.stk-sources {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.stk-sources form { margin: 0; }

.stk-measure-badge {
  background: hsla(35, 92%, 50%, 0.14);
  border: 1px solid hsl(35, 80%, 60%);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
}

.stk-measure-badge[hidden],
.wpt-btn[hidden] { display: none; }

/* Valeur attendue mais non renseignée dans un tableau (dimensions/poids de carton) : même
   code couleur ambre que les champs vides du volet produit. */
.stk-miss {
  color: hsl(30, 85%, 38%);
  background: hsla(35, 92%, 50%, 0.12);
  border-radius: 0.25rem;
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.92em;
  white-space: nowrap;
}

/* Boutons secondaires compacts (sources de dimensions, confirmation) */
.wpt-btn--mini {
  font-size: 0.76rem;
  padding: 0.14rem 0.6rem;
  line-height: 1.25;
}

/**
 * Sections du détail des stocks (3PL / prélèvement / Amazon) : même en-tête pour toutes,
 * nom à gauche, TOTAL de la section à droite.
 */
.stock-sect {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid hsla(210, 20%, 88%, 0.7);
}

.stock-detail-panel > .stock-sect:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.stock-sect__name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsla(215, 25%, 32%, 1);
}

.stock-sect__tot {
  font-size: 0.88rem;
  font-weight: 600;
  color: hsla(215, 20%, 35%, 1);
}

.stock-sect__note {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.15rem;
}

/* Toutes les sections partagent le même gabarit de tableau : pleine largeur, libellés à
   gauche (.t), quantités à droite. */
.stock-subtable--full { width: 100%; min-width: 0; }

/* Tuile de filtre « À compléter » : même code couleur que les pastilles « à lier » */
.stock-kpi-card.--todo { --kpi-accent: hsl(35, 92%, 50%); }
.stock-kpi-card.--todo .stock-kpi-card__icon { background: hsla(35, 92%, 50%, 0.1); }
.stock-kpi-card.--todo.--active { background: hsla(35, 92%, 50%, 0.06); }

/**
 * Historical stock date picker — coloured tile shown before the KPI cards
 */
/* Barre du haut : sélecteur de date + cartes KPI, tous sur une seule ligne, largeurs égales */
.stock-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: stretch;
  margin: 1.3rem 0 1.1rem;
}
.stock-topbar > * {
  flex: 1 1 175px;
  margin: 0 !important;
}

.stock-date-tile {
  --tile-accent: hsl(255, 60%, 56%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
  padding: 0.8rem 1rem 0.8rem 1.1rem;
  background: var(--card-background-color, #fff);
  border: 2px solid transparent;
  border-radius: 0.875rem;
  box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}
.stock-date-tile__input { width: 100%; box-sizing: border-box; }
.stock-date-tile__actions { flex-wrap: wrap; }
.stock-date-tile__actions .stock-date-btn { flex: 1 1 auto; padding: 0.45rem 0.7rem; font-size: 0.85rem; }
.stock-date-tile::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--tile-accent);
  border-radius: 4px 0 0 4px;
}
.stock-date-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stock-date-tile__label {
  margin: 0;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tile-accent);
}
.stock-date-tile__input {
  width: auto;
  margin: 0;
  padding: 0.5rem 0.7rem;
}
.stock-date-tile__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
/* Same button design for "Display" (filled) and "Stock actuel" (ghost) */
.stock-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 0.55rem 1.3rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  border: 2px solid var(--tile-accent);
  background: var(--tile-accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.stock-date-btn:hover {
  filter: brightness(1.08);
  color: #fff;
  text-decoration: none;
}
.stock-date-btn--ghost {
  background: transparent;
  color: var(--tile-accent);
  filter: none;
}
.stock-date-btn--ghost:hover {
  background: hsla(255, 60%, 56%, 0.1);
  color: var(--tile-accent);
  filter: none;
}

/**
 * Stock KPI summary cards
 */
.stock-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1rem;
}

.stock-kpi-card {
  --kpi-accent: hsl(30, 90%, 48%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.875rem;
  background: var(--card-background-color, #fff);
  border: 2px solid transparent;
  box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stock-kpi-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--kpi-accent);
  border-radius: 4px 0 0 4px;
}

.stock-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.18);
  border-color: var(--kpi-accent);
  color: inherit;
  text-decoration: none;
}

.stock-kpi-card.--active {
  border-color: var(--kpi-accent);
}

.stock-kpi-card__icon {
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  flex-shrink: 0;
  color: var(--kpi-accent);
}

.stock-kpi-card__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.stock-kpi-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.stock-kpi-card__num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--kpi-accent);
}

.stock-kpi-card__label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.6;
  white-space: normal;
  line-height: 1.15;
}

/* Per-card accent colours */
.stock-kpi-card.--total    { --kpi-accent: hsl(30, 90%, 48%); }
.stock-kpi-card.--positive { --kpi-accent: hsl(145, 58%, 40%); }
.stock-kpi-card.--zero     { --kpi-accent: hsl(0, 72%, 51%); }

.stock-kpi-card.--total    .stock-kpi-card__icon { background: hsla(30, 90%, 48%, 0.1); }
.stock-kpi-card.--positive .stock-kpi-card__icon { background: hsla(145, 58%, 40%, 0.1); }
.stock-kpi-card.--zero     .stock-kpi-card__icon { background: hsla(0, 72%, 51%, 0.1); }

.stock-kpi-card.--total.--active    { background: hsla(30, 90%, 48%, 0.06); }
.stock-kpi-card.--positive.--active { background: hsla(145, 58%, 40%, 0.06); }
.stock-kpi-card.--zero.--active     { background: hsla(0, 72%, 51%, 0.06); }

/**
 * Invoice list : Excel justificatif icon appended to the native "Fichier" column
 */
a.webportaltiers-xlsx {
  display: inline-block;
  margin-left: 0.35rem;
  vertical-align: middle;
  text-decoration: none;
}
a.webportaltiers-xlsx:hover { opacity: 0.7; }

/**
 * 1.229 — Page de connexion (panneau de présentation + carte), pages 2FA / mot de passe dans le même style
 */
body.login-page {
  background: linear-gradient(135deg,
    hsl(var(--primary-color-hue), 30%, 95%) 0%,
    hsl(var(--primary-color-hue), 28%, 88%) 55%,
    hsl(var(--primary-color-hue), 26%, 82%) 100%) fixed;
  color: #1f2733;
}
.wpt-login {
  --wpt-p: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness));
  --wpt-p-dark: hsl(var(--primary-color-hue), calc(var(--primary-color-saturation) + 10%), calc(var(--primary-color-lightness) - 16%));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  box-sizing: border-box;
}
.wpt-login *, .wpt-login *::before, .wpt-login *::after { box-sizing: border-box; }
.wpt-login__frame {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px hsla(var(--primary-color-hue), 40%, 20%, 0.55), 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Panneau de présentation */
.wpt-login__side {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 56px 48px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 100%, hsla(var(--primary-color-hue), 60%, 70%, 0.35) 0%, transparent 60%),
    linear-gradient(155deg, var(--wpt-p-dark) 0%, var(--wpt-p) 100%);
}
.wpt-login__side::before,
.wpt-login__side::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  transform: rotate(18deg);
  pointer-events: none;
}
.wpt-login__side::before { width: 260px; height: 260px; right: -90px; bottom: -70px; background: rgba(255, 255, 255, 0.05); }
.wpt-login__side::after { width: 150px; height: 150px; right: 110px; bottom: -95px; }
.wpt-login__sideinner { position: relative; z-index: 1; max-width: 400px; }
.wpt-login__kicker {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.wpt-login__sidetitle {
  margin: 0 0 0.9rem;
  font-size: 1.95rem;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}
.wpt-login__sidetext {
  margin: 0 0 1.8rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}
.wpt-login a.wpt-login__site {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0 0;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wpt-login a.wpt-login__site:hover, .wpt-login a.wpt-login__site:focus-visible { background: rgba(255, 255, 255, 0.22); border-color: #fff; color: #fff; text-decoration: none; }
.wpt-login a.wpt-login__site svg { width: 1rem; height: 1rem; }

/* Carte de connexion */
.wpt-login__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px 32px;
  min-width: 0;
}
.wpt-login__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.wpt-login__logo {
  flex: 1 1 auto;
  min-width: 0;
  height: 64px;
  background: var(--login-logo, transparent) no-repeat left center / contain;
}
.wpt-login__title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
  color: #1a2230;
}
.wpt-login__subtitle {
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5f6b7a;
}
.wpt-login__msg {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.wpt-login__msg.--error { background: #fdecec; border-color: #f3c2c2; color: #8a1f1f; }
.wpt-login__msg.--warning { background: #fff5e6; border-color: #f5d49a; color: #7a4a00; }
.wpt-login__msg.--ok { background: #eaf7ee; border-color: #b9e2c5; color: #1d5e32; }
form.wpt-login__form { margin: 0; padding: 0; }
.wpt-login__label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a4453;
}
.wpt-login__field {
  position: relative;
  margin: 0 0 1.05rem;
}
.wpt-login__field > svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  transform: translateY(-50%);
  color: #8a95a5;
  pointer-events: none;
  z-index: 1;
}
.wpt-login input.wpt-login__input {
  display: block;
  width: 100%;
  height: 3rem;
  margin: 0;
  padding: 0 0.9rem 0 2.7rem;
  border: 1px solid #d5dbe3;
  border-radius: 12px;
  background: #f8fafc;
  color: #1a2230;
  font-size: 1rem;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wpt-login input.wpt-login__input.--pass { padding-right: 3rem; }
.wpt-login input.wpt-login__input.--plain { padding-left: 0.9rem; }
.wpt-login input.wpt-login__input:focus {
  outline: none;
  background: #fff;
  border-color: var(--wpt-p);
  box-shadow: 0 0 0 4px hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.16);
}
.wpt-login .wpt-login__eye {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9px;
  color: #6b7686;
  cursor: pointer;
  z-index: 1;
}
.wpt-login .wpt-login__eye:hover, .wpt-login .wpt-login__eye:focus-visible { background: #eef1f5; color: #1a2230; outline: none; }
.wpt-login__eye svg { width: 1.2rem; height: 1.2rem; }
.wpt-login__eye .--off { display: none; }
.wpt-login__eye.is-on .--on { display: none; }
.wpt-login__eye.is-on .--off { display: inline-flex; }
.wpt-login__eye > span { display: inline-flex; }
.wpt-login__captcha { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1.05rem; }
.wpt-login__captcha input.wpt-login__input { max-width: 10rem; }
.wpt-login button.wpt-login__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 3.1rem;
  margin: 0.4rem 0 0;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--wpt-p) 0%, var(--wpt-p-dark) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px hsla(var(--primary-color-hue), 45%, 25%, 0.7);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.wpt-login button.wpt-login__submit:hover { filter: brightness(1.07); box-shadow: 0 14px 26px -12px hsla(var(--primary-color-hue), 45%, 25%, 0.8); }
.wpt-login button.wpt-login__submit:active { transform: translateY(1px); }
.wpt-login button.wpt-login__submit:focus-visible { outline: 3px solid hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.45); outline-offset: 2px; }
.wpt-login button.wpt-login__submit svg { width: 1.15rem; height: 1.15rem; }
.wpt-login__forgot { margin: 1.1rem 0 0; text-align: center; font-size: 0.92rem; }
.wpt-login__forgot a { color: var(--wpt-p); font-weight: 600; text-decoration: none; }
.wpt-login__forgot a:hover { text-decoration: underline; }
.wpt-login__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #edf0f4;
  font-size: 0.78rem;
  color: #8a95a5;
}
.wpt-login__secure svg { width: 0.95rem; height: 0.95rem; }

/* Tablette en portrait et petits écrans : la carte seule, centrée */
@media (max-width: 860px) {
  .wpt-login__frame { grid-template-columns: 1fr; max-width: 480px; }
  .wpt-login__side { display: none; }
  .wpt-login__card { padding: 36px 36px 28px; }
}
/* Téléphone : pleine largeur, sans cadre */
@media (max-width: 520px) {
  .wpt-login { padding: 0; align-items: stretch; }
  .wpt-login__frame { max-width: none; border-radius: 0; box-shadow: none; min-height: 100vh; min-height: 100dvh; }
  .wpt-login__card { padding: 22px 20px 24px; justify-content: flex-start; }
  .wpt-login__top { margin-bottom: 1.8rem; }
  .wpt-login__logo { height: 52px; }
  .wpt-login__title { font-size: 1.4rem; }
}

/* Pages 2FA, mot de passe oublié / imposé, connexion support : même carte que la connexion */
body.login-page .login-page__container { padding: 24px 16px; box-sizing: border-box; }
.wpt2fa-card {
  background: #fff;
  color: #1f2733;
  border-radius: 20px;
  box-shadow: 0 30px 70px -30px hsla(var(--primary-color-hue), 40%, 20%, 0.55), 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 2.2rem 2.2rem 1.8rem;
  max-width: 440px;
  width: 100%;
  margin: auto;
  text-align: center;
  box-sizing: border-box;
}
.wpt2fa-title { font-size: 1.35rem; margin: 0 0 1rem; color: #1a2230; }
.wpt2fa-card p { font-size: 0.92rem; line-height: 1.5; color: #4a5566; }
.wpt2fa-error {
  background: #fdecec;
  border: 1px solid #f3c2c2;
  color: #8a1f1f;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.wpt2fa-qr { margin: 1rem auto; max-width: 220px; }
.wpt2fa-qr svg { width: 100%; height: auto; display: block; }
.wpt2fa-manual { font-size: 0.8rem; opacity: 0.85; }
.wpt2fa-secret {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 4px 8px;
  background: #f2f4f7;
  border-radius: 6px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  word-break: break-all;
}
.wpt2fa-card input.wpt2fa-code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: auto;
  margin: 0.8rem 0;
  padding: 0.7rem 0.9rem;
  font-size: 1.4rem;
  letter-spacing: 0.45em;
  text-align: center;
  border: 1px solid #d5dbe3;
  border-radius: 12px;
  background: #f8fafc;
}
.wpt2fa-card input.wpt2fa-code:focus {
  outline: none;
  background: #fff;
  border-color: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness));
  box-shadow: 0 0 0 4px hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.16);
}
.wpt2fa-card input.wpt2fa-code.--text { font-size: 1rem; letter-spacing: normal; text-align: left; }
.wpt2fa-card .wpt2fa-submit {
  width: 100%;
  margin-top: 0.3rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness)) 0%, hsl(var(--primary-color-hue), calc(var(--primary-color-saturation) + 10%), calc(var(--primary-color-lightness) - 16%)) 100%);
  color: #fff;
  font-weight: 700;
}
.wpt2fa-back { margin-top: 1.2rem; font-size: 0.88rem; }
.wpt2fa-back a { color: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness)); font-weight: 600; }

/* Tableaux larges : ils défilent à l'intérieur de leur cadre sur téléphone, la page ne déborde plus */
.wpt-tscroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wpt-tscroll > table { min-width: 100%; }
@media (max-width: 760px) {
  .wpt-tscroll > table th, .wpt-tscroll > table td { white-space: nowrap; }
}

/* Formulaires portail : grille de champs lisible + zone de commentaire ample */
.wpt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 16px;
  align-items: start;
}
.wpt-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wpt-field > .wpt-field__label { font-weight: 600; font-size: 0.85rem; color: #33415c; }
.wpt-field > .wpt-field__label small { font-weight: 400; opacity: 0.6; }
.wpt-field input:not([type=checkbox]):not([type=radio]), .wpt-field select, .wpt-field textarea { width: 100%; box-sizing: border-box; margin: 0; }
/* Cases à cocher / radios : taille naturelle, alignées à gauche (jamais pleine largeur) */
.wpt-field input[type=checkbox], .wpt-field input[type=radio] { width: auto !important; height: auto !important; margin: 0; align-self: flex-start; }
.wpt-field--wide { grid-column: span 2; }
.wpt-field--full { grid-column: 1 / -1; }
.wpt-comment { width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical; font-family: inherit; }

/* ===================================================================== */
/*  Système de contrôles harmonisé du portail (boutons + champs)         */
/*  Objectif : cohérence visuelle sur TOUTES les pages (dockseller,      */
/*  amazon, livraisons, réappro, paramètres, support...).                */
/*  - même hauteur (32px), mêmes bords, même police pour champs+boutons  */
/*  - variantes : --ghost (secondaire), --danger (destructif), --icon    */
/*  - .wpt-actions harmonise automatiquement ce qu'elle contient         */
/* ===================================================================== */

/* -- Champs (input texte/date/number + select) : apparence commune ---- */
.wpt-input,
.wpt-actions input:not([type=radio]):not([type=checkbox]):not([type=file]),
.wpt-actions select,
.wpt-field input:not([type=radio]):not([type=checkbox]),
.wpt-field select {
  height: 32px !important;
  box-sizing: border-box !important;
  border: 1px solid #ccd3df !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  line-height: 1.2 !important;
  padding: 0 10px !important;
  margin: 0 !important;
  background: #fff;
  vertical-align: middle;
}
.wpt-actions select, .wpt-field select { padding-right: 26px !important; }
/* Dans une barre d'actions, les champs prennent leur largeur au contenu */
.wpt-actions input:not([type=radio]):not([type=checkbox]):not([type=file]),
.wpt-actions select { width: auto !important; }
/* Champs de recherche : largeur fixe confortable */
.wpt-input--search, .ds-search, .fba-psearch { width: 220px !important; max-width: 100%; }

/* -- Boutons : même hauteur que les champs, largeur au contenu -------- */
.wpt-btn,
.wpt-actions button,
.wpt-actions .wpt-btn,
.wpt-actions input[type=submit] {
  height: 32px !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  padding: 0 14px !important;
  font-size: 0.85rem !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  margin: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}
/* Action secondaire discrète (ne pas lier / remettre à lier / annuler) */
.wpt-btn--ghost {
  background: transparent !important;
  border: 1px solid #b9c2d0 !important;
  color: #52627a !important;
  box-shadow: none !important;
}
.wpt-btn--ghost:hover { background: #eef1f6 !important; }
/* Action destructive discrète (supprimer / révoquer) */
.wpt-btn--danger {
  background: transparent !important;
  border: 1px solid #e2b6b6 !important;
  color: #b0413e !important;
  box-shadow: none !important;
}
.wpt-btn--danger:hover { background: #fbeaea !important; }
/* Bouton icône carré (croix suppression, rafraîchir) */
.wpt-btn--icon { padding: 0 !important; width: 32px !important; font-size: 1rem !important; }

/* -- Barre d'actions : alignement horizontal régulier ----------------- */
.wpt-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wpt-actions form { margin: 0; display: inline-flex; align-items: center; gap: 6px; }

/* -- Libellé + description produit (présentation homogène des listes) -- */
.wpt-prod { display: flex; flex-direction: column; min-width: 0; }
.wpt-prod__label { font-weight: 600; }
.wpt-prod__desc { display: block; opacity: 0.7; font-size: 0.85em; margin-top: 1px; }

/* -- Ligne « Ajouter un article » (Livraisons / Réappro FBA) ----------- */
/* Les champs passent en colonnes : chaque libellé + son contrôle (select à
   hauteur fixe) occupe sa propre colonne, ce qui évite que les selects
   débordent de leur ligne inline et se superposent aux champs voisins
   (hint « = n u. » ou sélecteur de lot devenu incliquable). */
.wpt-addrow > label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
}
.wpt-addrow > label > br { display: none; }
.wpt-addrow #al_units, .wpt-addrow #dl_units { margin-top: 2px; }

/**
 * Annonce de livraison : le formulaire d'ajout est découpé en ETAPES (produit, puis contenant)
 * pour que le client suive l'ordre naturel au lieu de tout saisir d'un bloc.
 */
.wpt-step {
  border: 1px solid hsla(210, 20%, 85%, 0.9);
  border-left: 3px solid hsl(210, 60%, 55%);
  border-radius: 0.5rem;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.8rem;
  background: hsla(210, 40%, 99%, 1);
}

.wpt-step__t {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsla(215, 30%, 35%, 1);
  margin-bottom: 0.5rem;
}
/* Liaison picking EN LIGNE depuis « Mes produits » : liste de resultats de la recherche
   dans le catalogue de prelevement, cliquable pour relier sans quitter la page. */
.stk-ds-res {
  margin-top: 0.3rem;
  max-height: 220px;
  overflow: auto;
}

.stk-ds-hit {
  padding: 0.28rem 0.55rem;
  border: 1px solid hsla(210, 20%, 88%, 0.9);
  border-radius: 0.35rem;
  margin-bottom: 3px;
  cursor: pointer;
  font-size: 0.86rem;
  background: #fff;
  transition: background 0.12s, border-color 0.12s;
}

.stk-ds-hit:hover {
  background: hsla(210, 60%, 96%, 1);
  border-color: hsl(210, 55%, 65%);
}

tr.stk-ds-search td { background: hsla(210, 40%, 98%, 1); }
/* Selecteur d'ASIN Amazon, ouvert sous le tableau des pays */
.stk-amz-pick {
  margin-top: 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid hsl(210, 55%, 70%);
  border-radius: 0.45rem;
  background: hsla(210, 45%, 98%, 1);
}
.stk-amz-pick__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  /* nowrap : le champ de recherche absorbe la place, les boutons restent en BOUT DE LIGNE
     (avec flex-wrap ils basculaient sous le champ des que la place manquait). */
  flex-wrap: nowrap;
  margin-bottom: 0.4rem;
}
.stk-amz-pick__t { flex: 0 0 auto; }
.stk-amz-pick__head .wpt-btn { flex: 0 0 auto; }
.stk-amz-pick__t { font-weight: 700; font-size: 0.85rem; }
.stk-amz-pick__head .stk-amz-filter,
.stk-amz-pick__head .stk-ds-term { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; }
.stk-amz-list { max-height: 300px; overflow: auto; }
.stk-amz-hit {
  padding: 0.3rem 0.5rem;
  border: 1px solid hsla(210, 20%, 88%, 0.9);
  border-radius: 0.35rem;
  margin-bottom: 3px;
  cursor: pointer;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1.35;
}
.stk-amz-hit:hover { background: hsla(210, 60%, 96%, 1); border-color: hsl(210, 55%, 65%); }
.stk-amz-hit small { opacity: 0.7; }
.stk-amz-err { padding: 0.35rem 0.5rem; font-size: 0.85rem; opacity: 0.8; }
/**
 * 1.231 — Extranet plus compact : bandeau titre réduit, largeur limitée sur grand écran,
 * « Mes produits » (vues, palettes, pastilles, outils sur une ligne, lignes produit, cartes sur téléphone),
 * vue Emplacements.
 */
/* haut du bandeau = barre de menu fixe (≈ 60 px) + un peu d'air ; le bas passe de 64 à 22 px */
.hero-header { padding: 86px 0 22px !important; }
.hero-header .hero-header__title, .hero-header h1 { font-size: 2rem; margin-bottom: 0.35rem; }
.hero-header .hero-header__desc { font-size: 0.98rem; }
/* largeur du thème (90 % / 95 %) plafonnée à 1440 px sur grand écran */
@media (min-width: 1200px) {
  main.container { max-width: min(95%, 1440px); }
}
@media (max-width: 576px) {
  .hero-header { padding: 76px 0 14px !important; }
  .hero-header .hero-header__title, .hero-header h1 { font-size: 1.55rem; }
  .hero-header .hero-header__desc { font-size: 0.9rem; }
}

/* En-tête de Mes produits : vues à gauche, palettes à droite */
.stk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: 0.9rem 0 0.7rem;
}
.stk-views {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: hsla(210, 20%, 93%, 1);
  max-width: 100%;
  overflow-x: auto;
}
a.stk-views__btn {
  display: inline-block;
  padding: 0.38rem 0.95rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: hsla(215, 20%, 35%, 1);
  text-decoration: none;
  white-space: nowrap;
}
a.stk-views__btn:hover { background: hsla(0, 0%, 100%, 0.7); text-decoration: none; }
a.stk-views__btn.is-active {
  background: #fff;
  color: #1a2230;
  box-shadow: 0 1px 3px rgba(20, 30, 50, 0.15);
}
a.stk-palbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid hsla(210, 20%, 84%, 1);
  border-radius: 10px;
  background: #fff;
  color: #26303d;
  font-size: 0.92rem;
  text-decoration: none;
}
a.stk-palbar:hover { border-color: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness)); text-decoration: none; }
.stk-palbar__t { font-weight: 700; color: hsl(var(--primary-color-hue), var(--primary-color-saturation), 32%); }
.stk-palbar__v { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.45rem; }
.stk-palbar__v b { font-size: 1.02rem; }
.stk-palbar__sep { opacity: 0.45; }

/* Pastilles de filtre */
.stk-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 0.7rem; }
a.stk-pill {
  --pill: hsl(30, 90%, 48%);
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid hsla(210, 20%, 86%, 1);
  border-radius: 999px;
  background: #fff;
  color: #3a4453;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}
a.stk-pill b { color: var(--pill); font-size: 1rem; }
a.stk-pill:hover { border-color: var(--pill); text-decoration: none; }
a.stk-pill.is-active { border-color: var(--pill); background: color-mix(in srgb, var(--pill) 9%, #fff); box-shadow: inset 0 0 0 1px var(--pill); }
a.stk-pill.--positive { --pill: hsl(145, 58%, 36%); }
a.stk-pill.--zero { --pill: hsl(0, 72%, 48%); }
a.stk-pill.--todo { --pill: hsl(35, 92%, 45%); }

/* Outils sur une ligne : recherche · date · (fin) tout déplier · actualiser */
.stk-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0 0.8rem;
}
.stk-tools form { margin: 0; }
.stk-tools input, .stk-tools button { margin: 0 !important; }
form.stk-search, form.stk-date, form.stk-refresh { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
form.stk-search input[type=search] {
  width: 17rem;
  max-width: 62vw;
  height: 2.3rem;
  padding: 0 0.75rem;
  font-size: 0.92rem;
  border-radius: 8px;
  background-image: none; /* la loupe du thème chevauchait le texte : le bouton loupe suffit */
}
/* le thème met une marge sous chaque bouton : elle étirait les lignes produit */
.stock-subtab.stk-chev, .stock-tabs-cell .stock-subtab, .stk-amz-wrap .stk-amz-more { margin: 0; }
.stk-amz-wrap .stk-amz-more { margin-top: 0.35rem; }
form.stk-date label { margin: 0; font-size: 0.88rem; font-weight: 600; color: #4a5566; white-space: nowrap; }
form.stk-date input[type=date] { width: auto; height: 2.3rem; padding: 0 0.6rem; font-size: 0.9rem; border-radius: 8px; }
.stk-tools .stk-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  height: 2.3rem;
  padding: 0 0.85rem;
  border: 1px solid hsla(210, 20%, 82%, 1);
  border-radius: 8px;
  background: #fff;
  color: #26303d;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.stk-tools .stk-tool-btn:hover { border-color: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness)); background: #f7f9fb; }
.stk-tools .stk-tool-btn svg { width: 1rem; height: 1rem; }
.stk-tools .stk-toggle-all[aria-pressed="true"] { background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.1); }
a.stk-tool-link { font-size: 0.85rem; white-space: nowrap; }
.stk-tools__end { display: inline-flex; align-items: center; gap: 0.5rem 0.8rem; flex-wrap: wrap; margin-left: auto; }
.stk-stamp { font-size: 0.76rem; color: #7a8595; white-space: nowrap; }

/* Lignes produit : la flèche + le nom ouvrent le détail des stocks */
#webportal-stock-list tbody tr.stk-prow td { padding-top: 0.55rem; padding-bottom: 0.55rem; vertical-align: middle; }
td.stk-pcell { min-width: 12rem; }
.stk-chevwrap { display: block; }
.stock-subtab.stk-chev {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: #26303d;
  text-align: left;
  white-space: normal;
}
.stock-subtab.stk-chev::before { content: none; }
.stock-subtab.stk-chev:hover { background: transparent; color: hsl(var(--primary-color-hue), var(--primary-color-saturation), 32%); }
.stock-subtab.stk-chev.--active { border: 0; box-shadow: none; background: transparent; }
.stk-chev__ico {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0.12rem;
  border-radius: 6px;
  background: hsla(210, 20%, 93%, 1);
  color: #4a5566;
  transition: transform 0.15s ease;
}
.stock-subtab.stk-chev.--active .stk-chev__ico { transform: rotate(90deg); background: hsla(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness), 0.16); }
.stk-pdesc { display: block; margin: 0.1rem 0 0 1.45rem; font-size: 0.82rem; color: #6b7686; }
.stock-tabs-cell .stock-subtabs { flex-direction: row; justify-content: flex-end; }
.stock-tabs-cell .stock-subtab { font-size: 0.72rem; padding: 0.18rem 0.55rem 0.18rem 1rem; }

/* Amazon : pays non reliés repliés */
.stk-amz-wrap .stk-amz-unl { display: none; }
.stk-amz-wrap.is-all .stk-amz-unl { display: table-row; }
.stk-amz-wrap.is-none .stk-amz-head { display: none; }
.stk-amz-wrap.is-none.is-all .stk-amz-head { display: table-row; }
.stk-amz-wrap .stk-amz-more { margin: 0.35rem 0 0.2rem; }
.stk-amz-more .stk-amz-more__off { display: none; }
.stk-amz-wrap.is-all .stk-amz-more .stk-amz-more__on { display: none; }
.stk-amz-wrap.is-all .stk-amz-more .stk-amz-more__off { display: inline; }

/* Téléphone : un produit = une carte (plus de tableau qui défile de côté) */
@media (max-width: 640px) {
  #webportal-stock-list, #webportal-stock-list tbody { display: block; width: 100%; }
  #webportal-stock-list thead { display: none; }
  #webportal-stock-list tbody tr.stk-prow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.9rem;
    padding: 0.65rem 0.75rem;
    margin: 0 0 0.5rem;
    border: 1px solid hsla(210, 18%, 88%, 1);
    border-radius: 12px;
    background: #fff;
  }
  #webportal-stock-list tbody tr.stk-prow td {
    display: inline-block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
  }
  #webportal-stock-list tbody tr.stk-prow td.stk-pcell { display: block; flex: 1 1 100%; min-width: 0; }
  #webportal-stock-list tbody tr.stk-prow td[data-label]:not(.stk-pcell)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #7a8595;
  }
  #webportal-stock-list tbody tr.stk-prow td.stock-tabs-cell { width: auto; flex: 0 0 auto; margin-left: auto; align-self: center; }
  #webportal-stock-list tbody tr.stock-detail-row { display: block; }
  #webportal-stock-list tbody tr.stock-detail-row[style*="none"] { display: none !important; }
  #webportal-stock-list tbody tr.stock-detail-row td { display: block; width: 100%; }
  #webportal-stock-list tbody tr:not(.stk-prow):not(.stock-detail-row) { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.75rem; }
  #webportal-stock-list tbody tr:not(.stk-prow):not(.stock-detail-row) td { border: 0; padding: 0; }
  .stock-detail-panel { margin: 0 0 0.6rem; overflow-x: auto; }
  .stk-tools__end { margin-left: 0; flex: 1 1 100%; min-width: 0; }
  form.stk-refresh { min-width: 0; }
  .stk-stamp { white-space: normal; flex: 1 1 100%; }
  form.stk-search input[type=search] { width: 100%; max-width: none; }
  form.stk-search { flex: 1 1 100%; flex-wrap: nowrap; }
  form.stk-search input[type=search] { flex: 1 1 auto; min-width: 0; width: auto; }
  form.stk-search .stk-tool-btn { flex: 0 0 auto; }
}

/* Vue Emplacements : une palette = une ligne, les articles qui la composent à la suite */
.stk-pal { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.3rem 0 1rem; }
.stk-pal__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 0.4rem 1rem;
  align-items: start;
  padding: 0.65rem 0.9rem;
  border: 1px solid hsla(210, 18%, 88%, 1);
  border-radius: 12px;
  background: #fff;
}
.stk-pal__type { font-size: 0.95rem; color: #26303d; white-space: nowrap; }
.stk-pal__type b { font-size: 1.05rem; }
.stk-pal__items { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.stk-pal__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; }
.stk-pal__label { flex: 1 1 14rem; min-width: 0; font-weight: 700; color: #1f2733; overflow-wrap: anywhere; }
.stk-pal__kv { font-size: 0.88rem; color: #3a4453; white-space: nowrap; }
.stk-pal__kv > span { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #8a95a5; margin-right: 0.15rem; }
.stk-pal-empty { padding: 1.2rem; border: 1px dashed hsla(210, 18%, 82%, 1); border-radius: 12px; color: #6b7686; text-align: center; }
@media (max-width: 640px) {
  .stk-pal__row { grid-template-columns: 1fr; padding: 0.6rem 0.75rem; }
  .stk-pal__label { flex-basis: 100%; }
}

/* 1.232 — barre de pages de la vue Emplacements */
#webportal-pal-pagination,
#webportal-pal-pagination-bas {
  margin: 8px 0;
}


/* ---- webportaltiers : style commun ---- */
/*
 * webportaltiers 1.233 — Style commun de l'extranet (proposition « B » validée par Yann le 01/10/2026).
 * Couleurs = couleur principale du portail (réglage natif WebPortal), comme la page de connexion : barre du haut et
 * boutons principaux en dégradé ardoise. Chargé APRÈS webportaltiers.css (il en remplace l'habillage des pages).
 */
:root {
  --wpt-p: hsl(var(--primary-color-hue), var(--primary-color-saturation), var(--primary-color-lightness));
  --wpt-p-dark: hsl(var(--primary-color-hue), calc(var(--primary-color-saturation) + 10%), calc(var(--primary-color-lightness) - 16%));
  --wpt-p-soft: hsl(var(--primary-color-hue), 38%, 95%);
  --wpt-p-line: hsl(var(--primary-color-hue), 26%, 83%);
  --wpt-link: hsl(var(--primary-color-hue), 48%, 43%);
  --wpt-text: #1d2433;
  --wpt-muted: #667085;
  --wpt-line: #e4e7ec;
  --wpt-bg: #f4f6fa;
  --wpt-bg2: #f7f9fb;
  --wpt-warn: #d9480f; --wpt-warn-soft: #fff1e6;
  --wpt-ok: #2b8a3e; --wpt-ok-soft: #e6f6ea;
  --wpt-danger: #c92a2a; --wpt-danger-soft: #fdecec;
  --wpt-info: #1c6dd0; --wpt-info-soft: #e8f1fc;
  --wpt-grey-soft: #f1f3f5;
  --wpt-nav-h: 64px;
}

/* ------------------------------------------------------------------ fond, conteneur, bandeau natif retiré */
html, body { background: var(--wpt-bg) !important; }
body { color: var(--wpt-text); }
.hero-header { display: none !important; }
main.container { padding-top: calc(var(--wpt-nav-h) + 22px); padding-bottom: 40px; }
@media (min-width: 1200px) { main.container { max-width: min(95%, 1440px); } }

/* ------------------------------------------------------------------ barre du haut */
body > nav.primary-top-nav {
  height: var(--wpt-nav-h);
  padding-left: max(16px, calc((100% - 1440px) / 2));
  padding-right: max(16px, calc((100% - 1440px) / 2));
  background: radial-gradient(120% 160% at 100% 0%, hsla(var(--primary-color-hue), 55%, 75%, .32) 0%, transparent 55%),
    linear-gradient(100deg, var(--wpt-p-dark) 0%, var(--wpt-p) 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  color: #fff;
}
nav.primary-top-nav ul { margin-bottom: 0; }
nav.primary-top-nav .brand__logo-link { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 3px 8px; }
nav.primary-top-nav .brand__logo-img { max-height: 34px; width: auto; }
nav.primary-top-nav ul.menu-entries-alt { display: none !important; }
nav.primary-top-nav ul.menu-entries { display: flex; align-items: center; gap: 2px; margin-left: 18px; flex: 1; }
nav.primary-top-nav ul.menu-entries li.wpt-nav-li,
nav.primary-top-nav ul.logout li.wpt-nav-li { display: flex; align-items: center; overflow: visible; padding: 0; }
.wpt-nav-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 9px;
  color: rgba(255, 255, 255, .86) !important; font-weight: 600; font-size: 15px; text-decoration: none !important;
  cursor: pointer; list-style: none; white-space: nowrap; user-select: none;
}
summary.wpt-nav-btn::-webkit-details-marker { display: none; }
summary.wpt-nav-btn::after, summary.wpt-acct::after, summary.wpt-burger::after { display: none !important; }
.wpt-nav-btn:hover, .wpt-nav-btn.is-cur, details[open] > .wpt-nav-btn { background: rgba(255, 255, 255, .14); color: #fff !important; }
.wpt-nav-btn .wpt-ico { width: 12px; height: 12px; opacity: .75; transition: transform .15s; }
details[open] > .wpt-nav-btn .wpt-ico { transform: rotate(180deg); }
.wpt-ico { width: 18px; height: 18px; flex: 0 0 auto; }

details.wpt-dd { position: relative; margin: 0; padding: 0; border: 0; }
details.wpt-dd > summary { list-style: none; margin: 0; }
.wpt-dd-panel {
  position: absolute; top: 50px; left: 0; z-index: 120; min-width: 250px; padding: 6px; border-radius: 12px;
  background: #fff; color: var(--wpt-text); box-shadow: 0 16px 40px rgba(16, 24, 40, .22), 0 0 0 1px rgba(16, 24, 40, .06);
}
details.wpt-dd--right .wpt-dd-panel { left: auto; right: 0; }
.wpt-dd-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--wpt-text) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap;
}
/* Pico met des marges négatives sur les liens de la barre : on les neutralise dans nos menus */
nav.primary-top-nav .wpt-dd-item, nav.primary-top-nav a.wpt-nav-btn, nav.primary-top-nav summary.wpt-nav-btn { margin: 0 !important; }
nav.primary-top-nav .wpt-dd-item { padding: 8px 10px !important; }
nav.primary-top-nav .wpt-sheet .wpt-dd-item { padding: 11px 10px !important; }
nav.primary-top-nav a.wpt-nav-btn, nav.primary-top-nav summary.wpt-nav-btn { padding: 0 14px !important; }
.wpt-dd-item:hover { background: var(--wpt-bg2); }
.wpt-dd-item.is-cur { background: var(--wpt-p-soft); color: var(--wpt-p-dark) !important; }
.wpt-dd-ico { flex: 0 0 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--wpt-p-soft); color: var(--wpt-p); }
.wpt-dd-ico .wpt-ico { width: 17px; height: 17px; }
.wpt-dd-t { flex: 1; }
.wpt-dd-sep { height: 1px; margin: 6px 4px; background: var(--wpt-line); }
.wpt-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--wpt-warn); color: #fff; line-height: 1;
}
.wpt-dd-item .wpt-count { margin-left: auto; }

/* compte (à droite) */
nav.primary-top-nav ul.logout { display: flex; align-items: center; gap: 8px; }
nav.primary-top-nav summary.wpt-acct, nav.primary-top-nav summary.wpt-burger { color: #fff !important; }
.wpt-acct { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.wpt-acct:hover, details[open] > .wpt-acct { background: rgba(255, 255, 255, .14); }
.wpt-acct .wpt-ico { width: 12px; height: 12px; opacity: .75; }
.wpt-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .2); }
.wpt-acct-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* menu des langues sur la barre foncée */
nav.primary-top-nav details.wpt-lang > summary.wpt-lang__btn { background: transparent; border-color: rgba(255, 255, 255, .32); color: #fff; }
nav.primary-top-nav details.wpt-lang > summary.wpt-lang__btn:hover { background: rgba(255, 255, 255, .12); }

/* menu ☰ du téléphone */
.wpt-burger-li { display: none !important; }
.wpt-burger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: #fff; cursor: pointer; }
.wpt-burger .wpt-ico { width: 24px; height: 24px; }
.wpt-sheet {
  position: fixed; top: var(--wpt-nav-h); left: 0; right: 0; bottom: 0; z-index: 130; overflow: auto;
  padding: 8px 16px 32px; background: #fff; color: var(--wpt-text);
}
.wpt-sheet-h { margin: 16px 6px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wpt-muted); }
.wpt-sheet .wpt-dd-item { padding: 11px 10px; font-size: 15px; }

/* ------------------------------------------------------------------ boutons (le principal reprend « Se connecter ») */
.wpt-btn, a.wpt-btn, button.wpt-btn, input.wpt-btn {
  height: 38px !important; padding: 0 16px !important; border-radius: 9px !important; font-size: 14px !important; font-weight: 600 !important;
  background: linear-gradient(135deg, var(--wpt-p) 0%, var(--wpt-p-dark) 100%) !important; color: #fff !important;
  border: 0 !important; box-shadow: 0 10px 20px -12px hsla(var(--primary-color-hue), 45%, 25%, .85) !important;
  text-decoration: none !important; cursor: pointer;
}
.wpt-btn:hover { filter: brightness(1.07); }
.wpt-btn .wpt-ico { width: 16px; height: 16px; }
.wpt-btn--ghost, a.wpt-btn--ghost, button.wpt-btn--ghost {
  background: #fff !important; color: var(--wpt-text) !important; border: 1px solid var(--wpt-line) !important; box-shadow: none !important;
}
.wpt-btn--ghost:hover { background: var(--wpt-bg2) !important; filter: none; }
.wpt-btn--ghost[aria-expanded="true"] { border-color: var(--wpt-p) !important; background: var(--wpt-p-soft) !important; color: var(--wpt-p-dark) !important; }
.wpt-btn--danger, button.wpt-btn--danger { background: #fff !important; color: var(--wpt-danger) !important; border: 1px solid #efc4c4 !important; box-shadow: none !important; }
.wpt-btn--danger:hover { background: var(--wpt-danger-soft) !important; }
.wpt-btn--mini, button.wpt-btn--mini, a.wpt-btn--mini { height: 30px !important; padding: 0 11px !important; font-size: 13px !important; border-radius: 7px !important; }
.wpt-btn--icon { width: 38px !important; padding: 0 !important; }
.wpt-btn--mini.wpt-btn--icon { width: 30px !important; }
a.wpt-link, .wpt-link { color: var(--wpt-link); font-weight: 600; text-decoration: none; }
a.wpt-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ ligne d'outils */
.wpt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; position: relative; }
.wpt-toolbar__end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wpt-toolbar form { margin: 0; }
.wpt-toolbar .wpt-link { font-size: 14px; }
.wpt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.wpt-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--wpt-line); background: #fff; color: #475467 !important; font-weight: 600; font-size: 13.5px;
  text-decoration: none !important; white-space: nowrap;
}
.wpt-pill:hover { border-color: var(--wpt-p-line); }
/* Pico met des marges négatives sur les liens d'un <nav> : pastilles et pages n'en veulent pas */
.wpt-pills .wpt-pill, .wpt-pager__pg .wpt-pg { margin: 0 !important; }
.wpt-pill.is-on { border-color: var(--wpt-p); background: var(--wpt-p-soft); color: var(--wpt-p-dark) !important; }
.wpt-pill__n { font-size: 16px; color: var(--wpt-text); font-variant-numeric: tabular-nums; }
.wpt-pill__n.is-ok { color: var(--wpt-ok); } .wpt-pill__n.is-warn { color: var(--wpt-warn); } .wpt-pill__n.is-danger { color: var(--wpt-danger); }
form.wpt-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; margin: 0; min-width: 220px; flex: 0 1 300px;
  border: 1px solid var(--wpt-line); border-radius: 9px; background: #fff;
}
form.wpt-search .wpt-ico { width: 16px; height: 16px; color: var(--wpt-muted); }
form.wpt-search input[type=search] {
  flex: 1; min-width: 0; height: 34px !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  background: none !important; box-shadow: none !important; font-size: 14px !important; outline: 0;
  --background-image: none; background-image: none !important;
}
form.wpt-search:focus-within { border-color: var(--wpt-p); box-shadow: 0 0 0 3px hsla(var(--primary-color-hue), 40%, 55%, .15); }
.wpt-search__x { display: grid; place-items: center; color: var(--wpt-muted); }
.wpt-search__x .wpt-ico { width: 14px; height: 14px; }
.wpt-date { display: flex; align-items: center; gap: 6px; margin: 0; }
.wpt-date label { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wpt-date input[type=date] { height: 38px !important; margin: 0 !important; padding: 0 10px !important; border: 1px solid var(--wpt-line) !important; border-radius: 9px !important; font-size: 14px !important; width: auto !important; }
.wpt-stamp { font-size: 12.5px; color: var(--wpt-muted); }

/* panneau « Colonnes » */
.wpt-cpwrap { position: relative; display: inline-flex; }
.wpt-cp {
  position: absolute; top: 46px; left: 0; z-index: 60; width: 290px; padding: 10px; border-radius: 12px; background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .18), 0 0 0 1px rgba(16, 24, 40, .06);
}
.wpt-cp-h { margin: 2px 6px 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wpt-muted); }
label.wpt-cp-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0; border-radius: 8px; font-weight: 600; font-size: 13.5px; cursor: grab; }
label.wpt-cp-row:hover { background: var(--wpt-bg2); }
label.wpt-cp-row input { width: 16px !important; height: 16px !important; margin: 0 !important; accent-color: var(--wpt-p); }
.wpt-cp-row.is-fixed { color: var(--wpt-muted); }
.wpt-cp-grip { color: #98a2b3; letter-spacing: -2px; }
.wpt-cp-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 8px 6px 2px; border-top: 1px solid var(--wpt-line); font-size: 12.5px; color: var(--wpt-muted); }
.wpt-cp-f.is-note { border-top: 0; padding-top: 0; }
.wpt-cp-reset { color: var(--wpt-link); font-weight: 600; text-decoration: none; }

/* ------------------------------------------------------------------ LE tableau */
.wpt-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .05); overflow-x: auto; overflow-y: hidden; margin: 0 0 4px; }
/* largeur mini des tableaux larges : en dessous, le tableau défile dans sa carte (jamais la page) */
table.wpt-table--products { min-width: 720px; }
table.wpt-table--cartons { min-width: 980px; }
.wpt-card + .wpt-card { margin-top: 14px; }
table.wpt-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; background: #fff; }
table.wpt-table th {
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--wpt-line); color: var(--wpt-muted);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; line-height: 1.3;
  white-space: normal; -webkit-hyphens: auto; hyphens: auto; vertical-align: middle;
}
table.wpt-table th.num, table.wpt-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 1.250 : même règle pour l historique « Réceptions » de l annonce (« DONT DÉFECTUEU X », « MANQUAN T » vus le 04/10) */
/* 1.244 (test du 02/10) : packing list d une livraison — les titres des colonnes chiffrées ne se coupent plus au milieu d un mot
   (« DÉFECTUEU X ») : colonnes à la largeur de leur titre, coupure aux espaces seulement */
table.wpt-table--dl { table-layout: auto; }
table.wpt-table--dl th { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; word-break: normal; }
table.wpt-table th a.wpt-th { color: inherit; text-decoration: none; display: inline; }
table.wpt-table th.is-sorted, table.wpt-table th.is-sorted a.wpt-th { color: var(--wpt-p-dark); }
.wpt-srt { font-size: 9.5px; color: #c0c7d2; letter-spacing: -1px; margin-left: 4px; white-space: nowrap; }
th.is-sorted .wpt-srt { color: var(--wpt-p); }
table.wpt-table th[draggable="true"] { cursor: grab; }
table.wpt-table th.is-drag { background: var(--wpt-p-soft); outline: 2px dashed var(--wpt-p); outline-offset: -3px; }
table.wpt-table th.is-drop { box-shadow: inset 3px 0 0 var(--wpt-p); }
table.wpt-table td { padding: 12px 14px; border-bottom: 1px solid var(--wpt-line); vertical-align: middle; background: #fff; overflow-wrap: anywhere; }
table.wpt-table tbody tr:nth-child(even) > td { background: #fafbfd; }
table.wpt-table tbody tr:last-child > td { border-bottom: 0; }
table.wpt-table tbody tr.wpt-row { cursor: pointer; }
table.wpt-table tbody tr.wpt-row:hover > td { background: var(--wpt-bg2); }
table.wpt-table tbody tr.is-sel > td { background: var(--wpt-p-soft) !important; }
table.wpt-table tfoot td { padding: 11px 14px; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--wpt-text); background: var(--wpt-bg2); border-top: 1px solid var(--wpt-line); border-bottom: 0; white-space: nowrap; }
table.wpt-table tr.wpt-filters th { padding: 6px 8px 8px; background: var(--wpt-bg2); text-transform: none; letter-spacing: 0; overflow: visible; }
table.wpt-table tr.wpt-filters input, table.wpt-table tr.wpt-filters select {
  width: 100% !important; height: 30px !important; margin: 0 !important; padding: 0 8px !important; border: 1px solid var(--wpt-line) !important;
  border-radius: 7px !important; font-size: 12.5px !important; font-weight: 500; background-color: #fff !important; color: var(--wpt-text);
  background-image: none !important; --pico-icon-search: none;
}
table.wpt-table tr.wpt-filters .is-on { border-color: var(--wpt-p) !important; background-color: var(--wpt-p-soft) !important; }
.wpt-empty { padding: 26px 16px !important; text-align: center; color: var(--wpt-muted); }
.wpt-pname { font-weight: 600; color: var(--wpt-text); }
.wpt-psub { display: block; font-size: 12.5px; color: var(--wpt-muted); margin-top: 1px; }
.wpt-cellname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wpt-cellname > span:last-child { min-width: 0; }
.wpt-cellname .wpt-pname, .wpt-cellname .wpt-psub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpt-chevbtn { flex: 0 0 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--wpt-muted); border: 1px solid var(--wpt-line); background: #fff; }
.wpt-chevbtn .wpt-ico { width: 13px; height: 13px; }
.wpt-zero { color: #98a2b3; }
.wpt-zero.is-warn { color: var(--wpt-warn); font-weight: 700; }
table.wpt-table tbody tr.wpt-row:focus-visible > td { background: var(--wpt-p-soft); }
table.wpt-table tbody tr.wpt-row:focus { outline: 0; }
.wpt-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0); border: 0 !important; }
.wpt-relier { font-size: 12.5px; font-weight: 600; color: var(--wpt-warn); white-space: nowrap; }
.wpt-code { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--wpt-grey-soft); font-family: Consolas, Menlo, monospace; font-size: 12px; color: #344054; }
.wpt-hl { background: #fff3bf; border-radius: 3px; padding: 0 1px; }
.wpt-muted { color: var(--wpt-muted); }

/* badges */
.wpt-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wpt-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wpt-badge.is-grey { background: var(--wpt-grey-soft); color: #495057; }
.wpt-badge.is-info { background: var(--wpt-info-soft); color: var(--wpt-info); }
.wpt-badge.is-warn { background: var(--wpt-warn-soft); color: var(--wpt-warn); }
.wpt-badge.is-ok { background: var(--wpt-ok-soft); color: var(--wpt-ok); }
.wpt-badge.is-danger { background: var(--wpt-danger-soft); color: var(--wpt-danger); }
.wpt-pt { display: inline-grid; place-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wpt-pt.is-prev { background: #e7f0fe; color: #1c6dd0; } .wpt-pt.is-res { background: #f3e8ff; color: #6f42c1; } .wpt-pt.is-big { background: #fff1e6; color: #c2410c; } .wpt-pt.is-other { background: var(--wpt-grey-soft); color: #495057; }
.wpt-paln { font-weight: 700; color: var(--wpt-p-dark); white-space: nowrap; }

/* pagination */
.wpt-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 0; font-size: 13px; color: var(--wpt-muted); }
.wpt-pager__pg { display: flex; gap: 4px; flex-wrap: wrap; }
.wpt-pg { min-width: 32px; height: 32px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--wpt-line); background: #fff; font-weight: 600; color: var(--wpt-text) !important; text-decoration: none !important; }
a.wpt-pg:hover { border-color: var(--wpt-p-line); }
.wpt-pg.is-cur { background: linear-gradient(135deg, var(--wpt-p), var(--wpt-p-dark)); border-color: var(--wpt-p-dark); color: #fff !important; }
.wpt-pg.is-dots { border: 0; background: none; }

/* réponse à une recherche (ex. « 3 palettes ») */
.wpt-answer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 12px 16px; margin: 0 0 12px; border-radius: 12px; background: #fff; border: 1px solid var(--wpt-p-line); box-shadow: inset 4px 0 0 var(--wpt-p); }
.wpt-answer__big { font-size: 22px; font-weight: 700; color: var(--wpt-p-dark); }
.wpt-answer__end { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.wpt-answer__q { font-size: 12.5px; font-weight: 600; }

/* messages */
.wpt-msg { padding: 10px 14px; margin: 0 0 12px; border-radius: 10px; border: 1px solid var(--wpt-line); background: #fff; }
.wpt-msg.is-ok { border-color: #b7e1c1; background: var(--wpt-ok-soft); color: #1e6b31; }
.wpt-msg.is-err { border-color: #f1c0c0; background: var(--wpt-danger-soft); color: #9b2323; }
.wpt-msg.is-warn { border-color: #f5d0a9; background: var(--wpt-warn-soft); color: #9a3b0a; }

/* blocs (formulaires, sections) */
.wpt-box { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .05); padding: 16px 18px; margin: 0 0 14px; }
.wpt-box__h { margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wpt-muted); }
main.container h2, main.container h3 { color: var(--wpt-p-dark); }

/* ------------------------------------------------------------------ panneau de détail (à droite) */
.wpt-drawer-bg { position: fixed; inset: 0; z-index: 95; background: rgba(16, 24, 40, .18); }
/* sur grand écran, pas de voile : un clic sur une autre ligne change de produit sans fermer le volet */
@media (min-width: 861px) { .wpt-drawer-bg { display: none !important; } }
.wpt-drawer-bg[hidden] { display: none; }
.wpt-drawer {
  position: fixed; top: var(--wpt-nav-h); right: 0; bottom: 0; z-index: 96; width: min(700px, 100%);
  display: flex; flex-direction: column; background: #fff; box-shadow: -18px 0 40px rgba(16, 24, 40, .16);
}
.wpt-drawer[hidden] { display: none; }
.wpt-drawer__h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 22px 12px; border-bottom: 1px solid var(--wpt-line); }
.wpt-drawer__t { margin: 0; font-size: 19px; line-height: 1.25; color: var(--wpt-p-dark); }
.wpt-drawer__s { color: var(--wpt-muted); font-size: 13.5px; margin-top: 2px; }
.wpt-drawer__x { margin-left: auto; flex: 0 0 34px; width: 34px !important; height: 34px !important; padding: 0 !important; border-radius: 8px !important; border: 1px solid var(--wpt-line) !important; background: #fff !important; color: var(--wpt-text) !important; display: grid !important; place-items: center; }
.wpt-drawer__x .wpt-ico { width: 16px; height: 16px; }
.wpt-drawer__tabs { display: flex; gap: 4px; padding: 10px 22px 0; }
.wpt-seg { display: inline-flex; padding: 4px; border-radius: 11px; background: #e6eaf1; gap: 2px; }
.wpt-seg button { white-space: nowrap; height: 32px !important; padding: 0 14px !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #475467 !important; font-size: 13.5px !important; font-weight: 600 !important; box-shadow: none !important; display: inline-flex !important; align-items: center; gap: 6px; }
.wpt-seg button.is-on { background: #fff !important; color: var(--wpt-p-dark) !important; box-shadow: 0 1px 3px rgba(16, 24, 40, .12) !important; }
.wpt-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wpt-dot.is-ok { background: var(--wpt-ok); } .wpt-dot.is-todo { background: var(--wpt-warn); }
.wpt-drawer__b { flex: 1; overflow: auto; padding: 16px 22px 24px; }
.wpt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0 0 16px; }
.wpt-tile { border-radius: 10px; padding: 10px 12px; background: var(--wpt-bg2); }
.wpt-tile__l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--wpt-muted); }
.wpt-tile__v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wpt-ch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wpt-ch.is-3pl { background: #5b6b84; } .wpt-ch.is-pk { background: #7b5cd6; } .wpt-ch.is-amz { background: #f08c00; } .wpt-ch.is-pal { background: #1c6dd0; }
.wpt-lst { border: 1px solid var(--wpt-line); border-radius: 9px; margin: 0 0 14px; }
.wpt-li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--wpt-line); }
.wpt-li:first-child { border-top: 0; }
.wpt-li__t { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.wpt-li__r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.wpt-li__r small { display: block; font-size: 12px; color: var(--wpt-muted); }
.wpt-sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.wpt-sec-h__t { font-weight: 700; font-size: 13.5px; }
.wpt-sec-h__s { margin-left: auto; font-size: 13px; color: var(--wpt-muted); }
.wpt-sec-h--pal { margin-top: 18px; }
.wpt-paln + .wpt-pt { margin-left: 8px; }

/* contenu des onglets du volet : sections du détail des stocks (3PL, picking, Amazon) et fiche produit, au même style */
.wpt-dpane[hidden], .wpt-dtab[hidden] { display: none; }
.wpt-drawer .stock-sect { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 6px; padding: 0; border: 0; }
.wpt-drawer .wpt-dtab > .stock-sect:first-of-type { margin-top: 0; }
.wpt-drawer .stock-sect__name { font-size: 13.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--wpt-text); }
.wpt-drawer .stock-sect__tot { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--wpt-muted); }
.wpt-drawer .stock-sect__note { font-size: 12.5px; color: var(--wpt-muted); opacity: 1; margin: 6px 0 0; }
.wpt-drawer table.stock-subtable { width: 100%; min-width: 0; margin: 0; border: 1px solid var(--wpt-line); border-radius: 9px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 13px; }
.wpt-drawer table.stock-subtable th { white-space: normal; padding: 7px 10px; background: var(--wpt-bg2); border-bottom: 1px solid var(--wpt-line); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--wpt-muted); }
.wpt-drawer table.stock-subtable td { padding: 8px 10px; border-bottom: 1px solid var(--wpt-line); background: #fff; white-space: normal; vertical-align: middle; }
.wpt-drawer table.stock-subtable tr:last-child > td { border-bottom: 0; }
.wpt-drawer table.stock-subtable td:not(.t) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wpt-drawer table.stock-subtable td.t { overflow-wrap: anywhere; }
.wpt-drawer table.stock-subtable td.t code { white-space: nowrap; }
.wpt-drawer table.stock-subtable code { padding: 1px 6px; border-radius: 5px; background: var(--wpt-grey-soft); font-size: 12px; color: #344054; }
.wpt-drawer .stk-amz-wrap { margin: 0 0 8px; }
.wpt-drawer .stk-amz-pick { border-color: var(--wpt-p-line); background: var(--wpt-p-soft); border-radius: 10px; }
.wpt-drawer .stk-amz-pick__head input { height: 32px !important; margin: 0 !important; padding: 0 10px !important; font-size: 13px !important; border-radius: 8px !important; }
.wpt-drawer .stk-miss { color: var(--wpt-warn); background: var(--wpt-warn-soft); }
/* fiche produit */
.wpt-drawer .stk-fldrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; }
.wpt-drawer .stk-fld { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; font-weight: 600; color: var(--wpt-muted); white-space: normal; }
.wpt-drawer .stk-fld__in { position: relative; display: block; }
.wpt-drawer .stk-fld__u { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--wpt-muted); pointer-events: none; }
.wpt-drawer .stk-fld input.stk-in { width: 100% !important; height: 36px !important; margin: 0 !important; padding: 0 34px 0 10px !important; border: 1px solid var(--wpt-line) !important; border-radius: 8px !important; font-size: 14px !important; color: var(--wpt-text); }
.wpt-drawer .stk-fld input.stk-in.--empty { background: var(--wpt-warn-soft) !important; border-color: #f5c08a !important; }
.wpt-drawer .stk-fldrow .wpt-btn { align-self: end; }
.wpt-drawer .stk-sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wpt-line); gap: 8px; }
.wpt-drawer .stk-feedback { margin-top: 10px; padding: 8px 12px; border-radius: 9px; font-size: 13px; }

/* tri des petits écrans (tableau en cartes) */
.wpt-sortsel { display: none; }

/* ------------------------------------------------------------------ tablette, téléphone */
@media (max-width: 1100px) {
  .wpt-acct-name { display: none; }
}
@media (max-width: 860px) {
  :root { --wpt-nav-h: 58px; }
  nav.primary-top-nav ul.menu-entries { display: none !important; }
  .wpt-burger-li { display: flex !important; }
  .wpt-acct-li { display: none !important; }
  main.container { padding-top: calc(var(--wpt-nav-h) + 14px); }
  .wpt-toolbar__end { margin-left: 0; }
  form.wpt-search { min-width: 0; flex: 1 1 220px; }
  .wpt-drawer { top: 0; width: 100%; z-index: 140; }
}
@media (max-width: 820px) {
  table.wpt-table.wpt-table--cards thead, table.wpt-table.wpt-table--cards tfoot { display: none; }
  table.wpt-table.wpt-table--cards, table.wpt-table.wpt-table--cards tbody { display: block; }
  table.wpt-table.wpt-table--cards tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--wpt-line); background: #fff; }
  table.wpt-table.wpt-table--cards tbody tr > td { display: block; padding: 0; border: 0; background: none !important; }
  table.wpt-table.wpt-table--cards tbody tr > td[hidden] { display: none; }
  table.wpt-table.wpt-table--cards tbody tr > td.is-main { grid-column: 1 / -1; }
  table.wpt-table.wpt-table--cards tbody tr > td[data-label]::before { content: attr(data-label); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 600; color: var(--wpt-muted); text-transform: uppercase; letter-spacing: .04em; }
  table.wpt-table.wpt-table--cards tbody tr > td.num { text-align: left; font-weight: 700; font-size: 15px; }
  table.wpt-table.wpt-table--cards tbody tr > td.is-hide-m { display: none; }
  table.wpt-table.wpt-table--cards { min-width: 0; }
  table.wpt-table.wpt-table--cards tbody tr > td.wpt-empty { grid-column: 1 / -1; }
  .wpt-sortsel { display: block; margin: 0 0 10px; }
  .wpt-sortsel select { height: 38px !important; margin: 0 !important; padding: 0 12px !important; border: 1px solid var(--wpt-line) !important; border-radius: 9px !important; font-size: 14px !important; background-color: #fff !important; }
  /* tableaux du volet et tableaux pas encore réécrits : ils défilent seuls, jamais la page */
  .wpt-drawer table.stock-subtable, main.container table:not([class]), main.container table.webportal-table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .wpt-pill { height: 34px; padding: 0 11px; }
  .wpt-pager { flex-direction: column; align-items: flex-start; }
  .wpt-colsbtn { display: none !important; }
}

/* ------------------------------------------------------------------ accueil : tuiles sobres (icône, titre, compteur) */
.home-links-grid.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding-bottom: 0; }
.home-links-card { border: 0; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .05); transition: box-shadow .15s; }
.home-links-card::before { display: none; }
.home-links-card:hover { transform: none; box-shadow: 0 6px 18px -8px rgba(16, 24, 40, .25), 0 0 0 1px var(--wpt-p-line); }
.home-links-card__link { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; }
.home-links-card__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--wpt-p-soft) !important; color: var(--wpt-p); }
.home-links-card__icon svg { width: 21px; height: 21px; }
.home-links-card__body { gap: 0; }
.home-links-card__title { font-size: 15px; color: var(--wpt-text); }
.home-links-card__desc { display: none; }
.home-links-card__arrow { margin: 0 0 0 auto; font-size: 18px; color: var(--wpt-muted); }
.home-links-card.--tolink .home-links-card__icon { background: var(--wpt-warn-soft) !important; color: var(--wpt-warn); }
.home-tolink-badge { background: var(--wpt-warn); }

/* ------------------------------------------------------------------ éléments communs des listes et fiches (1.233) */
.wpt-dhead__ref { font-size: 18px; font-weight: 700; color: var(--wpt-p-dark); }
.wpt-sec-title { margin: 24px 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wpt-muted); }
main.container > .wpt-sec-title:first-child { margin-top: 0; }
.wpt-note { margin: 0 0 14px; max-width: 920px; font-size: 13.5px; line-height: 1.5; color: var(--wpt-muted); }
.wpt-danger { color: var(--wpt-danger); }
a.wpt-badge { text-decoration: none !important; }
.wpt-box[hidden] { display: none; }
.wpt-actcell { text-align: right; white-space: nowrap; }
.wpt-acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
.wpt-acts form, .wpt-actcell form { display: inline; margin: 0; }
.wpt-formrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 12px; }
.wpt-formrow label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--wpt-muted); }
.wpt-formrow input, .wpt-formrow select { margin: 0 !important; height: 38px !important; padding: 0 10px !important; font-size: 14px !important; color: var(--wpt-text); border-radius: 9px !important; }
.wpt-btn .wpt-ico, .wpt-pill .wpt-ico { vertical-align: -3px; margin-right: 6px; }
button.wpt-btn, a.wpt-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 0; white-space: nowrap; width: auto; margin: 0; }

/* ------------------------------------------------------------------ pages pas encore réécrites et pages natives (factures, commandes…) :
   même tableau, mêmes champs, mêmes boutons, mêmes intertitres — sans toucher à leur code */
main.container { --form-element-spacing-vertical: .5rem; --form-element-spacing-horizontal: .8rem; --border-radius: 9px; }
main.container input:not([type=checkbox]):not([type=radio]), main.container select, main.container textarea { font-size: 14px; }
main.container button, main.container input[type=submit], main.container [role=button] { font-size: 14px; font-weight: 600; }
main.container button:not([class]):not([type=button]), main.container input[type=submit]:not([class]) {
  width: auto; border: 0; border-radius: 9px; background: linear-gradient(135deg, var(--wpt-p) 0%, var(--wpt-p-dark) 100%); color: #fff;
  box-shadow: 0 10px 20px -12px hsla(var(--primary-color-hue), 45%, 25%, .85);
}
main.container h2 { font-size: 20px; margin: 4px 0 12px; color: var(--wpt-p-dark); }
main.container h3 { margin: 24px 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wpt-muted); }
main.container table:not([class]), main.container table.webportal-table {
  width: 100%; margin: 0 0 16px; border-collapse: separate !important; border-spacing: 0; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .05); font-size: 14px;
}
main.container table:not([class]) > * > tr > th, main.container table.webportal-table > * > tr > th {
  padding: 10px 14px !important; background: #fff !important; border-bottom: 1px solid var(--wpt-line) !important; color: var(--wpt-muted) !important;
  font-size: 12px !important; font-weight: 600 !important; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle;
}
main.container table:not([class]) > * > tr > td, main.container table.webportal-table > * > tr > td {
  padding: 11px 14px !important; border-bottom: 1px solid var(--wpt-line) !important; background: #fff; vertical-align: middle; color: var(--wpt-text);
}
main.container table:not([class]) > tbody > tr:nth-child(even) > td, main.container table.webportal-table > tbody > tr:nth-child(even) > td { background: #fafbfd; }
main.container table:not([class]) > tbody > tr:last-child > td, main.container table.webportal-table > tbody > tr:last-child > td { border-bottom: 0 !important; }
main.container table:not([class]) > tfoot > tr > td { font-weight: 700; background: var(--wpt-bg2); border-top: 1px solid var(--wpt-line) !important; }
main.container table:not([class]) table:not([class]) { box-shadow: none; border-radius: 0; margin: 0; }
/* pagination native du portail */
main.container ul.pages-nav-list { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 14px 0 0; }
main.container ul.pages-nav-list li { list-style: none; margin: 0; padding: 0; }
main.container ul.pages-nav-list li > a, main.container ul.pages-nav-list li > strong, main.container ul.pages-nav-list li > span {
  min-width: 32px; height: 32px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--wpt-line);
  background: #fff; font-weight: 600; font-size: 13px; color: var(--wpt-text); text-decoration: none;
}
main.container ul.pages-nav-list li > strong { background: linear-gradient(135deg, var(--wpt-p), var(--wpt-p-dark)); border-color: var(--wpt-p-dark); color: #fff; }

/* ------------------------------------------------------------------ accueil (1.234) : « À faire », puis les familles du menu */
.wpt-home .home-links-grid.grid { margin: 0 0 6px; }
.wpt-home .home-links-card .wpt-count { margin-left: auto; }
.wpt-home .home-links-card .wpt-count + .home-links-card__arrow { margin-left: 8px; }
.wpt-home-todo .home-links-card { box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px #f5d0a9; }

/* ------------------------------------------------------------------ encadrés de réglages et de fiche (1.236) */
.wpt-box__head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.wpt-box__ico { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--wpt-p-soft); color: var(--wpt-p); }
.wpt-box__ico .wpt-ico { width: 20px; height: 20px; }
.wpt-box__hd { flex: 1 1 240px; min-width: 0; }
main.container .wpt-box h2.wpt-box__t { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--wpt-text); }
.wpt-box__s { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--wpt-muted); }
.wpt-box__end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wpt-box__end form, .wpt-box__foot form { margin: 0; }
.wpt-box__sec { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--wpt-line); }
.wpt-box__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.wpt-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 24px; }
.wpt-field__l { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--wpt-muted); }
.wpt-field__h { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--wpt-muted); }
.wpt-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.wpt-box input[type=text], .wpt-box input[type=number], .wpt-box input[type=search], .wpt-box input[type=date], .wpt-box input[type=email], .wpt-box select, .wpt-box textarea {
  margin: 0 !important; height: 38px; padding: 0 10px !important; border: 1px solid var(--wpt-line) !important; border-radius: 9px !important;
  font-size: 14px !important; background-color: #fff; color: var(--wpt-text); box-shadow: none !important;
}
.wpt-box select { padding-right: 32px !important; }
.wpt-box textarea { height: auto; padding: 8px 10px !important; }
.wpt-inline select, .wpt-inline input { width: auto !important; min-width: 0; }
.wpt-inline input[type=number] { width: 100px !important; }
.wpt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.wpt-kv dt { margin: 0; font-size: 13px; font-weight: 600; color: var(--wpt-muted); }
.wpt-kv dd { margin: 0; }
.wpt-chks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
label.wpt-chk { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; margin: 0; border: 1px solid var(--wpt-line); border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 600; color: #475467; cursor: pointer; white-space: nowrap; }
label.wpt-chk input { width: 16px !important; height: 16px !important; margin: 0 !important; accent-color: var(--wpt-p); }
label.wpt-chk:has(input:checked) { border-color: var(--wpt-p); background: var(--wpt-p-soft); color: var(--wpt-p-dark); }
label.wpt-chk.is-locked { cursor: default; }
.wpt-box .wpt-msg { margin: 10px 0 0; }
.wpt-box > .wpt-msg:first-child { margin-top: 0; }
/* 1.236 : Liaison picking — recherche dans le catalogue picking + boutons sur la même ligne */
.wpt-dslink { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wpt-dslink form { margin: 0; }
.wpt-dsfind { position: relative; display: inline-block; }
.wpt-dsfind input[type=text] { height: 34px !important; margin: 0 !important; padding: 0 10px !important; font-size: 13.5px !important; width: 240px !important; }
.wpt-box .wpt-box__foot select { width: auto !important; height: 36px !important; margin: 0 !important; padding: 0 30px 0 10px !important; }
.wpt-box .wpt-msg { font-size: 14px; line-height: 1.5; }
.wpt-box__foot .wpt-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.wpt-box__foot .wpt-link svg { width: 16px; height: 16px; }
form.wpt-box__foot { margin-bottom: 0; }
.wpt-dsgone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.wpt-msg { font-size: 14px; line-height: 1.5; }
.wpt-dsgone .wpt-badge { white-space: normal; height: auto; min-height: 22px; line-height: 1.35; padding-top: 3px; padding-bottom: 3px; }
/* 1.259 (Yann, 10/10) : une pastille de la colonne Liaisons revient à la ligne au lieu de faire déborder le tableau */
.wpt-table--products td[data-col=todo] .wpt-badge { white-space: normal; height: auto; min-height: 22px; line-height: 1.35; padding-top: 3px; padding-bottom: 3px; max-width: 100%; }
@media (max-width: 820px) {
  table.wpt-table.wpt-table--cards tbody tr > td.is-wide { grid-column: 1 / -1; }
  .wpt-dslink form.ds-linkform, .wpt-dsgone form.ds-linkform, .wpt-dslink form.amz-linkform, .wpt-dslink form.fba-assignform { display: flex; gap: 8px; flex: 1 1 100%; }
  .wpt-dsfind { flex: 1 1 auto; min-width: 0; }
  .wpt-dsfind input[type=text] { width: 100% !important; }
  .wpt-ac { min-width: 0; width: 100%; }
}
/* 1.236 : Produits à relier — codes Amazon, état, prestation, liste de choix */
.wpt-amzcodes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0; }
.wpt-amzcodes form { margin: 0; }
.wpt-code.is-soft { background: transparent; border: 1px solid var(--wpt-line); color: var(--wpt-muted); }
.wpt-reasons { margin: 6px 0 0; padding-left: 18px; color: var(--wpt-danger); font-size: 12.5px; line-height: 1.4; }
.wpt-offer { margin-top: 8px; padding: 8px 10px; border: 1px dashed #b9cfe8; border-radius: 8px; background: var(--wpt-info-soft); font-size: 12.5px; line-height: 1.4; }
.wpt-offer form { margin: 6px 0 0; }
.wpt-more summary { cursor: pointer; font-size: 12.5px; color: var(--wpt-link); margin-top: 6px; }
.wpt-more[open] summary { margin-bottom: 6px; }
.wpt-ac { position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); min-width: 320px; max-width: 480px; max-height: 300px; overflow: auto; background: #fff; border: 1px solid var(--wpt-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.wpt-ac__it { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f1f3f6; font-size: 13px; line-height: 1.35; }
.wpt-ac__it:last-child { border-bottom: 0; }
.wpt-ac__it:hover { background: var(--wpt-p-soft); }
.wpt-ac__it b { font-family: Consolas, Menlo, monospace; font-size: 12.5px; color: #1d2939; }
.wpt-ac__it span { color: #475467; }
.wpt-ac__it em { font-style: normal; font-size: 12px; color: var(--wpt-ok); }
.wpt-ac__note { padding: 8px 12px; font-size: 13px; color: var(--wpt-muted); }
.wpt-ac__note.is-err { color: var(--wpt-danger); }
/* 1.257 (Yann, 10/10) : sélecteur de produit commun à tout l'extranet (js/wpt-pick.js) — 2 caractères, résultats dessous */
.wpt-pick { position: relative; display: block; width: 100%; max-width: 520px; }
.wpt-pick .wpt-pick__in { width: 100% !important; max-width: none !important; margin: 0 !important; }
.wpt-pick .wpt-ac { width: 100%; min-width: 0; max-width: none; max-height: 340px; }
.wpt-pick .wpt-ac__it b { font-family: inherit; font-size: 13.5px; font-weight: 600; }
.wpt-ac__it.is-act { background: var(--wpt-p-soft); }
.wpt-ac__it.is-cur b::after { content: " ✓"; color: var(--wpt-ok); }
.wpt-ac__it.is-dis { cursor: default; opacity: .5; }
.wpt-ac__it.is-dis:hover { background: transparent; }
.wpt-pick__cur { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 6px 5px 12px; border: 1px solid var(--wpt-line); border-radius: 8px; background: #fff; cursor: pointer; }
.wpt-pick__cur[hidden], .wpt-pick__in[hidden] { display: none !important; }
.wpt-pick__cur:hover { border-color: var(--wpt-p); }
.wpt-pick__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wpt-pick__t { font-weight: 600; font-size: 14px; color: #1d2939; overflow-wrap: anywhere; }
.wpt-pick__s { font-size: 12.5px; color: #475467; overflow-wrap: anywhere; }
.wpt-pick__chg { flex: 0 0 auto; }
.wpt-pick.is-bad .wpt-pick__in { background: #fff5f5 !important; border-color: #f3b4b4 !important; box-shadow: inset 3px 0 0 #f0a3a3 !important; }
tr.wpt-rowmsg > td { padding-top: 0 !important; }
.wpt-table--amz .wpt-btn--mini { white-space: normal !important; height: auto !important; min-height: 30px; padding: 5px 11px !important; line-height: 1.25 !important; text-align: left; }
/* 1.237 : fiche d'un envoi FBA (nouvelle version) */
.wpt-box--info { box-shadow: 0 0 0 1px #b9d3f2, 0 1px 2px rgba(16, 24, 40, .06); background: #f7fbff; }
.wpt-box--warn { box-shadow: 0 0 0 1px #f2cf8e, 0 1px 2px rgba(16, 24, 40, .06); background: #fffbf3; }
.wpt-field { display: block; margin: 0; min-width: 0; }
.wpt-field--wide { margin-top: 14px; }
.wpt-fields--add { grid-template-columns: minmax(280px, 2.4fr) repeat(auto-fit, minmax(130px, 1fr)); align-items: end; }
.wpt-field--prod input[type=search] { margin-bottom: 6px !important; }
.wpt-field--qty input { max-width: 140px; }
.wpt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wpt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--wpt-grey-soft); font-size: 13px; color: #344054; }
.wpt-chip svg { width: 15px; height: 15px; }
.wpt-jalons { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.wpt-jalon { position: relative; flex: 1 1 0; min-width: 110px; padding: 0 8px 4px 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--wpt-muted); }
.wpt-jalon::before { content: ""; position: absolute; top: 11px; left: 26px; right: 4px; height: 2px; background: var(--wpt-line); }
.wpt-jalon:last-child::before { display: none; }
.wpt-jalon__dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--wpt-line); background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.wpt-jalon__dot svg { width: 13px; height: 13px; }
.wpt-jalon__t { font-weight: 600; line-height: 1.3; }
.wpt-jalon__s { font-size: 12px; }
.wpt-jalon.is-done { color: #1d2939; }
.wpt-jalon.is-done .wpt-jalon__dot { border-color: var(--wpt-ok); background: var(--wpt-ok); color: #fff; }
.wpt-jalon.is-done::before { background: var(--wpt-ok); }
.wpt-jalon.is-cur { color: var(--wpt-info); }
.wpt-jalon.is-cur .wpt-jalon__dot { border-color: var(--wpt-info); box-shadow: 0 0 0 4px var(--wpt-info-soft); }
.wpt-chain { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.wpt-chain li { color: var(--wpt-muted); }
.wpt-chain li > span { display: inline-block; width: 1.4em; }
.wpt-chain li.is-done { color: var(--wpt-ok); }
.wpt-chain li.is-cur { color: var(--wpt-info); font-weight: 600; }
.wpt-chain li.is-err { color: var(--wpt-danger); font-weight: 600; }
.wpt-chain__err { margin: 2px 0 4px 1.4em; font-weight: 400; }
.wpt-quotes { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
label.wpt-quote { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; min-width: 210px; padding: 10px 14px; margin: 0; border: 2px solid var(--wpt-line); border-radius: 10px; background: #fff; cursor: pointer; }
label.wpt-quote input { grid-row: span 3; width: 18px !important; height: 18px !important; margin: 0 !important; accent-color: var(--wpt-p); }
label.wpt-quote:has(input:checked) { border-color: var(--wpt-p); box-shadow: 0 0 0 3px var(--wpt-p-soft); }
.wpt-quote__m { font-size: 12.5px; font-weight: 600; color: var(--wpt-muted); }
.wpt-quote__a { font-size: 18px; font-weight: 700; color: #1d2939; }
.wpt-quote__c { font-size: 12px; color: var(--wpt-muted); }
@media (max-width: 820px) {
  .wpt-fields--add { grid-template-columns: 1fr 1fr; }
  .wpt-field--prod { grid-column: 1 / -1; }
  .wpt-field--qty input { max-width: none; }
  .wpt-jalons { flex-direction: column; gap: 10px; }
  .wpt-jalon { flex-direction: row; align-items: center; min-width: 0; }
  .wpt-jalon::before { display: none; }
  label.wpt-quote { min-width: 0; flex: 1 1 100%; }
}
.wpt-box .wpt-comment { min-height: 84px; }
/* 1.239 : Factures — liens de fichiers alignés (PDF / XLSX), crédit d'un avoir */
.wpt-invfiles a.btn-download-link { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; white-space: nowrap; line-height: 1.2; }
.wpt-invfiles a.btn-download-link i.fa { font-size: 13px; width: 14px; text-align: center; }
.wpt-invfiles a.webportaltiers-xlsx i.fa { color: #1d6f42; }
table.wpt-table td.num.is-credit, table.wpt-table td.num.is-credit b { color: var(--wpt-ok); }
/* 1.240 : fiche d'une livraison annoncée (nouvelle version) */
.wpt-dlhead { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 18px 28px; align-items: start; }
.wpt-dlhead > .wpt-msg { grid-column: 1 / -1; margin: 0; }
.wpt-dladdr { padding: 12px 14px; border-radius: 10px; background: var(--wpt-info-soft); font-size: 14px; line-height: 1.45; }
.wpt-dladdr__n { font-weight: 700; color: #1d2939; }
.wpt-dlhead__f { display: grid; gap: 12px; margin: 0; }
.wpt-dlhead__f .wpt-field--wide { margin: 0; }
.wpt-dlmix { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; color: #475467; }
.wpt-dlmix li:first-child { list-style: none; margin-left: -16px; }
.wpt-dlready { margin: 6px 0 0; }
.wpt-dlready label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.wpt-dlready select { height: 30px !important; padding: 0 28px 0 8px !important; font-size: 13px !important; width: auto !important; }
.wpt-dlform .wpt-step { margin: 0 0 14px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--wpt-line); background: none; box-shadow: none; border-radius: 0; }
.wpt-dlform .wpt-step:first-of-type { padding-top: 0; border-top: 0; }
.wpt-dlform .wpt-step__t { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #1d2939; text-transform: none; letter-spacing: 0; }
.wpt-dlform .wpt-field__label { display: block; margin: 0 0 5px; font-size: 12.5px; font-weight: 600; color: var(--wpt-muted); }
.wpt-dlform .wpt-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px; }
.wpt-dlform label { font-size: 13.5px; }
.wpt-dlform input[type=radio], .wpt-dlform input[type=checkbox] { width: 16px !important; height: 16px !important; margin: 0 6px 0 0 !important; vertical-align: -3px; accent-color: var(--wpt-p); }
.wpt-dlform #dl_prods > div { border-top-color: var(--wpt-line) !important; }
.wpt-dlform #dl_pcbs > div { border-top: 1px solid var(--wpt-line) !important; padding: 10px 0 !important; }
.wpt-dlform .wpt-addrow { align-items: flex-end !important; }
.wpt-dlform .wpt-addrow label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--wpt-muted); }
@media (max-width: 820px) {
  .wpt-dlhead { grid-template-columns: 1fr; }
  .wpt-dlform #dl_container, .wpt-dlform select, .wpt-dlform input[type=search] { min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
  .wpt-dlform #dl_pcbs > div > div { min-width: 0 !important; }
}

/* 1.240 : Préparation Amazon — formulaire de demande */
.wpt-fields--prep { grid-template-columns: minmax(260px, 2fr) repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.wpt-fields--prep .wpt-field--wide { grid-column: 1 / -1; margin: 0; }
@media (max-width: 820px) { .wpt-fields--prep { grid-template-columns: 1fr 1fr; } .wpt-fields--prep .wpt-field--prod { grid-column: 1 / -1; } }

/* 1.242 : liaison depuis Mes produits (pages « Produits à relier » et « Liaison picking » supprimées) */
.wpt-drawer .stk-sec { margin-top: 16px; }
.stk-sec__state, .stk-sec__find, .stk-sec__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.stk-sec__acts { margin-top: 10px; }
.stk-sec .wpt-dsfind input[type=text] { width: 280px !important; }
.stk-fb { margin-top: 8px; padding: 8px 12px; border-radius: 9px; font-size: 13px; line-height: 1.4; }
.stk-fb.is-ok { background: var(--wpt-ok-soft); color: var(--wpt-ok); }
.stk-fb.is-err { background: var(--wpt-danger-soft); color: var(--wpt-danger); }
.stk-fb.is-warn { background: var(--wpt-warn-soft); color: #9a3a06; }
.stk-fb .wpt-btn { margin-left: 8px; }
.stk-fb__warn { margin-top: 4px; color: #9a3a06; }
.stk-amz-det { margin-top: 10px; }
.stk-amz-det table { margin-top: 6px; }
/* recherche dans la ligne, pastille « À relier » */
.stk-inl { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.stk-inl + .stk-inl { margin-top: 6px; }
.stk-inl__l { flex: 0 0 62px; font-size: 12px; font-weight: 600; color: var(--wpt-muted); }
.stk-inl .wpt-dsfind input[type=text] { width: 230px !important; height: 32px !important; }
@media (max-width: 820px) {
  .stk-inl { flex-wrap: wrap; }
  .stk-inl .wpt-dsfind, .stk-sec .wpt-dsfind { flex: 1 1 100%; min-width: 0; }
  .stk-inl .wpt-dsfind input[type=text], .stk-sec .wpt-dsfind input[type=text] { width: 100% !important; }
}

/* 1.243 — commandes d'expédition : intertitres et choix (étiquettes) dans le formulaire */
.wpt-h3 { margin: 14px 0 8px; font-size: 15px; font-weight: 650; color: var(--wpt-p-dark, #2b3d59); }
.wpt-check { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 500; cursor: pointer; }
.wpt-check input { width: 20px; height: 20px; margin: 0; }

/* 1.246 — annonce : nouveau produit sur une ligne alignée (Référence, Description en grande zone, EAN), EAN faux signalé */
.wpt-dl-new { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr) !important; align-items: start; }
.wpt-dl-new .wpt-field { margin-top: 0 !important; }
.wpt-dl-new textarea.wpt-input { font: inherit; padding: 8px 10px; border: 1px solid #c9d1de; border-radius: 6px; }
.wpt-input.is-bad { border-color: #d92d20 !important; box-shadow: 0 0 0 2px rgba(217, 45, 32, .15); }
.wpt-dl-err { color: #b42318; font-size: .85em; margin-top: 4px; line-height: 1.3; }
/* 1.246 : L, l, H, poids et valeur de l'unité sur UNE ligne */
.wpt-dl-unit { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; align-items: end; }
.wpt-dl-unit .wpt-field { margin-top: 0 !important; }
@media (max-width: 700px) { .wpt-dl-new { grid-template-columns: 1fr !important; } .wpt-dl-unit { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* 1.246 — EXPÉDITIONS (retours de Yann du 03/10) : présentation de l'annonce de livraison (étapes, liste de colisage en
   bas, ✕ par ligne), adresse ALIGNÉE (grille à 4 colonnes), bouton de fichiers dans le style de la page, fiche consultable */
/* 1.253 (Yann, 08/10) : champs à la taille de leur contenu, comme l'annonce de livraison */
.wpt-ship-pick { display: grid; grid-template-columns: minmax(0, 420px) 110px auto; gap: 10px 14px; align-items: end; max-width: 900px; justify-content: start; }
.wpt-ship-pick__prod { min-width: 0; }
.wpt-ship-pick__prod #wpt-ship-find { margin-bottom: 6px; }
.wpt-ship-pick .wpt-ship-warn { grid-column: 1 / -1; margin: 0; }
.wpt-ship-addr { display: flex; flex-wrap: wrap; gap: 0 16px; max-width: 900px; align-items: flex-start; }
.wpt-ship-addr .wpt-field { margin: 0 0 12px !important; min-width: 0; } /* espace sous chaque champ (pas d'écart de ligne : les sauts n'en ajoutent pas) */
.wpt-ship-addr .a-first, .wpt-ship-addr .a-name { flex: 0 1 220px; }
.wpt-ship-addr .a-comp, .wpt-ship-addr .a-mail { flex: 0 1 300px; }
.wpt-ship-addr .a-addr { flex: 0 1 600px; }
.wpt-ship-addr .a-zip { flex: 0 1 120px; }
.wpt-ship-addr .a-town { flex: 0 1 260px; }
.wpt-ship-addr .a-ctry, .wpt-ship-addr .a-tel { flex: 0 1 200px; }
.wpt-ship-addr .a-date { flex: 0 1 180px; }
.wpt-ship-addr .wpt-ship-br { flex-basis: 100%; height: 0; } /* saut de ligne : nom / adresse / ville / contact */
.wpt-ship-lab { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.wpt-ship-files { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.wpt-file { position: relative; overflow: hidden; cursor: pointer; }
.wpt-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.wpt-file__names { color: var(--wpt-muted); font-size: 13.5px; }
/* 1.269 : limites d'envoi des étiquettes, et message quand elles sont dépassées */
.wpt-ship-files .wpt-ship-flim { flex-basis: 100%; margin: 0; font-size: 12.5px; }
.wpt-ship-files .wpt-ship-ferr { flex-basis: 100%; margin: 0; }
.wpt-ship-pack { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--wpt-line); }
.wpt-ship-pack .wpt-step__t { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.wpt-ship-pack .wpt-psub { font-weight: 500; }
.wpt-shiphead { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 6px 0 14px; }
.wpt-shiphead__t { margin: 0; font-size: 22px; }
.wpt-shipsteps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; }
.wpt-shipsteps li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: #f2f4f7; color: var(--wpt-muted); font-size: 13.5px; font-weight: 600; }
.wpt-shipsteps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-size: 12px; }
.wpt-shipsteps li.is-done { background: var(--wpt-ok-soft); color: var(--wpt-ok); }
.wpt-shipsteps li.is-cur { background: var(--wpt-p); color: #fff; }
.wpt-shipsteps li.is-cur span { color: var(--wpt-p); }
.wpt-ship-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wpt-ship-cards > .wpt-box { margin: 0; }
.wpt-ship-addrview { margin: 0 0 10px; line-height: 1.5; }
.wpt-ship-cards + .wpt-box { margin-top: 16px; }
.wpt-ship-addrview { font-size: 15px; }
.wpt-ship-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; padding: 0; font-size: 14px; }
.wpt-ship-kv dt { margin: 0; padding: 0; color: var(--wpt-muted); font-size: 13px; font-weight: 500; }
.wpt-ship-kv dd { margin: 0; padding: 0; font-size: 14px; }
.wpt-ship-kv dd .wpt-psub { display: block; }
@media (max-width: 760px) {
  .wpt-ship-pick { grid-template-columns: 1fr; }
  .wpt-ship-addr .wpt-field { flex: 1 1 100% !important; margin-right: 0 !important; }
  .wpt-ship-cards { grid-template-columns: 1fr; }
}

/* 1.247 (Yann, 03/10) — « Actualiser » : on voit que ça travaille (icône qui tourne, « Actualisation… », un seul envoi) ;
   heures des derniers relevés à côté du bouton */
.wpt-btn.is-busy, button.wpt-btn.is-busy[disabled] { cursor: progress; opacity: 1; color: var(--wpt-p-dark) !important; border-color: var(--wpt-p) !important; background: var(--wpt-p-soft) !important; }
.wpt-btn.is-busy .wpt-ico { animation: wpt-spin .9s linear infinite; }
@keyframes wpt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wpt-btn.is-busy .wpt-ico { animation-duration: 2.5s; } }
.wpt-stamp { font-size: 12.5px; color: var(--wpt-muted); white-space: nowrap; }
.wpt-stamp b { font-weight: 600; color: var(--wpt-text); }
/* 1.247 — volet : palettes relues à l'ouverture, différentes de la page affichée */
.wpt-li.wpt-palstale { background: var(--wpt-warn-soft); color: #9a3b0a; font-size: 13px; flex-wrap: wrap; }
.wpt-li.wpt-palstale a { white-space: nowrap; }

/* 1.248 (Yann, 03/10) — annonce de livraison : sous-titres à la taille des libellés (ils prenaient la grande taille du thème
   et paraissaient plus importants que les champs obligatoires) ; champ OBLIGATOIRE vide = fond rouge pâle, sans agressivité */
.wpt-dl-subt { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: #344054; }
.wpt-dl-rowt { min-width: 220px; align-self: center; font-size: 13.5px; font-weight: 600; color: #1d2939; }
.wpt-dl-hint { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--wpt-muted); }
.wpt-dlform .wpt-req-empty, .wpt-dlform input.wpt-req-empty { background: #fff5f5 !important; border-color: #f3b4b4 !important; box-shadow: inset 3px 0 0 #f0a3a3 !important; }
.wpt-dlform .wpt-req-empty:focus { border-color: #e57b7b !important; box-shadow: inset 3px 0 0 #e57b7b, 0 0 0 3px rgba(229, 123, 123, .15) !important; }

/* 1.248 (Yann, 03/10) — import Excel de la packing list dans l'annonce */
.wpt-pl { padding: 16px 20px 20px; }
.wpt-pl__acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wpt-pl__form { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.wpt-pl__file { cursor: pointer; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpt-pl .wpt-table-wrap { overflow-x: auto; border: 1px solid var(--wpt-line); border-radius: 10px; }
.wpt-pl__tbl { table-layout: auto !important; font-size: 13px !important; }
.wpt-pl__tbl tr.is-err td { background: var(--wpt-danger-soft); }
.wpt-pl__err { margin-top: 4px; color: var(--wpt-danger); font-size: 12.5px; line-height: 1.35; }

/* ---- 1.252 (Yann, 04/10) : ICÔNE DU CALENDRIER bien visible sur TOUS les champs date de l'extranet ----
   Le thème de l'extranet cache l'icône native du navigateur et dessine la sienne en image de fond ; notre style
   des champs (background: #fff) effaçait cette image : il ne restait qu'une petite zone cliquable invisible.
   Icône nette à droite du champ ; l'icône native, transparente et agrandie, est posée dessus : un clic sur
   l'icône ouvre le calendrier. Firefox affiche son propre bouton : pas d'image en double. */
html body input[type="date"]:not(.wpt-nocal):not([type=hidden]) {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2433' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='17' rx='2.5'/%3E%3Cpath d='M16 2.5v4M8 2.5v4M3 10h18'/%3E%3Crect x='7' y='13.5' width='3.5' height='3.5' rx='.6' fill='%231d2433' stroke='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  background-size: 20px 20px !important;
  padding-right: 38px !important;
  min-width: 165px;
  cursor: pointer;
}
html body input[type="date"]:not(.wpt-nocal):not([type=hidden])::-webkit-calendar-picker-indicator {
  opacity: 0 !important; cursor: pointer; width: 26px; height: 26px; padding: 0; margin: 0 -32px 0 6px;
}
html body input[type="date"]:not(.wpt-nocal):not([type=hidden]):disabled { cursor: default; opacity: .6; }
@supports (-moz-appearance: none) {
  html body input[type="date"]:not(.wpt-nocal):not([type=hidden]) { background-image: none !important; padding-right: 10px !important; }
}

/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS */
