/**
 * Soft Resto - Produits
 * Styles pour l'affichage du menu (style Uber Eats - Liste)
 * Version 1.4.0 - Navigation multi-lignes + Correction débordement mobile
 */

/* ===================================================================
   CONTENEUR PRINCIPAL - ANTI-DÉBORDEMENT
   =================================================================== */

.srp-menu-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    box-sizing: border-box;
    /* ⚠️ CRITIQUE : PAS DE OVERFLOW - Il bloque le sticky */
    /* overflow-x: hidden;  ❌ SUPPRIMÉ */
    /* overflow-y: visible; ❌ SUPPRIMÉ */
}

.srp-menu-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    max-width: 100%;
}

.srp-menu-title {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    word-wrap: break-word;
}

.srp-menu-restaurant {
    font-size: 1.1em;
    color: #6c757d;
    margin: 0;
}

/* ===================================================================
   MENU DE NAVIGATION PAR CATÉGORIES (STICKY MULTI-LIGNES)
   ⚠️ STICKY FORCÉ SUR TOUS LES SUPPORTS - NE PAS MODIFIER
   =================================================================== */

.srp-categories-nav-wrapper {
    /* ⚠️ STICKY - Toutes les variantes possibles */
    position: -webkit-sticky !important; /* Safari */
    position: sticky !important; /* Standard */
    
    /* ⚠️ Position de collage */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    
    /* ⚠️ Z-index très élevé */
    z-index: 9999 !important;
    
    /* ⚠️ Display et dimensions */
    display: block !important;
    width: calc(100% + 40px) !important;
    max-width: none !important;
    
    /* Marges */
    margin: 0 -20px 30px -20px !important;
    
    /* Apparence */
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    
    /* ⚠️ Propriétés critiques pour le sticky */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force GPU acceleration */
    -webkit-transform: translateZ(0);
}

.srp-categories-nav-wrapper.is-stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.srp-categories-nav {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Navigation multi-lignes avec flex-wrap */
.srp-categories-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    justify-content: flex-start;
}

.srp-category-nav-item {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 25px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.srp-category-nav-item:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-2px);
}

.srp-category-nav-item.active {
    background: #fff5f5;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

/* ===================================================================
   SECTIONS DE CATÉGORIES
   =================================================================== */

.srp-category-section {
    margin-bottom: 40px;
    scroll-margin-top: 150px; /* ✅ Augmenté pour positionner dans le haut de l'écran */
    max-width: 100%;
}

.srp-category-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b6b;
    word-wrap: break-word;
}

.srp-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
}

/* ===================================================================
   CARTE PRODUIT - STYLE LISTE COMPACT (Image carrée GAUCHE)
   =================================================================== */

.srp-product-card {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center; /* ✅ Centrage vertical pour hauteur compacte */
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: auto; /* ✅ Pas de min-height fixe */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 15px;
}

.srp-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

/* Info du produit - DROITE (flexible mais compact) */
.srp-product-info {
    flex: 1 1 auto;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* ✅ Centrage vertical */
    min-width: 0;
    order: 2;
    gap: 8px; /* ✅ Espacement uniforme entre éléments */
}

.srp-product-name {
    font-size: 1.15em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.srp-product-description {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
    /* ✅ LIMITATION STRICTE À 2 LIGNES */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Exactement 2 lignes */
    -webkit-box-orient: vertical;
    max-height: calc(1.4em * 2); /* 2 lignes × line-height */
    word-wrap: break-word;
}

.srp-product-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 0; /* ✅ Pas de margin supplémentaire */
    flex-wrap: wrap;
}

.srp-product-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
}

.srp-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 0.9em;
    margin-right: 5px;
}

.srp-product-price ins {
    text-decoration: none;
    color: #ff6b6b;
}

/* ===================================================================
   BOUTONS QUANTITÉ +/- - PARFAITEMENT CIRCULAIRES
   ⚠️ NE PAS MODIFIER CES STYLES
   =================================================================== */

.srp-quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 4px;
    flex-shrink: 0;
}

