/* ─────────────────────────────────────────────────────────────────────────
   ui.css — design system du back-office LIVING ASSETS · STUDIO
   Outil pro sombre (référence DaVinci Resolve / Figma) : surfaces mates,
   hiérarchie typographique nette, accent ambre unique, zéro décoration gratuite.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --bg:      #0e1014;
  --bg2:     #12151b;
  --panel:   #171b23;
  --panel2:  #1d222d;
  --border:  #262d3a;
  --border2: #333c4e;
  --ink:     #dbe3ee;
  --muted:   #8492a8;
  --faint:   #5a6578;
  --accent:  #ffb347;
  --accent-dim: #b97f33;
  --cyan:    #7ec8e3;
  --green:   #4ade80;
  --red:     #ef5350;
  --radius:  8px;
  --font:    ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 13px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: #ffb34733; }

/* ── header / navigation persistante ── */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  height: 52px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand .logo { color: var(--accent); font-size: 15px; }
.brand .nm { font-weight: 650; letter-spacing: .18em; font-size: 12px; }
.brand .st { color: var(--faint); letter-spacing: .18em; font-size: 12px; }
nav.main { display: flex; gap: 2px; flex: 1; }
nav.main a {
  color: var(--muted); padding: 6px 12px; border-radius: 6px;
  font-size: 12.5px; letter-spacing: .02em;
}
nav.main a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
nav.main a.cur { color: var(--accent); background: #ffb34712; }
.top .who { color: var(--faint); font-size: 11.5px; }

/* ── layout ── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }
h1 { font-size: 19px; font-weight: 600; letter-spacing: .01em; margin: 4px 0 2px; }
h1 .k { color: var(--accent); }
.sub { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
h2.sec { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
         color: var(--muted); margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
h2.sec::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ── boutons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel2); color: var(--ink);
  border: 1px solid var(--border2); border-radius: 6px;
  padding: 6px 12px; font: 12.5px var(--font); cursor: pointer;
  transition: border-color .12s, background .12s;
  text-decoration: none !important;
}
.btn:hover { border-color: var(--accent-dim); color: var(--ink); }
.btn.primary { background: #7a4a1a; border-color: var(--accent-dim); color: #ffe9c9; }
.btn.primary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--border2); }
.btn.sm { padding: 3px 9px; font-size: 11.5px; border-radius: 5px; }
.btn:disabled { opacity: .45; cursor: default; }

/* ── cartes / grilles ── */
.grid { display: grid; gap: 14px; }
.grid.scenes { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border2); }
.card .thumb {
  aspect-ratio: 21/9; background: linear-gradient(160deg, #1a2030, #10131a);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 24px; position: relative;
  background-size: cover; background-position: center;
}
.card .thumb .badge { position: absolute; top: 8px; right: 8px; }
.card .body { padding: 13px 15px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .nm { font-size: 14.5px; font-weight: 600; }
.card .nm .id { color: var(--faint); font-weight: 400; font-size: 11px; font-family: var(--mono); margin-left: 6px; }
.card .tag { color: var(--muted); font-size: 12px; line-height: 1.45; flex: 1; }
.card .meta { display: flex; gap: 12px; color: var(--faint); font-size: 11px; letter-spacing: .03em; }
.card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  background: #1f2733; color: var(--muted); border: 1px solid var(--border2);
}
.badge.on { background: #143020; color: var(--green); border-color: #1f5233; }
.badge.amber { background: #2f2312; color: var(--accent); border-color: #59431f; }

.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 12px 15px; }
.stat .v { font-size: 22px; font-weight: 650; color: var(--ink); }
.stat .l { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 1px; }

/* ── tables ── */
table.list { width: 100%; border-collapse: collapse; background: var(--panel);
             border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
                color: var(--faint); font-weight: 600; padding: 9px 14px; border-bottom: 1px solid var(--border);
                background: var(--bg2); }
table.list td { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #ffffff06; }
td.mono, .mono { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ── formulaires ── */
input[type=password], input[type=text] {
  background: var(--bg2); color: var(--ink); border: 1px solid var(--border2);
  border-radius: 6px; padding: 9px 12px; font: 13px var(--font); outline: none; width: 100%;
}
input:focus { border-color: var(--accent-dim); }
.err { color: var(--red); font-size: 12px; min-height: 18px; }

/* ── login ── */
.login-hero { min-height: calc(100vh - 52px); display: flex; align-items: center; justify-content: center; }
.login-box { width: 340px; background: var(--panel); border: 1px solid var(--border);
             border-radius: 12px; padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 14px; }
.login-box h1 { font-size: 15px; letter-spacing: .16em; text-align: center; margin: 0; font-weight: 600; }
.login-box .hint { color: var(--faint); font-size: 11.5px; text-align: center; }

.foot { color: var(--faint); font-size: 10.5px; letter-spacing: .12em; text-align: center; margin-top: 60px; }
.empty { color: var(--faint); padding: 30px; text-align: center; border: 1px dashed var(--border2);
         border-radius: var(--radius); }
audio { height: 30px; }
