/* Bande « Flash Éco » : barre fixe en bas d'écran, fond vert institutionnel, accent orange. Gérée par js/eco-ticker.js. */
#ecoTicker.eco-ticker {
  --eco-t-h: 48px;
  --eco-t-safe: env(safe-area-inset-bottom, 0px);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
  box-sizing: border-box; height: calc(var(--eco-t-h) + var(--eco-t-safe)); padding-bottom: var(--eco-t-safe);
  display: flex; align-items: stretch; overflow: hidden;
  background: rgba(0, 42, 23, .94); color: #fff;
  border-top: 2px solid #ffa500;
  box-shadow: 0 -6px 22px rgba(0, 30, 15, .22);
  font-family: 'Open Sans', Arial, sans-serif;
}
@supports (backdrop-filter: blur(8px)) {
  #ecoTicker.eco-ticker { background: rgba(0, 42, 23, .88); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
}
#ecoTicker.eco-ticker.is-closed { display: none; }

#ecoTicker .eco-t-badge {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 18px 0 16px;
  background: #ffa500; color: #1a1a1a; font-family: Raleway, 'Open Sans', Arial, sans-serif;
  font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); padding-right: 26px;
}
#ecoTicker .eco-t-badge svg { width: 18px; height: 18px; flex: 0 0 auto; }

#ecoTicker .eco-t-view {
  position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 28px), transparent 100%);
}
#ecoTicker .eco-t-track { display: inline-flex; align-items: stretch; height: 100%; will-change: transform; }
#ecoTicker .eco-t-list { display: inline-flex; align-items: stretch; margin: 0; padding: 0; list-style: none; }
#ecoTicker .eco-t-list li { display: inline-flex; align-items: center; margin: 0; padding: 0; }
#ecoTicker .eco-t-list li::after { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin: 0 22px; border-radius: 50%; background: #ffa500; }
#ecoTicker .eco-t-list a {
  display: inline-flex; align-items: center; gap: 10px; height: 100%; color: #fff; text-decoration: none;
  font-size: 15px; line-height: 1.2; font-weight: 500;
}
#ecoTicker .eco-t-meta { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #ffc457; }
#ecoTicker .eco-t-list a:hover .eco-t-title, #ecoTicker .eco-t-list a:focus-visible .eco-t-title { text-decoration: underline; text-decoration-color: #ffa500; text-underline-offset: 3px; text-decoration-thickness: 2px; }
#ecoTicker .eco-t-list a:focus-visible { outline: 3px solid #ffa500; outline-offset: -3px; border-radius: 4px; }
#ecoTicker .eco-t-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#ecoTicker .eco-t-ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 8px 0 4px; }
#ecoTicker .eco-t-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .2s;
}
#ecoTicker .eco-t-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#ecoTicker .eco-t-btn:hover { background: rgba(255, 255, 255, .16); }
#ecoTicker .eco-t-btn:focus-visible { outline: 3px solid #ffa500; outline-offset: 1px; }
#ecoTicker .eco-t-play { display: none; }
#ecoTicker.is-user-paused .eco-t-play { display: inline; }
#ecoTicker.is-user-paused .eco-t-pause { display: none; }
#ecoTicker .eco-t-close { margin-left: 4px; }

/* mouvement réduit : liste statique, défilable à la main, sans animation ni bouton de pause */
#ecoTicker.is-static .eco-t-view { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
#ecoTicker.is-static .eco-t-view::-webkit-scrollbar { display: none; }
#ecoTicker.is-static .eco-t-list li { scroll-snap-align: start; }
#ecoTicker.is-static .eco-t-pausebtn { display: none; }

/* languette de réouverture (bande fermée) : coin bas gauche, hors des widgets flottants du côté droit */
.eco-t-reopen {
  position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 99999;
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; min-height: 44px; padding: 0 16px 0 12px; margin: 0;
  border: 2px solid #ffa500; border-radius: 22px; background: rgba(0, 42, 23, .94); color: #fff; cursor: pointer;
  font-family: Raleway, 'Open Sans', Arial, sans-serif; font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 30, 15, .28);
  animation: eco-t-reopen-in .45s cubic-bezier(.2, .8, .2, 1) both;
  transition: background .2s;
}
.eco-t-reopen[hidden] { display: none; }
.eco-t-reopen svg { width: 18px; height: 18px; flex: 0 0 auto; color: #ffa500; }
.eco-t-reopen:hover { background: #00381f; }
.eco-t-reopen:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #002a17; }
@keyframes eco-t-reopen-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .eco-t-reopen { animation: none; transition: none; } }
body.eco-ticker-closed footer#footer { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

/* flottants et pied de page : on réserve la hauteur de la barre */
body.eco-ticker-on footer#footer { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 768px) {
  body.eco-ticker-on #FIXEDSEAL2019HTTPCS { transform: translateY(-56px); }
}
@media (max-width: 767.98px) {
  #ecoTicker.eco-ticker { --eco-t-h: 44px; }
  #ecoTicker .eco-t-badge { gap: 6px; padding: 0 20px 0 12px; font-size: 13px; }
  #ecoTicker .eco-t-badge svg { width: 16px; height: 16px; }
  #ecoTicker .eco-t-list a { font-size: 14px; gap: 8px; }
  #ecoTicker .eco-t-meta { font-size: 12px; }
  #ecoTicker .eco-t-list li::after { margin: 0 16px; }
  #ecoTicker .eco-t-nav { display: none; }
  #ecoTicker .eco-t-ctrl { padding: 0 4px 0 0; }
  body.eco-ticker-on footer#footer { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  /* les boutons flottants remontent d'autant : aucun chevauchement avec la barre ni la zone de sécurité */
  body.eco-ticker-on #back-to-top { margin-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  /* l'extension d'accessibilité (positionnée en haut) et le badge HTTPCS (marge imposée en ligne) : propriété `translate` */
  body.eco-ticker-on .accessibility-widget,
  body.eco-ticker-on #FIXEDSEAL2019HTTPCS { translate: 0 calc(-44px - env(safe-area-inset-bottom, 0px)); }
}
@media print { #ecoTicker.eco-ticker, .eco-t-reopen { display: none; } }
