/* =========================================================
   Trading Evolution — popup vidéo « outils NinjaTrader gratuits » (pages outils : Fed Rate Monitor, COT data).
   Bas à droite, entrée animée, bordure tournante ; mène au guide vidéo d'installation de l'accueil (#formation).
   ========================================================= */
@property --te-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.te-pop {
  position: fixed; z-index: 70; inset-inline-end: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: min(340px, calc(100vw - 32px));
  border-radius: 18px; background: rgba(9, 13, 26, .94); color: #eef2fa; color-scheme: dark;
  border: 1px solid rgba(96, 165, 250, .22); box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(28px) scale(.94); transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.te-pop.is-in { opacity: 1; transform: none; animation: te-float 6s ease-in-out 1.2s infinite; }
.te-pop::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--te-a), transparent 0 62%, #3b82f6 74%, #22d3ee 84%, #ff4a12 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: te-spin 4.5s linear infinite; }
@keyframes te-spin { to { --te-a: 360deg; } }
@keyframes te-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.te-pop-link { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; padding-inline-end: 36px; color: inherit; text-decoration: none; }
.te-pop-media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
.te-pop-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.te-pop-badge { position: absolute; inset-inline-start: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: #ff4a12; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.te-pop-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.te-pop-body small { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #8fb4ff; }
.te-pop-body strong { font-family: var(--f-disp); font-size: 1.06rem; line-height: 1.2; color: #fff; }
.te-pop-body > span:not(.te-pop-cta) { font-size: 12.5px; line-height: 1.45; color: #b9c3d9; }
.te-pop-cta { align-self: flex-start; margin-top: 5px; padding: .45rem .9rem; border-radius: var(--r-full); background: linear-gradient(135deg, #2f6fe8 0%, #3b82f6 55%, #5aa2ff 100%); color: #fff; font-size: 12.5px; font-weight: 800; box-shadow: 0 8px 20px -6px rgba(59, 130, 246, .7); animation: te-cta 2.6s ease-in-out infinite; }
.te-pop-link:hover .te-pop-cta { filter: brightness(1.12); }
@keyframes te-cta { 0%, 100% { box-shadow: 0 8px 20px -6px rgba(59, 130, 246, .7), 0 0 0 0 rgba(59, 130, 246, .5); } 50% { box-shadow: 0 8px 20px -6px rgba(59, 130, 246, .7), 0 0 0 7px rgba(59, 130, 246, 0); } }
.te-pop-x { position: absolute; z-index: 2; top: 7px; inset-inline-end: 7px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .09); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.te-pop-x:hover { background: rgba(255, 255, 255, .18); }
.te-pop a:focus-visible, .te-pop-x:focus-visible { outline: 2px solid var(--blue-200); outline-offset: 2px; }
@media (max-width: 600px) {
  .te-pop { width: min(300px, calc(100vw - 24px)); inset-inline-end: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .te-pop-link { grid-template-columns: 74px minmax(0, 1fr); gap: 11px; padding: 10px; padding-inline-end: 32px; }
  .te-pop-body > span:not(.te-pop-cta) { font-size: 11.5px; }
  .te-pop-badge { inset-inline-start: 4px; bottom: 4px; padding: 2px 4px; font-size: 7.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .te-pop.is-in, .te-pop::before, .te-pop-cta { animation: none; }
  .te-pop { transition: none; }
}

/* Accueil (26/10/2026) : au-dessus de la barre NinjaTrader collante quand elle est visible */
body:has(.nt-sticky.show) .te-pop { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
