/* Logistique DUO 3.4 — écrans DT (vue d'ensemble, Vélodrome, suivi en direct, réassorts, accès QR).
   Classes « dts-* » : nouvelles, indépendantes des anciennes règles de dt.css.
   Couleurs : jetons de design.css uniquement (le mode sombre suit les jetons). */

/* ---------------------------------------------------------------- communs */
.dts-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dts-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.dts-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
html .dts-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
html .dts-back .icon {
  width: 15px;
  height: 15px;
}
html .dts-back:hover {
  color: var(--text);
}
html .page-heading.dts-head {
  align-items: flex-end;
}
.dts-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.dts-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dts-meta .icon {
  width: 15px;
  height: 15px;
  color: var(--faint);
}
html .page-heading .dts-meta {
  margin-top: 6px;
}
.dts-kpis {
  margin-bottom: 18px;
}
.dts-of {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.dts-icon-btn {
  width: 40px;
  padding: 0 !important;
}
html .btn.dts-icon-btn.sm {
  width: 34px;
}

html .panel.dts-panel {
  padding: 0;
  overflow: hidden;
}

/* monogramme d'infirmerie et pastille d'état */
.dts-mono {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--hue, var(--side));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}
.dts-mono .icon {
  width: 17px;
  height: 17px;
}
.dts-mono.lg {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 12.5px;
}
.dts-mono.xs {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 8.5px;
}
.dts-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--st);
}
:is(.dts-dot, .dts-pin, .dts-legend span, .dts-inf).is-warn {
  --st: var(--amber-strong);
}
:is(.dts-dot, .dts-pin, .dts-legend span, .dts-inf).is-prog {
  --st: var(--blue);
}
:is(.dts-dot, .dts-pin, .dts-legend span, .dts-inf).is-ok {
  --st: var(--green);
}
:is(.dts-dot, .dts-pin).is-waiting {
  --st: var(--faint);
}

/* bandeau « en direct » (textes et états gérés par app.js) */
.dts-live-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 44px;
  padding: 9px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--c-live) 25%, var(--line));
  background: color-mix(in srgb, var(--c-live) 8%, var(--surface));
}
html .dts-live-strip #dt-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
html .dts-live-strip #dt-live .dt-live-dot {
  display: block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--faint);
  animation: none;
}
html .dts-live-strip #dt-live.is-live {
  color: var(--c-live);
}
html .dts-live-strip #dt-live.is-live .dt-live-dot {
  background: var(--c-live);
  animation: ds-pulse 1.6s infinite;
  color: var(--c-live);
}
html .dts-live-strip #dt-live.is-offline {
  color: var(--amber);
}
html .dts-live-strip #dt-live.is-offline .dt-live-dot {
  background: var(--amber-strong);
}
.dts-live-extra {
  margin-left: auto;
}
.dts-live-strip .dts-live-sound {
  min-height: 38px;
  margin-left: auto;
  padding: 5px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.dts-live-strip .dts-live-sound[aria-pressed="true"] {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
}
.dt-qr-blocked {
  margin: 0;
  padding-inline-start: 22px;
}

html .dts-need-chip {
  color: var(--need-ink, var(--muted));
  background: var(--need-bg, color-mix(in srgb, var(--muted) 11%, var(--surface)));
}
.dts-need-chip[data-tone="info"] { --need-ink: var(--blue); --need-bg: var(--blue-soft); }
.dts-need-chip[data-tone="warn"] { --need-ink: var(--amber); --need-bg: var(--amber-soft); }
.dts-need-chip[data-tone="danger"] { --need-ink: var(--red); --need-bg: var(--red-soft); }
.dts-need-chip[data-tone="ok"] { --need-ink: var(--green); --need-bg: var(--green-soft); }
.dts-history-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}
@media (max-width: 520px) {
  .dts-live-strip .dts-live-sound { min-height: 44px; }
  .dts-sheet .dts-need-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }
  .dts-sheet .dts-need-line > .ds-chip { grid-area: 2 / 1; justify-self: start; }
  .dts-sheet .dts-need-line > .dts-need-line-qty { grid-area: 1 / 2 / span 2; }
}

