:root {
  --bg: #0c0e12;
  --bg-elevated: #13161d;
  --bg-hover: #1a1e28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #8b92a8;
  --accent: #5b8def;
  --accent-hover: #7aa3f5;
  --success: #3dd68c;
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.auth-boot {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-boot[hidden] {
  display: none !important;
}

.auth-boot__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 100% 65% at 50% -18%, rgba(91, 141, 239, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 80%, rgba(139, 92, 246, 0.1), transparent 50%),
    #0e1219;
}

.login-screen[hidden] {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
  background: linear-gradient(165deg, #283044 0%, #1e2536 48%, #1a2030 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(91, 141, 239, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.login-card__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.login-card__title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #f2f5fb;
}

.login-card__subtitle {
  font-size: 0.82rem;
  color: #b4bccf;
}

.login-card__lede {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form--login {
  gap: 1rem;
}

.form--login .form__actions {
  margin-top: 0.25rem;
}

.form__actions--settings {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.form--login .btn--primary {
  width: 100%;
}

.login-bypass-hint {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.login-bypass-hint[hidden],
.login-bypass-actions[hidden] {
  display: none !important;
}

.login-bypass-actions {
  margin-top: 0.75rem;
  justify-content: center;
}

.login-card__footer {
  margin: 1.35rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(148, 156, 175, 0.85);
  text-align: center;
}

.login-forgot {
  margin: 0.5rem 0 0;
  text-align: center;
}

.form--login .login-forgot {
  margin-top: 0.65rem;
}

.login-forgot[hidden] {
  display: none !important;
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover {
  color: var(--accent-hover);
}

.login-dialog {
  padding: 0;
  border: none;
  max-width: calc(100vw - 2rem);
  width: min(520px, 100%);
  background: transparent;
}

.login-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
}

.login-dialog::backdrop {
  background: rgba(6, 8, 14, 0.78);
  backdrop-filter: blur(4px);
}

.login-dialog__card {
  padding: 1.75rem 1.5rem;
  background: linear-gradient(165deg, #2a3348 0%, #222a3c 45%, #1c2434 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(91, 141, 239, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

.login-dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2f5fb;
}

.login-dialog__lede {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #c2cad8;
  line-height: 1.55;
}

.login-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.employes-message-dialog {
  width: min(22rem, calc(100vw - 2rem));
}

.employes-message-dialog__card {
  padding: 1.05rem 1rem;
  background: linear-gradient(155deg, #1a2f57 0%, #1a3669 45%, #13294f 100%);
  border-color: rgba(147, 197, 253, 0.5);
  box-shadow:
    0 30px 80px rgba(2, 8, 23, 0.55),
    0 0 0 1px rgba(147, 197, 253, 0.25) inset;
  text-align: center;
}

.employes-message-dialog .login-dialog__title {
  color: #eff6ff;
  margin-bottom: 0.35rem;
}

.employes-message-dialog .login-dialog__lede {
  color: #dbeafe;
  margin-bottom: 0;
  font-size: 0.82rem;
  line-height: 1.38;
}

.employes-message-dialog__actions {
  justify-content: center;
  margin-top: 0.8rem;
}

/* Fenêtre large pour lire calcul + boîtes + suite transporteur. */
.packaging-preview-dialog.login-dialog {
  width: min(68rem, calc(100vw - 1.25rem));
  max-width: calc(100vw - 1.25rem);
}

.packaging-preview-dialog__card {
  max-width: none;
  width: 100%;
}

.packaging-preview-dialog .login-dialog__title {
  font-size: 1.2rem;
}

.packaging-preview-dialog__pre {
  margin: 0;
  padding: 1rem 1.15rem;
  max-height: min(80vh, 50rem);
  overflow: auto;
  font-size: 0.9rem;
  line-height: 1.52;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 16, 0.72);
  color: #e8ecf6;
}

.login-card .field__label,
.login-dialog .field__label {
  color: #d0d6e4;
}

.login-card .field input,
.login-dialog .field input {
  background: #12161f;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f4f6fa;
}

.login-card .field input::placeholder,
.login-dialog .field input::placeholder {
  color: #7a8499;
}

.login-card .field input:focus,
.login-dialog .field input:focus {
  border-color: rgba(122, 163, 245, 0.75);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.22);
}

.login-dialog .alert--error {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
  color: #ffe8ea;
}

.login-dialog .alert--success {
  background: rgba(61, 214, 140, 0.16);
  border-color: rgba(61, 214, 140, 0.4);
  color: #d1fae5;
}

/* Nouvelle collection / Nouvelle balise — titre plus grand ; carte simple (sans inventory-sync) pour éviter calques qui bloquent la saisie. */
.canica-product-unsaved-dialog .canica-product-unsaved-dialog__card {
  max-width: 26.5rem;
}

.canica-product-unsaved-dialog .canica-product-unsaved-dialog__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.canica-product-unsaved-dialog .canica-product-unsaved-dialog__lede {
  margin-top: 0.35rem;
  line-height: 1.45;
}

.canica-product-unsaved-dialog .canica-product-unsaved-dialog__actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.canica-product-unsaved-dialog .btn--danger-ghost {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.canica-product-unsaved-dialog .btn--danger-ghost:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.75);
  color: #fff;
  background: rgba(127, 29, 29, 0.25);
}

.login-dialog.canica-catalog-dialog {
  width: min(480px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
}

.login-dialog.canica-catalog-dialog .login-dialog__title {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.login-dialog.canica-catalog-dialog .login-dialog__card .field input[type='text'] {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

/* Fenêtre Options (produits Canica) — taille moyenne, carte bleue comme le reste Maestro. */
.login-dialog.canica-options-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
}

.login-dialog.canica-options-dialog .login-dialog__title {
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
}

.canica-options-dialog__inline-error {
  margin: -0.35rem 0 0.75rem;
  padding: 0.5rem 0.62rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.38);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 8px;
}

.login-dialog.canica-options-dialog .canica-options-dialog__card {
  position: relative;
  overflow: hidden;
}

.login-dialog.canica-options-dialog .canica-options-dialog__card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 70% at 12% 0%, rgba(59, 130, 246, 0.22), transparent 52%),
    radial-gradient(90% 55% at 100% 100%, rgba(14, 165, 233, 0.12), transparent 50%);
  opacity: 1;
}

.login-dialog.canica-options-dialog .canica-options-dialog__card > * {
  position: relative;
  z-index: 1;
}

.canica-options-dialog__valeurs-field {
  margin-top: 0.15rem;
}

.canica-options-dialog__valeurs-rows {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  width: 100%;
  max-height: calc((1.9rem * 6) + (0.38rem * 5));
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.18rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 197, 253, 0.58) rgba(15, 23, 42, 0.35);
}

.canica-options-dialog__valeurs-rows::-webkit-scrollbar {
  width: 8px;
}

.canica-options-dialog__valeurs-rows::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

.canica-options-dialog__valeurs-rows::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(147, 197, 253, 0.72), rgba(96, 165, 250, 0.62));
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.5);
}

.canica-options-dialog__valeurs-rows::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.9), rgba(125, 211, 252, 0.8));
}

.canica-options-dialog__valeurs-rows .canica-options-dialog__valeur-row {
  margin: 0;
  position: relative;
}

.canica-options-dialog__valeurs-rows .canica-options-dialog__valeur-row input {
  width: 100%;
  padding-right: 2.15rem;
}

.canica-options-dialog__valeur-delete {
  position: absolute;
  right: 0.32rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.18);
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  z-index: 2;
  pointer-events: auto;
}

.canica-options-dialog__valeur-delete:hover {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(127, 29, 29, 0.32);
  color: #fff;
}

.canica-options-dialog__existing-field {
  margin-top: 0.55rem;
}

.canica-options-dialog__existing {
  max-height: min(28vh, 220px);
  overflow: auto;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #e2e8f0;
  text-align: left;
}

.canica-options-dialog__existing-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.canica-options-dialog__existing-nom {
  font-weight: 600;
  color: #f8fafc;
}

.canica-options-dialog__actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}

.canica-options-dialog__actions #btn-dialog-canica-options-supprimer,
.canica-options-dialog__actions #btn-dialog-canica-variant-delete {
  margin-right: auto;
}

.view--produits-articles #form-canica-product .ship-form-row--canica-options-variantes .btn.canica-collections-new-btn {
  white-space: nowrap;
  justify-self: stretch;
  align-self: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  padding: 0.4rem 0.78rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.2);
  color: #e8f4ff;
  border: 1px solid rgba(147, 197, 253, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.28);
}

.view--produits-articles #form-canica-product .ship-form-row--canica-options-variantes .btn.canica-collections-new-btn:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.34);
  color: #f8fafc;
  border-color: rgba(186, 230, 253, 0.78);
}

.view--produits-articles #btn-canica-product-options {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.view--produits-articles #btn-canica-product-options .canica-options-btn__label {
  min-width: 0;
}

.view--produits-articles #btn-canica-product-options .canica-options-btn__icon {
  margin-left: auto;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.78);
  background: rgba(125, 211, 252, 0.16);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  opacity: 1;
}

.view--produits-articles #btn-canica-collection-new,
.view--produits-articles #btn-canica-tag-new {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.view--produits-articles .canica-plus-btn__label {
  min-width: 0;
}

.view--produits-articles .canica-plus-btn__icon {
  margin-left: auto;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.78);
  background: rgba(125, 211, 252, 0.16);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  opacity: 1;
}

.inventory-sync-dialog {
  width: min(480px, 100%);
}

.inventory-sync-dialog__card {
  position: relative;
  overflow: hidden;
}

.inventory-sync-dialog__card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 10% 0%, rgba(91, 141, 239, 0.22), transparent 55%);
  opacity: 0.9;
}

.inventory-sync-dialog__card > * {
  position: relative;
  z-index: 1;
}

.inventory-sync-dialog__code {
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
  font-size: 0.9rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8ecf6;
}

.inventory-sync-dialog__progress {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: rgba(91, 141, 239, 0.14);
  border: 1px solid rgba(91, 141, 239, 0.32);
  border-radius: 10px;
}

.inventory-sync-dialog__progress-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #dce4f5;
}

.inv-consult-delete-dialog.login-dialog.inventory-sync-dialog {
  width: min(24rem, calc(100vw - 2rem));
}

.inv-consult-delete-dialog__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a5b4fc;
}

.inv-consult-delete-dialog .login-dialog__title {
  margin-bottom: 0.45rem;
}

.inv-consult-delete-dialog__note {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(15, 23, 42, 0.35));
  color: #e8ecf6;
}

.inv-submit-confirm-body {
  margin: 0 0 1rem;
  max-height: min(40vh, 16rem);
  overflow: auto;
}

.inv-submit-confirm-table-wrap {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  background: rgba(4, 6, 12, 0.55);
}

.inv-submit-confirm-table {
  width: 100%;
  margin: 0;
  font-size: 0.84rem;
  color: #e8ecf6;
}

.inv-submit-confirm-table th,
.inv-submit-confirm-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Spécificité > `.table thead th { padding: 0 }` (défini plus bas dans la feuille). */
.table.inv-submit-confirm-table thead th {
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  color: #f2f5fb;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: middle;
  text-align: left;
}

.table.inv-submit-confirm-table thead th:last-child {
  text-align: right;
}

.inv-submit-confirm-table tbody td {
  color: #e8ecf6;
  background: rgba(255, 255, 255, 0.03);
}

.inv-submit-confirm-table tbody tr:hover td {
  background: rgba(91, 141, 239, 0.14);
  color: #ffffff;
}

.inv-submit-confirm-table tbody tr:last-child td {
  border-bottom: none;
}

.inv-submit-confirm-table__product {
  max-width: 14rem;
  word-break: break-word;
  color: #e8ecf6;
}

.inv-submit-confirm-table__qty {
  text-align: right;
  white-space: nowrap;
  width: 3.75rem;
  font-variant-numeric: tabular-nums;
  color: #dbe4f8;
  font-weight: 600;
}

.inv-submit-confirm-body .muted {
  color: #aeb8cc;
}

.inv-submit-confirm-total {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #f0f4fc;
  font-weight: 500;
}

.inv-submit-confirm-total strong {
  color: #ffffff;
  font-weight: 700;
}

/* Modal impression — style « Imprimer » Office : réglages + aperçu */
.print-labels-dialog {
  padding: 0;
  border: none;
  max-width: calc(100vw - 1.25rem);
  width: min(52rem, 100%);
  background: transparent;
}

.print-labels-dialog::backdrop {
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(8px) saturate(1.15);
}

@keyframes print-labels-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.print-labels-dialog__surface {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  animation: print-labels-dialog-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .print-labels-dialog__surface {
    animation: none;
  }
}

.print-labels-dialog__surface--office {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-height: min(90vh, 640px);
  background: #fff;
  color: #323130;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.print-labels-dialog__surface--office::before {
  display: none;
}

.print-labels-dialog__accent-rail {
  width: 5px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #185abd 0%, #106ebe 42%, #004578 100%);
}

.print-labels-dialog__office-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.print-labels-dialog__titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #edebe9;
}

.print-labels-dialog__titlebar-left {
  min-width: 0;
}

.print-labels-dialog__office-heading {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #323130;
}

.print-labels-dialog__office-lede {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #605e5c;
  line-height: 1.35;
}

.print-labels-dialog__titlebar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.print-labels-dialog__product-chip {
  max-width: 14rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #323130;
  background: #f3f2f1;
  border: 1px solid #edebe9;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-labels-dialog__btn-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  font-size: 1.35rem;
  line-height: 1;
  color: #605e5c;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.print-labels-dialog__btn-dismiss:hover {
  background: #f3f2f1;
  color: #201f1e;
}

.print-labels-dialog__work {
  display: grid;
  grid-template-columns: minmax(15.5rem, 19rem) 1fr;
  flex: 1;
  min-height: 0;
}

@media (max-width: 720px) {
  .print-labels-dialog__work {
    grid-template-columns: 1fr;
    max-height: 70vh;
    overflow-y: auto;
  }
}

.print-labels-dialog__settings {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem 0.65rem;
  background: #f3f2f1;
  border-right: 1px solid #edebe9;
}

@media (max-width: 720px) {
  .print-labels-dialog__settings {
    border-right: none;
    border-bottom: 1px solid #edebe9;
  }
}

.print-labels-dialog__hero-print {
  margin-bottom: 0.85rem;
}

.print-labels-dialog__big-print-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0.4rem;
  border: 1px solid #106ebe;
  border-radius: 6px;
  background: linear-gradient(180deg, #2b88d8 0%, #185abd 55%, #004578 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: filter 0.15s, transform 0.1s;
}

.print-labels-dialog__big-print-btn:hover {
  filter: brightness(1.06);
}

.print-labels-dialog__big-print-btn:active {
  transform: scale(0.98);
}

.print-labels-dialog__big-print-icon {
  flex-shrink: 0;
}

.print-labels-dialog__big-print-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.print-labels-dialog__hero-hint {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #605e5c;
  max-width: 12rem;
}

.print-labels-dialog__params {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
}

.print-labels-dialog__param {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.5rem 0.55rem;
  background: #fff;
  border: 1px solid #edebe9;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.print-labels-dialog__param--readonly {
  background: #faf9f8;
}

.print-labels-dialog__param-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.12rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  color: #fff;
  background: #605e5c;
}

.print-labels-dialog__param-icon--price {
  background: linear-gradient(135deg, #185abd, #2b88d8);
}

.print-labels-dialog__param-icon--product {
  background: linear-gradient(135deg, #5c2d91, #8764b8);
}

.print-labels-dialog__param-icon--paper {
  background: #605e5c;
  font-size: 0.7rem;
}

.print-labels-dialog__param-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.print-labels-dialog__param-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #323130;
}

.print-labels-dialog__param-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}

.print-labels-dialog__param-sublabel {
  font-size: 0.68rem;
  color: #605e5c;
}

.print-labels-dialog__office-input {
  width: 100%;
  max-width: 5.5rem;
  padding: 0.38rem 0.45rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #201f1e;
  background: #fff;
  border: 1px solid #8a8886;
  border-radius: 2px;
}

.print-labels-dialog__office-input:focus {
  outline: none;
  border-color: #185abd;
  box-shadow: 0 0 0 1px #185abd;
}

.print-labels-dialog__param-value {
  font-size: 0.76rem;
  font-weight: 600;
  color: #323130;
}

.print-labels-dialog__settings-footer {
  margin-top: auto;
  padding-top: 0.65rem;
}

.print-labels-dialog__link-quit {
  padding: 0.25rem 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #185abd;
  text-decoration: underline;
  cursor: pointer;
}

.print-labels-dialog__link-quit:hover {
  color: #004578;
}

.print-labels-dialog__preview-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #e1dfdd;
}

.print-labels-dialog__preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  background: #f3f2f1;
  border-bottom: 1px solid #d2d0ce;
}

.print-labels-dialog__preview-toolbar-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #323130;
}

.print-labels-dialog__preview-toolbar-meta {
  font-size: 0.68rem;
  color: #605e5c;
}

.print-labels-dialog__preview-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.85rem;
  min-height: 200px;
}

