/* Bandeau "Infos" : carrousel d'annonces flottant a droite sur grands ecrans (>= 1280px),
   cache en dessous (mode jeu) ou inline (mode portail). Charge via proxy PHP (css-bandeau-infos.php)
   avec cache busting. Voir SHARED_PATH/bandeau-infos.php. */

/* Styles communs (toujours actifs, mobile/tablette inline + desktop flottant) */
.bandeau-infos-card {
  position: relative;
  padding: 16px 14px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  color: #cbd5e1;
  font-size: 0.78rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.bandeau-infos-header {
  position: absolute;
  top: -0.95em;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}
.bandeau-infos-badge {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  padding: 2px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  border-radius: 6px;
  white-space: nowrap;
}
.bandeau-infos-carousel {
  position: relative;
  display: grid;
  margin-top: 2px;
  overflow: hidden;
  /* hauteur auto = celle du message le plus grand (grid stretch + grid-area partagée) */
}
.bandeau-infos-msg {
  grid-area: 1 / 1;
  text-align: left;
  line-height: 1.5em;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.bandeau-infos-msg-visible { opacity: 1; transform: translateY(0); }
.bandeau-infos-msg-sortie  { opacity: 0; transform: translateY(-100%); }
.bandeau-infos-msg-entree  { opacity: 0; transform: translateY(100%); }
.bandeau-infos-msg a { color: #a78bfa; font-weight: 600; text-decoration: none; }
.bandeau-infos-msg a:hover { text-decoration: underline; }
.bandeau-infos-msg strong { color: #c4b5fd; }
.bandeau-infos-nav {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.5);
  background: rgba(15, 12, 35, 0.85);
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s, transform 0.15s;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bandeau-infos-nav:hover { opacity: 1; background: rgba(139, 92, 246, 0.5); }
.bandeau-infos-nav:active { transform: scale(0.9); }

/* Visibilite/positionnement du wrapper selon contexte */
.bandeau-infos-wrap { display: none; } /* mode jeu mobile/tablette = cache */
.bandeau-infos-wrap.bandeau-infos-inline {
  display: block;
  position: relative;
  width: 100%;
  margin: 16px 0;
  z-index: 1;
}
/* Mode jeu : passe en flottant a droite des 1280px.
   Centre dans la goutiere droite : #app fait 800px max et est centre,
   donc le milieu de la marge droite est a (100vw - 800px) / 4 du bord droit. */
@media (min-width: 1280px) {
  .bandeau-infos-wrap:not(.bandeau-infos-inline) {
    display: block;
    position: fixed;
    right: calc((100vw - 800px) / 4);
    top: 50%;
    transform: translate(50%, -50%);
    width: 220px;
    margin: 0;
    z-index: 100;
  }
}
/* Mode portail (inline) : reste dans le flux jusqu'a 1559px, flottant a partir de 1560px */
@media (min-width: 1560px) {
  .bandeau-infos-wrap.bandeau-infos-inline {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    margin: 0;
    z-index: 100;
  }
}
