/* =====================================================
   USPSO — Banderole défilante « Merci à nos partenaires »
   Même banderole que l'écran Yodeck du club.
   Les logos viennent de l'intranet (Admin › Partenaires).
   ===================================================== */
.pdef {
  --pdef-orange: #C47A2C;
  --pdef-fond: #ffffff;
  --pdef-h: 150px;
  display: flex;
  align-items: stretch;
  width: 100%;
  background: var(--pdef-fond);
  overflow: hidden;
  border-top: 4px solid var(--pdef-orange);
}
.pdef[hidden] { display: none; }
.pdef__lbl {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 3vw, 48px);
  background: var(--pdef-orange);
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(18px, 1.9vw, 30px);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  box-shadow: 8px 0 18px -10px rgba(0,0,0,.35);
}
.pdef__piste {
  flex: 1;
  min-width: 0;
  height: var(--pdef-h);
  overflow: hidden;
  display: flex;
  align-items: center;
  /* fondu léger sur le bord droit */
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
          mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.pdef__ruban {
  display: flex;
  align-items: center;
  gap: clamp(40px, 5vw, 90px);
  padding-left: clamp(40px, 5vw, 90px);
  width: max-content;
  animation: pdef-defile var(--pdef-duree, 40s) linear infinite;
  will-change: transform;
}
.pdef:hover .pdef__ruban,
.pdef:focus-within .pdef__ruban { animation-play-state: paused; }
.pdef__logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--pdef-h) - 40px);
}
.pdef__logo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  transition: transform .25s ease;
}
a.pdef__logo:hover img,
a.pdef__logo:focus-visible img { transform: scale(1.06); }
a.pdef__logo:focus-visible { outline: 3px solid var(--pdef-orange); outline-offset: 6px; border-radius: 6px; }
@keyframes pdef-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Mobile : le titre passe au-dessus, la piste dessous */
@media (max-width: 720px) {
  .pdef { flex-direction: column; --pdef-h: 104px; }
  .pdef__lbl { padding: 12px 16px; font-size: 17px; box-shadow: none; }
  .pdef__logo img { max-width: 150px; }
}
/* Mouvement réduit demandé par le visiteur : pas d'animation, on fait glisser au doigt */
@media (prefers-reduced-motion: reduce) {
  .pdef__ruban { animation: none; }
  .pdef__piste { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* =====================================================
   Variante « sous le menu » (page d'accueil) : fine et
   collée sous la barre du haut, qui est en position fixe.
   ===================================================== */
.pdef--haut {
  --pdef-h: 76px;
  margin-top: var(--pdef-nav-h, 78px);   /* hauteur réelle du menu, mesurée par le script */
  border-top: 0;
  border-bottom: 3px solid var(--pdef-orange);
}
.pdef--haut .pdef__lbl {
  font-size: clamp(13px, 1.1vw, 17px);
  letter-spacing: .1em;
  padding: 0 clamp(16px, 2vw, 32px);
}
.pdef--haut .pdef__logo { height: calc(var(--pdef-h) - 16px); }
.pdef--haut .pdef__logo img { max-width: 170px; }
.pdef--haut .pdef__ruban { gap: clamp(32px, 4vw, 64px); padding-left: clamp(32px, 4vw, 64px); }
/* La banderole occupe déjà l'espace sous le menu : le titre remonte d'autant.
   Si la banderole est masquée (intranet injoignable), rien ne change. */
.pdef--haut:not([hidden]) + .hero-light { padding-top: 4.5rem; }
@media (max-width: 720px) {
  .pdef--haut { flex-direction: row; --pdef-h: 52px; }
  .pdef--haut .pdef__lbl { padding: 0 12px; font-size: 11px; letter-spacing: .06em; white-space: normal; text-align: center; line-height: 1.25; width: 92px; }
  .pdef--haut .pdef__logo img { max-width: 110px; }
  .pdef--haut:not([hidden]) + .hero-light { padding-top: 3rem; }
}
