/* Logistique DUO 3.4 — règles propres à chaque écran. Les composants partagés sont dans design.css. */

/* =============================================================== Missions */
html .avatar[style*="--hue"] {
  background: var(--hue);
  color: #fff;
}
.mission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mission-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12.5px;
}
.mission-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mission-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--hue);
}
html .mission-cards,
.mission-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.mission-card,
.model-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mission-card:hover {
  transform: translateY(-2px);
}
.mc-band {
  height: 6px;
  background: var(--hue);
}
.mc-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 16px;
  flex: 1;
}
.mc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mc-title {
  flex: 1;
  min-width: 0;
}
.mc-title small {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hue);
}
.mc-title h2 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.mc-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.mission-card .mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.mission-card .mission-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mission-card .mission-meta .icon {
  width: 15px;
  height: 15px;
  color: var(--faint);
}
.mc-means {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.mc-vehicle {
  position: relative;
  width: 118px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: var(--surface2);
}
.mc-vehicle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mc-vehicle span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 18, 26, 0.65);
  padding: 2px 6px;
  border-radius: 6px;
}
.mc-vehicle.is-icon,
.mc-vehicle.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mc-vehicle.is-icon {
  background: color-mix(in srgb, var(--c-vehicules) 11%, var(--surface));
  color: var(--c-vehicules);
}
.mc-vehicle.is-empty {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--faint);
}
.mc-vehicle.is-icon span,
.mc-vehicle.is-empty span {
  position: static;
  background: none;
  color: inherit;
  font-weight: 600;
  font-size: 11px;
  padding: 0;
}
.mc-vehicle .icon {
  width: 20px;
  height: 20px;
}
.mc-lots {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.mc-lot-imgs {
  display: flex;
}
.mc-lot-imgs img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface2);
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.mc-lot-imgs img:first-child {
  margin-left: 0;
}
.mc-lots small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mc-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.mc-foot .mission-avatars {
  display: flex;
}
.mc-foot .mission-avatars .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
  border: 2px solid var(--surface);
  margin-left: -7px;
}
.mc-foot .mission-avatars .avatar:first-child {
  margin-left: 0;
}
.mc-foot-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}
.mc-foot-text strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}
.mc-foot .ds-ring {
  margin-left: auto;
}
html .mc-foot .btn {
  min-height: 38px;
  padding: 0 14px;
}
.model-card .mc-foot {
  justify-content: flex-end;
}
.model-facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}
.model-facts span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.model-facts .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.mission-new-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.mission-new-card:hover {
  border-color: var(--c-missions);
  color: var(--c-missions);
  background: color-mix(in srgb, var(--c-missions) 5%, transparent);
}
.mission-new-card .ds-pill.lg {
  width: 54px;
  height: 54px;
}
html .mission-banner-v4 {
  border-top: 6px solid var(--hue, var(--c-missions));
}
html .mission-banner-v4 .mission-type-label {
  color: var(--hue, var(--c-missions));
}

/* ------------------------------------------------ popup de préparation */
.ds-wiz-form {
  display: contents;
}
.wz-big {
  font-size: 17px;
  font-weight: 600;
  min-height: 52px !important;
  width: 100%;
}
.wz-models {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wz-model,
.wz-type,
.wz-lot {
  position: relative;
  cursor: pointer;
}
.wz-model input,
.wz-type input,
.wz-lot input,
.wz-vehicle-top input,
.wz-usage input,
.wz-role input,
.wz-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.wz-model {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.wz-model-vis {
  position: relative;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hue) 16%, var(--surface)), color-mix(in srgb, var(--hue) 4%, var(--surface)));
  color: var(--hue);
}
.wz-model-vis img {
  height: 74px;
  max-width: 45%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}
