/* Application fit: keep the reference sheets intact and close the gaps
   that appear when a live control sits inside a design field. */

.prd-toolbar label:has(.sr-only),
.ord-toolbar label:has(.sr-only),
.prd-toolbar .cmp-label:has(.sr-only),
.ord-toolbar .cmp-label:has(.sr-only) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.prd-ed-body > form.prd-ed-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.prd-ed-body > form.prd-ed-form > :nth-child(1),
.prd-ed-body > form.prd-ed-form > :nth-child(2),
.prd-ed-body > form.prd-ed-form > :nth-child(n + 5),
.prd-ed-body > form.prd-ed-form > .cmp:nth-child(1) > *,
.prd-ed-body > form.prd-ed-form > .cmp:nth-child(2) > *,
.prd-ed-body > form.prd-ed-form > .cmp:nth-child(n + 5) > * {
  grid-column: span 2;
}

@media (max-width: 560px) {
  .prd-ed-body > form.prd-ed-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .prd-ed-body > form.prd-ed-form > :nth-child(1),
  .prd-ed-body > form.prd-ed-form > :nth-child(2),
  .prd-ed-body > form.prd-ed-form > :nth-child(n + 5),
  .prd-ed-body > form.prd-ed-form > .cmp:nth-child(1) > *,
  .prd-ed-body > form.prd-ed-form > .cmp:nth-child(2) > *,
  .prd-ed-body > form.prd-ed-form > .cmp:nth-child(n + 5) > * {
    grid-column: auto;
  }
}

/* Vignettes des commandes : une vraie image produit remplit la vignette
   (normale et grande) en gardant ses coins arrondis. */
.ord-thumb img,
.ord-thumb--lg img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Champs ui-field de @ibtikar/ui : zone de texte et bouton d'icône, valeurs reprises de
   .cmp-ctl--area et .cmp-ib (components.css) qui ne s'appliquent que sous .cmp. */
.ui-field__ctl.cmp-ctl--area {
  block-size: auto;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding-block: 12px;
}

.ui-field__ctl.cmp-ctl--area textarea {
  block-size: auto;
  min-block-size: 96px;
  resize: vertical;
  line-height: 24px;
}

.ui-field__ctl .cmp-ib {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: var(--ib, 32px);
  block-size: var(--ib, 32px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--u-text2);
  cursor: pointer;
  transition: background-color 120ms linear, color 120ms linear, transform 120ms linear;
}

.ui-field--sm .ui-field__ctl .cmp-ib { --ib: 28px; }
.ui-field--lg .ui-field__ctl .cmp-ib { --ib: 40px; }
.ui-field__ctl .cmp-ib:hover { background: var(--hashimi-hover); color: var(--hashimi-content); }
.ui-field__ctl .cmp-ib:active { transform: scale(.88); }
.ui-field__ctl .cmp-ib[hidden] { display: none; }

/* Conteneur d'une carte réelle (MapLibre) : hauteur normale, et variante réduite pour la livraison. */
.fit-map {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 420px;
}

.fit-map--delivery {
  min-height: 256px;
}

/* globals.css pose un anneau Tailwind sur tout :focus-visible (ring-2, box-shadow) : on l'annule dans les
   champs du référentiel, qui ont leur propre focus. Les box-shadow de focus du design ne sont pas touchés. */
.cmp :focus-visible:not(.ibtikar-field-control),
.ui-field :focus-visible:not(.ibtikar-field-control) {
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
}

/* Un seul cadre au focus. La règle du contrat « :is(... .ui-field__in):focus-visible » (components.css) dessine un
   contour de 2 px sur l'élément natif, à l'intérieur du cadre et du halo de .ui-field__ctl : c'était le rectangle
   sombre. Comme dans le prototype (.cmp-in, .ord-input), seul le contrôle englobant porte le focus. La classe est
   doublée pour passer devant « .cmp :is(...):focus-visible », quel que soit l'ordre des feuilles.
   En contraste forcé, .ui-field__ctl:focus-within garde son contour Highlight (components.css). */
.ui-field__ctl .ui-field__in.ui-field__in:focus-visible,
.cmp .cmp-ctl select:focus-visible {
  outline: 0;
}

/* Triangle plein des listes (Dropdown et Select de @ibtikar/ui), identique à .ord-select / .drv-select du prototype :
   deux dégradés de 6 px en couleur de texte, à 16 px du bord de fin. */
