/* RAFTELSHOP - Homepage CSS
 * Extracted from index.php for better SEO and performance
 * DO NOT MODIFY - This is auto-extracted CSS
 */

/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { 
    font-family: 'Inter', sans-serif; 
    background: #f5f5f5; 
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}
body {
    position: relative;
}

.homepage-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

.trending-section {
    margin: 20px auto;
    width: 100%;
    max-width: 1400px;
    padding-left: 20px !important;
    padding-right: 15px !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

.all-products-section {
    margin: 0 auto;
    width: 100%;
    max-width: 1400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    padding-left: 20px;
    padding-right: 15px;
    border-radius: 0;
    position: relative;
    box-sizing: border-box;
    overflow-x: hidden;
}

.deals-scroll-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Lightning scroll full-width pour correspondre à la navbar (1400px) */
.trending-section .deals-scroll-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    position: relative;
    /* Text-shadow statique (pas dans animation pour meilleure performance) */
    text-shadow: 0 0 10px rgba(30, 58, 138, 0.5),
                 0 0 20px rgba(59, 130, 246, 0.4),
                 0 0 30px rgba(59, 130, 246, 0.3);
    /* Animation optimisée GPU - uniquement opacity */
    animation: flash-glow 1.5s linear infinite;
}

/* Animation optimisée pour GPU - utilise uniquement opacity (composée) */
@keyframes flash-glow {
    0%, 100% {
        opacity: 0.85;
    }
    25%, 75% {
        opacity: 1;
    }
    50% {
        opacity: 0.95;
    }
}

/* Force GPU compositing pour section-title */
.section-title {
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive Breakpoints Améliorés */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1441px) {
    .homepage-content {
        max-width: 1600px !important;
    }
    
    .trending-section {
        max-width: 1600px !important;
    }
    
    .all-products-section,
    .products-for-you-section,
    .recommended-products-section {
        max-width: 1600px !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 15px;
    }
}