/* ⚠️ BOUTONS CIRCULAIRES - APPROCHE RIGOUREUSE */
.srp-qty-btn {
    /* Dimensions exactes */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    
    /* Force le ratio 1:1 (cercle parfait) */
    aspect-ratio: 1 / 1 !important;
    
    /* Flexbox pour centrer parfaitement */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Suppression de tous les espacements internes */
    padding: 0 !important;
    margin: 0 !important;
    
    /* Cercle parfait */
    border-radius: 50% !important;
    border: none !important;
    
    /* Apparence */
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 700;
    
    /* Comportement */
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    
    /* Suppression des marges du navigateur */
    box-sizing: border-box !important;
    
    /* Force le texte au centre */
    text-align: center !important;
    line-height: 32px !important; /* Égal à la hauteur */
    
    /* Anti-déformation */
    overflow: hidden;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Le contenu du bouton */
.srp-qty-btn span {
    display: inline-block;
    line-height: 1 !important;
    vertical-align: middle;
    /* Centrage parfait du symbole */
    position: relative;
    top: -1px; /* Micro-ajustement optique */
}

.srp-qty-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.srp-qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.srp-qty-btn:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.srp-qty-display {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 1.05em;
    color: #2c3e50;
}

.srp-out-of-stock {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 600;
    color: #999;
    background: #f5f5f5;
    border-radius: 20px;
}

/* Image du produit - GAUCHE (CARRÉE) */
.srp-product-image {
    /* ✅ DIMENSIONS CARRÉES PARFAITES */
    flex: 0 0 140px; /* Largeur fixe */
    width: 140px;
    height: 140px; /* MÊME hauteur = carré parfait */
    min-width: 140px;
    min-height: 140px;
    max-width: 140px;
    max-height: 140px;
    
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    order: 1; /* À gauche */
}

.srp-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.srp-product-image:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.srp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit le carré sans déformation */
    transition: transform 0.3s ease;
}

.srp-product-card:hover .srp-product-image img {
    transform: scale(1.1);
}

/* ===================================================================
   MINI-PANIER STICKY - DESIGN MINIMALISTE ET ACCROCHEUR
   ⚠️ Tout sur une seule ligne - Style moderne - FORCE MAXIMALE
   =================================================================== */

.srp-mini-cart {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0) !important;
    z-index: 100000 !important;
    
    /* ✅ Style minimaliste moderne */
    background: #ffffff !important;
    border: 2px solid #ff6b6b !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.25) !important;
    padding: 12px 20px !important;
    
    /* Animation d'entrée */
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: all 0.3s ease !important;
    
    box-sizing: border-box !important;
    pointer-events: auto !important;
    
    /* Largeur adaptative */
    max-width: 600px !important;
    width: auto !important;
    min-width: 320px !important;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(150px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.srp-mini-cart:hover {
    transform: translateX(-50%) translateY(-3px) !important;
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.35) !important;
    border-color: #ff5252 !important;
}

/* ✅ Container horizontal - TOUT SUR UNE LIGNE - FORCE MAXIMALE */
.srp-mini-cart-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

/* ✅ Section info (icône + textes) - FORCE HORIZONTALE */
.srp-mini-cart-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
}

.srp-mini-cart-icon {
    font-size: 1.8em !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

/* ✅ Détails sur UNE ligne HORIZONTALE avec séparateur - CRITIQUE */
.srp-mini-cart-details {
    display: flex !important;
    flex-direction: row !important; /* ⚠️ HORIZONTAL PAS VERTICAL */
    align-items: center !important;
    gap: 10px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.srp-mini-cart-count {
    font-size: 0.95em !important;
    color: #6c757d !important;
    white-space: nowrap !important;
    display: inline !important; /* ⚠️ INLINE */
}

/* ✅ Séparateur visuel */
.srp-mini-cart-count::after {
    content: "•" !important;
    margin-left: 10px !important;
    color: #e0e0e0 !important;
}

.srp-mini-cart-total {
    font-size: 1.15em !important;
    font-weight: 700 !important;
    color: #ff6b6b !important;
    white-space: nowrap !important;
    display: inline !important; /* ⚠️ INLINE */
}

/* ✅ Bouton Commander - MÊME STYLE que les boutons +/- - FORCE MAXIMALE */
.srp-mini-cart-checkout {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    
    /* ✅ MÊME gradient que les boutons +/- */
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%) !important;
    color: #ffffff !important;
    
    border: none !important;
    border-radius: 30px !important;
    
    padding: 10px 24px !important;
    font-weight: 700 !important;
    font-size: 0.95em !important;
    
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    
    /* Effet d'élévation */
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
}

.srp-mini-cart-checkout:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4) !important;
}

.srp-mini-cart-checkout:active {
    transform: translateY(0) !important;
}

.srp-checkout-arrow {
    display: inline-block !important;
    transition: transform 0.3s ease !important;
    font-size: 1.1em !important;
}

.srp-mini-cart-checkout:hover .srp-checkout-arrow {
    transform: translateX(3px) !important;
}

/* États spéciaux */
.srp-mini-cart.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.srp-mini-cart.loading .srp-mini-cart-checkout {
    background: #e0e0e0 !important;
}

