#assistant {
    position: absolute;
    opacity: 0;
    width: 100%;
    top: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* === CONTAINER DE LA BARRE === */
#assistant-bar {
  z-index: 99999;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: pointer;
  pointer-events: auto;
  overflow: visible;
  color: rgb(180, 220, 255); /* utilisé par currentColor dans les drop-shadow */
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* apparition comme avant, contrôlée par ta classe existante */
#assistant-bar.assistant-bar-visible {
  opacity: 1;
  transform: translateY(0);
}

/* état "animée" après quelques secondes (classe ajoutée en JS) */
#assistant-bar.mtl-active {
  /* la hauteur est gérée par les calques, pas besoin de changer le container */
}

/* === BACKDROP sombre === */
#assistant-bar .mtl-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0.3),
    transparent
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#assistant-bar.mtl-active .mtl-backdrop {
  height: 30px;
}

#assistant-bar.mtl-active:hover .mtl-backdrop {
  height: 50px;
}

/* === Couche de base (gradient principal) === */
#assistant-bar .mtl-base {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  opacity: 0.9;
  background-image: linear-gradient(
    90deg,
    rgb(150, 200, 255),
    rgb(200, 150, 255),
    rgb(150, 200, 255)
  );
  background-size: 200% 100%;
  filter: blur(10px)
    drop-shadow(0 0 10px currentColor)
    drop-shadow(0 0 16px currentColor);
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  mix-blend-mode: screen;
  transition:
    height 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#assistant-bar.mtl-active .mtl-base {
  height: 25px;
  animation: mtl-bar-slide 12s linear infinite;
}

#assistant-bar.mtl-active:hover .mtl-base {
  height: 40px;
  opacity: 1;
  background-image: linear-gradient(
    90deg,
    rgb(255, 50, 180),
    rgb(255, 240, 50),
    rgb(50, 255, 255),
    rgb(220, 50, 255),
    rgb(255, 50, 180)
  );
  filter: blur(25px)
    drop-shadow(0 0 20px currentColor)
    drop-shadow(0 0 35px currentColor);
  animation-duration: 6s;
}

/* === Glow additionnel === */
#assistant-bar .mtl-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  opacity: 0.6;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgb(150, 100, 220),
    transparent 35%
  );
  background-size: 150% 100%;
  mix-blend-mode: screen;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: blur(12px) drop-shadow(0 0 8px rgb(220, 120, 255));
  transition:
    height 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#assistant-bar.mtl-active .mtl-glow {
  height: 35px;
  opacity: 0.75;
  filter: blur(18px)
    drop-shadow(0 0 12px rgb(255, 50, 255));
}

#assistant-bar.mtl-active:hover .mtl-glow {
  height: 50px;
  opacity: 0.9;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgb(255, 50, 255),
    transparent 55%
  );
  filter: blur(30px)
    drop-shadow(0 0 18px rgb(255, 50, 255))
    drop-shadow(0 0 30px currentColor);
}

/* === Shimmer qui traverse === */
#assistant-bar .mtl-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  overflow: hidden;
  opacity: 0.3;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  transition:
    height 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s;
}

#assistant-bar.mtl-active .mtl-shimmer {
  height: 20px;
  opacity: 1;
}

#assistant-bar.mtl-active:hover .mtl-shimmer {
  height: 30px;
}

#assistant-bar .mtl-shimmer-inner {
  width: 50%;
  height: 100%;
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, 1))
    drop-shadow(0 0 15px rgba(255, 255, 255, 1));
  transform: translateX(-100%);
  animation: mtl-shimmer 5s linear infinite;
}

/* === Halo qui suit la souris (réutilise ton #cursor-el) === */
#cursor-el {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;   /* large halo, le JS gère la position */
  height: 100px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at center top,
    rgb(255, 0, 200) 0%,
    rgb(255, 255, 0) 15%,
    rgb(0, 255, 255) 30%,
    rgb(200, 0, 255) 45%,
    transparent 65%
  );
  filter: blur(35px)
    drop-shadow(0 0 20px rgb(255, 0, 200))
    drop-shadow(0 0 30px rgb(0, 255, 255))
    drop-shadow(0 0 40px currentColor);
  mix-blend-mode: screen;
  mask-image: radial-gradient(
    ellipse 300px 100px at center top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 15%,
    rgba(0, 0, 0, 0.6) 35%,
    rgba(0, 0, 0, 0.3) 55%,
    rgba(0, 0, 0, 0) 75%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 300px 100px at center top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 15%,
    rgba(0, 0, 0, 0.6) 35%,
    rgba(0, 0, 0, 0.3) 55%,
    rgba(0, 0, 0, 0) 75%
  );
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#cursor-el.cursor-visible {
  opacity: 1;
}

