/* ========================================
   CSS MOBILE SPÉCIFIQUE - PRODUCT ADS LANDING
   ======================================== */

/* ========================================
   MOBILE (< 768px)
   ======================================== */
@media (max-width: 767.98px) {
    /* Container principal mobile optimisé */
    .ads-landing-perfect {
        padding: 0.5rem !important;
        margin: 0 !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Forcer l'alignement des colonnes principales sur mobile */
    .container-product.ads-landing-perfect {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .container-product.ads-landing-perfect > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    .container-product.ads-landing-perfect > .row > .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Image produit mobile compacte */
    .product-img-container {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Header produit mobile optimisé */
    .product-header-perfect {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Informations produit mobile */
    .product-information-perfect {
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-top: 0.25rem !important;
        margin-top: 0 !important;
    }
    
    .product-title-perfect {
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .product-meta-perfect {
        flex-direction: column !important;
        gap: 0.25rem !important;
        align-items: flex-start !important;
    }
    
    .product-reference-perfect,
    .product-brand-perfect {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    /* Avis clients mobile compacts */
    .reviews-summary {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .btn-reviews-sidebar {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.3rem !important;
    }
    
    /* Colonnes mobile - tout en vertical compact */
    .product-information-perfect .row > .col-12.col-md-6 {
        margin-bottom: 0.5rem !important;
        padding: 0 0.25rem !important;
    }
    
    /* Prix mobile compact */
    .product-prices-perfect {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .product-prices-perfect::before {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.3rem !important;
    }
    
    /* BLOC DE RÉASSURANCE MOBILE - LOGOS PLUS GROS AVEC GAP 18PX ET TEXTE PLUS PETIT */
    .diadems-reassurance-block.diadems-reassurance-compact {
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    .diadems-reassurance-block.diadems-reassurance-compact .reassurance-item {
        margin-bottom: 0.3rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 18px !important;
    }
    
    .diadems-reassurance-block.diadems-reassurance-compact .reassurance-icon {
        flex-shrink: 0 !important;
    }
    
    .diadems-reassurance-block.diadems-reassurance-compact .reassurance-icon img {
        width: 52px !important;
        height: 52px !important;
    }
    
    .diadems-reassurance-block.diadems-reassurance-compact .reassurance-text {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
    }
    
    /* Actions produit mobile */
    .product-actions-perfect {
        margin-bottom: 0.5rem !important;
    }
    
    .product-actions-perfect .alert {
        padding: 0.5rem !important;
        margin-bottom: 0 !important;
        font-size: 0.7rem !important;
    }
    
    /* Bouton "Voir la fiche complète" mobile */
    .action-buttons-perfect {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .btn-more-info-perfect {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 44px !important;
    }
    
    /* Description courte mobile */
    .product-description-short-perfect {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .product-description-short-perfect .desc-content {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    /* Bouton description mobile */
    .description-button-container {
        margin-bottom: 0.5rem !important;
    }
    
    .btn-description-sidebar {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 44px !important;
    }
    
    /* Avis clients mobile compacts */
    .product-reviews-perfect {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .reviews-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .reviews-subtitle {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .product-reviews-perfect .btn-reviews-sidebar {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 44px !important;
    }
    
    /* Questions mobile compactes */
    .product-questions-perfect {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .questions-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .questions-subtitle {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .btn-questions-sidebar {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 44px !important;
    }
    
    /* Galerie miniatures mobile */
    .product-thumbnails-gallery {
        gap: 0.25rem !important;
        margin-top: 0.5rem !important;
        overflow-x: auto !important;
        padding-bottom: 0.5rem !important;
        scrollbar-width: thin !important;
    }
    
    .product-thumbnails-gallery::-webkit-scrollbar {
        height: 4px !important;
    }
    
    .product-thumbnails-gallery::-webkit-scrollbar-track {
        background: #f1f1f1 !important;
    }
    
    .product-thumbnails-gallery::-webkit-scrollbar-thumb {
        background: #e65021 !important;
        border-radius: 2px !important;
    }
    
    .thumbnail-item,
    .thumbnail-more {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Sidebar mobile plein écran */
    .sidebar-container {
        width: 100% !important;
        right: -100% !important;
        z-index: 10000 !important;
        position: fixed !important;
        top: 0 !important;
        height: 100vh !important;
        background: #ffffff !important;
    }
    
    .sidebar-container.active {
        right: 0 !important;
    }
    
    .sidebar-overlay {
        z-index: 9999 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.6) !important;
    }
    
    .sidebar-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar-header {
        padding: 0.75rem !important;
        background: #e65021 !important;
        color: #ffffff !important;
    }
    
    .sidebar-content {
        padding: 0.75rem !important;
        overflow-y: auto !important;
        height: calc(100vh - 120px) !important;
    }
    
    .sidebar-footer {
        padding: 0.75rem !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e9ecef !important;
    }
    
    .sidebar-title {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    .sidebar-close {
        background: rgba(255, 255, 255, 0.2) !important;
        border: none !important;
        color: #ffffff !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        font-size: 1.2rem !important;
        cursor: pointer !important;
    }
    
    /* Optimisation des étoiles sur mobile */
    .stars-display .grade-stars .star svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Amélioration des boutons sur mobile */
    .btn-reviews-sidebar,
    .btn-questions-sidebar,
    .btn-description-sidebar,
    .btn-more-info-perfect {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
        min-width: 120px !important;
        white-space: nowrap !important;
    }
    
    /* Amélioration de la lisibilité */
    .product-description-short-perfect .desc-content,
    .reviews-subtitle,
    .questions-subtitle {
        text-align: left !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Éviter les débordements - overflow-x supprimé pour éviter de couper le contenu */
    .product-information-perfect,
    .product-img-container,
    .product-header-perfect {
        /* overflow-x: hidden supprimé car il coupait le contenu sur les côtés */
    }
    
    /* S'assurer que tous les éléments restent dans leur conteneur */
    .product-prices-perfect,
    .product-actions-perfect,
    .product-description-short-perfect,
    .product-reviews-perfect,
    .product-questions-perfect,
    .diadems-reassurance-block {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Réduire les animations sur mobile pour de meilleures performances */
    .ads-landing-perfect {
        animation: none !important;
    }
    
    .product-header-perfect,
    .product-prices-perfect,
    .product-description-short-perfect,
    .product-actions-perfect,
    .product-reviews-perfect,
    .product-questions-perfect {
        animation: none !important;
    }
    
    /* Transitions plus rapides sur mobile */
    .btn-reviews-sidebar,
    .btn-questions-sidebar,
    .btn-description-sidebar,
    .btn-more-info-perfect {
        transition: background-color 0.2s ease !important;
    }
    
    .thumbnail-item {
        transition: border-color 0.2s ease !important;
    }
}