.wz-model-vis > .icon {
  width: 32px;
  height: 32px;
}
.wz-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--hue);
  color: #fff;
  display: none;
  place-items: center;
}
.wz-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}
.wz-model-txt {
  padding: 12px 14px 14px;
}
.wz-model-txt b {
  display: block;
  font-size: 14px;
}
.wz-model-txt small {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.wz-model-txt small span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wz-model-txt .icon {
  width: 13px;
  height: 13px;
}
.wz-model:has(input:checked) {
  border-color: var(--hue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue) 14%, transparent);
}
.wz-model:has(input:checked) .wz-check {
  display: grid;
}
.wz-model:has(input:focus-visible),
.wz-type:has(input:focus-visible),
.wz-lot:has(input:focus-visible),
.wz-vehicle-top:has(input:focus-visible),
.wz-role:has(input:focus-visible),
.wz-usage label:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.wz-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.wz-type {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.wz-type b {
  display: block;
  font-size: 14px;
}
.wz-type small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.wz-type:has(input:checked) {
  border-color: var(--hue);
  background: color-mix(in srgb, var(--hue) 7%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue) 14%, transparent);
}
.wz-when {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}
.wz-when .label,
.wz-enddate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.wz-enddate {
  margin-top: 12px;
  max-width: 260px;
}
.wz-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.wz-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.15s;
  flex: none;
}
.wz-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: left 0.15s;
}
.wz-toggle input:checked + .wz-switch {
  background: var(--c-missions);
}
.wz-toggle input:checked + .wz-switch::after {
  left: 19px;
}
.wz-toggle input:focus-visible + .wz-switch {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
html .notice.wz-duration {
  margin-top: 14px;
}
.wz-place {
  max-width: none;
}
.wz-people {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.wz-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.wz-person:first-child {
  border-top: 0;
}
.wz-who {
  flex: 1;
  min-width: 0;
}
.wz-who b {
  display: block;
  font-size: 13.5px;
}
.wz-who small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}
.wz-who small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wz-who small .icon {
  width: 13px;
  height: 13px;
}
.wz-busy {
  color: var(--amber) !important;
}
.wz-roles {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.wz-role {
  position: relative;
  cursor: pointer;
}
.wz-role span {
  display: inline-grid;
  place-items: center;
  height: 30px;
  min-width: 46px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.wz-role:hover span {
  border-color: var(--c-missions);
  color: var(--c-missions);
}
.wz-role input:checked + span {
  background: var(--c-missions);
  border-color: var(--c-missions);
  color: #fff;
}
html .icon-btn.wz-remove {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--faint);
}
html .icon-btn.wz-remove:hover {
  color: var(--red);
  background: var(--surface2);
}
.wz-people-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.wz-search-wrap {
  position: relative;
  margin-top: 10px;
}
.wz-search-wrap .ds-search {
  max-width: none;
}
.wz-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  max-height: 280px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.wz-sugg {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.wz-sugg:hover,
.wz-sugg:focus {
  background: var(--surface2);
}
.wz-sugg > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.wz-sugg b {
  display: block;
  font-size: 13px;
}
.wz-sugg small {
  font-size: 11.5px;
  color: var(--green);
}
.wz-sugg > .icon {
  width: 16px;
  height: 16px;
  color: var(--faint);
}
.wz-sugg-empty {
  margin: 0;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.wz-vehicles {
  display: grid;
  gap: 10px;
}
.wz-vehicle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.wz-vehicle.sel {
  border-color: var(--c-vehicules);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-vehicules) 14%, transparent);
}
.wz-vehicle-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  flex: 1 1 260px;
  min-width: 0;
  cursor: pointer;
}
.wz-cb {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex: none;
}
.wz-cb .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.8;
  color: #fff;
  display: none;
}
.wz-vehicle.sel .wz-cb {
  background: var(--c-vehicules);
  border-color: var(--c-vehicules);
}
.wz-lot.sel .wz-cb {
  background: var(--c-materiel);
  border-color: var(--c-materiel);
}
.wz-vehicle.sel .wz-cb .icon,
.wz-lot.sel .wz-cb .icon {
  display: block;
}
.wz-vimg {
  width: 84px;
  height: 56px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c-vehicules) 12%, var(--surface));
  color: var(--c-vehicules);
}
.wz-vimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wz-vimg .icon {
  width: 26px;
  height: 26px;
}
.wz-vtxt {
  min-width: 0;
}
.wz-vtxt b {
  display: block;
}
.wz-vtxt small {
  color: var(--muted);
  font-size: 12px;
}
.wz-usage {
  display: none;
  gap: 4px;
  padding: 0 12px 12px;
}
.wz-vehicle.sel .wz-usage {
  display: flex;
}
.wz-usage label {
  position: relative;
  cursor: pointer;
}
.wz-usage span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wz-usage .icon {
  width: 13px;
  height: 13px;
}
.wz-usage input:checked + span {
  background: color-mix(in srgb, var(--c-vehicules) 12%, var(--surface));
  border-color: var(--c-vehicules);
  color: var(--c-vehicules);
}
.wz-transport {
  display: none;
  margin: 0 12px 12px;
}
.wz-vehicle.sel .wz-transport {
  display: inline-flex;
}
.wz-lots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wz-lot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.wz-lot .wz-cb {
  position: absolute;
  top: 10px;
  right: 10px;
}
.wz-lot.sel {
  border-color: var(--c-materiel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-materiel) 14%, transparent);
}
.wz-lot.locked {
  cursor: default;
  background: color-mix(in srgb, var(--c-materiel) 5%, var(--surface));
}
.wz-lot-vis {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 28px;
  color: var(--c-materiel);
}
.wz-lot-vis img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.wz-lot-vis .icon {
  width: 30px;
  height: 30px;
}
.wz-lot b {
  font-size: 13.5px;
}
.wz-lot small {
  color: var(--muted);
  font-size: 12px;
}
.wz-lot .ds-chip {
  align-self: flex-start;
  margin-top: auto;
}
.wz-recap-title {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.wz-recap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.wz-recap-band {
  height: 5px;
  background: var(--hue);
}
.wz-recap-in {
  padding: 14px 16px;
}
.wz-recap-type {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
}
.wz-recap-type small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hue);
}
.wz-recap-type b {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.wz-recap-row {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.wz-recap-row > .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--faint);
}
.wz-recap-row span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.wz-recap-row b {
  font-weight: 600;
}
.wz-recap-row em {
  color: var(--faint);
}
.wz-recap-crew {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.wz-crew-chip {
  padding: 0 8px 0 3px;
}
.wz-crew-chip .avatar {
  font-size: 8.5px;
}
.wz-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
html .modal.ds-wizard .modal-header .ds-recap-toggle {
  margin-left: auto;
}
html .modal.ds-wizard .modal-header .ds-recap-toggle + .icon-btn,
html .modal.ds-wizard .modal-header h2 + .icon-btn {
  margin-left: auto;
}
html .modal.ds-wizard .modal-header .ds-recap-toggle + .icon-btn {
  margin-left: 0;
}
@media (max-width: 1100px) {
  .wz-models,
  .wz-lots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  html .mission-cards,
  .mission-models {
    grid-template-columns: minmax(0, 1fr);
  }
  .mission-legend {
    display: none;
  }
  .mission-toolbar .ds-segs {
    width: 100%;
  }
  .mission-toolbar .ds-seg {
    flex: 1;
    justify-content: center;
  }
  .wz-models,
  .wz-lots {
    grid-template-columns: minmax(0, 1fr);
  }
  .wz-types,
  .wz-when {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wz-when .label:first-child {
    grid-column: 1 / -1;
  }
  .wz-person {
    flex-wrap: wrap;
  }
  .wz-roles {
    order: 3;
    width: 100%;
    padding-left: 46px;
  }
  html .modal.ds-wizard .ds-wiz-form > .modal-footer .btn {
    flex: 1;
  }
}