.print-labels-dialog__preview-paper {
  width: 100%;
  max-width: 22rem;
  padding: 0.65rem;
  background: #c8c6c4;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.print-labels-dialog__preview-label {
  position: relative;
  aspect-ratio: 2 / 1;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #a19f9d;
  border-radius: 0.35rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  container-type: size;
  container-name: preview-label;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.print-labels-dialog__preview-label-stack {
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-height: calc(100% - 0.56rem);
  width: calc(100% - 0.84rem);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  gap: 0.12rem;
  overflow: hidden;
}

.print-labels-dialog__preview-line {
  width: 100%;
  color: #000;
  line-height: 1.2;
}

.print-labels-dialog__preview-line--title {
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: clamp(1rem, min(4.2vw, 11.5cqh), 1.35rem);
  font-weight: 400;
  max-height: 1.35em;
  overflow: hidden;
  display: block;
  white-space: nowrap;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

.print-labels-dialog__preview-line--title .label-title-line {
  display: inline;
  white-space: nowrap;
}

.print-labels-dialog__preview-line--spec {
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: clamp(0.78rem, min(2.7vw, 8cqh), 0.98rem);
  font-weight: 400;
  line-height: 1.2;
  max-height: 2.75em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.print-labels-dialog__preview-line--attr {
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: clamp(0.78rem, min(2.7vw, 8cqh), 0.98rem);
  font-weight: 400;
  color: #111;
  line-height: 1.2;
  max-width: 100%;
  max-height: 2.75em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.print-labels-dialog__preview-line--variant {
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: clamp(0.78rem, min(2.7vw, 8cqh), 0.98rem);
  font-weight: 400;
  color: #111;
  line-height: 1.2;
  max-width: 100%;
  max-height: 2.75em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.print-labels-dialog__preview-barcode-wrap {
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.print-labels-dialog__preview-barcode-wrap svg {
  width: 88%;
  max-width: 88%;
  min-width: 0;
  height: auto;
  max-height: 6.25rem;
  max-height: min(6.25rem, 48cqh);
}

.print-labels-dialog__preview-foot {
  margin: 0;
  padding: 0.4rem 0.75rem 0.55rem;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #605e5c;
  background: #e1dfdd;
  border-top: 1px solid #d2d0ce;
}

.field .password-field {
  position: relative;
  width: 100%;
}

.field .password-field input {
  width: 100%;
  padding-right: 2.75rem;
}

.password-field__toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-field__toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.password-field__toggle:focus {
  outline: none;
}

.password-field__toggle:focus-visible {
  outline: 2px solid rgba(91, 141, 239, 0.65);
  outline-offset: 2px;
}

.login-card .password-field__toggle,
.login-dialog .password-field__toggle {
  color: #8b95aa;
}

.login-card .password-field__toggle:hover,
.login-dialog .password-field__toggle:hover {
  color: #d0d6e4;
  background: rgba(255, 255, 255, 0.08);
}

.reset-success-dialog .login-dialog__card {
  text-align: center;
}

.reset-success-dialog__lead {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #86efac;
  line-height: 1.5;
}

.reset-success-dialog__redirect {
  margin: 0;
  font-size: 0.9rem;
  color: #c2cad8;
  line-height: 1.55;
}

.btn--sidebar-logout {
  width: 100%;
  justify-content: center;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  min-height: 100%;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 1.75rem 1.25rem;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #10131a 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 0.35rem;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.sidebar__brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__brand:focus-visible {
  outline: 2px solid rgba(91, 141, 239, 0.65);
  outline-offset: 2px;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  color: #fff;
}

.sidebar__title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sidebar__company {
  margin: 0.2rem 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.sidebar__company[hidden] {
  display: none !important;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav__item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav__item--active {
  background: rgba(91, 141, 239, 0.12);
  color: var(--accent-hover);
}

.nav__icon {
  opacity: 0.85;
  font-size: 1rem;
}

.nav__group {
  border-radius: var(--radius-sm);
}

.nav__group-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1rem;
  list-style: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.nav__group-summary::-webkit-details-marker {
  display: none;
}

.nav__group-summary::marker {
  content: '';
}

.nav__group-summary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav__group--active > .nav__group-summary {
  color: var(--accent-hover);
}

.nav__chevron {
  margin-left: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.65;
  transition: transform 0.2s;
}

.nav__group[open] .nav__chevron {
  transform: rotate(45deg);
  margin-top: 0.15rem;
}

.nav__sub {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.15rem 0 0.35rem 0.35rem;
  margin-left: 0.5rem;
  border-left: 2px solid var(--border);
}

.nav__sub-heading {
  margin: 0.4rem 0 0.1rem 1rem;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  line-height: 1.2;
}

.nav__item--sub {
  padding: 0.55rem 0.85rem 0.55rem 1rem;
  font-size: 0.94rem;
}

.nav__item--sub .nav__item-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 1.35;
}

.nav__item-count {
  flex-shrink: 0;
  margin-left: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.sidebar__hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 0 0.35rem;
}

.sidebar__nav-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* Souris : menu latéral réduit (bandeau) puis pleine largeur au survol — écrans larges uniquement */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .app .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.25rem;
    max-height: 100vh;
    overflow: hidden;
    z-index: 100;
    transition:
      width 0.22s ease,
      box-shadow 0.22s ease;
    box-sizing: border-box;
  }

  .app .sidebar:hover,
  .app .sidebar:focus-within {
    width: 260px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  .app .main {
    margin-left: 3.25rem;
    transition: margin-left 0.22s ease;
  }

  .sidebar:not(:hover):not(:focus-within) .sidebar__brand > div {
    display: none;
  }

  .sidebar:not(:hover):not(:focus-within) .sidebar__nav-label,
  .sidebar:not(:hover):not(:focus-within) .nav__item-text,
  .sidebar:not(:hover):not(:focus-within) .nav__item-count {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .sidebar:not(:hover):not(:focus-within) .nav__chevron {
    display: none;
  }

  .sidebar:not(:hover):not(:focus-within) .nav__sub {
    display: none !important;
  }

  .sidebar:not(:hover):not(:focus-within) .nav__group-summary,
  .sidebar:not(:hover):not(:focus-within) .nav__item:not(.nav__item--sub) {
    justify-content: center;
    gap: 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .sidebar:not(:hover):not(:focus-within) .nav {
    pointer-events: none;
  }

  .sidebar:hover .nav,
  .sidebar:focus-within .nav {
    pointer-events: auto;
  }

  .sidebar__brand {
    pointer-events: auto;
  }

  .sidebar:not(:hover):not(:focus-within) .sidebar__footer {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    gap: 0;
  }

  .sidebar:hover .sidebar__footer,
  .sidebar:focus-within .sidebar__footer {
    opacity: 1;
    height: auto;
    overflow: visible;
    margin-top: auto;
    padding-top: 0.5rem;
    gap: 0.75rem;
  }
}

.main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 3rem;
  overflow: auto;
  position: relative;
}

.view {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
}

.view--home {
  max-width: none;
  margin: 0;
}

.view--active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.view--home.view--active {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-height: calc(100vh - 9rem);
  padding: 1rem 1rem 1rem 1rem;
  box-sizing: border-box;
  width: 100%;
}

/* Logo centré dans l’espace restant ; Maestro à droite. */
.view-home__stage {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem 0 0;
}

.view-home__maestro-rail {
  --maestro-w: clamp(4.75rem, 9vw, 7.5rem);
  --maestro-surface: #13151d;
  position: relative;
  flex: 0 0 var(--maestro-w);
  width: var(--maestro-w);
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  background: linear-gradient(
    90deg,
    rgba(6, 7, 10, 0) 0%,
    rgba(12, 14, 20, 0.38) 22%,
    rgba(16, 18, 26, 0.55) 55%,
    rgba(14, 16, 22, 0.62) 100%
  );
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 8px 0 24px -6px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    -12px 0 28px -8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.view-home__maestro-rail:hover {
  background: linear-gradient(
    90deg,
    rgba(6, 7, 10, 0) 0%,
    rgba(14, 16, 22, 0.48) 30%,
    rgba(20, 22, 32, 0.62) 100%
  );
  box-shadow:
    inset 8px 0 28px -6px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    -14px 0 32px -8px rgba(0, 0, 0, 0.4);
}

.view-home__maestro-rail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: 100%;
  padding: 1rem 0.4rem 1.25rem 0.35rem;
  min-height: 0;
}

.view-home__conductor-wrap {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.25rem 0.25rem;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(34, 36, 48, 0.95) 0%, var(--maestro-surface) 100%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.view-home__conductor-img {
  display: block;
  width: 100%;
  max-width: 5.35rem;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}

.view-home__maestro-title {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  user-select: none;
}

.view-home__maestro-title-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(-0.02em, 0.2vh, 0.06em);
  font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  text-transform: uppercase;
}

.view-home__maestro-title-letter {
  display: block;
  font-family: inherit;
  font-size: clamp(1.95rem, min(7.5vh, 10vw), 3.35rem);
  font-weight: inherit;
  line-height: 0.92;
  letter-spacing: 0.06em;
  color: rgba(168, 178, 198, 0.58);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 0 20px rgba(148, 163, 184, 0.12);
}

.view-home__logo {
  max-width: min(819px, 96vw);
  max-height: min(585px, 82vh);
  width: auto;
  height: auto;
  object-fit: contain;
}

.view-home__logo[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.main__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.main__header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  align-self: center;
}

.main__header-actions--orders {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main__header-actions--produits {
  align-items: flex-start;
}

.main__header-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
}

.main__header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.main__lede {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
}

.view--produits-articles .main__header h1 {
  margin-bottom: 0.08rem;
}

.view--produits-articles .main__lede {
  margin-top: 0;
}

/* --- WOW layout: Produits (sans scroll vertical global) --- */
.view--produits-articles {
  height: auto;
  min-height: calc(100vh - 2.2rem);
  overflow: visible;
}

.view--produits-articles .main__header {
  margin-bottom: 0.25rem;
  gap: 0.55rem 1rem;
}

.view--produits-articles .main__header h1 {
  font-size: 1.38rem;
  letter-spacing: -0.02em;
}

.view--produits-articles .main__header h1 .canica-products-title-count {
  font-size: 0.68em;
  font-weight: 400;
  color: #7aa3f5;
}

.view--catalogue-print .panel--catalogue-print {
  max-width: 980px;
  margin: 0 auto;
}

.form--catalogue-print .field--grow {
  flex: 1 1 auto;
}

.form-catalogue-print__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
}

.form-catalogue-print__checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-catalogue-print__stats {
  margin: 0 0 0 auto;
  align-self: center;
}

.view--produits-articles .main__lede {
  font-size: 0.84rem;
  opacity: 0.9;
}

.view--produits-articles .ship-hub__layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0.7rem;
  height: auto;
  min-height: calc(100vh - 7.8rem);
}

.view--produits-articles .ship-hub__sidebar {
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  max-height: none;
}

.view--produits-articles .ship-sidebar__toolbar {
  padding: 0.55rem 0.6rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.view--produits-articles #btn-canica-products-new {
  white-space: nowrap;
  width: 100%;
}

.view--produits-articles #canica-products-list {
  flex: 0 0 auto;
  min-height: 0;
  /* Encore plus de lignes : réserve minimale + lignes plus compactes. */
  max-height: calc(100vh - 3rem);
  max-height: min(calc(100vh - 3rem), calc(100dvh - 3rem));
  overflow: auto;
  padding: 0.12rem 0.25rem 0.35rem;
}

.view--produits-articles #canica-products-list .ship-list__item {
  padding: 0.28rem 0.45rem;
  margin-bottom: 0.2rem;
  border-radius: 9px;
}

.view--produits-articles #canica-products-list .ship-list__name {
  font-size: 0.78rem;
  line-height: 1.18;
}

.view--produits-articles #canica-products-list .ship-list__sub {
  margin-top: 0.04rem;
  font-size: 0.66rem;
  line-height: 1.22;
}

.view--produits-articles #canica-products-list .ship-list__badges {
  margin-top: 0.16rem;
  gap: 0.22rem;
}

.view--produits-articles #canica-products-list .ship-list__pill {
  padding: 0.06rem 0.34rem;
  font-size: 0.58rem;
}

.view--produits-articles .canica-products-clear-filter {
  align-self: flex-start;
  margin: 0.15rem 0.35rem 0.45rem;
}

.view--produits-articles .ship-hub__main {
  overflow: visible;
  padding: 0.55rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 7.8rem);
}

.view--produits-articles #form-canica-product {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  /* La zone « mainrow » prend l’espace vertical restant pour agrandir la description. */
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "meta"
    "mainrow"
    "actions";
  gap: 0.48rem;
  overflow: visible;
  align-items: start;
}

.view--produits-articles #form-canica-product .canica-form-main-row {
  grid-area: mainrow;
  display: grid;
  grid-template-columns: 1.38fr 0.62fr;
  gap: 0 0.58rem;
  align-items: stretch;
  min-height: 0;
  min-width: 0;
}

.view--produits-articles #form-canica-product .canica-form-left-stack {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.view--produits-articles #form-canica-product > input[type='hidden'] {
  display: none;
}

.view--produits-articles #form-canica-product .ship-form__meta {
  grid-area: meta;
  margin-bottom: 0;
}

.view--produits-articles #form-canica-product .ship-form__meta--canica {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.view--produits-articles #form-canica-product .ship-form__meta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
}

/* Dupliquer dans la barre meta : même famille visuelle que Nouvelle collection / Nouvelle balise. */
.view--produits-articles #form-canica-product .btn--canica-dupe-meta {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  padding: 0.35rem 0.92rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  border-radius: 10px;
  min-height: 0;
  background: rgba(96, 165, 250, 0.2);
  color: #e8f4ff;
  border: 1px solid rgba(147, 197, 253, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.28);
}

.view--produits-articles #form-canica-product .btn--canica-dupe-meta:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.34);
  color: #f8fafc;
  border-color: rgba(186, 230, 253, 0.78);
}

.view--produits-articles #form-canica-product .btn--canica-dupe-meta:disabled {
  opacity: 0.52;
  color: rgba(224, 242, 254, 0.82);
  border-color: rgba(147, 197, 253, 0.35);
  box-shadow: none;
}

.view--produits-articles #form-canica-product .ship-form-row--canica-description-ia {
  grid-template-columns: minmax(0, 1fr);
}

.view--produits-articles #form-canica-product .ship-form-row--canica-description-ia-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.view--produits-articles #form-canica-product .btn--canica-description-ia {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 1rem;
  padding: 0.28rem 0.82rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.72);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.36), transparent 46%),
    linear-gradient(115deg, rgba(91, 33, 182, 0.92), rgba(79, 70, 229, 0.9) 46%, rgba(14, 116, 144, 0.88));
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 10px 28px rgba(76, 29, 149, 0.5),
    0 2px 14px rgba(56, 189, 248, 0.24);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.view--produits-articles #form-canica-product .btn--canica-description-ia::after {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 48%, transparent 85%);
  transform: translateX(-120%) rotate(10deg);
  transition: transform 0.85s cubic-bezier(0.2, 0.74, 0.3, 1);
  pointer-events: none;
}

.view--produits-articles #form-canica-product .btn--canica-description-ia:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.12) brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 14px 34px rgba(76, 29, 149, 0.58),
    0 2px 20px rgba(56, 189, 248, 0.34);
}

.view--produits-articles #form-canica-product .btn--canica-description-ia:hover:not(:disabled)::after {
  transform: translateX(110%) rotate(10deg);
}

.view--produits-articles #form-canica-product .btn--canica-description-ia:active:not(:disabled) {
  transform: translateY(0);
}

.view--produits-articles #form-canica-product .btn--canica-description-ia:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.view--produits-articles #form-canica-product .btn--canica-description-ia__icon {
  font-size: 0.86rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(250, 245, 255, 0.7));
  animation: canicaMagicSparkle 2.2s ease-in-out infinite;
}

@keyframes canicaMagicSparkle {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-1px) scale(1.08);
    opacity: 1;
  }
}

.view--produits-articles #form-canica-product .btn--canica-import-meta {
  flex: 0 0 auto;
  align-self: center;
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify.btn-sync {
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  font-size: 0.83rem;
  line-height: 1.25;
  min-height: 0;
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 4px 22px rgba(91, 141, 239, 0.45),
    0 10px 42px rgba(99, 102, 241, 0.2);
  transition: box-shadow 0.2s ease, transform 0.12s, filter 0.15s;
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify.btn-sync:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 6px 32px rgba(91, 141, 239, 0.58),
    0 14px 52px rgba(99, 102, 241, 0.28);
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify .btn-sync__lead {
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify .btn-sync__icon {
  width: 18px;
  height: 18px;
  display: block;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.view--produits-articles
  #form-canica-product
  #btn-canica-product-import-shopify
  .btn-sync__lead:has(#btn-canica-product-import-shopify-spinner:not([hidden]))
  .btn-sync__icon {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify .btn-sync__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
}

.view--produits-articles #form-canica-product #btn-canica-product-import-shopify .btn-sync__label {
  white-space: nowrap;
}

.view--produits-articles #form-canica-product > .ship-form__actions--canica {
  justify-content: flex-start;
}

/* Ligne Titre + Statut : le titre occupe l’espace restant, le statut reste compact. */
.view--produits-articles
  #form-canica-product
  .canica-form-left-stack
  > .form-compagnie__fieldset:first-of-type
  > .form-compagnie__row.ship-form-row:first-of-type {
  /* Statut : libellés courts (Brouillon / Actif / Archive) — colonne resserrée. */
  grid-template-columns: minmax(0, 1fr) minmax(5.75rem, 7.15rem);
}

.view--produits-articles #form-canica-product > .ship-form__actions--canica #btn-canica-product-save {
  width: fit-content;
  flex: 0 0 auto;
  padding-inline: 1rem;
}

.view--produits-articles #form-canica-product > .ship-form__actions--canica .btn--canica-delete-end {
  margin-left: auto;
}

/* Colonne droite : même hauteur que la gauche (stretch) pour que la description puisse s’étirer. */
.view--produits-articles #form-canica-product .canica-form-main-row > .canica-form-right-stack {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

/* Même « cadre » que les autres fieldsets du formulaire (aligné colonne gauche). */
.view--produits-articles #form-canica-product .canica-form-main-row > .canica-form-right-stack > .form-compagnie__fieldset {
  flex: 0 0 auto;
  padding: 0.42rem 0.48rem;
  min-height: 0;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Organisation du produit — pile verticale: bouton au-dessus du menu correspondant. */
.view--produits-articles .canica-org-product-shared {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  width: 100%;
  margin-bottom: 0.45rem;
}

.view--produits-articles .canica-org-product-shared > .canica-org-product-chips-span {
  width: 100%;
}

.view--produits-articles .canica-org-product-shared > .canica-collections-dropdown {
  position: relative;
  z-index: 2;
  min-width: 0;
  margin-bottom: 0;
}

.view--produits-articles .canica-org-product-shared > .canica-collections-actions {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  margin-bottom: 0.05rem;
}

.view--produits-articles #form-canica-product .canica-org-product-shared > .btn.canica-collections-new-btn,
.view--produits-articles #form-canica-product .canica-org-product-shared > .canica-collections-actions > .btn.canica-collections-new-btn,
.view--produits-articles #form-canica-product .canica-org-product-shared > .canica-collections-actions > .btn.canica-collections-sync-btn {
  white-space: nowrap;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  padding: 0.4rem 0.78rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.2);
  color: #e8f4ff;
  border: 1px solid rgba(147, 197, 253, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.28);
}

.view--produits-articles #form-canica-product .canica-org-product-shared > .btn.canica-collections-new-btn:hover:not(:disabled),
.view--produits-articles #form-canica-product .canica-org-product-shared > .canica-collections-actions > .btn.canica-collections-new-btn:hover:not(:disabled),
.view--produits-articles #form-canica-product .canica-org-product-shared > .canica-collections-actions > .btn.canica-collections-sync-btn:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.34);
  color: #f8fafc;
  border-color: rgba(186, 230, 253, 0.78);
}

.view--produits-articles #canica-tags-dropdown {
  z-index: 3;
}

.view--produits-articles #canica-collections-chips.canica-org-product-chips-span {
  margin-bottom: 0.25rem;
}

.view--produits-articles .canica-collections-dropdown__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}

.view--produits-articles .canica-collections-dropdown__summary::-webkit-details-marker {
  display: none;
}

.view--produits-articles .canica-collections-dropdown__summary::after {
  content: '';
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(248, 250, 252, 0.55);
  transition: transform 0.15s ease;
}

.view--produits-articles .canica-collections-dropdown[open] .canica-collections-dropdown__summary::after {
  transform: rotate(180deg);
}

.view--produits-articles .canica-collections-dropdown__panel {
  margin-top: 0.28rem;
  padding: 0.4rem 0.45rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.view--produits-articles .canica-collections-tags {
  min-height: 1.35rem;
  margin-top: 0.12rem;
}

.view--produits-articles .canica-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-height: 1.35rem;
  align-items: center;
}

.view--produits-articles .canica-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  padding: 0.12rem 0.28rem 0.12rem 0.42rem;
  font-size: 0.78rem;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.view--produits-articles .canica-chip__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.view--produits-articles .canica-chip__x {
  flex-shrink: 0;
  margin: 0;
  padding: 0 0.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.view--produits-articles .canica-chip__x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.view--produits-articles .canica-chip--option-tag {
  border: 1px solid rgba(74, 222, 128, 0.62);
  background: rgba(34, 197, 94, 0.2);
  color: #dcfce7;
  cursor: pointer;
}

.view--produits-articles .canica-chip--option-tag:hover {
  background: rgba(34, 197, 94, 0.32);
  border-color: rgba(134, 239, 172, 0.85);
}

.view--produits-articles .canica-option-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  width: 100%;
}

.view--produits-articles .canica-option-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.view--produits-articles .canica-option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  width: 100%;
  padding-left: 0.08rem;
}

.view--produits-articles .canica-chip--option-value {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.7);
  color: #dbeafe;
  cursor: default;
}

.view--produits-articles .canica-option-values__empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.view--produits-articles #canica-product-options-chips {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.38rem;
  margin-top: 0.35rem;
}

.view--produits-articles .canica-option-slot {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.38rem 0.42rem;
  background: rgba(2, 6, 23, 0.36);
  min-height: 2.25rem;
}

.view--produits-articles .canica-option-slot--empty {
  display: flex;
  align-items: center;
  border-style: dashed;
  background: rgba(2, 6, 23, 0.22);
}

.view--produits-articles .canica-option-slot__empty-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.82;
}

.view--produits-articles .canica-option-delete-btn {
  margin-left: auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.18);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
}

.view--produits-articles .canica-option-delete-btn:hover {
  background: rgba(153, 27, 27, 0.3);
  border-color: rgba(252, 165, 165, 0.72);
}

.view--produits-articles .canica-derived-variants-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.12rem;
}

.view--produits-articles .canica-derived-variant-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.38rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.3);
}

.view--produits-articles .canica-derived-variant-row__thumb {
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.view--produits-articles .canica-derived-variant-row__thumb:hover {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.32),
    0 0 0 1px rgba(96, 165, 250, 0.22);
}

.view--produits-articles .canica-derived-variant-row__thumb--empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.28);
}

.view--produits-articles .canica-derived-variant-row__thumb-wrap {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 0;
}

.view--produits-articles .canica-derived-variant-row__remove {
  position: absolute;
  top: 6px;
  right: 7px;
  z-index: 3;
  display: none;
}

.view--produits-articles .canica-derived-variant-row--has-photo .canica-derived-variant-row__remove {
  display: inline-flex;
}

.view--produits-articles .canica-derived-variant-row__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.view--produits-articles .canica-derived-variant-row__thumb-placeholder {
  line-height: 1;
  font-size: 1.45rem;
  font-weight: 700;
  color: #dbeafe;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.view--produits-articles .canica-derived-variant-row__label {
  font-size: 0.8rem;
  color: #dbeafe;
}

.view--produits-articles .canica-derived-variant-row__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.view--produits-articles #canica-derived-variants-persist-hint {
  margin: 0 0 0.5rem;
  max-width: 44rem;
}

/* Détail variante / photo : réservé au produit déjà enregistré (id Canica). Prix & quantité restent éditables. */
.view--produits-articles .canica-derived-variant-row--detail-locked .canica-derived-variant-row__thumb,
.view--produits-articles .canica-derived-variant-row--detail-locked .canica-derived-variant-row__remove {
  cursor: not-allowed;
  opacity: 0.72;
}

.view--produits-articles .canica-derived-variant-row--detail-locked .canica-derived-variant-row__label {
  cursor: not-allowed;
  opacity: 0.85;
}

.view--produits-articles .canica-derived-variant-row--detail-locked .canica-derived-variant-row__quick-field input {
  cursor: text;
  opacity: 1;
}

.view--produits-articles .canica-derived-variant-row__quick-fields {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.24rem;
  align-items: center;
  align-self: center;
  min-width: 0;
}

.view--produits-articles .canica-derived-variant-row__quick-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 66px;
  padding-top: 0;
  min-width: 0;
}

.view--produits-articles .canica-derived-variant-row__quick-field > span {
  position: absolute;
  top: 0.08rem;
  left: 0;
  font-size: 0.58rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.view--produits-articles .canica-derived-variant-row__quick-field > input {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  height: 1.2rem;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.46);
  color: #e2e8f0;
  padding: 0 0.24rem;
  font-size: 0.65rem;
}

.view--produits-articles .canica-derived-variant-row__delete-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1;
  position: relative;
  top: 0;
}

/* Priorite locale: neutralise les regles globales width:100% sur les inputs du formulaire. */
.view--produits-articles #form-canica-product input[data-canica-variant-inline-prix],
.view--produits-articles #form-canica-product input[data-canica-variant-inline-qty] {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
}

.canica-variant-details-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.65rem;
}

.canica-derived-variant-row__thumb--lg {
  width: 3.2rem;
  height: 3.2rem;
}

.canica-variant-details-head__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #eaf4ff;
}

