/* ==========================================================================
   X-Cargo — Design system (mobile first)
   Palette : bleu (confiance), rouge (action), blanc (clarté).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Jetons
   -------------------------------------------------------------------------- */
:root {
  --blue-50: #eef4ff;
  --blue-100: #dce7fe;
  --blue-200: #b8cefd;
  --blue-300: #8aaef9;
  --blue-400: #5585f2;
  --blue-500: #2f62e6;
  --blue-600: #1e4bd2;
  --blue-700: #1a3ca8;
  --blue-800: #172f80;
  --blue-900: #0f1f54;
  --blue-950: #091437;

  --red-50: #fff1f2;
  --red-100: #ffe0e3;
  --red-200: #ffc5cb;
  --red-300: #ff9aa5;
  --red-400: #fa6272;
  --red-500: #ee3346;
  --red-600: #d41a30;
  --red-700: #b01328;
  --red-800: #911426;

  --green-50: #ecfdf3;
  --green-100: #d1fadf;
  --green-500: #12a150;
  --green-600: #0e8a43;
  --green-700: #0b6e36;
  --amber-50: #fffaeb;
  --amber-100: #fef0c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --teal-50: #effcfb;
  --teal-600: #0e9384;
  --indigo-50: #eef2ff;
  --indigo-600: #4f46e5;

  --gray-0: #ffffff;
  --gray-25: #fbfcfe;
  --gray-50: #f5f7fb;
  --gray-100: #edf1f7;
  --gray-200: #dfe5ef;
  --gray-300: #c7d0de;
  --gray-400: #97a3b6;
  --gray-500: #6b778c;
  --gray-600: #4e5a6e;
  --gray-700: #374357;
  --gray-800: #232d3f;
  --gray-900: #141b2b;

  /* Sémantique — thème clair */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #eef2f8;
  --border: #e2e8f1;
  --border-strong: #cfd8e5;
  --text: #121a2b;
  --text-muted: #5b677b;
  --text-subtle: #8792a6;
  --primary: var(--blue-600);
  --primary-hover: var(--blue-700);
  --primary-soft: var(--blue-50);
  --primary-soft-text: var(--blue-700);
  --accent: var(--red-500);
  --accent-hover: var(--red-600);
  --accent-soft: var(--red-50);
  --accent-soft-text: var(--red-700);
  --success: var(--green-600);
  --success-soft: var(--green-50);
  --warning: var(--amber-600);
  --warning-soft: var(--amber-50);
  --danger: var(--red-600);
  --danger-soft: var(--red-50);
  --on-primary: #ffffff;
  --focus: 0 0 0 3px rgba(30, 75, 210, 0.32);
  --sidebar-bg: linear-gradient(180deg, #0f1f54 0%, #0b1840 100%);
  --sidebar-text: #c9d4ee;
  --sidebar-muted: #7f8fb8;
  --overlay: rgba(9, 20, 55, 0.55);

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.1), 0 2px 6px -2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 16px 32px -8px rgba(16, 24, 40, 0.14), 0 6px 12px -6px rgba(16, 24, 40, 0.06);
  --shadow-xl: 0 28px 56px -12px rgba(9, 20, 55, 0.28);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --topbar-h: 60px;
  --bottomnav-h: 66px;
  --sidebar-w: 272px;
  --content-max: 1280px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d1a;
    --surface: #111a2e;
    --surface-2: #0e1628;
    --surface-3: #18233b;
    --border: #22304b;
    --border-strong: #2e3e5e;
    --text: #e8edf7;
    --text-muted: #9aa7bf;
    --text-subtle: #6f7d98;
    --primary: #5585f2;
    --primary-hover: #7aa0f6;
    --primary-soft: rgba(85, 133, 242, 0.14);
    --primary-soft-text: #9ab8fa;
    --accent: #fa6272;
    --accent-hover: #ff8591;
    --accent-soft: rgba(250, 98, 114, 0.14);
    --accent-soft-text: #ff9aa5;
    --success: #34c472;
    --success-soft: rgba(52, 196, 114, 0.13);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.13);
    --danger: #fa6272;
    --danger-soft: rgba(250, 98, 114, 0.14);
    --sidebar-bg: linear-gradient(180deg, #0b1330 0%, #070d22 100%);
    --overlay: rgba(2, 6, 18, 0.7);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080d1a;
  --surface: #111a2e;
  --surface-2: #0e1628;
  --surface-3: #18233b;
  --border: #22304b;
  --border-strong: #2e3e5e;
  --text: #e8edf7;
  --text-muted: #9aa7bf;
  --text-subtle: #6f7d98;
  --primary: #5585f2;
  --primary-hover: #7aa0f6;
  --primary-soft: rgba(85, 133, 242, 0.14);
  --primary-soft-text: #9ab8fa;
  --accent: #fa6272;
  --accent-hover: #ff8591;
  --accent-soft: rgba(250, 98, 114, 0.14);
  --accent-soft-text: #ff9aa5;
  --success: #34c472;
  --success-soft: rgba(52, 196, 114, 0.13);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.13);
  --danger: #fa6272;
  --danger-soft: rgba(250, 98, 114, 0.14);
  --sidebar-bg: linear-gradient(180deg, #0b1330 0%, #070d22 100%);
  --overlay: rgba(2, 6, 18, 0.7);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
}
h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.4em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
  color: var(--text);
}
h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1.08rem;
}
h4 {
  font-size: 0.98rem;
}
p {
  margin: 0 0 1em;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
small {
  font-size: 0.85em;
}
code,
kbd,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}
::selection {
  background: var(--blue-200);
  color: var(--blue-950);
}
[hidden] {
  display: none !important;
}
.icon {
  display: inline-block;
  vertical-align: -0.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.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;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-sm);
}
.skip-link:focus {
  left: 8px;
}

/* --------------------------------------------------------------------------
   3. Utilitaires
   -------------------------------------------------------------------------- */