@media (min-width: 1921px) {
    .homepage-content {
        max-width: 1800px !important;
    }
    
    .trending-section {
        max-width: 1800px !important;
    }
    
    .all-products-section,
    .products-for-you-section,
    .recommended-products-section {
        max-width: 1800px !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 18px;
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    min-height: 240px;
    height: auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    will-change: transform; /* Optimisation GPU */
    backface-visibility: hidden; /* Améliore les performances de transition */
}

/* Conteneur d'image pour les cartes produits - GÉRÉ PAR section-cards.css */

/* Bannières publicitaires */
.ad-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: white;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ad-banner .ad-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.ad-banner .ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ad-banner .ad-desc {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 12px;
}

.ad-banner .ad-cta {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.ad-banner:hover .ad-cta {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Variantes de couleurs pour les bannières */
.ad-banner.orange {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.ad-banner.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.ad-banner.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.ad-banner.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-card:hover .product-name {
    color: #667eea;
}

.product-card:hover .product-price {
    color: #1e3a8a;
}

/* Optimisation: utiliser GPU pour animations */
@media (prefers-reduced-motion: no-preference) {
    .product-card {
        transform: translateZ(0);
    }
}

/* Styles d'images SUPPRIMÉS - gérés UNIQUEMENT par section-cards.css */

.product-info {
    padding: 4px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    min-height: 0;
    overflow: hidden;
}

/* Nom produit sur 2 LIGNES MAX - Alignement uniforme pour toutes les cartes - Espace vertical élargi */
.product-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    margin-bottom: 4px;
    padding-bottom: 0;
    border-bottom: none;
    line-height: 1.5;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    width: 100%;
    min-height: 2.8em;
    max-height: 2.8em;
    flex-shrink: 0;
    flex-grow: 0;
    transition: color 0.2s ease;
}

/* Alignement uniforme pour toutes les cartes - 2 lignes max */
.all-products-section .product-name,
.products-for-you-section .product-name,
.recommended-products-section .product-name,
.product-card .product-name,
.deal-card .product-name {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 2.8em !important;
    max-height: 2.8em !important;
    line-height: 1.5 !important;
    margin-bottom: 4px !important;
    border-bottom: none !important;
}

/* Support RTL pour les noms de produits (mêmes tailles que FR, juste alignement) */
[dir="rtl"] .product-name {
    text-align: right;
    direction: rtl;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e40af;
    margin: 0;
    margin-bottom: 6px;
    padding-bottom: 0;
    border-bottom: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
    height: 1.2em;
    flex-shrink: 0; /* Empêche le prix de rétrécir */
    flex-grow: 0; /* Empêche le prix de grandir */
    line-height: 1.4em; /* Aligne le texte verticalement */
    transition: color 0.2s ease;
}

/* Support RTL pour les prix */
[dir="rtl"] .product-price {
    text-align: right;
    direction: rtl;
}

.product-vendor {
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 1.3em;
    height: 1.3em;
    overflow: hidden;
    text-overflow: ellipsis; /* Affiche "..." si le nom est trop long */
    flex: 1; /* Prend l'espace disponible */
    flex-grow: 1; /* Permet au nom du vendeur de grandir */
    min-width: 0; /* CRITIQUE : Permet au text-overflow de fonctionner dans flex */
    max-width: 100%; /* Limite la largeur maximale */
    line-height: 1.3em; /* Aligne le texte verticalement */
}

/* Support RTL pour les noms de vendeurs */
[dir="rtl"] .product-vendor {
    text-align: right;
    direction: rtl;
}

.product-vendor:hover {
    color: #374151;
    text-decoration: underline;
}

.vendor-rating {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    font-size: 0.65rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}

.vendor-rating-stars {
    display: flex !important;
    gap: 1px !important;
    color: #fbbf24 !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

.vendor-rating-stars .fa-star,
.vendor-rating-stars i {
    font-size: 0.65rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    color: #fbbf24 !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    position: relative !important;
    z-index: 10 !important;
    transition: transform 0.2s ease !important;
}

.vendor-rating-stars .fa-star.empty,
.vendor-rating-stars i.empty {
    color: #e5e7eb !important;
}

.vendor-rating-value {
    color: #4b5563 !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 10 !important;
    margin-left: 2px !important;
}

.vendor-rating:hover .vendor-rating-stars i {
    transform: scale(1.1) !important;
}

/* FORCER VISIBILITÉ DES ÉTOILES - PRIORITÉ MAXIMALE */
.product-card .vendor-rating,
.deal-card .vendor-rating {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.product-card .vendor-rating-stars,
.deal-card .vendor-rating-stars {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.product-card .vendor-rating-stars i,
.deal-card .vendor-rating-stars i,
.product-card .vendor-rating-stars .fa-star,
.deal-card .vendor-rating-stars .fa-star {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #fbbf24 !important;
}

/* Boutons actions produits - Style Navbar (ronds) */
.product-wishlist-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 2px solid #ef4444 !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    z-index: 100 !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.product-wishlist-btn i {
    transition: all 0.3s ease !important;
    font-size: 0.95rem !important;
    color: #ffffff !important;
}

.product-wishlist-btn:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: scale(1.2) rotate(-5deg) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.6) !important;
}

.product-wishlist-btn:hover i {
    transform: scale(1.15) !important;
    color: #ffffff !important;
}

.product-wishlist-btn.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.product-wishlist-btn.active i {
    color: #ffffff !important;
}

.product-cart-btn {
    flex: 1 !important;
    width: 100% !important;
    height: 36px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 2px solid rgba(30, 64, 175, 0.3) !important;
    background: rgba(30, 64, 175, 0.1) !important;
    color: #1e40af !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.product-cart-btn i {
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
    color: #1e40af !important;
}

.product-cart-btn span {
    color: #1e40af !important;
    font-weight: 600 !important;
}

.product-cart-btn:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4) !important;
}

.product-cart-btn:hover i,
.product-cart-btn:hover span {
    color: white !important;
    transform: scale(1.05) !important;
}

.product-wishlist-btn-text {
    flex: 1 !important;
    width: 100% !important;
    height: 36px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 2px solid rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    margin: 0 !important;
    padding: 0 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.product-wishlist-btn-text i {
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
    color: #ef4444 !important;
}

.product-wishlist-btn-text span {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

.product-wishlist-btn-text:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

.product-wishlist-btn-text:hover i,
.product-wishlist-btn-text:hover span {
    color: white !important;
    transform: scale(1.05) !important;
}

.product-wishlist-btn-text.active {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

.product-wishlist-btn-text.active i,
.product-wishlist-btn-text.active span {
    color: white !important;
}

.deals-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding: 10px 20px;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Masquer la scrollbar pour un défilement invisible */
.deals-scroll::-webkit-scrollbar {
    display: none;
}

.deal-card {
    min-width: 160px;
    max-width: 160px;
    width: 160px;
    height: 300px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-grow: 0;
    cursor: pointer;
    position: relative;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.deal-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    gap: 3px;
}

.deal-badge i {
    font-size: 0.7rem;
    animation: pulse-bolt 2s ease-in-out infinite;
}

@keyframes pulse-bolt {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.deal-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease;
    display: block !important;
    background: #ffffff !important;
}

.deal-card:hover .deal-image {
    transform: scale(1.05);
}

.deal-info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

/* Réduire l'espace après la navbar */
.scrolling-banner {
    margin-top: 0 !important;
}

/* Deal card styles (améliorés) */
.deal-product-name {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    height: 2.6em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
}

.deal-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.deal-price {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #10b981 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.deal-original-price {
    font-size: 0.75rem !important;
    color: #ef4444 !important;
    text-decoration: line-through !important;
    font-weight: 600 !important;
}

.deal-vendor-rating {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: auto !important;
    padding-top: 4px !important;
    border-top: 1px solid #e5e7eb !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
}

.deal-vendor-rating:hover {
    opacity: 0.8 !important;
}

.deal-rating-stars {
    display: flex !important;
    gap: 1px !important;
    color: #fbbf24 !important;
}

.deal-rating-stars i {
    font-size: 0.7rem !important;
}

.deal-rating-stars i.empty {
    color: #e5e7eb !important;
}

.deal-rating-value {
    font-size: 0.7rem !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    margin-left: 2px !important;
}

/* Section Produits pour Vous (Pastèque) */
.products-for-you-section {
    margin: 0 auto;
    width: 100%;
    max-width: 1400px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4757 100%);
    padding: 40px 0;
    padding-left: 20px;
    padding-right: 15px;
    border-radius: 0;
    position: relative;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Section Produits Recommandés (Vert) */
.recommended-products-section {
    margin: 0 auto;
    width: 100%;
    max-width: 1400px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 40px 0;
    padding-left: 20px;
    padding-right: 15px;
    border-radius: 0;
    position: relative;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Bouton Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    border: none;
    outline: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-3px) scale(1.05);
}

/* Responsive scroll to top */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}

/* Scroll text animation optimisée pour GPU */
@keyframes scroll-text {
    0% { 
        transform: translateX(0) translateZ(0);
    }
    100% { 
        transform: translateX(-50%) translateZ(0);
    }
}

/* Newsletter animations */
/* Animation optimisée pour GPU */
@keyframes float-bg {
    0% { 
        transform: translate(0, 0) translateZ(0);
    }
    100% { 
        transform: translate(50px, 50px) translateZ(0);
    }
}

/* Animation optimisée pour GPU - utilise uniquement transform */
@keyframes bounce-letter {
    0%, 100% { 
        transform: translateY(0) translateZ(0);
    }
    25%, 75% { 
        transform: translateY(-8px) translateZ(0);
    }
}

/* Force GPU compositing pour lettres animées */
.letter-n, .letter-e, .letter-w, .letter-s, .letter-l, 
.letter-e2, .letter-t, .letter-t2, .letter-e3, .letter-r {
    will-change: transform;
    backface-visibility: hidden;
}

/* Animation optimisée pour GPU */
@keyframes pulse-emoji {
    0%, 100% { 
        transform: scale(1) translateZ(0);
    }
    50% { 
        transform: scale(1.2) translateZ(0);
    }
}

.newsletter-logo {
    will-change: transform;
    backface-visibility: hidden;
}

.newsletter-logo {
    display: inline-block;
    animation: pulse-emoji 2s ease-in-out infinite;
    margin-right: 8px;
    font-size: 2rem;
}

.letter-n { animation: bounce-letter 1.5s ease-in-out infinite 0.1s; }
.letter-e { animation: bounce-letter 1.5s ease-in-out infinite 0.2s; }
.letter-w { animation: bounce-letter 1.5s ease-in-out infinite 0.3s; }
.letter-s { animation: bounce-letter 1.5s ease-in-out infinite 0.4s; }
.letter-l { animation: bounce-letter 1.5s ease-in-out infinite 0.5s; }
.letter-e2 { animation: bounce-letter 1.5s ease-in-out infinite 0.6s; }
.letter-t { animation: bounce-letter 1.5s ease-in-out infinite 0.7s; }
.letter-t2 { animation: bounce-letter 1.5s ease-in-out infinite 0.8s; }
.letter-e3 { animation: bounce-letter 1.5s ease-in-out infinite 0.9s; }
.letter-r { animation: bounce-letter 1.5s ease-in-out infinite 1s; }

@media (max-width: 768px) {
    .newsletter-section { padding: 30px 15px !important; }
    .newsletter-title { font-size: 1.6rem !important; }
    .newsletter-btn { padding: 14px 20px !important; font-size: 0.9rem !important; }
}

/* Nouveautés animations - optimisée GPU */
@keyframes scroll-horizontal {
    0% { 
        transform: translateX(0) translateZ(0);
    }
    100% { 
        transform: translateX(-50%) translateZ(0);
    }
}

/* Force GPU compositing pour scroll animations */
.scrolling-text,
.nouveautes-scroll-track {
    will-change: transform;
    backface-visibility: hidden;
}

/* Animation optimisée pour GPU - rotation simplifiée */
@keyframes sparkle-rotate {
    0% { 
        transform: rotate(0deg) translateZ(0);
    }
    100% { 
        transform: rotate(360deg) translateZ(0);
    }
}

/* Animation optimisée pour GPU - utilise transform et opacity */
@keyframes pulse-badge {
    0%, 100% { 
        transform: scale(1) translateZ(0);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05) translateZ(0);
        opacity: 0.95;
    }
}

.nouveautes-section:hover .nouveautes-scroll-track {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .nouveau-product-card { min-width: 180px !important; max-width: 180px !important; }
    .nouveautes-scroll-track { gap: 15px !important; }
}

/* Vendor CTA animations */
/* Animation optimisée pour GPU */
@keyframes float-bg-vendor {
    0% { 
        transform: translate(0, 0) translateZ(0);
    }
    100% { 
        transform: translate(80px, 80px) translateZ(0);
    }
}

/* Animation optimisée pour GPU */
@keyframes bounce-vendor-icon {
    0%, 100% { 
        transform: translateY(0) scale(1) translateZ(0);
    }
    50% { 
        transform: translateY(-10px) scale(1.1) translateZ(0);
    }
}

/* Animation optimisée pour GPU */
@keyframes bounce-letter-vendor {
    0%, 100% { 
        transform: translateY(0) translateZ(0);
    }
    25%, 75% { 
        transform: translateY(-6px) translateZ(0);
    }
}

/* Force GPU compositing pour lettres vendor */
.letter-d, .letter-e, .letter-v, .letter-e2, .letter-n, .letter-i, 
.letter-r, .letter-v2, .letter-e3, .letter-n2, .letter-d2, 
.letter-e4, .letter-u, .letter-r2 {
    will-change: transform;
    backface-visibility: hidden;
}

.letter-d { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.1s; }
.letter-e { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.2s; }
.letter-v { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.3s; }
.letter-e2 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.4s; }
.letter-n { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.5s; }
.letter-i { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.6s; }
.letter-r { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.7s; }
.letter-v2 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.8s; }
.letter-e3 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 0.9s; }
.letter-n2 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 1s; }
.letter-d2 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 1.1s; }
.letter-e4 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 1.2s; }
.letter-u { animation: bounce-letter-vendor 1.8s ease-in-out infinite 1.3s; }
.letter-r2 { animation: bounce-letter-vendor 1.8s ease-in-out infinite 1.4s; }

