/* VITA ART — back-office : sobre, lisible, utilisable sans connaissances techniques. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root { --ink: #0b0b0b; --orange: #ff4f00; --bg: #f6f6f4; --line: #e3e3df; --muted: #6b6b66; --ok: #1d7a43; --warn: #b54a00; --danger: #b42300; --white: #fff; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Archivo", system-ui, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.devbar { background: repeating-linear-gradient(-45deg, #ffe600 0 14px, #111 14px 28px); color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 5px; text-shadow: 0 0 3px #000; }
.signature { display: inline-block; aspect-ratio: 1600/554; height: 30px; background: currentColor; -webkit-mask: url("../img/signature.png") center/contain no-repeat; mask: url("../img/signature.png") center/contain no-repeat; }
.signature.big { height: 64px; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #eee; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; margin: 0 6px 18px; }
.logo small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-stretch: 125%; color: var(--orange); }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 4px; text-decoration: none; font-size: 14px; color: #d8d8d4; }
.side nav a:hover { background: #222; color: #fff; }
.side nav a.on { background: var(--orange); color: var(--ink); font-weight: 600; }
.grp { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8a8a85; margin: 16px 10px 4px; font-stretch: 125%; }
.cnt { background: var(--orange); color: var(--ink); border-radius: 10px; font-size: 11px; padding: 0 7px; }
.side nav a.on .cnt { background: var(--ink); color: #fff; }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid #2a2a2a; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.side-foot a { color: #ddd; }
.linkbtn { background: none; border: 0; color: #ddd; padding: 0; cursor: pointer; text-decoration: underline; font: inherit; font-size: 13px; text-align: left; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 18px 28px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 22px; font-weight: 800; font-stretch: 85%; margin: 0; flex: 1; letter-spacing: -.01em; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; font-size: 18px; padding: 4px 10px; cursor: pointer; }
.content { padding: 24px 28px 80px; max-width: 1500px; }
h2 { font-size: 18px; font-weight: 750; font-stretch: 90%; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin: 0 0 20px; }
fieldset.card { padding-top: 10px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; align-items: end; }
.grid6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 12px; align-items: end; }
.grid-edit { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 28px; align-items: start; margin-bottom: 20px; }
.col-img { position: sticky; top: 90px; }
.preview { background: #ecebe7; padding: 14px; border-radius: 6px; margin-bottom: 12px; }
.preview img { width: 100%; height: auto; display: block; }
.ph { padding: 60px 10px; text-align: center; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery img { width: 100%; height: 80px; object-fit: contain; background: #ecebe7; }
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.fld label { font-size: 12px; font-weight: 650; color: #333; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #c9c9c4; border-radius: 4px; font: inherit; background: var(--white); color: var(--ink); }
textarea { resize: vertical; line-height: 1.5; }
textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 79, 0, .35); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.help { color: var(--muted); font-size: 12.5px; }
.big { font-size: 26px; font-weight: 800; margin: 2px 0; }
.btn, .btn-s { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 4px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn.ghost, .btn-s { background: var(--white); color: var(--ink); }
.btn-s { padding: 5px 10px; font-size: 12.5px; }
.btn-s:hover, .btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.danger, .btn-s.danger { border-color: var(--danger); color: var(--danger); background: var(--white); }
.btn.danger:hover, .btn-s.danger:hover { background: var(--danger); color: #fff; }
.btn.wide { width: 100%; justify-content: center; padding: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.form-actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--line); z-index: 4; }
form.inline { display: inline; }
.inline-form { display: flex; gap: 10px; align-items: end; }
.search { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search input, .search select { max-width: 280px; }
.alert { padding: 11px 14px; border-radius: 4px; border-left: 4px solid var(--muted); background: var(--white); margin: 0 0 16px; }
.content > .alert:first-child { margin-top: 0; }
.main > .alert { margin: 16px 28px 0; }
.alert.ok { border-color: var(--ok); }
.alert.warn { border-color: var(--warn); background: #fff6ef; }
.alert.info { border-color: #3a6ea5; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfbfa; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #fcfbf8; }
tfoot td { font-size: 14px; }
.card table td, .card table th { padding: 8px 6px; }
.thumb { width: 64px; height: 48px; object-fit: contain; background: #ecebe7; display: block; }
.thumb.none { display: block; width: 64px; height: 48px; background: repeating-linear-gradient(45deg, #eee 0 6px, #f6f6f6 6px 12px); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 10px; background: #eee; color: #333; white-space: nowrap; }
.badge.ok, .badge.os-paid, .badge.os-shipped, .badge.os-delivered, .badge.pay-paid, .badge.st-available, .badge.is-done { background: #e3f3e8; color: var(--ok); }
.badge.warn, .badge.os-pending_payment, .badge.is-new, .badge.st-reserved, .badge.pay-pending { background: #fff0e3; color: var(--warn); }
.badge.os-paid_conflict, .badge.pay-mismatch, .badge.pay-duplicate, .badge.pay-error { background: #fde4df; color: var(--danger); }
.badge.muted, .badge.os-expired, .badge.os-cancelled, .badge.st-unavailable { background: #efefed; color: #777; }
.badge.demo { background: #ffe600; color: #111; }
.badge.info, .badge.is-in_progress, .badge.st-exhibited { background: #e5eef8; color: #2b5d8f; }
.badge.st-sold, .badge.os-refunded { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s; }
.kpi:hover { border-color: var(--ink); }
.kpi span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; }
.kpi b { font-size: 30px; font-weight: 850; font-stretch: 75%; line-height: 1.1; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.accent { background: var(--orange); border-color: var(--orange); }
.kpi.accent span, .kpi.accent small { color: var(--ink); }
.kpi.danger { border-color: var(--danger); }
.kpi.danger b { color: var(--danger); }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { padding: 8px 0 8px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
.checklist li::before { content: "!"; position: absolute; left: 0; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; font-size: 12px; font-weight: 800; text-align: center; line-height: 18px; }
.checklist li.info::before { content: "i"; background: #3a6ea5; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 650; padding-top: 2px; }
.kv dd { margin: 0; }
.msg { background: #fbfbfa; border: 1px solid var(--line); padding: 14px; border-radius: 4px; white-space: normal; }
.tabs { background: var(--white); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 16px; }
.tab-list { display: flex; border-bottom: 1px solid var(--line); }
.tab-list button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.tab-list button[aria-selected="true"] { color: var(--ink); border-color: var(--orange); }
.tab-panel { padding: 18px 20px 6px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pills a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: var(--white); font-size: 13px; }
.pills a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { color: var(--muted); padding: 20px; background: var(--white); border: 1px dashed var(--line); border-radius: 6px; }
.log { background: #111; color: #ddd; padding: 12px; border-radius: 4px; font-size: 12px; overflow-x: auto; max-height: 340px; }
.numbers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.num { width: 40px; height: 32px; border: 1px solid var(--line); background: #e3f3e8; border-radius: 3px; cursor: pointer; font: inherit; font-size: 12px; }
.num-sold { background: var(--ink); color: #fff; cursor: default; }
.num-withheld { background: #eee; color: #999; text-decoration: line-through; }
.row-src { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sources { font-size: 13px; padding-left: 18px; }
details summary { cursor: pointer; font-weight: 650; margin: 10px 0; }
code { background: #efefec; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.login-page { display: grid; place-items: center; min-height: 100vh; background: var(--white); }
.login { width: min(380px, 92vw); padding: 20px; }
.login h1 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-stretch: 125%; margin: 12px 0 24px; color: var(--orange); }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 20; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; }
  .burger { display: block; }
  .grid2, .grid3, .grid4, .grid6, .grid-edit { grid-template-columns: 1fr; }
  .col-img { position: static; }
  .content { padding: 18px 16px 80px; }
  .top { padding: 12px 16px; }
  .kv { grid-template-columns: 1fr; }
}
.slide-previews { display: flex; gap: 10px; margin: 6px 0 4px; }
.slide-previews figure { margin: 0; text-align: center; font-size: 12px; font-weight: 700; }
.slide-previews .thumb { width: 120px; height: 80px; }