.srp-mini-cart.pulse {
    animation: pulse 0.6s ease-in-out !important;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(0) scale(1.03);
    }
}

/* ===================================================================
   NOTIFICATIONS
   =================================================================== */

.srp-notification {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    background: #28a745;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideInUp 0.3s ease, slideOutDown 0.3s ease 2.7s;
    animation-fill-mode: both;
    font-weight: 600;
    max-width: 90%;
    word-wrap: break-word;
}

.srp-notification.error {
    background: #dc3545;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

.srp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================================================
   RESPONSIVE - TABLETTE (768px - 1024px)
   =================================================================== */

@media (max-width: 1024px) {
    .srp-menu-container {
        padding: 15px;
    }

    /* ⚠️ STICKY FORCÉ SUR TABLETTE */
    .srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        display: block !important;
        margin: 0 -15px 20px -15px !important;
        width: calc(100% + 30px) !important;
        max-width: none !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .srp-categories-nav-inner {
        padding: 12px 15px;
        gap: 6px;
    }

    .srp-category-section {
        scroll-margin-top: 120px;
    }

    /* ✅ Correction débordement tablette */
    .srp-product-card {
        padding: 15px;
    }

    .srp-product-info {
        padding-right: 12px;
        max-width: calc(100% - 112px);
    }

    .srp-product-image {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }
    
    /* ⚠️ BOUTONS CIRCULAIRES TABLETTE */
    .srp-qty-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        max-width: 30px !important;
        max-height: 30px !important;
        aspect-ratio: 1 / 1 !important;
        line-height: 30px !important;
        font-size: 1.1em;
    }
}

/* ===================================================================
   RESPONSIVE - MOBILE (≤768px) - GARDE LE STYLE LISTE
   =================================================================== */

@media (max-width: 768px) {
    .srp-menu-container {
        padding: 12px;
        padding-bottom: 100px;
    }

    .srp-menu-title {
        font-size: 1.5em;
    }

    .srp-category-title {
        font-size: 1.3em;
    }

    /* ⚠️ STICKY FORCÉ SUR MOBILE */
    .srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        display: block !important;
        margin: 0 -12px 20px -12px !important;
        width: calc(100% + 24px) !important;
        max-width: none !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .srp-categories-nav-inner {
        padding: 10px 12px;
        gap: 6px;
    }

    .srp-category-nav-item {
        padding: 8px 14px;
        font-size: 0.85em;
    }

    .srp-category-section {
        scroll-margin-top: 130px; /* ✅ Augmenté pour mobile */
    }

    /* Produits restent en LISTE sur mobile avec image carrée */
    .srp-product-card {
        display: flex;
        flex-direction: row;
        padding: 12px;
        min-height: auto;
        gap: 12px;
        align-items: center;
    }

    .srp-product-info {
        flex: 1 1 auto;
        padding-right: 0;
        min-width: 0;
        order: 2;
        gap: 6px;
    }

    .srp-product-name {
        font-size: 1em;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .srp-product-description {
        font-size: 0.85em;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        max-height: calc(1.3em * 2);
        margin-bottom: 0;
    }

    /* ✅ Image CARRÉE mobile */
    .srp-product-image {
        flex: 0 0 110px;
        width: 110px;
        height: 110px; /* Carré parfait */
        min-width: 110px;
        min-height: 110px;
        max-width: 110px;
        max-height: 110px;
        border-radius: 8px;
        order: 1;
    }

    .srp-product-footer {
        gap: 8px;
    }

    .srp-product-price {
        font-size: 0.95em;
    }

    /* ⚠️ BOUTONS CIRCULAIRES MOBILE */
    .srp-qty-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        aspect-ratio: 1 / 1 !important;
        line-height: 28px !important;
        font-size: 1em;
        padding: 0 !important;
    }

    .srp-qty-display {
        min-width: 22px;
        font-size: 0.95em;
    }

    /* ✅ Mini-panier mobile - une ligne compacte */
    .srp-mini-cart {
        bottom: 15px;
        min-width: 280px;
        max-width: calc(100% - 24px);
        padding: 10px 16px;
    }
    
    .srp-mini-cart-inner {
        gap: 15px;
    }

    .srp-mini-cart-icon {
        font-size: 1.6em;
    }

    .srp-mini-cart-count {
        font-size: 0.85em;
    }

    .srp-mini-cart-total {
        font-size: 1em;
    }

    .srp-mini-cart-checkout {
        padding: 8px 18px;
        font-size: 0.9em;
    }

    .srp-notification {
        left: 12px;
        right: 12px;
        bottom: 15px;
        font-size: 0.9em;
    }
}