.cmp .cmp-dd .cmp-dd__chev,
.ui-field__tri {
  position: absolute;
  inset-inline-end: 16px;
  inset-block-start: 52%;
  margin-block-start: -3px;
  inline-size: 12px;
  block-size: 6px;
  color: inherit;
  pointer-events: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-position: 0 0, 6px 0;
}

/* Coque vb en français et en anglais : nav-vb.css fixe direction:rtl et un rail découpé côté droit ; on inverse pour le LTR. */
.vb[dir="ltr"] { direction: ltr; }
.vb[dir="ltr"][data-collapsed="true"] .vb-side { clip-path: inset(0 188px 0 0); }
.vb[dir="ltr"][data-collapsed="true"] .vb-well { transform: translate3d(-188px, 0, 0); }
@media (max-width: 1023px) {
  .vb[dir="ltr"][data-collapsed] .vb-side { clip-path: inset(0 212px 0 0); }
  .vb[dir="ltr"][data-collapsed] .vb-side[data-open="true"] { clip-path: inset(0); }
}
@media (max-width: 767px) {
  .vb[dir="ltr"] .vb-side, .vb[dir="ltr"][data-collapsed] .vb-side { clip-path: none; transform: translate3d(-100%, 0, 0); }
  .vb[dir="ltr"] .vb-side[data-open="true"], .vb[dir="ltr"][data-collapsed] .vb-side[data-open="true"] { transform: none; }
}

/* ---------- Squelettes partagés (src/components/design/Skeleton.tsx) ----------
   Le reflet vient de .motion-skeleton (motion.css). Dimensions reprises du référentiel : .cmp-sk-line 12/20/28,
   .shell-skel-card 112, .shp-skelcard 1:1, .prd-skel minmax(220px), champs 44 px rayon 8, lignes de tableau 56 px. */
.sk-region { display: grid; gap: 16px; inline-size: 100%; min-inline-size: 0; align-content: start; }
.sk-stack { display: grid; gap: 16px; min-inline-size: 0; align-content: start; }
.sk-stack--tight { gap: 8px; }
.sk-stack--field { gap: 6px; }
.sk-grow { flex: 1 1 auto; min-inline-size: 0; }
.sk-row { display: flex; align-items: center; gap: 12px; min-inline-size: 0; }
.sk-row--between { justify-content: space-between; }
.sk-line { block-size: 12px; border-radius: 6px; max-inline-size: 100%; }
.sk-line--md { block-size: 16px; }
.sk-line--lg { block-size: 20px; }
.sk-line--value { block-size: 28px; }
.sk-line--title { block-size: 32px; border-radius: 8px; }
.sk-circle { border-radius: 50%; flex: none; }
.sk-fill { inline-size: 100%; block-size: 100%; }

.sk-card {
  display: grid;
  gap: 16px;
  align-content: start;
  min-inline-size: 0;
  padding: 16px;
  border: 1px solid var(--hashimi-line);
  border-radius: var(--hashimi-radius-lg);
  background: var(--hashimi-surface);
}
.sk-card--flush { display: block; padding: 0; overflow: hidden; }
.sk-kpi { gap: 12px; min-block-size: 112px; }
.sk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.sk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-block-size: 64px; padding: 10px 16px; }
.sk-toolbar__search { flex: 1 1 280px; max-inline-size: 360px; }
.sk-toolbar__sel { flex: 0 1 200px; }
.sk-trow {
  display: grid;
  grid-template-columns: repeat(var(--sk-cols, 5), minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  min-block-size: 56px;
  padding-inline: 16px;
  border-block-start: 1px solid var(--hashimi-line);
}
.sk-trow--head { min-block-size: 44px; background: var(--hashimi-surface-muted); }
.sk-trow--head .motion-skeleton { background: var(--hashimi-line); }
.sk-td { padding: 16px; }

.sk-list__row { display: flex; align-items: center; gap: 12px; min-block-size: 72px; padding: 12px 16px; }
.sk-list__row + .sk-list__row { border-block-start: 1px solid var(--hashimi-line); }

.sk-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.sk-product { display: grid; gap: 8px; align-content: start; }
.sk-product__img { aspect-ratio: 1 / 1; inline-size: 100%; border-radius: var(--hashimi-radius-lg); }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--sk-min, 280px), 100%), 1fr)); gap: 16px; }

