:root {
  --bg-primary: #000000; /* pure black = transparent on the additive display */
  --bg-secondary: #0a0a0f;
  --bg-card: #1a1a2e;
  --bg-card-hi: #232338;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent-primary: #00d4ff;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.45);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 600px;
  height: 600px;
  overflow: hidden;
}

#app { width: 100%; height: 100%; position: relative; }

/* --- Screens --- */
.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
}
.screen.hidden { display: none; }
.hidden { display: none !important; }

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-secondary);
  gap: 10px;
  flex-shrink: 0;
}
.header h1 { font-size: 24px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.back-btn {
  background: transparent;
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
}
.pill-btn {
  background: rgba(0, 212, 255, 0.16);
  color: var(--accent-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 7px 16px;
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
}
.icon-btn {
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* --- Content --- */
.content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.placeholder { color: var(--text-secondary); font-size: 18px; text-align: center; padding: 40px 0; }

.group-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 14px 4px 8px;
}
.group-label:first-child { margin-top: 0; }

/* --- Source badge --- */
.source-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

/* --- Article cards (À la une & feed) --- */
.article-list { display: flex; flex-direction: column; }
.article-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.article-thumb {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #111;
}
.article-meta { flex: 1; min-width: 0; }
.article-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-sub { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* --- Source list (Médias) --- */
.source-list { display: flex; flex-direction: column; }
.source-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.source-name { flex: 1; font-size: 21px; font-weight: 600; }
.chev { color: var(--text-muted); font-size: 26px; line-height: 1; }

/* --- Focus (D-pad) --- */
.focusable:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px var(--focus-glow);
}
.article-card.focusable:focus,
.source-card.focusable:focus { background: var(--bg-card-hi); }

/* --- Article detail (mode lecture) --- */
.article-detail { padding: 4px 2px 28px; }
.article-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: #111;
}
.article-detail-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.article-detail-metatext { font-size: 16px; color: var(--text-secondary); }
.article-detail-title { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 18px; }
.article-body .reader-p {
  font-size: 19px;
  line-height: 1.55;
  color: #d8d8e0;
  margin-bottom: 14px;
}
.reader-status { font-size: 15px; color: var(--text-muted); font-style: italic; margin-top: 6px; }
.article-detail-link { font-size: 14px; color: var(--text-muted); margin-top: 20px; }
