/* =====================================================================
   bandeau.css  —  Bandeau promotionnel Hygiatex  (source unique de style)
   Structure HTML attendue (produite par includes/afficher_bandeau.php) :
     #bandeau-promo > .bp-nom + .bp-sep + .bp-slogan + .bp-badge
   Tout est scopé sous #bandeau-promo : aucun effet de bord sur le site.
   Charte : orange promo Hygiatex. Barre COMPACTE, une ligne, slogan
   pleine largeur (ajusté par le JS de fit-text dans afficher_bandeau.php).
   ===================================================================== */

#bandeau-promo {
  --bp-1: #ff7a3d;                 /* orange clair du dégradé        */
  --bp-2: #e8500c;                 /* orange profond du dégradé      */
  --bp-paper: #ffffff;             /* fond du badge                  */
  --bp-side: clamp(12px, 2.2vw, 26px);   /* "petite marge" gauche/droite */

  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;               /* UNE seule ligne sur desktop    */
  gap: clamp(8px, 1.1vw, 16px);
  padding: clamp(8px, 1vw, 12px) var(--bp-side);
  margin: 0;
  overflow: hidden;                /* contient le reflet             */
  background: linear-gradient(100deg, var(--bp-2) 0%, var(--bp-1) 50%, var(--bp-2) 100%);
  color: var(--bp-paper);
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.2;
  box-shadow: 0 2px 14px rgba(180, 60, 0, 0.28);
  z-index: 1000;
  -webkit-font-smoothing: antialiased;
}

/* Reflet qui balaie la barre : vivant, lent, discret */
#bandeau-promo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.22) 50%, transparent 62%);
  background-size: 260% 100%;
  background-repeat: no-repeat;
  animation: bp-shine 6.5s ease-in-out 1.2s infinite;
}
@keyframes bp-shine {
  0%        { background-position: 140% 0; }
  55%, 100% { background-position: -60% 0; }
}

/* NOM de l'opération — caractère par la graisse + le tracking, pas la taille */
#bandeau-promo .bp-nom {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* Séparateur vertical fin entre nom et slogan (retirable : supprimer ce bloc + le span) */
#bandeau-promo .bp-sep {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  min-height: 1.1em;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.45);
}

/* SLOGAN — occupe TOUT l'espace central ; police pilotée par le JS (fit-text).
   Le clamp ci-dessous = valeur de secours avant/pendant le calcul. */
#bandeau-promo .bp-slogan {
  flex: 1 1 auto;                  /* remplit la largeur dispo       */
  min-width: 0;                    /* autorise le rétrécissement     */
  margin: 0 clamp(6px, 1vw, 14px);
  text-align: center;
  white-space: nowrap;             /* requis pour le fit-text        */
  overflow: hidden;
  text-overflow: ellipsis;         /* filet si vraiment trop long    */
  font-weight: 500;
  opacity: 0.97;
  font-size: clamp(0.78rem, 1.5vw, 1.5rem);
}

/* BADGE réduction — le point focal (contraste de taille volontaire) */
#bandeau-promo .bp-badge {
  flex: 0 0 auto;
  white-space: nowrap;
  background: var(--bp-paper);
  color: var(--bp-2);
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  padding: 0.28em 0.85em;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(120, 40, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: bp-pulse 2.6s ease-in-out infinite;
  cursor: default;
}
#bandeau-promo .bp-badge:hover {
  transform: scale(1.08);
  animation: none;
  box-shadow: 0 5px 16px rgba(120, 40, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}
@keyframes bp-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}

/* ---- Repli mobile : on relâche la ligne unique pour rester lisible ---- */
@media (max-width: 640px) {
  #bandeau-promo { flex-wrap: wrap; gap: 6px 12px; }
  #bandeau-promo .bp-sep { display: none; }
  #bandeau-promo .bp-nom { flex: 1 1 100%; text-align: center; font-size: 0.92rem; }
  #bandeau-promo .bp-slogan {
    flex: 1 1 100%;
    white-space: normal;           /* le JS est neutralisé en mobile */
    max-width: 100%;
    text-align: center;
    font-size: 0.95rem !important; /* écrase la valeur posée par le JS */
    opacity: 0.94;
  }
  #bandeau-promo .bp-badge { margin: 0 auto; font-size: 1rem; }
}

/* ---- Accessibilité : aucun mouvement si l'OS le demande ---- */
@media (prefers-reduced-motion: reduce) {
  #bandeau-promo::after,
  #bandeau-promo .bp-badge { animation: none; }
  #bandeau-promo .bp-badge { transition: none; }
}