/* news-items.css — 2026-10-28 (news-items-design). Blocs d'objets des articles /news/:id.
   Thème : #0e0e10, bordures 1px #1a1a1e, accent #ff8000, angles droits, aucun dégradé / flou / pilule.
   Classes posées à l'affichage par lib/wow-news-blocks.js : news-table--items, news-list--items,
   news-heading--items, news-heading--dup, news-td--item, news-list__lead ; news-img--broken par assets/news-wowhead.js. */

/* ---------- corrections génériques ---------- */
.news-article-body .news-heading--dup {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
}
.news-article-body .news-img--broken { display: none !important; }
.news-wh-item--q6 { color: #e6cc80 !important; }
.news-wh-item--q7,
.news-wh-item--q8 { color: #00ccff !important; }
.news-article-body .news-list--items > li:empty,
.news-article-body .news-tab__body:empty { display: none; }

/* ---------- onglets → panneaux accordéon ---------- */
.news-article-body .news-tabs {
  gap: 0; margin: 1.25rem 0 1.75rem; flex: 1 1 100%; width: 100%; max-width: 100%; align-self: stretch; text-align: left;
}
.news-article-body :is(.news-table-wrap:has(> .news-table--items), .news-list--items) { width: 100%; max-width: 100%; text-align: left; }
.news-article-body .news-tab {
  background: #0e0e10; border: 1px solid #1a1a1e; border-radius: 0; padding: 0;
}
.news-article-body .news-tab + .news-tab { border-top: 0; }
.news-article-body .news-tab > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 0.9rem; color: #d4d4d8; font-size: 0.9rem; font-weight: 600; line-height: 1.3;
  text-align: left; user-select: none;
}
.news-article-body .news-tab > summary:hover { background: #131316; color: #fff; }
.news-article-body .news-tab > summary:focus-visible { outline: 1px solid #ff8000; outline-offset: -1px; }
.news-article-body .news-tab > summary::after,
.news-article-body .news-tab[open] > summary::after {
  content: ""; width: 0.42rem; height: 0.42rem; flex-shrink: 0;
  border-right: 1.5px solid #71717a; border-bottom: 1.5px solid #71717a;
  transform: translateY(-0.12rem) rotate(45deg);
}
.news-article-body .news-tab[open] > summary::after { transform: translateY(0.12rem) rotate(225deg); border-color: #ff8000; }
.news-article-body .news-tab[open] > summary { color: #fff; border-bottom: 1px solid #1a1a1e; box-shadow: inset 2px 0 0 #ff8000; }
.news-article-body .news-tab__body { position: relative; margin: 0; padding: 0; }
.news-article-body .news-tab__body > :not(.news-table-wrap):not(.news-heading--dup):not(.news-tab) { margin-left: 0.9rem; margin-right: 0.9rem; }
.news-article-body .news-tab__body > :first-child:not(.news-table-wrap):not(.news-heading--dup) { margin-top: 0.75rem; }
.news-article-body .news-tab__body > .news-table-wrap { margin: 0; border: 0; }

/* ---------- puce d'objet dans un bloc d'objets ---------- */
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item {
  gap: 0.6rem; margin: 0; padding: 0; align-items: center; flex-wrap: nowrap;
  font-weight: 600; white-space: normal !important; vertical-align: middle;
}
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item__name { white-space: normal !important; line-height: 1.3; }
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item__icon {
  width: 24px !important; height: 24px !important; max-width: 24px !important; max-height: 24px !important;
  border: 1px solid #27272a !important; border-radius: 0 !important; background: #0e0e10;
}
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item--q2 .news-wh-item__icon { border-color: #1eff00 !important; }
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item--q3 .news-wh-item__icon { border-color: #0070dd !important; }
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item--q4 .news-wh-item__icon { border-color: #a335ee !important; }
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item--q5 .news-wh-item__icon { border-color: #ff8000 !important; }
.news-article-body :is(.news-table--items, .news-list--items) .news-wh-item--q6 .news-wh-item__icon { border-color: #e6cc80 !important; }
.news-article-body :is(.news-table--items, .news-list--items) :is(.news-wh-item--q7, .news-wh-item--q8) .news-wh-item__icon { border-color: #00ccff !important; }
.news-article-body .news-list--items > li > strong { font-weight: inherit; }

/* titre rattaché à son bloc */
.news-article-body .news-heading--items { margin-bottom: 0.6rem !important; }
.news-article-body .news-heading--items + .news-list--items { margin-top: 0 !important; }

/* cadre commun des tables d'objets */
.news-article-body .news-table-wrap:has(> .news-table--items) {
  border-radius: 0; background: #0e0e10; border-color: #1a1a1e; box-shadow: none;
}
.news-article-body .news-table--items th :is(strong, b, span) { font-weight: inherit; color: inherit; font-size: inherit; letter-spacing: inherit; }

/* mobile : listes d'article ordinaires (non news-list--items) dont les puces nowrap dépassaient 390 px (383426, 383451) */
@media (max-width: 640px) {
  .news-article-body li { overflow-wrap: anywhere; }
  .news-article-body li .news-wh-item { max-width: 100%; }
  .news-article-body li .news-wh-item__name { white-space: normal !important; min-width: 0; }
}
/* ===== Variante C — « Inventaire » (liste dense 2 colonnes, filet de qualité à gauche, métadonnées en étiquettes carrées) ===== */
.news-article-body .news-table--items { display: block; min-width: 0; font-size: 0.85rem; }
.news-article-body .news-table--items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.news-article-body .news-table--items tbody { display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .news-article-body .news-table--items tbody,
  .news-article-body ul.news-list--items { grid-template-columns: 1fr 1fr; }
  .news-article-body .news-table--items tr:nth-child(odd),
  .news-article-body ul.news-list--items > li:nth-child(odd) { border-right: 1px solid #1a1a1e; }
}
.news-article-body .news-table--items tr {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 0.6rem;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid #1a1a1e; min-width: 0;
}
.news-article-body .news-table--items tbody tr:hover,
.news-article-body .news-table--items tbody tr:hover td { background: #131316; }
.news-article-body .news-table--items td {
  display: block; width: auto; max-width: none; padding: 0; border: 0 !important; text-align: left !important; color: #e4e4e7;
}
.news-article-body .news-table--items td:not(.news-td--item):not(:first-child) {
  border: 1px solid #27272a !important; background: #131316; color: #a1a1aa; padding: 0.1rem 0.4rem;
  font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; flex: 0 0 auto; min-width: 0; width: auto !important;
}
.news-article-body .news-table--items td:first-child { flex: 1 1 12rem; min-width: 0; font-weight: 600; }
.news-article-body :is(.news-table--items tr, .news-list--items > li):has(.news-wh-item--q2) { box-shadow: inset 2px 0 0 #1eff00; }
.news-article-body :is(.news-table--items tr, .news-list--items > li):has(.news-wh-item--q3) { box-shadow: inset 2px 0 0 #0070dd; }
.news-article-body :is(.news-table--items tr, .news-list--items > li):has(.news-wh-item--q4) { box-shadow: inset 2px 0 0 #a335ee; }
.news-article-body :is(.news-table--items tr, .news-list--items > li):has(.news-wh-item--q5) { box-shadow: inset 2px 0 0 #ff8000; }
.news-article-body ul.news-list--items {
  list-style: none; padding: 0; margin: 0.75rem 0 1.5rem; display: grid; grid-template-columns: 1fr;
  border: 1px solid #1a1a1e; border-bottom: 0; background: #0e0e10;
}
.news-article-body ul.news-list--items > li {
  margin: 0; padding: 0.5rem 0.75rem; border-bottom: 1px solid #1a1a1e; color: #71717a; font-size: 0.78rem; line-height: 1.45; min-width: 0;
}
.news-article-body ul.news-list--items > li:hover { background: #131316; }
.news-article-body ul.news-list--items > li > .news-wh-item,
.news-article-body ul.news-list--items > li > strong > .news-wh-item { display: flex !important; margin-bottom: 0.15rem; font-size: 0.85rem; }
.news-article-body ul.news-list--items > li > strong { display: block; }
/* liste mixte : lien de tête d'une ligne sans puce (classe news-list__lead) aligné sur le nom des puces, même taille */
.news-article-body ul.news-list--items > li > a.news-list__lead {
  display: block; margin-bottom: 0.15rem; padding-left: calc(24px + 0.6rem); font-size: 0.85rem; font-weight: 600; line-height: 1.3;
}
/* libellé de colonne devant chaque valeur annexe (« Renom requis » Rang 3) ; au-dessus d'une puce d'objet hors 1re colonne */
.news-article-body .news-table--items td[data-label]:not(.news-td--item):not(:first-child)::before {
  content: attr(data-label); margin-right: 0.35rem; color: #71717a; font-size: 13px; font-weight: 400;
}
.news-article-body .news-table--items td.news-td--item[data-label]:not(:first-child) { flex: 1 1 100%; }
.news-article-body .news-table--items td.news-td--item[data-label]:not(:first-child)::before {
  content: attr(data-label); display: block; margin-bottom: 0.2rem; color: #71717a; font-size: 13px; font-weight: 400;
}

/* ===== 2026-11-03 news-cost-align : tables d'objets à 3 colonnes annexes ou plus, toutes en étiquettes
   (ex. Objet | Type | Ancien coût | Nouveau coût, /news/383693). Une ligne par objet ; colonnes partagées
   par toutes les lignes (subgrid) : Type, Ancien coût et Nouveau coût sont toujours au même endroit.
   Exclues : tables avec une puce d'objet hors 1re colonne (383426), qui gardent la variante C. ===== */
.news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) tbody {
  grid-template-columns: minmax(0, 1fr) repeat(5, auto); column-gap: 0;
}
.news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) tr {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center;
  column-gap: 0; row-gap: 0.4rem; border-right: 0;
}
.news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) td:first-child { grid-column: 1; font-size: 15px; }
.news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) td:not(:first-child) {
  justify-self: stretch; margin-left: 0.6rem; white-space: nowrap;
}
@media (max-width: 639.98px) {
  .news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) tbody { grid-template-columns: minmax(0, 1fr); }
  .news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) tr { grid-template-columns: minmax(0, 1fr); padding: 0.6rem 0.75rem; }
  .news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) td:first-child { margin-bottom: 0.1rem; }
  .news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) td:not(:first-child) {
    display: flex; align-items: baseline; margin-left: 0; white-space: normal;
  }
  .news-article-body .news-table--items:has(td:nth-child(4)):not(:has(td.news-td--item:not(:first-child))) td[data-label]:not(:first-child)::before { flex: 0 0 7.25rem; margin-right: 0.5rem; }
}
