/* ==========================================================================
   TV Plus Afrique — monde « tableau d'affichage communal »
   Direction : une information = une notice épinglée, datée et sourcée.
   ========================================================================== */

:root {
  --paper: #f6f2e8;
  --paper-deep: #ece5d5;
  --ink: #0b1b3f;          /* bleu nuit — engagement explicite */
  --ink-soft: #2c3c60;
  --stamp: #c8362f;        /* rouge tampon : direct / alerte */
  --ochre: #c68a2e;        /* étiquettes de source */
  --rule: #d8d2c4;
  --reading: #18202f;
  --notice-shadow: 0 2px 10px rgba(11, 27, 63, .12);
}

/* --- Ground papier, mât et règles --- */
body {
  background: var(--paper);
  color: var(--reading);
}

.main_wrapper,
.content_article,
.block_une,
.block_fleuve,
.block.block_simple {
  background: var(--paper);
}

/* Le mât porte le monde : une bande ocre sous le bleu nuit. */
.main_header {
  box-shadow: 0 2px 0 var(--ochre);
}

.nav_primary {
  border-bottom: 1px solid var(--rule) !important;
}

/* --- Colonne de lecture : calme, mesure réelle --- */
#content_progress .content_body_wrapper {
  max-width: 74ch;
  margin-left: 0;
}

#content_progress p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.7rem !important;
  color: var(--reading);
}

/* Intertitres produits par l'éditeur : gras et bleu nuit (engagement). */
#content_progress span[style*="font-size: 18px"],
#content_progress span[style*="font-size:18px"],
#content_progress h2,
#content_progress h3,
#content_progress h4 {
  display: block;
  font-family: "Archivo Narrow", "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700 !important;
  font-size: 1.375rem !important;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
  margin: 1.25rem 0 0.45rem;
  padding: 0;
}

#content_progress p:has(> span[style*="font-size: 18px"]),
#content_progress p:has(> span[style*="font-size:18px"]) {
  margin: 1.25rem 0 0.45rem;
}

/* --- Notices épinglées --- */
.content_item,
.article,
.une_item {
  background: #fffdf7;
  border: 1px solid var(--rule);
  box-shadow: var(--notice-shadow);
  padding: 0.75rem 0.9rem 0.9rem;
  border-radius: 2px;
}

.content_item_time,
.content_live_time {
  display: inline-block;
  color: var(--stamp) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  opacity: 1 !important;
}

.content_item_title,
.title_une_item,
.subheading {
  color: var(--ink);
  font-weight: 700;
}

/* Pastille de source sur les items RSS. */
.item_chapo em {
  display: inline-block;
  font-style: normal;
  font-weight: 700;
  color: var(--ochre);
  background: var(--paper-deep);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  font-size: 0.8rem;
}

/* --- Fil 24/7 : rail horizontal qui avance par cran --- */
.news24_rail {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 0.4rem 0;
}

.news24_rail_label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.news24_rail_item {
  flex: 0 0 auto;
  width: 19rem;
  scroll-snap-align: start;
  padding: 0.5rem 1.25rem;
  border-right: 1px solid var(--rule);
}

.news24_rail_item time {
  display: block;
  color: var(--stamp);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.2;
}

.news24_rail_item a {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}

.news24_rail_item a:hover,
.news24_rail_item a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news24_rail_source {
  display: block;
  margin-top: 0.35rem;
  color: var(--ochre);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.2;
}

/* --- Browser surfaces : sélection, focus, barre de défilement --- */
::selection {
  background: var(--ochre);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--paper-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-soft);
  border-radius: 5px;
}

@media (max-width: 640px) {
  #content_progress .content_body_wrapper {
    max-width: 100%;
  }

  #content_progress span[style*="font-size: 18px"],
  #content_progress span[style*="font-size:18px"],
  #content_progress h2,
  #content_progress h3 {
    font-size: 1.25rem !important;
    margin-top: 1rem;
  }

  .content_item,
  .article,
  .une_item {
    padding: 0.6rem;
  }
}

/* ==========================================================================
   Accueil — le sujet dominant puis des notices rangees
   ========================================================================== */

.home_page .main_wrapper {
  padding-top: 0;
}

.home_page .block_une {
  margin-bottom: 2rem;
}

/* Sujet dominant : une seule notice occupe le premier regard. */
.home_page .une_item {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.home_page .title_une_item,
.home_page .une_caption .title_une_item {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Tout titre posé sur un bandeau bleu nuit reste blanc. */
.flag_article,
.block_simple_title,
.news24_rail_heading {
  color: #fff !important;
}

.home_page .item_chapo_une {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* En-tetes de rubriques : filet et titre encre, plus d'espace au-dessus. */
.home_page .block_header {
  border-bottom: 1px solid var(--rule);
  padding-top: 2.25rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.home_page .block_title {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.home_page .block_links a,
.home_page .block_links li a {
  color: var(--stamp);
  font-weight: 700;
}

/* Carrousels : rail de notices, pas un bloc publicitaire. */
.home_page .block_carousel,
.home_page .block_carousel_darker {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.home_page .block_carousel .block_title {
  color: var(--ink);
}

.home_page .block_carousel .carousel_item {
  background: #fffdf7;
  border: 1px solid var(--rule);
  box-shadow: var(--notice-shadow);
}

/* Blocs simples (A la une, News 24/7) : titre en bandeau d'encre. */
.home_page .block_simple_title {
  background: var(--ink) !important;
  color: #fff;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home_page .block_simple.block_news {
  border: 1px solid var(--rule);
  background: #fffdf7;
  box-shadow: var(--notice-shadow);
  padding: 0 0 1rem;
}

.home_page .list_news_wrapper {
  padding: 0 1rem;
}

.home_page .content_item_time {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
}

@media (max-width: 640px) {
  .home_page .block_header {
    padding-top: 1.5rem;
  }
}

/* ==========================================================================
   News 24/7 — le fil comme suite de notices horodatees
   ========================================================================== */

.content_live_block,
.rss_live_block {
  background: #fffdf7;
  border: 1px solid var(--rule);
  box-shadow: var(--notice-shadow);
  padding: 1rem 1.1rem !important;
  margin-bottom: 1rem;
}

.content_live .content_title {
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.content_live_block .subheading,
.content_live_block h2 {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.35;
}

.content_live_block .item_chapo {
  color: var(--reading);
  line-height: 1.6;
}

.content_live_block .content_live_datetime {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}

.content_live_block .content_live_time {
  font-size: 0.8rem;
}

.news24_rail_heading {
  background: var(--ink);
  color: #fff;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news24_rail .news24_rail_label {
  display: none;
}

/* Une seule occurrence du fil : le bandeau. Le bloc latéral est masqué. */
.home_page #block_news24_home {
  display: none !important;
}

/* Défilement continu lent du bandeau (voir le script dans index.php). */
.news24_rail {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.news24_rail:hover,
.news24_rail:focus-within {
  scroll-behavior: smooth;
}

/* La barre de lecture ne doit pas barrer tout l'écran. */
#progress_container,
#progress_bar {
  display: none !important;
}