.text-muted {
  color: var(--text-muted) !important;
}
.text-subtle {
  color: var(--text-subtle) !important;
}
.text-primary {
  color: var(--primary) !important;
}
.text-accent {
  color: var(--accent) !important;
}
.text-success {
  color: var(--success) !important;
}
.text-warning {
  color: var(--warning) !important;
}
.text-danger {
  color: var(--danger) !important;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.78rem;
}
.text-lg {
  font-size: 1.1rem;
}
.fw-500 {
  font-weight: 500;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.inline-icon {
  display: inline-flex;
  vertical-align: -2px;
}
.route-arrow {
  display: inline-flex;
  vertical-align: -2px;
  margin: 0 2px;
  opacity: 0.7;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.flex-1 {
  flex: 1 1 0;
  min-width: 0;
}
.flex-wrap {
  flex-wrap: wrap;
}
.gap-1 {
  gap: 4px;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.gap-6 {
  gap: 24px;
}
.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-6 {
  margin-top: 24px;
}
.mt-8 {
  margin-top: 32px;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 4px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 16px;
}
.mb-6 {
  margin-bottom: 24px;
}
.ml-auto {
  margin-left: auto;
}
.w-full {
  width: 100%;
}
.stack > * + * {
  margin-top: 16px;
}
.stack-sm > * + * {
  margin-top: 8px;
}
.stack-lg > * + * {
  margin-top: 24px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .span-2-lg {
    grid-column: span 2;
  }
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1023px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}
.divider-dot::before {
  content: "•";
  margin: 0 6px;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   4. Boutons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface);
  --btn-color: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s, box-shadow 0.15s, transform 0.08s;
  position: relative;
}
.btn:hover {
  color: var(--btn-color);
  background: var(--surface-2);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.btn-primary {
  --btn-bg: var(--primary);
  --btn-color: #fff;
  --btn-border: var(--primary);
  box-shadow: 0 1px 2px rgba(30, 75, 210, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}
.btn-accent {
  --btn-bg: var(--accent);
  --btn-color: #fff;
  --btn-border: var(--accent);
  box-shadow: 0 1px 2px rgba(212, 26, 48, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-success {
  --btn-bg: var(--success);
  --btn-color: #fff;
  --btn-border: var(--success);
}
.btn-success:hover {
  filter: brightness(1.06);
  background: var(--success);
  color: #fff;
}
.btn-danger {
  --btn-bg: var(--surface);
  --btn-color: var(--danger);
  --btn-border: color-mix(in srgb, var(--danger) 35%, var(--border));
}
.btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-soft {
  --btn-bg: var(--primary-soft);
  --btn-color: var(--primary-soft-text);
  --btn-border: transparent;
}
.btn-soft:hover {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary-soft-text);
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--text);
}
.btn-white {
  --btn-bg: #fff;
  --btn-color: var(--blue-900);
  --btn-border: #fff;
}
.btn-white:hover {
  background: var(--blue-50);
  color: var(--blue-900);
}
.btn-outline-white {
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.35);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
  border-radius: var(--r-sm);
  gap: 6px;
}
.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.02rem;
  border-radius: var(--r-lg);
}
.btn-xl {
  min-height: 60px;
  padding: 0 28px;
  font-size: 1.1rem;
  border-radius: var(--r-lg);
}
.btn-block {
  width: 100%;
}
.btn-icon {
  width: 44px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 36px;
}
.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.9) rgba(255, 255, 255, 0.9) transparent transparent;
  animation: spin 0.7s linear infinite;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   5. Cartes, tuiles, listes
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}
.card-body {
  padding: 16px;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 1rem;
}
.card-header .card-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.card-link {
  display: block;
  color: inherit;
  transition: transform 0.15s var(--ease), box-shadow 0.15s, border-color 0.15s;
}
.card-link:hover {
  color: inherit;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
@media (min-width: 768px) {
  .card-body {
    padding: 20px 22px;
  }
  .card-header {
    padding: 16px 22px;
  }
  .card-footer {
    padding: 14px 22px;
  }
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}
.section-title h2 {
  font-size: 1.05rem;
  margin: 0;
}
.section-title a {
  font-size: 0.88rem;
  font-weight: 600;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  min-width: 0;
  color: inherit;
}
a.stat:hover {
  color: inherit;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.stat-icon.is-red {
  background: var(--accent-soft);
  color: var(--accent);
}
.stat-icon.is-green {
  background: var(--success-soft);
  color: var(--success);
}
.stat-icon.is-amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 550;
}
.stat-value {
  font-size: clamp(1.15rem, 5.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat-meta {
  font-size: 0.8rem;
  color: var(--text-subtle);
}
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 650;
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: var(--r-full);
}
.stat-trend.up {
  color: var(--success);
  background: var(--success-soft);
}
.stat-trend.down {
  color: var(--danger);
  background: var(--danger-soft);
}
.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .stat {
    padding: 20px;
  }
  .stat-value {
    font-size: clamp(1.4rem, 2vw, 1.9rem);
  }
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  min-width: 0;
}
.list-item:last-child {
  border-bottom: 0;
}
a.list-item:hover {
  background: var(--surface-2);
  color: inherit;
}
.list-item-body {
  flex: 1 1 auto;
  min-width: 0;
}
.list-item-title {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item-meta {
  color: var(--text-muted);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item-trailing {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.list-item .chevron {
  color: var(--text-subtle);
}
@media (min-width: 768px) {
  .list-item {
    padding: 14px 22px;
  }
}

.thumb {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  background: var(--surface-3);
  object-fit: cover;
  display: grid;
  place-items: center;
  color: var(--text-subtle);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-lg {
  width: 72px;
  height: 72px;
}
.thumb-sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.avatar {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: calc(var(--size) * 0.38);
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  letter-spacing: 0.02em;
}
.avatar.is-red {
  background: linear-gradient(135deg, var(--red-400), var(--red-700));
}
.avatar-sm {
  --size: 32px;
}
.avatar-lg {
  --size: 56px;
}
.avatar-xl {
  --size: 80px;
}

/* Paires clé / valeur */
.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.kv > div:last-child {
  border-bottom: 0;
}
.kv dt {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.kv dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   6. Badges, puces, alertes
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-muted);
  vertical-align: middle;
}
.badge-sm {
  padding: 3px 8px;
  font-size: 0.75rem;
}
.badge-lg {
  padding: 6px 12px;
  font-size: 0.88rem;
}
.badge-blue {
  background: var(--primary-soft);
  color: var(--primary-soft-text);
}
.badge-indigo {
  background: color-mix(in srgb, var(--indigo-600) 12%, transparent);
  color: color-mix(in srgb, var(--indigo-600) 85%, var(--text));
}
.badge-amber {
  background: var(--warning-soft);
  color: var(--amber-700);
}
.badge-green {
  background: var(--success-soft);
  color: var(--green-700);
}
.badge-green-solid {
  background: var(--success);
  color: #fff;
}
.badge-teal {
  background: color-mix(in srgb, var(--teal-600) 12%, transparent);
  color: var(--teal-600);
}
.badge-red {
  background: var(--danger-soft);
  color: var(--red-700);
}
.badge-red-solid {
  background: var(--accent);
  color: #fff;
}
.badge-gray {
  background: var(--surface-3);
  color: var(--text-muted);
}
:root[data-theme="dark"] .badge-amber,
:root[data-theme="dark"] .badge-green,
:root[data-theme="dark"] .badge-red {
  filter: brightness(1.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-amber,
  :root:not([data-theme="light"]) .badge-green,
  :root:not([data-theme="light"]) .badge-red {
    filter: brightness(1.35);
  }
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.pill-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.chip.is-active {
  background: var(--blue-900);
  border-color: var(--blue-900);
  color: #fff;
}
:root[data-theme="dark"] .chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
}
.chip .count {
  font-size: 0.75rem;
  opacity: 0.75;
}

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.alert .icon {
  margin-top: 1px;
}
.alert-title {
  font-weight: 700;
  margin-bottom: 2px;
}
.alert p:last-child {
  margin-bottom: 0;
}
.alert-info {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 20%, transparent);
  color: var(--primary-soft-text);
}
.alert-success {
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 22%, transparent);
  color: var(--green-700);
}
.alert-warning {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 25%, transparent);
  color: var(--amber-700);
}
.alert-danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 22%, transparent);
  color: var(--red-700);
}

/* --------------------------------------------------------------------------
   7. Formulaires
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .form-grid .span-2 {
    grid-column: span 2;
  }
  .form-grid .span-all {
    grid-column: 1 / -1;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > label,
.field-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}
.field .required-mark {
  color: var(--accent);
  margin-left: 2px;
}
.field-help {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.field-errors {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea,
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 16px; /* évite le zoom automatique sur iOS */
  border-radius: var(--r);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-subtle);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
}
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b778c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
select[multiple] {
  background-image: none;
  padding-right: 14px;
  min-height: 120px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex: none;
  margin: 0;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.93rem;
}
.check input {
  margin-top: 2px;
}
.check-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  cursor: pointer;
  background: var(--surface);
}
.check-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch-track {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: var(--gray-300);
  position: relative;
  transition: background 0.2s;
  flex: none;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch-track {
  background: var(--primary);
}
.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}
.switch input:focus-visible + .switch-track {
  box-shadow: var(--focus);
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group > .icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
}
.input-group > input {
  padding-left: 42px;
}
.input-group > .input-addon {
  position: absolute;
  right: 6px;
}
.input-with-button {
  display: flex;
  gap: 8px;
}
.input-with-button > input {
  flex: 1 1 auto;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.form-actions.is-sticky {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 8px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 5;
}
@media (min-width: 1024px) {
  .form-actions.is-sticky {
    bottom: 12px;
  }
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 0;
}
.form-section + .form-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.form-errors {
  margin-bottom: 16px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 48px;
}
.password-wrap button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   8. Tableaux (empilés sur mobile)
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 650;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: var(--surface-2);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-link {
  color: inherit;
  font-weight: 650;
}
@media (max-width: 767px) {
  .table-stack thead {
    display: none;
  }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }
  .table-stack tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .table-stack td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }
  .table-stack td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: left;
  }
  .table-stack td.cell-main {
    display: block;
    text-align: left;
    padding-bottom: 6px;
  }
  .table-stack td.cell-main::before {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   9. Coquille applicative
   -------------------------------------------------------------------------- */
.app-shell {
  min-height: 100dvh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  font-weight: 750;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.topbar .brand-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}
.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.icon-btn .pill-count {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  font-size: 0.68rem;
  border: 2px solid var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}
.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  line-height: 1.1;
}
.brand-name span {
  color: var(--accent);
}
.brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.7;
  text-transform: uppercase;
}