.canica-variant-details-head__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.canica-variant-details-head__nav-btn {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(8, 33, 122, 0.8);
  background: linear-gradient(180deg, #14b8e0 0%, #0a2d9b 80%, #071a63 100%);
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(188, 244, 255, 0.45), 0 2px 6px rgba(2, 8, 23, 0.45);
  line-height: 1;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.canica-variant-details-head__nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(188, 244, 255, 0.5), 0 4px 10px rgba(2, 8, 23, 0.52);
}

.canica-variant-details-head__nav-btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow: inset 0 1px 2px rgba(7, 26, 99, 0.65), 0 1px 4px rgba(2, 8, 23, 0.4);
}

.canica-variant-details-head__nav-btn:disabled {
  opacity: 0.45;
  cursor: default;
  filter: saturate(0.45);
  box-shadow: inset 0 1px 0 rgba(188, 244, 255, 0.25), 0 1px 3px rgba(2, 8, 23, 0.25);
}

.canica-variant-details-head__nav-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
}

.canica-variant-details-head__nav-icon--left {
  border-right: 0.62rem solid #f8fbff;
  margin-left: -0.05rem;
}

.canica-variant-details-head__nav-icon--right {
  border-left: 0.62rem solid #f8fbff;
  margin-right: -0.05rem;
}

.canica-variant-details-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.48rem;
}

.canica-variant-details-body {
  margin-top: 0.2rem;
}

#dialog-canica-variant-details {
  width: min(700px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
}

#dialog-canica-variant-details .canica-variant-details-body > .ship-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

#dialog-canica-variant-details .canica-variant-details-body > .ship-form-row--dims {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#dialog-canica-variant-details .canica-variant-dim-longueur {
  grid-column: 1;
  grid-row: 1;
}

#dialog-canica-variant-details .canica-variant-dim-poids {
  grid-column: 1;
  grid-row: 2;
}

#dialog-canica-variant-details .canica-variant-dim-caract {
  grid-column: 1;
  grid-row: 3;
}

#dialog-canica-variant-details .canica-variant-dim-caract textarea {
  min-height: 2.5rem;
  resize: vertical;
}

#dialog-canica-variant-details .canica-variant-dim-largeur {
  grid-column: 2;
  grid-row: 1;
}

#dialog-canica-variant-details .canica-variant-dim-hauteur {
  grid-column: 3;
  grid-row: 1;
}

#dialog-canica-variant-details .canica-variant-details-head {
  padding: 0.4rem 0.42rem 0.42rem;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.28);
  margin: 0 0 0.46rem;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#dialog-canica-variant-details .canica-options-dialog__card {
  padding: 0.75rem 0.78rem 0.72rem;
}

#dialog-canica-variant-details .login-dialog__title {
  margin-bottom: 0;
  font-size: 1.06rem;
}

#dialog-canica-variant-details .canica-variant-details-title__product {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35), 0 0 2px rgba(249, 115, 22, 0.45);
}

#dialog-canica-variant-details .canica-variant-details-head__label {
  font-size: 0.86rem;
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg.canica-derived-variant-row__thumb--has-photo {
  border-style: solid;
  border-color: rgba(96, 165, 250, 0.55);
  background-color: transparent;
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg:not(.canica-derived-variant-row__thumb--has-photo) {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.28);
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg:hover {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.32),
    0 0 0 1px rgba(96, 165, 250, 0.22);
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg .canica-derived-variant-row__thumb-placeholder {
  font-size: 1.45rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg .canica-derived-variant-row__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#dialog-canica-variant-details .canica-derived-variant-row__thumb--lg .canica-derived-variant-row__thumb-img[hidden] {
  display: none !important;
}

#dialog-canica-variant-details .canica-variant-details-head__title {
  padding: 0 0.28rem;
  margin-left: 0.18rem;
  font-size: 0.72rem;
  color: #93c5fd;
  font-weight: 700;
  text-transform: uppercase;
}

#dialog-canica-variant-details .canica-variant-details-identifiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
  margin-bottom: 0.4rem;
}

#dialog-canica-variant-details .canica-variant-details-identifiers .field {
  min-width: 0;
}

#dialog-canica-variant-details #dialog-canica-variant-barcode-text {
  background: rgba(2, 6, 23, 0.38);
  color: #bfdbfe;
}

#dialog-canica-variant-details .canica-variant-photo-wrap {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 0;
}

#dialog-canica-variant-details .canica-variant-photo-remove {
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 4;
}

#dialog-canica-variant-details .canica-variant-photo-remove[hidden] {
  display: none !important;
}

#dialog-canica-variant-details .canica-variant-details-body {
  margin-top: 0.15rem;
  padding: 0.42rem 0.48rem 0.5rem;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.22);
}

#dialog-canica-variant-details .canica-variant-details-body > .field__label {
  font-size: 0.75rem;
  margin-bottom: 0.22rem;
}

#dialog-canica-variant-details .canica-variant-details-body > legend.field__label {
  padding: 0 0.28rem;
  margin-left: 0.18rem;
  color: #93c5fd;
  font-weight: 700;
  text-transform: uppercase;
}

#dialog-canica-variant-details .field {
  gap: 0.12rem;
}

#dialog-canica-variant-details .field .field__label {
  font-size: 0.72rem;
}

#dialog-canica-variant-details input:not([type='checkbox']):not([type='radio']),
#dialog-canica-variant-details select,
#dialog-canica-variant-details textarea {
  min-height: 2rem;
  height: 2rem;
  padding: 0.28rem 0.48rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

#dialog-canica-variant-details .login-dialog__actions {
  margin-top: 0.55rem;
  gap: 0.35rem;
}

#dialog-canica-variant-details .login-dialog__actions .btn {
  min-height: 1.9rem;
  padding: 0.28rem 0.78rem;
  font-size: 0.8rem;
}

.view--produits-articles .canica-collections-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  max-height: min(14rem, 36vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.2rem 0.15rem 0.2rem 0;
  margin-top: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.view--produits-articles .canica-collections-checklist__row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.18rem 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.view--produits-articles .canica-collections-checklist__row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.view--produits-articles .canica-collections-checklist__row input[type='checkbox'] {
  margin-top: 0.12rem;
  width: 1rem;
  min-width: 1rem;
  max-width: 1rem;
  height: 1rem;
  min-height: 1rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.view--produits-articles .canica-collections-checklist__label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.view--produits-articles .canica-collections-checklist__sub {
  font-size: 0.72rem;
}

/* Code-barre dépendant : sous les dimensions, pleine largeur dans le même fieldset. */
.view--produits-articles #form-canica-product .ship-form-row--canica-dependance-barcode {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0.15rem;
  padding-top: 0;
  border-top: 0;
}

.view--produits-articles .canica-field--dependance-barcode {
  margin-top: 0;
  padding-top: 0;
}

/* Code-barre produit + SKU : sous le code-barre dépendant, dans Prix et dimensions. */
.view--produits-articles #form-canica-product .ship-form-row--canica-primary-barcode-sku {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0.35rem;
  padding-top: 0.42rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view--produits-articles #form-canica-product .ship-form-row--canica-options-variantes {
  grid-template-columns: minmax(0, 1fr);
}

.view--produits-articles #form-canica-product .ship-form-row--canica-variantes-under-options {
  margin-top: 2.1rem;
}

.view--produits-articles #btn-canica-product-variantes {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.view--produits-articles #form-canica-product .canica-primary-code-sku {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
  gap: 0.55rem 1rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.view--produits-articles #form-canica-product .canica-primary-code-sku__barcode.field {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.view--produits-articles #form-canica-product #canica-product-barcode-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  letter-spacing: 0.06em;
  cursor: default;
}

.view--produits-articles #form-canica-product .canica-primary-code-sku__sku {
  margin: 0;
  min-width: 0;
}

@media (max-width: 720px) {
  .view--produits-articles #form-canica-product .canica-primary-code-sku {
    grid-template-columns: 1fr;
  }
}

.view--produits-articles #form-canica-product > .ship-form__actions {
  grid-area: actions;
  margin-top: 0;
  padding-top: 0.42rem;
}

.view--produits-articles #form-canica-product .form-compagnie__fieldset {
  padding: 0.42rem 0.48rem;
  margin: 0;
  border-radius: 10px;
}

.view--produits-articles #form-canica-product .form-compagnie__fieldset > .field__label,
.view--produits-articles #form-canica-product .form-compagnie__fieldset > legend.field__label {
  margin-bottom: 0.3rem;
  font-size: 0.66rem;
}

.view--produits-articles #form-canica-product .field {
  gap: 0.17rem;
}

/* Infos principales : aération titre → fournisseur → description (le formulaire s’allonge naturellement). */
.view--produits-articles
  #form-canica-product
  .canica-form-left-stack
  > fieldset.form-compagnie__fieldset:first-of-type
  > .ship-form-row:first-of-type {
  margin-bottom: 0.95rem;
}

.view--produits-articles
  #form-canica-product
  .canica-form-left-stack
  > fieldset.form-compagnie__fieldset:first-of-type
  > .ship-form-row:first-of-type
  + label.field {
  margin-bottom: 0.35rem;
}

.view--produits-articles
  #form-canica-product
  .canica-form-left-stack
  > fieldset.form-compagnie__fieldset:first-of-type {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.view--produits-articles
  #form-canica-product
  .canica-form-left-stack
  > fieldset.form-compagnie__fieldset:first-of-type
  > .field--canica-desc-rich {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 1.1rem;
}

.view--produits-articles #form-canica-product input:not([type='checkbox']):not([type='radio']),
.view--produits-articles #form-canica-product select,
.view--produits-articles #form-canica-product textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  font-size: 0.83rem;
  padding: 0.33rem 0.5rem;
}

.view--produits-articles .canica-desc-rich {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}

.view--produits-articles .canica-desc-rich__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  padding: 0.25rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.view--produits-articles .canica-desc-rich__btn {
  margin: 0;
  padding: 0.2rem 0.42rem;
  font-size: 0.78rem;
  line-height: 1.2;
  border-radius: 0.28rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  cursor: pointer;
}

.view--produits-articles .canica-desc-rich__btn:hover {
  border-color: rgba(96, 165, 250, 0.55);
  color: #f8fafc;
}

.view--produits-articles .canica-desc-rich__btn:active {
  transform: translateY(1px);
}

.view--produits-articles .canica-desc-rich__u {
  text-decoration: underline;
}

.view--produits-articles .canica-desc-rich__sep {
  display: inline-block;
  width: 1px;
  height: 1.1rem;
  margin: 0 0.12rem;
  background: rgba(148, 163, 184, 0.35);
}

.view--produits-articles .canica-desc-rich__editor {
  min-height: 86px;
  flex: 1 1 auto;
  overflow: auto;
  resize: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.4rem 0.55rem;
  font-size: 0.83rem;
  line-height: 1.45;
  border-radius: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: #f1f5f9;
}

.view--produits-articles .canica-desc-rich__editor:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}

.view--produits-articles .canica-desc-rich__editor p {
  margin: 0 0 0.35rem;
}

.view--produits-articles .canica-desc-rich__editor ul,
.view--produits-articles .canica-desc-rich__editor ol {
  margin: 0 0 0.35rem;
  padding-left: 1.25rem;
}

.view--produits-articles .canica-photos-gallery {
  --canica-photo-size: 66px;
  --canica-photo-gap: 0.32rem;
  --canica-visible-photo-count: 7;
  min-height: 70px;
  max-height: 70px;
  margin-bottom: 0;
  padding-bottom: 0;
}

.view--produits-articles .canica-photos-gallery__viewport {
  width: calc(
    var(--canica-visible-photo-count) * var(--canica-photo-size) +
      (var(--canica-visible-photo-count) - 1) * var(--canica-photo-gap)
  );
  max-width: calc(100% - 3.4rem);
  margin-inline: 0 auto;
}

.view--produits-articles .canica-photos-gallery__carousel {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--canica-photo-size);
}

.view--produits-articles .canica-photos-gallery__track {
  margin-inline: 0;
}

.view--produits-articles .canica-photos-gallery__nav {
  position: static;
  transform: none;
}

@media (max-height: 860px) {
  .view--produits-articles .ship-hub__layout {
    height: auto;
  }
  .view--produits-articles .canica-desc-rich__editor {
    min-height: 70px;
  }
  .view--produits-articles .canica-photos-gallery {
    --canica-photo-size: 60px;
  }
  .view--produits-articles .canica-derived-variant-row__thumb {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 1180px) {
  .view--produits-articles {
    height: auto;
    overflow: visible;
  }
  .view--produits-articles .ship-hub__layout {
    display: block;
    height: auto;
  }
  .view--produits-articles .ship-hub__sidebar,
  .view--produits-articles .ship-hub__main {
    height: auto;
  }
  .view--produits-articles #form-canica-product {
    display: block;
    height: auto;
  }
  .view--fournisseurs {
    height: auto;
    overflow: visible;
  }
  .view--fournisseurs .ship-hub__layout {
    display: block;
    height: auto;
  }
  .view--fournisseurs .ship-hub__sidebar,
  .view--fournisseurs .ship-hub__main {
    height: auto;
  }
}

.main__lede-note {
  margin: 0.55rem 0 0;
  max-width: 46rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 0.92;
}

.main__lede-note strong {
  font-weight: 600;
  color: var(--text);
  opacity: 0.95;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 141, 239, 0.35);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  white-space: pre-line;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.alert--error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.alert--success {
  background: rgba(61, 214, 140, 0.1);
  border: 1px solid rgba(61, 214, 140, 0.3);
  color: #a7f3d0;
}

.alert--info {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
}

/* Uniformisation UX: toutes les alertes visibles se présentent au centre écran. */
.alert:not([hidden]) {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
  width: min(92vw, 34rem);
  max-height: min(72vh, 560px);
  overflow: auto;
  margin: 0;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5);
}

/* Connexion: alerte inline, lisible, sans superposition au milieu de l'écran. */
#login-alert.alert:not([hidden]),
#forgot-alert.alert:not([hidden]) {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-height: none;
  overflow: visible;
  margin: 0 0 1rem;
  box-shadow: none;
  z-index: auto;
}


.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel--form {
  max-width: 520px;
  padding: 1.75rem;
}

.panel--form-compagnie {
  max-width: min(100%, 52rem);
}

/* -------------------------------------------------------------------------- */
/* Pages premium (Compagnie, Paramètres) — fond + hero partagés              */
/* -------------------------------------------------------------------------- */
.view--compagnie,
.view--settings {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.view--compagnie::before,
.view--settings::before {
  content: '';
  position: absolute;
  inset: -3rem -2rem -2rem;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 12% 0%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(ellipse 80% 55% at 92% 8%, rgba(236, 72, 153, 0.14), transparent 48%),
    radial-gradient(ellipse 60% 45% at 55% 100%, rgba(34, 211, 238, 0.1), transparent 52%);
  opacity: 1;
}

.view--compagnie .compagnie-page,
.view--settings .settings-page {
  position: relative;
  z-index: 1;
  max-width: min(92rem, 100%);
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.compagnie-hero,
.settings-hero {
  margin-bottom: 1.75rem;
  padding: 0.25rem 0 0.5rem;
  padding-left: clamp(0.75rem, 4vw, 3.25rem);
  max-width: 48rem;
}

.compagnie-hero__eyebrow,
.settings-hero__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.95);
}

.compagnie-hero__title,
.settings-hero__title {
  margin: 0 0 1.05rem;
  padding-bottom: 0.14em;
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  background: linear-gradient(118deg, #f8fafc 12%, #c7d2fe 38%, #a5b4fc 52%, #f472b6 88%, #fbcfe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 24px rgba(99, 102, 241, 0.25));
}

.compagnie-hero__lede,
.settings-hero__lede {
  margin: 0;
  max-width: 40rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.92);
}

.view--compagnie .compagnie-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.view--compagnie .compagnie-page__main {
  min-width: 0;
}

.view--compagnie .compagnie-glass-panel {
  max-width: none;
  width: 100%;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(24, 30, 48, 0.92) 0%, rgba(14, 18, 30, 0.88) 100%);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12) inset,
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.view--compagnie .compagnie-glass-panel:hover {
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.18) inset,
    0 28px 72px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(99, 102, 241, 0.12);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.view--compagnie .form--compagnie {
  gap: 1.35rem;
}

.view--compagnie .field--compagnie-cell .field__label,
.view--compagnie .form-compagnie__fieldset > .field__label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.88);
}

.view--compagnie .field--compagnie-cell input,
.view--compagnie .form-compagnie__fieldset input {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 14, 0.55);
  color: #f1f5f9;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.view--compagnie .field--compagnie-cell input:hover,
.view--compagnie .form-compagnie__fieldset input:hover {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(8, 10, 18, 0.65);
}

.view--compagnie .field--compagnie-cell input:focus,
.view--compagnie .form-compagnie__fieldset input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.35);
  background: rgba(10, 12, 22, 0.75);
}

.view--compagnie .form-compagnie__fieldset {
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.22), rgba(15, 23, 42, 0.35));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.view--compagnie .form-compagnie__fieldset > legend.field__label {
  color: #e0e7ff;
  font-weight: 700;
}

.view--compagnie .field.field--logo.form-compagnie__logo-block {
  padding: 1rem 1.15rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(244, 114, 182, 0.18);
  background: linear-gradient(135deg, rgba(131, 24, 67, 0.12), rgba(30, 27, 75, 0.2));
}

.view--compagnie .field.field--logo.form-compagnie__logo-block .field__label {
  color: #fce7f3;
}

.view--compagnie .field.field--logo.form-compagnie__logo-block .field__hint {
  color: rgba(251, 207, 232, 0.75);
}

.view--compagnie .compagnie-logo-preview-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
  box-shadow:
    0 0 0 1px rgba(244, 114, 182, 0.15) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.view--compagnie .compagnie-logo-preview {
  max-height: 132px;
}

.view--compagnie .form__actions--compagnie {
  margin-top: 1.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.view--compagnie .btn--compagnie-save {
  padding: 0.78rem 1.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  background: linear-gradient(118deg, #6366f1 0%, #7c3aed 38%, #db2777 100%);
  color: #fff;
  box-shadow:
    0 4px 20px rgba(99, 102, 241, 0.45),
    0 12px 40px rgba(219, 39, 119, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.22s ease;
}

.view--compagnie .btn--compagnie-save:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.07) saturate(1.05);
  box-shadow:
    0 8px 28px rgba(99, 102, 241, 0.55),
    0 16px 48px rgba(219, 39, 119, 0.3);
}

.view--compagnie .btn--compagnie-save:active:not(:disabled) {
  transform: translateY(0);
}

.view--compagnie .btn--compagnie-delete {
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.15);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.view--compagnie .btn--compagnie-delete:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.28);
  border-color: rgba(252, 165, 165, 0.55);
}

.premium-aside {
  position: relative;
  min-height: 12rem;
}

.premium-aside__orb {
  position: absolute;
  top: -1rem;
  right: -0.5rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(252, 211, 77, 0.35), rgba(236, 72, 153, 0.2) 45%, transparent 70%);
  filter: blur(2px);
  opacity: 0.85;
  pointer-events: none;
}

.premium-aside__card {
  position: relative;
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.55));
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.15) inset;
  overflow: hidden;
}

.premium-aside__shine {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 70%;
  height: 80%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.12), transparent 55%);
  transform: rotate(-18deg);
  pointer-events: none;
}

.premium-aside__title {
  position: relative;
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.premium-aside__text {
  position: relative;
  margin: 0 0 1rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.9);
}

.premium-aside__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.92);
}

.premium-aside__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.premium-aside__dot {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.65);
}

/* Page Paramètres — carte glass, champs et actions (aligné sur Compagnie) */
.view--settings .settings-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.view--settings .settings-page__main {
  min-width: 0;
}

.view--settings .settings-glass-panel {
  max-width: none;
  width: 100%;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(24, 30, 48, 0.92) 0%, rgba(14, 18, 30, 0.88) 100%);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12) inset,
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.view--settings .settings-glass-panel:hover {
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.18) inset,
    0 28px 72px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(99, 102, 241, 0.12);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.view--settings .settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.view--settings .settings-tabs__tab {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 8, 14, 0.45);
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.view--settings .settings-tabs__tab:hover {
  border-color: rgba(129, 140, 248, 0.35);
  color: #f1f5f9;
}

.view--settings .settings-tabs__tab--active {
  border-color: rgba(167, 139, 250, 0.55);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.12));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2) inset;
}

.view--settings .settings-tabpanel {
  min-width: 0;
}

.view--settings #form-settings.form--settings,
.view--settings #form-transporteur.form--transporteur {
  gap: 1.35rem;
}

.view--settings #form-settings .field > .field__label,
.view--settings #form-transporteur .field > .field__label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.88);
}

.view--settings #form-settings .field > .field__hint,
.view--settings #form-transporteur .field > .field__hint {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(163, 184, 214, 0.85);
}

.view--settings #form-settings .field > .field__hint strong,
.view--settings #form-transporteur .field > .field__hint strong {
  color: rgba(224, 231, 255, 0.95);
}

.view--settings #form-settings .field > input,
.view--settings #form-transporteur .field > input {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 14, 0.55);
  color: #f1f5f9;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.view--settings #form-settings .field > input:hover,
.view--settings #form-transporteur .field > input:hover {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(8, 10, 18, 0.65);
}

.view--settings #form-settings .field > input:focus,
.view--settings #form-transporteur .field > input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.35);
  background: rgba(10, 12, 22, 0.75);
}

.view--settings #form-settings .password-field,
.view--settings #form-transporteur .password-field {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 14, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.view--settings #form-settings .password-field:hover,
.view--settings #form-transporteur .password-field:hover {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(8, 10, 18, 0.65);
}

