/* Styles communs — pages list / create / edit
   (temporairement dans _nodeled, migration future vers _nodel/public/) */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --header-height: 48px;
  --bg: #f7f7f9;
  --surface: #fff;
  --border: #e5e5e8;
  --text: #111;
  --muted: #888;
  --accent: #4a5aef;
}

html, body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

/* ── Header ── */
#app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  z-index: 100;
}

#app-header h1 {
  font-size: 16px; font-weight: 700; margin: 0;
  color: var(--accent); letter-spacing: -0.02em;
}

.doc-title {
  font-size: 13px; color: var(--muted);
  font-weight: 400; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 400px;
}

.spacer { flex: 1; }

.back-btn {
  font-size: 12px; color: var(--muted);
  padding: 4px 8px; border-radius: 5px;
  border: 1px solid var(--border); background: none;
  text-decoration: none;
  transition: background 0.15s;
  display: flex; align-items: center; gap: 4px;
}
.back-btn:hover { background: #f0f0f0; color: var(--text); }

.user-btn {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 5px;
  border: 1px solid var(--border); background: none;
  transition: background 0.15s; flex-shrink: 0;
}
.user-btn:hover { background: #f0f0f0; }
.user-btn .material-icons { font-size: 18px; }

.btn-save {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 5px;
  border: 1px solid var(--border);
  background: #555; color: #fff;
  cursor: pointer; transition: background 0.15s;
}
.btn-save:hover:not(:disabled) { background: #333; }
.btn-save:disabled { opacity: 0.4; cursor: default; }

.btn-publish {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 5px;
  border: none;
  background: var(--accent); color: #fff;
  cursor: pointer; transition: background 0.15s;
}
.btn-publish:hover:not(:disabled) { background: #333aaa; }
.btn-publish:disabled { opacity: 0.4; cursor: default; }

.btn-danger {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 5px;
  border: none;
  background: #e53e3e; color: #fff;
  cursor: pointer; transition: background 0.15s;
}
.btn-danger:hover:not(:disabled) { background: #c53030; }
.btn-danger:disabled { opacity: 0.4; cursor: default; }

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