:root {
  font-family: system-ui;
  background: #f2f5f8;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

header {
  position: sticky;
  top: 0;
  background: #0b5cab;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  z-index: 3;
}

header button {
  background: #fff;
  color: #0b5cab;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
}

main {
  max-width: 850px;
  margin: auto;
  padding: 12px;
}

.card {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 5px #0001;
}

h2 {
  font-size: 18px;
}

.primary,
.btn {
  background: #0b5cab;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 14px;
  text-decoration: none;
  display: inline-block;
}

.wide {
  width: 100%;
}

.search {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.search input {
  flex: 1;
  width: 100%;
  font-size: 16px;
}

input {
  padding: 10px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
}

.result,
.line {
  border: 1px solid #dde3e9;
  padding: 11px;
  border-radius: 9px;
  margin-top: 8px;
}

.result {
  cursor: pointer;
  background: #fff;
}

.result:hover {
  background: #f2f7fc;
}

.designation {
  font-weight: 700;
}

.meta {
  font-size: 13px;
  color: #65727e;
  margin-top: 3px;
}

.head {
  display: flex;
  justify-content: space-between;
}

.line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lineinfo {
  flex: 1;
}

.line button {
  min-width: 34px;
}

.danger {
  background: #b42318;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: #0008;
  display: flex;
  align-items: flex-end;
  z-index: 9;
}

.modalbox {
  background: #fff;
  width: 100%;
  max-width: 650px;
  margin: auto;
  padding: 20px;
  border-radius: 16px;
}

.modalbox #x {
  float: right;
  font-size: 22px;
  border: 0;
  background: transparent;
}

.modalbox input {
  width: 100%;
  margin-top: 6px;
  font-size: 16px;
}

.modalbox label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
}

.modalbox button.primary {
  margin-top: 10px;
}

.productfield {
  padding: 5px 0;
  border-bottom: 1px solid #eef1f4;
}

.reader video,
#camera video {
  width: 100%;
  max-height: 55vh;
  margin-top: 10px;
}

pre {
  white-space: pre-wrap;
}

/* Cette règle doit rester après .modal */
.hidden {
  display: none !important;
}