/*
Theme Name: IPTV Pro
Description: Modern IPTV Theme with Tailwind CSS, Alpine.js and Poppins Font.
Version: 4.0.0
Author: 4Z3D-DEV
*/

/* Base Styles */
:root {
    --primary: #7C3AED;
    --secondary: #EC4899;
    --accent: #3B82F6;
}

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 2026 Design System */
.shadow-premium {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}
.shadow-premium-hover {
    box-shadow: 0 30px 60px rgba(124, 58, 237, 0.12);
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* WordPress Core Classes */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.wp-caption { max-width: 100%; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }

/* Carousel Styles */

/* Hero Posters Grid Background */
.hero-posters-grid {
    display: flex;
    gap: 2rem;
    width: max-content;
    padding: 2rem 0;
}

.poster-item {
    width: 300px; /* Agrandissement significatif */
    height: 450px;
    object-fit: cover;
    border-radius: 2rem;
    opacity: 0.5;
    transition: all 0.5s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.poster-item:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.poster-item:hover {
    opacity: 1;
}

@keyframes scroll-slow {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll-slow {
    animation: scroll-slow 60s linear infinite;
}

/* Platforms Carousel */
.platforms-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.platforms-carousel-wrapper::before,
.platforms-carousel-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.platforms-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #0f172a, transparent);
}

.platforms-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #0f172a, transparent);
}

.platforms-carousel {
    display: flex;
    align-items: center;
    gap: 6rem;
    width: max-content;
}

.platforms-carousel img {
    height: 500px !important; /* Taille encore plus grande pour un effet premium */
    width: auto !important;
    max-width: 250px !important;
    object-fit: contain !important;
    filter: grayscale(100%) brightness(200%);
    opacity: 0.6;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.platforms-carousel img:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll-infinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll-infinite {
    animation: scroll-infinite 25s linear infinite;
}

.platforms-carousel:hover {
    animation-play-state: paused;
}

/* Testimonials Carousel */
.testimonials-carousel-wrapper {
    position: relative;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease-out;
}

.testimonial-slide {
    min-width: 100%;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-posters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .platforms-carousel {
        gap: 2rem;
    }
    
    .testimonial-slide .grid {
        grid-template-columns: 1fr !important;
    }
}


/* WooCommerce Customization - CLEAN INTEGRATION */

/* Layout & Spacing */
.woocommerce-breadcrumb {
    margin-bottom: 2rem !important;
    font-size: 0.875rem !important;
    color: #64748b !important;
}

.woocommerce-notices-wrapper {
    margin-bottom: 2rem !important;
}

/* Product Grid (Archive) */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 2.5rem !important;
    margin: 0 !important;
}

.woocommerce ul.products::before, .woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* =====================================================
   CORRECTION GRILLE PRODUITS LIÉS - "Vous aimerez aussi"
   =====================================================
   WooCommerce applique display:grid (columns-4) à la section
   .related.products elle-même, ce qui contraint le ul.products
   à une seule colonne de ~286px. On corrige avec des sélecteurs
   plus spécifiques pour surcharger les règles !important.
*/
.related-products-wrapper .related.products {
    display: block !important;
    width: 100% !important;
}
.related-products-wrapper .woocommerce ul.products,
.related-products-wrapper ul.products {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
@media (min-width: 640px) {
    .related-products-wrapper .woocommerce ul.products,
    .related-products-wrapper ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 1024px) {
    .related-products-wrapper .woocommerce ul.products,
    .related-products-wrapper ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Single Product Styling */
.single-product .product_title {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    line-height: 1.1 !important;
    margin-bottom: 1.5rem !important;
}

.single-product .price {
    font-size: 2.5rem !important;
    color: #7C3AED !important;
    font-weight: 900 !important;
    margin-bottom: 2rem !important;
    display: block !important;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 1.125rem !important;
    color: #475569 !important;
    line-height: 1.7 !important;
    margin-bottom: 2.5rem !important;
}

/* Form Elements (Add to Cart) */
.woocommerce div.product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    margin-top: 3rem !important;
}

.woocommerce div.product form.cart .quantity {
    margin: 0 !important;
}

.woocommerce div.product form.cart .quantity input {
    width: 80px !important;
    height: 60px !important;
    border-radius: 1rem !important;
    border: 2px solid #e2e8f0 !important;
    font-weight: 900 !important;
}

.woocommerce div.product form.cart .button {
    height: 60px !important;
    padding: 0 3rem !important;
    background: linear-gradient(135deg, #7C3AED, #EC4899) !important;
    border-radius: 1.25rem !important;
    font-weight: 900 !important;
    font-size: 1.125rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
}

/* Tabs & Data */
.woocommerce-tabs ul.tabs {
    display: flex !important;
    gap: 2rem !important;
    border: none !important;
    margin-bottom: 3rem !important;
    padding: 0 !important;
}

.woocommerce-tabs ul.tabs::before { display: none !important; }

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    font-weight: 900 !important;
    font-size: 1.25rem !important;
    color: #94a3b8 !important;
    padding: 1rem 0 !important;
    border-bottom: 3px solid transparent !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #0f172a !important;
    border-bottom-color: #7C3AED !important;
}

/* Cart & Checkout Tables */
.woocommerce-cart table.cart, .woocommerce-checkout table.shop_table {
    border-collapse: separate !important;
    border-spacing: 0 1rem !important;
    background: transparent !important;
}

.woocommerce-cart table.cart tr, .woocommerce-checkout table.shop_table tr {
    background: white !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

.woocommerce-cart table.cart td, .woocommerce-cart table.cart th {
    border: none !important;
    padding: 2rem !important;
}

.woocommerce-cart table.cart td:first-child { border-radius: 2rem 0 0 2rem !important; }
.woocommerce-cart table.cart td:last-child { border-radius: 0 2rem 2rem 0 !important; }

.woocommerce-notices-wrapper {
    margin-top: 5rem !important;
    margin-bottom: 7rem !important;
    width: 100% !important;
}

/* Single Product Page Fixes */
.single-product .product {
    display: block !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
}

.single-product div.product div.images {
    width: 100% !important;
    float: none !important;
    margin-bottom: 2rem !important;
}

.single-product div.product div.summary {
    width: 100% !important;
    float: none !important;
    padding: 3rem !important;
    background: white !important;
    border-radius: 3rem !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05) !important;
    border: 1px solid #f1f5f9 !important;
}

.single-product .woocommerce-product-gallery__image {
    border-radius: 3rem !important;
    overflow: hidden !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1) !important;
}

.single-product .product_title {
    font-size: 3rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin-bottom: 1.5rem !important;
}

.single-product .price {
    font-size: 2.5rem !important;
    color: #7C3AED !important;
    font-weight: 900 !important;
    margin-bottom: 2rem !important;
}

/* Cart & Checkout Global Fix */
.woocommerce-cart .entry-content, .woocommerce-checkout .entry-content {
    padding-top: 8rem !important;
    background: #f8fafc !important;
}

.woocommerce table.shop_table {
    border: none !important;
    border-radius: 2rem !important;
    overflow: hidden !important;
    background: white !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

.woocommerce table.shop_table td, .woocommerce table.shop_table th {
    padding: 2rem !important;
    border-top: 1px solid #f1f5f9 !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
    background: white !important;
    padding: 3rem !important;
    border-radius: 2.5rem !important;
    margin-top: 3rem !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05) !important;
}

.woocommerce-checkout #customer_details, .woocommerce-checkout #order_review {
    background: white !important;
    padding: 3rem !important;
    border-radius: 2.5rem !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05) !important;
    margin-bottom: 3rem !important;
}

