/* ===== Job Tracker - Styles partagés ===== */
/* Design moderne type WTTJ : épuré, cards blanches, badges outline, deux thèmes */

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
  --transition: all .18s ease;
}

/* ---- Thème clair (défaut) ---- */
:root, [data-theme="light"] {
  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --text: #17181c;
  --text-soft: #5a6070;
  --text-faint: #9aa0b0;
  --accent: #e8485f;
  --accent-soft: #fdeef0;
  --accent-hover: #d13348;
  --ok: #0ca678;
  --ok-soft: #e6f7f1;
  --warn: #e8590c;
  --warn-soft: #fff0e6;
  --info: #3b5bdb;
  --info-soft: #eef2ff;
  --violet: #7048e8;
  --border: #e8eaeef;
  --border-strong: #d5d8df;
  --badge-bg: #f1f2f5;
  --input-bg: #ffffff;
}

/* ---- Thème sombre ---- */
[data-theme="dark"] {
  --bg: #12131a;
  --bg-elev: #1b1d27;
  --text: #e9eaee;
  --text-soft: #a0a6b4;
  --text-faint: #6b7080;
  --accent: #ff647e;
  --accent-soft: #2d1820;
  --accent-hover: #ff7d92;
  --ok: #38d9a9;
  --ok-soft: #13291f;
  --warn: #ffa94d;
  --warn-soft: #2b2115;
  --info: #748ffc;
  --info-soft: #1a2035;
  --violet: #b197fc;
  --border: #262935;
  --border-strong: #333647;
  --badge-bg: #23252f;
  --input-bg: #17181f;
}

/* ---- Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  transition: background .2s ease, color .2s ease;
}
a { color: inherit; }

/* ---- Header ---- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  text-decoration: none;
}
.logo .logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.hdr-right { display: flex; align-items: center; gap: 14px; }

/* Toggle thème */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-soft);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.link-quiet { font-size: 14px; color: var(--text-soft); text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: var(--transition); }
.link-quiet:hover { color: var(--text); background: var(--badge-bg); }

/* ---- Container ---- */
.container { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---- Stats discrètes ---- */
.stats-line {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
  font-size: 13.5px; color: var(--text-soft);
}
.stats-line .nums { display: flex; gap: 18px; }
.stats-line .n b { color: var(--text); font-weight: 700; }

/* ---- Filtres ---- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.f-btn {
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-soft);
  font-size: 13.5px; cursor: pointer; font-family: var(--font);
  transition: var(--transition);
}
.f-btn:hover { border-color: var(--text-faint); color: var(--text); }
.f-btn.active { background: var(--text); border-color: var(--text); color: var(--bg-elev); font-weight: 600; }

/* ---- Post cards (blog) ---- */
.post {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.post:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.post.is-rejected { opacity: .55; }

.post-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-faint); margin-bottom: 10px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.na { background: var(--border-strong); }

.post h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.35; margin-bottom: 3px; }
.post h2 a { color: var(--text); text-decoration: none; transition: var(--transition); }
.post h2 a:hover { color: var(--accent); }
.post .co { font-size: 14.5px; color: var(--text-soft); margin-bottom: 12px; }
.post .co b { color: var(--accent); font-weight: 600; }

.pills { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
  font-size: 12.5px; padding: 4px 11px; border-radius: 999px;
  background: var(--badge-bg); color: var(--text-soft); font-weight: 500;
}
.pill.t-accent { background: var(--accent-soft); color: var(--accent); }
.pill.t-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.pill.t-info { background: var(--info-soft); color: var(--info); }
.pill.t-violet { background: var(--violet); color: #fff; font-weight: 600; }
.pill.t-warn { background: var(--warn); color: #fff; font-weight: 600; }
.pill.t-red { background: var(--accent); color: #fff; font-weight: 600; }
.pill.t-gray { background: var(--badge-bg); color: var(--text-faint); }

.note-preview {
  margin-top: 12px; padding: 10px 14px;
  background: var(--badge-bg); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-soft); font-style: italic;
}
.note-preview b { font-style: normal; color: var(--accent); }

.post-actions {
  display: flex; gap: 8px; align-items: center;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: var(--transition); border: 1px solid transparent;
  cursor: pointer; font-family: var(--font);
}
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { border-color: var(--accent); }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-hover); }
.btn .push { margin-left: auto; }

/* vide */
.empty { text-align: center; padding: 70px 20px; color: var(--text-faint); }
.empty h3 { font-size: 17px; margin-bottom: 6px; color: var(--text-soft); }

/* ---- Page détail ---- */
.backlink { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-soft); text-decoration: none; margin-bottom: 18px; }
.backlink:hover { color: var(--accent); }

.detail-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.detail-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 4px; }
.detail-card .co-line { font-size: 16px; color: var(--text-soft); margin-bottom: 18px; }
.detail-card .co-line b { color: var(--accent); font-weight: 600; }
.kv { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 130px; color: var(--text-faint); flex-shrink: 0; }
.kv .v { flex: 1; }
.kv .v a { color: var(--accent); text-decoration: none; word-break: break-all; }
.kv .v a:hover { text-decoration: underline; }

.section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.status-row { display: flex; gap: 9px; flex-wrap: wrap; }
.st-btn {
  padding: 9px 17px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-soft);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: var(--transition);
}
.st-btn:hover { border-color: var(--text); color: var(--text); }
.st-btn.active { background: var(--text); color: var(--bg-elev); border-color: var(--text); }

textarea.notes {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 14px; font-family: var(--font);
  transition: var(--transition);
}
textarea.notes:focus { outline: none; border-color: var(--accent); }

.app-date { font-size: 13px; color: var(--text-faint); margin: 10px 0 14px; }

/* ---- TL;DR ---- */
.tldr-card { border-left: 4px solid var(--accent); }
.tldr-text {
  font-size: 15px; line-height: 1.65; color: var(--text);
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 14px 18px;
}

/* ---- Annonce complète ---- */
.desc-source { font-size: 12.5px; color: var(--text-faint); margin-bottom: 14px; }
.full-desc {
  font-size: 14.5px; line-height: 1.7; color: var(--text-soft);
  white-space: pre-wrap; word-wrap: break-word;
  background: var(--badge-bg); border-radius: var(--radius-sm);
  padding: 18px 20px; max-height: none;
}

/* ---- Login ---- */
.login-wrap { max-width: 380px; margin: 12vh auto 0; padding: 0 20px; }
.login-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow-hover);
  text-align: center;
}
.login-card .logo-mark { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; margin: 0 auto 16px; }
.login-card h1 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.login-card .sub { font-size: 13.5px; color: var(--text-faint); margin-bottom: 26px; }
.fg { text-align: left; margin-bottom: 16px; }
.fg label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.fg input {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  font-family: var(--font); transition: var(--transition);
}
.fg input:focus { outline: none; border-color: var(--accent); }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 6px; }
.err { font-size: 13.5px; color: var(--accent); margin-bottom: 14px; }

/* Dark-mode syntax-free toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--text); color: var(--bg-elev);
  padding: 10px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .container { padding: 20px 14px 50px; }
  .post { padding: 18px; }
  .stats-line .nums { gap: 10px; font-size: 12.5px; }
  .kv .k { width: 100px; }
  .detail-card { padding: 20px; }
}