@media (max-width: 768px) {
    .vendor-cta-section { padding: 24px 15px !important; }
    .vendor-cta-title { font-size: 1.4rem !important; }
    .vendor-cta-btn-primary, .vendor-cta-btn-secondary { padding: 12px 20px !important; font-size: 0.9rem !important; }
}

/* Stats section animations */
/* Animation optimisée pour GPU */
@keyframes float-bg-stats {
    0% { 
        transform: translate(0, 0) translateZ(0);
    }
    100% { 
        transform: translate(60px, 60px) translateZ(0);
    }
}

/* Animation optimisée pour GPU */
@keyframes pulse-icon {
    0%, 100% { 
        transform: scale(1) translateZ(0);
    }
    50% { 
        transform: scale(1.1) translateZ(0);
    }
}

.stat-item-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255,255,255,0.25) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@media (max-width: 1024px) {
    .stats-section > div > div {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .stats-section > div > div {
        grid-template-columns: 1fr !important;
    }
    .stat-number { font-size: 1.5rem !important; }
    .stat-icon { font-size: 1.8rem !important; }
}

/* Footer margin fix */
.homepage-content + footer,
footer:first-of-type {
    margin-top: 0 !important;
}

/* Supprimer margin-top du footer sur index.php */
body > footer {
    margin-top: 0 !important;
}