.view--settings #form-settings .password-field:focus-within,
.view--settings #form-transporteur .password-field:focus-within {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.35);
  background: rgba(10, 12, 22, 0.75);
}

.view--settings #form-settings .password-field input,
.view--settings #form-transporteur .password-field input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.view--settings #form-settings .password-field input:focus,
.view--settings #form-transporteur .password-field input:focus {
  box-shadow: none;
}

.view--settings #form-settings .password-field__toggle,
.view--settings #form-transporteur .password-field__toggle {
  color: rgba(199, 210, 254, 0.88);
}

.view--settings #form-settings .password-field__toggle:hover,
.view--settings #form-transporteur .password-field__toggle:hover {
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.15);
}

.view--settings .settings-transporteur-fieldset {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.22), rgba(15, 23, 42, 0.35));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.view--settings .settings-transporteur-fieldset > legend.field__label {
  color: #e0e7ff;
  font-weight: 700;
}

.view--settings .settings-transporteur-fieldset-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.view--settings .form__actions--settings-wow {
  margin-top: 1.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.view--settings .btn--settings-save {
  padding: 0.78rem 1.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  background: linear-gradient(118deg, #6366f1 0%, #7c3aed 38%, #db2777 100%);
  color: #fff;
  box-shadow:
    0 4px 20px rgba(99, 102, 241, 0.45),
    0 12px 40px rgba(219, 39, 119, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.22s ease;
}

.view--settings .btn--settings-save:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.07) saturate(1.05);
  box-shadow:
    0 8px 28px rgba(99, 102, 241, 0.55),
    0 16px 48px rgba(219, 39, 119, 0.3);
}

.view--settings .btn--settings-save:active:not(:disabled) {
  transform: translateY(0);
}

.view--settings .btn--settings-clear {
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.15);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.view--settings .btn--settings-clear:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.28);
  border-color: rgba(252, 165, 165, 0.55);
}

@media (max-width: 960px) {
  .view--compagnie .compagnie-page__layout,
  .view--settings .settings-page__layout {
    grid-template-columns: 1fr;
  }

  .view--compagnie .premium-aside,
  .view--settings .premium-aside {
    order: -1;
  }

  .premium-aside__orb {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .view--compagnie .btn--compagnie-save,
  .view--compagnie .btn--compagnie-save:hover:not(:disabled),
  .view--compagnie .btn--compagnie-save:active:not(:disabled),
  .view--settings .btn--settings-save,
  .view--settings .btn--settings-save:hover:not(:disabled),
  .view--settings .btn--settings-save:active:not(:disabled) {
    transform: none;
    transition: none;
  }

  .view--compagnie .compagnie-glass-panel:hover,
  .view--settings .settings-glass-panel:hover {
    transition: none;
  }
}

.panel__toolbar {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.panel__toolbar--tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  flex: 1;
  min-width: min(100%, 14rem);
}

.toolbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
  min-width: min(100%, 22rem);
}

.toolbar-tools--orders {
  justify-content: flex-end;
  width: 100%;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.toolbar-tools__search-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

/* Même largeur max que `.barcode-scan-strip__input` (28rem) pour le champ recherche commandes. */
.toolbar-tools--orders .toolbar-tools__search-group {
  flex: 0 1 28rem;
  max-width: min(28rem, 100%);
  min-width: 0;
}

.toolbar-tools--orders .global-search {
  flex: 1 1 auto;
  width: 100%;
  min-width: 10rem;
  max-width: none;
}

.global-search {
  flex: 1;
  min-width: 12rem;
  max-width: 28rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.global-search::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.global-search:focus {
  outline: none;
  border-color: rgba(91, 141, 239, 0.45);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.12);
}

.global-search:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: none;
}

.btn--ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn--danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.btn--danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.62);
  color: #fee2e2;
}

.muted {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.readonly-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.45);
  vertical-align: middle;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.select-traitement {
  max-width: 11rem;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}

.select-traitement.is-non-traitee {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.28) inset;
  background-color: rgba(250, 204, 21, 0.14);
  color: #fef3c7;
}

.select-traitement.is-en-cours {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28) inset;
  background-color: rgba(239, 68, 68, 0.14);
  color: #fee2e2;
}

.select-traitement.is-suspendu {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28) inset;
  background-color: rgba(245, 158, 11, 0.14);
  color: #ffedd5;
}

.select-traitement.is-traite {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.28) inset;
  background-color: rgba(34, 197, 94, 0.14);
  color: #dcfce7;
}

/* Liste d'options du select : style neutre pour la sélection ouverte. */
.select-traitement option {
  background-color: #111826;
  color: #e8eaef;
  text-align: start;
}

.select-traitement option:checked {
  background-color: #1b2334;
  color: #ffffff;
}

.table thead th {
  padding: 0;
  vertical-align: middle;
}

.th-expand {
  width: 3.25rem;
  padding: 0.85rem 0.5rem !important;
  text-align: center;
}

.btn-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.65rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.btn-expand:hover {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-expand[aria-expanded='true'] {
  color: var(--accent-hover);
  border-color: rgba(91, 141, 239, 0.35);
}

.table__row--master[data-detail-locked='1'] .btn-expand--detail-locked {
  cursor: not-allowed;
  opacity: 0.92;
}

.table__row--expand td {
  padding: 0 1.25rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table__row--expand[hidden] {
  display: none !important;
}

.expand-body {
  padding: 0.65rem 0 0.35rem;
}

.expand-body .detail-table {
  margin: 0;
  max-width: 100%;
}

.expand-footer {
  margin: 0.85rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.expand-footer--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.barcode-scan-strip {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(91, 141, 239, 0.35);
  background: rgba(91, 141, 239, 0.08);
}

.barcode-scan-strip__label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.barcode-scan-strip__priority {
  display: inline;
  color: var(--text);
}

.barcode-scan-strip__label kbd {
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
}

.barcode-scan-strip__input {
  display: block;
  flex: 0 1 auto;
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.line-scan {
  font-size: 0.8rem;
  font-weight: 600;
}

.line-scan--ok {
  color: #6ee7b7;
}

.line-scan--partial {
  color: #fcd34d;
}

.line-scan--pending {
  color: var(--text-muted);
}

.btn--compact {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.th-sort {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1.25rem;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.th-sort:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.th-sort__icon::before {
  content: '⇵';
  font-size: 0.7rem;
  opacity: 0.28;
}

.th-sort:hover .th-sort__icon::before {
  opacity: 0.55;
}

.th-sort--active {
  color: var(--accent-hover);
}

.th-sort--active .th-sort__icon::before {
  opacity: 1;
}

.th-sort--active.th-sort--asc .th-sort__icon::before {
  content: '↑';
}

.th-sort--active.th-sort--desc .th-sort__icon::before {
  content: '↓';
}

.table__filter-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem !important;
  font-size: 0.9rem;
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  margin: 0;
}

.empty-state[hidden],
.table-wrap[hidden] {
  display: none !important;
}

.order-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.order-drawer:not([hidden]) {
  pointer-events: auto;
}

.order-drawer[hidden] {
  display: none !important;
}

.order-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.order-drawer--open .order-drawer__backdrop {
  opacity: 1;
}

.order-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(820px, 96vw);
  max-width: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.order-drawer--open .order-drawer__panel {
  transform: translateX(0);
}

.order-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.order-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.order-drawer__body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.order-drawer__loading,
.order-drawer__error {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.order-drawer__error {
  color: var(--danger);
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.detail-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.detail-address {
  white-space: pre-wrap;
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.45;
}

.detail-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.detail-table th,
.detail-table td {
  padding: 0.5rem 0.58rem;
  vertical-align: middle;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-table thead th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 1px solid var(--border);
}

/* En-têtes : Produit centré ; Prix unitaire (2 lignes) ; Total centré */
.detail-table thead tr {
  min-height: 3.25rem;
}

.detail-table thead th.detail-th {
  vertical-align: middle;
}

.detail-table thead th.detail-th--product {
  text-align: center;
  line-height: 1.3;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.detail-table thead th.detail-th--narrow {
  white-space: nowrap;
}

.detail-table thead th.detail-th--unit-price {
  text-align: center;
  padding: 0.72rem 0.45rem;
  min-height: 3.25rem;
}

.detail-table thead th.detail-th--unit-price .detail-th__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}

.detail-table thead th.detail-th--unit-price .detail-th__stack span {
  display: block;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
}

.detail-table thead th.detail-th--unit-price .detail-th__stack span:last-child {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-table thead th.detail-th--total {
  text-align: center;
  white-space: nowrap;
}

.detail-table tbody td {
  background: rgba(0, 0, 0, 0.08);
}

.detail-table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.08);
}

.detail-table th:nth-child(1),
.detail-table td:nth-child(1) {
  width: 30%;
  min-width: 0;
}

.detail-table td:nth-child(1) {
  text-align: left;
}

.detail-table th:nth-child(2),
.detail-table td:nth-child(2) {
  width: 4.5rem;
  text-align: center;
}

.detail-table th:nth-child(3),
.detail-table td:nth-child(3) {
  width: 7.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.detail-table th:nth-child(4),
.detail-table td:nth-child(4) {
  width: 9.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.detail-table td:nth-child(4) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-table th:nth-child(5),
.detail-table td:nth-child(5) {
  width: 8rem;
  text-align: center;
}

.detail-table th:nth-child(6),
.detail-table td:nth-child(6) {
  width: 6.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.detail-table tbody tr:last-child td {
  border-bottom: none;
}

.detail-table td:nth-child(1) .line-item-product {
  align-items: flex-start;
}

/* Colonnes centrées : valeur sous le libellé (même axe) */
.detail-table td:nth-child(2),
.detail-table td:nth-child(4),
.detail-table td:nth-child(5),
.detail-table td:nth-child(6) {
  text-align: center;
}

.detail-table td:nth-child(5) .line-scan {
  display: block;
  width: 100%;
  text-align: center;
}

.detail-table__qty-sku {
  white-space: nowrap;
  text-align: center;
}

.detail-table__meta {
  font-size: 0.76rem;
  max-width: 14rem;
}

.line-qty-sku {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  line-height: 1.2;
}

/* Qté : grille alignée sur l’en-tête (flex pleine largeur + centrage) */
.detail-table .line-qty-sku {
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.35rem;
}

.line-qty-sku__qty {
  font-variant-numeric: tabular-nums;
}

.line-qty-sku__sku {
  font-size: 0.72rem;
}

.line-item-meta {
  margin: 0.1rem 0;
  line-height: 1.35;
}

.line-item-product {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.line-item-product__detail {
  font-size: 0.74rem;
  line-height: 1.3;
}

.panel--inventory-in,
.panel--inventory-out {
  max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Hub inventaire — 3 thèmes liés (entrée · sortie · consultation)            */
/* -------------------------------------------------------------------------- */

.inv-hub {
  position: relative;
  isolation: isolate;
  padding-bottom: 2rem;
}

.inv-hub::before {
  content: '';
  position: absolute;
  inset: -0.5rem -1.25rem auto -1.25rem;
  height: min(42vh, 20rem);
  border-radius: 0 0 28px 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.view.inv-hub.view--active::before {
  animation: invHubGlow 0.7s ease-out;
}

@keyframes invHubGlow {
  from {
    opacity: 0.15;
    transform: scaleY(0.92);
  }
  to {
    opacity: 0.55;
    transform: none;
  }
}

.inv-hub--in::before {
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(52, 211, 153, 0.35), transparent 55%),
    radial-gradient(60% 80% at 88% 20%, rgba(45, 212, 191, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(6, 78, 59, 0.35), transparent);
}

.inv-hub--out::before {
  background:
    radial-gradient(90% 120% at 88% 0%, rgba(251, 146, 60, 0.32), transparent 55%),
    radial-gradient(50% 70% at 10% 30%, rgba(249, 115, 22, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(120, 53, 15, 0.28), transparent);
}

.inv-hub--consult::before {
  background:
    radial-gradient(85% 100% at 50% 0%, rgba(129, 140, 248, 0.28), transparent 58%),
    radial-gradient(50% 60% at 0% 40%, rgba(99, 102, 241, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(49, 46, 129, 0.32), transparent);
}

.inv-hub > * {
  position: relative;
  z-index: 1;
}

.inv-hub__header {
  margin-bottom: 1.35rem;
}

.inv-hub__header-inner {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 1.35rem;
  border-radius: 16px;
  background: rgba(10, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.inv-hub--in .inv-hub__header-inner {
  border-color: rgba(52, 211, 153, 0.22);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(52, 211, 153, 0.08) inset,
    0 1px 0 rgba(167, 243, 208, 0.06) inset;
}

.inv-hub--out .inv-hub__header-inner {
  border-color: rgba(251, 146, 60, 0.24);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(251, 146, 60, 0.08) inset,
    0 1px 0 rgba(254, 215, 170, 0.06) inset;
}

.inv-hub--consult .inv-hub__header-inner {
  border-color: rgba(129, 140, 248, 0.26);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(129, 140, 248, 0.1) inset,
    0 1px 0 rgba(199, 210, 254, 0.06) inset;
}

.inv-hub__header-inner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--inv-rail-a, #34d399), var(--inv-rail-b, #059669));
}

.inv-hub--in .inv-hub__header-inner::before {
  --inv-rail-a: #6ee7b7;
  --inv-rail-b: #059669;
}

.inv-hub--out .inv-hub__header-inner::before {
  --inv-rail-a: #fdba74;
  --inv-rail-b: #ea580c;
}

.inv-hub--consult .inv-hub__header-inner::before {
  --inv-rail-a: #a5b4fc;
  --inv-rail-b: #6366f1;
}

.inv-hub__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--inv-eyebrow, #a7f3d0);
}

.inv-hub__eyebrow--in {
  color: #6ee7b7;
}

.inv-hub__eyebrow--out {
  color: #fdba74;
}

.inv-hub__eyebrow--consult {
  color: #c7d2fe;
}

.inv-hub__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inv-hub--in .inv-hub__glyph {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: #d1fae5;
}

.inv-hub--out .inv-hub__glyph {
  background: rgba(251, 146, 60, 0.14);
  border-color: rgba(251, 146, 60, 0.35);
  color: #ffedd5;
}

.inv-hub--consult .inv-hub__glyph {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.35);
  color: #e0e7ff;
}

.inv-hub__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.inv-hub--in .inv-hub__title {
  color: #ecfdf5;
  text-shadow: 0 0 48px rgba(52, 211, 153, 0.22);
}

.inv-hub--out .inv-hub__title {
  color: #fffbeb;
  text-shadow: 0 0 48px rgba(251, 146, 60, 0.2);
}

.inv-hub--consult .inv-hub__title {
  color: #eef2ff;
  text-shadow: 0 0 48px rgba(129, 140, 248, 0.22);
}

.inv-hub__lede {
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 40rem;
}

.inv-hub--in .inv-hub__lede {
  color: rgba(209, 250, 229, 0.82);
}

.inv-hub--out .inv-hub__lede {
  color: rgba(254, 243, 199, 0.82);
}

.inv-hub--consult .inv-hub__lede {
  color: rgba(224, 231, 255, 0.82);
}

.inv-hub__panel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(22, 26, 36, 0.98) 0%, rgba(14, 16, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(12px);
}

.inv-hub--in .inv-hub__panel {
  border-color: rgba(52, 211, 153, 0.18);
  box-shadow:
    var(--shadow),
    0 0 60px -12px rgba(52, 211, 153, 0.18),
    0 0 0 1px rgba(52, 211, 153, 0.06) inset;
}

.inv-hub--out .inv-hub__panel {
  border-color: rgba(251, 146, 60, 0.2);
  box-shadow:
    var(--shadow),
    0 0 60px -12px rgba(251, 146, 60, 0.16),
    0 0 0 1px rgba(251, 146, 60, 0.06) inset;
}

.inv-hub--consult .inv-hub__panel {
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow:
    var(--shadow),
    0 0 60px -12px rgba(99, 102, 241, 0.15),
    0 0 0 1px rgba(129, 140, 248, 0.07) inset;
}

.inv-hub__panel--wide {
  max-width: min(72rem, 100%);
  width: 100%;
}

.panel--inventory-consult {
  padding: 0;
}

.inv-hub--in .panel--form.inv-hub__panel,
.inv-hub--out .panel--form.inv-hub__panel {
  max-width: min(44rem, 100%);
  padding: 1.65rem 1.5rem 1.5rem;
}

.inv-hub--in .btn--primary {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.38);
}

.inv-hub--in .btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.45);
}

.inv-hub--out .btn--primary {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 6px 28px rgba(234, 88, 12, 0.35);
}

.inv-hub--out .btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 8px 32px rgba(234, 88, 12, 0.42);
}

/*
 * L’inventaire n’a que 3 blocs (code · qté · Ajouter). Le template Compagnie à 4 colonnes
 * réserve une colonne vide et comprime qté + bouton → chevauchement. Gabarit dédié ici.
 */
.inv-hub .form-compagnie__row--head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.25rem, 8rem) auto;
  gap: 0.85rem 1rem;
  align-items: end;
}

.inv-hub .form-compagnie__row--head > div {
  min-width: 0;
}

.inv-hub .inventory-toolbar__actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.inv-hub .inventory-toolbar__actions .btn {
  white-space: nowrap;
}

/* Libellé au-dessus du champ (code-barres, quantité) — aligné sur l’axe vertical du bouton Ajouter */
.inv-hub .inv-field-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  min-width: 0;
}

.inv-hub .inv-field-stack label {
  margin: 0;
}

.inv-hub .inv-draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.9);
}

.inv-hub--in .inv-draft-banner {
  border-color: rgba(52, 211, 153, 0.22);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.06) inset;
}

.inv-hub--out .inv-draft-banner {
  border-color: rgba(251, 146, 60, 0.24);
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.06) inset;
}

.inv-draft-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(100, 116, 139, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.inv-hub--in .inv-draft-badge {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.35);
  color: #d1fae5;
}

.inv-hub--out .inv-draft-badge {
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(251, 146, 60, 0.35);
  color: #ffedd5;
}

.inv-hub .inv-draft-delete-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  padding-bottom: 0;
  margin-bottom: -0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-hub .inv-note-row {
  margin-top: 0.35rem;
}

.inv-hub .inv-field-stack--note {
  width: 100%;
  grid-column: 1 / -1;
}

.inv-hub .inv-field-stack--note > label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
}

.inv-hub .inv-note-textarea {
  width: 100%;
  min-height: 5.75rem;
  max-width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e8ecf6;
  background: linear-gradient(165deg, rgba(12, 18, 24, 0.95), rgba(8, 12, 18, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px rgba(0, 0, 0, 0.25);
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.inv-hub .inv-note-textarea::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.inv-hub--in .inv-note-textarea:hover {
  border-color: rgba(52, 211, 153, 0.28);
}

.inv-hub--in .inv-note-textarea:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow:
    0 0 0 3px rgba(52, 211, 153, 0.16),
    0 12px 36px rgba(0, 0, 0, 0.3);
}

.inv-hub--out .inv-note-textarea:hover {
  border-color: rgba(251, 146, 60, 0.3);
}

.inv-hub--out .inv-note-textarea:focus {
  outline: none;
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow:
    0 0 0 3px rgba(251, 146, 60, 0.14),
    0 12px 36px rgba(0, 0, 0, 0.3);
}

@media (max-width: 720px) {
  .inv-hub .form-compagnie__row--head {
    grid-template-columns: 1fr;
  }
}

.inv-hub--in .form-compagnie__row--head label,
.inv-hub--out .form-compagnie__row--head label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
}

.inv-hub--in .form-compagnie__row--head .global-search:focus,
.inv-hub--in .form-compagnie__row--head input:focus {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.inv-hub--out .form-compagnie__row--head .global-search:focus,
.inv-hub--out .form-compagnie__row--head input:focus {
  border-color: rgba(251, 146, 60, 0.65);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

.inv-hub--consult .panel__toolbar--tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.12), transparent);
  border-bottom-color: rgba(129, 140, 248, 0.15);
}

.inv-hub--consult .panel__toolbar--tools select,
.inv-hub--consult .panel__toolbar--tools input {
  border-color: rgba(129, 140, 248, 0.22);
}

.inv-hub--consult .panel__toolbar--tools select:focus,
.inv-hub--consult .panel__toolbar--tools input:focus {
  border-color: rgba(165, 180, 252, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.inv-hub--consult .table--inventory-consult thead th {
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(55, 48, 163, 0.35), rgba(30, 27, 75, 0.5));
  color: #e0e7ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  border-bottom: 1px solid rgba(129, 140, 248, 0.2);
}

.view.inv-hub--consult {
  max-width: min(96rem, 100%);
}

.inv-hub--consult .table--inventory-consult tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.inv-hub--consult .table--inventory-consult th.inv-consult-col-actions,
.inv-hub--consult .table--inventory-consult td.inv-consult-col-actions {
  width: 5.75rem;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.inv-consult-row-delete {
  font-size: 0.72rem;
  padding: 0.28rem 0.5rem;
}

.inv-consult-type {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.2;
}

.inv-consult-type--in {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.42);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.06) inset;
}

.inv-consult-type--out {
  color: #ffedd5;
  background: rgba(251, 146, 60, 0.2);
  border: 1px solid rgba(251, 146, 60, 0.45);
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.06) inset;
}

.inv-hub--consult .inv-consult-row--selected {
  background: rgba(99, 102, 241, 0.18);
}

.inv-hub--consult .inv-consult-row--expanded {
  box-shadow: inset 0 -1px 0 rgba(165, 180, 252, 0.45);
}

.form-actions--inventory-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inventory-lines {
  margin-top: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 3rem;
}