/* ---------------------------------------------------------------- vue d'ensemble DT */
.dts-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(120deg, #1b2533 0%, #2a2f4f 48%, #9a3412 125%);
  box-shadow: var(--shadow);
}
.dts-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.38), transparent 65%);
  pointer-events: none;
}
.dts-hero > * {
  position: relative;
  z-index: 1;
}
.dts-hero-main {
  min-width: 0;
}
html .dts-hero .dts-hero-chip {
  background: rgba(251, 146, 60, 0.2);
  color: #fdba74;
}
.dts-hero h2 {
  margin: 10px 0 3px;
  color: #fff;
  font-size: 27px;
  letter-spacing: -0.02em;
}
.dts-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}
.dts-hero-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
}
.dts-hero-progress strong {
  color: #fff;
}
.dts-hero-progress .ds-bar {
  width: 220px;
  background: rgba(255, 255, 255, 0.16);
}
.dts-hero-progress .ds-bar i {
  background: #fdba74;
}
.dts-hero-monos {
  display: flex;
  gap: 8px;
}
.dts-hero-monos .dts-mono {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.28);
}
.dts-hero-monos .dts-dot {
  border-color: #232a3e;
}
html .dts-hero .btn.dts-hero-btn {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  background: #fff;
  color: #9a3412;
  font-size: 15.5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
html .dts-hero .btn.dts-hero-btn:hover {
  background: #fff4ec;
}
.dts-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html .dts-hero .btn.dts-hero-ghost {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
html .dts-hero .btn.dts-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}
.dts-kpis .ds-tile-body small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
html .panel.dts-hero-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.dts-hero-empty > div {
  flex: 1;
  min-width: 0;
}
.dts-hero-empty b {
  display: block;
  font-size: 15px;
}
.dts-hero-empty p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dts-datebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hue, var(--c-missions)) 12%, var(--surface));
  color: var(--hue, var(--c-missions));
  line-height: 1;
}
.dts-datebox b {
  font-size: 18px;
}
.dts-datebox small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}
.dts-datebox.is-muted {
  background: var(--surface2);
  color: var(--muted);
}
.dts-res-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}
.dts-res-row:first-child {
  border-top: 0;
}
.dts-res-row b {
  display: block;
  font-size: 13.5px;
}
.dts-res-row small {
  color: var(--muted);
  font-size: 12px;
}
.dts-res-row .ds-bar {
  grid-column: 1 / -1;
  height: 6px;
}
.dts-res-pct {
  font-variant-numeric: tabular-nums;
}
.dts-res-pct b {
  display: inline;
  font-size: 18px;
}
.dts-res-pct small {
  margin-left: 1px;
}
html .dts-home .ds-row .ds-chip,
html .dts-home .ds-row-end .ds-chip {
  flex: none;
}

/* ---------------------------------------------------------------- liste des dispositifs */
.dts-event-tabs {
  margin-bottom: 18px;
}
/* Cartes larges : au moins 440 px, deux par ligne sur ordinateur, pleine largeur sur mobile. */
.dts-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 18px;
}
html .panel.dts-event {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 20px 26px;
}
.dts-event::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--hue);
}
.dts-event-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dts-event-title {
  flex: 1;
  min-width: 0;
}
.dts-event-title h2 {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.25;
}
.dts-event .dts-meta {
  margin: 0;
  font-size: 13px;
}
/* Boutons de même largeur, sur une ligne quand ils tiennent, l'un sous l'autre sinon. */
.dts-event-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
html .dts-event-actions > .btn {
  width: 100%;
  margin: 0;
  justify-content: center;
}
.dts-events.is-archive .dts-event {
  --hue: var(--c-equipe);
}
html .panel.dts-events-empty {
  padding: 34px 18px;
}

