#urgent-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: none;
  font-weight: bold;
  overflow: hidden;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  padding: 0px 0;
  height: 18px;
  will-change: opacity, transform;
  transform: translateZ(0); /* Force l'accélération matérielle */
  box-sizing: border-box; /* Inclut padding/border dans la hauteur */
  backface-visibility: hidden; /* Empêche les bugs de rendu 3D */
}

#urgent-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(192, 30, 30, 0.9);
  z-index: -1; /* Place le pseudo-élément derrière le contenu */
}

#urgent-banner * {
  line-height: 18px; /* aligne le texte sur la hauteur de la bannière */
}

#urgent-banner.visible {
  opacity: 1;
}

#urgent-message {
  white-space: nowrap;
  display: inline-block;
  padding-right: 30px;
  padding-bottom: 0px;
  padding-top: 1px;
  will-change: transform;
  transform: translateX(100%);
  font-size: 14px;        /* taille par défaut */
}

/* Adaptation selon la largeur de l’écran */
@media (max-width: 768px) {
  #urgent-banner {
    padding: 1px 0;
  }

  #urgent-message {
    font-size: 10px;      /* plus petit sur mobile */
  }
}

@media (max-width: 480px) {
  #urgent-message {
    font-size: 9px;       /* très petit sur smartphone */
  }
}

#urgent-vide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  overflow: hidden;
  z-index: 9999;
  display: flex;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  padding: 0px 0;
  height: 18px;
  will-change: opacity, transform;
  transform: translateZ(0); /* Force l'accélération matérielle */
  box-sizing: border-box; /* Inclut padding/border dans la hauteur */
  backface-visibility: hidden; /* Empêche les bugs de rendu 3D */
}