* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(ellipse at top, #161b22 0%, #0d1117 60%);
  color: #e6edf3;
  line-height: 1.5;
  padding: 28px 20px 80px;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
}
header { margin-bottom: 36px; text-align: center; }
h1 {
  font-size: 52px;
  font-weight: 800;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.sub { color: #8b949e; font-size: 15.5px; margin-top: 8px; }
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 4px 24px rgba(0,0,0,0.2);
}
@media (max-width: 720px) {
  body { padding: 18px 14px 60px; }
  h1 { font-size: 38px; }
  .card { padding: 18px; }
}
.card.primary {
  border-color: #22d3ee44;
  background: linear-gradient(180deg, #161b22 0%, #161b22 80%, #1e2536 100%);
}
h2 { font-size: 17px; margin-bottom: 12px; color: #c9d1d9; }
.hint { font-size: 13px; color: #8b949e; margin-bottom: 12px; }
.status {
  font-size: 13px;
  color: #8b949e;
  padding: 10px 12px;
  background: #0d1117;
  border-radius: 8px;
  margin-bottom: 12px;
}
.status.ok { color: #56d364; }
.status.err { color: #f85149; }

input[type="text"], input[type="url"], textarea {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #e6edf3;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #22d3ee;
}
textarea { resize: vertical; min-height: 80px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.btn {
  display: inline-block;
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  font-family: inherit;
}
.btn:hover { background: #30363d; }
.btn.big {
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #0d1117;
  border: none;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 4px;
}
.btn.big:hover { filter: brightness(1.1); }
.btn.big:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; }

.letter-list {
  list-style: none;
  margin-top: 14px;
}
.letter-list li {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.letter-list .meta { font-size: 13px; color: #c9d1d9; }
.letter-list .meta small { display: block; color: #8b949e; font-size: 11px; margin-top: 2px; }
.letter-list .del {
  background: none;
  border: none;
  color: #f85149;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.result {
  margin-top: 16px;
  background: #0d1117;
  border: 1px solid #22d3ee44;
  border-radius: 10px;
  padding: 16px;
}
.result-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.result pre {
  white-space: pre-wrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: #e6edf3;
  line-height: 1.65;
}

@media (max-width: 540px) {
  .row { flex-direction: column; }
  h1 { font-size: 28px; }
}

input[type="url"]:focus { border-color: #22d3ee; }
.manual { margin: 10px 0 6px; border: 1px dashed #30363d; border-radius: 8px; padding: 8px 12px; }
.manual summary { cursor: pointer; color: #8b949e; font-size: 13px; padding: 4px 0; }
.manual[open] summary { color: #c9d1d9; margin-bottom: 8px; }
.manual > input, .manual > textarea { margin-top: 8px; }
.sep { border: none; border-top: 1px solid #30363d; margin: 18px 0 14px; }
.result-meta { font-size: 14px; color: #c9d1d9; margin-bottom: 12px; padding: 8px 12px; background: #0d1117; border-radius: 8px; border-left: 3px solid #22d3ee; }
.result-meta em { color: #8b949e; font-style: normal; }
.primary-btn { background: linear-gradient(135deg, #22d3ee, #a78bfa) !important; color: #0d1117 !important; font-weight: 700 !important; border: none !important; }
#resultText { outline: none; }
#resultText:focus { background: #0a0e14; }

.chat { margin-top: 16px; border: 1px solid #30363d; border-radius: 12px; padding: 12px; background: #0d1117; }
.chat-head { font-size: 13px; color: #c9d1d9; margin-bottom: 10px; font-weight: 600; }
.chat-log { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.chat-log:empty { display: none; }
.bubble { padding: 8px 12px; border-radius: 12px; font-size: 13.5px; max-width: 85%; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.bubble.user { background: linear-gradient(135deg, #22d3ee33, #a78bfa33); border: 1px solid #22d3ee44; color: #e6edf3; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.ai { background: #161b22; border: 1px solid #30363d; color: #c9d1d9; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.err { border-color: #f8514955; color: #f85149; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; margin: 0 !important; }
.chat-form button { white-space: nowrap; }

/* Tabs nav */
.tabs { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid #30363d; color: #c9d1d9; text-decoration: none; font-size: 13.5px; font-weight: 500; transition: all 0.15s; }
.tab:hover { border-color: #22d3ee44; color: #e6edf3; }
.tab.active { background: linear-gradient(135deg, #22d3ee22, #a78bfa22); border-color: #22d3ee; color: #e6edf3; }

/* Search results */
select { width: 100%; background: #0d1117; border: 1px solid #30363d; color: #e6edf3; border-radius: 8px; padding: 11px 12px; font-size: 14px; font-family: inherit; }
select:focus { border-color: #22d3ee; outline: none; }
.results-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.results-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.results-filter input { flex: 1; margin: 0 !important; }
.results-filter select { flex: 0 0 180px; }
.jobs-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.jobs-list .empty { padding: 20px; text-align: center; color: #8b949e; border: 1px dashed #30363d; border-radius: 10px; }
.job { background: #0d1117; border: 1px solid #30363d; border-radius: 10px; padding: 14px; transition: border-color 0.15s; }
.job:hover { border-color: #22d3ee44; }
.job-head { margin-bottom: 6px; }
.job-source { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; padding: 3px 8px; border-radius: 999px; background: #22d3ee22; color: #22d3ee; border: 1px solid #22d3ee44; }
.badge-france-travail { background: #a78bfa22; color: #a78bfa; border-color: #a78bfa44; }
.badge-apec { background: #f8c52522; color: #f8c525; border-color: #f8c52544; }
.job-title { font-weight: 600; color: #e6edf3; font-size: 15px; margin-bottom: 6px; line-height: 1.35; }
.job-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8b949e; margin-bottom: 12px; }
.job-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.job-actions .btn { font-size: 13px; padding: 8px 14px; }
.job-actions a.btn { text-decoration: none; display: inline-block; }

/* Search card big style */
.search-card { padding: 36px; }
.search-card h2 { font-size: 22px; margin-bottom: 20px; }
.search-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 720px) { .search-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; color: #8b949e; text-transform: uppercase; letter-spacing: 0.8px; }
.field input, .field select { margin: 0 !important; padding: 13px 14px; font-size: 15px; }
.big-field input { font-size: 16px; padding: 14px 16px; }
.huge-btn { width: 100%; padding: 18px; font-size: 17px; font-weight: 700; background: linear-gradient(135deg, #22d3ee, #a78bfa); color: #0d1117; border: none; border-radius: 12px; cursor: pointer; transition: transform 0.1s, box-shadow 0.15s; }
.huge-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25); }
.huge-btn:active { transform: translateY(0); }
.huge-btn:disabled { opacity: 0.6; cursor: wait; }

/* Bigger job cards */
.jobs-list { gap: 14px; }
.job { padding: 18px 20px; }
.job-title { font-size: 16.5px; margin-bottom: 8px; }
.job-meta { font-size: 13px; gap: 14px; }
.job-actions .btn { font-size: 13.5px; padding: 9px 16px; }

/* LinkedIn badge */
.badge-linkedin { background: #0a66c222; color: #6ab2ff; border-color: #0a66c244; }
.badge-hellowork { background: #ff6b3522; color: #ff8c5a; border-color: #ff6b3544; }
.job-date { font-size: 11.5px; color: #6e7681; margin-left: auto; }
.job-head { display: flex; align-items: center; gap: 8px; }

.search-grid-2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 720px) { .search-grid-2 { grid-template-columns: 1fr; } }
.badge-site-entreprise { background: #56d36422; color: #56d364; border-color: #56d36444; }