.inv-hub--in .inventory-lines {
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(6, 78, 59, 0.12);
}

.inv-hub--out .inventory-lines {
  border-color: rgba(251, 146, 60, 0.22);
  background: rgba(124, 45, 18, 0.1);
}

.inventory-lines__row {
  display: grid;
  grid-template-columns: 1fr 7rem 7rem;
  gap: 0.6rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.inventory-lines__cell--main {
  min-width: 0;
}

.inventory-lines__cell--side {
  align-self: center;
}

.inventory-lines__headline {
  font-weight: 600;
  line-height: 1.35;
}

.inventory-lines__detail {
  margin-top: 0.28rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 100%;
}

.inventory-lines__sub {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(203, 213, 225, 0.92);
}

.inventory-lines__sub--variant {
  font-weight: 500;
  color: rgba(226, 232, 240, 0.95);
}

.inventory-lines__sub--opts {
  color: rgba(148, 163, 184, 0.95);
}

.inventory-lines__sub--meta {
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.88);
}

.inv-hub--in .inventory-lines__sub--opts {
  color: rgba(167, 243, 208, 0.85);
}

.inv-hub--out .inventory-lines__sub--opts {
  color: rgba(254, 215, 170, 0.88);
}

.inv-hub--in .inventory-lines__row {
  border-bottom-color: rgba(52, 211, 153, 0.1);
}

.inv-hub--out .inventory-lines__row {
  border-bottom-color: rgba(251, 146, 60, 0.12);
}

.inventory-lines__row:last-child {
  border-bottom: none;
}

.inventory-lines__empty {
  padding: 0.75rem;
  color: var(--text-muted);
}

.inventory-lines__qty {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-hub--in .inventory-lines__qty {
  color: #a7f3d0;
}

.inv-hub--out .inventory-lines__qty {
  color: #fed7aa;
}

.table--inventory-consult tbody tr.inv-consult-row {
  cursor: pointer;
}

.inv-consult-row--selected {
  background: rgba(91, 141, 239, 0.16);
}

.inv-consult-row--expanded {
  box-shadow: inset 0 -1px 0 rgba(91, 141, 239, 0.35);
}

.inv-consult-detail-row {
  cursor: default;
}

.inv-consult-detail-row > td {
  padding: 0;
  vertical-align: top;
  background: rgba(8, 10, 16, 0.45);
  border-bottom: 1px solid var(--border);
}

.inv-consult-inline-detail {
  padding: 0.85rem 1rem 1rem;
}

.inv-consult-inline-detail__title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.inv-consult-inline-detail__table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel, #1a2030);
}

.inv-consult-inline-detail .detail-table {
  margin: 0;
  max-width: 100%;
}

/* Détail inventaire : 5 colonnes (sans Scan), en-têtes alignés sur les cellules */
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail thead th.detail-th--product {
  text-align: left;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail thead th:nth-child(2),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail thead th:nth-child(3),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail thead th:nth-child(4),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail thead th:nth-child(5) {
  text-align: center;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail th:nth-child(1),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(1) {
  width: 38%;
  min-width: 0;
  text-align: left;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail th:nth-child(2),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(2) {
  width: 4.5rem;
  text-align: center;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail th:nth-child(3),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(3) {
  width: 8rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail th:nth-child(4),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(4) {
  width: auto;
  min-width: 8rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(4) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail th:nth-child(5),
.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(5) {
  width: 7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.inv-consult-inline-detail .detail-table.detail-table--inv-consult-detail td:nth-child(1) {
  vertical-align: top;
}

.table--inventory-consult-nested {
  margin: 0;
  font-size: 0.88rem;
}

.table--inventory-consult-nested th,
.table--inventory-consult-nested td {
  padding: 0.45rem 0.65rem;
}

/* --- Employés (RH CanicaDB) --- */
.view.emp-hub {
  max-width: min(96rem, 100%);
}

.emp-hub__header {
  margin-bottom: 0.35rem;
}

.emp-hub__header-inner {
  position: relative;
  padding: 0.15rem 0 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.emp-hub__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.emp-hub__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #e0e7ff;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.45), rgba(30, 27, 75, 0.9));
  border: 1px solid rgba(165, 180, 252, 0.35);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.45);
}

.emp-hub__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f8fafc;
}

.emp-hub__lede {
  max-width: 44rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
}

.emp-hub__layout {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) 1fr;
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .emp-hub__layout {
    grid-template-columns: 1fr;
  }
}

.emp-glass {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  background: linear-gradient(165deg, rgba(36, 40, 58, 0.92) 0%, rgba(22, 26, 40, 0.96) 100%);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(91, 141, 239, 0.12) inset;
}

.emp-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(100% 90% at 0% 0%, rgba(99, 102, 241, 0.2), transparent 52%);
  opacity: 0.95;
}

.emp-glass > * {
  position: relative;
  z-index: 1;
}

.emp-glass--form {
  padding: 0.85rem 0.95rem 0.95rem;
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(129, 140, 248, 0.16) inset;
}

.emp-sidebar__toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.emp-sidebar__search {
  width: 100%;
}

.emp-hub__sidebar {
  padding: 0.7rem 0.75rem 0.8rem;
  max-height: min(72vh, 38rem);
  display: flex;
  flex-direction: column;
}

.emp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 4rem;
}

.emp-list-empty {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.emp-list__item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.42rem 0.54rem;
  margin-bottom: 0.34rem;
  cursor: pointer;
  color: #e8ecf6;
  background: rgba(15, 23, 42, 0.35);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease;
}

.emp-list__item:hover {
  border-color: rgba(165, 180, 252, 0.45);
  background: rgba(79, 70, 229, 0.16);
}

.emp-list__item--active {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(99, 102, 241, 0.22);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.2) inset;
}

.emp-list__name {
  display: block;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.emp-list__sub {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.85);
}

.emp-list__statut {
  display: inline-flex;
  margin-top: 0.22rem;
  padding: 0.1rem 0.38rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.emp-list__statut--actif {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

.emp-list__statut--inactif {
  color: #e2e8f0;
  background: rgba(100, 116, 139, 0.25);
}

.emp-list__statut--conge {
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(252, 211, 77, 0.35);
}

.emp-list__statut--suspendu {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(252, 165, 165, 0.35);
}

.form--employes .emp-fieldset {
  margin: 0 0 0.65rem;
  padding: 0.52rem 0.58rem 0.62rem;
  border-radius: 13px;
  border: 1px solid rgba(129, 140, 248, 0.2);
  background: linear-gradient(180deg, rgba(22, 27, 45, 0.78) 0%, rgba(12, 18, 34, 0.82) 100%);
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.28),
    0 0 0 1px rgba(165, 180, 252, 0.05) inset;
  opacity: 0;
  transform: translateY(8px);
  animation: empFieldsetIn 0.45s ease forwards;
}

.form--employes {
  position: relative;
}

.form--employes > .emp-photo-fieldset {
  position: absolute;
  top: 0.05rem;
  right: 0;
  width: 1in;
  min-width: 1in;
  margin: 0;
  padding: 0.28rem;
}

.form--employes > .emp-form__meta,
.form--employes > .emp-fieldset:not(.emp-photo-fieldset),
.form--employes > .emp-form__actions {
  margin-right: calc(1in + 0.65rem);
}

.form--employes .emp-fieldset:nth-of-type(1) {
  animation-delay: 0.02s;
}

.form--employes .emp-fieldset:nth-of-type(2) {
  animation-delay: 0.09s;
}

.form--employes .emp-fieldset:nth-of-type(3) {
  animation-delay: 0.16s;
}

.form--employes .emp-fieldset:nth-of-type(4) {
  animation-delay: 0.23s;
}

.form--employes .emp-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.82rem 0.6rem;
  align-items: start;
}

.form--employes .emp-fieldset > :not(legend) + :not(legend) {
  margin-top: 0.56rem;
}

.emp-photo-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  align-items: center;
}

.emp-photo-preview {
  width: 1in;
  height: 1in;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(165, 180, 252, 0.35);
  background: linear-gradient(165deg, rgba(55, 55, 62, 0.55), rgba(38, 38, 44, 0.75));
}

.emp-photo-actions {
  width: 1in;
  display: grid;
  gap: 0.24rem;
}

.emp-photo-actions .btn {
  width: 100%;
}

.form--employes .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.form--employes .emp-fieldset > legend.field__label {
  margin: 0 0 0.34rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c7d2fe;
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.26), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(165, 180, 252, 0.35);
}

.form--employes .field > .field__label {
  color: rgba(226, 232, 240, 0.96);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  display: block;
  line-height: 1.32;
  margin: 0.3rem 0 0.02rem;
  text-shadow: 0 1px 0 rgba(2, 6, 23, 0.45);
}

.form--employes input,
.form--employes select,
.form--employes textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(7, 12, 26, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #e5e7eb;
  min-height: 2rem;
  height: 2rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.84rem;
  line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background-color 0.18s ease;
}

.form--employes input::placeholder,
.form--employes textarea::placeholder {
  color: rgba(148, 163, 184, 0.66);
}

.form--employes input:focus,
.form--employes select:focus,
.form--employes textarea:focus {
  border-color: rgba(129, 140, 248, 0.78);
  box-shadow:
    0 0 0 3px rgba(79, 70, 229, 0.26),
    0 0 0 1px rgba(129, 140, 248, 0.2) inset;
  transform: translateY(-1px);
}

.emp-form__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.64rem;
  padding: 0.42rem 0.52rem;
  border-radius: 12px;
  border: 1px solid rgba(165, 180, 252, 0.18);
  background: linear-gradient(150deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.82));
}

.emp-form-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.44rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(165, 180, 252, 0.45);
}

.emp-form-badge--edit {
  color: #fef9c3;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(252, 211, 77, 0.45);
}

.emp-form-hint {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.68rem;
  line-height: 1.3;
  color: rgba(203, 213, 225, 0.88);
}

.emp-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-top: 0.22rem;
  padding: 0.55rem 0 0;
  border-top: 1px solid rgba(165, 180, 252, 0.18);
  position: sticky;
  bottom: -0.2rem;
  z-index: 8;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.86) 32%, rgba(15, 23, 42, 0.96) 100%);
}

.emp-form__actions .btn {
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 1.95rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.emp-form__actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.32);
}

.emp-list {
  scrollbar-gutter: stable;
}

.emp-list::-webkit-scrollbar {
  width: 9px;
}

.emp-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.34);
  border: 2px solid rgba(15, 23, 42, 0.75);
}

.emp-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
}

.form--employes #employe-statut {
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow:
    inset 0 -2px 0 rgba(148, 163, 184, 0.45),
    inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.form--employes #employe-role {
  color: #e5e7eb;
  background: linear-gradient(180deg, rgba(7, 12, 26, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.form--employes #employe-role,
.form--employes #employe-statut {
  color-scheme: light;
}

.form--employes #employe-role option,
.form--employes #employe-statut option {
  color: #0f172a !important;
  background-color: #ffffff !important;
}

.form--employes #employe-role option:checked,
.form--employes #employe-role option:hover,
.form--employes #employe-statut option:checked,
.form--employes #employe-statut option:hover {
  color: #020617 !important;
  background-color: #cbd5e1 !important;
}

.form--employes:has(#employe-statut option:checked[value='actif']) #employe-statut {
  border-color: rgba(16, 185, 129, 0.52);
  box-shadow:
    inset 0 -2px 0 rgba(16, 185, 129, 0.85),
    0 0 0 1px rgba(16, 185, 129, 0.2);
}

.form--employes:has(#employe-statut option:checked[value='inactif']) #employe-statut {
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow:
    inset 0 -2px 0 rgba(148, 163, 184, 0.78),
    0 0 0 1px rgba(148, 163, 184, 0.18);
}

.form--employes:has(#employe-statut option:checked[value='conge']) #employe-statut {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow:
    inset 0 -2px 0 rgba(245, 158, 11, 0.88),
    0 0 0 1px rgba(245, 158, 11, 0.18);
}

.form--employes:has(#employe-statut option:checked[value='suspendu']) #employe-statut {
  border-color: rgba(239, 68, 68, 0.56);
  box-shadow:
    inset 0 -2px 0 rgba(239, 68, 68, 0.88),
    0 0 0 1px rgba(239, 68, 68, 0.2);
}

@keyframes empFieldsetIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .form--employes .emp-fieldset {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .emp-form__actions .btn {
    transition: none;
  }
}

@media (max-width: 768px) {
  .form--employes > .emp-photo-fieldset {
    position: static;
    width: auto;
    min-width: 0;
    margin: 0 0 0.55rem;
  }

  .form--employes > .emp-form__meta,
  .form--employes > .emp-fieldset:not(.emp-photo-fieldset),
  .form--employes > .emp-form__actions {
    margin-right: 0;
  }

  .emp-photo-preview {
    width: min(7.5rem, 100%);
    height: min(7.5rem, 100%);
  }

  .emp-photo-actions {
    width: min(7.5rem, 100%);
  }

  .emp-glass--form {
    padding: 0.7rem 0.68rem 0.78rem;
  }

  .form--employes .emp-fieldset {
    padding: 0.48rem 0.5rem 0.56rem;
  }

  .emp-form__meta {
    padding: 0.42rem 0.46rem;
  }

  .emp-form__actions {
    bottom: 0;
    padding-bottom: 0.2rem;
  }
}

/* --- Carte d’identité employé (aperçu + impression avec repères de coupe) --- */
.view--employes-cartes.emp-carte-page {
  max-width: min(56rem, 100%);
}

.emp-carte-page__header {
  margin-bottom: 0.75rem;
}

.emp-carte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
}

.emp-carte-toolbar__select {
  flex: 1 1 14rem;
  min-width: 12rem;
  margin: 0;
}

.emp-carte-toolbar__select select {
  width: 100%;
  min-height: 2rem;
}

.emp-carte-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.emp-carte-preview-wrap {
  padding: 1rem 1.1rem;
  overflow: auto;
}

/* Repères de coupe : ne pas rogner hors de la zone trim. */
#view-employes-cartes .emp-carte-preview-wrap {
  overflow: visible;
}

.emp-carte-print-root {
  display: flex;
  justify-content: center;
}

.emp-carte-print-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
}

.emp-carte-sheet {
  position: relative;
  display: inline-block;
}

.emp-carte-sheet-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.88);
  text-align: center;
}

/* Formulaire : uniquement l’aperçu recto, sans repères (verso + coupes à l’impression seulement). */
@media screen {
  .view--employes-cartes .emp-carte-sheet--verso {
    display: none !important;
  }

  .view--employes-cartes .emp-carte-crops {
    display: none !important;
  }

  .view--employes-cartes .emp-carte-sheet-label {
    display: none !important;
  }
}

.emp-carte-trim {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 4mm;
  border-radius: 6px;
  background: rgba(30, 32, 40, 0.45);
  overflow: visible;
  /* Format physique carte à l’impression : 10 cm × 6,75 cm */
  --emp-carte-w: 100mm;
  --emp-carte-h: 67.5mm;
}

/* Carte employé : bandeau Titre | Identification, corps entreprise+logo | photo + code-barres. */
.emp-carte-card {
  --emp-carte-ink: #0f172a;
  --emp-carte-muted: #64748b;
  /* Libellés du bandeau (Titre, Identification) : vert lisible sur fond gris clair + impression. */
  --emp-carte-label-accent: #15803d;
  --emp-carte-head-bg: #e8ecf1;
  --emp-carte-head-bg-mid: #f1f4f8;
  position: relative;
  z-index: 1;
  isolation: isolate;
  box-sizing: border-box;
  width: var(--emp-carte-w);
  height: var(--emp-carte-h);
  overflow: hidden;
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--emp-carte-ink);
  border: 0.35mm solid #1a1a1a;
  border-radius: 6mm;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.emp-carte-card__grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 2.2mm 2mm 2.2mm;
  gap: 0;
  box-sizing: border-box;
}

.emp-carte-card__head {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2.5mm;
  flex-shrink: 0;
  margin: 0 -2.2mm;
  padding: 1.65mm 2.2mm 1.55mm;
  /* Gris pâle : peu d’encre à l’impression */
  background: linear-gradient(180deg, var(--emp-carte-head-bg-mid) 0%, var(--emp-carte-head-bg) 100%);
  border-radius: 5.65mm 5.65mm 0 0;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
  position: relative;
}

.emp-carte-card__head::after {
  content: '';
  position: absolute;
  left: 2.2mm;
  right: 2.2mm;
  bottom: 0;
  height: 0.3mm;
  background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.45), transparent);
  pointer-events: none;
}

.emp-carte-card__head .emp-carte-card__lbl {
  color: var(--emp-carte-label-accent);
  font-size: 2.45mm;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.emp-carte-card__head .emp-carte-card__val--title {
  color: #0f172a;
  font-size: 4.15mm;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.emp-carte-card__head .emp-carte-card__ident {
  color: var(--emp-carte-label-accent);
  font-size: 2.45mm;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.emp-carte-card__head .emp-carte-card__name {
  color: #0f172a;
  font-size: 3.65mm;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.emp-carte-card__head-left {
  flex: 1 1 0;
  min-width: 0;
}

.emp-carte-card__head-right {
  flex: 0 1 auto;
  max-width: 52%;
  text-align: right;
}

.emp-carte-card__main {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2.8mm;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  margin-top: 0.35mm;
  padding-top: 0;
}

.emp-carte-card__col--left {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.emp-carte-card__col--right {
  flex: 0 0 auto;
  width: 30mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55mm;
  min-height: 0;
  /* Photo + code-barres : décalage vertical (sans toucher au logo). */
  margin-top: 7mm;
}

/* Bloc logo : hauteur au contenu seulement (le logo remonte sous le nom d’entreprise, sans vide en dessous). */
.emp-carte-card__logo-region {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.emp-carte-card__logo-region:has(> .emp-carte-card__logo-wrap > img[hidden]) {
  display: none;
}

.emp-carte-card__logo-spacer {
  flex: 0 0 0;
  width: 100%;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.emp-carte-card__logo-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-height: 71mm;
  /* +0,7 mm − 15 mm + 5 mm − 2 mm + 4 mm − 3 mm (remontée cumulée). */
  margin-top: calc(0.7mm - 15mm + 5mm - 2mm + 4mm - 3mm);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.emp-carte-card__lbl {
  font-size: 2.35mm;
  font-weight: 500;
  color: var(--emp-carte-muted);
  letter-spacing: 0.02em;
  text-transform: none;
}

.emp-carte-card__val {
  font-size: 3.85mm;
  font-weight: 700;
  color: var(--emp-carte-ink);
  line-height: 1.18;
}

.emp-carte-card__val--title {
  font-size: 4mm;
  font-weight: 700;
}

.emp-carte-card__val--brand {
  display: block;
  max-width: 100%;
  line-height: 1.22;
  font-size: 4.05mm;
  font-weight: 800;
  letter-spacing: -0.015em;
}

#emp-carte-chez.emp-carte-card__val--brand {
  margin: 6mm 0 0;
  padding: 0;
  line-height: 1.08;
  font-size: 6.35mm;
  letter-spacing: -0.02em;
  text-align: center;
}

.emp-carte-card__chez-accent {
  font-weight: 700;
  color: var(--emp-carte-ink);
}

#emp-carte-logo.emp-carte-card__logo,
.emp-carte-card__logo-wrap .emp-carte-card__logo {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: min(109mm, 100%);
  max-height: 73mm;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 0.35mm 0.6mm rgba(15, 23, 42, 0.12));
}

.emp-carte-card__logo[hidden],
.emp-carte-card__logo:not([src]),
.emp-carte-card__logo[src=''] {
  display: none;
}

.emp-carte-card__ident {
  margin-bottom: 0.35mm;
  font-size: 3.1mm;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emp-carte-muted);
  line-height: 1.1;
}

.emp-carte-card__name {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 3.5mm;
  font-weight: 700;
  color: var(--emp-carte-ink);
  line-height: 1.15;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Même principe que .emp-photo-preview (fiche employé) : coins arrondis, pas cercle. */
.emp-carte-card__photo-shell {
  flex-shrink: 0;
  width: 28mm;
  height: 28mm;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(165, 180, 252, 0.35);
  line-height: 0;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(55, 55, 62, 0.12), rgba(38, 38, 44, 0.16));
}

.emp-carte-card__photo-shell .emp-carte-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: none;
  box-shadow: none;
  background-color: #e2e8f0;
  background-image: radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.35) 0.4mm, transparent 0.55mm),
    radial-gradient(circle at 72% 64%, rgba(255, 255, 255, 0.22) 0.35mm, transparent 0.5mm);
  background-size: 2.2mm 2.2mm;
  box-sizing: border-box;
}

.emp-carte-card__bc-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 28mm;
  max-width: 100%;
  flex-shrink: 0;
  margin-top: 1mm;
}