/* Force layout for shop page */
.post-type-archive-product .site-main, 
.tax-product_cat .site-main {
    padding-top: 8rem !important;
    background-color: #f8fafc !important;
}

/* Product Grid */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products::before, .woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    background: white !important;
    border-radius: 2.5rem !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f1f5f9 !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 50px rgba(124, 58, 237, 0.15) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block !important;
    padding: 2rem !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product img {
    border-radius: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    transition: transform 0.5s ease !important;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 900 !important;
    font-size: 1.5rem !important;
    color: #0f172a !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product .price {
    font-size: 1.25rem !important;
    color: #7C3AED !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    display: block !important;
}

.woocommerce .product-wrapper {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.woocommerce .product-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Add to Cart Button */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: linear-gradient(135deg, #7C3AED, #EC4899) !important;
    color: white !important;
    border: none !important;
    border-radius: 1rem !important;
    padding: 1rem 2rem !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4) !important;
}

/* Form Fields */
.woocommerce form .form-row input[type="text"],
.woocommerce form .form-row input[type="email"],
.woocommerce form .form-row input[type="tel"],
.woocommerce form .form-row input[type="number"],
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 2px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    padding: 0.75rem 1rem !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.3s ease !important;
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #7C3AED !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
    outline: none !important;
}

/* Cart Table */
.woocommerce-cart-form table {
    background: transparent !important;
    border: none !important;
}