.content {
  padding: 16px 16px calc(var(--bottomnav-h) + var(--safe-bottom) + 28px);
  max-width: var(--content-max);
  margin: 0 auto;
}
@media (min-width: 768px) {
  .content {
    padding: 24px 28px 48px;
  }
}

/* Barre latérale */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, var(--sidebar-w));
  z-index: 60;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  transform: translateX(-102%);
  transition: transform 0.28s var(--ease);
  padding-top: var(--safe-top);
  box-shadow: var(--shadow-xl);
}
.sidebar.is-open {
  transform: none;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sidebar.is-open + .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-head {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-head .brand {
  color: #fff;
}
.sidebar-company {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.sidebar-company img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: contain;
  background: #fff;
}
.sidebar-company .company-code {
  font-size: 0.72rem;
  color: var(--sidebar-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-muted);
  font-weight: 700;
  margin: 14px 10px 4px;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin: 1px 0;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-weight: 550;
  font-size: 0.93rem;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--red-500);
}
.nav-link .pill-count {
  margin-left: auto;
}
.nav-link-scan {
  margin: 6px 0 10px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(238, 51, 70, 0.7);
}
.nav-link-scan:hover {
  background: linear-gradient(135deg, var(--red-400), var(--red-600));
}
.sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: calc(12px + var(--safe-bottom));
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r);
  color: #fff;
}
.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.sidebar-user small {
  display: block;
  color: var(--sidebar-muted);
}

@media (min-width: 1024px) {
  .sidebar {
    transform: none;
    width: var(--sidebar-w);
    box-shadow: none;
  }
  .sidebar-backdrop,
  .menu-toggle {
    display: none !important;
  }
  .app-main {
    margin-left: var(--sidebar-w);
  }
  .topbar {
    padding: 0 28px;
  }
  .topbar .brand-mobile {
    display: none;
  }
}

/* Navigation basse (mobile) */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding: 0 6px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: var(--text-subtle);
  font-size: 0.68rem;
  font-weight: 650;
  position: relative;
}
.bottom-nav a.is-active {
  color: var(--primary);
}
.bottom-nav a.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--primary);
}
.bottom-nav .pill-count {
  position: absolute;
  top: 8px;
  left: calc(50% + 6px);
  min-width: 17px;
  height: 17px;
  font-size: 0.65rem;
}
.bottom-nav .fab {
  width: 58px;
  height: 58px;
  margin: -26px auto 0;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--red-500), var(--red-700));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -6px rgba(238, 51, 70, 0.65), 0 0 0 5px var(--bg);
}
.bottom-nav a.fab-link {
  color: var(--text);
}
.bottom-nav a.fab-link::before {
  display: none;
}
@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

/* En-tête de page */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}
.page-header h1 {
  margin: 0;
  font-size: 1.45rem;
}
.page-header .subtitle {
  color: var(--text-muted);
  margin: 4px 0 0;
  font-size: 0.93rem;
}
.page-header .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (min-width: 768px) {
  .page-header h1 {
    font-size: 1.75rem;
  }
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--primary);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* Barre de recherche & filtres */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .search {
  flex: 1 1 260px;
}
.toolbar select {
  width: auto;
  min-width: 150px;
  flex: 0 1 auto;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.pagination .btn-group {
  flex-wrap: nowrap;
}

/* États vides */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  color: var(--primary);
}
.empty h3 {
  color: var(--text);
  margin-bottom: 6px;
}
.empty p {
  max-width: 420px;
  margin: 0 auto 16px;
}

/* --------------------------------------------------------------------------
   10. Menus, fenêtres, notifications éphémères
   -------------------------------------------------------------------------- */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  display: none;
  transform-origin: top right;
}
.dropdown.is-open .dropdown-menu {
  display: block;
  animation: pop 0.14s var(--ease);
}
.dropdown-menu.align-left {
  left: 0;
  right: auto;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.dropdown-item:hover {
  background: var(--surface-3);
  color: var(--text);
}
.dropdown-item .icon {
  color: var(--text-muted);
}
.dropdown-item.is-danger,
.dropdown-item.is-danger .icon {
  color: var(--danger);
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}
.dropdown-header {
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
}

dialog.modal {
  border: 0;
  padding: 0;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xl);
  overflow: auto;
}
dialog.modal::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
}
dialog.modal[open] {
  animation: modal-in 0.22s var(--ease);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 6px;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  flex: 1;
}
.modal-body {
  padding: 12px 20px 20px;
}
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}
@media (max-width: 639px) {
  dialog.modal.sheet {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: var(--safe-bottom);
  }
  dialog.modal.sheet[open] {
    animation: sheet-in 0.28s var(--ease);
  }
  dialog.modal.sheet .modal-header::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 4px;
    background: var(--border-strong);
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}
dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
}
dialog.lightbox::backdrop {
  background: rgba(3, 7, 18, 0.92);
}
dialog.lightbox img {
  max-width: 96vw;
  max-height: 88dvh;
  border-radius: var(--r);
  object-fit: contain;
}
dialog.lightbox .lightbox-close {
  position: fixed;
  top: calc(12px + var(--safe-top));
  right: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.toasts {
  position: fixed;
  z-index: 90;
  left: 12px;
  right: 12px;
  top: calc(var(--safe-top) + 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 640px) {
  .toasts {
    left: auto;
    width: 400px;
    top: auto;
    bottom: 24px;
    right: 24px;
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--gray-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  font-weight: 500;
  animation: toast-in 0.25s var(--ease);
}
.toast.is-leaving {
  animation: toast-out 0.2s ease forwards;
}
.toast .icon {
  margin-top: 1px;
}
.toast-success .icon {
  color: #4ade80;
}
.toast-error .icon {
  color: #fb7185;
}
.toast-warning .icon {
  color: #fbbf24;
}
.toast-info .icon {
  color: #93c5fd;
}
.toast-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.htmx-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue-500), var(--red-500));
  transition: width 0.3s ease, opacity 0.3s;
  opacity: 0;
}
.htmx-request.htmx-progress,
body.is-loading .htmx-progress {
  opacity: 1;
  width: 70%;
}
.offline-banner {
  position: fixed;
  z-index: 95;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--safe-top) + 8px);
  background: var(--gray-900);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
}

