/* KUZAI AI NEWS – v1.2.2 */

/* Cadre principal (look néon + largeur stable) */
.kuzai-ai-news{
  border:1px solid #1dcaff;
  border-radius:12px;
  padding:16px;
  background: rgba(24,144,255,.08);
  box-shadow: 0 0 18px rgba(255,255,255,.25),
              0 0 42px rgba(255,255,255,.12) inset;

  box-sizing:border-box;
  width:min(1200px, 92vw);       /* fixe un max sans s’élargir */
  margin-inline:auto;
}

/* Header + meta */
.kuzai-ai-news__header{
  display:flex; justify-content:space-between; align-items:baseline;
  gap:12px; margin-bottom:8px;
}
.kuzai-ai-news__header h3{ margin:0; font-size:1.1rem; }
.kuzai-ai-news__meta, .kuzai-ai-news__sub{ color:#9ca3af; }

/* Scroll: pas d’overflow horizontal, scrollbar stable */
.kuzai-ai-news__scroll{
  max-height: 62vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
}

/* Liste: on masque la numérotation native */
.kuzai-ai-news__list{
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Item: FLEX  →  [numéro (before)] [titre-link ellipsis]  */
.kuzai-ai-news__item{
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .6rem;

  margin:.5rem 0;
  padding:.25rem .25rem;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset,
              0 0 8px rgba(255,255,255,.20);

  max-width:100%;
  min-width:0;
}

/* Colonne numéro — fixe, non tronquée */
.kuzai-ai-news__item::before{
  content: attr(data-n) ".";
  flex: 0 0 3.2ch;               /* largeur réservée pour 3 chiffres */
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: .95;
}

/* Lien titre — même ligne + ellipsis propre */
.kuzai-ai-news__link{
  color:#cfe9ff; text-decoration:none;

  display:inline-block;          /* reste sur la même ligne que le numéro */
  flex: 1 1 auto;
  width:100%;
  max-width:100%;
  min-width:0;                   /* nécessaire pour ellipsis en flex */

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  word-break: break-word;
  overflow-wrap: anywhere;
}
.kuzai-ai-news__link:hover{ text-decoration:underline; }

/* Meta (date/source) sous le titre, pleine largeur */
.kuzai-ai-news__sub{
  flex-basis: 100%;
  margin-left: calc(3.2ch + .6rem); /* aligné sous la colonne du numéro */
  margin-top:.15rem;
  max-width:100%;
  white-space:normal;
}

/* Sentinel pour le scroll infini (invisible, ne perturbe pas la largeur) */
.kuzai-ai-news__sentinel{
  list-style: none;
  display:block;
  height: 2px;   /* >0 pour être détectable par l'observer */
  padding:0; margin:0; border:0;
}

/* Mode clair */
@media (prefers-color-scheme: light){
  .kuzai-ai-news{
    background:#fff; border-color:#e5e7eb; box-shadow:none;
  }
  .kuzai-ai-news__link{ color:#111827; }
  .kuzai-ai-news__meta, .kuzai-ai-news__sub{ color:#6b7280; }
}

/* supprime toute trace du bloc meta si présent dans un cache */
.kuzai-ai-news__sub{ display:none !important; height:0; padding:0; margin:0; }

