/* ==========================================================================
   Bandeau « Demandes de la communauté » — bandeau fixe bas de fenêtre
   Tout est préfixé .lec-ticker pour éviter toute collision.
   ========================================================================== */

.lec-ticker {
  --lec-gap: 12px;
  --lec-accent: #C08A3E;
  --lec-height: 64px;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;

  background: rgba(34, 48, 61, .97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(192, 138, 62, .35);
  font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
}

.lec-ticker[hidden] {
  display: none;
}

/* Décale le bas de page pour que le bandeau ne masque rien */
body.lec-ticker-visible {
  padding-bottom: 64px;
}

.lec-ticker__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  min-height: var(--lec-height);
  box-sizing: border-box;
}

/* --- Label ---------------------------------------------------------------- */

.lec-ticker__label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #E4D9C6;
  white-space: nowrap;
}

.lec-ticker__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lec-accent);
  box-shadow: 0 0 0 4px rgba(192, 138, 62, .2);
  flex: 0 0 auto;
}

/* --- Piste défilante ------------------------------------------------------ */

.lec-ticker__viewport {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.lec-ticker__track {
  display: flex;
  align-items: center;
  gap: var(--lec-gap);
  width: max-content;
  will-change: transform;
  animation: lec-ticker-scroll 46s linear infinite;
}

/* La liste est dupliquée x2 : on translate d'exactement la moitié de la piste,
   demi-gap compris, sinon une couture apparaît à chaque boucle. */
@keyframes lec-ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-50% - var(--lec-gap) / 2), 0, 0); }
}

.lec-ticker__viewport:hover .lec-ticker__track,
.lec-ticker__track:focus-within {
  animation-play-state: paused;
}

/* --- Carte ---------------------------------------------------------------- */

.lec-ticker__card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 8px 14px 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}

.lec-ticker__card:hover,
.lec-ticker__card:focus-visible {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(192, 138, 62, .45);
}

.lec-ticker__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(192, 138, 62, .25);
  color: #E8C58A;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 12px;
  letter-spacing: .04em;
}

.lec-ticker__texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lec-ticker__title {
  font-size: 12.5px;
  font-weight: 500;
  color: #F4EFE6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lec-ticker__meta {
  font-size: 10.5px;
  color: #9DAAB6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Actions -------------------------------------------------------------- */

.lec-ticker__cta {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--lec-accent);
  color: #22303d;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.lec-ticker__cta:hover,
.lec-ticker__cta:focus-visible {
  background: #d29b4c;
}

.lec-ticker__cta-arrow {
  display: none;
}

.lec-ticker__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9DAAB6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lec-ticker__close:hover,
.lec-ticker__close:focus-visible {
  background: rgba(255, 255, 255, .08);
  color: #F4EFE6;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 899px) {
  .lec-ticker {
    --lec-height: 56px;
  }

  body.lec-ticker-visible {
    padding-bottom: 56px;
  }

  .lec-ticker__label,
  .lec-ticker__cta-full {
    display: none;
  }

  .lec-ticker__cta {
    padding: 6px 10px;
  }

  .lec-ticker__cta-arrow {
    display: block;
    font-size: 14px;
    line-height: 1;
  }

  .lec-ticker__title,
  .lec-ticker__meta {
    max-width: 260px;
  }
}

@media (max-width: 559px) {
  .lec-ticker__inner {
    gap: 10px;
    padding: 10px 14px;
  }

  .lec-ticker__title {
    font-size: 11.5px;
  }

  .lec-ticker__meta {
    font-size: 9.5px;
  }

  .lec-ticker__title,
  .lec-ticker__meta {
    max-width: 200px;
  }
}

/* --- Mouvement réduit ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .lec-ticker__viewport {
    overflow: visible;
  }

  .lec-ticker__track {
    animation: none;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .lec-ticker__card {
    scroll-snap-align: start;
    transition: none;
  }
}