.emp-carte-card__bc-stack .emp-carte-card__barcode {
  display: block;
  width: 28mm;
  height: 11mm;
  min-height: 11mm;
  max-width: 100%;
  max-height: 11mm;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.emp-carte-card__barcode text,
.emp-carte-card__barcode tspan {
  display: none;
}

/* Conserver couleurs / images à l’écran et dans l’aperçu d’impression du navigateur. */
#emp-carte-print-root,
#emp-carte-print-root * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Repères pleine feuille (viewBox mm aligné sur la zone imprimable ; sous la carte, z-index 0). */
.emp-carte-crops {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* viewBox : même échelle que --emp-carte-printable-* en impression. */
.emp-carte-crops-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.emp-carte-sheet--verso .emp-carte-crops {
  display: none !important;
}

/* --- Verso carte : logo pleine surface + slogan en bandeau superposé --- */
.emp-carte-card--verso {
  position: relative;
  display: block;
  padding: 0;
  box-sizing: border-box;
}

.emp-carte-card--verso-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.emp-carte-card--verso .emp-carte-card__logo--verso {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 0.35mm 0.55mm rgba(15, 23, 42, 0.12));
}

.emp-carte-card__logo--verso[hidden] {
  display: none !important;
}

.emp-carte-verso__tagline {
  position: absolute;
  left: 2mm;
  right: 2mm;
  bottom: 7mm;
  z-index: 2;
  margin: 0;
  padding: 0.9mm 2.5mm;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 5mm;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.22;
  text-align: center;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 1.8mm;
  box-shadow: 0 0.2mm 0.6mm rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

@media print {
  /* Marges feuille ; la carte fait exactement 10 cm × 6,75 cm (pas d’échelle). */
  @page {
    margin: 12mm;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    /* Fond blanc : évite le thème sombre de l’app (grosse zone noire = cartouche). */
    background: #fff !important;
    background-color: #fff !important;
    color: #0f172a !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /*
   * Ne pas utiliser visibility:hidden sur tout le body : les blocs invisibles gardent leur hauteur
   * et génèrent des pages blanches avant/après. On masque tout sauf la section cartes.
   */
  body > *:not(#app-root),
  #auth-boot,
  #login-screen,
  #order-drawer,
  dialog {
    display: none !important;
  }

  #app-root > aside,
  #app-root > main > section:not(#view-employes-cartes) {
    display: none !important;
  }

  #view-employes-cartes > .emp-carte-page__header,
  #view-employes-cartes > .emp-carte-toolbar {
    display: none !important;
  }

  #app-root {
    display: block !important;
    min-height: 0 !important;
    background: #fff !important;
    background-color: #fff !important;
  }

  #app-root > main {
    display: block !important;
    flex: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    background-color: #fff !important;
  }

  #view-employes-cartes {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    background-color: #fff !important;
  }

  #emp-carte-print-root,
  #emp-carte-print-root * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    forced-color-adjust: preserve;
    filter: none !important;
    -webkit-filter: none !important;
  }

  /* Flux vertical : recto page 1, verso page 2 (impression recto-verso ou deux passes). */
  #emp-carte-print-root {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    /* Pas de padding vertical ici : sinon seule la page 1 est décalée, pas la page 2. */
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    z-index: auto !important;
    overflow: visible !important;
    background: #fff !important;
    background-color: #fff !important;
  }

  .emp-carte-print-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .emp-carte-sheet-label {
    display: none !important;
  }

  /*
   * Une « feuille » = zone imprimable A4 paysage après @page 12 mm : 273 × 186 mm.
   * La carte (trim) est centrée ; le SVG des coupes part des coins repère jusqu’aux bords 0 / 273 / 186.
   */
  .emp-carte-sheet {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 273mm !important;
    height: 186mm !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    position: relative !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  .emp-carte-sheet--recto {
    page-break-after: always !important;
    break-after: page !important;
    break-inside: avoid !important;
  }

  .emp-carte-sheet--verso {
    break-inside: avoid !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }

  #view-employes-cartes {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .emp-carte-preview-wrap {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: #fff !important;
    background-image: none !important;
  }

  /* Annule le « verre » employés (dégradé + ::before bleu/violet) tout en gardant le SVG des coupes. */
  .emp-carte-preview-wrap.emp-glass::before {
    content: none !important;
    display: none !important;
  }

  .emp-carte-trim {
    background: transparent !important;
    box-shadow: none !important;
    padding: 5mm !important;
  }

  .emp-carte-crops {
    display: block !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .emp-carte-sheet--verso .emp-carte-crops {
    display: none !important;
  }

  .emp-carte-card {
    box-shadow: none !important;
    border-color: #1a1a1a !important;
  }

  .emp-carte-card--verso {
    box-shadow: none !important;
    border-color: #1a1a1a !important;
    padding: 0 !important;
  }

  .emp-carte-card--verso .emp-carte-card__logo--verso {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    object-fit: contain !important;
    transform: translate(-50%, -50%) !important;
  }

  .emp-carte-verso__tagline {
    bottom: 6.5mm !important;
    left: 2mm !important;
    right: 2mm !important;
    font-size: 5.2mm !important;
    background: rgba(255, 255, 255, 0.96) !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

}

/* --- Boîtes d’expédition (CanicaDB) --- */
.view.ship-hub {
  max-width: min(96rem, 100%);
}

.ship-hub__header {
  margin-bottom: 0.35rem;
}

.ship-hub__header-inner {
  position: relative;
  padding: 0.15rem 0 0.25rem;
}

.ship-hub__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.ship-hub__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #ecfeff;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.45), rgba(12, 74, 110, 0.92));
  border: 1px solid rgba(125, 211, 252, 0.4);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.45);
}

.ship-hub__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f8fafc;
}

.ship-hub__lede {
  max-width: 46rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
}

.ship-hub__layout {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) 1fr;
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .ship-hub__layout {
    grid-template-columns: 1fr;
  }
}

.ship-glass {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: linear-gradient(165deg, rgba(28, 42, 58, 0.94) 0%, rgba(18, 24, 38, 0.97) 100%);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(14, 165, 233, 0.1) inset;
}

.ship-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(100% 90% at 0% 0%, rgba(14, 165, 233, 0.18), transparent 52%);
  opacity: 0.95;
}

.ship-glass > * {
  position: relative;
  z-index: 1;
}

.ship-glass--form {
  padding: 0.65rem 0.85rem 0.75rem;
}

.ship-sidebar__toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.ship-sidebar__search {
  width: 100%;
}

.ship-hub__sidebar {
  padding: 0.85rem 0.9rem 1rem;
  max-height: min(72vh, 38rem);
  display: flex;
  flex-direction: column;
}

.ship-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 4rem;
}

.ship-list-empty {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.ship-list-count {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ship-list__item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  color: #e8ecf6;
  background: rgba(15, 23, 42, 0.35);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease;
}

.ship-list__item:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(8, 145, 178, 0.18);
}

.ship-list__item--active {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(14, 165, 233, 0.18);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18) inset;
}

.ship-list__name {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.ship-list__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: rgba(203, 213, 225, 0.88);
}

.ship-list__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.ship-list__pill {
  display: inline-flex;
  padding: 0.1rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ship-list__pill--petite {
  color: #cffafe;
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(34, 211, 238, 0.35);
}

.ship-list__pill--moyenne {
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(165, 180, 252, 0.35);
}

.ship-list__pill--grande {
  color: #fef9c3;
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(253, 224, 71, 0.35);
}

.ship-list__pill--en_stock {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.35);
}

.ship-list__pill--stock_faible {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(252, 211, 77, 0.35);
}

.ship-list__pill--en_rupture {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(252, 165, 165, 0.35);
}

/* Fenêtre de confirmation succès (boîtes d’expédition) */
.ship-toast {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ship-toast.ship-toast--visible {
  opacity: 1;
}

.ship-toast__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
}

.ship-toast.ship-toast--visible .ship-toast__backdrop {
  pointer-events: auto;
}

.ship-toast__card {
  position: relative;
  max-width: 22rem;
  width: 100%;
  padding: 1.35rem 1.5rem 1.45rem;
  border-radius: 18px;
  text-align: center;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.97), rgba(8, 47, 73, 0.94));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.12) inset,
    0 22px 50px rgba(0, 0, 0, 0.45);
  transform: scale(0.94) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.ship-toast.ship-toast--visible .ship-toast__card {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ship-toast__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: #022c22;
  background: linear-gradient(145deg, #34d399, #10b981);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.ship-toast__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.ship-toast__sub {
  margin: 0.55rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.92);
}

.ship-form__preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(8, 47, 73, 0.35);
}

.ship-form__preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.85);
}

.ship-form__preview-value {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
}

.ship-form__preview-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bae6fd;
}

.form--ship-boxes {
  gap: 0.45rem;
}

.form--ship-boxes .ship-fieldset {
  margin: 0;
  padding: 0.45rem 0.6rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: rgba(15, 23, 42, 0.28);
}

.form--ship-boxes .ship-fieldset > legend.field__label {
  padding: 0 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.88);
}

.form--ship-boxes .field {
  gap: 0.22rem;
}

.form--ship-boxes .field__label {
  font-size: 0.72rem;
}

.form--ship-boxes .field input,
.form--ship-boxes .field select {
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  line-height: 1.25;
  min-height: 0;
}

/* Texte / nombre : même « matière » visuelle que les <select> (sinon fond quasi noir, confondu avec désactivé). */
.form--ship-boxes .field input[type='text'],
.form--ship-boxes .field input[type='number'] {
  color-scheme: dark;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #f1f5f9;
}

.form--ship-boxes .field input[type='text']:focus,
.form--ship-boxes .field input[type='number']:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.22);
}

.form--ship-boxes .ship-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.4rem 0.55rem;
  align-items: end;
}

.form--ship-boxes .ship-form-row--dims {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form--ship-boxes .ship-form-row--canica-poids {
  grid-template-columns: minmax(11rem, 16rem);
}

@media (max-width: 720px) {
  .form--ship-boxes .ship-form-row--dims {
    grid-template-columns: 1fr;
  }

  .form--ship-boxes .ship-form-row--canica-poids {
    grid-template-columns: 1fr;
  }
}

.ship-form__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.ship-form-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.ship-form-badge--edit {
  color: #fef9c3;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(252, 211, 77, 0.45);
}

.ship-form-hint {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ship-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.canica-line-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.canica-line-row input,
.canica-line-row select {
  min-height: 34px;
  border-radius: 8px;
}

.canica-photos-gallery {
  --canica-photo-size: 96px;
  --canica-photo-gap: 0.45rem;
  --canica-visible-photo-count: 7;
  display: block;
  margin-bottom: 0;
  min-height: 0;
  overflow: hidden;
}

.canica-photos-gallery__carousel {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.5rem;
}

.canica-photos-gallery__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  justify-content: flex-start;
}

.canica-photos-gallery__viewport::-webkit-scrollbar {
  display: none;
}

.canica-photos-gallery__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--canica-photo-gap);
  min-width: 100%;
  width: max-content;
}

.canica-photos-gallery__nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.2);
  color: #dbeafe;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.05rem;
}

.canica-photos-gallery__nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.canica-photo-tile {
  position: relative;
  width: var(--canica-photo-size);
  height: var(--canica-photo-size);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.canica-photo-tile--fixed {
  width: var(--canica-photo-size);
  height: var(--canica-photo-size);
}

.canica-photo-tile--empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.28);
}

.canica-photo-tile--add {
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.2);
  color: #dbeafe;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.canica-photo-tile__add-icon {
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.canica-photo-tile:hover {
  border-color: rgba(96, 165, 250, 0.55);
  /* Pas de translateY : la galerie a overflow-y hidden + hauteur fixe, le léger décalage coupait le bord supérieur. */
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.32),
    0 0 0 1px rgba(96, 165, 250, 0.22);
}

.canica-photo-tile--draggable {
  cursor: grab;
}

.canica-photo-tile--draggable:active {
  cursor: grabbing;
}

.canica-photo-tile--dragging {
  opacity: 0.62;
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow:
    0 8px 18px rgba(2, 6, 23, 0.4),
    0 0 0 1px rgba(96, 165, 250, 0.3);
}

.canica-photo-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.canica-photo-tile__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.35);
}

.canica-photo-tile__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
}

.canica-photo-tile__remove:hover {
  background: rgba(220, 38, 38, 0.92);
}

.canica-barcode-preview__sku-field {
  margin: 0;
  flex: 0 0 210px;
  max-width: 240px;
  position: relative;
}

.view--produits-articles #form-canica-product .canica-primary-code-sku .canica-barcode-preview__sku-field {
  flex: none;
  max-width: none;
  width: 100%;
}

.canica-barcode-preview__sku-field input {
  padding-right: 2rem;
}

.canica-sku-status-icon {
  position: absolute;
  right: 0.45rem;
  top: 1.82rem;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
}

.canica-sku-status-icon--error {
  filter: drop-shadow(0 0 0.2rem rgba(239, 68, 68, 0.35));
}

.canica-sku-status-icon--success {
  filter: drop-shadow(0 0 0.2rem rgba(34, 197, 94, 0.35));
}

.canica-barcode-preview__label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
  text-align: left;
  margin: 0;
  padding: 0;
}

.canica-barcode-preview__graphic {
  width: auto;
  min-height: 40px;
  display: flex;
  justify-content: flex-start !important;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
}

.canica-barcode-preview__svg {
  width: auto !important;
  height: 40px;
  display: block;
  padding: 0 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  align-self: flex-start;
  transform: none !important;
}

.canica-barcode-preview__text {
  margin: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #f8fafc;
  text-align: left;
}

.canica-shopify-save-progress {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.62rem 0.9rem;
  border-radius: 11px;
  background: rgba(30, 64, 175, 0.93);
  border: 1px solid rgba(96, 165, 250, 0.75);
  color: #dbeafe;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.48);
  font-size: 0.9rem;
  max-width: min(92vw, 560px);
}

/* display:flex ci-dessus gagne sur l’attribut [hidden] du navigateur : forcer masquage. */
.canica-shopify-save-progress[hidden] {
  display: none !important;
}

.canica-shopify-save-progress[hidden] .canica-shopify-save-progress__spinner {
  animation: none;
}

.canica-shopify-save-progress__spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(219, 234, 254, 0.28);
  border-top-color: #dbeafe;
  border-radius: 50%;
  flex-shrink: 0;
  animation: canica-spin 0.7s linear infinite;
}

/* Messages formulaire produits Canica : centrés écran (uniformisé).
   — `#canica-products-alert:not([hidden])` : même règles sans ancêtre .view (élément sous body après portail).
   — Léger scrim derrière pour séparer du formulaire (lisibilité). */
.view--produits-articles #canica-products-alert,
#canica-products-alert.canica-products-alert--body-docked,
#canica-products-alert:not([hidden]) {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10050;
  width: min(92%, 28rem);
  max-width: 28rem;
  margin: 0;
  padding: 0.85rem 1.15rem;
  box-sizing: border-box;
  text-align: center;
  white-space: pre-line;
  pointer-events: auto;
  /* Voile plein écran (clics absorbés par la carte centrée seulement si besoin — ici l’ombre ne capte pas les clics). */
  box-shadow:
    0 0 0 9999px rgba(2, 6, 23, 0.52),
    0 20px 48px rgba(0, 0, 0, 0.42);
}

/* Succès catalogue / actions : thème bleu Maestro, fond bien lisible (évite le vert .alert--success). */
.view--produits-articles #canica-products-alert.alert--success,
#canica-products-alert.canica-products-alert--body-docked.alert--success,
#canica-products-alert.alert--success:not([hidden]) {
  background: linear-gradient(165deg, rgba(30, 58, 138, 0.97) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(15, 23, 42, 0.99) 100%);
  border: 1px solid rgba(147, 197, 253, 0.72);
  color: #f8fafc;
  box-shadow:
    0 0 0 9999px rgba(2, 6, 23, 0.52),
    0 20px 52px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Erreurs formulaire produits : même fenêtre bleue Maestro, un peu plus translucide (lisible sans rouge « fantôme »).
   — Sélecteur #id.alert--error : priorité sur .alert--error générique même si la classe dock a été effacée par erreur. */
.view--produits-articles #canica-products-alert.alert--error,
#canica-products-alert.canica-products-alert--body-docked.alert--error,
#canica-products-alert.alert--error:not([hidden]) {
  background: linear-gradient(
    165deg,
    rgba(37, 99, 235, 0.82) 0%,
    rgba(30, 58, 138, 0.78) 42%,
    rgba(15, 23, 42, 0.84) 100%
  );
  border: 1px solid rgba(147, 197, 253, 0.62);
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow:
    0 0 0 9999px rgba(2, 6, 23, 0.52),
    0 20px 52px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Erreur + modale OK : le corps du message reste bien contrasté sur le panneau bleu. */
.view--produits-articles #canica-products-alert.alert--error .canica-products-alert__body,
#canica-products-alert.canica-products-alert--body-docked.alert--error .canica-products-alert__body,
#canica-products-alert.alert--error:not([hidden]) .canica-products-alert__body {
  color: #f1f5f9;
}

/* Préparation des commandes : messages succès dans la même fenêtre bleue standard. */
#view-orders #orders-alert.alert--success {
  background: linear-gradient(165deg, rgba(30, 58, 138, 0.97) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(15, 23, 42, 0.99) 100%);
  border: 1px solid rgba(147, 197, 253, 0.72);
  color: #f8fafc;
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#view-orders #orders-alert.orders-alert--confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.62rem;
  width: min(94%, 34rem);
  max-width: 34rem;
  padding: 1rem 1.15rem;
}

#view-orders #orders-alert .orders-alert__body {
  width: 100%;
  max-height: min(55vh, 420px);
  overflow-y: auto;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.98rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

#view-orders #orders-alert .orders-alert__ok {
  align-self: center;
  min-width: 88px;
}

.view--produits-articles #canica-products-alert.canica-products-alert--confirm,
#canica-products-alert.canica-products-alert--body-docked.canica-products-alert--confirm,
#canica-products-alert.canica-products-alert--confirm:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.62rem;
  width: min(94%, 34rem);
  max-width: 34rem;
}

.view--produits-articles #canica-products-alert .canica-products-alert__body,
#canica-products-alert.canica-products-alert--body-docked .canica-products-alert__body,
#canica-products-alert:not([hidden]) .canica-products-alert__body {
  width: 100%;
  max-height: min(55vh, 420px);
  overflow-y: auto;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.45;
}

.view--produits-articles #canica-products-alert .canica-products-alert__ok,
#canica-products-alert.canica-products-alert--body-docked .canica-products-alert__ok,
#canica-products-alert:not([hidden]) .canica-products-alert__ok {
  align-self: center;
  min-width: 96px;
}

#view-settings #settings-alert.settings-alert--confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: min(94vw, 42rem);
  border-color: rgba(125, 211, 252, 0.58);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.62), rgba(30, 58, 138, 0.58));
  box-shadow:
    0 20px 48px rgba(2, 6, 23, 0.55),
    0 0 0 1px rgba(191, 219, 254, 0.16) inset;
}

#view-settings #settings-alert .settings-alert__body {
  width: 100%;
  max-height: min(58vh, 460px);
  overflow-y: auto;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.94rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #eaf2ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

#view-settings #settings-alert .settings-alert__ok {
  align-self: center;
  min-width: 96px;
}

/* Toast succès enregistrement : centré sur tout le viewport (pas le formulaire). */
.view--produits-articles .ship-hub__main #canica-product-toast.ship-toast {
  position: fixed;
  inset: 0;
  z-index: 12000;
  width: auto;
  height: auto;
  max-width: none;
  padding: 1rem;
}

@keyframes canica-spin {
  to {
    transform: rotate(360deg);
  }
}

.view--shipping-boxes .main__header {
  margin-bottom: 0.55rem;
}

.view--shipping-boxes .ship-hub__title {
  margin-bottom: 0.2rem;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.view--shipping-boxes .ship-hub__lede {
  font-size: 0.82rem;
  line-height: 1.35;
}

.view--shipping-boxes .ship-hub__eyebrow {
  margin-bottom: 0.2rem;
}

.view--shipping-boxes .ship-hub__glyph {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.82rem;
}

.view--shipping-boxes #ship-boxes-alert:not([hidden]) {
  margin-bottom: 0.35rem;
}

/* Plus d’espace utile : la zone .main est moins paddée sur cette vue. */
.main:has(#view-shipping-boxes.view--active) {
  padding: 1.1rem 2rem 1.35rem;
}

.view--shipping-boxes .ship-form__actions .btn {
  padding: 0.32rem 0.85rem;
  font-size: 0.82rem;
}

.view--fournisseurs .main__header {
  margin-bottom: 0.55rem;
}

.view--fournisseurs .ship-hub__title {
  margin-bottom: 0.2rem;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.view--fournisseurs .ship-hub__lede {
  font-size: 0.82rem;
  line-height: 1.35;
}

.view--fournisseurs .ship-hub__eyebrow {
  margin-bottom: 0.2rem;
}

.view--fournisseurs .ship-hub__glyph {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.82rem;
}

.view--fournisseurs #fournisseurs-alert:not([hidden]) {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-height: none;
  overflow: visible;
  box-shadow: none;
  z-index: auto;
  margin-bottom: 0.35rem;
}

.main:has(#view-fournisseurs.view--active) {
  padding: 1.1rem 2rem 1.35rem;
}

.view--fournisseurs .ship-form__actions .btn {
  padding: 0.32rem 0.85rem;
  font-size: 0.82rem;
}

.view--fournisseurs {
  height: calc(100vh - 2.2rem);
  overflow: hidden;
}

.view--fournisseurs .ship-hub__layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0.7rem;
  height: calc(100vh - 7.8rem);
  min-height: 0;
}