/* ---------------------------------------------------------------- suivi en direct */
html .panel.dts-closed {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.dts-closed > div {
  flex: 1;
  min-width: 0;
}
.dts-closed strong {
  display: block;
  font-size: 14.5px;
}
.dts-closed p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dts-overview {
  margin-bottom: 26px;
  align-items: start;
}
.dts-plan .ds-panel-b {
  padding-top: 10px;
}
.dts-stadium {
  display: block;
  overflow: visible;
  width: 100%;
  height: auto;
  max-height: 420px;
  margin: 0 auto;
}
.dts-st-bowl {
  fill: var(--surface2);
  stroke: var(--line);
  stroke-width: 2;
}
.dts-st-stand {
  fill: var(--surface);
  stroke: var(--line);
}
.dts-st-pitch {
  fill: color-mix(in srgb, var(--green) 15%, var(--surface));
  stroke: color-mix(in srgb, var(--green) 40%, var(--surface));
}
.dts-st-line {
  fill: none;
  stroke: color-mix(in srgb, var(--green) 45%, var(--surface));
  stroke-width: 1.5;
}
.dts-st-label {
  font: 600 11px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  fill: var(--faint);
  text-anchor: middle;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dts-pin {
  cursor: pointer;
  outline: none;
  transition: opacity 0.15s;
}
.dts-pin:not([data-action]) {
  cursor: default;
}
.dts-pin-halo {
  fill: var(--st);
  opacity: 0.22;
}
.dts-pin.is-warn .dts-pin-halo {
  animation: dts-halo 1.8s ease-in-out infinite;
}
@keyframes dts-halo {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.45;
  }
}
.dts-pin-body {
  stroke: var(--surface);
  stroke-width: 2;
}
.dts-pin-mono {
  font: 800 11px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
}
.dts-pin-dot {
  fill: var(--st);
  stroke: var(--surface);
  stroke-width: 2.5;
}
.dts-pin.is-dim {
  opacity: 0.32;
}
.dts-pin:hover .dts-pin-halo,
.dts-pin:focus-visible .dts-pin-halo,
.dts-pin[aria-pressed="true"] .dts-pin-halo {
  opacity: 0.45;
  stroke: var(--st);
  stroke-width: 2;
}
.dts-pin:focus-visible .dts-pin-halo {
  stroke: var(--focus);
  stroke-width: 3;
}
.dts-pin.is-waiting .dts-pin-dot {
  visibility: hidden;
}
.dts-pin.is-waiting:not(:focus-visible) .dts-pin-halo {
  visibility: hidden;
}
.dts-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.dts-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dts-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--st);
}
.dts-feed .ds-rows {
  max-height: 452px;
  overflow-y: auto;
}
.dts-act {
  align-items: flex-start;
}
.dts-act .ds-row-main {
  padding-top: 1px;
}
.dts-act-txt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}
.dts-act .ds-row-main > small {
  margin-top: 1px;
}
.dts-act .ds-row-end {
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.dts-feed .ds-empty {
  font-size: 13px;
}
.dts-section-title h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.dts-stations {
  display: flex;
  gap: 10px;
  padding: 2px 2px 10px;
  margin: 0 -2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.dts-station {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 184px;
  padding: 10px 14px 10px 11px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dts-station:hover {
  border-color: color-mix(in srgb, var(--hue, var(--action-bg)) 45%, var(--line));
}
.dts-station.is-active {
  border-color: var(--hue, var(--action-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue, var(--action-bg)) 15%, transparent);
}
.dts-station.is-all .dts-mono {
  background: var(--side);
}
.dts-station-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.dts-station-txt b {
  font-size: 13.5px;
  white-space: nowrap;
}
.dts-station-txt small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.dts-station-txt .ds-chip {
  height: 21px;
  margin-top: 5px;
  padding: 0 8px;
  font-size: 11px;
}
.dts-inf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.dts-inf-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}
.dts-inf,
html .panel.dts-rs-post {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.dts-inf[hidden],
.dts-rs-post[hidden] {
  display: none;
}
.dts-inf-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--hue) 10%, var(--surface)), var(--surface) 72%);
}
.dts-inf-title {
  flex: 1;
  min-width: 0;
}
.dts-inf-title small {
  display: block;
  color: var(--hue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dts-inf-title h2 {
  margin: 1px 0 0;
  font-size: 16px;
  line-height: 1.25;
}
.dts-inf-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.dts-inf-progress .ds-bar {
  flex: none;
  width: 110px;
  height: 6px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}
.dts-inf-head > .ds-chip {
  flex: none;
}
.dts-inf-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}
html .dts-inf-body > .notice {
  margin: 0;
}
html .btn.dts-bulk {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}
.dts-bulk .dts-count {
  background: color-mix(in srgb, var(--action-bg) 12%, var(--surface));
  color: var(--active-text);
}
.dts-clear {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 13.5px;
}
.dts-clear .ds-pill {
  width: 30px;
  height: 30px;
}
.dts-solved {
  align-self: flex-start;
  min-height: 36px;
}

/* carte d'un besoin : gros boutons, mots simples */
.dts-needs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dts-need {
  --st: var(--amber-strong);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--st);
  border-radius: 14px;
  background: var(--surface);
}
.dts-need.is-ready,
.dts-need.is-other {
  --st: var(--blue);
}
.dts-need.is-blocked {
  --st: var(--red);
}
.dts-need.is-done {
  --st: var(--green);
}
.dts-need-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}
.dts-need-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--st) 14%, var(--surface));
  color: var(--st);
}
.dts-need-ic .icon {
  width: 20px;
  height: 20px;
}
.dts-need-main {
  min-width: 0;
}
.dts-need-main h3 {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.dts-need-state {
  margin: 3px 0 0;
  color: var(--st);
  font-size: 13px;
  font-weight: 650;
}
.dts-need.is-todo .dts-need-state {
  color: var(--amber);
}
.dts-need-sub {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}
.dts-need-sub .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--faint);
}
.dts-need-qty {
  text-align: right;
  line-height: 1;
}
.dts-need-qty b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dts-need-qty small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}
.dts-need.is-done .dts-need-qty b {
  color: var(--green);
}
.dts-need-act {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html .btn.dts-big {
  width: 100%;
  min-height: 58px;
  padding: 8px 20px;
  gap: 12px;
  border-radius: 14px;
  font-size: 17px;
  justify-content: center;
}
html .btn.dts-big > .icon {
  width: 22px;
  height: 22px;
}
.dts-big-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}
.dts-big-txt > span {
  font-weight: 800;
}
.dts-big-txt small {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.88;
  white-space: normal;
}
html .btn.dts-big.is-busy {
  opacity: 0.7;
  cursor: progress;
}
.dts-qty-edit > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 2px;
  color: var(--active-text);
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.dts-qty-edit > summary::-webkit-details-marker {
  display: none;
}
.dts-qty-edit > summary .icon {
  width: 15px;
  height: 15px;
}
.dts-qty-edit[open] > summary {
  color: var(--muted);
}
.dts-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 4px 0 2px;
}
.dts-qty-row small {
  color: var(--muted);
  font-size: 12.5px;
}
html .ds-stepper.dts-stepper {
  height: 52px;
  border-radius: 13px;
}
html .ds-stepper.dts-stepper button {
  width: 52px;
  color: var(--text);
}
html .ds-stepper.dts-stepper button:disabled {
  color: var(--faint);
  cursor: default;
}
html .ds-stepper.dts-stepper button .icon {
  width: 18px;
  height: 18px;
}
html .ds-stepper.dts-stepper input {
  width: 76px;
  font-size: 20px;
  -moz-appearance: textfield;
}
html .ds-stepper.dts-stepper input::-webkit-inner-spin-button,
html .ds-stepper.dts-stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dts-verify {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
}
.dts-verify[hidden] {
  display: none;
}
.dts-verify-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--amber);
  font-size: 13.5px;
  font-weight: 700;
}
.dts-verify-title .icon {
  width: 16px;
  height: 16px;
}
.dts-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
html .dts-field .input {
  min-height: 46px;
  background: var(--surface);
}
.dts-verify-msg {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}
.dts-verify-msg:empty,
.dts-verify-msg[hidden] {
  display: none;
}
html .ds-check-line.dts-check {
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
html .ds-check-line.dts-check[hidden] {
  display: none;
}
html .ds-check-line.dts-check input {
  width: 24px;
  height: 24px;
  margin: 0;
}
.dts-transfer {
  min-height: 40px;
}
.dts-need-foot {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: -4px;
}
.dts-need-foot > .dts-qty-edit {
  margin-right: auto;
}
.dts-need-foot > .dts-qty-edit[open] {
  flex-basis: 100%;
  order: 2;
}
.dts-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--active-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dts-link .icon {
  width: 14px;
  height: 14px;
}
.dts-link.is-quiet {
  color: var(--muted);
  font-weight: 500;
}
.dts-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- réassorts */
.dts-rs-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
  margin-bottom: 16px;
}
.dts-rs-total {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.dts-rs-total b {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dts-rs-total span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.dts-rs-filters {
  margin-bottom: 16px;
}
html .dts-rs-filters .ds-fchip {
  height: 40px;
  padding: 0 14px 0 10px;
}
.dts-rs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 18px;
  align-items: start;
}
.dts-rs-list > .dts-rs-empty {
  grid-column: 1 / -1;
}
.dts-rs-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.dts-rs-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dts-rs-step + .dts-rs-step {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.dts-rs-step h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
}
.dts-rs-step h3 .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.dts-rs-step > p {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dts-step-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.dts-rs-step.is-waiting h3 {
  color: var(--muted);
}
html .panel.dts-rs-empty {
  padding: 40px 18px;
}

/* ---------------------------------------------------------------- configuration et popups */
.dts-settings {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.dts-settings-site > .ds-sec-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.dts-settings-site > .ds-sec-h h3 {
  margin: 0;
  font-size: 15.5px;
}
.dts-settings-site > .ds-sec-h p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.dts-settings-site > .ds-sec-h .ds-right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dts-settings-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}
.dts-settings-post {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.dts-settings-post-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.dts-settings-post-txt b {
  font-size: 14px;
}
.dts-settings-post-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.dts-other-sites > summary,
.dts-qr-management > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.dts-other-sites > summary .icon,
.dts-qr-management > summary .icon {
  width: 15px;
  height: 15px;
}
.dts-other-sites[open] > .btn {
  margin-top: 8px;
}
.dts-qr-management {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.dts-qr-management p {
  color: var(--muted);
  font-size: 13px;
}
.dts-plan-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.dts-plan-field legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
}
.dts-plan-pick {
  padding: 8px;
  border-radius: 14px;
  border: 1px dashed var(--selection-line);
  background: var(--surface2);
  cursor: crosshair;
}
.dts-plan-pick .dts-stadium {
  max-height: 240px;
}
.dts-plan-pick .dts-pin {
  cursor: crosshair;
}
.dts-transfer-from {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
}
.dts-transfer-from > div {
  flex: 1;
  min-width: 0;
}
.dts-transfer-from small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.dts-transfer-from b {
  font-size: 15px;
}
.dts-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dts-history:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.dts-history h3 {
  margin: 0;
  font-size: 15.5px;
}
.dts-history-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dts-history-facts span {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 12px;
}
.dts-history-facts b {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.dts-history-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13.5px;
}
.dts-history-line .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .dts-inf-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .dts-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }
  .dts-hero h2 {
    font-size: 23px;
  }
  .dts-hero-progress .ds-bar {
    width: 100%;
  }
  html .dts-hero .btn.dts-hero-btn,
  html .dts-hero .btn.dts-hero-ghost {
    width: 100%;
  }
  .dts-kpis .ds-tile .ds-chev {
    display: none;
  }
  html .page-heading.dts-head {
    align-items: flex-start;
  }
  .dts-head-actions {
    width: 100%;
  }
  .dts-head-actions > .btn {
    flex: 1 1 auto;
  }
  .dts-live-extra {
    display: none;
  }
  .dts-station {
    min-width: 160px;
  }
  .dts-inf-head > .ds-chip {
    display: none;
  }
  .dts-inf-progress .ds-bar {
    width: 64px;
  }
  .dts-inf-body {
    padding: 12px;
  }
  .dts-need {
    padding: 12px;
  }
  .dts-need-qty b {
    font-size: 26px;
  }
  .dts-need-ic {
    width: 36px;
    height: 36px;
  }
  .dts-rs-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dts-rs-total {
    padding: 10px 12px;
  }
  .dts-rs-total .ds-pill.lg {
    width: 36px;
    height: 36px;
  }
  .dts-live.is-reassort .dts-meta {
    display: none;
  }
  .dts-rs-chips {
    flex-direction: column;
    align-items: flex-end;
  }
  html .panel.dts-hero-empty,
  html .panel.dts-closed {
    flex-wrap: wrap;
  }
  .dts-settings-site > .ds-sec-h .ds-right {
    margin-left: 0;
    width: 100%;
  }
  .dts-history-facts b {
    font-size: 17px;
  }
}
@media (max-width: 640px) {
  /* Repères plus grands au doigt sur le plan réduit. */
  .dts-pin {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1.4);
  }
  .dts-st-label {
    font-size: 17px;
    letter-spacing: 0.02em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dts-pin.is-warn .dts-pin-halo {
    animation: none;
  }
}

/* ---------------------------------------------------------------- page publique des infirmeries (QR) */
html .dt-public:not(.dt-native-inventory):not(.dt-native-review) {
  max-width: 860px;
}
.dtp-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.dtp-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}
.dtp-logo .icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand);
  stroke-width: 2.2;
}
html .dt-public header.dtp-station {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}
.dtp-station-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--c-live) 14%, var(--surface));
  color: var(--c-live);
}
.dtp-station-ic .icon {
  width: 26px;
  height: 26px;
}
.dtp-station-txt {
  min-width: 0;
}
.dtp-station-txt .ds-eyebrow {
  margin: 0 0 2px;
}
html .dt-public .dtp-station h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
html .dt-public .dtp-station.is-compact {
  margin-bottom: 12px;
}
html .dt-public .dtp-station.is-compact .dtp-station-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
html .dt-public .dtp-station.is-compact h1 {
  font-size: 18px;
}
.dtp-station.is-compact .dts-meta {
  display: none;
}
.dtp-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  padding: 18px;
  margin-bottom: 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
