/* ==========================================================================
   NullForge — Thème sombre (noir + violet)
   Design : moderne, sobre, professionnel. Rayons : 3px partout.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0c;
  --bg-soft: #0e0e11;
  --surface: #141418;
  --surface-2: #191920;
  --border: #232329;
  --border-strong: #32323a;

  --text: #ececf0;
  --text-2: #9d9da8;
  --text-3: #676772;

  --accent: #8b5cf6;
  --accent-hi: #a78bfa;
  --accent-ink: #0d0820;          /* texte posé sur l'accent */
  --accent-dim: rgba(139, 92, 246, 0.12);
  --accent-border: rgba(139, 92, 246, 0.35);

  --danger: #ff4d4f;
  --danger-dim: rgba(255, 77, 79, 0.12);
  --success: #3fb27f;
  --success-dim: rgba(63, 178, 127, 0.13);

  --radius: 3px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
  --header-h: 64px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --glow: radial-gradient(600px 260px at 50% -60px, rgba(139, 92, 246, 0.16), transparent 70%);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: var(--glow);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(139, 92, 246, 0.35); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--accent); }
.muted { color: var(--text-2); }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.brand-logo { width: 28px; height: 28px; }

.brand-name span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-link.is-active { color: var(--accent-hi); background: var(--accent-dim); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--surface);
}

.nav-burger span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px 14px;
    margin: 0;
    display: none;
  }
  .site-header.nav-open .nav { display: flex; }
  .site-header.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  user-select: none;
}

.btn:active { transform: translateY(1px); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hi); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) { border-color: var(--accent-border); color: var(--accent-hi); }

.btn-danger {
  background: var(--danger-dim);
  border-color: rgba(255, 77, 79, 0.4);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) { background: rgba(255, 77, 79, 0.22); }

.btn-sm { padding: 7px 12px; font-size: 13px; }

.btn-block { width: 100%; }

.btn .spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.chip-category { color: var(--accent-hi); border-color: var(--accent-border); background: var(--accent-dim); }

/* ---------- Champs de formulaire ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder, .textarea::placeholder { color: var(--text-3); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.textarea { resize: vertical; min-height: 100px; }

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d9da8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 34px;
}

select.select option { background: var(--surface); color: var(--text); }

.field-hint { font-size: 12px; color: var(--text-3); }

.form-error {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 77, 79, 0.4);
  background: var(--danger-dim);
  color: var(--danger);
  font-size: 13px;
}

/* ---------- Hero (home) ---------- */
.hero {
  padding: 88px 0 36px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent-hi);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-title {
  margin: 22px auto 0;
  max-width: 720px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
}

.hero-sub {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--text-2);
  font-size: 17px;
}

.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.hero-stats {
  margin: 64px auto 0;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.stat { padding: 20px 12px; }

.stat + .stat { border-left: 1px solid var(--border); }

.stat strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-hi);
}

.stat span { font-size: 13px; color: var(--text-3); }

/* ---------- Sections ---------- */
.section { padding: 56px 0 8px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }

.section-head p { max-width: 480px; color: var(--text-2); font-size: 14px; }

.link-more { color: var(--accent-hi); font-size: 14px; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* ---------- Grilles de cartes ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card-title { margin-top: 12px; font-size: 16px; font-weight: 700; line-height: 1.35; }

.card-title a:hover { color: var(--accent-hi); }

.card-desc {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc.markdown {
  display: block;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
  overflow: visible;
}

.card-desc.markdown .markdown-para + .markdown-para,
.card-desc.markdown p + p {
  margin-top: 8px;
}

.card-desc.markdown ul,
.card-desc.markdown ol {
  margin: 8px 0 0 18px;
  color: var(--text-2);
}

.card-desc.markdown a {
  color: var(--accent-hi);
  text-decoration: underline;
}

.card-desc.markdown img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  margin: 10px 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.card-media {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.card-media img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-desc.markdown code {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--accent-hi);
  font-size: 12px;
}

.card-desc.markdown pre {
  padding: 10px;
  margin-top: 8px;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow-x: auto;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  color: var(--text-3);
  font-size: 12.5px;
}

.meta-item { display: inline-flex; align-items: center; gap: 5px; }

.meta-item svg { width: 13px; height: 13px; }

.card-foot { display: flex; gap: 8px; margin-top: 4px; }

.card-foot .btn { flex: 1; }

/* Catégorie (home) */
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-hi);
}

.cat-icon svg { width: 20px; height: 20px; }

.cat-card h3 { font-size: 17px; font-weight: 700; }

.cat-card p { color: var(--text-2); font-size: 13.5px; min-height: 42px; }

.cat-card .btn { margin-top: auto; }

/* ---------- En-têtes de page intérieures ---------- */
.page-head { padding: 44px 0 8px; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 14px;
}

.crumbs a:hover { color: var(--accent-hi); }

.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.4px; }

.page-head .page-desc { margin-top: 8px; color: var(--text-2); max-width: 640px; }

/* ---------- Barre d'outils (filtres) ---------- */
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  flex-wrap: wrap;
}

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

.filters .field { min-width: 170px; }

.search-box { position: relative; flex: 1; min-width: 240px; }

.search-box svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-box .input { padding-left: 36px; }

.results-count { color: var(--text-3); font-size: 13px; white-space: nowrap; }

