/* GASPARD — Gestion : styles propres au catalogue (le socle est dans /shared/gaspard.css) */

/* Recherche */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px; margin-bottom: 16px;
  border: var(--border); background: var(--paper);
}
.search:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.search svg { width: 18px; height: 18px; flex: none; color: var(--ink); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 16px/24px var(--text); }
.search input::placeholder { color: var(--ink-3); }

/* Catégories */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--pad)) 12px; padding: 2px var(--pad);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px;
  border: var(--border); background: var(--cream);
  font: 800 12px/16px var(--display); letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap;
}
.chip.is-active { background: var(--ink); color: var(--yellow); }

/* Saisons */
.seasons { display: grid; grid-template-columns: repeat(5, 1fr); border: var(--border); }
.seasons button {
  height: 36px; border: 0; background: transparent;
  font: 800 11px/16px var(--display); letter-spacing: 0.6px; text-transform: uppercase;
}
.seasons button + button { border-left: 2px solid var(--ink); }
.seasons button.is-active { background: var(--yellow); }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.active-filters:empty { display: none; }
.pill-remove {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; border: 0; background: var(--ink); color: var(--yellow);
  font: 800 11px/16px var(--display); letter-spacing: 0.8px; text-transform: uppercase;
}

/* Produits */
.item-main { flex: 1; min-width: 0; }
.item-name {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font: 800 14px/20px var(--display); letter-spacing: 0.2px; text-transform: uppercase;
}
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.item-seasons { font: 700 11px/16px var(--display); letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-2); }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  background: var(--sand); color: var(--ink);
  font: 700 10px/12px var(--display); letter-spacing: 0.6px; text-transform: uppercase;
}
.item-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; font: 900 17px/20px var(--display); font-variant-numeric: tabular-nums; }
.item-price small { display: block; margin-top: 4px; font: 700 10px/12px var(--display); letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-2); }
.item-price small.to-check { display: inline-block; padding: 2px 4px; background: var(--yellow); color: var(--ink); }
.item-price.is-muted { font: 800 11px/16px var(--display); letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-2); }
.chevron { flex: none; width: 8px; height: 13px; color: var(--ink); }
.row.is-archived .item-name, .row.is-archived .item-price { color: var(--ink-3); }

.archive-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 32px; color: var(--ink-2); }
.archive-toggle input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.offline-note { text-align: center; margin: 16px 0 0; color: var(--ink-2); }

/* Fiche produit */
.sheet-body textarea.input { height: auto; min-height: 48px; padding: 11px 14px; resize: none; display: block; }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none;
}
.select-wrap select { -webkit-appearance: none; appearance: none; padding-right: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 36px; font-variant-numeric: tabular-nums; }
.input-suffix em { position: absolute; right: 14px; top: 12px; font: 900 16px/24px var(--display); font-style: normal; }

.season-picker { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--border); background: var(--paper); }
.season-picker button {
  height: 44px; border: 0; background: transparent;
  font: 800 11px/16px var(--display); letter-spacing: 0.6px; text-transform: uppercase;
}
.season-picker button + button { border-left: 2px solid var(--ink); }
.season-picker button.is-on { background: var(--yellow); }

.tag-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; height: auto; min-height: 48px; padding: 8px 10px; }
.tag-editor .tag { height: 28px; padding: 0 4px 0 8px; gap: 4px; font-size: 11px; }
.tag-editor .tag button { border: 0; background: transparent; width: 20px; height: 20px; padding: 0; font: 700 16px/20px var(--text); }
.tag-editor .tag.is-warning { background: var(--yellow); }
#tag-input { flex: 1; min-width: 120px; height: 28px; border: 0; outline: 0; background: transparent; font: 400 16px/24px var(--text); }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-suggest:empty { display: none; }
.tag-suggest button {
  height: 26px; padding: 0 8px; border: 1.5px dashed var(--ink-3); background: transparent; color: var(--ink-2);
  font: 700 10px/12px var(--display); letter-spacing: 0.6px; text-transform: uppercase;
}

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin-bottom: 16px; border: var(--border); background: var(--paper); }
.switch-row small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  width: 52px; height: 30px; border: var(--border); background: var(--cream); position: relative; cursor: pointer;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--ink-3); transition: transform .15s, background .15s; }
.switch:checked { background: var(--yellow); }
.switch:checked::after { transform: translateX(22px); background: var(--ink); }

.history-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.history-row + .history-row { border-top: 1px solid var(--hair); }
.history-row span:first-child { font: 900 15px/20px var(--display); }
.history-row span:last-child { color: var(--ink-2); font-size: 14px; }

.link-danger {
  display: block; margin: 28px auto 8px; padding: 8px; border: 0; background: transparent; color: var(--red);
  font: 800 12px/16px var(--display); letter-spacing: 1px; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px;
}
.link-danger.is-confirm { width: 100%; height: 48px; background: var(--red); color: #fff; text-decoration: none; }
