/* ============================================================
   INDICATEUR DE SCROLL - MODAL INFO PRODUIT
   AlloPieceDetachee.sn
   Design professionnel : chevron animé + dégradé
   ============================================================ */

/* Conteneur positionné en bas du modal-content */
.modal-scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

/* État visible */
.modal-scroll-indicator.show {
    pointer-events: auto;
    opacity: 1;
}

/* Dégradé de bas de page — de transparent vers blanc */
.modal-scroll-indicator::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.65) 35%,
        rgba(255, 255, 255, 0.92) 65%,
        rgba(255, 255, 255, 1) 100%
    );
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    pointer-events: none;
}

/* Bouton chevron centré */
.scroll-indicator-button {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 2px 10px rgba(59, 130, 246, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
    z-index: 21;
}

.scroll-indicator-button:hover {
    background: #f0f7ff;
    box-shadow:
        0 4px 18px rgba(59, 130, 246, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateX(-50%) translateY(-2px);
}

.scroll-indicator-button:active {
    transform: translateX(-50%) translateY(0px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

/* Chevron centré dans le bouton */
.scroll-indicator-button::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #3B82F6;
    border-bottom: 2px solid #3B82F6;
    transform: rotate(45deg) translateY(-2px);
    border-radius: 1px;
    flex-shrink: 0;
    margin: auto;
    position: relative;
    top: 3px;
    right: 1px;
}

/* Animation de rebond verticale — attire l'attention */
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    30%       { transform: translateX(-50%) translateY(5px); }
    60%       { transform: translateX(-50%) translateY(2px); }
}

.modal-scroll-indicator.show .scroll-indicator-button {
    animation: scrollBounce 1.8s ease-in-out infinite;
}

/* Stopper l'animation au survol pour le feedback immédiat */
.modal-scroll-indicator.show .scroll-indicator-button:hover {
    animation: none;
    transform: translateX(-50%) translateY(-2px);
}

/* Padding-bottom sur le modal-body pour éviter que le dernier contenu
   soit masqué par l'indicateur quand il est visible */
#productInfoModalBody {
    padding-bottom: 56px !important;
}

/* ── Responsive mobile : indicateur un peu plus compact ── */
@media (max-width: 768px) {
    .modal-scroll-indicator {
        height: 60px;
    }

    .scroll-indicator-button {
        width: 30px;
        height: 30px;
        bottom: 8px;
    }

    .scroll-indicator-button::after {
        width: 10px;
        height: 10px;
    }
}
