/* Commandes de configuration uniformes. */
.config-footer-v4 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: nowrap;
  padding-top: 15px;
  padding-bottom: 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 8;
}
.config-footer-v4.has-delete {
  justify-content: space-between;
}
.config-save-actions-v4 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn.danger-outline-v4 {
  background: var(--surface);
  border: 1px solid #e8bac2;
  color: var(--red);
  box-shadow: none;
  font-weight: 600;
  gap: 7px;
}
.btn.danger-outline-v4 .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
html[data-theme="dark"] .btn.danger-outline-v4:not(.secondary):not(.soft):not(.green) {
  background: var(--surface);
  border-color: #68414a;
  color: var(--red);
}
.lot-grid-v4 {
  grid-auto-rows: 1fr;
}
.lot-card-v4 {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lot-card-v4 > h2 {
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.35;
  min-height: 0;
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.4px;
}
.lot-meta-v4 {
  font-size: 11px;
  line-height: 1.6;
  min-height: 0;
  margin-top: 6px;
}
.lot-preview-v4 {
  min-height: 0;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.lot-preview-item-v4 {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
  padding: 9px 0;
}
.lot-preview-item-v4 span {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lot-preview-item-v4 .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}
.lot-more-v4 {
  height: 36px;
  display: flex;
  align-items: center;
  margin-top: 5px;
  margin-bottom: 12px;
}
.lot-more-v4 .text-btn {
  font-size: 11px;
  min-height: 33px;
}
.lot-footer-v4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}
.lot-footer-v4 .btn {
  padding: 10px 12px;
  font-size: 12px;
}
.stock-header-v4 {
  margin-bottom: 10px;
}
.stock-heading-v4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.stock-heading-v4 h2 {
  font-size: 20px;
  line-height: 1.4;
}
.stock-heading-v4 p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.stock-toolbar-v4 {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.stock-export-v4 {
  flex-shrink: 0;
}
.stock-list-v4 {
  margin-top: 20px;
}
.stock-row-v4 {
  padding: 22px 0;
}
.stock-information-v4 {
  flex: 1;
  min-width: 0;
}
.stock-information-v4 small {
  display: block;
  font-size: 12px;
  line-height: 1.65;
  margin-top: 5px;
}
.stock-title-v4 {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  padding: 0;
  line-height: 1.5;
  cursor: pointer;
}
.stock-title-v4:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.stock-actions-v4 {
  flex: 0 0 auto;
}
.stock-information-v4 .badge {
  margin-top: 9px;
}
.history-tools-v4 {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  margin-bottom: 14px;
}
.history-trash-v4 {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 2px;
  min-height: 34px;
}
.history-trash-v4:hover {
  color: var(--text);
}
.history-trash-v4 .icon {
  width: 15px;
  height: 15px;
}
@media (max-width: 1100px) {
  .lot-grid-v4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .config-footer-v4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 13px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }
  .config-footer-v4.has-delete {
    grid-template-columns: auto 1fr 1fr;
  }
  .config-save-actions-v4 {
    display: contents;
  }
  .config-footer-v4 .btn {
    min-height: 44px;
    min-width: 0;
    padding: 10px;
    font-size: 12px;
    white-space: nowrap;
    flex: none;
  }
  .config-footer-v4 .btn.danger-outline-v4 {
    gap: 5px;
  }
  .lot-grid-v4 {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }
  .lot-card-v4 {
    padding: 20px !important;
  }
  .lot-card-v4 > h2 {
    font-size: 21px;
    min-height: 0;
    margin-top: 0;
  }
  .lot-meta-v4 {
    min-height: 0;
    font-size: 12px;
  }
  .lot-preview-v4 {
    min-height: 0;
    margin-top: 0;
  }
  .lot-preview-item-v4 {
    font-size: 13px;
    min-height: 48px;
  }
  .lot-more-v4 {
    height: auto;
    min-height: 8px;
    margin-top: 5px;
    margin-bottom: 14px;
  }
  .lot-more-v4:empty {
    display: none;
  }
  .lot-footer-v4 {
    margin-top: 17px;
  }
  .lot-footer-v4 .btn {
    font-size: 13px;
    min-height: 44px;
  }
  .stock-heading-v4 h2 {
    font-size: 18px;
  }
  .stock-heading-v4 p {
    font-size: 12px;
  }
  .stock-heading-v4 {
    align-items: flex-start;
  }
  .stock-export-v4 {
    padding: 10px !important;
    min-width: 43px;
    width: 43px;
    min-height: 43px;
  }
  .stock-export-v4 span {
    display: none;
  }
  .stock-export-v4 .icon {
    width: 19px;
    height: 19px;
  }
  .stock-toolbar-v4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
  }
  .stock-toolbar-v4 .btn {
    font-size: 12px;
    min-height: 45px;
    padding: 11px 9px;
    white-space: nowrap;
  }
  .stock-toolbar-v4 .btn .icon {
    width: 15px;
    height: 15px;
  }
  .stock-row-v4 {
    padding: 22px 0;
  }
  .stock-information-v4 .stock-title-v4 {
    font-size: 14px;
  }
  .stock-actions-v4 {
    margin-top: 15px;
  }
  .stock-actions-v4 .btn {
    font-size: 13px;
  }
  .stock-list-v4 {
    margin-top: 15px;
  }
  .history-tools-v4 {
    margin-top: -5px;
    margin-bottom: 12px;
  }
  .history-trash-v4 {
    font-size: 12px;
  }
  .v2-material-card > .btn {
    margin-top: auto;
  }
  .v2-material-card {
    display: flex;
    flex-direction: column;
  }
  .v2-material-card > .row {
    margin-bottom: 16px;
  }
}
.linked-note-v4,
.template-reference-v4 {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface2);
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.6;
}
.linked-note-v4 small,
.template-reference-v4 small {
  font-size: 10px;
  color: var(--muted);
}
.template-reference-v4 {
  padding: 8px;
  font-size: 10px;
}
.template-reference-v4 small {
  font-size: 10px;
}
@media (max-width: 700px) {
  .linked-note-v4 {
    font-size: 12px;
  }
  .linked-note-v4 small {
    font-size: 11px;
  }
  .template-reference-v4 {
    font-size: 11px;
  }
  .template-reference-v4 small {
    font-size: 11px;
  }
}
.icon-btn.danger-icon-v4 {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: var(--surface);
  color: var(--red);
  border: 1px solid #e8bac2;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon-btn.danger-icon-v4 .icon {
  width: 19px;
  height: 19px;
}
html[data-theme="dark"] .icon-btn.danger-icon-v4 {
  border-color: #68414a;
}
.icon-btn.danger-icon-v4.row-trash-v4 {
  width: 36px;
  height: 40px;
  min-width: 0;
  min-height: 40px;
}
.template-row {
  grid-template-columns: minmax(220px, 1fr) 90px 150px 44px;
}
.config-footer-v4 > .danger-icon-v4 {
  align-self: center;
}
@media (max-width: 700px) {
  .template-row {
    grid-template-columns: 1fr 95px;
  }
  .config-footer-v4.has-delete {
    grid-template-columns: 44px 1fr 1fr;
  }
  .icon-btn.danger-icon-v4.row-trash-v4 {
    width: 38px;
    min-height: 42px;
    height: 42px;
  }
  .config-footer-v4 .danger-icon-v4 {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
}

.password-control {
  position: relative;
  display: block;
}
.password-control > .input {
  padding-right: 52px;
}
.password-eye {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-eye[aria-pressed="true"] {
  color: var(--active-text);
}
