/** TABLE **/
/* Le wrapper devient scrollable si le tableau dépasse */
.rts-table-wrap {
  width: 100%;
  overflow: visible;
}
/* Le scroll horizontal est ici */
.rts-table-scroll{
  overflow-x: auto;
  overflow-y: visible; /* important pour que sticky top continue de fonctionner */
  -webkit-overflow-scrolling: touch;
}
.rts-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  min-width: calc(var(--rts-col-min, 160px) * var(--rts-col-count, 1));
  table-layout: fixed;
}
.rts-table th,
.rts-table td {
  min-width: var(--rts-col-min, 160px);
}

.rts-table-wrap table thead {
    background-color: var(--e-global-color-primary);    
}
.rts-table thead th{
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: var(--e-global-color-primary); /* sinon transparence en sticky */
}
.rts-table-wrap table thead th{
  border: none;
  font-family: var(--e-global-typography-0211976-font-family), Sans-serif;
  font-size: var(--e-global-typography-0211976-font-size);
  font-weight: var(--e-global-typography-0211976-font-weight);
  letter-spacing: var(--e-global-typography-0211976-letter-spacing);
  color: var(--e-global-color-secondary);
  text-align: center;
      line-height: 1;
}
.rts-table-wrap table tbody td{
  border: none;
  background-color: transparent;
  text-align: center;
  position: relative;
}
.rts-table-wrap table tbody>tr:nth-child(odd)>td{
  background-color: #FFF;
}
.rts-table-wrap table tbody tr:hover>td, .rts-table-wrap table tbody tr:hover>th {
    background-color: initial;
}
.rts-table-wrap table tbody td:first-of-type{
  font-family: var(--e-global-typography-ee6c134-font-family), Sans-serif;
    font-size: var(--e-global-typography-ee6c134-font-size);
    font-weight: var(--e-global-typography-ee6c134-font-weight);
    line-height: var(--e-global-typography-ee6c134-line-height);
    letter-spacing: var(--e-global-typography-ee6c134-letter-spacing);
    color: var(--e-global-color-accent);
}
.rts-table-wrap table tbody tr:nth-child(2n)>td::before {
    background-color: var(--e-global-color-primary);
    --background-overlay: '';
    opacity: .08;
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}
.rts-table-wrap table i{
  font-size: 25px;
}

@media (max-width: 1024px) {
    .rts-table-wrap table thead th{
        font-size: var(--e-global-typography-0211976-font-size);
        letter-spacing: var(--e-global-typography-0211976-letter-spacing);
    }
}

/* Sticky block */
.rts-table-head{
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: hidden; /* cache le débordement horizontal du header cloné */
}

/* on translate ce bloc en JS */
.rts-table-head-inner{
  will-change: transform;
}

/* Scroll horizontal uniquement sur le contenu */
.rts-table-scroll{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* On cache le thead dans la table scrollable (on garde la structure pour accessibilité/largeurs) */
.rts-table-scroll thead{
  visibility: hidden;
}
.rts-table-scroll thead th{
  padding: 0 !important;
  border: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  background: transparent !important;
}

/* ton ancienne règle sticky sur th ne sert plus, on la neutralise dans le scroll */
.rts-table-scroll .rts-table thead th{
  position: static !important;
}

@media (max-width: 1024px) {
  /* nécessaire pour les pseudo-elements */
  .rts-table-scroll {
    position: relative;
  }

  /* FADES gauche/droite */
  .rts-table-scroll::before,
  .rts-table-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity .2s ease;
  }

  /* fade gauche */
  .rts-table-scroll::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0));
  }

  /* fade droite */
  /*.rts-table-scroll::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.95), rgba(255,255,255,0));
  }*/

  /* Activer fades uniquement si scrollable */
  .rts-table-wrap.rts-can-scroll-x:not(.rts-at-start) .rts-table-scroll::before {
    opacity: 1;
  }
  /*.rts-table-wrap.rts-can-scroll-x:not(.rts-at-end) .rts-table-scroll::after {
    opacity: 1;
  }*/

  /* Icône ↔ (sans texte) */
  .rts-table-wrap {
    position: relative;
  }

  @keyframes rts-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
  }
}
.rts-scroll-hint-fixed{
  display: none;
}

@media (max-width: 1024px) {
  /* Désactive l'ancienne icône inline si elle existe encore */
  .rts-table-wrap.rts-can-scroll-x.rts-show-hint::after {
    content: none !important;
  }

  /* Icône fixed (sticky au viewport) */
  .rts-scroll-hint-fixed {
    display: grid;    
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 9999;

    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;

    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;

    font-size: 18px;
    line-height: 1;

    pointer-events: none;

    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
  }

  .rts-scroll-hint-fixed.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: rts-nudge 1.1s ease-in-out infinite;
  }

  @keyframes rts-nudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
  }
}