/* ===== Livery Hub — thème "panneau d'opérations" ===== */
:root {
  --bg: #12161c;
  --panel: #1a212b;
  --panel-2: #212b37;
  --line: #2d3947;
  --text: #dce4ec;
  --muted: #8b99a8;
  --amber: #f5b841;       /* caution light */
  --amber-ink: #1a1204;
  --green: #6fbf8f;
  --red: #e06c5f;
  --font-display: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: system-ui, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, .brand-name, .tab, .btn { font-family: var(--font-display); letter-spacing: .04em; }
h2 { font-size: 1.05rem; font-weight: 600; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.section-title { margin: 28px 4px 12px; }
code { font-family: var(--font-mono); font-size: .85em; background: var(--panel-2); padding: 1px 5px; border-radius: 3px; }
.mono { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

/* ----- marque ----- */
.brand { text-align: center; }
.brand h1 { font-size: 1.7rem; font-weight: 700; margin: 10px 0 2px; }
.brand-sub { color: var(--muted); font-size: .85rem; margin: 0 0 20px; }
.brand-mark {
  display: inline-block; width: 34px; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, transparent 8px 15px);
  border: 1px solid var(--amber);
}
.brand-inline { display: flex; align-items: center; gap: 10px; text-align: left; }
.brand-inline .brand-mark { width: 24px; height: 8px; }
.brand-name { font-weight: 700; font-size: 1.1rem; }

/* ----- panneaux ----- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.narrow { max-width: 440px; }

/* ----- login ----- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; }

/* ----- formulaires ----- */
label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
input, textarea {
  width: 100%; padding: 9px 11px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--font-body); font-size: .95rem;
}
input:focus-visible, textarea:focus-visible, .btn:focus-visible, .tab:focus-visible, .dropzone:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 1px;
}
.form-row { display: flex; gap: 14px; }
.admin-forms { align-items: flex-start; }
.admin-forms select { width: 100%; padding: 9px 11px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font-size: .95rem; }
.form-col { flex: 1; }

.btn {
  padding: 9px 20px; font-size: .95rem; font-weight: 600; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-2); color: var(--text); cursor: pointer;
}
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); margin-top: 16px; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; padding: 5px 12px; font-size: .8rem; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }

.error { color: var(--red); font-size: .85rem; margin: 10px 0 0; }
.error.ok { color: var(--green); }
.empty { color: var(--muted); padding: 20px 4px; }
.hint { color: var(--muted); font-size: .85rem; margin: 0 0 14px; }

/* ----- topbar / onglets ----- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.tag {
  font-family: var(--font-mono); font-size: .8rem; color: var(--amber);
  border: 1px solid var(--amber); border-radius: 3px; padding: 2px 8px;
}
.tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: none; color: var(--muted);
  padding: 12px 16px; font-size: .95rem; font-weight: 600; text-transform: uppercase; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--text); border-bottom-color: var(--amber); }

main { max-width: 980px; margin: 0 auto; padding: 24px; }

/* ----- zone d'upload ----- */
.dropzone {
  border: 2px dashed var(--line); border-radius: 6px;
  padding: 26px; text-align: center; color: var(--muted); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone.drag, .dropzone:hover { border-color: var(--amber); background: var(--panel-2); color: var(--text); }
.dropzone.hasfile { border-style: solid; border-color: var(--green); color: var(--text); }
.upload-footer { display: flex; align-items: center; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.upload-footer .btn-primary { margin-top: 12px; margin-left: auto; }
.progress-wrap { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.progress-bar {
  flex: 1; height: 8px; border-radius: 4px; background: var(--bg);
  background-image: linear-gradient(var(--amber), var(--amber));
  background-repeat: no-repeat; background-size: 0% 100%;
  border: 1px solid var(--line);
}

/* ----- cartes packs : plaques d'identification ----- */
.packs-list { display: flex; flex-direction: column; gap: 12px; }
.pack {
  display: flex; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.pack-main { flex: 1; padding: 14px 18px; min-width: 0; }
.pack-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; }
.pack-desc { color: var(--muted); font-size: .88rem; margin: 2px 0 8px; }
.pack-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.chip {
  font-family: var(--font-mono); font-size: .75rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 7px; color: var(--text);
}
.pack-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-left: 1px solid var(--line); background: var(--panel-2);
  min-width: 118px;
}
.pack-version { font-family: var(--font-mono); font-size: 1.15rem; color: var(--amber); font-weight: 700; }
.pack-actions { display: flex; gap: 8px; }
.link { color: var(--amber); text-decoration: none; font-size: .8rem; }
.link:hover { text-decoration: underline; }

/* ----- table admin ----- */
.table-panel { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-display); text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

.foot { text-align: center; padding: 24px; }

@media (max-width: 640px) {
  .pack { flex-direction: column; }
  .pack-side { flex-direction: row; border-left: none; border-top: 1px solid var(--line); }
  .form-row { flex-direction: column; gap: 0; }
  main { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
