:root {
  --border: #444;
  --bg: #1e1e1e;
  --text: #eee;
  --accent: #ff8c00;
  --accent-rgb: 255, 140, 0;
}

@media (prefers-color-scheme: light) {
  :root {
    --border: #ccc;
    --bg: #fff;
    --text: #111;
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 24px 16px;
}

.vf-container {
  max-width: 640px;
  margin: 0 auto;
}

.vf-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.vf-header h1 {
  margin: 0;
  font-size: 1.5em;
}

.vf-date {
  opacity: 0.6;
  font-size: 0.9em;
}

.vf-cleanup-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  background: rgba(var(--accent-rgb), 0.08);
  gap: 12px;
  flex-wrap: wrap;
}

.vf-cleanup-badge {
  opacity: 0.8;
  font-size: 0.9em;
  margin-top: 4px;
}

.vf-cleanup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vf-btn,
.vf-manage-item button {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.vf-cleanup-actions .vf-btn {
  font-size: 0.85em;
}

.vf-list-section h2 {
  margin-bottom: 8px;
  font-size: 1.1em;
}

.vf-progress {
  opacity: 0.6;
  font-size: 0.7em;
  font-weight: normal;
}

.vf-empty {
  opacity: 0.7;
  font-style: italic;
}

#vf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.vf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.vf-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.vf-item-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.vf-visited {
  text-decoration: line-through;
  opacity: 0.5;
}

.vf-item a {
  font-size: 0.85em;
  color: var(--accent);
  text-decoration: underline;
}

.vf-manage {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

.vf-manage summary {
  cursor: pointer;
  font-weight: 600;
}

.vf-add-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.vf-add-form input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.vf-manage-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vf-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  opacity: 0.85;
  flex-wrap: wrap;
  gap: 6px;
}

.vf-manage-item button {
  font-size: 0.8em;
  padding: 4px 8px;
  border-radius: 4px;
}

.vf-manage-actions {
  display: flex;
  gap: 4px;
}

.vf-manage-actions button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.vf-sync {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.vf-sync h3 {
  font-size: 0.95em;
  margin: 0 0 8px 0;
}

.vf-sync-actions {
  margin-bottom: 8px;
}

.vf-sync-textarea {
  width: 100%;
  min-height: 100px;
  font-family: monospace;
  font-size: 0.8em;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  margin-bottom: 8px;
}

/* Lien "Nouveautés du jour" (veille) : orange plein en sombre (~7:1 sur --bg
   #1e1e1e), assombri en clair (~4.8:1 sur blanc, #ff8c00 seul tombe à 2.3:1) */
.vf-veille-link {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
}

.vf-veille-link:hover,
.vf-veille-link:focus {
  text-decoration: underline;
}

@media (prefers-color-scheme: light) {
  .vf-veille-link {
    color: #b35900;
    border-color: #b35900;
  }
}

.vf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