.sk-chat { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-block-size: 0; padding-block: 8px; }
.sk-bubble { align-self: flex-start; border-radius: 16px; max-inline-size: 80%; }
.sk-bubble--mine { align-self: flex-end; background: var(--hashimi-brand-soft); }

.sk-form { display: grid; gap: 16px; }
.sk-form--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.sk-map { position: absolute; inset: 0; z-index: 10; display: block; background: var(--hashimi-surface-muted); }
.sk-chatpage { grid-template-columns: 320px minmax(0, 1fr); min-block-size: 560px; align-content: stretch; }
.sk-chatpage__main { display: flex; flex-direction: column; }

.sk-screen { min-block-size: 100vh; padding: 16px; background: var(--hashimi-canvas); max-inline-size: 960px; margin-inline: auto; }

/* Coque : mêmes largeurs que nav-vb.css (rail 264, barre 64) et fond encre du rail. */
.sk-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 0;
  min-block-size: 100vh;
  align-content: stretch;
  background: var(--hashimi-canvas);
}
.sk-shell__side { display: grid; align-content: start; gap: 12px; padding: 20px 16px; background: var(--hashimi-ink-900); }
.sk-shell__tone { background: color-mix(in srgb, var(--hashimi-surface) 12%, transparent); }
.sk-shell__tone::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .1), transparent); }
.sk-shell__main { display: flex; flex-direction: column; min-inline-size: 0; }
.sk-shell__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; block-size: 64px; padding-inline: 24px; border-block-end: 1px solid var(--hashimi-line); background: var(--hashimi-surface); }
.sk-shell__body { display: grid; gap: 16px; padding: 24px; align-content: start; }

@media (max-width: 1023px) { .sk-shell { grid-template-columns: 76px minmax(0, 1fr); } .sk-shell__side { padding-inline: 12px; } }
@media (max-width: 767px) {
  .sk-shell { grid-template-columns: minmax(0, 1fr); }
  .sk-shell__side { display: none; }
  .sk-shell__top { block-size: 56px; padding-inline: 16px; }
  .sk-shell__body { padding: 16px; }
  .sk-trow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sk-trow > .sk-tcell:nth-child(n + 4) { display: none; }
  .sk-chatpage { grid-template-columns: minmax(0, 1fr); }
  .sk-chatpage__side { display: none; }
  .sk-split, .sk-form--2 { grid-template-columns: minmax(0, 1fr); }
  .sk-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mouvement réduit : ni pulsation ni reflet, seule la forme reste. */
@media (prefers-reduced-motion: reduce) {
  .motion-skeleton { animation: none; }
  .motion-skeleton::after { display: none; }
}

/* Squelette posé sur un fond sombre (anciennes pages boutique, discussion client, scène 3D). */
.sk-on-dark .motion-skeleton { background: rgb(255 255 255 / .08); }
.sk-on-dark .motion-skeleton::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .1), transparent); }
.sk-on-dark .sk-card { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .1); }
.sk-list--compact .sk-list__row { min-block-size: 40px; padding-block: 8px; }
.sk-list--compact .sk-list__row + .sk-list__row { border-block-start: 0; }

/* ---------- Tableau de bord : débordements relevés par QA-1 ---------- */
/* Boîtes « قريباً » : le sous-titre vit dans l'en-tête, comme les autres boîtes du prototype. Sans contenu dessous,
   l'en-tête garde sa marge basse. Sur la boîte sombre, le gris du sous-titre passe au ton clair du rail. */
.dash-prop .dash-box-head > div { flex: 1 1 0; min-inline-size: 0; }
.dash-prop .dash-box-head:last-child { padding-block-end: var(--dash-pad-m); }
.dash-prop .dash-box-head + .dash-pos-cta { padding-block-start: var(--dash-pad-m); }
.dash-box--dark .dash-box-sub { color: var(--hashimi-ink-300); }

/* Pied du rail : le nom long s'arrête avant #vb-well (44 px à 16 px du bord) et finit par des points de suspension. */
/* Spécificité relevée : fit.css passe avant nav-vb.css dans le document, qui fixe aussi ce retrait. */
.vb .vb-foot { padding-inline-end: 68px; }
.vb-who { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr); }
.vb-who > b, .vb-who > small { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) { .vb .vb-foot { padding-inline-end: 16px; } }

/* Anneau : la taille du total vient de OverviewCharts ; le bloc ne dépasse jamais le trou de 88 px. */
.dash-donut-total { max-inline-size: 88px; }
.dash-donut-total b { white-space: nowrap; }

