/* Spinner CSS */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top: 4px solid #4fa3f7; /* Couleur de l'indicateur */
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.glass-effect {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.03);
}

.gradient-bg {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}
.card-gradient-main{
    background: linear-gradient(to left, #B6014D 0%, #C1292D 100%);
}


.card-shadow {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gradient-text {
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 1rem);
}

@supports not (padding: env(safe-area-inset-bottom)) {
    .pb-safe {
        padding-bottom: 1rem;
    }
}

.w-18 {
    width: 4.5rem;
}
.h-18 {
    height: 4.5rem;
}

.perspective-1000 {
    perspective: 1000px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.hover-float:hover {
    animation: float 2s ease-in-out infinite;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hover-scale {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#carousel {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.card-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes modal-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-modal-up {
    animation: modal-up 0.3s ease-out;
}

.animate-modal-down {
    animation: modal-down 0.3s ease-out;
}

@keyframes modal-down {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Style de défilement personnalisé */
.modal-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) transparent;
}

.modal-scroll::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(99, 102, 241, 0.5);
    border-radius: 20px;
}

@keyframes modal-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-modal-down {
    animation: modal-down 0.3s ease-out forwards;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
@keyframes shimmer {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Optionnel: Effet de brillance qui traverse le skeleton */
.skeleton-shine {
    position: relative;
    overflow: hidden;
}

.skeleton-shine::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    animation: shimmer-wave 1.5s infinite;
}

@keyframes shimmer-wave {
    100% {
        transform: translateX(100%);
    }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    border-radius: 0.375rem;
}

.skeleton-image {
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
}

.skeleton-image::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmerEffect 1.5s infinite;
}
@keyframes shimmerEffect {
    100% {
        transform: translateX(100%);
    }
}

/* Product card hover effects */
.product-card {
    transition: transform 0.2s ease-out;
}

.product-card:hover {
    transform: translateY(-2px);
}

/* Filter button active state */
.filter-button.active {
    background-color: theme('colors.primary.DEFAULT');
    color: white;
}

/* Cart badge animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.cart-badge {
    animation: pulse 1s ease-in-out infinite;
}

/* Modal backdrop blur effect */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Responsive grid adjustments */
@media (min-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* RTL specific adjustments */
[dir="rtl"] .fa-arrow-right {
    transform: scaleX(-1);
}

[dir="rtl"] .right-4 {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .left-4 {
    left: auto;
    right: 1rem;
}

/* Styles pour les boutons de filtre */
.brand-filter-btn {
    @apply flex flex-col items-center gap-1.5 py-1 px-2 rounded-xl hover:bg-gray-50 transition-colors;
}

.brand-filter-btn.active {
    @apply bg-primary/5;
}

.brand-filter-btn.active span {
    @apply text-primary;
}

/* Animation du skeleton loader */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e0e0e0 50%, 
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Pour les éléments de texte */
.skeleton-text {
    height: 1em;
    border-radius: 4px;
}

/* Styles pour les boutons radio */
input[type="radio"] + div .rounded-full {
    transition: all 0.2s ease-in-out;
}

/* Animation du point intérieur */
input[type="radio"]:checked + div .rounded-full div {
    transform: scale(1);
}

input[type="radio"]:not(:checked) + div .rounded-full div {
    transform: scale(0);
}

/* Style hover */
label:hover input[type="radio"] + div .rounded-full {
    border-color: var(--primary-color);
}


/*Style pour les boutons du bas */
.bottom-tab.active i {
    color: #E31E24;
    transform: translateY(-2px);
}

.bottom-tab span {
    transition: all 0.3s ease;
}

.bottom-tab.active span {
    color: #E31E24;
}
 /* Styles pour l'indicateur */
 .bottom-tab.active .w-4 {
    opacity: 1;
}

/* Styles pour le carrousel des promotions */
.carousel-container {
    overflow: hidden;
    position: relative;
    padding: 0 1rem;
    direction: rtl;
}

#promoCarousel {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s ease-in-out;
    transform: translateX(296px);
    width: fit-content;
    direction: rtl;
}

#promoCarousel > div {
    min-width: 280px;
    flex: 0 0 auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
}

/* Empêcher le chevauchement pendant la transition */
#promoCarousel > div:not(:first-child) {
    margin-left: 1rem;
}

/* Ajuster la largeur totale pour éviter les sauts */
#promoCarousel {
    padding: 0.5rem;
}

#promoCarousel > div:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
}

#promoCarousel > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#promoCarousel > div:hover::before {
    opacity: 1;
}

/* Indicateurs */
[data-index] {
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-index].bg-woliz {
    transition: width 0.3s ease;
}

/* Boutons de navigation */
#prevPromo, #nextPromo {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#prevPromo:hover, #nextPromo:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Optimisations pour mobile */
@media (hover: none) {
    #promoCarousel {
        touch-action: pan-x;
    }
}

/* Support du mode sombre */
@media (prefers-color-scheme: dark) {
    #promoCarousel > div {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
}

/* Animation pour les badges */
.bg-white\/20 {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de brillance sur hover */
.group:hover .group-hover\:scale-105 {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        box-shadow: 0 0 5px rgba(255,255,255,0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255,255,255,0.4);
    }
    100% {
        box-shadow: 0 0 5px rgba(255,255,255,0.2);
    }
}

/* Animation de la barre de progression */
.bg-white.w-3\/4 {
    animation: growProgress 2s ease-out;
}

@keyframes growProgress {
    from {
        width: 0;
    }
    to {
        width: 75%;
    }
}

/* Styles uniformisés pour les cartes */
.promo-card {
    --card-height: 200px;
    height: var(--card-height);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Image de fond */
.promo-card .absolute.inset-0 img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
    filter: brightness(0.9);
}

.promo-card:hover .absolute.inset-0 img {
    transform: scale(1.1);
}

/* Overlay dégradé commun */
.promo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 1;
}

/* Styles des badges */
.badge-container {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
}

/* Styles des logos */
.logo-container img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

/* Contenu principal */
.promo-card .space-y-3 {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Effets de survol */
.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}

.promo-card:hover .logo-container img {
    transform: scale(1.1);
}

/* Variantes de couleurs pour les badges */
.promo-card[data-type="promo"] { --badge-color: #EF4444; }
.promo-card[data-type="news"] { --badge-color: #3B82F6; }
.promo-card[data-type="task"] { --badge-color: #8B5CF6; }
.promo-card[data-type="goal"] { --badge-color: #10B981; }

/* Responsive */
@media (max-width: 640px) {
    .promo-card {
        --card-height: 180px;
    }

    .promo-card h3 {
        font-size: 1rem;
    }

    .logo-container img {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.promo-card > * {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}