/**
 * SOFT RESTO PRODUITS - STICKY FORCE MAXIMALE
 * Ce fichier DOIT être chargé APRÈS produits.css
 * Version: 1.4.4
 * 
 * ⚠️ ATTENTION : Ce fichier contient des styles ultra-spécifiques
 * pour forcer le sticky en cas de conflit avec le thème WordPress
 */

/* =================================================================
   FORCE STICKY - SPÉCIFICITÉ MAXIMALE
   ================================================================= */

/* Sélecteur ultra-spécifique pour battre tout thème */
.srp-menu-container .srp-categories-nav-wrapper,
div.srp-menu-container > div.srp-categories-nav-wrapper,
div[class*="srp-menu"] .srp-categories-nav-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    display: block !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    width: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* ⚠️ ANCIEN : Protection mini-panier fixed (SUPPRIMÉ en v1.5.1) */
/* Le mini-panier est maintenant inline dans la navigation */
/* Il hérite automatiquement du sticky de la navigation */

/* Force le conteneur parent à ne pas bloquer sticky */
.srp-menu-container,
div.srp-menu-container,
div[class*="srp-menu-container"] {
    overflow: visible !important;
    overflow-x: clip !important; /* Modern alternative to hidden */
    overflow-y: visible !important;
    position: relative !important;
    contain: layout !important; /* CSS Containment for performance */
}

/* S'assurer qu'aucun wrapper WordPress ne bloque */
body .srp-menu-container {
    overflow: visible !important;
}

/* Pour tous les parents potentiels */
.srp-menu-container * {
    /* Permet au sticky de fonctionner */
}

/* =================================================================
   MEDIA QUERIES - STICKY FORCÉ PARTOUT + MINI-PANIER
   ================================================================= */

/* Tablette */
@media (max-width: 1024px) {
    .srp-menu-container .srp-categories-nav-wrapper,
    div.srp-menu-container > div.srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        transform: translateZ(0) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .srp-menu-container .srp-categories-nav-wrapper,
    div.srp-menu-container > div.srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        transform: translateZ(0) !important;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .srp-menu-container .srp-categories-nav-wrapper,
    div.srp-menu-container > div.srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        transform: translateZ(0) !important;
    }
}

/* Ultra petit */
@media (max-width: 360px) {
    .srp-menu-container .srp-categories-nav-wrapper,
    div.srp-menu-container > div.srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        transform: translateZ(0) !important;
    }
}

/* =================================================================
   DEBUG - Indicateur visuel de sticky actif
   Décommentez pour le debug
   ================================================================= */

/*
.srp-categories-nav-wrapper::before {
    content: "STICKY ACTIF";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b6b;
    color: white;
    padding: 2px 10px;
    font-size: 10px;
    border-radius: 3px;
    z-index: 10000;
}
*/