/* Valeurs KPI : le nombre et « MRU » restent sur une seule ligne. La carte est le conteneur :
   sous 220 px de contenu le corps rétrécit, pour qu'un montant à 8 chiffres ne laisse pas « MRU » seul. */
.dash-stat .dash-box, .dash-eco, .eco-stat, .bill-stat { container-type: inline-size; }
.dash-stat-value, .eco-stat-value {
  display: flex; flex-wrap: nowrap; align-items: baseline; min-inline-size: 0; max-inline-size: 100%; white-space: nowrap;
}
.dash-stat-value > :not(small), .eco-stat-value > :not(small) { white-space: nowrap; min-inline-size: 0; }
.dash-stat-value small, .eco-stat-value small { flex: none; margin-inline-start: 0; padding-inline-start: 4px; }
@container (max-width: 220px) {
  .dash-stat-value, .eco-stat-value, .bill-stat-value { font-size: 18px; }
  .dash-stat-value small, .eco-stat-value small, .bill-stat-value small { font-size: 12px; }
}
@container (max-width: 160px) {
  .dash-stat-value, .eco-stat-value, .bill-stat-value { font-size: 15px; }
}
@container (max-width: 130px) {
  .dash-stat-value, .eco-stat-value, .bill-stat-value { font-size: 13px; }
  .dash-stat-value small, .eco-stat-value small, .bill-stat-value small { font-size: 11px; }
}

/* Liens des pages : base.css les colore en bleu, le reset de .vb (limité à la coque) les faisait hériter. On garde
   l'héritage sans spécificité de classe : les utilitaires Tailwind et les règles des pages passent devant. */
:where(.shell-content) a { color: inherit; }

/* Double focus des champs de recherche : le cadre et le halo sont sur le conteneur (:focus-within). Sans cette règle,
   « .vb :focus-visible » dessine aussi un contour sur l'<input> intérieur. */