html .dt-public .dtp-progress h2 {
  margin: 8px 0 2px;
  font-size: 20px;
}
.dtp-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.dtp-score {
  text-align: right;
}
.dtp-score b {
  display: block;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dtp-score b span {
  color: var(--muted);
  font-size: 18px;
}
.dtp-score small {
  color: var(--muted);
  font-size: 12.5px;
}
.dtp-progress-bar {
  grid-column: 1 / -1;
  --hue: var(--green);
}
.dtp-identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: var(--r);
  border: 1px solid var(--selection-line);
  background: var(--blue-soft);
}
.dtp-identity-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
}
.dtp-identity-label .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}
html .dtp-identity .input {
  min-height: 52px;
  font-size: 17px;
  background: var(--surface);
}
.dtp-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.dtp-group {
  margin-bottom: 22px;
}
html .dt-public header.dtp-group-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
html .dt-public .dtp-group-h h2 {
  flex: 1;
  margin: 0;
  font-size: 17px;
}
.dtp-group-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.dtp-eq-list,
.dtp-needs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dtp-eq {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.dtp-eq.is-complete {
  background: var(--inventory-ok-bg);
}
.dtp-eq-art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--surface2);
  overflow: hidden;
}
.dtp-eq-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.dtp-eq-art .icon {
  width: 28px;
  height: 28px;
  color: var(--muted);
}
.dtp-eq-info {
  min-width: 0;
}
.dtp-eq-info h3 {
  margin: 6px 0 0;
  font-size: 15.5px;
  line-height: 1.3;
}
.dtp-eq-info small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}
.dtp-eq-info small .icon {
  width: 13px;
  height: 13px;
}
html .btn.dtp-eq-btn {
  min-height: 52px;
  padding: 0 18px;
  font-size: 15px;
}
.dtp-summary-h {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
html .dt-public .dtp-summary-h h2 {
  margin: 8px 0 2px;
  font-size: 21px;
}
.dtp-summary-h p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.dtp-need {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber-strong);
  background: var(--surface);
}
.dtp-need h3 {
  margin: 0;
  font-size: 15.5px;
}
.dtp-need p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dtp-need strong {
  flex: none;
  font-size: 28px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dtp-need strong small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.dtp-need.is-stale strong {
  color: var(--amber);
  font-size: 15px;
}
html .notice.dtp-issue {
  margin: 0;
}
.dtp-all-delivered {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
  border-radius: var(--r);
  background: var(--green-soft);
  color: var(--green);
  font-size: 16px;
}
html .btn.dtp-consult {
  min-height: 48px;
  margin-bottom: 8px;
}
.dtp-back {
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .dtp-eq {
    grid-template-columns: auto minmax(0, 1fr);
  }
  html .btn.dtp-eq-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .dtp-eq-art {
    width: 56px;
    height: 56px;
  }
  html .dt-public .dtp-station h1 {
    font-size: 22px;
  }
  .dtp-score b {
    font-size: 28px;
  }
}

/* ================================================================
   Réassort simplifié : bandeau « À faire maintenant », liste des
   infirmeries, fiche d'infirmerie, tournée de préparation, livraison.
   ================================================================ */
.dts-todo {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: var(--r);
  background: var(--action-bg);
  color: #fff;
}
.dts-todo-txt {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.dts-todo small,
.dts-todo span {
  font-size: 13px;
  opacity: 0.85;
}
.dts-todo b {
  font-size: 18px;
  line-height: 1.3;
}
.dts-todo-acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
html .dts-todo .btn {
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  border: 0;
}
html .dts-todo .dts-todo-main {
  background: #fff;
  color: var(--action-bg);
}
html .dts-todo .dts-todo-second {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.dts-todo.is-clear {
  background: var(--green-soft);
  color: var(--text);
}
.dts-todo.is-clear > .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--green);
}
.dts-todo.is-clear > div {
  display: grid;
  gap: 2px;
}
.dts-todo.is-clear small,
.dts-todo.is-clear span {
  color: var(--muted);
  opacity: 1;
}

/* Liste des infirmeries (à côté du plan) */
.dts-post-rows {
  display: grid;
}
.dts-post-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dts-post-rows .dts-post-row:first-child {
  border-top: 0;
}
.dts-post-row:hover {
  background: var(--surface2);
}
.dts-post-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.dts-post-main b {
  font-size: 15px;
}
.dts-post-main small {
  color: var(--muted);
  font-size: 12.5px;
}
.dts-post-row > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--faint);
}
.dts-post-row .ds-chip {
  flex: none;
}
.ds-chip.dts-ready {
  background: color-mix(in srgb, var(--c-missions) 12%, var(--surface));
  color: var(--c-missions);
}
.dts-posts .ds-panel-h {
  border-bottom: 1px solid var(--line);
}

