/**
 * Ticker Bands - Version ULTRA PERFORMANCE 🚀
 * Optimisations GPU + Réduction repaints + Anti-lag
 */

/* ========================================
   CONTENEUR GLOBAL
   ======================================== */

   .ticker-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 80px 0;
    
    /* Force nouveau contexte de rendu isolé */
    transform: translateZ(0);
    will-change: auto;
    contain: layout style paint;
  }
  
  /* ========================================
     CONTENEUR INTERNE
     ======================================== */
  
  .ticker-inner {
    display: flex;
    width: 100%;
    height: 100%;
    
    /* Isolation GPU */
    transform: translateZ(0);
    will-change: transform;
  }
  
  /* ========================================
     BASE TICKER
     ======================================== */
  
  .ticker-wrapper {
    position: relative;
    width: 110%;
    height: 120px;
    margin-left: -5%;
    margin-top: 12px;
    margin-bottom: 12px;
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    overflow: hidden;
    display: flex;
    
    /* OPTIMISATIONS CRITIQUES GPU */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    contain: layout style paint;
    
    /* Anti-aliasing optimisé */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .ticker-content {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    height: 100%;
    flex-shrink: 0;
    
    /* PERFORMANCES MAXIMALES */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    
    /* Force composition GPU */
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
  }
  
  /* ========================================
     ITEMS & ICONS
     ======================================== */
  
  .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-right: 10px;
    font-family: 'bc-ludva', sans-serif !important;
    font-size: 96px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1;
    
    /* Optimisation rendu texte */
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Isolation GPU pour chaque item */
    transform: translateZ(0);
    contain: layout style paint;
  }

  .ticker-item--italic {
    font-style: italic;
  }
  
  .ticker-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    
    /* Optimisation images */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    will-change: auto;
  }
  
  /* ========================================
     ANIMATIONS - OPTIMISÉES GPU
     ======================================== */
  
  @keyframes scroll-left {
    0% { 
      transform: translate3d(0, 0, 0); 
    }
    100% { 
      transform: translate3d(-100%, 0, 0); 
    }
  }
  
  @keyframes scroll-right {
    0% { 
      transform: translate3d(-100%, 0, 0); 
    }
    100% { 
      transform: translate3d(0, 0, 0); 
    }
  }
  
  /* BANDEAU 1 - Rose (gauche, vitesse normale) */
  .ticker-wrapper--z1 .ticker-content {
    animation: scroll-left 35s linear infinite;
    animation-fill-mode: forwards;
    animation-play-state: running;
  }
  
  /* BANDEAU 2 - Blanc (droite, plus lent) */
  .ticker-wrapper--z3 .ticker-content {
    animation: scroll-right 40s linear infinite;
    animation-fill-mode: forwards;
    animation-play-state: running;
  }
  
  /* BANDEAU 3 - Orange (gauche, vitesse intermédiaire) */
  .ticker-wrapper--z2 .ticker-content {
    animation: scroll-left 37s linear infinite;
    animation-fill-mode: forwards;
    animation-play-state: running;
  }
  
  /* ========================================
     ANGLES - OPTIMISÉS GPU
     ======================================== */
  
  .ticker-wrapper--angle-5 {
    transform: rotate(-5deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-4 {
    transform: rotate(-4deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-3 {
    transform: rotate(1.5deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-2 {
    transform: rotate(1deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-minus-2 {
    transform: rotate(-1deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-minus-3 {
    transform: rotate(3deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-minus-4 {
    transform: rotate(-2deg) translateZ(0) !important;
  }
  
  .ticker-wrapper--angle-minus-5 {
    transform: rotate(-2.5deg) translateZ(0) !important;
  }
  
  /* ========================================
     THÈMES DE COULEURS
     ======================================== */
  
  .ticker-wrapper--pink {
    background: linear-gradient(135deg, #FFB3D9 0%, #FF85C0 100%);
  }
  .ticker-wrapper--pink .ticker-item {
    color: #1A1A1A;
  }
  
  .ticker-wrapper--white {
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  }
  .ticker-wrapper--white .ticker-item {
    color: #1A1A1A;
  }
  
  .ticker-wrapper--orange {
    background: linear-gradient(135deg, #FFB347 0%, #FF9520 100%);
  }
  .ticker-wrapper--orange .ticker-item {
    color: #1A1A1A;
  }
  
  .ticker-wrapper--green {
    background: linear-gradient(135deg, #00DF82 0%, #00DF82 100%);
  }
  .ticker-wrapper--green .ticker-item {
    color: #1A1A1A;
  }
  
  /* ========================================
     Z-INDEX
     ======================================== */
  
  .ticker-wrapper--z1 { z-index: 1; }
  .ticker-wrapper--z2 { z-index: 2; }
  .ticker-wrapper--z3 { z-index: 3; }
  
  /* ========================================
     RESPONSIVE - OPTIMISÉ MOBILE
     ======================================== */
  
  @media (max-width: 1024px) {
    .ticker-wrapper {
      height: 80px;
    }
  
    .ticker-item {
      font-size: 24px;
      padding: 20px 60px;
      gap: 20px;
    }
  
    .ticker-icon {
      width: 28px;
      height: 28px;
    }
    
    /* Ralentir légèrement pour économiser CPU */
    .ticker-wrapper--z1 .ticker-content {
      animation-duration: 38s;
    }
  
    .ticker-wrapper--z3 .ticker-content {
      animation-duration: 43s;
    }
  
    .ticker-wrapper--z2 .ticker-content {
      animation-duration: 40s;
    }
  }
  
  @media (max-width: 768px) {
    .ticker-section {
      padding: 30px 0;
    }
  
    .ticker-wrapper {
      height: 70px;
      margin-top: 8px;
      margin-bottom: 8px;
      border-top: 2px solid #000;
      border-bottom: 2px solid #000;
    }
  
    .ticker-item {
      font-size: 20px;
      padding: 18px 50px;
      gap: 18px;
    }
  
    .ticker-icon {
      width: 24px;
      height: 24px;
    }
  
    /* Angles réduits sur mobile */
    .ticker-wrapper--angle-5,
    .ticker-wrapper--angle-4 {
      transform: rotate(1.5deg) translateZ(0);
    }
  
    .ticker-wrapper--angle-minus-3,
    .ticker-wrapper--angle-minus-4 {
      transform: rotate(-1.5deg) translateZ(0);
    }
  
    /* Animations ralenties pour mobile (économie batterie) */
    .ticker-wrapper--z1 .ticker-content {
      animation-duration: 40s;
    }
  
    .ticker-wrapper--z3 .ticker-content {
      animation-duration: 45s;
    }
  
    .ticker-wrapper--z2 .ticker-content {
      animation-duration: 42s;
    }
  }
  
  @media (max-width: 480px) {
    .ticker-section {
      padding: 20px 0;
    }
  
    .ticker-wrapper {
      height: 60px;
      border-top: 1.5px solid #000;
      border-bottom: 1.5px solid #000;
    }
  
    .ticker-item {
      font-size: 16px;
      padding: 15px 40px;
      gap: 15px;
    }
  
    .ticker-icon {
      width: 20px;
      height: 20px;
    }
    
    /* Encore plus lent sur très petit écran */
    .ticker-wrapper--z1 .ticker-content {
      animation-duration: 45s;
    }
  
    .ticker-wrapper--z3 .ticker-content {
      animation-duration: 50s;
    }
  
    .ticker-wrapper--z2 .ticker-content {
      animation-duration: 47s;
    }
  }
  
  /* ========================================
     PERFORMANCES MAXIMALES
     ======================================== */
  
  /* Force toute l'isolation GPU */
  .ticker-content,
  .ticker-wrapper,
  .ticker-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
  }
  
  /* Désactive le repaint inutile */
  .ticker-wrapper::before,
  .ticker-wrapper::after {
    content: none;
  }
  
  /* ========================================
     ACCESSIBILITÉ - PAUSE ANIMATIONS
     ======================================== */
  
  @media (prefers-reduced-motion: reduce) {
    .ticker-content {
      animation: none !important;
    }
    
    .ticker-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scroll-behavior: smooth;
    }
    
    .ticker-content {
      width: auto;
    }
  }
  
  /* ========================================
     OPTIMISATION SCROLL PAGE
     ======================================== */
  
  /* Pause les animations quand hors de l'écran */
  @supports (animation-timeline: view()) {
    .ticker-content {
      animation-timeline: view();
      animation-range: entry 0% cover 100%;
    }
  }
  
  /* Fallback : Pause au scroll (optionnel - active si besoin) */
  /*
  .ticker-wrapper.out-of-view .ticker-content {
    animation-play-state: paused;
  }
  */
  


  /* Désactive les animations pendant le scroll */
.scrolling .ticker-content {
    animation-play-state: paused !important;
  }
  