:is(.cus-search, .cash-search, .bill-search, .shp-search, .shp-mg-search) input:focus-visible { outline: 0; box-shadow: none; --tw-ring-shadow: 0 0 #0000; --tw-ring-offset-shadow: 0 0 #0000; }

/* Recherche produits du magasin : le champ @ibtikar ne redessine pas un second cadre à l'intérieur de .ui-field__ctl. */
.prd-field--search .ui-field__ctl .ui-field__in.ui-field__in,
.prd-field--search .ui-field__ctl .ui-field__in.ui-field__in:focus,
.prd-field--search .ui-field__ctl .ui-field__in.ui-field__in:focus-visible {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
  --tw-ring-offset-shadow: 0 0 #0000;
}

/* ---------- QA-1 : coque ---------- */
/* Libellé long à côté d'un badge : le texte s'abrège, le badge garde sa taille. La troncature est sur un span intérieur :
   .vb-lb doit laisser dépasser le trait .vb-nibw, placé sous lui. */
.vb-item .vb-lb { flex: 0 1 auto; min-inline-size: 0; }
.vb-lbt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Point final du titre : nav-vb.css le pose sous .page, or plusieurs pages (commandes, produits, caisse) n'ont pas ce conteneur. */
html[data-navshell] .shell-content h1::after {
  content: "";
  display: inline-block;
  inline-size: 7px;
  block-size: 7px;
  margin-inline-start: 10px;
  transform: rotate(45deg);
  background: var(--hashimi-ink-900);
  border-radius: 1px;
  vertical-align: middle;
  animation: vb-final 260ms var(--hashimi-ease-spring) 480ms backwards;
}
html[data-navshell][data-theme="dark"] .shell-content h1::after { background: var(--hashimi-accent-400); }
/* المعين يتبع عنوان الصفحة فقط. على كل h1 كان يظهر عند التبديل إلى البحري فيلصق العناوين الداخلية. */
html[data-navshell] .shell-content h1::after { content: none; animation: none; }
html[data-navshell] .shell-content :is(.dco-head, .set-head, .dash-head, .ord-head, .page) > h1::after,
html[data-navshell] .shell-content :is(.dco-head, .set-head, .dash-head) > div > h1::after {
  content: "";
  display: inline-block;
  inline-size: 7px;
  block-size: 7px;
  margin-inline-start: 10px;
  transform: rotate(45deg);
  background: var(--hashimi-ink-900);
  border-radius: 1px;
  vertical-align: middle;
  animation: vb-final 260ms var(--hashimi-ease-spring) 480ms backwards;
}
html[data-navshell][data-theme="dark"] .shell-content :is(.dco-head, .set-head, .dash-head, .ord-head, .page) > h1::after,
html[data-navshell][data-theme="dark"] .shell-content :is(.dco-head, .set-head, .dash-head) > div > h1::after { background: var(--hashimi-accent-400); }

/* روابط الشريط العلوي (محادثات العملاء ومكدس تبديل الهيكل) تظهر من 1024 كما في السماء، لا من 1280 فقط. */
@media (min-width: 1024px) {
  .vb-chatlinks { display: flex; }
}

/* السكة البحرية: القص كان من اليسار الفيزيائي فيقص الأيقونات إذا رُسم الشريط من البداية المنطقية المعاكسة.
   عند الفتح (الدرج) يُزال القص. */
@media (max-width: 1023px) {
  .vb[data-rail="true"] .vb-side { clip-path: inset(0 0 0 212px); }
  .vb[dir="ltr"][data-rail="true"] .vb-side { clip-path: inset(0 212px 0 0); }
  .vb[data-rail="true"] .vb-side[data-open="true"],
  .vb[dir="ltr"][data-rail="true"] .vb-side[data-open="true"] { clip-path: inset(0); }
}
.vb[dir="ltr"][data-collapsed="true"] .vb-side { clip-path: inset(0 188px 0 0); }
.vb[dir="ltr"][data-collapsed="true"] .vb-well { transform: translate3d(-188px, 0, 0); }

/* شريط السماء داخل عمود البحري: نفس الارتفاع، والقوائم تخرج منه. */
.vb-col > .va3-topbar {
  display: block;
  flex: none;
  block-size: var(--vb-top, 64px);
  overflow: visible;
  background: transparent;
}
.vb-col > .va3-topbar > .va3-top { block-size: 100%; overflow: visible; }
.va3-side-title { display: none; }
.vb-side .va3-embed {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  block-size: 100%;
  inline-size: 100%;
  background: var(--hashimi-ink-900);
  direction: rtl;
}
.vb-side .va3-embed .va3-side { position: absolute; inset: 0; }
.va3-side-head .va3-fold { margin-inline-start: auto; }
@media (max-width: 1023px) {
  .va3-slot-side .va3-side-head { display: none; }
}
@media (min-width: 1024px) {
  .vb[data-nav="va3"] { --vb-side: 264px; }
  .vb[data-nav="va3"][data-rail="true"] { --vb-side: 76px; }
  .vb[data-nav="va3"] .vb-side { clip-path: none; inline-size: var(--vb-side); }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .vb[data-nav="va3"] .vb-side,
  .vb[data-nav="va3"][data-collapsed] .vb-side,
  .vb[data-nav="va3"][data-rail="true"] .vb-side { clip-path: none; inline-size: var(--vb-side); }
  .vb[data-nav="va3"] .vb-side[data-open="true"] { inline-size: var(--vb-inner); }
}
@media (max-width: 767px) {
  .vb[data-nav="va3"] .vb-side,
  .vb[data-nav="va3"][data-collapsed] .vb-side { clip-path: none; }
}

/* ---------- QA-1 : /dashboard ---------- */
.dash-hero-v { line-height: 1.3; }
.dash-hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-hero-side > div { min-inline-size: 0; }
.dash-hero-side dd { overflow-wrap: anywhere; }
@media (max-width: 1279px) {
  .dash-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-hero-side dd { font-size: 18px; }
}

/* ---------- QA-1 : /dashboard/analytics ---------- */
.ana-card { min-inline-size: 0; }
/* Une graduation plus large que sa case déborde vers l'intérieur aux deux extrémités, jamais hors de la carte. */
.ana-xaxis span { display: flex; justify-content: center; min-inline-size: 0; }
.ana-xaxis span:first-child { justify-content: flex-start; }
.ana-xaxis span:last-child { justify-content: flex-end; }
.ana-leg--s li { grid-template-columns: 12px minmax(0, 1fr) auto; }
.ana-leg b { white-space: nowrap; }
.ana-top-m { grid-template-columns: minmax(0, 1fr); }
.ana-donut-c b { white-space: nowrap; }

/* ---------- QA-1 : /dashboard/platform-economy ---------- */
.eco-tabs > .eco-seg { flex: 0 1 auto; min-inline-size: 0; scrollbar-width: none; }
.eco-tabs > .eco-seg::-webkit-scrollbar { display: none; }
.eco-tabs > .eco-seg button { flex: none; white-space: nowrap; }
/* Le corps et « MRU » partagent la règle des cartes du tableau de bord, plus haut. */

/* ---------- QA-1 : /dashboard/orders ---------- */
.ord-pager-ctl { flex-wrap: wrap; min-inline-size: 0; max-inline-size: 100%; }
/* Un code ou un e-mail long s'abrège : le tableau ne s'élargit plus et les colonnes ne passent plus sous les actions collantes. */
.ord-table td.ord-num { max-inline-size: 160px; overflow: hidden; text-overflow: ellipsis; }
.ord-table td small { max-inline-size: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) {
  .ord-table td.ord-num, .ord-table td small { max-inline-size: 100%; }
}

/* ---------- Pages non portées en sombre ----------
   Les utilitaires dark:bg-gray-* gardaient des panneaux gris presque noirs sur le fond bleu nuit : ils prennent ici les
   surfaces du référentiel. html.dark passe devant « .dark .utilitaire » de Tailwind ; les pages portées n'emploient pas ces classes. */
html.dark :is(.dark\:bg-gray-950, .dark\:bg-gray-900, .dark\:bg-slate-950, .dark\:bg-slate-900) { background-color: var(--hashimi-canvas); }
html.dark :is(.dark\:bg-gray-800, .dark\:bg-slate-800) { background-color: var(--hashimi-surface); }
html.dark :is(.dark\:bg-gray-700, .dark\:bg-slate-700) { background-color: var(--hashimi-surface-muted); }
html.dark :is(.dark\:bg-gray-600, .dark\:bg-slate-600) { background-color: var(--hashimi-line); }
html.dark :is(.dark\:bg-gray-900\/40) { background-color: color-mix(in srgb, var(--hashimi-canvas) 40%, transparent); }
html.dark :is(.dark\:bg-gray-900\/50, .dark\:bg-slate-900\/50) { background-color: color-mix(in srgb, var(--hashimi-canvas) 50%, transparent); }
html.dark :is(.dark\:bg-gray-800\/50, .dark\:bg-slate-800\/50) { background-color: color-mix(in srgb, var(--hashimi-surface) 50%, transparent); }
html.dark :is(.dark\:hover\:bg-gray-800, .dark\:hover\:bg-slate-800):hover { background-color: var(--hashimi-surface); }
html.dark :is(.dark\:hover\:bg-gray-700, .dark\:hover\:bg-slate-700):hover { background-color: var(--hashimi-surface-muted); }
html.dark :is(.dark\:hover\:bg-gray-600, .dark\:hover\:bg-slate-600):hover { background-color: var(--hashimi-line); }
html.dark .dark\:hover\:bg-gray-700\/50:hover { background-color: color-mix(in srgb, var(--hashimi-surface-muted) 50%, transparent); }
html.dark :is(.dark\:border-gray-800, .dark\:border-gray-700, .dark\:border-slate-800, .dark\:border-slate-700) { border-color: var(--hashimi-line); }
html.dark :is(.dark\:border-gray-600, .dark\:border-slate-600) { border-color: var(--hashimi-line-strong); }
html.dark .dark\:divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: var(--hashimi-line); }