/* Onglets */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
}
.tab:hover {
  color: var(--text);
}
.tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Barre de progression */
.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
  transition: width 0.6s var(--ease);
}
.progress.is-red > span {
  background: linear-gradient(90deg, var(--red-400), var(--red-600));
}
.progress.is-green > span {
  background: linear-gradient(90deg, #34c472, var(--green-600));
}

/* Squelettes de chargement */
.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* --------------------------------------------------------------------------
   11. Suivi : frise, étapes, galerie
   -------------------------------------------------------------------------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  margin: 8px 0 4px;
}
.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-subtle);
  line-height: 1.2;
}
.stepper-step::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--surface-3);
  z-index: 0;
}
.stepper-step:first-child::before {
  display: none;
}
.stepper-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-subtle);
  z-index: 1;
  border: 3px solid var(--surface);
}
.stepper-step.is-done {
  color: var(--text);
}
.stepper-step.is-done::before {
  background: var(--primary);
}
.stepper-step.is-done .stepper-dot {
  background: var(--primary);
  color: #fff;
}
.stepper-step.is-current .stepper-dot {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft);
  animation: pulse-ring 2s infinite;
}
.stepper-step.is-current {
  color: var(--accent);
}
@keyframes pulse-ring {
  50% {
    box-shadow: 0 0 0 9px transparent;
  }
}
@media (min-width: 640px) {
  .stepper-step {
    font-size: 0.8rem;
  }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  z-index: 1;
}
.timeline-item:first-child .timeline-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.timeline-item.is-alert .timeline-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.timeline-body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 6px;
}
.timeline-title {
  font-weight: 700;
}
.timeline-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin-top: 2px;
}
.timeline-meta > span,
.timeline-meta > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.timeline-note {
  margin-top: 6px;
  font-size: 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px;
}
.timeline-photos {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.gallery a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-3);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.gallery a:hover img {
  transform: scale(1.04);
}
.gallery .gallery-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(9, 20, 55, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Carte « colis » */
.parcel-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  align-items: center;
}
.parcel-card .tracking {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.tracking-code {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.hero-parcel {
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, rgba(238, 51, 70, 0.55) 0%, transparent 45%),
    linear-gradient(135deg, var(--blue-700), var(--blue-950));
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero-parcel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, 0.05);
}
.hero-parcel .tracking-code {
  font-size: 1.35rem;
}
.hero-parcel .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}
.hero-parcel .stepper-step {
  color: rgba(255, 255, 255, 0.6);
}
.hero-parcel .stepper-step::before {
  background: rgba(255, 255, 255, 0.16);
}
.hero-parcel .stepper-dot {
  background: rgba(255, 255, 255, 0.14);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.7);
}
.hero-parcel .stepper-step.is-done {
  color: #fff;
}
.hero-parcel .stepper-step.is-done::before {
  background: #fff;
}
.hero-parcel .stepper-step.is-done .stepper-dot {
  background: #fff;
  color: var(--blue-800);
}
.hero-parcel .stepper-step.is-current .stepper-dot {
  background: var(--red-500);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(238, 51, 70, 0.3);
}
.hero-parcel .stepper-step.is-current {
  color: #fff;
}

/* Graphiques SVG */
.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .bar {
  fill: var(--primary);
  transition: opacity 0.15s;
}
.chart .bar.is-accent {
  fill: var(--accent);
}
.chart .bar:hover {
  opacity: 0.8;
}
.chart .axis-label {
  fill: var(--text-subtle);
  font-size: 10px;
}
.chart .grid-line {
  stroke: var(--border);
  stroke-dasharray: 3 4;
}
.donut-track {
  stroke: var(--surface-3);
}
svg.chart.donut {
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.bar-list li {
  display: grid;
  gap: 6px;
}
.bar-list .bar-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   12. Pages d'authentification
   -------------------------------------------------------------------------- */
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg);
}
.auth-aside {
  display: none;
}
.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
}
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.auth-card.is-wide {
  max-width: 640px;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  margin: 0 0 14px;
}
.form-section-title .icon {
  color: var(--primary);
}
.onboarding-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 768px) {
  .onboarding-steps {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}
.onboarding-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.onboarding-step:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.onboarding-step .step-check {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--primary);
}
.onboarding-step strong {
  display: block;
  font-size: 0.95rem;
}
.onboarding-step .step-text {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.onboarding-step.is-done {
  opacity: 0.72;
}
.onboarding-step.is-done .step-check {
  background: var(--green-600);
  color: #fff;
}
.auth-card .brand {
  margin-bottom: 28px;
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.auth-card .lead {
  color: var(--text-muted);
  margin-bottom: 24px;
}
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}
@media (min-width: 1024px) {
  .auth-page {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
  .auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: radial-gradient(60% 55% at 0% 0%, rgba(47, 98, 230, 0.45), transparent 70%),
      radial-gradient(55% 45% at 100% 100%, rgba(238, 51, 70, 0.28), transparent 70%),
      linear-gradient(180deg, #050b1f 0%, #07112e 60%, #0a1740 100%);
  }
  .auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(80% 70% at 30% 40%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(80% 70% at 30% 40%, #000 30%, transparent 85%);
    pointer-events: none;
  }
  .auth-aside > * {
    position: relative;
  }
  .auth-aside h2 {
    color: #fff;
    font-size: clamp(2rem, 2.8vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-wrap: balance;
    max-width: 540px;
  }
  .auth-aside p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 480px;
    font-size: 1.05rem;
  }
  .auth-main {
    padding: 48px;
  }
}
.auth-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
}
.auth-feature .icon-wrap {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(157, 184, 255, 0.12);
  color: #9db8ff;
  box-shadow: inset 0 0 0 1px rgba(157, 184, 255, 0.2);
}
.otp-input {
  font-size: 1.8rem !important;
  letter-spacing: 0.5em;
  text-align: center;
  font-family: var(--mono);
  font-weight: 700;
}
.company-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  margin-bottom: 20px;
}
.company-chip img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}
.company-chip .code {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--primary-soft-text);
}

/* --------------------------------------------------------------------------
   13. Pages publiques : en-tête, accueil, suivi, pied de page
   -------------------------------------------------------------------------- */
.public-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.public-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-header .brand-name {
  font-size: 1.05rem;
}
.public-header.is-dark {
  background: rgba(5, 11, 31, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.is-landing {
  /* Derrière l'en-tête translucide : la nuit du bandeau, jamais le gris de la page. */
  background: #050b1f;
}
.public-header.is-dark .brand-name,
.public-header.is-dark .public-login {
  color: #fff;
}
.public-header.is-dark .public-login:hover {
  background: rgba(255, 255, 255, 0.1);
}
@media (max-width: 479px) {
  .hide-xs {
    display: none !important;
  }
  .public-header .btn-sm {
    padding: 0 10px;
  }
}
.public-nav {
  display: none;
  gap: 2px;
  margin-left: 28px;
}
.public-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.public-nav a:hover {
  color: var(--text);
  background: var(--surface-3);
}
.public-header.is-dark .public-nav a {
  color: rgba(255, 255, 255, 0.72);
}
.public-header.is-dark .public-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
@media (min-width: 900px) {
  .public-nav {
    display: flex;
  }
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.btn-glass {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Bandeau sombre (accueil, suivi) */
.lp-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(52% 70% at 12% 0%, rgba(47, 98, 230, 0.42), transparent 70%),
    radial-gradient(40% 55% at 92% 18%, rgba(238, 51, 70, 0.2), transparent 70%),
    linear-gradient(180deg, #050b1f 0%, #07112e 62%, #0a1740 100%);
}
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(75% 65% at 50% 25%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(75% 65% at 50% 25%, #000 30%, transparent 85%);
  pointer-events: none;
}

/* ---- Accueil : hero -------------------------------------------------------- */
.lp-hero-glow {
  position: absolute;
  width: 720px;
  height: 720px;
  right: -180px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(85, 133, 242, 0.28), transparent);
  filter: blur(10px);
  pointer-events: none;
}
.lp-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 56px 32px;
}
.lp-hero-inner > * {
  min-width: 0;
}
@media (min-width: 1024px) {
  .lp-hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    padding-block: 96px 48px;
  }
}
.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.lp-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b7b;
  box-shadow: 0 0 0 4px rgba(255, 107, 123, 0.18);
}
.lp-title {
  margin: 22px 0 20px;
  color: #fff;
  font-size: clamp(2.3rem, 4.4vw, 3.55rem);
  line-height: 1.05;
  letter-spacing: -0.042em;
  text-wrap: balance;
  font-weight: 800;
}
.lp-title em {
  font-style: normal;
  background: linear-gradient(95deg, #9db8ff 0%, #c3b5ff 45%, #ff8f9c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-lead {
  max-width: 34rem;
  margin: 0 0 32px;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}
.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.lp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.68);
}
.lp-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lp-facts .icon {
  color: #7ee2a8;
}

