/* ═══════════════════════════════════════════════════
   css/nouveautes-1-0.css
   Panneau « Nouveautés », pastilles de la navbar, marqueur « Nouveau » des cartes.
   Variables propres avec repli : --accent est repris du thème s'il existe.
════════════════════════════════════════════════════ */

:root {
  --nouv-accent: var(--accent, #e8a33d);
  --nouv-bg: #1f2037;
  --nouv-fg: #f1f1f6;
  --nouv-muted: #a3a4bb;
  --nouv-line: rgba(255, 255, 255, .10);
  --nouv-hover: rgba(255, 255, 255, .06);
}
:root[data-theme="light"] {
  --nouv-bg: #ffffff;
  --nouv-fg: #1d1e2c;
  --nouv-muted: #666880;
  --nouv-line: rgba(0, 0, 0, .10);
  --nouv-hover: rgba(0, 0, 0, .05);
}

/* ── Compteurs navbar (toujours avec un chiffre) ── */
.nouv-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--nouv-accent);
  color: #1a1a2e;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.nouv-badge[hidden], [data-nouv-item][hidden] { display: none !important; }

/* Compteur du bouton hamburger (mobile) */
.nouv-badge--burger {
  position: absolute;
  top: -5px;
  right: -5px;
  margin: 0;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 4px;
  font-size: 11px;
  pointer-events: none;
}

/* ── Marqueur « Nouveau » des cartes ── */
.nouv-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 8px;
  background: var(--nouv-accent);
  color: #1a1a2e;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Panneau ── */
.nouv-root[hidden] { display: none; }
.nouv-root { position: fixed; inset: 0; z-index: 10000; }

.nouv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

.nouv-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--nouv-bg);
  color: var(--nouv-fg);
  box-shadow: -8px 0 28px rgba(0, 0, 0, .35);
  outline: none;
}

.nouv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px 20px;
  border-bottom: 1px solid var(--nouv-line);
}
.nouv-title { margin: 0; font-size: 1.15rem; }
.nouv-sub { margin: 2px 0 0; font-size: .78rem; font-weight: 400; color: var(--nouv-muted); }
.nouv-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nouv-close:hover { background: var(--nouv-hover); }

.nouv-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.nouv-empty { margin: 0; padding: 28px 20px; color: var(--nouv-muted); text-align: center; }

.nouv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: inherit;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.nouv-item:hover, .nouv-item:focus-visible { background: var(--nouv-hover); }
.nouv-item.is-unseen { border-left-color: var(--nouv-accent); }

.nouv-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--nouv-hover);
}
.nouv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.nouv-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nouv-titre { font-weight: 600; overflow-wrap: anywhere; }
.nouv-meta { font-size: .82rem; color: var(--nouv-muted); }

/* ── Case « j'ai pris connaissance » ── */
.nouv-foot[hidden] { display: none; }
.nouv-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--nouv-line);
}
.nouv-ack {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}
.nouv-ack input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--nouv-accent);
  cursor: pointer;
}
.nouv-ack input:focus-visible {
  outline: 2px solid var(--nouv-accent);
  outline-offset: 2px;
}
.nouv-ack-hint {
  margin: 6px 0 0 30px;
  font-size: .78rem;
  color: var(--nouv-muted);
}

html.nouv-open { overflow: hidden; }

@media (max-width: 520px) {
  .nouv-panel { width: 100%; }
  /* Bloc de la case : marges gauche / droite / basse (zone sûre des téléphones comprise) */
  .nouv-foot { padding: 14px 24px calc(22px + env(safe-area-inset-bottom, 0px)); }
}