/* ---------- État vide ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
}

.empty svg { width: 36px; height: 36px; margin: 0 auto 14px; color: var(--text-3); }

.empty strong { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px; }

.empty p { font-size: 13.5px; }

/* ---------- Skeleton (chargement) ---------- */
.skeleton {
  height: 150px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Page de connexion ---------- */
.auth-page {
  display: grid;
  place-items: center;
  padding: 70px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.auth-card .btn-login {
  width: 100%;
  margin: 4px 0 0;
  padding: 10px 22px;
  font-size: 14px;
}

.auth-card .btn-login svg {
  width: 17px;
  height: 17px;
}

.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; }

.auth-brand img { width: 30px; height: 30px; }

.auth-brand span { font-weight: 800; font-size: 17px; }

.auth-brand span em { color: var(--accent); font-style: normal; }

.auth-card h1 { margin-top: 20px; font-size: 20px; font-weight: 700; text-align: center; }

.auth-sub { margin-top: 6px; font-size: 13.5px; color: var(--text-2); text-align: center; }

.auth-card form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.auth-card .btn { margin-top: 4px; }

.auth-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- Administration ---------- */
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-head .admin-user { color: var(--text-3); font-size: 13px; margin-top: 4px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 26px 0 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-card strong { display: block; font-size: 24px; font-weight: 800; color: var(--accent-hi); }

.stat-card span { font-size: 12.5px; color: var(--text-3); }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; min-width: 860px; }

.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--surface-2);
}

.table tr:last-child td { border-bottom: 0; }

.table tbody tr:hover { background: var(--surface-2); }

.table .row-title { font-weight: 600; color: var(--text); }

.table .row-sub { font-size: 12px; color: var(--text-3); }

.table .actions { display: flex; gap: 6px; white-space: nowrap; }

.table .actions .btn { padding: 5px 9px; font-size: 12px; }

.upload-file-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}

.upload-file-box svg { width: 16px; height: 16px; color: var(--accent-hi); flex-shrink: 0; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 { font-size: 16px; font-weight: 700; }

.modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 18px;
}

.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-body { padding: 20px; }

.form-grid { display: grid; gap: 16px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
}

.toast.is-error { border-color: rgba(255, 77, 79, 0.5); color: var(--danger); }
.toast.is-success { border-color: rgba(63, 178, 127, 0.5); color: var(--success); }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: 72px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0 30px;
}

.footer-brand p { margin-top: 12px; font-size: 13px; color: var(--text-3); max-width: 300px; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.footer-col a:hover { color: var(--accent-hi); }

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Bandeau d'avertissement (footer de la home) */
.disclaimer {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.07), rgba(139, 92, 246, 0.015));
}

.disclaimer .container {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.disclaimer svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }

.disclaimer strong { font-size: 13px; color: var(--accent-hi); }

.disclaimer p { margin-top: 3px; font-size: 12.5px; color: var(--text-3); max-width: 860px; }

/* ---------- Page 404 ---------- */
.nf-page {
  display: grid;
  place-items: center;
  padding: 90px 20px;
  text-align: center;
}

.nf-code {
  font-size: 84px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nf-page h1 { margin-top: 18px; font-size: 22px; font-weight: 700; }

.nf-page p { margin-top: 8px; color: var(--text-2); max-width: 420px; font-size: 14px; }

.nf-page .btn { margin-top: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 64px 0 24px; }
  .hero-cta .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .section { padding-top: 40px; }
}

/* ---------- Administration : barre d'outils ---------- */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
}

.admin-toolbar .input { flex: 1; min-width: 220px; }
.admin-toolbar .select { width: auto; min-width: 160px; }
.admin-toolbar .results-count { margin-left: auto; }

/* ---------- Administration : tableau ---------- */
.th-actions { width: 1%; }

.td-title strong { font-size: 13.5px; color: var(--text); }

.td-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.td-meta .chip { padding: 2px 7px; font-size: 11px; text-transform: none; letter-spacing: 0; }

.td-actions { display: flex; gap: 6px; white-space: nowrap; }

/* Badges de statut */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge.is-published { color: var(--success); border-color: rgba(63, 178, 127, 0.4); background: var(--success-dim); }
.badge.is-hidden { color: var(--text-3); border-color: var(--border-strong); background: var(--surface-2); }

/* ---------- Modales : pied + avertissement ---------- */
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.delete-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgba(255, 77, 79, 0.4);
  border-radius: var(--radius);
  background: var(--danger-dim);
  color: var(--text-2);
  font-size: 13.5px;
}

.delete-warning svg { width: 16px; height: 16px; color: var(--danger); flex-shrink: 0; margin-top: 2px; }

.file-preview {
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
}

/* Champs requis */
.field > span em { font-style: normal; color: var(--danger); }

input[type="file"].input { padding: 8px 10px; font-size: 13px; }

.btn.is-loading { opacity: 0.7; cursor: wait; }

/* ---------- Page recherche : barre principale ---------- */
.search-bar { position: relative; margin: 0 0 20px; }

.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-bar input::placeholder { color: var(--text-3); }

/* ---------- Connexion : en-tête + note ---------- */
.auth-head { text-align: center; }

.auth-head .brand-logo { width: 44px; height: 44px; margin: 0 auto 4px; }

.auth-head p { margin-top: 6px; font-size: 13.5px; color: var(--text-2); }

.auth-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
}

.auth-hint svg { width: 14px; height: 14px; color: var(--accent-hi); flex-shrink: 0; margin-top: 2px; }

/* ---------- Page 404 : actions ---------- */
.notfound-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

.notfound-actions .btn { margin-top: 0; }
