
.barre-bas {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.3rem 0.4rem calc(0.3rem + env(safe-area-inset-bottom));
  background: #0b0f23;
  box-shadow: 0 -6px 24px rgba(11, 15, 35, 0.18);
}
.barre-item {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #c8ccda;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.barre-item:hover,
.barre-item:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.06); }
.barre-item[aria-current="page"] { color: #3fd7c6; }
.barre-item:focus-visible { outline: 2px solid #3fd7c6; outline-offset: -2px; }
.barre-icone { position: relative; display: grid; }
.barre-icone svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.barre-pastille {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2407a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

body.avec-barre { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
body.avec-barre .fab { display: none; }
body.avec-barre .invite-pwa { bottom: calc(4.9rem + env(safe-area-inset-bottom)); }

body.avec-barre .ces-jours-ci { display: none !important; }

.nouvelles-fond {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 15, 35, 0.55);
}
.nouvelles-fond[hidden] { display: none; }
.nouvelles {
  position: relative;
  width: min(100%, 560px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--fond, #fff);
  color: var(--texte);
}
.nouvelles-fermer {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: var(--bordure);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
}
.nouvelles-titre { margin: 0 2.5rem 0.2rem 0; font-size: 1.35rem; font-weight: 900; }
.nouvelles-sous { margin: 0 0 0.8rem; font-size: 0.88rem; color: var(--texte-doux); }
.nouvelles-liste { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.nouvelle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--texte);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nouvelles-liste > li:not(.nouvelles-vide),
.rangee-nouvelles-liste > li {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--bordure);
  border-radius: 14px;
  background: var(--carte);
}
.nouvelles-liste > li:has(.nouvelle:hover),
.rangee-nouvelles-liste > li:has(.nouvelle:hover) { border-color: var(--accent); }
.nouvelle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nouvelle-anneau {
  flex: 0 0 46px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 2.5px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #6e4cff, #a78bfa, #3fd7c6, #6e4cff);
}
.nouvelle-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--carte);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  object-fit: cover;
}
.nouvelle-texte { display: grid; gap: 0.1rem; min-width: 0; }
.nouvelle-haut { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.5rem; align-items: baseline; }
.nouvelle-haut strong { font-size: 0.95rem; font-weight: 900; }
.nouvelle-quand { flex: 0 0 auto; font-size: 0.75rem; font-weight: 800; color: var(--accent); }
.nouvelle-quoi { font-size: 0.88rem; line-height: 1.3; }
.nouvelles-vide { padding: 1rem; text-align: center; color: var(--texte-doux); }

.nouvelle-source {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 44px;
  margin: -0.55rem 0 0 calc(0.7rem + 46px + 0.75rem);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.nouvelle-source:hover { text-decoration: underline; }
.nouvelle-source:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.rangee-nouvelles { max-width: 780px; margin: 0.6rem auto 0; }
.rangee-nouvelles[hidden] { display: none; }
.rangee-nouvelles-titre { margin: 0 16px 0.4rem; font-size: 1rem; font-weight: 900; }
.rangee-nouvelles-liste {
  display: flex;
  gap: 0.6rem;
  margin: 0;
  padding: 0 16px 0.3rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rangee-nouvelles-liste::-webkit-scrollbar { display: none; }
.rangee-nouvelles-liste > li {
  flex: 0 0 min(82%, 300px);
  scroll-snap-align: start;
}
.rangee-nouvelles .nouvelle { flex: 1; align-items: flex-start; }

@media (hover: hover) and (pointer: fine) {
  .rangee-nouvelles-liste { cursor: grab; }
}
.rangee-nouvelles-liste.on-tire { cursor: grabbing; scroll-snap-type: none; user-select: none; }