.view--fournisseurs .ship-hub__sidebar {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view--fournisseurs .ship-hub__main {
  min-height: 0;
  overflow: auto;
  padding: 0.55rem;
}

.detail-totals {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.detail-totals li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-totals li:last-child {
  border-bottom: none;
  font-weight: 600;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.table__row--master:hover {
  background: var(--bg-hover);
}

.orders-prep-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-height: 2rem;
}

.orders-prep-cell .select-traitement {
  flex: 0 1 auto;
  max-width: 11rem;
}

.orders-prep-cell__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-preparer-panier {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  white-space: nowrap;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.btn-preparer-panier__icon {
  flex-shrink: 0;
  display: block;
}

.btn-imprimer-panier {
  flex-shrink: 0;
  min-width: 2.15rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.btn-checkout-order {
  flex-shrink: 0;
  min-width: 2.15rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

/* Overlay pendant l’appel transporteur (checkout commandes). */
.checkout-courtier-progress {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.checkout-courtier-progress[hidden] {
  display: none !important;
}

.checkout-courtier-progress__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 28, 0.78);
  backdrop-filter: blur(6px);
}

.checkout-courtier-progress__card {
  position: relative;
  width: min(26rem, calc(100vw - 2rem));
  padding: 2.15rem 2rem 2rem;
  border-radius: 18px;
  background: linear-gradient(165deg, #1a2444 0%, #121a32 55%, #0f1628 100%);
  border: 1px solid rgba(129, 140, 248, 0.42);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  text-align: center;
}

.checkout-courtier-progress__spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  border: 3px solid rgba(165, 180, 252, 0.2);
  border-top-color: #a5b4fc;
  animation: checkoutCourtierSpin 0.85s linear infinite;
}

@keyframes checkoutCourtierSpin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-courtier-progress__title {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
  line-height: 1.35;
}

.checkout-courtier-progress__hint {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(199, 210, 254, 0.92);
  line-height: 1.45;
}

/* Toast fin de traitement : bleu lisible (pas vert, pas trop transparent). */
#view-orders .checkout-courtier-toast.checkout-courtier-toast--done {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 90;
  width: min(34rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 1rem 1.35rem;
  border-radius: var(--radius-sm);
  text-align: center;
  white-space: normal;
  pointer-events: none;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
  color: #e8f4ff;
  background: rgba(30, 58, 138, 0.97);
  border: 1px solid rgba(125, 211, 252, 0.55);
  box-shadow: 0 18px 50px rgba(8, 12, 28, 0.55);
}

#view-orders .checkout-courtier-toast[hidden] {
  display: none !important;
}

.orders-sync-center {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(8, 15, 38, 0.35);
}

.orders-sync-center[hidden] {
  display: none !important;
}

.orders-sync-center__card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 45px rgba(8, 15, 38, 0.22);
}

.orders-sync-center__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(11, 19, 43, 0.12);
  border-top-color: #0b63f6;
  animation: ordersSpin 0.8s linear infinite;
  flex-shrink: 0;
}

.orders-sync-center__text {
  margin: 0;
  font-weight: 650;
  color: #0b132b;
}

@keyframes ordersSpin {
  to {
    transform: rotate(360deg);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.field__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.9;
  margin-top: -0.2rem;
}

.field__hint--error {
  color: #fecaca;
  opacity: 1;
}

.field__hint--success {
  color: #bbf7d0;
  opacity: 1;
}

.inline-code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.field input {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field__textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.field__textarea:focus {
  outline: none;
  border-color: rgba(91, 141, 239, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.15);
}

.field--fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem 1.1rem;
  margin: 0;
}

.field--fieldset > legend.field__label {
  padding: 0 0.35rem;
}

/* Formulaire Compagnie : disposition horizontale */
.form--compagnie {
  gap: 1.15rem;
}

.form-compagnie__row {
  display: grid;
  gap: 1rem 1.35rem;
  align-items: end;
}

.form-compagnie__row--head {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(9rem, 0.65fr) minmax(0, 1.2fr);
}

.form-compagnie__row--2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.form-compagnie__row--prov {
  grid-template-columns: minmax(5rem, 9rem) minmax(6.5rem, 10rem);
}

.form-compagnie__fieldset-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field--compagnie-cell {
  margin: 0;
  min-width: 0;
}

.form-compagnie__fieldset {
  margin: 0;
}

.form__address-lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form__address-lines .field--address-line {
  margin: 0;
}

.form__address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  align-items: end;
  max-width: 28rem;
}

.form__address-grid .field--address-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field--logo .compagnie-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 0.35rem;
}

.field.field--logo.form-compagnie__logo-block .compagnie-logo-row {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr);
  align-items: start;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

@media (max-width: 720px) {
  .form-compagnie__row--head {
    grid-template-columns: 1fr;
  }

  .form-compagnie__row--2 {
    grid-template-columns: 1fr;
  }

  .form-compagnie__row--prov {
    grid-template-columns: 1fr 1fr;
  }

  .field.field--logo.form-compagnie__logo-block .compagnie-logo-row {
    grid-template-columns: 1fr;
  }
}

.compagnie-logo-preview-wrap {
  flex-shrink: 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
}

.compagnie-logo-preview {
  display: block;
  max-width: min(200px, 100%);
  max-height: 120px;
  object-fit: contain;
}

.compagnie-logo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.compagnie-logo-actions input[type='file'] {
  max-width: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.field input:focus {
  outline: none;
  border-color: rgba(91, 141, 239, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.15);
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.saved-toast {
  font-size: 0.88rem;
  color: var(--success);
}

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }

  .app .sidebar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: auto !important;
    box-shadow: none !important;
    transition: none !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .app .main {
    margin-left: 0 !important;
    transition: none !important;
  }

  .sidebar .nav__sub {
    display: flex !important;
  }

  .sidebar .sidebar__footer {
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
    overflow: visible !important;
    margin-top: auto !important;
    padding-top: 0.5rem !important;
    gap: 0.75rem !important;
  }

  .sidebar .sidebar__brand > div {
    display: block !important;
  }

  .sidebar .sidebar__nav-label,
  .sidebar .nav__item-text,
  .sidebar .nav__item-count {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
  }

  .sidebar .nav {
    pointer-events: auto !important;
  }

  .sidebar .nav__group-summary,
  .sidebar .nav__item:not(.nav__item--sub) {
    justify-content: flex-start !important;
    gap: 0.65rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .nav {
    flex-direction: row;
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .nav__group {
    width: 100%;
  }

  .nav__sub {
    margin-left: 0.75rem;
  }

  .sidebar__footer {
    flex-basis: 100%;
    order: 10;
    margin-top: 0;
    padding-top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 1rem;
  }

  .sidebar__hint {
    display: none;
  }

  .btn--sidebar-logout {
    width: auto;
  }

  .main {
    padding: 1.25rem;
  }

  .view--home.view--active {
    min-height: calc(100vh - 14rem);
    margin-right: -1.25rem;
  }
}

/* --- Produits (Shopify-like) : recherche au-dessus, liste + éditeur, typo réduite --- */
.view--produits {
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: none;
  margin: 0;
  overflow-x: hidden;
}

.view--produits .main__header h1 {
  font-size: 1.3rem;
}

.view--produits .main__lede {
  font-size: 0.75rem;
}

.view--produits .field__label {
  font-size: 0.7rem;
}

.view--produits .field__hint {
  font-size: 0.68rem;
}

.view--produits .form-product input,
.view--produits .form-product select,
.view--produits .form-product textarea {
  font-size: 0.8125rem;
  padding: 0.35rem 0.5rem;
}

.view--produits .form-product input[type='checkbox'],
.view--produits .form-product input[type='radio'] {
  padding: 0;
  font-size: inherit;
}

.view--produits .form-product {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Même vue : pas de défilement horizontal sur les tableaux (le défilement vertical = .main). */
.view--produits .table-wrap {
  overflow-x: hidden;
  max-width: 100%;
}

.view--produits #product-variants-table {
  table-layout: fixed;
  width: 100%;
}

.view--produits #product-variants-table .product-variant-row__title {
  width: 26%;
  max-width: 12rem;
}

.view--produits #product-variants-table .product-variant-row__label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.products-layout {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
  grid-template-areas:
    'search search'
    'list main';
  gap: 0.55rem 0.75rem;
  align-items: start;
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width: 36rem) {
  .products-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'search'
      'list'
      'main';
  }
}

.products-search-row {
  grid-area: search;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.35rem;
  padding: 0.45rem 0.65rem;
}

.products-search-row__left {
  min-width: 0;
}

.products-search-row__center {
  justify-self: center;
  align-self: center;
  min-width: 0;
}

.products-search-row__count {
  justify-self: end;
  margin: 0;
  text-align: right;
}

@media (max-width: 40rem) {
  .products-search-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      'search'
      'mode'
      'count';
  }

  .products-search-row__left {
    grid-area: search;
  }

  .products-search-row__center {
    grid-area: mode;
    justify-self: center;
  }

  .products-search-row__count {
    grid-area: count;
    justify-self: center;
    text-align: center;
  }
}

.products-search-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: min(100%, 10rem);
}

.products-search-field__label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #dbe9ff;
}

.products-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.5rem !important;
  font-size: 0.8125rem !important;
  color: #f4f8ff;
}

.products-search-input::placeholder {
  color: #b8cae8;
  opacity: 1;
}

.products-search-clear {
  flex-shrink: 0;
  padding: 0.24rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #e8f1ff;
  border-color: rgba(180, 210, 255, 0.6);
  background: rgba(120, 165, 255, 0.12);
}

.products-list-count--bar {
  font-size: 0.68rem;
  white-space: nowrap;
  color: #dbe9ff;
  font-weight: 600;
}

.products-layout--sidebar-hidden {
  grid-template-columns: 1fr;
  grid-template-areas:
    'search'
    'main';
  gap: 0.5rem;
}

.products-layout--sidebar-hidden .products-sidebar {
  display: none;
}

.products-sidebar {
  grid-area: list;
  padding: 0.55rem 0.65rem;
  min-width: 0;
  overflow-x: hidden;
}

.products-main {
  grid-area: main;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  overflow-x: hidden;
}

.products-main__content {
  min-width: 0;
}

.products-main__collapse-row {
  margin: -0.15rem 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.products-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
}

.products-sidebar-toggle__chev {
  display: inline-block;
  font-size: 0.65rem;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.products-layout--sidebar-hidden .products-sidebar-toggle__chev {
  transform: rotate(180deg);
}

.products-list-wrap {
  min-height: 3rem;
}

.products-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.products-list__btn {
  width: 100%;
  text-align: left;
  padding: 0.38rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.products-list__btn:hover {
  background: var(--bg-hover);
}

.products-list__btn--active {
  border-color: rgba(91, 141, 239, 0.55);
  background: rgba(91, 141, 239, 0.1);
}

.products-list__title {
  font-weight: 600;
  display: block;
}

.products-list__meta {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.08rem;
}

.products-list__options {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text, inherit);
  opacity: 0.92;
  margin-top: 0.2rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-editor-empty {
  padding: 1rem 0;
  font-size: 0.78rem;
}

.product-print-summary {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.45rem 0.1rem;
}

/* L’attribut hidden doit primer : sinon `display: flex` masque l’effet de hidden. */
.product-print-summary[hidden] {
  display: none !important;
}

.product-print-summary__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.product-print-summary__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.product-print-summary__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.6rem;
  min-width: 10.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 0.45rem;
}

.product-print-summary__status--active {
  color: #7de3ae;
}

.product-print-summary__description {
  margin: 0;
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.5;
}

.product-print-summary__metafield {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.45;
}

.product-print-summary__commerce-qty {
  margin: 0.15rem 0 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.product-print-labels {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.product-print-labels__pkg-banner {
  font-size: 0.82rem;
  font-weight: 600;
  color: #dbe9ff;
  padding: 0.38rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(120, 165, 255, 0.14);
  border: 1px solid rgba(180, 210, 255, 0.38);
}

.product-print-labels__single-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
}

.product-print-labels__pair {
  font-size: 0.8rem;
  color: var(--text);
}

.product-print-labels__variant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.45rem;
}

.product-print-labels__variant-row--single .product-print-labels__variant-tail {
  margin-left: auto;
}

.product-print-labels__variant-name {
  flex: 0 1 auto;
  min-width: min(100%, 6.5rem);
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
}

.product-print-labels__variant-customs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  flex: 1 1 6rem;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.product-print-labels__custom-val {
  color: var(--text);
}

.product-print-labels__variant-tail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-left: auto;
}

.view--produits .form-product__body {
  max-width: min(100%, 88rem);
  margin-inline: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.view--produits .form-product__body--stack {
  gap: 1rem;
}

.view--produits .field--product-status-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 1.95rem;
  box-sizing: border-box;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(0, 0, 0, 0.08);
}

.view--produits .field--product-status-toolbar select:focus {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.4);
  background: var(--bg);
}

.view--produits .product-pricing-fieldset {
  margin: 0;
  --pricing-control-h: 2.75rem;
}

.view--produits .product-pricing-fieldset__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 40rem) {
  .view--produits .product-pricing-fieldset__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem 1.25rem;
  }
}

.view--produits .product-pricing-fieldset__grid > .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.view--produits .product-pricing-fieldset__price .field__label,
.view--produits .product-pricing-fieldset__tax .field__label {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

/* Même hauteur, même fond (thème sombre) : pas de fallback #fff sur le wrap */
.view--produits .product-pricing-fieldset .product-price-input-wrap {
  display: flex;
  align-items: center;
  min-height: var(--pricing-control-h);
  flex: 1 0 var(--pricing-control-h);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.view--produits .product-pricing-fieldset__price:hover .product-price-input-wrap:not(.product-price-input-wrap--checkbox) {
  border-color: rgba(129, 140, 248, 0.45);
}

.view--produits .product-pricing-fieldset__price:focus-within .product-price-input-wrap:not(.product-price-input-wrap--checkbox) {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.12);
}

.view--produits .product-price-input-wrap__prefix {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 0.2rem 0 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--border);
}

.view--produits .product-price-input-wrap__input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.5rem 0.65rem 0.5rem 0.35rem;
  background: transparent !important;
  color: var(--text) !important;
}

.view--produits .product-pricing-fieldset__price .product-price-input-wrap__input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.view--produits .product-price-input-wrap--checkbox {
  justify-content: center;
  padding: 0 0.75rem;
  cursor: pointer;
}

.view--produits .product-price-input-wrap--checkbox input[type='checkbox'] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent, #2563eb);
}

.view--produits .product-pricing-fieldset__tax:hover .product-price-input-wrap--checkbox {
  border-color: rgba(129, 140, 248, 0.45);
}

.view--produits .product-pricing-fieldset__tax:has(#product-field-taxable:checked) .product-price-input-wrap--checkbox {
  border-color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.06);
}

.view--produits .product-pricing-fieldset__tax:focus-within .product-price-input-wrap--checkbox {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.12);
}

.view--produits .product-media-fieldset {
  margin: 0;
  position: relative;
}

.view--produits .product-media-fieldset__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.35rem;
}

.view--produits .product-media-fieldset__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.view--produits .product-media-fieldset__video-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent, #5b8def);
  cursor: not-allowed;
  opacity: 0.45;
}

.view--produits .product-media-fieldset__video-link:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}

.view--produits .product-media-fieldset__video-chev {
  font-size: 0.65em;
  opacity: 0.85;
}

.view--produits .product-media-fieldset__hint {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.view--produits .product-gallery-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.view--produits .product-images-preview {
  display: contents;
}

/* Tuile « + Envoyer des images » (type Shopify admin) */
.view--produits .product-gallery-add-tile {
  flex: 0 0 auto;
  width: 7.5rem;
  height: 7.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.35rem;
  border: 2px dashed var(--accent, #5b8def);
  border-radius: 10px;
  background: rgba(91, 141, 239, 0.06);
  color: var(--accent, #5b8def);
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.view--produits .product-gallery-add-tile:hover,
.view--produits .product-gallery-add-tile:focus {
  outline: none;
  border-color: var(--accent-hover, #7c9ff0);
  background: rgba(91, 141, 239, 0.1);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.12);
}

.view--produits .product-media-dropzone--drag.product-gallery-add-tile {
  border-style: solid;
  background: rgba(91, 141, 239, 0.14);
}

.view--produits .product-media-dropzone--disabled.product-gallery-add-tile {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.view--produits .product-gallery-add-tile__plus {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  margin-top: -0.1rem;
}

.view--produits .product-gallery-add-tile__label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 5.5rem;
}

.product-images-input-screen {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.product-image-card {
  position: relative;
  flex: 0 0 auto;
  width: 7.5rem;
  height: 7.5rem;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.product-image-card__frame {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 9px;
}

.product-image-card--existing img,
.product-image-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.product-image-card__remove-icon {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 2;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 18, 26, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}

.product-image-card__remove-icon:hover {
  background: rgba(185, 28, 28, 0.9);
}

.view--produits .form-product__stock-row {
  display: grid;
  gap: 0.65rem 1rem;
  align-items: end;
}

.view--produits .form-product__stock-row--qty-only {
  grid-template-columns: minmax(5.5rem, 10rem);
}

@media (max-width: 28rem) {
  .view--produits .form-product__stock-row--qty-only {
    grid-template-columns: 1fr;
  }

  .view--produits .field--stock-qty {
    max-width: 9rem;
  }
}

.view--produits .field--stock-qty input {
  max-width: 8ch;
  width: 100%;
}

.view--produits .form-product__stock-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

.view--produits .form-product__stock-grid--2 {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 34rem) {
  .view--produits .form-product__stock-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Bloc « Attributs » (produit unique) — grille type Ecwid : libellé | valeur + aide */
.view--produits .product-attrs-fieldset {
  margin: 0;
  padding: 0;
}

.view--produits .product-attrs-fieldset__title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text);
}

.view--produits .product-attrs-fieldset__table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.view--produits .product-attrs-fieldset__thead {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.38fr) minmax(0, 1fr);
  gap: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}

.view--produits .product-attrs-fieldset__th:last-child {
  padding-left: 0.35rem;
}

.view--produits .product-attrs-fieldset__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.38fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  padding: 0.65rem 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.view--produits .product-attrs-fieldset__row:last-child {
  border-bottom: none;
}

.view--produits .product-attrs-fieldset__attr {
  padding: 0.35rem 0.5rem 0 0;
}

.view--produits .product-attrs-fieldset__attr-name {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.view--produits .product-attrs-fieldset__val {
  min-width: 0;
  padding-left: 0.35rem;
}

.view--produits .product-attrs-fieldset__input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
}

.view--produits .product-attrs-fieldset__hint {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 36rem;
}

.view--produits .product-attrs-fieldset__hint--attr {
  margin: 0.25rem 0 0;
  max-width: 14rem;
}

.view--produits .product-attrs-fieldset__measure-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.view--produits .product-attrs-fieldset__input--qty {
  flex: 1 1 6rem;
  min-width: 0;
  max-width: 10rem;
}

.view--produits .product-attrs-fieldset__unit-select {
  flex: 0 0 auto;
  min-width: 4.5rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}

.view--produits .product-attrs-fieldset__profit-hint {
  color: rgba(129, 140, 248, 0.95);
}

.view--produits .product-vendor-anchor-in-attrs,
.view--produits .product-vendor-anchor-unique {
  min-width: 0;
}

.view--produits .form-product__vendor-row--in-commerce {
  margin: 0;
  max-width: none;
}

.view--produits .product-unique-commerce__grid .form-product__vendor-row--in-commerce {
  grid-column: 1 / -1;
}

.view--produits .product-unique-commerce__weight {
  grid-column: 1 / -1;
}

.view--produits .product-unique-commerce .product-unique-commerce__tax-wrap {
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0 0.75rem;
}

.view--produits .product-unique-commerce__tax-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.35;
}

.view--produits .product-simple-upgrade-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.35rem;
}

.view--produits .product-simple-upgrade-fieldset {
  margin: 0;
}

.view--produits .form-product__vendor-row--in-attrs {
  margin: 0;
  padding: 0;
  border: 0;
}

.view--produits .form-product__vendor-row--in-attrs .field {
  margin: 0;
}

.view--produits .form-product__vendor-row--in-attrs .field__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.view--produits .form-product__vendor-row--in-attrs select {
  width: 100%;
  min-height: 2.35rem;
  box-sizing: border-box;
}

@media (max-width: 26rem) {
  .view--produits .product-attrs-fieldset__thead,
  .view--produits .product-attrs-fieldset__row {
    grid-template-columns: 1fr;
  }

  .view--produits .product-attrs-fieldset__th:last-child {
    display: none;
  }

  .view--produits .product-attrs-fieldset__attr {
    padding-bottom: 0.2rem;
  }

  .view--produits .product-attrs-fieldset__val {
    padding-left: 0;
  }
}

.view--produits .product-dimensions-fieldset {
  margin: 0;
}

.view--produits .product-dimensions-fieldset__intro {
  margin: 0 0 0.85rem;
  max-width: 52rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Rangée type Ecwid : poids (valeur + unité dans un bloc) */
.view--produits .product-dimensions-fieldset__measure-row {
  display: grid;
  gap: 0.65rem 0.75rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 40rem) {
  .view--produits .product-dimensions-fieldset__measure-row {
    grid-template-columns: minmax(9.5rem, 14rem);
  }
}

.view--produits .product-dim-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 3.35rem;
  padding: 0.38rem 0.55rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.view--produits .product-dim-box:focus-within {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.view--produits .product-dim-box__label {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-muted);
  margin: 0;
  cursor: pointer;
}

.view--produits .product-dim-box--weight .product-dim-box__label {
  display: block;
}

.view--produits .product-dim-box__weight-row {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  margin-top: 0.12rem;
  border-radius: 0;
  overflow: visible;
}

.view--produits .product-dim-box__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0 0;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

.view--produits .product-dim-box__input::placeholder {
  color: var(--text-muted);
  opacity: 0.55;
  font-weight: 400;
}

.view--produits .product-dim-box__input--weight-value {
  flex: 1;
  min-width: 0;
  padding: 0.2rem 0.45rem 0.25rem 0.5rem !important;
}

.view--produits .product-dim-box__unit-seg {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  align-self: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.view--produits .product-dim-box__unit-select {
  margin: 0;
  min-width: 2.75rem;
  max-width: 4rem;
  padding: 0.2rem 1.35rem 0.2rem 0.45rem !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.view--produits .product-dim-box__unit-select:focus {
  outline: none;
}

.view--produits .form-product__simple-sku-wrap {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.view--produits .form-product__columns {
  display: grid;
  gap: 0.75rem 1rem;
  align-items: start;
  grid-template-columns: 1fr;
}

.view--produits .form-product__col-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.view--produits .form-product__vendor-row {
  max-width: min(100%, 36rem);
}

.view--produits .form-product__vendor-row select {
  width: 100%;
  max-width: 100%;
}

.view--produits .form-product__col-description {
  min-width: 0;
  width: 100%;
}

/* Une colonne : description en pleine largeur sous les champs (aperçu plus lisible). */
@media (max-width: 74.9375rem) {
  .view--produits .form-product__col-description {
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
  }

  .view--produits .form-product__description-field .product-desc-preview-iframe {
    height: auto;
    min-height: 17rem;
    max-height: min(48vh, 26rem);
  }

  .view--produits .form-product__description-field .product-desc-plain {
    max-height: min(48vh, 28rem);
  }
}

.product-desc-intro {
  margin-bottom: 0.35rem;
}

.product-desc-panel--html {
  margin-top: 0.55rem;
}

/* Édition : seul le bloc texte est visible — un peu plus d’air sous le libellé « Description » */
.form-product__description-field--editing .product-desc-panel--html {
  margin-top: 0.3rem;
}

.form-product__description-field--editing .product-desc-plain {
  min-height: min(46vh, 24rem);
}

.product-desc-panel--preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #141416;
}

.product-desc-preview-iframe {
  display: block;
  width: 100%;
  height: 12rem;
  border: 0;
  background: #141416;
}

.product-desc-panel--html .product-desc-plain-field {
  margin: 0;
}

.product-desc-plain {
  width: 100%;
  min-height: 10rem;
  max-height: 42vh;
  resize: vertical;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.product-desc-plain::placeholder {
  color: var(--text-muted);
  opacity: 0.72;
  font-size: 0.8rem;
  line-height: 1.45;
}

.product-desc-plain:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.12);
}

.view--produits .form-product__description-field--readonly .product-desc-preview-iframe {
  pointer-events: none;
  opacity: 0.92;
}

/* Deux colonnes seulement sur grands écrans : ~52 % métadonnées / ~48 % description (plus confortable qu’une bande 28 %). */
@media (min-width: 75rem) {
  .view--produits .form-product__columns {
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    gap: 1.15rem 1.75rem;
  }

  .view--produits .form-product__col-description {
    position: sticky;
    top: 0.35rem;
    align-self: start;
    max-height: calc(100vh - 12rem);
    border-top: none;
    padding-top: 0;
  }

  .view--produits .form-product__description-field {
    display: flex;
    flex-direction: column;
    max-height: inherit;
  }

  .view--produits .form-product__description-field .product-desc-preview-iframe {
    height: min(52vh, 30rem);
    max-height: min(58vh, 34rem);
    min-height: 14rem;
  }

  .view--produits .form-product__description-field .product-desc-plain {
    min-height: 16rem;
    max-height: min(58vh, 34rem);
    flex: 1;
  }
}

.product-form-banner--duplicate {
  margin: 0 0 0.65rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.09);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text, inherit);
}

.form-product__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.form-product__toolbar--actions-row {
  justify-content: flex-end;
}

.form-product__toolbar--actions-row .form-product__toolbar-right {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
}

.form-product__title-status-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  min-width: 0;
  width: 100%;
}

.field--product-title-row {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.field--product-title-row .form-product__title-input {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-product__toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  flex: 1;
  min-width: 0;
}

.form-product__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Barre d’actions produit : rail discret + icônes (plus léger que les gros boutons .btn) */
.form-product__toolbar-actions--rail {
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.product-action-rail {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 6px 28px rgba(0, 0, 0, 0.22);
}

.product-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.62rem;
  min-height: 2rem;
  border: none;
  border-radius: 11px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    transform 0.12s ease;
}

.product-action-btn:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.55);
  outline-offset: 2px;
}

