/* NEDOXE — back-office : même DA que le front (blanc, encre noire, bleu du logo en accent) */
:root {
  --bg: #f6f6f8; --card: #fff; --ink: #0d0d12; --muted: #737380; --faint: #a6a6b0; --line: #ececf0; --soft: #f3f3f6;
  --blue: #1a5cff; --red: #e5484d; --green: #12a150; --amber: #c27c0e;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 22px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.04em; padding: 2px 12px 4px; }
.brand img { width: 26px; }
.brand small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted); background: var(--soft); padding: 3px 7px; border-radius: 6px; margin-left: 2px; }
.env { margin: 6px 12px 18px; font-size: 11.5px; color: var(--amber); font-weight: 600; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: #3a3a44; }
.side a.nav:hover { background: var(--soft); }
.side a.nav.on { background: var(--ink); color: #fff; font-weight: 600; }
.side .grow { flex: 1; }
.side .who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.side .who b { display: block; font-size: 13px; }
.side .who span { font-size: 12px; color: var(--muted); }
.side .who button { margin-left: auto; color: var(--muted); font-size: 12px; }
.side .front { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.side .front:hover { color: var(--ink); background: var(--soft); }

.main { min-width: 0; padding: 26px 32px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font-size: 26px; letter-spacing: -.035em; margin: 0; }
.head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.card h2 { font-size: 14.5px; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; }
.card h2 span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.grid { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi b { display: block; font-size: 25px; letter-spacing: -.03em; margin-top: 6px; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark span, .kpi.dark small { color: rgba(255, 255, 255, .65); }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.bars i { flex: 1; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; opacity: .88; }
.bars i:last-child { background: var(--blue); opacity: 1; }
.bars i:hover { opacity: 1; }
.bars i:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; font-style: normal; padding: 4px 8px; border-radius: 7px; white-space: nowrap; z-index: 3; }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11.5px; margin-top: 8px; }
.split { display: grid; gap: 10px; }
.split .row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: 13px; }
.split .bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.split .bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.split .row b { text-align: right; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg.i { position: absolute; left: 12px; top: 11px; color: var(--faint); }
.in { width: 100%; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 0 12px; outline: none; }
.search .in { padding-left: 38px; }
.in:focus { border-color: var(--ink); }
textarea.in { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { background: #26262e; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f3c9ca; }
.btn.danger:hover { background: #fff5f5; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

table.tb { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tb th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; background: #fbfbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tb td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tb tr:last-child td { border-bottom: 0; }
.tb tbody tr { cursor: pointer; }
.tb tbody tr:hover td { background: #fafafb; }
.tb .r { text-align: right; }
.tb .mut { color: var(--muted); font-size: 13px; }
.wrap { overflow-x: auto; border-radius: 18px; }
.u { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u b { display: block; font-size: 13.5px; white-space: nowrap; }
.u span { display: block; font-size: 12px; color: var(--muted); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--soft) center/cover; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--soft); color: #4a4a55; white-space: nowrap; }
.tag.ink { background: var(--ink); color: #fff; }
.tag.blue { background: #eaf0ff; color: #1446d6; }
.tag.red { background: #fdecec; color: #c4292e; }
.tag.green { background: #e6f6ec; color: #0c7a3c; }
.tag.amber { background: #fdf3e2; color: #8a5a06; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pc { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.pc .th { aspect-ratio: 4 / 5; background: var(--soft) center/cover; position: relative; }
.pc .th .tags { position: absolute; top: 8px; left: 8px; }
.pc .th .vid { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 99px; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.pc.off .th { opacity: .35; filter: grayscale(1); }
.pc .bd { padding: 10px 12px 12px; display: grid; gap: 6px; flex: 1; }
.pc .bd p { margin: 0; font-size: 13px; color: #3a3a44; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.pc .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.pc .act { display: flex; gap: 6px; margin-top: 2px; }
.pc .act .btn { flex: 1; }

.drawer-bg { position: fixed; inset: 0; background: rgba(13, 13, 18, .35); z-index: 50; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 51; overflow-y: auto; padding: 24px; box-shadow: -20px 0 60px rgba(0, 0, 0, .12); animation: slide .2s ease; }
@keyframes fade { from { opacity: 0 } }
@keyframes slide { from { transform: translateX(30px); opacity: .6 } }
.drawer .x { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.drawer h3 { margin: 14px 0 2px; font-size: 20px; letter-spacing: -.02em; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; margin: 18px 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.sec { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 22px 0 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tx-mini { font-size: 13px; display: grid; gap: 6px; }
.tx-mini div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch b { display: block; }
.switch span { color: var(--muted); font-size: 13px; }
.tog { width: 44px; height: 26px; border-radius: 99px; background: #d9d9df; position: relative; flex-shrink: 0; transition: background .15s; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.tog.on { background: var(--ink); }
.tog.on::after { transform: translateX(18px); }
.log { font-size: 13px; display: grid; }
.log div { display: grid; grid-template-columns: 120px 90px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.log div span:first-child { color: var(--muted); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #fff; }
.login .box { width: 100%; max-width: 380px; }
.login .brand { padding: 0 0 30px; font-size: 21px; }
.login h1 { font-size: 28px; letter-spacing: -.04em; margin: 0 0 6px; }
.login p { color: var(--muted); margin: 0 0 24px; }
.login form { display: grid; gap: 12px; }
.login .in { height: 48px; border-radius: 13px; border-color: #dcdce2; }
.login .btn { height: 50px; border-radius: 13px; font-size: 15px; }
.login .err { color: var(--red); font-size: 13px; min-height: 18px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: sp .8s linear infinite; margin: 60px auto; }
@keyframes sp { to { transform: rotate(360deg) } }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px); z-index: 99; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .2s; }
#toast.on { opacity: 1; transform: translateX(-50%); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 4px; }
  .side .brand { width: 100%; padding-bottom: 8px; }
  .side .env, .side .grow, .side .who, .side .front { display: none; }
  .main { padding: 18px 14px 50px; }
}
.nb { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.nb:empty { display: none; }
.side a.nav.on .nb { background: #fff; color: var(--ink); }
.rep { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.rep:first-of-type { border-top: 0; }
.rep.grave { background: #fff7f7; margin: 0 -20px; padding: 12px 20px; }
.rep-th { width: 52px; height: 64px; border-radius: 8px; background: var(--soft) center/cover; flex-shrink: 0; }
.rep-b { flex: 1; min-width: 0; font-size: 13.5px; }
.rep-a { flex-shrink: 0; justify-content: flex-end; max-width: 260px; }