/* ---------- QA-2 : barre latérale pendant le chargement des permissions ----------
   Lignes de la géométrie de .vb-item (56 px, retraits 13/12, écart 12) : le vrai menu arrive sans décalage. */
.sk-nav { gap: 0; }
.sk-nav__row { display: flex; align-items: center; gap: 12px; block-size: 56px; padding-inline: 13px 12px; }
.sk-nav__row + .sk-nav__row { margin-block-start: 2px; } /* écart de .vb-group + .vb-group */
.sk-nav__ic { flex: none; }
.vb[data-lo="true"] .sk-nav__lb { opacity: 0; }


/* المظهر الحالي: شمس في الفاتح، وقمر بعد التبديل إلى الداكن. */
.vb-theme, .va3-moon { display: grid; place-items: center; }
.vb-sun, .vb-moon, .shell-theme-sun, .shell-theme-moon {
  grid-area: 1 / 1;
  transition: transform 300ms var(--hashimi-ease-out, ease), opacity 220ms linear;
}
.vb-sun, .shell-theme-sun { opacity: 1; transform: none; }
.vb-moon, .shell-theme-moon { opacity: 0; transform: rotate(60deg) scale(.6); }
html[data-theme="dark"] .vb-sun,
html[data-theme="dark"] .shell-theme-sun { opacity: 0; transform: rotate(-60deg) scale(.6); }
html[data-theme="dark"] .vb-moon,
html[data-theme="dark"] .shell-theme-moon { opacity: 1; transform: none; }
.va3-pal { z-index: 90; }
.va3-pal-box { inline-size: min(680px, 100%); }
.va3-pal-list li.va3-pal-row { display: block; min-block-size: 0; padding: 0; background: none; cursor: default; font-weight: 400; }
.va3-pal-group { display: block; padding: 10px 12px 2px; font-size: 12px; font-weight: 700; color: var(--hashimi-content-muted, #51607A); }
.va3-pal-row [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 48px; padding-inline: 12px; border-radius: 12px; cursor: pointer; font-weight: 500; }
.va3-pal-row [role="option"][aria-selected="true"] { background: var(--hashimi-brand-soft, #EFF6FB); color: var(--hashimi-brand-on-soft, #19517A); }
.va3-pal-row small { color: var(--hashimi-content-muted, #51607A); font-size: 12px; font-weight: 500; }
.va3-pal-row mark { background: none; color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.va3-pal-foot { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px; border-block-start: 1px solid var(--hashimi-line, #E6E1D6); color: var(--hashimi-content-muted, #51607A); font-size: 12px; }
.va3-moon-svg { direction: ltr; }
.va3-phase { transition: opacity 360ms var(--hashimi-ease-out, ease); }
.va3-phase-full { opacity: 1; }
.va3-phase-crescent { opacity: 0; }
html[data-theme="dark"] .va3-phase-full { opacity: 0; }
html[data-theme="dark"] .va3-phase-crescent { opacity: 1; }
/* الشعار يبقى الرسم نفسه بلا لوحة خلفه، والخلفية شفافة. */
.va3-logo,
.va3-logo-mark,
.vb-logo,
.vb-mtitle .vb-logo {
  background: transparent !important;
  box-shadow: none !important;
}

/* البحر ينضم إلى الشريط كما السماء: الشريط يعبر العرض، والورقة تنحني تحته. */
@media (min-width: 768px) {
  .vb { background: var(--hashimi-ink-900, #0B2347); }
  .vb-col { overflow: visible; }
  .vb-top {
    z-index: 40;
    margin-inline-start: calc(var(--vb-side) * -1);
    inline-size: calc(100% + var(--vb-side));
    background: var(--hashimi-ink-900, #0B2347);
    color: var(--hashimi-sand-50, #F7F5F0);
    border: 0;
  }
  .vb-inner { padding-block-start: var(--vb-top); }
  .vb-brand { display: none; }
  .vb-mtitle { display: inline-flex; color: inherit; }
  .vb-mtitle { min-inline-size: 0; }
  .vb-mtitle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 16ch; }
  .vb-slot {
    background: var(--hashimi-canvas, #F7F5F0);
    border-start-start-radius: 24px;
    border-start-end-radius: 24px;
    overflow: clip;
  }
  .vb[data-lo="true"] .vb-gt { display: none; }
  .vb[data-lo="true"] .vb-group > ul { display: block; }
}
.vb-top .vb-btn,
.vb-top .vb-clink,
.vb-top .vb-search,
.vb-top .vb-mtitle,
.vb-top .vb-profile,
.vb-top .vb-store { color: var(--hashimi-sand-50, #F7F5F0); }
.vb-top .vb-search,
.vb-top .vb-profile,
.vb-top .vb-store {
  background: rgb(247 245 240 / .06);
  border-color: rgb(95 168 224 / .35);
}
.vb-top .vb-kbd { color: var(--hashimi-ink-300, #8AA0C2); }

/* مكدسات البحر: العنوان يبقى، والقائمة تُطوى. */
.vb-stack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}
.vb-group[data-open="false"] > ul { display: none; }
.vb-group[data-open="true"] .vb-stack .vb-chev { transform: rotate(180deg); }

/* الهاتف: الشريط قائمة وعنوان وبحث وصورة فقط، والدرج يُفتح بلا قص. */
@media (max-width: 767px) {
  .vb-top {
    margin-inline-start: 0;
    inline-size: auto;
    background: var(--hashimi-ink-900, #0B2347);
    color: var(--hashimi-sand-50, #F7F5F0);
  }
  .vb-inner { padding-block-start: 0; }
  .vb-brand { display: flex; }
  .vb-side,
  .vb[data-collapsed] .vb-side,
  .vb[data-rail="true"] .vb-side,
  .vb[dir="ltr"][data-collapsed] .vb-side,
  .vb[dir="ltr"][data-rail="true"] .vb-side { clip-path: none !important; }
  .vb-top .vb-chatlinks,
  .vb-top .vb-store-anchor,
  .vb-top .vb-ctx,
  .vb-top .vb-theme,
  .vb-top .vb-lang-anchor,
  .vb-top .vb-profile-name,
  .vb-top .vb-chev { display: none !important; }
  .vb-top .vb-search { inline-size: 44px !important; padding-inline: 0 !important; justify-content: center; }
  .vb-top .vb-search :is(.vb-search-t, .prop-tag, .vb-kbd) { display: none !important; }
  .vb-top .vb-mtitle { display: inline-flex !important; flex: 1; min-inline-size: 0; }
  .vb-top .vb-mtitle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vb-slot { border-radius: 0; }
}

/* N29-START : barre du haut, tous les boutons restent dans l'écran à toute largeur, en ar, fr et en, avec les noms longs.
   Écart volontaire avec la référence, qui déborde à 1440 : nav-vb.css fixe la recherche à 240 px dès 1280 px d'écran et n'ôte rien
   si la colonne est étroite. Les seuils portent donc sur la largeur de la barre (rail ou barre latérale ouverte), pas sur celle de
   l'écran, et dépendent de la langue, car les libellés n'ont pas la même longueur. */
@media (min-width: 1280px) {
  .vb-top { container: vb-top / inline-size; }
  .vb-top .vb-chatlinks { flex: none; }

  /* Filet de sécurité : le nom du profil cède en premier, puis le nom du magasin, sans jamais couper les boutons. */
  .vb-top .vb-profile-anchor { flex: 0 1000 auto; min-inline-size: 90px; }
  .vb-top .vb-store-anchor { flex: 0 1 auto; min-inline-size: 84px; }
  .vb-top :is(.vb-profile, .vb-store) { max-inline-size: 100%; min-inline-size: 0; }
  .vb-top :is(.vb-profile, .vb-store) > :is(.shell-icon, .vb-avatar, .prop-tag) { flex: none; }
  .vb-top :is(.vb-profile-name, .vb-store-name) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vb-top .vb-profile-name { max-inline-size: 160px; }

  /* La recherche se réduit à son icône sous la largeur que demande la barre complète dans chaque langue. */
  @container vb-top (max-width: 1129px) {
    .vb-top .vb-search { inline-size: 44px; padding-inline: 0; justify-content: center; }
    .vb-top .vb-search :is(.vb-search-t, .prop-tag, .vb-kbd) { display: none; }
  }
  @container vb-top (max-width: 1249px) {
    .vb-top:is(:lang(fr), :lang(en)) .vb-search { inline-size: 44px; padding-inline: 0; justify-content: center; }
    .vb-top:is(:lang(fr), :lang(en)) .vb-search :is(.vb-search-t, .prop-tag, .vb-kbd) { display: none; }
  }
  @container vb-top (max-width: 1334px) {
    .vb-top:lang(fr) .vb-search { inline-size: 44px; padding-inline: 0; justify-content: center; }
    .vb-top:lang(fr) .vb-search :is(.vb-search-t, .prop-tag, .vb-kbd) { display: none; }
  }
  /* Colonne étroite en français et en anglais : l'étiquette du magasin part aussi, le contrôle reste désactivé. */
  @container vb-top (max-width: 1139px) {
    .vb-top:is(:lang(fr), :lang(en)) .vb-store .prop-tag { display: none; }
  }
}
@media (min-width: 1600px) {
  /* Le nom du profil apparaît à 1600 : en français, il faut plus de place pour garder la recherche complète. */
  @container vb-top (max-width: 1419px) {
    .vb-top:lang(fr) .vb-search { inline-size: 44px; padding-inline: 0; justify-content: center; }
    .vb-top:lang(fr) .vb-search :is(.vb-search-t, .prop-tag, .vb-kbd) { display: none; }
  }
}
/* N29-END */
