/*
 * 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;
}
