/* Phase 13.1 — Actualités refonte. Header orange Edge, media strip TV+Radio,
   hero card + cards standards, modal article full-page, comments inline. */

.ns-body { background: var(--bg); padding-bottom: 32px; min-height: 100vh; }

/* ── Header (sticky orange gradient, self-contained pattern Phase 12) ── */
.app-header.ns-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #6750A4, #4F378B);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0);
  box-shadow: 0 2px 12px rgba(103, 80, 164,.18);
}
.app-header.ns-header .app-header-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; max-width: 760px; margin: 0 auto;
}
.app-header.ns-header .hdr-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  transition: transform .15s, background .15s;
}
.app-header.ns-header .hdr-back:active { transform: scale(.92); background: rgba(255,255,255,.3); }
.app-header.ns-header .app-header-title {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; line-height: 1.15;
}
.app-header.ns-header .app-header-name {
  font-size: 17px; font-weight: 900; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header.ns-header .app-header-sub {
  font-size: 10px; font-weight: 800; color: rgba(255,255,255,.85);
  text-transform: uppercase; letter-spacing: .5px; margin-top: 1px;
}

/* ── Chips catégories ── */
.ns-chips {
  display: flex; gap: 8px; padding: 12px 16px 10px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,245,247,.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15,23,42,.05);
}
.ns-chips::-webkit-scrollbar { display: none; }
.ns-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 22px;
  background:var(--card-bg); border: 1px solid rgba(15,23,42,.08);
  color: var(--text-soft); font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .18s ease;
}
.ns-chip i { font-size: 11px; opacity: .8; }
.ns-chip:active { transform: scale(.96); }
.ns-chip.active {
  background: linear-gradient(135deg, #6750A4 0%, #4F378B 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(103, 80, 164,.32);
}
.ns-chip.active i { opacity: 1; }

/* ── Shell + feed ── */
.ns-shell { padding: 8px 16px 24px; max-width: 720px; margin: 0 auto; }
.ns-feed { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.ns-loading { display: flex; align-items: center; gap: 10px; padding: 32px; color: var(--text-soft); font-size: 13px; justify-content: center; }
.gs-spinner { display: inline-block; width: 22px; height: 22px; border: 2.5px solid rgba(15,23,42,.1); border-top-color: #6750A4; border-radius: 50%; animation: nsSpin .8s linear infinite; }
@keyframes nsSpin { to { transform: rotate(360deg); } }
.ns-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.ns-empty i { font-size: 42px; margin-bottom: 14px; display: block; opacity: .5; color: #6750A4; }
.ns-empty-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.ns-empty-sub { font-size: 12.5px; color: var(--text-soft); }

/* ── Media strip TV + Radio ── */
.ns-media-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.ns-media-card {
  position: relative; border-radius: 16px; overflow: hidden;
  padding: 14px 14px; color: #fff; min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  text-decoration: none; transition: transform .15s;
}
.ns-media-card:active { transform: scale(.97); }
.ns-media-tv { background: linear-gradient(135deg, #E91E63, #C2185B 60%, #880E4F); }
.ns-media-radio { background: linear-gradient(135deg, #00BCD4, #0097A7 60%, #006064); }
.ns-media-top { display: flex; align-items: center; gap: 10px; }
.ns-media-ico {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.ns-media-titles { min-width: 0; }
.ns-media-name { font-size: 14px; font-weight: 900; letter-spacing: .3px; }
.ns-media-sub { font-size: 10.5px; font-weight: 600; opacity: .85; margin-top: 1px; }
.ns-media-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 900; padding: 3px 8px;
  border-radius: 10px; background: rgba(255,255,255,.18);
  align-self: flex-start; letter-spacing: .6px;
}
.ns-media-dot {
  width: 6px; height: 6px; border-radius: 50%; background:var(--card-bg);
  animation: nsPulse 1.6s ease-in-out infinite;
}
.ns-media-now {
  font-size: 11.5px; font-weight: 700; opacity: .95; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes nsPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }
@media (max-width: 360px) {
  .ns-media-card { padding: 12px 11px; min-height: 100px; }
  .ns-media-name { font-size: 13px; }
  .ns-media-ico { width: 32px; height: 32px; font-size: 14px; }
}

/* ── Article cards ── */
.ns-card {
  background:var(--card-bg); border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(15,23,42,.05);
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.05);
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
  animation: nsFadeUp .4s ease both;
}
@keyframes nsFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ns-card:active { transform: scale(.985); }
.ns-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(15,23,42,.08); }

.ns-card-cover {
  width: 100%; height: 180px; object-fit: cover;
  background: rgba(15,23,42,.04); display: block;
}

/* Compact mode — no cover photo, tighter layout.
   Refonte 2026-05-26 : retrait border-left orange (cohérence avec audit P0-style
   sur discussion locale — ombre orange envahissante sur dark mode). Le card a
   déjà son own bg + shadow → l'accent n'apporte rien. */
.ns-card.ns-card-compact { }
.ns-card.ns-card-compact .ns-card-body { padding: 12px 14px 13px; }
.ns-card.ns-card-compact .ns-card-title { font-size: 14.5px; margin-bottom: 6px; line-height: 1.3; }
.ns-card.ns-card-compact .ns-card-summary {
  font-size: 12px; line-height: 1.5; margin-bottom: 8px;
  -webkit-line-clamp: 2;
}
.ns-card.ns-card-compact .ns-card-cat { margin-bottom: 6px; }

.ns-card-body { padding: 14px 16px 16px; }
.ns-card-cat {
  display: inline-block; font-size: 10px; font-weight: 900;
  color: #6750A4; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; padding: 3px 9px;
  background: rgba(103, 80, 164,.1); border-radius: 8px;
}
.ns-card-title { font-size: 16px; font-weight: 900; line-height: 1.35; margin-bottom: 8px; color: var(--text); letter-spacing: -.2px; }
.ns-card-summary {
  font-size: 12.5px; color: var(--text-soft); line-height: 1.55;
  margin-bottom: 11px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ns-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--text-muted); font-weight: 700;
}
.ns-card-source { display: inline-flex; align-items: center; gap: 4px; color: var(--text-soft); }
.ns-card-source i { color: #6750A4; font-size: 10px; }
.ns-card-meta .ns-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); opacity: .5; }
.ns-verified {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 999px; font-size: 9px; font-weight: 900;
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(16,185,129,.06));
  color: #10B981; border: 1px solid rgba(16,185,129,.22);
}

/* Hero card (first on "Tout") */
.ns-card.ns-hero { box-shadow: 0 4px 10px rgba(15,23,42,.07), 0 18px 40px rgba(103, 80, 164,.12); }
.ns-card.ns-hero .ns-card-cover,
.ns-card.ns-hero .ns-card-cover-placeholder { height: 230px; }
.ns-card.ns-hero .ns-card-body { padding: 18px 20px 20px; }
.ns-card.ns-hero .ns-card-title { font-size: 22px; line-height: 1.25; letter-spacing: -.4px; }
.ns-card.ns-hero .ns-card-summary { font-size: 13.5px; }
@media (max-width: 400px) {
  .ns-card.ns-hero .ns-card-cover,
  .ns-card.ns-hero .ns-card-cover-placeholder { height: 195px; }
  .ns-card.ns-hero .ns-card-title { font-size: 19px; }
}

/* Load more */
.ns-load-more-wrap { display: flex; justify-content: center; padding: 18px 0; }
.ns-load-more {
  padding: 10px 22px; border-radius: 22px;
  background:var(--card-bg); border: 1px solid rgba(15,23,42,.08);
  color: var(--text-soft); font-size: 13px; font-weight: 800;
  font-family: inherit; cursor: pointer;
}
.ns-load-more:active { transform: scale(.96); }

/* ── Article detail overlay ── */
.ns-article-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); overflow-y: auto;
  display: none; flex-direction: column;
}
.ns-article-overlay.open { display: flex; animation: nsOverlayOpen .25s ease both; }
@keyframes nsOverlayOpen { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ns-article-header {
  position: sticky; top: 0; z-index: 10;
  /* color-mix pour rester théâtre-aware sans casser le backdrop-filter */
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: calc(env(safe-area-inset-top, 0) + 10px) 14px 10px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border, rgba(15,23,42,.05));
}
.ns-article-back, .ns-article-share {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--bg-soft, rgba(15,23,42,.06)); color: var(--text);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.ns-article-back:active, .ns-article-share:active {
  transform: scale(.92); background: rgba(15,23,42,.1);
}
.ns-article-header-label { flex: 1; font-size: 13px; font-weight: 800; color: var(--text); }

.ns-article-scroll { flex: 1; padding: 18px 16px 80px; max-width: 720px; width: 100%; margin: 0 auto; }
.ns-article-cover {
  width: 100%; max-height: 280px; object-fit: cover; border-radius: 14px;
  margin-bottom: 16px; background: rgba(15,23,42,.04);
}
.ns-article-title {
  font-size: 24px; font-weight: 900; line-height: 1.28;
  letter-spacing: -.4px; margin-bottom: 12px; color: var(--text);
}
.ns-article-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 18px;
}
.ns-article-meta-cat {
  background: rgba(103, 80, 164,.1); color: #6750A4;
  padding: 3px 9px; border-radius: 6px; font-weight: 900; letter-spacing: .5px;
  text-transform: uppercase; font-size: 10px;
}
.ns-article-body { font-size: 15px; line-height: 1.8; color: var(--text); }
.ns-article-body p { margin-bottom: 14px; }
.ns-article-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 22px 0 6px; padding-top: 18px;
  border-top: 1px solid rgba(15,23,42,.06);
}
.ns-article-tag {
  padding: 5px 12px; border-radius: 999px;
  background: rgba(103, 80, 164,.08); font-size: 11px; font-weight: 700; color: #6750A4;
}
.ns-article-source-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 8px 14px;
  border-radius: 22px; background:var(--card-bg);
  border: 1px solid rgba(15,23,42,.08);
  font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  text-decoration: none;
}
.ns-article-source-link:active { transform: scale(.96); }

