/* ============================================
   INVENTAIRE VID 32 — Styles spécifiques
   ============================================ */

/* ---------- BOUTON RETOUR (header) ---------- */

.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-back:hover { background: #e2e2e2; color: #111; }

/* ---------- STATUT HEADER ---------- */

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s;
}
.status-label {
  font-size: 0.72rem;
  color: #888;
  white-space: nowrap;
}

/* ---------- BLOC AGENT / DATE ---------- */

.info-block {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  padding: 20px 0 16px;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.field-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #fafafa;
  border: 1.5px solid #ebebeb;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.field-input:focus {
  border-color: #1a1a1a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,26,26,0.06);
}
.field-input.field-error {
  border-color: #e63946;
  background: #fff5f5;
}
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%23aaa' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ---------- BARRE DE PROGRESSION ---------- */

.progress-bar-wrap {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.progress-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
}

/* ---------- SECTIONS INVENTAIRE ---------- */

.inv-section {
  margin-top: 12px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.inv-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #fafafa;
}
.inv-section-header i {
  font-size: 1rem;
  color: #e63946;
}

/* Toggle */
.section-toggle {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.section-toggle:active {
  background: #f0f0f0;
}

.section-chevron {
  font-size: 0.85rem !important;
  color: #bbb !important;
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

/* Corps repliable — fermé par défaut */
.section-body {
  display: none;
  border-top: 1px solid #f5f5f5;
}
.section-body.open {
  display: block;
}

.section-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #bbb;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 99px;
}

/* ---------- ITEMS ---------- */

.inv-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f7f7f7;
  transition: background 0.12s;
}
.inv-item:last-child { border-bottom: none; }
.inv-item.item-done {
  background: #f7fdf8;
}

/* ── Checkbox custom ── */
.item-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.item-checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.item-checkmark {
  width: 26px;
  height: 26px;
  border: 2px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}
.item-checkbox-wrap input[type="checkbox"]:checked + .item-checkmark {
  background: #2ea84d;
  border-color: #2ea84d;
}
.item-checkbox-wrap input[type="checkbox"]:checked + .item-checkmark::after {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ── Corps item ── */
.item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.35;
}
.item-done .item-name {
  color: #aaa;
  text-decoration: line-through;
  text-decoration-color: #ccc;
}

/* ── Quantité ── */
.item-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-label {
  font-size: 0.72rem;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  min-width: 24px;
}
.qty-input {
  width: 72px;
  padding: 6px 10px;
  font-size: 0.88rem;
  background: #fafafa;
  border: 1.5px solid #ebebeb;
  border-radius: 8px;
  color: #1a1a1a;
  outline: none;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.qty-input:focus {
  border-color: #1a1a1a;
  background: #fff;
}

/* ── Note / remarque ── */
.note-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.82rem;
  background: #fafafa;
  border: 1.5px solid #ebebeb;
  border-radius: 8px;
  color: #555;
  outline: none;
  transition: border-color 0.15s;
}
.note-input:focus {
  border-color: #bbb;
  background: #fff;
}
.note-input::placeholder { color: #ccc; }

/* ── Icône état ── */
.item-status-icon {
  flex-shrink: 0;
  font-size: 1.05rem;
  margin-top: 3px;
  min-width: 20px;
  text-align: center;
}

/* ---------- OBSERVATIONS ---------- */

.obs-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ---------- BOUTON VALIDER ---------- */

.btn-validate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.18s, transform 0.12s;
}
.btn-validate:active {
  transform: scale(0.98);
  background: #333;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 400px) {
  .inv-section-header { font-size: 0.75rem; padding: 12px 12px; }
  .inv-item { padding: 12px; gap: 10px; }
  .item-name { font-size: 0.85rem; }
}

/* ---------- BOUTONS DE CHOIX (s0) ---------- */

.item-btn {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.item-btn .item-body {
  width: 100%;
}

.item-btn .item-status-icon {
  position: absolute;
  top: 14px;
  right: 14px;
}

.item-btn {
  position: relative;
}

.btn-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.choice-btn {
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 99px;
  border: 1.5px solid #e8e8e8;
  background: #f5f5f5;
  color: #aaa;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.choice-btn:active {
  transform: scale(0.95);
}

/* État OK — vert */
.choice-btn.choice-ok.selected {
  background: #2ea84d;
  border-color: #2ea84d;
  color: #fff;
}

/* État WARN — orange */
.choice-btn.choice-warn.selected {
  background: #f4a100;
  border-color: #f4a100;
  color: #fff;
}

/* État BAD — rouge */
.choice-btn.choice-bad.selected {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
}

/* Légère teinte au survol si non sélectionné */
.choice-btn.choice-ok:not(.selected):hover   { border-color: #2ea84d; color: #2ea84d; background: #f0fdf4; }
.choice-btn.choice-warn:not(.selected):hover { border-color: #f4a100; color: #f4a100; background: #fffbf0; }
.choice-btn.choice-bad:not(.selected):hover  { border-color: #e63946; color: #e63946; background: #fff5f5; }

.item-btn .note-input {
  margin-top: 8px;
}
