/* Custom Styles pour Quran Clone */

/* Set background on html root for Android / browser bottom navigation bas support */
html {
    background-color: #f9fafb;
}

html.dark {
    background-color: #111827;
}

/* Ajustements pour la police Arabe */
.font-arabic {
    font-family: "Noto Sans Arabic", sans-serif;
    line-height: 2.2;
    /* L'arabe nécessite un interligne plus grand pour les voyelles */
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Animations d'entrée */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation pour les grilles */
.stagger-1 {
    animation-delay: 50ms;
}

.stagger-2 {
    animation-delay: 100ms;
}

.stagger-3 {
    animation-delay: 150ms;
}

.stagger-4 {
    animation-delay: 200ms;
}

.stagger-5 {
    animation-delay: 250ms;
}

.stagger-6 {
    animation-delay: 300ms;
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Classe utilitaire pour tronquer sur plusieurs lignes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

}

/* Full-Screen Menu Animations */
#full-screen-menu.active {
    transform: translateX(0);
}

.menu-item-anim {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

#full-screen-menu.active .menu-item-anim {
    opacity: 1;
    transform: translateY(0);
}

/* Glass effect for menu items */
.menu-btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light .menu-btn-glass {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Voice Search Pulse Animation */
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#voice-search-btn.active {
    color: #ef4444 !important;
    animation: pulse-red 1.5s infinite;
}