/* Visuel produit */
.lp-visual {
  position: relative;
  padding: 18px 0 64px;
}
@media (min-width: 1024px) {
  .lp-visual {
    padding: 28px 0 128px 40px;
  }
}
.lp-window {
  position: relative;
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-4deg) rotateX(2deg);
  transform-origin: left center;
}
@media (max-width: 1023px) {
  .lp-window {
    transform: none;
  }
}
.lp-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: #f3f5fa;
  border-bottom: 1px solid #e5e9f2;
}
.lp-window-bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8dde8;
}
.lp-window-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e5e9f2;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}
.lp-window-body {
  display: flex;
  min-height: 300px;
}
.lp-mini-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 46px;
  flex: none;
  padding: 16px 0;
  background: linear-gradient(180deg, #0f1f54, #0b1840);
  color: rgba(255, 255, 255, 0.55);
}
.lp-mini-nav .icon:first-child {
  color: #fff;
}
.lp-mini-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}
.lp-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #ee3346;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.lp-mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lp-mini-kpis > div {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e8ecf4;
  background: #fbfcfe;
  min-width: 0;
}
.lp-mini-kpis span {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-mini-kpis strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.lp-mini-kpis em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-mini-kpis em.is-up {
  color: #0e8a43;
  font-weight: 700;
}
.lp-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 70px;
  padding: 8px 10px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7f9fd, #fff);
  border: 1px solid #eef1f7;
}
.lp-mini-chart i,
.lp-art-bars i {
  flex: 1 1 0;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #5585f2, #1e4bd2);
}
.lp-mini-chart i:last-child {
  background: linear-gradient(180deg, #ff8f9c, #ee3346);
}
.lp-mini-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #eef1f7;
}
.lp-mini-row > div {
  flex: 1 1 auto;
  min-width: 0;
}
.lp-mini-row strong {
  display: block;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-mini-row > div > span {
  display: block;
  font-size: 0.66rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-mini-row b {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #1e4bd2 var(--p), #e8edf6 var(--p));
}
.lp-mini-row em {
  flex: none;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}
.lp-mini-row em.is-amber {
  background: #fff5e0;
  color: #b45309;
}
.lp-mini-row em.is-green {
  background: #e7f8ee;
  color: #0b6e36;
}
.lp-mini-ico {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: #1e4bd2;
}
.lp-float {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.lp-float-scan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  top: 0;
  right: 8px;
  animation: lp-float 6s ease-in-out infinite;
}
@media (min-width: 1024px) {
  .lp-float-scan {
    right: -18px;
  }
}
.lp-float-scan strong,
.lp-scan-result strong {
  display: block;
  font-size: 0.8rem;
}
.lp-float-scan span:not(.lp-float-ico),
.lp-scan-result span:not(.lp-float-ico) {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}
.lp-float-ico {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #12a150;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(18, 161, 80, 0.16);
}
.lp-float-msg {
  width: min(280px, 78%);
  left: 8px;
  bottom: 0;
  overflow: hidden;
  animation: lp-float 7s ease-in-out -2s infinite;
}
@media (min-width: 1024px) {
  .lp-float-msg {
    left: -12px;
  }
}
.lp-msg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #075e54;
  color: #fff;
}
.lp-msg-head strong {
  display: block;
  font-size: 0.8rem;
}
.lp-msg-head span:not(.lp-msg-avatar) {
  display: block;
  font-size: 0.66rem;
  opacity: 0.75;
}
.lp-msg-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ee3346;
  font-size: 0.66rem;
  font-weight: 800;
}
.lp-msg-bubble {
  position: relative;
  margin: 10px;
  padding: 6px 6px 8px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  font-size: 0.74rem;
  line-height: 1.45;
}
.lp-float-msg {
  background: #efe7dd;
}
.lp-msg-bubble p {
  margin: 6px 6px 4px;
}
.lp-msg-photo {
  height: 84px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d6c6ae, #b99b76);
}
.lp-box {
  position: relative;
  width: 64px;
  height: 44px;
  border-radius: 4px;
  background: linear-gradient(160deg, #c89a63, #a9773f);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08), 0 8px 14px -6px rgba(0, 0, 0, 0.35);
}
.lp-box::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 8px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.28);
}
.lp-box i {
  position: absolute;
  right: 6px;
  top: 7px;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7'%3E%3Cpath d='M0 0h3v3H0zM4 0h3v3H4zM0 4h3v3H0zM5 5h2v2H5zM4 4h1v1H4z' fill='%230f172a'/%3E%3C/svg%3E") center/80% no-repeat;
}
.lp-box.is-lg {
  width: 96px;
  height: 66px;
}
.lp-box.is-lg i {
  width: 28px;
  height: 28px;
}
.lp-msg-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 6px;
  color: #027eb5;
  font-weight: 600;
}
.lp-msg-bubble time {
  position: absolute;
  right: 10px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  color: #94a3b8;
}
.lp-msg-bubble time .icon {
  color: #34b7f1;
}
@keyframes lp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Barre de suivi */
.lp-track-wrap {
  position: relative;
  padding-bottom: 72px;
}
.lp-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lp-track-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 8px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}
.lp-track input {
  flex: 1 1 220px;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  border-radius: 12px;
  color: #0f172a;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.lp-track input::placeholder {
  font-family: var(--font);
  letter-spacing: 0;
  color: #94a3b8;
}
.lp-track .btn {
  min-height: 48px;
}
@media (max-width: 639px) {
  .lp-track-label span {
    display: none;
  }
  .lp-track .btn {
    flex: 1 1 100%;
  }
}
.lp-track-hint {
  margin: 14px 4px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.62);
}
.lp-track-hint a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-weight: 650;
}

/* Bandeau centré (suivi public) */
.lp-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: 72px 88px;
}
.lp-center .lp-lead {
  margin-bottom: 28px;
}
.lp-center .lp-track {
  width: 100%;
  max-width: 640px;
}
.lp-track-error {
  width: 100%;
  max-width: 640px;
  text-align: left;
}