/* ── Comments ── */
.ns-comments {
  margin-top: 32px; padding-top: 22px;
  border-top: 1px solid rgba(15,23,42,.06);
}
.ns-comments-title {
  font-size: 14px; font-weight: 900; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.ns-comments-title i { color: #6750A4; }
.ns-comments-empty { color: var(--text-muted); font-size: 12.5px; padding: 14px 0; text-align: center; }

.ns-comment {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid rgba(15,23,42,.04);
}
.ns-comment:last-child { border-bottom: none; }
.ns-comment-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6750A4, #4F378B);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; flex-shrink: 0;
}
.ns-comment-body { flex: 1; min-width: 0; }
.ns-comment-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 11.5px; color: var(--text-muted); font-weight: 700;
}
.ns-comment-pseudo { color: var(--text); font-weight: 900; font-size: 12.5px; }
.ns-comment-text { font-size: 13px; line-height: 1.55; color: var(--text); word-break: break-word; }
.ns-comment-delete {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 11px; padding: 4px 6px; margin-left: auto; opacity: .7;
}
.ns-comment-delete:active { opacity: 1; color: #EF4444; }

.ns-comment-form {
  display: flex; gap: 8px; margin-top: 14px;
  padding: 10px; background:var(--card-bg);
  border: 1px solid rgba(15,23,42,.08); border-radius: 14px;
}
.ns-comment-input {
  flex: 1; padding: 8px 10px; border: none; background: transparent;
  font-family: inherit; font-size: 13.5px; color: var(--text); outline: none;
  resize: none; min-height: 36px; max-height: 120px;
}
.ns-comment-submit {
  padding: 8px 14px; border-radius: 10px;
  background: linear-gradient(135deg, #6750A4, #4F378B);
  color: #fff; border: none; font-weight: 800; font-size: 13px;
  font-family: inherit; cursor: pointer; align-self: flex-end;
}
.ns-comment-submit:disabled { opacity: .55; cursor: default; }
.ns-comment-submit:active:not(:disabled) { transform: scale(.96); }