.woocommerce-cart-form table thead {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 1rem !important;
}

.woocommerce-cart-form table tbody tr {
    border: none !important;
    background: white !important;
    margin-bottom: 1.5rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Checkout Form */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Star Ratings */
.woocommerce .star-rating {
    display: flex !important;
    gap: 0.25rem !important;
}

.woocommerce .star-rating span {
    color: #FBBF24 !important;
    font-size: 1rem !important;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce-checkout .woocommerce-billing-fields,
    .woocommerce-checkout .woocommerce-shipping-fields {
        padding: 1.5rem !important;
    }
    
    .woocommerce form .form-row {
        width: 100% !important;
    }
}

/* Correction couleur texte confidentialité Checkout */
.woocommerce-privacy-policy-text, 
.woocommerce-privacy-policy-text p,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    color: #0f172a !important; /* Noir ardoise profond */
    font-weight: 500 !important;
}

/* ============================================
   IPTV PRO - OPTIMISATIONS 2026
   ============================================ */

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Optimisation du chargement des images */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus visible pour l'accessibilité */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Styles pour les nouvelles sections */
#how-it-works .rounded-full {
    transition: transform 0.3s ease;
}
#how-it-works .text-center:hover .rounded-full {
    transform: scale(1.1);
}

#compatibility .fas {
    transition: all 0.3s ease;
}
#compatibility .text-center:hover .fas {
    transform: translateY(-5px);
    color: var(--secondary);
}

#commitments .p-8 {
    transition: all 0.3s ease;
}
#commitments .p-8:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* ============================================
   EXTRA PRODUCT OPTIONS - OPTIMIZATIONS
   ============================================ */

/* Optimisation de la grille des pays (Chaînes TV) */
.tm-extra-product-options .tmcp-field-wrap {
    margin-bottom: 1rem !important;
}

/* Affichage en colonnes pour les listes de pays */
.tm-extra-product-options ul.tmcp-checkboxes, 
.tm-extra-product-options ul.tmcp-radio {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 0.5rem !important;
    padding: 1.5rem !important;
    background: #f8fafc !important;
    border-radius: 1rem !important;
    border: 1px solid #e2e8f0 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* Style des labels pour les options */
.tm-extra-product-options label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.tm-extra-product-options label:hover {
    background: #f1f5f9 !important;
    color: #7C3AED !important;
}

/* Style pour les sélections VOD (Swatches/Badges) */
.tm-extra-product-options select[multiple] {
    width: 100% !important;
    min-height: 120px !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
    border: 2px solid #e2e8f0 !important;
    background: white !important;
}

/* Amélioration des titres de sections */
.tm-extra-product-options .tm-section-label {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin: 2rem 0 1rem 0 !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #7C3AED !important;
    display: inline-block !important;
}

/* Sticky Mobile "Add to Cart" */
@media (max-width: 768px) {
    .single-product .cart {
        position: sticky !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        padding: 1rem !important;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.1) !important;
        z-index: 100 !important;
        margin: 0 -1.5rem !important;
        width: calc(100% + 3rem) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .single-product .cart .quantity {
        display: none !important; /* Cacher la quantité sur mobile pour gagner de la place */
    }
    
    .single-product .cart .button {
        flex: 1 !important;
        margin: 0 !important;
    }
}

/* Tooltips & Help Text */
.tm-extra-product-options .tm-description {
    font-size: 0.75rem !important;
    color: #64748b !important;
    font-style: italic !important;
    margin-top: 0.25rem !important;
}
