/* Pull-to-Refresh Styles */
#pull-to-refresh-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
    z-index: 9999;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid #e5e7eb;
}

.pull-to-refresh-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
}

.pull-to-refresh-arrow {
    font-size: 2rem;
    color: #6b7280;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.3s ease;
    font-weight: bold;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pull-to-refresh-text {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.pull-to-refresh-spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #e5e7eb;
    border-top-color: #f97316;
    border-right-color: #fb923c;
    border-radius: 50%;
    animation: spinGradient 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    display: none;
    filter: drop-shadow(0 2px 4px rgba(249, 115, 22, 0.3));
}

.pull-to-refresh-checkmark {
    font-size: 2.5rem;
    color: #10b981;
    font-weight: bold;
    animation: checkmarkPopScale 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.4));
}

@keyframes spinGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes checkmarkPopScale {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    70% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(249, 115, 22, 0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #pull-to-refresh-container {
        background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .pull-to-refresh-arrow,
    .pull-to-refresh-text {
        color: #9ca3af;
    }
    
    .pull-to-refresh-spinner {
        border-color: #374151;
        border-top-color: #60a5fa;
    }
}

/* Empêcher le overscroll-behavior sur mobile pour éviter les conflits */
body {
    overscroll-behavior-y: contain;
}

/* Animation fluide pour le container */
#pull-to-refresh-container.refreshing {
    transition: height 0.3s ease, opacity 0.3s ease;
}