/* Fiche et livraison (popups) */
html body .modal > .modal-header .dts-mono.dts-modal-mono {
  width: 38px;
  height: 38px;
  font-size: 12px;
}
.dts-sheet-progress {
  display: grid;
  gap: 6px;
}
.dts-sheet-progress .ds-bar {
  height: 6px;
}
.dts-sheet-progress small {
  color: var(--muted);
  font-size: 13px;
}
.dts-need-lines {
  display: grid;
}
.dts-need-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 9px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dts-need-line.is-static {
  cursor: default;
}
.dts-need-line + .dts-need-line {
  border-top: 1px solid var(--line);
}
.dts-need-line-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.dts-need-line-main b {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}
.dts-need-line-main small {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dts-need-line .ds-chip {
  flex: none;
}
.dts-need-line-qty {
  flex: none;
  min-width: 32px;
  text-align: right;
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
html body .modal .dts-sheet-foot {
  display: grid;
  gap: 8px;
}
html body .modal .dts-sheet-foot .dts-sheet-main {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
}
html body .modal .dts-solved {
  justify-self: start;
}

/* Tournée de préparation */
.dts-tour-head {
  position: sticky;
  top: 72px;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: -4px 0 0;
  padding: 4px 0 12px;
  background: var(--surface);
}
.dts-tour-head > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.dts-tour-head b {
  font-size: 16px;
}
.dts-tour-head small {
  color: var(--muted);
  font-size: 12.5px;
}
.dts-tour-head .ds-bar {
  height: 6px;
}
.dts-tour-list {
  display: grid;
  gap: 8px;
}
.dts-tour-zone {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dts-tour-zone:first-child {
  margin-top: 0;
}
.dts-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  touch-action: manipulation;
}
.dts-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dts-pick-box {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--faint);
  border-radius: 9px;
  color: transparent;
}
.dts-pick-box .icon {
  width: 18px;
  height: 18px;
}
.dts-pick-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.dts-pick-main b {
  font-size: 15px;
  line-height: 1.3;
}
.dts-pick-main small {
  color: var(--muted);
  font-size: 12.5px;
}
.dts-pick-main small.dts-tour-warn {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: var(--amber);
  font-weight: 600;
}
.dts-tour-warn .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}
.dts-pick-qty {
  flex: none;
  min-width: 36px;
  text-align: right;
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.dts-pick:has(input:checked) {
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
  background: var(--green-soft);
}
.dts-pick:has(input:checked) .dts-pick-box {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.dts-pick:has(input:checked) .dts-pick-main b {
  color: var(--green);
}
.dts-pick:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .dts-todo {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .dts-todo-acts {
    display: grid;
  }
  html .dts-todo .btn {
    width: 100%;
    justify-content: center;
  }
  .dts-todo.is-clear {
    flex-direction: row;
    align-items: flex-start;
  }
  .dts-post-row {
    padding: 10px 14px;
  }
  .dts-tour-head {
    top: 64px;
  }
}
/* Dans une popup, les lignes d'infirmerie s'alignent sur les autres lignes. */
html body .modal .dts-post-row {
  padding-left: 0;
  padding-right: 0;
}
html body .modal .dts-post-row:hover {
  background: none;
}
html body .modal .dts-post-row:hover .dts-post-main b {
  color: var(--active-text);
}

/* Infirmeries et QR : une ligne par infirmerie, sans cadre. */
.dts-set-rows {
  display: grid;
}
.dts-set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 0;
}
.dts-set-row + .dts-set-row {
  border-top: 1px solid var(--line);
}
.dts-set-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.dts-set-main b {
  font-size: 15px;
}
.dts-set-main small {
  font-size: 12.5px;
  color: var(--muted);
}
html .dts-set-row .btn,
html .dts-set-row .icon-btn {
  flex: none;
  margin: 0;
}
.dts-set-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
html .dts-set-acts .btn {
  margin: 0;
}
html body .modal .dts-recipients {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
html body .modal .dts-recipients legend {
  padding: 0;
  margin-bottom: 6px;
}
html body .modal .dt-qr-dialog .dt-qr {
  justify-self: center;
  margin: 4px 0;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}
@media (max-width: 760px) {
  html .dts-set-row .dts-set-qr {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  html .dts-set-row .dts-set-qr span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

/* Bandeau « À faire » : même bleu foncé en clair et en sombre (lisible avec le texte blanc). */
html .dts-todo:not(.is-clear, .is-blocked) {
  --todo-bg: #2d5b83;
  background: var(--todo-bg);
}
html .dts-todo .dts-todo-main {
  color: var(--todo-bg, #2d5b83);
}
html[data-theme="dark"] .dts-todo:not(.is-clear, .is-blocked) {
  --todo-bg: #24496a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .dts-todo .dts-todo-main {
  color: #24496a;
}
/* État « rien à faire » : coche dans une pastille, vert atténué. */
html .dts-todo.is-clear {
  background: color-mix(in srgb, var(--green) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line));
}
html .dts-todo.is-clear > .icon {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

/* Liste de ramassage : emplacement en petit, répartition en pastilles « Infirmerie Nord 2 ». */
.dts-pick-place {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}
.dts-pick-place .icon {
  width: 13px;
  height: 13px;
}
.dts-splits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 4px;
}
.dts-split {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.dts-split b {
  color: var(--text);
  font-size: 12.5px;
}
html .dts-tour-note {
  margin: 4px 0 0;
}
.dts-tour-head small .icon {
  width: 13px;
  height: 13px;
  margin-right: 3px;
  vertical-align: -2px;
}

.dts-tour-head small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
html .dts-tour-head small .icon {
  flex: none;
  margin: 0;
  vertical-align: 0;
}

/* Liste de ramassage : l'en-tête collant respire sous le titre de la fenêtre. */
html .dts-tour-head {
  padding-top: 14px;
  margin-top: -14px;
}
/* Clôture du dispositif : en bas de page, à part. */
.dts-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}
.dts-end p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
html .dts-end .btn {
  flex: none;
  margin: 0;
}
@media (max-width: 760px) {
  .dts-end {
    flex-direction: column;
    align-items: stretch;
  }
  /* Le menu suffit pour revenir : pas de lien « ← Vélodrome » sur mobile. */
  html .dts-back {
    display: none;
  }
}

/* Besoins restants : la tuile ouvre la synthèse et garde l’alignement des compteurs. */
.dts-tile-action:hover {
  border-color: var(--amber-line);
  background: color-mix(in srgb, var(--amber-strong) 7%, var(--surface));
}
.dts-tile-chevron {
  align-self: center;
  margin-inline-start: auto;
  color: var(--amber);
}
.dts-tile-chevron .icon {
  width: 15px;
  height: 15px;
}
.dts-summary-line .dts-need-line-main small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.dts-summary-line .dts-need-line-qty small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
html .dts-todo.is-blocked {
  background: color-mix(in srgb, var(--amber-strong) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amber-strong) 35%, var(--line));
  color: var(--text);
}
.dts-todo.is-blocked > .icon {
  color: var(--amber);
}
.dts-todo.is-blocked > div {
  display: grid;
  gap: 2px;
}
.dts-todo.is-blocked small {
  color: var(--muted);
}
html .dt-place-chip {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
html .dt-place-chip.is-base {
  background: var(--blue-soft);
  color: var(--blue);
}
html .dt-place-chip.is-venue {
  background: color-mix(in srgb, var(--c-armoire) 15%, var(--surface));
  color: color-mix(in srgb, var(--c-armoire) 76%, var(--text));
}
.dt-place-chip .icon {
  width: 14px;
  height: 14px;
}
.stock-line-main > .dt-place-chip {
  display: inline-flex;
  margin: 4px 0 2px;
}
.dt-stock-reserve-field {
  margin: 0 0 10px;
}
.dt-transfer-article {
  margin: 0 0 10px;
  font-size: 16px;
}
.dt-transfer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.dt-transfer-route > div {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface2);
  padding: 10px;
}
.dt-transfer-route > .icon, .dt-transfer-route > div > small {
  color: var(--muted);
}
.dt-transfer-route select {
  width: 100%;
  min-width: 0;
}
@media (max-width: 600px) {
  .dts-tile-action {
    gap: 7px;
  }
  .dts-tile-chevron .icon {
    width: 12px;
    height: 12px;
  }
  .dts-summary-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }
  .dts-summary-line > .ds-chip {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .dts-summary-line > .dts-need-line-qty {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .dt-transfer-route {
    gap: 5px;
  }
  .dt-transfer-route > div {
    padding: 7px;
  }
  .dt-transfer-route > .icon {
    width: 15px;
  }
}