.product-action-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.product-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-action-btn__ico {
  flex-shrink: 0;
  opacity: 0.88;
}

.product-action-btn:hover:not(:disabled) .product-action-btn__ico {
  opacity: 1;
}

.product-action-btn--edit {
  color: #e8eafd;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.product-action-btn--edit:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.45);
  color: #fff;
}

.product-action-btn--quiet:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.product-action-btn--commit {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(165deg, #7c83f7 0%, #4f46e5 52%, #4338ca 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 12px rgba(67, 56, 202, 0.35);
}

.product-action-btn--commit:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 18px rgba(67, 56, 202, 0.42);
}

.product-action-btn--discard {
  width: 2.15rem;
  min-width: 2.15rem;
  padding: 0;
  border-radius: 11px;
  color: rgba(148, 163, 184, 0.75);
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.12);
}

.product-action-btn--discard:hover:not(:disabled) {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}

.view--produits .product-action-btn {
  font-size: 0.7rem;
  min-height: 1.85rem;
  padding: 0.3rem 0.52rem;
}

.view--produits .product-action-btn--discard {
  width: 2rem;
  min-width: 2rem;
}

.view--produits .product-action-rail {
  padding: 2px;
  border-radius: 12px;
}

.field--product-status-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin: 0;
  flex: 0 0 auto;
  align-self: flex-end;
  min-width: 7.25rem;
  max-width: 10rem;
}

.field--product-status-toolbar .field__label {
  margin: 0;
  padding: 0;
}

.product-mode-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  line-height: 1.25;
  white-space: nowrap;
}

.product-mode-badge--readonly {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  opacity: 0.92;
}

.product-mode-badge--edit {
  color: var(--accent-hover);
  border: 1px solid rgba(91, 141, 239, 0.28);
  background: rgba(91, 141, 239, 0.06);
  opacity: 1;
}

.form-product__row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.form-product__fieldset {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.form-product__fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.product-variants-add-option-wrap {
  margin: 0.35rem 0 0.65rem;
}

.product-variants-add-option.product-variants-add-option--max {
  opacity: 0.45;
  pointer-events: none;
}

.product-options-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.product-options-rows--readonly .product-option-block__summary {
  cursor: default;
  pointer-events: none;
}

.product-options-rows--readonly .product-option-block__summary-name {
  font-size: 0.95rem;
}

.product-options-rows--readonly .product-option-values-list--summary {
  gap: 0.28rem;
}

.product-option-block {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt, rgba(0, 0, 0, 0.02));
  overflow: hidden;
}

.product-option-block--expanded {
  border-color: var(--accent, #2563eb);
}

.product-option-block__summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
}

.product-option-block__summary:hover {
  background: var(--surface-hover, rgba(0, 0, 0, 0.04));
}

.product-option-block--expanded .product-option-block__summary {
  display: none;
}

.product-option-block__summary-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.product-option-values-list--summary {
  margin: 0;
  padding: 0;
}

.product-option-block__summary-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.product-option-block__editor {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.product-option-block__editor[hidden] {
  display: none !important;
}

.product-option-block__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.product-option-block__field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product-option-block__value-input-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.product-option-block__value-input-row .global-search {
  flex: 1;
  min-width: 0;
}

.product-option-block__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.product-option-block__footer-spacer {
  flex: 1;
}

.product-option-values-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.product-option-value-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.35rem 0.15rem 0.5rem;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff);
}

.product-option-value-chip__remove {
  margin: 0;
  padding: 0 0.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.product-option-value-chip__remove:hover {
  color: var(--danger, #c00);
}

.product-option-value-chip--readonly {
  padding: 0.2rem 0.45rem;
  cursor: default;
}

.product-variant-row__title {
  vertical-align: middle;
}

.product-variant-row__label {
  display: block;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.25;
  margin-bottom: 0.15rem;
}

.product-variants-wrap {
  margin-top: 0.5rem;
}

.product-variant-th--narrow {
  width: 4.2rem;
  white-space: nowrap;
}

.product-variant-row__num .global-search {
  max-width: 5rem;
}

.product-variant-row__tax {
  vertical-align: middle;
}

.product-variant-tax-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  white-space: nowrap;
  cursor: pointer;
}

.view--produits .table--compact th,
.view--produits .table--compact td {
  font-size: 0.68rem;
  padding: 0.3rem 0.38rem;
}

.view--produits .form-product__toolbar {
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  gap: 0.45rem;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.view--produits .product-mode-badge {
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.03em;
}

.view--produits .form-product__row2 {
  gap: 0.5rem;
}

.view--produits .form-product__fieldset {
  margin-top: 0.6rem;
  padding: 0.5rem 0.6rem;
}

.view--produits .form-product__fieldset legend {
  font-size: 0.72rem;
}

.view--produits .product-desc-plain {
  font-size: 0.82rem;
}

.view--produits .product-option-block__head-label,
.view--produits .product-option-block__value-label {
  font-size: 0.66rem;
}

/* -------------------------------------------------------------------------- */
/* Préparation des commandes : polish UI (icônes, boutons, panneau)         */
/* -------------------------------------------------------------------------- */

#view-orders .main__header {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#view-orders .main__header h1 {
  font-size: 1.78rem;
  letter-spacing: -0.035em;
  text-shadow: 0 0 40px rgba(129, 140, 248, 0.28);
}

#view-orders .main__lede {
  font-size: 0.92rem;
  opacity: 0.9;
}

#view-orders #btn-sync.btn-sync {
  border-radius: 999px;
  padding: 0.72rem 1.4rem;
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 4px 22px rgba(91, 141, 239, 0.45),
    0 10px 42px rgba(99, 102, 241, 0.2);
  transition: box-shadow 0.2s ease, transform 0.12s, filter 0.15s;
}

#view-orders #btn-sync.btn-sync:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 6px 32px rgba(91, 141, 239, 0.58),
    0 14px 52px rgba(99, 102, 241, 0.28);
}

#view-orders .btn-sync__lead {
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#view-orders .btn-sync__icon {
  width: 18px;
  height: 18px;
  display: block;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#view-orders .btn-sync__lead:has(#btn-sync-spinner:not([hidden])) .btn-sync__icon {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

#view-orders .btn-sync__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
}

#view-orders .btn-sync__label {
  white-space: nowrap;
}

/* Vue commandes : plus large que le .view par défaut (1200px) pour éviter de tasser Statut + actions. */
#view-orders.view {
  max-width: min(100%, 96rem);
  position: relative;
}

#view-orders > .panel {
  border-radius: calc(var(--radius) + 4px);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(99, 102, 241, 0.07),
    0 22px 64px rgba(8, 15, 38, 0.32);
  /* Ne pas rogner le défilement horizontal du tableau (sinon dernières icônes « coupées » au bord du panneau). */
  overflow-x: visible;
  overflow-y: visible;
}

#view-orders .panel__toolbar--tools {
  padding: 1rem 1.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 100%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

#view-orders .panel__toolbar--orders-search {
  justify-content: flex-end;
}

#view-orders .panel__toolbar--orders-search .toolbar-tools--orders {
  flex: 1 1 auto;
  justify-content: flex-end;
}

#view-orders .toolbar-tools--orders .global-search {
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 28, 0.55);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#view-orders .toolbar-tools--orders .global-search:focus {
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14), 0 8px 28px rgba(8, 15, 38, 0.28);
  background: rgba(15, 20, 38, 0.78);
}

#view-orders #btn-clear-search {
  border-radius: 999px;
  font-weight: 600;
}

#view-orders #btn-imprimer-paniers-all.btn-toolbar-print {
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  border-color: rgba(129, 140, 248, 0.32);
  color: #c7d2fe;
  gap: 0.45rem;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#view-orders #btn-imprimer-paniers-all.btn-toolbar-print:hover:not(:disabled) {
  border-color: rgba(165, 180, 252, 0.52);
  color: #e8eaff;
  background: rgba(99, 102, 241, 0.14);
  box-shadow: 0 4px 22px rgba(79, 70, 229, 0.22);
}

#view-orders .toolbar-print-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

#view-orders .btn-expand {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#view-orders .btn-expand:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

#view-orders .table__row--master:hover {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent 65%);
}

/* Colonnes : même grille que les en-têtes (padding 1re col. = .th-expand) */
#view-orders #orders-table.table--orders {
  table-layout: fixed;
  width: 100%;
  /* Largeur mini : select + CTA + icônes + Aperçu sans scroll imbriqué dans la cellule (défilement = .table-wrap). */
  min-width: 1340px;
}

#view-orders #orders-table .orders-col-expand {
  width: 3.25rem;
}

#view-orders #orders-table .orders-col-date {
  width: 11rem;
}

#view-orders #orders-table .orders-col-total {
  width: 8.75rem;
}

#view-orders #orders-table .orders-col-statut {
  width: 50%;
  min-width: 44rem;
}

#view-orders #orders-table thead th:nth-child(5),
#view-orders #orders-table tbody tr.table__row--master > td:nth-child(5) {
  min-width: 44rem;
  padding-inline-end: 1.35rem;
}

#view-orders .table-wrap {
  padding-inline-end: 0.65rem;
  padding-inline-start: 0.25rem;
}

#view-orders .orders-prep-cell {
  flex-wrap: nowrap;
  align-items: center;
  /* flex-start évite le chevauchement select / actions quand space-between compresse (deux blocs flex-shrink: 0). */
  justify-content: flex-start;
  column-gap: 1rem;
  row-gap: 0.5rem;
  min-width: min-content;
  /* Un seul scroll horizontal sur .table-wrap : évite le rognage des boutons à droite. */
  overflow: visible;
  padding-block: 0.2rem;
}

#view-orders .orders-prep-cell__actions {
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem 1rem;
}

#view-orders .orders-prep-cell__actions-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1rem;
  flex: 0 0 auto;
}

#view-orders .orders-prep-cell__preview-btn {
  margin-inline-start: auto;
  flex-shrink: 0;
}

/* Air explicite entre le CTA pill et le 1er bouton carré (évite que le fond gris masque l’arrondi droit du bleu). */
#view-orders .orders-prep-cell__actions .btn-preparer-panier {
  margin-inline-end: 0.35rem;
}

#view-orders #orders-table tbody tr.table__row--master > td {
  vertical-align: middle;
}

#view-orders #orders-table tbody tr.table__row--master > td:first-child {
  padding: 0.85rem 0.5rem;
  text-align: center;
}

#view-orders #orders-table tbody tr.table__row--master > td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#view-orders #orders-table tbody tr.table__row--master > td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-orders #orders-table thead th:nth-child(4) .th-sort,
#view-orders #orders-table tbody tr.table__row--master > td:nth-child(4) {
  text-align: right;
}

#view-orders #orders-table thead th:nth-child(4) .th-sort {
  justify-content: flex-end;
}

#view-orders .orders-prep-cell .select-traitement {
  border-radius: 999px;
  /* Un peu plus d’air à gauche pour compenser la flèche native à droite (libellé visuellement centré). */
  padding: 0.42rem 0.72rem 0.42rem 0.95rem;
  font-weight: 600;
  max-width: 12rem;
  flex-shrink: 0;
  text-align: center;
  text-align-last: center;
}

#view-orders .btn-preparer-panier {
  border-radius: 999px;
  flex-shrink: 0;
  padding: 0.52rem 1rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 4px 18px rgba(91, 141, 239, 0.38);
  transition: box-shadow 0.18s ease, transform 0.12s, filter 0.15s;
}

#view-orders .btn-preparer-panier:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 6px 26px rgba(91, 141, 239, 0.5);
}

#view-orders .btn-preparer-panier__icon {
  transition: transform 0.2s ease;
}

#view-orders .btn-preparer-panier:hover:not(:disabled) .btn-preparer-panier__icon {
  transform: translateY(-1px) scale(1.06);
}

#view-orders .orders-prep-cell__actions .btn-imprimer-panier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #c7d2fe;
}

#view-orders .orders-prep-cell__actions .btn-imprimer-panier:hover:not(:disabled) {
  border-color: rgba(165, 180, 252, 0.48);
  color: #eef2ff;
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.24);
}

#view-orders .expand-footer .btn--ghost {
  border-radius: 999px;
}

#view-orders .btn-imprimer-panier {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#view-orders .btn-imprimer-panier .icon-print {
  flex-shrink: 0;
  display: block;
}

#view-orders .orders-prep-cell__actions .btn-checkout-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #bbf7d0;
}

#view-orders .orders-prep-cell__actions .btn-checkout-order:hover:not(:disabled) {
  border-color: rgba(52, 211, 153, 0.55);
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22);
}

#view-orders .orders-prep-cell__actions .btn-checkout-order:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: rgba(167, 243, 208, 0.38);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
  filter: grayscale(0.25);
}

#view-orders .orders-prep-cell__actions .btn-shipping-label-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fde68a;
}

#view-orders .orders-prep-cell__actions .btn-shipping-label-print:hover:not(:disabled) {
  border-color: rgba(253, 230, 138, 0.55);
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.22);
}

#view-orders .orders-prep-cell__actions .btn-shipping-label-print:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: rgba(253, 224, 71, 0.32);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
  filter: grayscale(0.2);
}

#view-orders .btn-shipping-label-print .icon-bon-expedition-print {
  flex-shrink: 0;
  display: block;
}

/* PNG sur fond noir : le mode fusion atténue le carré noir sur le fond du bouton. */
#view-orders .btn-shipping-label-print .icon-bon-expedition-print--png {
  width: 1.35rem;
  height: 1.35rem;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.92;
  pointer-events: none;
}

#view-orders .orders-prep-cell__actions .btn-shipping-label-print:disabled .icon-bon-expedition-print--png {
  opacity: 0.38;
  filter: grayscale(0.25);
}

#view-orders .btn-checkout-order .icon-checkout {
  flex-shrink: 0;
  display: block;
}

#view-orders .orders-prep-cell__actions .btn-gift-scan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fda4af;
}

#view-orders .orders-prep-cell__actions .btn-gift-scan:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.5);
  color: #fff1f2;
  background: rgba(244, 63, 94, 0.2);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.22);
}

#view-orders .orders-prep-cell__actions .btn-gift-scan.btn-gift-scan--active {
  border-color: rgba(74, 222, 128, 0.7);
  color: #ecfdf5;
  background: rgba(22, 163, 74, 0.28);
  box-shadow: 0 4px 18px rgba(22, 163, 74, 0.25);
}

#view-orders .orders-prep-cell__actions .btn-gift-scan:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: rgba(251, 113, 133, 0.3);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

#view-orders .line-item-gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.4rem;
  padding: 0.06rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ecfdf5;
  background: rgba(34, 197, 94, 0.24);
  border: 1px solid rgba(74, 222, 128, 0.55);
}

/* Archives : clic sur la ligne = ouvrir / fermer le détail (comme commandes actives) */
#view-archived #archived-orders-tbody tr.table__row--master {
  cursor: pointer;
}

#view-archived #archived-orders-tbody tr.table__row--expand {
  cursor: default;
}

/* -------------------------------------------------------------------------- */
/* Archives : tableau principal + zone dépliée (lisibilité, alignement, WOW) */
/* -------------------------------------------------------------------------- */

#view-archived .main__header--archived {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#view-archived .main__header--archived h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

#view-archived .panel--archived-orders {
  border-radius: var(--radius);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

#view-archived .panel__toolbar--archived {
  padding: 0.75rem 1rem;
  background: transparent;
  border-bottom-color: var(--border);
}

#view-archived .toolbar-tools--archived {
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#view-archived .global-search--archived {
  flex: 1 1 auto;
  max-width: 28rem;
  min-width: 10rem;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  border-color: var(--border);
  background: var(--bg);
  transition: border-color 0.15s ease;
}

#view-archived .global-search--archived:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

#view-archived #archived-orders-table.table--archived {
  table-layout: fixed;
  width: 100%;
}

#view-archived #archived-orders-table .archived-col-expand {
  width: 3.25rem;
}

#view-archived #archived-orders-table .archived-col-date {
  width: 13.5rem;
}

#view-archived #archived-orders-table .archived-col-total {
  width: 9rem;
}

#view-archived #archived-orders-table .archived-col-statut {
  min-width: 11rem;
}

#view-archived #archived-orders-table thead .archived-th {
  padding: 0.65rem 0.85rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

#view-archived #archived-orders-table thead th.archived-th--num,
#view-archived #archived-orders-table tbody tr.table__row--master > td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Date + statut : libellé et valeurs centrés sur la même colonne */
#view-archived #archived-orders-table thead th.archived-th:nth-child(3),
#view-archived #archived-orders-table thead th.archived-th:nth-child(5),
#view-archived #archived-orders-table tbody tr.table__row--master > td:nth-child(3),
#view-archived #archived-orders-table tbody tr.table__row--master > td:nth-child(5) {
  text-align: center;
}

#view-archived #archived-orders-table tbody tr.table__row--master > td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#view-archived #archived-orders-table tbody tr.table__row--master > td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-archived #archived-orders-table tbody tr.table__row--master > td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

#view-archived #archived-orders-table tbody tr.table__row--master > td:first-child {
  padding: 0.75rem 0.5rem;
  text-align: center;
}

#view-archived .table-wrap--archived {
  padding: 0 0.15rem 0.35rem;
}

#view-archived .table__row--expand td {
  padding: 0.65rem 1rem 0.9rem;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--border);
}

#view-archived .table__row--expand .expand-body {
  padding: 0.25rem 0 0;
}

#view-archived .table__row--expand .expand-body__empty {
  margin: 0.35rem 0 0.15rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--bg-hover);
}

#view-archived .table__row--master:hover {
  background: var(--bg-hover);
}