/* ---- Accueil : sections ---------------------------------------------------- */
.lp-section {
  padding: 72px 0;
  background: var(--surface);
}
@media (min-width: 1024px) {
  .lp-section {
    padding: 112px 0;
  }
}
.lp-section-alt {
  background: var(--bg);
  border-block: 1px solid var(--border);
}
.lp-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.lp-head.is-left {
  margin: 0;
  text-align: left;
}
.lp-kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.lp-head h2 {
  text-wrap: balance;
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.lp-head p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.lp-head.is-light .lp-kicker {
  color: #9db8ff;
}
.lp-head.is-light h2 {
  color: #fff;
}

/* Parcours */
.lp-journey {
  position: relative;
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .lp-journey {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .lp-journey {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
  .lp-journey::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 28px;
    right: calc((100% - 84px) / 4 - 28px);
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
  }
}
.lp-journey li {
  position: relative;
}
.lp-journey-node {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  box-shadow: 0 12px 24px -10px rgba(30, 75, 210, 0.6), 0 0 0 6px var(--surface);
}
.lp-journey li:nth-child(2) .lp-journey-node,
.lp-journey li:nth-child(4) .lp-journey-node {
  background: linear-gradient(135deg, var(--red-400), var(--red-700));
  box-shadow: 0 12px 24px -10px rgba(212, 26, 48, 0.55), 0 0 0 6px var(--surface);
}
.lp-journey-num {
  display: block;
  margin: 22px 0 6px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
}
.lp-journey h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}
.lp-journey p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Grille de fonctionnalités */
.lp-bento {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .lp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lp-card.is-wide {
    grid-column: span 2;
  }
}
@media (min-width: 1024px) {
  .lp-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.lp-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.lp-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
@media (min-width: 1024px) {
  .lp-card.is-wide {
    flex-direction: row;
    align-items: center;
  }
  .lp-card.is-wide .lp-card-text {
    flex: 1 1 42%;
  }
  .lp-card.is-wide .lp-art {
    flex: 1 1 58%;
  }
}
.lp-card-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.lp-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.lp-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
.lp-art {
  margin-top: auto;
  min-height: 132px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}
.lp-art-scan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.lp-viewfinder {
  position: relative;
  width: 190px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, #3a4660, #151c2e);
  overflow: hidden;
}
.lp-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
}
.lp-corner:nth-child(1) { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.lp-corner:nth-child(2) { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.lp-corner:nth-child(3) { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.lp-corner:nth-child(4) { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.lp-laser {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 2px;
  top: 30%;
  background: linear-gradient(90deg, transparent, #ff4d5e, transparent);
  box-shadow: 0 0 12px #ff4d5e;
  animation: lp-laser 2.4s ease-in-out infinite;
}
@keyframes lp-laser {
  0%, 100% { top: 26%; }
  50% { top: 72%; }
}
.lp-scan-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.lp-scan-result span:not(.lp-float-ico) {
  color: var(--text-muted);
}
.lp-art-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.lp-art-queue > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.lp-art-queue span {
  display: grid;
  place-items: center;
  color: var(--warning);
}
.lp-art-queue em {
  margin-left: auto;
  font-family: var(--font);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-subtle);
}
.lp-art-queue .is-done span,
.lp-art-queue .is-done em {
  color: var(--success);
}
.lp-art-channels {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
}
.lp-art-channels span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
}
.lp-art-channels span .icon:last-child {
  color: var(--success);
}
.lp-art-manifest {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px;
}
.lp-art-manifest > div {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr 0.8fr;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.lp-art-manifest > div:not(.is-head) span:first-child {
  font-family: var(--mono);
  font-weight: 650;
}
.lp-art-manifest > div:nth-child(odd):not(.is-head) {
  background: var(--surface);
}
.lp-art-manifest .is-head {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.lp-art-pickup {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lp-qr {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 12px;
  border: 8px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' shape-rendering='crispEdges'%3E%3Cpath fill='%230f172a' d='M0 0h7v7H0zM14 0h7v7h-7zM0 14h7v7H0z'/%3E%3Cpath fill='%23fff' d='M1 1h5v5H1zM15 1h5v5h-5zM1 15h5v5H1z'/%3E%3Cpath fill='%230f172a' d='M2 2h3v3H2zM16 2h3v3h-3zM2 16h3v3H2zM8 0h2v2H8zM11 1h2v3h-2zM8 3h2v2H8zM9 6h3v2H9zM13 8h2v3h-2zM16 8h3v2h-3zM8 9h2v4H8zM0 9h3v2H0zM4 8h3v2H4zM11 11h3v2h-3zM17 11h4v2h-4zM8 14h3v2H8zM12 14h2v4h-2zM15 14h2v2h-2zM18 15h3v2h-3zM8 17h3v4H8zM15 18h4v3h-4z'/%3E%3C/svg%3E") center/100% no-repeat;
}
.lp-art-pickup strong {
  display: block;
  font-size: 0.9rem;
}
.lp-art-pickup span {
  display: block;
  color: var(--text-muted);
}
.lp-sign {
  display: block;
  width: 120px;
  height: 34px;
  margin-top: 10px;
  border-bottom: 1px solid var(--border-strong);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34'%3E%3Cpath d='M4 26c10-18 16-20 18-10s-4 12 2 4 10-16 14-8-2 12 6 4 8-10 12-6 4 10 12 2 10-6 16-4 10 4 20-2' fill='none' stroke='%231e4bd2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lp-art-invoice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.lp-art-invoice > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.lp-art-invoice b {
  color: var(--text);
}
.lp-art-invoice .is-total {
  border-bottom: 0;
  color: var(--text);
  font-weight: 700;
}
.lp-art-invoice .is-total b {
  color: var(--primary);
  font-size: 1rem;
}
.lp-art-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 0;
}
.lp-art-bars i:nth-child(6) {
  background: linear-gradient(180deg, #ff8f9c, #ee3346);
}
.lp-art-prealert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-subtle);
}
.lp-art-prealert span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text);
}
.lp-art-prealert .is-ok {
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  color: var(--success);
}
.lp-art-langs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: 10px;
}
.lp-art-langs > div {
  padding: 14px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.lp-art-langs em {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 750;
  background: var(--surface-3);
  color: var(--text-muted);
}
.lp-art-langs span {
  display: block;
  font-weight: 650;
}
.lp-art-langs .is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.lp-art-langs .is-active em {
  background: var(--primary);
  color: #fff;
}

/* Deux espaces */
.lp-duo {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .lp-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.lp-duo-card {
  padding: 32px;
  border-radius: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .lp-duo-card {
    padding: 44px;
  }
}
.lp-duo-card.is-dark {
  color: #fff;
  border-color: transparent;
  background: radial-gradient(70% 90% at 100% 0%, rgba(238, 51, 70, 0.22), transparent 70%),
    linear-gradient(160deg, #0f1f54, #070f2c);
}
.lp-duo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary-soft-text);
}
.lp-duo-card.is-dark .lp-duo-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.lp-duo-card h3 {
  margin: 18px 0 22px;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.lp-duo-card.is-dark h3 {
  color: #fff;
}
.lp-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}
.lp-list .icon {
  flex: none;
  margin-top: 2px;
  color: var(--success);
}
.lp-duo-card.is-dark .lp-list li {
  color: rgba(255, 255, 255, 0.82);
}
.lp-duo-card.is-dark .lp-list .icon {
  color: #7ee2a8;
}

/* Confiance */
.lp-trust {
  padding: 80px 0;
  color: #fff;
  background: radial-gradient(50% 80% at 50% 0%, rgba(47, 98, 230, 0.3), transparent 70%), #050b1f;
}
@media (min-width: 1024px) {
  .lp-trust {
    padding: 112px 0;
  }
}
.lp-trust-grid {
  display: grid;
  gap: 1px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 640px) {
  .lp-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .lp-trust-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.lp-trust-grid > div {
  padding: 28px;
  background: #07112e;
}
.lp-trust-ico {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 13px;
  background: rgba(157, 184, 255, 0.12);
  color: #9db8ff;
  box-shadow: inset 0 0 0 1px rgba(157, 184, 255, 0.2);
}
.lp-trust h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.05rem;
}
.lp-trust p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.6;
  font-size: 0.94rem;
}

/* Questions fréquentes */
.lp-faq-layout {
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) {
  .lp-faq-layout {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 64px;
    align-items: start;
  }
  .lp-faq-layout .lp-head {
    position: sticky;
    top: 96px;
  }
}
.lp-faq details {
  border-bottom: 1px solid var(--border);
}
.lp-faq details:first-child {
  border-top: 1px solid var(--border);
}
.lp-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 650;
}
.lp-faq summary::-webkit-details-marker {
  display: none;
}
.lp-faq summary .icon {
  flex: none;
  color: var(--text-subtle);
  transition: transform 0.2s var(--ease);
}
.lp-faq details[open] summary .icon {
  transform: rotate(45deg);
  color: var(--primary);
}
.lp-faq details p {
  margin: -6px 0 22px;
  padding: 0 40px 0 4px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Appel final */
.lp-section-cta {
  padding-top: 0;
}
.lp-final {
  position: relative;
  display: grid;
  gap: 28px;
  padding: 40px 28px;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgba(238, 51, 70, 0.4), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(85, 133, 242, 0.45), transparent 60%),
    linear-gradient(135deg, #0f1f54, #081233);
  box-shadow: var(--shadow-xl);
}
@media (min-width: 900px) {
  .lp-final {
    grid-template-columns: minmax(0, 1.3fr) auto;
    align-items: center;
    padding: 56px 56px;
  }
}
.lp-final h2 {
  text-wrap: balance;
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.lp-final p {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.05rem;
}
.lp-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 639px) {
  .lp-final-actions .btn,
  .lp-cta .btn {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
  }
}

/* Pied de page public */
.public-footer {
  padding: 56px 0 calc(28px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: auto;
  }
}
.footer-brand .brand-name {
  color: var(--text);
}
.footer-brand p {
  max-width: 22rem;
  margin: 14px 0 0;
  line-height: 1.6;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col h2 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-col a {
  color: var(--text-muted);
  width: fit-content;
}
.footer-col a:hover {
  color: var(--primary);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.step-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary-soft-text);
}
select.lang-select {
  min-height: 34px;
  width: auto;
  padding: 4px 32px 4px 10px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   14. Étiquette client (« shipping mark »)
   -------------------------------------------------------------------------- */
.label-stage {
  display: grid;
  place-items: center;
  padding: 20px 0;
}
.shipping-label {
  --label-w: 100mm;
  width: min(100%, 420px);
  aspect-ratio: 100 / 150;
  background: #fff;
  color: #0b1020;
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  border: 1px solid #e5e7eb;
}
.shipping-label .sl-head {
  background: linear-gradient(135deg, #ee3346, #b01328);
  color: #fff;
  padding: 4.5% 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shipping-label .sl-company {
  font-weight: 800;
  font-size: clamp(0.9rem, 4.6vw, 1.2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.shipping-label .sl-mark {
  font-size: 0.66rem;
  text-align: right;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.95;
}
.shipping-label .sl-entry {
  background: #0f1f54;
  color: #fff;
  padding: 2.5% 6%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.shipping-label .sl-entry strong {
  font-size: clamp(1rem, 5vw, 1.35rem);
  letter-spacing: 0.08em;
  font-family: var(--mono);
}
.shipping-label .sl-main {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 5%;
  padding: 5% 6% 3%;
  align-items: center;
}
.shipping-label .sl-qr svg,
.shipping-label .sl-qr img {
  width: 100%;
  height: auto;
}
.shipping-label .sl-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #5b677b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.shipping-label .sl-code {
  font-family: var(--mono);
  font-size: clamp(1.25rem, 6.4vw, 1.75rem);
  font-weight: 800;
  color: #0f1f54;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 2px 0 8px;
}
.shipping-label .sl-name {
  font-weight: 800;
  font-size: clamp(0.85rem, 4vw, 1.05rem);
  line-height: 1.15;
  text-transform: uppercase;
}
.shipping-label .sl-phone {
  font-weight: 600;
  font-size: 0.82rem;
  margin-top: 4px;
}
.shipping-label .sl-dest {
  margin: 0 6%;
  padding: 3% 4%;
  border: 2px solid #0f1f54;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.shipping-label .sl-dest strong {
  font-size: clamp(0.85rem, 4vw, 1.05rem);
  text-transform: uppercase;
  color: #0f1f54;
}
.shipping-label .sl-fields {
  margin: 3% 6% 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 4%;
  font-size: 0.6rem;
  color: #5b677b;
  font-weight: 600;
}
.shipping-label .sl-fields div {
  border-bottom: 1.5px dashed #97a3b6;
  padding-bottom: 12px;
}
.shipping-label .sl-address {
  margin: 3% 6% 0;
  font-size: 0.6rem;
  line-height: 1.35;
  color: #232d3f;
}
.shipping-label .sl-address b {
  color: #0b1020;
}
.shipping-label .sl-foot {
  margin-top: auto;
  background: #1e4bd2;
  color: #fff;
  padding: 2.8% 6%;
  font-size: 0.6rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   15. Station de scan (plein écran)
   -------------------------------------------------------------------------- */
body.scanner-mode {
  background: #05070d;
  color: #fff;
  overflow: hidden;
  overscroll-behavior: none;
}
.scanner {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #05070d;
}
.scanner-top {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 0;
  padding: calc(var(--safe-top) + 10px) 12px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent);
}
.scanner-top .icon-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.scanner-top .icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.scanner-top .icon-btn.is-on {
  background: #fbbf24;
  color: #111;
}
.scanner-mode-pill {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 4px;
}
.scanner-mode-pill strong {
  font-size: 1rem;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scanner-mode-pill span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scanner-video-wrap {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  background: #000;
}
.scanner-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-frame {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(72vw, 330px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 28px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.42);
  pointer-events: none;
}
.scanner-frame::before,
.scanner-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 4px;
  background: linear-gradient(135deg, #ee3346, #fff 45%, #fff 55%, #2f62e6) border-box;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.95;
}
.scanner-frame::after {
  display: none;
}
.scanner-laser {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  top: 10%;
  background: linear-gradient(90deg, transparent, #ff4d5e, transparent);
  box-shadow: 0 0 12px 2px rgba(255, 77, 94, 0.6);
  animation: laser 2.2s ease-in-out infinite;
}
@keyframes laser {
  50% {
    top: 88%;
  }
}
.scanner.is-paused .scanner-laser {
  animation-play-state: paused;
  opacity: 0;
}
.scanner-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(44% + min(36vw, 165px) + 18px);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  padding: 0 24px;
}
.scanner-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.scanner-flash.is-on {
  animation: flash 0.35s ease-out;
}
@keyframes flash {
  0% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
  }
}
.scanner-feedback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}
.scanner-feedback .fb-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
}
.scanner-feedback.is-success .fb-circle,
.scanner-feedback.is-error .fb-circle,
.scanner-feedback.is-warning .fb-circle,
.scanner-feedback.is-queued .fb-circle {
  animation: fb 1.1s var(--ease) forwards;
}
.scanner-feedback.is-success .fb-circle {
  background: rgba(18, 161, 80, 0.92);
}
.scanner-feedback.is-error .fb-circle {
  background: rgba(212, 26, 48, 0.92);
}
.scanner-feedback.is-warning .fb-circle {
  background: rgba(217, 119, 6, 0.94);
}
.scanner-feedback.is-queued .fb-circle {
  background: rgba(30, 75, 210, 0.92);
}
@keyframes fb {
  15% {
    opacity: 1;
    transform: scale(1.05);
  }
  30% {
    transform: scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
.scanner-camera-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  color: rgba(255, 255, 255, 0.85);
}
.scanner-panel {
  position: relative;
  z-index: 6;
  background: #0d1426;
  border-radius: 24px 24px 0 0;
  margin-top: -24px;
  padding: 10px 14px calc(14px + var(--safe-bottom));
  max-height: 58dvh;
  overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  color: #e8edf7;
}
.scanner-panel::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 10px;
}
.scanner-panel .card {
  background: #131d34;
  border-color: #22304b;
  color: #e8edf7;
}
.scanner-panel .text-muted {
  color: #9aa7bf !important;
}
.scanner-panel input,
.scanner-panel select,
.scanner-panel textarea {
  background: #0a1122;
  border-color: #2e3e5e;
  color: #fff;
}
.scanner-panel .btn:not(.btn-primary):not(.btn-accent):not(.btn-success) {
  background: #18233b;
  border-color: #2e3e5e;
  color: #e8edf7;
}
.scan-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.scan-counter {
  background: #131d34;
  border: 1px solid #22304b;
  border-radius: 14px;
  padding: 8px 10px;
  text-align: center;
}
.scan-counter strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.scan-counter span {
  font-size: 0.7rem;
  color: #9aa7bf;
  font-weight: 600;
}
.scan-counter.is-pending strong {
  color: #fbbf24;
}
.scan-result {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #131d34;
  border: 1px solid #22304b;
  margin-bottom: 10px;
  animation: pop 0.2s var(--ease);
}
.scan-result.is-success {
  border-color: rgba(52, 196, 114, 0.55);
  background: linear-gradient(135deg, rgba(52, 196, 114, 0.14), #131d34 60%);
}
.scan-result.is-error {
  border-color: rgba(250, 98, 114, 0.6);
  background: linear-gradient(135deg, rgba(250, 98, 114, 0.16), #131d34 60%);
}
.scan-result.is-warning,
.scan-result.is-needs_choice {
  border-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), #131d34 60%);
}
.scan-result.is-queued {
  border-color: rgba(85, 133, 242, 0.6);
}
.scan-result img,
.scan-result .thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #22304b;
  flex: none;
}
.scan-result-title {
  font-weight: 750;
  font-size: 0.98rem;
}
.scan-result-meta {
  font-size: 0.8rem;
  color: #9aa7bf;
}
.scan-history {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scan-history li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid #1c2842;
  font-size: 0.86rem;
}
.scan-history li:last-child {
  border-bottom: 0;
}
.scan-history .dot {
  width: 9px;
  height: 9px;
}
.scan-history .ok {
  color: #34c472;
}
.scan-history .err {
  color: #fa6272;
}
.scan-history .warn {
  color: #fbbf24;
}
.scan-history .queued {
  color: #7aa0f6;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: #131d34;
  border: 2px solid #22304b;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.choice img,
.choice .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: #22304b;
}
.choice.is-selected {
  border-color: #34c472;
  background: rgba(52, 196, 114, 0.12);
}
.choice.is-selected::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #34c472 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.choice small {
  color: #9aa7bf;
  font-size: 0.74rem;
}
.segmented {
  display: flex;
  background: #0a1122;
  border: 1px solid #22304b;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.segmented button {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: none;
  color: #9aa7bf;
  padding: 8px 10px;
  border-radius: 9px;
  font-weight: 650;
  font-size: 0.84rem;
  cursor: pointer;
}
.segmented button.is-active {
  background: #1e4bd2;
  color: #fff;
}
.scanner-manual {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.signature-pad {
  width: 100%;
  height: 180px;
  background: #fff;
  border-radius: 14px;
  touch-action: none;
  cursor: crosshair;
}

/* Choix de la station */
.station-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .station-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.station {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--r-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.station:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.station::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.station-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}
.station h3 {
  color: #fff;
  margin: 0 0 2px;
}
.station p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
}
.station-reception {
  background: linear-gradient(135deg, #ee3346, #911426);
}
.station-arrival {
  background: linear-gradient(135deg, #2f62e6, #0f1f54);
}
.station-loading {
  background: linear-gradient(135deg, #4f46e5, #172f80);
}
.station-delivery {
  background: linear-gradient(135deg, #0e8a43, #0b4f2a);
}
.station-lookup {
  background: linear-gradient(135deg, #374357, #141b2b);
}

/* Bandeau « colis à retirer » (espace client) */
.pickup-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 16px;
  padding: 18px;
  border-radius: var(--r-xl);
  overflow: hidden;
  color: #fff;
  background: radial-gradient(70% 120% at 100% 0%, rgba(238, 51, 70, 0.35), transparent 60%),
    linear-gradient(135deg, #1e4bd2, #0f1f54 70%);
  box-shadow: var(--shadow-lg);
}
.pickup-banner:hover {
  color: #fff;
}
.pickup-banner-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.pickup-banner-text strong {
  display: block;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.pickup-banner-text span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}
.pickup-banner .btn {
  grid-column: 1 / -1;
  justify-content: center;
}
@media (min-width: 640px) {
  .pickup-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 20px 24px;
  }
  .pickup-banner .btn {
    grid-column: auto;
  }
}
/* Listes de colis : sur petit écran, le statut passe sous le texte au lieu de le tronquer. */
@media (max-width: 479px) {
  .list-item.is-stackable {
    flex-wrap: wrap;
  }
  .list-item.is-stackable .list-item-trailing {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-left: 64px;
  }
  .list-item.is-stackable.is-lead-40 .list-item-trailing {
    padding-left: 52px;
  }
}

/* --------------------------------------------------------------------------
   15 bis. Console de la plateforme (et composants partagés des fiches)
   -------------------------------------------------------------------------- */
.page-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}
.platform-card {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.platform-card strong {
  display: block;
  font-size: 0.86rem;
}
.platform-card span:not(.platform-card-icon):not(.platform-live) {
  display: block;
  font-size: 0.72rem;
  color: var(--sidebar-muted);
  font-weight: 600;
}
.platform-card-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.platform-live {
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: #34c472;
  box-shadow: 0 0 0 4px rgba(52, 196, 114, 0.18);
}
.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(340px, 36vw);
  margin-right: 6px;
}
.topbar-search > .icon {
  position: absolute;
  left: 12px;
  color: var(--text-subtle);
  pointer-events: none;
}
.topbar-search input {
  height: 38px;
  padding: 0 12px 0 38px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.topbar-search input:focus {
  background: var(--surface);
}
.card-hint {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 500;
}
.card-subheader {
  padding: 12px 18px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
}
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.figure {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
}
.figure strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.figure span:not(.figure-icon) {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.figure-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-muted);
}
.stat-icon.is-soft {
  background: var(--surface-3);
  color: var(--text-muted);
}
.stat-icon.is-sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.tone-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.tone-icon.is-red {
  background: var(--danger-soft);
  color: var(--danger);
}
.tone-icon.is-amber {
  background: var(--warning-soft);
  color: var(--warning);
}
.tone-icon.is-green {
  background: var(--success-soft);
  color: var(--success);
}
.tone-icon.is-gray {
  background: var(--surface-3);
  color: var(--text-subtle);
}
.tone-icon.is-indigo {
  background: rgba(79, 70, 229, 0.12);
  color: #6366f1;
}
.tone-icon.is-teal {
  background: rgba(14, 147, 132, 0.12);
  color: var(--teal-600);
}
.entity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}
a.entity:hover strong {
  color: var(--primary);
}
.entity > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.entity strong {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity small {
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stack-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.company-logo {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}
.company-logo.is-initials {
  display: grid;
  place-items: center;
  border: 0;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
}
.company-logo.is-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 1.3rem;
}
.avatar.is-muted {
  background: var(--gray-400);
}
.tab-count {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 650;
  background: var(--surface-3);
  color: var(--text-muted);
}
.tab.is-active .tab-count {
  background: var(--primary-soft);
  color: var(--primary-soft-text);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-soft-text);
  white-space: nowrap;
}
.tag.is-soft {
  background: var(--surface-3);
  color: var(--text-muted);
}
.entity-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  margin-top: 8px;
}
.entity-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.entity-header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.entity-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.entity-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.health {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
}
.health strong {
  display: block;
  font-size: 0.9rem;
}
.health span:not(.health-dot) {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.health-dot {
  width: 9px;
  height: 9px;
  flex: none;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.health-dot.is-ok {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}
.health-dot.is-ko {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}
.health-dot.is-info {
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}
.danger-zone .card-header h2 {
  color: var(--danger);
}
.danger-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.danger-form input {
  flex: 1 1 260px;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.channel-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.channel-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.channel-rate {
  margin-left: auto;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.channel-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
  margin: 0;
}
.channel-figures dt {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.channel-figures dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.matrix-cell {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-subtle);
  vertical-align: middle;
}
.matrix-cell.is-on {
  background: var(--success-soft);
  color: var(--success);
}
.matrix-cell.is-default {
  background: var(--primary-soft);
  color: var(--primary);
}
.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.matrix-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.form-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 980px;
}
.form-card .card-header {
  gap: 10px;
}
.sticky-actions {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 8px);
  z-index: 5;
  padding: 12px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
@media (min-width: 1024px) {
  .sticky-actions {
    bottom: 16px;
  }
}
.text-break {
  overflow-wrap: anywhere;
}
.eyebrow-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 650;
  background: var(--primary-soft);
  color: var(--primary-soft-text);
}
.auth-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   16. Impression
   -------------------------------------------------------------------------- */
@media print {
  @page {
    margin: 10mm;
  }
  body {
    background: #fff !important;
    color: #000;
  }
  .sidebar,
  .topbar,
  .bottom-nav,
  .toasts,
  .no-print,
  .page-header .actions {
    display: none !important;
  }
  .app-main {
    margin: 0 !important;
  }
  .content {
    padding: 0 !important;
  }
  .card {
    box-shadow: none;
    border-color: #ccc;
  }
  .shipping-label {
    box-shadow: none;
    border: 1px solid #000;
    width: 100mm;
    border-radius: 0;
  }
}
body.print-label {
  background: #fff;
}
@media print {
  body.print-label .label-stage {
    padding: 0;
  }
  @page label {
    size: 100mm 150mm;
    margin: 0;
  }
}

/* --------------------------------------------------------------------------
   17. Accessibilité : mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