/* ===================================================================
   RESPONSIVE - TRÈS PETIT MOBILE (≤480px)
   =================================================================== */

@media (max-width: 480px) {
    .srp-menu-container {
        padding: 10px;
        padding-bottom: 100px;
    }

    .srp-menu-title {
        font-size: 1.3em;
    }

    .srp-category-title {
        font-size: 1.15em;
        margin-bottom: 12px;
    }

    /* ⚠️ STICKY FORCÉ SUR TRÈS PETIT MOBILE */
    .srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        display: block !important;
        margin: 0 -10px 15px -10px !important;
        width: calc(100% + 20px) !important;
        max-width: none !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .srp-categories-nav-inner {
        padding: 8px 10px;
        gap: 5px;
    }

    .srp-category-nav-item {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .srp-category-section {
        scroll-margin-top: 120px; /* ✅ Augmenté pour petit mobile */
    }

    /* Produits en LISTE même sur très petit écran */
    .srp-product-card {
        display: flex;
        flex-direction: row;
        padding: 10px;
        gap: 10px;
        align-items: center;
    }

    .srp-product-info {
        flex: 1 1 auto;
        padding-right: 0;
        min-width: 0;
        order: 2;
        gap: 5px;
    }

    .srp-product-name {
        font-size: 0.95em;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .srp-product-description {
        font-size: 0.8em;
        margin-bottom: 0;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        max-height: calc(1.3em * 2);
    }

    /* ✅ Image CARRÉE petit mobile */
    .srp-product-image {
        flex: 0 0 90px;
        width: 90px;
        height: 90px; /* Carré parfait */
        min-width: 90px;
        min-height: 90px;
        max-width: 90px;
        max-height: 90px;
        border-radius: 6px;
        order: 1;
    }

    .srp-product-footer {
        gap: 6px;
        flex-wrap: wrap;
    }

    .srp-product-price {
        font-size: 0.9em;
    }

    /* ⚠️ BOUTONS CIRCULAIRES TRÈS PETIT MOBILE */
    .srp-qty-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
        aspect-ratio: 1 / 1 !important;
        line-height: 26px !important;
        font-size: 0.95em;
        padding: 0 !important;
    }

    .srp-qty-display {
        min-width: 20px;
        font-size: 0.9em;
    }

    /* ✅ Mini-panier petit mobile - ultra compact */
    .srp-mini-cart {
        bottom: 10px;
        border-radius: 35px;
        padding: 8px 12px;
        min-width: 260px;
        max-width: calc(100% - 20px);
    }
    
    .srp-mini-cart-inner {
        gap: 12px;
    }

    .srp-mini-cart-icon {
        font-size: 1.4em;
    }

    .srp-mini-cart-count {
        font-size: 0.75em;
    }

    .srp-mini-cart-total {
        font-size: 0.9em;
    }

    .srp-mini-cart-checkout {
        padding: 7px 14px;
        font-size: 0.85em;
    }
}

/* ===================================================================
   RESPONSIVE - ULTRA PETIT (≤360px)
   =================================================================== */

@media (max-width: 360px) {
    /* ⚠️ STICKY FORCÉ SUR ULTRA PETIT MOBILE */
    .srp-categories-nav-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        display: block !important;
        max-width: none !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .srp-product-card {
        padding: 8px;
        gap: 8px;
        align-items: center;
    }

    .srp-product-info {
        order: 2;
        gap: 4px;
    }

    /* ✅ Image CARRÉE ultra petit mobile */
    .srp-product-image {
        flex: 0 0 80px;
        width: 80px;
        height: 80px; /* Carré parfait */
        min-width: 80px;
        min-height: 80px;
        max-width: 80px;
        max-height: 80px;
        order: 1;
    }

    .srp-product-name {
        font-size: 0.9em;
    }

    .srp-product-description {
        font-size: 0.75em;
    }

    .srp-product-price {
        font-size: 0.85em;
    }

    /* ⚠️ BOUTONS CIRCULAIRES ULTRA PETIT */
    .srp-qty-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        aspect-ratio: 1 / 1 !important;
        line-height: 24px !important;
        font-size: 0.9em;
        padding: 0 !important;
    }
}

/* ===================================================================
   ACCESSIBILITÉ
   =================================================================== */

.srp-qty-btn:focus,
.srp-category-nav-item:focus,
.srp-mini-cart-checkout:focus {
    outline: 3px solid rgba(255, 107, 107, 0.4);
    outline-offset: 2px;
}

.srp-product-card:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Éviter le débordement du texte */
* {
    box-sizing: border-box;
}

.srp-menu-container *,
.srp-product-card *,
.srp-mini-cart * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
