/* news.sliver.lu — WebOnly 0.30 */

:root {
  --brand-bar: #8B0000;
  --brand-text: #FFFFFF;
  --country-bar: #FFFFFF;
  --country-text: #8B0000;
  --category-bar: #FFFFFF;
  --category-text: #8B0000;
  --category-rule: #E3D4D4;
  --headline: #1A1A1A;
  --body-text: #333333;
  --source-text: #777777;
  --source-link: #1565C0;
  --page-bg: #FFFFFF;
  --note-text: #777777;
  --note-rule: #BFBFBF;
  --footer-rule: #8B0000;
  --footer-text: #8B0000;
  --index-country: #8B0000;
  --index-rule: #E4E4E4;
  --index-quote-bar: #8B0000;
  --index-muted: #606060;

  --font-body: Verdana, Geneva, sans-serif;
  --bar-brand-h: 34px;
  --bar-country-h: 32px;
  --bar-category-h: 30px;
  --gutter: 1rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--body-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Aucun overflow-x: hidden sur un ancêtre des barres : il
   neutraliserait position sticky sans le moindre signal. */

/* ---- Barre de marque ---- */

.brand-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-brand-h);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 var(--gutter);
  background: var(--brand-bar);
  color: var(--brand-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
}

.brand-home {
  display: inline-flex;
  align-items: center;
  color: var(--brand-text);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-name {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.brand-edition {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 50%;
  background: #fff;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.12s;
}

.lang-pill svg { width: 20px; height: 20px; display: block; border-radius: 50%; }
.lang-pill:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.28); transform: translateY(-1px); }
.lang-pill:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* ---- Barre pays ---- */

.country-bar {
  position: sticky;
  top: var(--bar-brand-h);
  z-index: 30;
  margin: 0;
  height: var(--bar-country-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  background: var(--country-bar);
  color: var(--country-text);
  font-size: 0.92rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ---- Barre de rubrique ---- */

.cat-bar {
  position: sticky;
  top: calc(var(--bar-brand-h) + var(--bar-country-h));
  z-index: 20;
  margin: 0;
  height: var(--bar-category-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  background: var(--category-bar);
  color: var(--category-text);
  border-bottom: 1px solid var(--category-rule);
  font-size: 0.8rem;
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ---- Corps ---- */

/* Largeur fluide : le contenu suit la fenêtre, sans plafond. Le
   lecteur décide de sa largeur de lecture, pas la feuille de
   style. */
.edition { margin: 0; padding: 0 0 3rem; }

.item,
.cat-empty,
.cat-note { padding-left: var(--gutter); padding-right: var(--gutter); }

.item { margin: 0; padding-top: 1.15rem; }

/* Respiration avant un changement de rubrique ou de pays : sans
   elle, la ligne de source du dernier sujet colle à la barre
   suivante. Ne s'applique pas à la première rubrique d'un pays,
   qui suit immédiatement sa barre pays. */
.item + .cat-bar,
.cat-empty + .cat-bar,
.cat-note + .cat-bar { margin-top: 1.5rem; }

.item + .country-bar,
.cat-empty + .country-bar,
.cat-note + .country-bar { margin-top: 2.1rem; }

.item-head {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: bold;
  line-height: 1.35;
  color: var(--headline);
}

.item-body {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  line-height: 1.62;
  text-align: justify;
  hyphens: auto;
}

.item-src {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  font-size: 0.74rem;
  color: var(--source-text);
}

.src-outlets { flex: 1 1 auto; min-width: 0; }

.src-date {
  flex: 0 0 auto;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.src-link {
  color: var(--source-link);
  text-decoration: none;
  font-style: italic;
}

.src-link:hover { text-decoration: underline; }
.src-sep { margin: 0 0.4em; color: var(--source-text); }

.cat-empty {
  margin-top: 1.15rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--source-text);
}

.cat-note {
  margin-top: 1.3rem;
  margin-left: var(--gutter);
  border-left: 2px solid var(--note-rule);
  padding-left: 0.7rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--note-text);
}

.cat-note .note-label { font-style: normal; font-weight: bold; }

/* Ancre : dégager les trois barres. */
[id] { scroll-margin-top: calc(var(--bar-brand-h) + var(--bar-country-h) + var(--bar-category-h) + 8px); }

/* ---- Index ---- */

.idx { padding: 1.3rem var(--gutter) 3rem; }

.idx-subtitle {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  font-weight: bold;
  color: var(--body-text);
}

.idx-intro { display: flex; gap: 0.7rem; margin: 0 0 1.1rem; }
.idx-intro-bar { flex: 0 0 4px; background: var(--index-quote-bar); border-radius: 2px; }

.idx-intro-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--index-muted);
}

.idx-toc-title {
  margin: 0 0 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--index-rule);
  font-size: 0.74rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--index-muted);
}

.idx-section { padding: 0.65rem 0; border-bottom: 1px solid var(--index-rule); }
.idx-section:last-of-type { border-bottom: none; }

.idx-country {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
  font-weight: bold;
  color: var(--index-country);
  text-decoration: none;
}

.idx-country:hover { text-decoration: underline; }

.idx-entries { display: flex; flex-direction: column; }

.idx-entry {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.28rem 0;
  font-size: 0.82rem;
  color: var(--source-link);
  text-decoration: none;
}

.idx-entry:hover .idx-name { text-decoration: underline; }
.idx-entry-off { color: var(--source-text); font-style: italic; }
.idx-name { flex: 1 1 auto; min-width: 0; }

.idx-count {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--source-text);
  white-space: nowrap;
}

/* ---- Pied ---- */

.edition-footer {
  margin-top: 2.5rem;
  padding: 0.6rem var(--gutter);
  border-top: 2px solid var(--footer-rule);
  font-size: 0.76rem;
  color: var(--footer-text);
  display: flex;
  gap: 1rem;
}

.footer-author { font-style: italic; }
.footer-compiled { margin-left: auto; color: var(--footer-rule); }

/* ---- Écran étroit ---- */

@media (max-width: 700px) {
  :root { --gutter: 0.85rem; }

  .brand-edition { display: none; }
  .brand-name { font-size: 0.78rem; }
  .country-bar { font-size: 0.82rem; }
  .cat-bar { font-size: 0.74rem; }
  .item-body { text-align: left; }
}