/* === Animations === */
@keyframes mtl-bar-slide {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes mtl-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}


#assistant-bar:hover #bar {
    transform: scaleY(1.6) scaleX(1.5);

}
#assistant-bar.assistant-bar-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#assistant.assistant-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#assistant-bar:hover {
    cursor: pointer;
}






#assistant-panel {
    display: flex;
    /* ➕ */
    flex-direction: column;
    background: linear-gradient(to bottom, #0F1419 0%, #080B0F 50%, #030507 100%);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 24px 24px 0px 24px;
    z-index: 9999999;
    width: 100%;
    border-radius: 30px;
    height: 250px;
    overflow: hidden;
}


.wrapper-panel {
    width: 400px;
    position: absolute;
    right: 45px;
    top: 80px;
    padding: 2px;
    background: linear-gradient(135deg, #86C6FF 0%, #B8A7FF 100%) !important;
    border-radius: 30px;
}

.hidden {
    display: none;
}




#assistant-panel #content {
    z-index: 1;
    /* height: 100%;  ❌ à enlever */
    flex: 1 1 auto;
    /* ➕ prend tout l’espace disponible */
    min-height: 0;
    /* ➕ important pour que le scroll marche en flex */
    display: flex;
    flex-flow: column nowrap;
    overflow-y: auto;
    /* scroll interne */
    scrollbar-width: none;
    gap: 30px;
    padding-bottom: 24px;
    color: #fff;
    overscroll-behavior: contain;
}

.scoll-indicator {
    flex-shrink: 0;
    /* ➕ reste à sa taille, toujours en bas */
}


/* Conteneur de la barre de progression */
#scrollProgress {
    width: 100%;
    height: 2px;
    border-radius: 50%;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.2s ease-out;
}

/* Barre qui se remplit */
#scrollProgressBar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg,
            rgba(8, 30, 60, 1) 0%,
            rgba(75, 44, 138, 1) 20%,
            rgba(64, 194, 185, 1) 50%,
            rgba(75, 44, 138, 1) 80%,
            rgba(8, 30, 60, 1) 100%);
}

#scrollInvite {
    display: flex;
    justify-content: center;
    font-size: 12px;
    color: #888888;
    pointer-events: none;

    opacity: 0;
    /* caché par défaut */
    transition: opacity 0.25s ease;
    /* petit fade-in sympa */
}

#scrollInvite span {
    color: white;
}


#scrollLight {
    z-index: 4;
    position: absolute;
    width: 250px;
    height: 80px;
    filter: blur(30px);
    background-color: #ffffff50;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-30%);
    border-radius: 100%;
}

#assistant-panel #chat-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 20px 20px 20px 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: end;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

#chat-bar #chat-box {
    width: 100%;
    width: 40px;
    height: 40px;
    background-color: #131720;
    border: 1px solid #29384b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 4px;
    box-sizing: border-box;
    transition: width 0.3s ease;
    pointer-events: auto;
}

#chat-bar #chat-box #chat-text-input {
    height: 100%;
    flex-grow: 1;
    display: none;
    margin-right: 8px;
    align-items: center;
    justify-content: start;
    padding-left: 8px;
    color: #ffffff80;
    background-color: transparent;
    border: none;
    outline: none;
}

#chat-bar #icon {
    height: 100%;
    aspect-ratio: 1 / 1;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

#icon img {
    width: 100%;
    height: 100%;
    padding: 6px;
    box-sizing: border-box;
    filter: brightness(0) saturate(100%) invert(94%) sepia(1%) saturate(566%) hue-rotate(293deg) brightness(111%) contrast(100%);
}

#assistant-panel #border {
    z-index: 0;
    background: #41d6e0;
    background: linear-gradient(130deg, rgb(100, 155, 223) 0%, rgb(142, 108, 149) 100%);
    position: absolute;
    inset: 0;
    border-radius: 30px;
}

.hidden {
    display: none;
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.translate-y-5 {
    transform: translateY(20px);
}

.translate-y-0 {
    transform: translateY(0);
}