/* =========================
   STYLE GENERAL
========================= */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body{
    height: 100%;
}

body{
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f2ee;
    color: #222;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

img{
    max-width: 100%;
    height: auto;
}

/* =========================
   BARRE DE NAVIGATION
   Une seule barre, tout en haut : logo + liens,
   puis la recherche juste en dessous, dans la même nav.
========================= */

.site-nav{
    position: sticky;
    top: 0;
    z-index: 50;
    background: #000;
    border-bottom: 4px solid #ff5e00;
}

.nav-haut{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 24px;
}

.nav-burger{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-burger span{
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-burger.actif span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-burger.actif span:nth-child(2){ opacity: 0; }
.nav-burger.actif span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav-logo{
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img{
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #fff;
    object-fit: contain;
    padding: 3px;
}

.nav-logo span{
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-logo span em{
    color: #ff9c40;
    font-style: normal;
}

.menu{
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.menu li{
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li a{
    display: block;
    padding: 10px 16px;
    color: rgb(255, 200, 50);
    text-decoration: none;
    transition: background 0.25s, color 0.25s;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 8px;
}

.menu li a:hover{
    background-color: rgba(255, 200, 50, 0.14);
    color: #ffc832;
}

/* Apparaît à la place de "Espace Vendeur" quand un vendeur est connecté */
.menu li a.nav-mon-compte{
    color: #fff;
    background-color: #ff5e00;
}

.menu li a.nav-mon-compte:hover{
    background-color: #cc4b00;
    color: #fff;
}

.nav-recherche{
    background: #150e0a;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-recherche form{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 24px;
}

.nav-recherche input,
.nav-recherche select{
    flex: 1;
    min-width: 150px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 9px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 16px;
}

.nav-recherche input::placeholder{
    color: rgba(255,255,255,0.55);
}

.nav-recherche select option{
    color: #222;
}

.nav-recherche input:focus,
.nav-recherche select:focus{
    outline: none;
    border-color: #ff5e00;
    background: rgba(255,255,255,0.12);
}

.nav-recherche button{
    background: #ff5e00;
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.2s ease;
}

.nav-recherche button:hover{
    background: #cc4b00;
}

/* =========================
   RESPONSIVE NAVIGATION
========================= */

@media (max-width: 900px){
    .nav-haut{
        justify-content: space-between;
        text-align: left;
        padding: 6px 14px;
        flex-wrap: nowrap;
        position: relative;
    }
    .nav-burger{
        display: flex;
        width: 42px;
        height: 37px;
        gap: 4px;
    }
    .nav-burger span{
        width: 18px;
    }
    .nav-logo img{
        width: 42px;
        height: 36px;
    }
    .nav-logo span{
        font-size: 17px;
    }
    .menu{
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #000;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 20px rgba(0,0,0,0.25);
        z-index: 60;
    }
    .menu.menu-ouvert{
        display: flex;
    }
    .menu li a{
        padding: 16px 26px;
        font-size: 14px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    /* Recherche + catégories + bouton : les 3 se partagent toute la largeur */
    .nav-recherche form{
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        padding: 11px 10px;
        gap: 6px;
    }
    .nav-recherche input{
        flex: 1.4 1 0;
        min-width: 0;
        padding: 11px 8px;
        font-size: 13.5px;
        border-radius: 6px;
    }
    .nav-recherche select{
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 8px;
        font-size: 13.5px;
        border-radius: 6px;
    }
    .nav-recherche button{
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 4px;
        font-size: 13.5px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 600px){
    .nav-haut{
        padding: 5px 10px;
        gap: 6px;
    }
    .nav-logo img{
        width: 38px;
        height: 32px;
        padding: 1px;
    }
    .nav-logo span{
        font-size: 15px;
    }
    .nav-burger{
        width: 38px;
        height: 33px;
    }
    .nav-burger span{
        width: 15px;
    }

    /* Toujours sur une seule ligne, les 3 éléments occupent toute la largeur */
    .nav-recherche form{
        padding: 10px 8px;
        gap: 5px;
    }
    .nav-recherche input{
        padding: 10px 6px;
        font-size: 12.5px;
    }
    .nav-recherche select{
        padding: 10px 6px;
        font-size: 12.5px;
    }
    .nav-recherche button{
        padding: 10px 4px;
        font-size: 12.5px;
    }
}

@media (max-width: 380px){
    .nav-logo span{
        font-size: 13px;
    }
    .nav-recherche input{
        font-size: 12px;
    }
}


/* =========================
   CAROUSEL PUBLICITAIRE
========================= */

.pub-carousel{
    position: relative;
    width: 92%;
    max-width: 1300px;
    margin: 22px auto 0;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 6;
    background: #eee;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    touch-action: pan-y;          /* le glissement horizontal change de publicité */
    -webkit-user-select: none;
    user-select: none;
}

.pub-slides{
    position: relative;
    width: 100%;
    height: 100%;
}

.pub-slide{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(.4,0,.2,1);
}

.pub-legende{
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 18px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
    color: #fff;
}

.pub-titre{
    font-size: clamp(14px, 2.4vw, 22px);
    font-weight: 800;
}

.pub-texte{
    font-size: clamp(11px, 1.6vw, 14px);
    opacity: 0.9;
    margin-top: 2px;
}

@media (max-width: 600px){
    .pub-carousel{
        aspect-ratio: 16 / 9;
        border-radius: 12px;
        margin-top: 14px;
    }
}

/* =========================
   ARTICLES
========================= */

#articles{
    width: 92%;
    max-width: 1300px;
    margin: 34px auto 50px;
}

.articles-entete{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 4px;
}

.articles-entete h2{
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1d1612;
    font-size: clamp(21px, 3.2vw, 30px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.articles-entete h2::before{
    content: "";
    flex: none;
    width: 6px;
    height: 1.05em;
    background: linear-gradient(180deg, #ff7a1a, #ff5e00);
    border-radius: 6px;
}

#compteur{
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fff0e5;
    border: 1px solid #ffd3b3;
    border-radius: 999px;
    color: #cc4b00;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
#compteur:empty{ display: none; }

@media (max-width: 480px){
    #articles{
        width: 94%;
    }
}


/* =========================
   FOOTER
========================= */

footer{
    background: #000;
    color: white;
    padding: 20px;
    margin-top: auto;
    border-top: 4px solid #ff5e00;
}

.footer-conteneu{
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    text-align: left;
}

.footer-marque h3{
    color: #ff6600;
    font-size: 22px;
    margin-bottom: 10px;
}

.footer-marque h3 span{
    color: #fff;
}

.footer-marque p{
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.6;
}

.footer-colonne h4{
    color: #fff;
    font-size: 15px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-colonne ul{
    list-style: none;
}

.footer-colonne li{
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
}

.footer-colonne a{
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-colonne a:hover{
    color: #ff6600;
}

.footer-bas{
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 16px 20px 0;
    text-align: center;
}

.footer-bas p{
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

@media(max-width:768px){
    .footer-conteneu{
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }
    .footer-marque{
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media(max-width:480px){
    .footer-conteneu{
        grid-template-columns: 1fr;
    }
}


/* =========================
   VENTES FLASH
========================= */

.flash{
    width: 92%;
    max-width: 1300px;
    margin: 24px auto 0;
    padding: 18px;
    background: #ff5e00;
    border-radius: 16px;
    color: #fff;
}
.flash-entete{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.flash-entete h2{ font-size: 22px; line-height: 1.2; }
.flash-fleche{
    background: #fff;
    color: #ff5e00;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 22px;
    border-radius: 20px;
}
.flash-timer{
    display: inline-block;
    margin: 10px 0 14px;
    padding: 6px 12px;
    background: #fff;
    color: #ff5e00;
    font-weight: bold;
    border-radius: 8px;
}
.flash-liste{
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}
.flash-carte{
    flex: 0 0 200px;
    background: #fff;
    color: #222;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
}
.flash-carte img,
.flash-sans-photo{
    display: block;
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #fff;
}
.flash-sans-photo{ background: #f1ece7; }
.flash-stock{
    background: #fff1d6;
    color: #b36b00;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    padding: 5px;
}
.flash-infos{ padding: 10px 12px 14px; }
.flash-infos h3{
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flash-prix{ font-size: 18px; font-weight: 800; margin-top: 4px; }
.flash-ancien{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}
.flash-badge{
    background: #16a34a;
    color: #fff;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 5px;
}

/* =========================
   BARRE DE NAVIGATION DU BAS (mobile)
========================= */

.bottom-nav{
    display: none;
}

.bn-toast{
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    z-index: 120;
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.bn-toast.visible{ opacity: 1; }

@media (max-width: 900px){
    body{
        padding-bottom: 68px;
    }
    .bottom-nav{
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        display: flex;
        justify-content: space-around;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bn-item{
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 2px;
        color: #222;
        text-decoration: none;
        font-size: 12px;
        font-weight: 600;
    }
    .bn-item svg{
        width: 26px;
        height: 26px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .bn-item.actif{
        color: #ff5e00;
    }
    .bn-item.actif svg{
        fill: #ff5e00;
    }
    .bn-badge{
        position: absolute;
        top: 3px;
        left: 55%;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        background: #ff5e00;
        color: #fff;
        font-size: 11px;
        line-height: 17px;
        text-align: center;
        border-radius: 9px;
    }
}


/* =========================
   MENU (hamburger) : mêmes entrées que la barre du bas
========================= */

.menu li a{
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-ico{
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.menu li a.actif{
    background-color: rgba(255, 200, 50, 0.18);
    color: #fff;
}
.menu-badge{
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff5e00;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    letter-spacing: 0;
}
.menu-sep{
    display: none;
}
.menu li.menu-secondaire a{
    font-size: 13px;
    opacity: 0.75;
}

@media (max-width: 900px){
    .menu-sep{
        display: block;
        height: 6px;
        background: #1a1a1a;
    }
}

/* =========================
   RECHERCHE : champ + suggestions
========================= */

.nav-recherche{
    position: relative;
}
.champ-recherche{
    flex: 1;
    min-width: 150px;
}
.champ-recherche input{
    width: 100%;
}
.nav-recherche input[type="search"]::-webkit-search-cancel-button{
    filter: invert(1);
    cursor: pointer;
}

@media (max-width: 900px){
    .champ-recherche{
        flex: 1.4 1 0;
        min-width: 0;
    }
}

.suggestions{
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 70;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    color: #222;
    padding: 6px 0 10px;
    border-bottom: 4px solid #ff5e00;
    box-shadow: 0 14px 28px rgba(0,0,0,0.28);
}
.suggestions[hidden]{
    display: none;
}
.sug-titre,
.sug-item,
.sug-chips,
.sug-vide{
    padding-left: max(18px, calc((100% - 1300px) / 2 + 24px));
    padding-right: max(18px, calc((100% - 1300px) / 2 + 24px));
}
.sug-titre{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    padding-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a7d73;
}
.sug-lien{
    background: none;
    border: none;
    padding: 0;
    color: #ff5e00;
    font-weight: 700;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.sug-lien:hover{ text-decoration: underline; }
.sug-item{
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 15px;
    cursor: pointer;
}
.sug-item:hover,
.sug-item.survol{
    background: #fff3ea;
}
.sug-ico{
    width: 38px;
    text-align: center;
    font-size: 20px;
    flex-shrink: 0;
}
.sug-thumb{
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
    flex-shrink: 0;
}
.sug-txt{
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sug-prix{
    font-size: 13px;
    font-weight: 700;
    color: #ff5e00;
    white-space: nowrap;
}
.sug-x{
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
}
.sug-x:hover{ color: #cc4b00; }
.sug-tous{
    color: #ff5e00;
    font-weight: 700;
}
.sug-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.sug-chip{
    background: #faf7f4;
    border: 1px solid #ece5df;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.sug-chip:hover{
    border-color: #ff5e00;
    background: #fff3ea;
}
.sug-vide{
    padding-top: 12px;
    padding-bottom: 6px;
    color: #777;
    font-size: 14px;
}

@media (max-width: 900px){
    .suggestions{
        max-height: calc(100vh - 230px);
    }
}

mark{
    background: #ffe3c9;
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* =========================
   FILTRES ET TRI
========================= */

#articles{
    scroll-margin-top: 140px;
}
/* Panneau de filtres : fond beige foncé, donc bien distinct des cartes blanches */
.filtres-bar{
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin: 14px 0 28px;
    padding: 16px;
    background: #ece2d7;
    border: 1px solid #ddcfc0;
    border-radius: 16px;
}


.filtre-champ{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.filtre-tri{ flex: 2 1 220px; }
.filtre-prix{ flex: 2 1 250px; }
.filtre-actions{
    flex: 1 1 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.filtre-label{
    padding-left: 2px;
    color: #5f5146;
    font-size: 12px;
    font-weight: 700;
}

/* Champs (tri + prix) */
.filtres-bar select,
.filtres-bar input[type="number"]{
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    background-color: #fff;
    border: 1.5px solid #dccfc1;
    border-radius: 12px;
    color: #222;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.filtres-bar select:hover,
.filtres-bar input[type="number"]:hover{ border-color: #ffa466; }
.filtres-bar select:focus,
.filtres-bar input[type="number"]:focus{
    outline: none;
    border-color: #ff5e00;
    box-shadow: 0 0 0 4px rgba(255, 94, 0, 0.16);
}
.filtres-bar input[type="number"]::placeholder{ color: #a2958a; }

.filtres-bar select{
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ff5e00' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* Prix min – max */
.prix-duo{
    display: flex;
    align-items: center;
    gap: 8px;
}
.prix-duo input[type="number"]{
    flex: 1 1 0;
    text-align: center;
    padding: 0 8px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.prix-duo input[type="number"]::-webkit-outer-spin-button,
.prix-duo input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}
.prix-tiret{
    flex: none;
    color: #8a7b6e;
    font-weight: 700;
}

/* "En stock" : interrupteur */
.filtre-stock{
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    background: #fff;
    border: 1.5px solid #dccfc1;
    border-radius: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.filtre-stock:hover{ border-color: #ffa466; }
.filtre-stock input{
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.interrupteur{
    position: relative;
    flex: none;
    width: 40px;
    height: 24px;
    background: #cfc3b7;
    border-radius: 24px;
    transition: background-color 0.25s ease;
}
.interrupteur::after{
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.25s ease;
}
.filtre-stock input:checked + .interrupteur{ background: #ff5e00; }
.filtre-stock input:checked + .interrupteur::after{ transform: translateX(16px); }
.filtre-stock:has(input:checked){
    background: #fff4ec;
    border-color: #ff5e00;
    color: #cc4b00;
}
.filtre-stock input:focus-visible + .interrupteur{
    outline: 3px solid rgba(255, 94, 0, 0.4);
    outline-offset: 2px;
}

.st-court{ display: none; }

/* Réinitialiser */
.filtre-reset{
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    padding: 0 16px;
    background: transparent;
    border: 1.5px solid #ff5e00;
    border-radius: 12px;
    color: #ff5e00;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.filtre-reset svg{ transition: transform 0.4s ease; }
.filtre-reset:hover{ background: #ff5e00; color: #fff; }
.filtre-reset:hover svg{ transform: rotate(-200deg); }
.filtre-reset:focus-visible{
    outline: 3px solid rgba(255, 94, 0, 0.4);
    outline-offset: 2px;
}

/* Téléphone : tout sur UNE seule ligne, petits éléments */
@media (max-width: 600px){
    .filtres-bar{
        flex-wrap: nowrap;
        align-items: center;
        gap: 5px;
        padding: 8px;
        margin: 10px 0 18px;
        border-radius: 12px;
    }
    .filtre-label,
    .prix-tiret{ display: none; }

    .filtre-champ{ gap: 0; }
    .filtre-tri{ flex: 1 1 0; min-width: 0; }
    .filtre-prix{ flex: none; }
    .filtre-actions{ flex: none; display: flex; gap: 5px; }

    .filtres-bar select,
    .filtres-bar input[type="number"]{
        height: 36px;
        font-size: 13px;
        border-width: 1px;
        border-radius: 9px;
    }
    .filtres-bar select{
        padding: 0 20px 0 8px;
        background-size: 13px;
        background-position: right 6px center;
    }
    .prix-duo{ gap: 5px; }
    .prix-duo input[type="number"]{
        flex: none;
        width: 50px;
        padding: 0 3px;
    }

    .filtre-stock{
        flex: none;
        height: 36px;
        gap: 5px;
        padding: 0 8px;
        font-size: 12.5px;
        border-width: 1px;
        border-radius: 9px;
    }
    .st-long{ display: none; }
    .st-court{ display: inline; }
    .interrupteur{ width: 26px; height: 16px; }
    .interrupteur::after{ top: 2px; left: 2px; width: 12px; height: 12px; }
    .filtre-stock input:checked + .interrupteur::after{ transform: translateX(10px); }

    .filtre-reset{
        width: 36px;
        height: 36px;
        padding: 0;
        border-width: 1px;
        border-radius: 9px;
    }
    .reset-texte{ display: none; }
}

/* Écrans minuscules (moins de 340 px) : le tri passe sur sa propre ligne */
@media (max-width: 339px){
    .filtres-bar{ flex-wrap: wrap; }
    .filtre-tri{ flex: 1 1 100%; }
    .filtre-prix{ flex: 1 1 0; }
    .prix-duo input[type="number"]{ flex: 1 1 0; width: auto; min-width: 0; }
    .filtre-actions{ flex: none; }
}

@media (prefers-reduced-motion: reduce){
    .interrupteur,
    .interrupteur::after,
    .filtre-reset svg{ transition: none; }
}

.btn-vide{
    margin-top: 14px;
    padding: 11px 22px;
    background: #ff5e00;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.btn-vide:hover{ background: #cc4b00; }

@media (max-width: 900px){
    #articles{ scroll-margin-top: 110px; }
}

/* =========================
   FAVORIS (cœur)
========================= */

.carte-article{
    position: relative;
}
.btn-fav{
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.22);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.btn-fav:active{ transform: scale(0.88); }
.btn-fav svg{
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #444;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.btn-fav.actif svg{
    fill: #ff5e00;
    stroke: #ff5e00;
}
.btn-fav-modal{
    top: 10px;
    left: 10px;
    right: auto;
}

/* =========================
   FENÊTRE CATÉGORIES
========================= */

.cat-overlay{
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
    align-items: flex-end;
    justify-content: center;
    background: rgba(10,8,6,0.6);
}
.cat-overlay.ouverte{
    display: flex;
}
.cat-boite{
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px 18px 0 0;
}
@media (min-width: 901px){
    .cat-overlay{ align-items: center; }
    .cat-boite{ border-radius: 18px; padding-bottom: 24px; }
}
.cat-haut{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cat-haut h3{ font-size: 18px; }
.cat-fermer{
    width: 34px;
    height: 34px;
    background: #f1ece7;
    border: none;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
}
.cat-grille{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.cat-btn{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #faf7f4;
    border: 1px solid #ece5df;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.cat-btn:hover{
    border-color: #ff5e00;
    background: #fff3ea;
}
.cat-ico{ font-size: 22px; }
.cat-nom{ flex: 1; }
.cat-n{
    padding: 1px 7px;
    background: #ff5e00;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
}


/* =========================
   APPARITION PROGRESSIVE (cartes une par une + fondu des photos)
========================= */

.carte-article.apparait{
    animation: carteApparait 0.5s ease backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes carteApparait{
    from{ opacity: 0; transform: translateY(18px); }
    to{ opacity: 1; transform: none; }
}
.indicateur-suite{
    text-align: center;
    padding: 16px;
    color: #8a7d73;
    font-size: 14px;
}
@media (prefers-reduced-motion: reduce){
    .carte-article.apparait{ animation: none; }
}

/* TÉLÉPHONES : cartes d'articles moins hautes */
@media (max-width: 480px){
    .grille-articles .carte-article img,
    .grille-articles .carte-article .no-photo{ height: 105px; }
    .grille-articles .carte-info{ padding: 7px 8px; }
    .grille-articles .carte-categorie{ font-size: 9.5px; margin-bottom: 2px; }
    .grille-articles .carte-nom{ font-size: 12.5px; margin-bottom: 2px; }
    .grille-articles .carte-desc{ font-size: 11px; line-height: 1.35; margin-bottom: 5px; -webkit-line-clamp: 1; }
    .grille-articles .carte-prix{ font-size: 13px; margin-bottom: 5px; }
    .grille-articles .badge-stock-client,
    .grille-articles .badge-variantes-client{ font-size: 9.5px; padding: 2px 7px; margin-bottom: 5px; }
    .grille-articles .carte-btn{ padding: 6px; font-size: 11px; }
}

/* PC : plus de colonnes et cartes plus compactes (avant : 3 colonnes très larges) */
@media (min-width: 1024px){
    #grille-articles.grille-articles{ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
    .grille-articles .carte-article img,
    .grille-articles .carte-article .no-photo{ height: 170px; }
    .grille-articles .carte-info{ padding: 12px; }
}
@media (min-width: 1700px){
    #grille-articles.grille-articles{ grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
    .grille-articles .carte-article img,
    .grille-articles .carte-article .no-photo{ height: 160px; }
    .grille-articles .carte-nom{ font-size: 14px; }
    .grille-articles .carte-prix{ font-size: 15px; }
}

/* BOUTON "REMONTER" : évite de faire défiler toute la liste pour revenir en haut */
.btn-haut{
    position: fixed;
    right: 16px;
    bottom: 24px;
    z-index: 90;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff5e00;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
.btn-haut.visible{
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
.btn-haut:hover{ background: #cc4b00; }
.btn-haut svg{
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 900px){
    .btn-haut{ bottom: 84px; right: 12px; width: 42px; height: 42px; }
}


/* SPINNER DE CHARGEMENT */
.spinner{
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #ff5e00;
    border-radius: 50%;
    animation: spinnerTourne 0.8s linear infinite;
}
.spinner-petit{
    width: 18px;
    height: 18px;
    border-width: 2px;
}
@keyframes spinnerTourne{
    to{ transform: rotate(360deg); }
}

/* Ordinateur : spinner plus grand (le téléphone garde la petite taille) */
@media (min-width: 901px){
    .spinner{ width: 56px; height: 56px; border-width: 5px; }
    .spinner-petit{ width: 24px; height: 24px; border-width: 3px; }
}

/* Spinner centré au milieu de la zone des articles */
.grille-articles .chargement{
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 0;
}


/* =========================================================
   ÉLÉMENTS AJOUTÉS (cachés sur téléphone, utilisés sur PC)
========================================================= */

.carte-btn{
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.carte-btn svg{
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-logo span b{ font-weight: 800; }
.recherche-ico,
.recherche-ico-btn,
.pub-fleche,
.nav-promo{ display: none; }
.pub-points{ display: none !important; }


/* =========================================================
   PC : BARRE LATÉRALE + CONTENU CLAIR
========================================================= */

@media (min-width: 901px){

    body{
        background: #f5f5f7;
        padding-left: 220px;
    }

    /* ---- Barre latérale ---- */
    .site-nav{
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 220px;
        overflow-y: auto;
        background: #0b0b0b;
        border-bottom: none;
        z-index: 50;
    }

    .nav-haut{
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        min-height: 100%;
        max-width: none;
        margin: 0;
        padding: 16px 12px 18px;
    }

    .nav-logo{
        gap: 10px;
        margin: 0 4px 22px;
    }
    .nav-logo img{
        width: 40px;
        height: 40px;
        border-radius: 9px;
        padding: 2px;
    }
    .nav-logo span{
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
        letter-spacing: 0;
    }
    .nav-logo span b{
        display: block;
        font-size: 15px;
    }
    .nav-logo span em{ color: #ff6a13; }

    .menu{
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 3px;
    }
    .menu li a,
    .menu li.menu-secondaire a{
        gap: 12px;
        padding: 9px 12px;
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0;
        text-transform: none;
        opacity: 1;
        border-radius: 9px;
    }
    .menu li a:hover{
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
    .menu li a.actif,
    .menu li a.actif:hover{
        background: #ff5e00;
        color: #fff;
        font-weight: 600;
    }
    .menu li a.nav-mon-compte{ background: transparent; }
    .menu li a.nav-mon-compte:hover{ background: rgba(255,255,255,0.08); }
    .menu-ico{
        width: 19px;
        height: 19px;
    }
    .menu-badge{ margin-left: auto; }

    /* ---- Encart "Devenir vendeur" ---- */
    .nav-promo{
        display: block;
        margin-top: auto;
        padding: 28px 4px 0;
        color: #fff;
    }
    .nav-promo-haut{
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .nav-promo-ico{
        flex: none;
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        color: #ff5e00;
        border: 1.5px solid #ff5e00;
        border-radius: 8px;
    }
    .nav-promo-ico svg,
    .nav-promo-btn svg{
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .nav-promo-haut p{
        font-size: 13.5px;
        line-height: 1.3;
    }
    .nav-promo-haut b{ display: block; }
    .nav-promo-haut em{
        display: block;
        color: #ff5e00;
        font-style: normal;
        font-weight: 700;
    }
    .nav-promo-texte{
        margin: 12px 0 14px;
        font-size: 12.5px;
        line-height: 1.45;
        color: rgba(255,255,255,0.85);
    }
    .nav-promo-btn{
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 7px 12px;
        color: #ff5e00;
        font-weight: 700;
        font-size: 13px;
        text-decoration: none;
        border: 1.5px solid #ff5e00;
        border-radius: 6px;
        transition: background 0.2s ease, color 0.2s ease;
    }
    .nav-promo-btn:hover{
        background: #ff5e00;
        color: #fff;
    }

    /* ---- Contenu ---- */
    main{
        padding: 12px 24px 40px;
    }

    .pub-carousel{
        width: 100%;
        max-width: none;
        margin: 0;
        aspect-ratio: 5 / 1;
        border-radius: 14px;
    }
    .pub-carousel.pub-multiple .pub-fleche{
        display: grid;
        place-items: center;
        position: absolute;
        top: 50%;
        z-index: 3;
        width: 38px;
        height: 38px;
        padding: 0;
        transform: translateY(-50%);
        color: #222;
        background: rgba(255,255,255,0.88);
        border: none;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        cursor: pointer;
        transition: background 0.2s ease;
    }
    .pub-fleche:hover{ background: #fff; }
    .pub-prec{ left: 16px; }
    .pub-suiv{ right: 16px; }
    .pub-fleche svg{
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .pub-points:not([style*="none"]){
        display: flex !important;
        justify-content: center;
        gap: 7px;
        margin-top: 8px;
    }
    .pub-points button{
        width: 8px;
        height: 8px;
        padding: 0;
        background: #cfcfd4;
        border: none;
        border-radius: 50%;
        cursor: pointer;
    }
    .pub-points button.actif{ background: #ff5e00; }

    /* ---- Recherche (sous la bannière) ---- */
    main .nav-recherche{
        background: none;
        border: none;
        margin-top: 16px;
    }
    main .nav-recherche form{
        max-width: none;
        padding: 0;
        gap: 16px;
        flex-wrap: nowrap;
    }
    main .champ-recherche{
        position: relative;
        flex: 1 1 0;
    }
    main .recherche-ico{
        display: block;
        position: absolute;
        left: 14px;
        top: 50%;
        width: 20px;
        height: 20px;
        transform: translateY(-50%);
        color: #666;
        pointer-events: none;
    }
    main .recherche-ico,
    main .recherche-ico-btn{
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }
    main .nav-recherche input,
    main .nav-recherche select{
        height: 44px;
        padding: 0 14px;
        color: #222;
        background: #fff;
        border: 1px solid #dcdce0;
        border-radius: 6px;
        font-size: 15px;
    }
    main .nav-recherche input{ padding-left: 46px; }
    main .nav-recherche select{ flex: 1 1 0; }
    main .nav-recherche input::placeholder{ color: #8a8a90; }
    main .nav-recherche input:focus,
    main .nav-recherche select:focus{
        background: #fff;
        border-color: #ff5e00;
    }
    main .nav-recherche input[type="search"]::-webkit-search-cancel-button{ filter: none; }
    main .nav-recherche button{
        display: flex;
        align-items: center;
        gap: 12px;
        height: 44px;
        padding: 0 26px;
        border-radius: 6px;
        font-size: 15px;
    }
    main .recherche-ico-btn{
        display: block;
        width: 20px;
        height: 20px;
    }
    main .suggestions{
        margin-top: 6px;
        border: 1px solid #e6e6ea;
        border-bottom: 3px solid #ff5e00;
        border-radius: 10px;
    }
    main .sug-titre,
    main .sug-item,
    main .sug-chips,
    main .sug-vide{
        padding-left: 18px;
        padding-right: 18px;
    }

    /* ---- Articles ---- */
    #articles,
    .flash{
        width: 100%;
        max-width: none;
    }
    #articles{ margin: 26px 0 40px; }

    .filtres-bar{
        align-items: flex-end;
        gap: 14px;
        padding: 10px 14px 12px;
        margin: 12px 0 20px;
        background: #fff;
        border: 1px solid #ececf0;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }
    .filtre-label{
        color: #555;
        font-weight: 500;
    }
    .filtres-bar select,
    .filtres-bar input[type="number"],
    .filtre-stock,
    .filtre-reset{
        height: 40px;
        border-width: 1px;
        border-radius: 7px;
    }
    .filtres-bar select,
    .filtres-bar input[type="number"],
    .filtre-stock{ border-color: #e1e1e6; }
    .prix-duo input[type="number"]{ text-align: left; padding: 0 14px; }
    .filtre-actions{ flex: 1 1 300px; }

    #grille-articles.grille-articles{
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
    .grille-articles .carte-article{
        border: 1px solid #ececf0;
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    }
    .grille-articles .carte-article img,
    .grille-articles .carte-article .no-photo{ height: 120px; }
    .grille-articles .carte-info{ padding: 10px 14px 14px; }
    .grille-articles .carte-categorie{ font-size: 11px; margin-bottom: 2px; }
    .grille-articles .carte-nom{ font-size: 15px; margin-bottom: 3px; }
    .grille-articles .carte-desc{ font-size: 12.5px; margin-bottom: 6px; color: #777; }
    .grille-articles .carte-prix{ color: #ff5e00; font-size: 16px; margin-bottom: 8px; }
    .grille-articles .badge-stock-client{ margin-bottom: 8px; }
    .grille-articles .carte-btn{
        background: #16a34a;
        padding: 9px;
        border-radius: 6px;
        font-size: 13.5px;
    }
    .grille-articles .carte-btn:hover{ background: #15803d; }
}

/* PC : nombre de colonnes selon la largeur disponible à côté de la barre latérale */
@media (min-width: 901px) and (max-width: 1199px){
    #grille-articles.grille-articles{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1700px){
    #grille-articles.grille-articles{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
}


/* =========================================================
   CARTES : bouton « Commander » toujours au même endroit (en bas)
========================================================= */
.grille-articles .carte-article{
    display: flex;
    flex-direction: column;
}
.grille-articles .carte-info{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.grille-articles .carte-btn{ margin-top: auto; }
.carte-badges{
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-bottom: 8px;
}
.carte-badges .badge-stock-client,
.carte-badges .badge-variantes-client{ margin: 0; }
.desc-toggle[hidden]{ display: none; }


/* =========================================================
   PUBLICITÉS : image affichée en entier, sans coupure ni déformation
   (fond flouté de la même image pour remplir les côtés)
========================================================= */
.pub-slide{
    overflow: hidden;
    background: #1a1a1a;
}
.pub-slide::before,
.pub-slide::after{
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--pub-img, none);
    background-position: center;
    background-repeat: no-repeat;
}
.pub-slide::before{
    background-size: cover;
    filter: blur(22px) brightness(0.75);
    transform: scale(1.15);
}
.pub-slide::after{ background-size: contain; }
.pub-legende{ z-index: 1; }

@media (min-width: 901px){
    .pub-carousel{ aspect-ratio: 16 / 5; max-height: 380px; }
}


/* Lien « Espace admin » (visible seulement pour un administrateur connecté) */
.menu li[hidden]{ display: none; }
.menu li a.nav-admin{ color: #ffc832; }
@media (min-width: 901px){
    .menu li a.nav-admin{
        color: #ffc832;
        border: 1px solid rgba(255,200,50,0.35);
    }
    .menu li a.nav-admin:hover{ background: #ffc832; color: #000; }
}


/* =========================================================
   ICÔNES DESSINÉES (remplacent les émojis)
========================================================= */
.cat-ico svg,
.sug-ico svg{ width: 22px; height: 22px; vertical-align: middle; }
.cat-ico{ display: inline-flex; color: #ff5e00; }
.sug-ico{ display: inline-flex; justify-content: center; color: #8a7d73; }
.sug-chip svg{ width: 17px; height: 17px; vertical-align: -3px; margin-right: 2px; color: #ff5e00; }
.badge-photos{ display: inline-flex; align-items: center; gap: 4px; }
.badge-photos svg{ width: 13px; height: 13px; }
.flash-timer svg{ width: 16px; height: 16px; vertical-align: -3px; }
.vide-ico{ display: flex; justify-content: center; color: #c9bdb2; }
.vide-ico svg{ width: 54px; height: 54px; }
.no-photo{ color: #b9aea4; }
.no-photo svg{ width: 40px; height: 40px; }


/* =========================================================
   TÉLÉPHONE ET TABLETTE (≤ 900 px) — version ordinateur inchangée
========================================================= */
.cat-pastilles,
.btn-filtres,
.filtres-tete,
.filtres-ok,
.filtres-fond,
.nav-recherche .btn-cat-mobile{ display: none; }

@media (max-width: 900px){
    /* ---- Recherche : un seul champ arrondi avec loupe ---- */
    .nav-recherche form{ padding: 10px 12px 8px; gap: 0; }
    .nav-recherche select,
    .nav-recherche form > button{ display: none; }
    .champ-recherche{ position: relative; flex: 1 1 auto; }
    .nav-recherche .recherche-ico{
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        width: 19px;
        height: 19px;
        transform: translateY(-50%);
        fill: none;
        stroke: #8a8a90;
        stroke-width: 2.2;
        stroke-linecap: round;
        pointer-events: none;
    }
    .nav-recherche input,
    .nav-recherche input:focus{
        height: 44px;
        padding: 0 16px 0 44px;
        font-size: 16px;          /* évite le zoom automatique sur iPhone */
        color: #1c1c1e;
        background: #fff;
        border: 0;
        border-radius: 999px;
    }
    .nav-recherche input::placeholder{ color: #8a8a90; }
    .nav-recherche input:focus{ box-shadow: 0 0 0 3px rgba(255,94,0,0.45); }
    .nav-recherche input[type="search"]::-webkit-search-cancel-button{ filter: none; }

    /* ---- Catégories : un bouton à côté de la recherche, qui ouvre la fenêtre des catégories ---- */
    .cat-pastilles{ display: none !important; }
    .nav-recherche form{ gap: 8px; }
    .nav-recherche form > .btn-cat-mobile{
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        max-width: 42%;
        height: 44px;
        min-width: 0;
        padding: 0 14px;
        color: #fff;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 999px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }
    .btn-cat-mobile svg{ flex: none; width: 18px; height: 18px; fill: none; stroke: #ff9a5c; stroke-width: 1.9; stroke-linejoin: round; }
    .btn-cat-mobile span{ min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-recherche form > .btn-cat-mobile.actif{ background: #ff5e00; border-color: #ff5e00; }
    .btn-cat-mobile.actif svg{ stroke: #fff; }

    /* ---- En-tête de la liste + bouton Filtres ---- */
    .articles-entete{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .articles-entete h2{ flex: 1 1 auto; min-width: 0; }
    .btn-filtres{
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 40px;
        padding: 0 14px;
        margin-left: auto;
        color: #1c1c1e;
        background: #fff;
        border: 1px solid #e3dcd5;
        border-radius: 999px;
        font-size: 14px; font-weight: 700;
        font-family: inherit;
        cursor: pointer;
    }
    .btn-filtres svg{ width: 18px; height: 18px; fill: none; stroke: #ff5e00; stroke-width: 2.4; stroke-linecap: round; }
    .btn-filtres b{
        display: inline-grid;
        place-items: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        color: #fff;
        background: #ff5e00;
        border-radius: 999px;
        font-size: 11.5px;
    }
    .btn-filtres b[hidden]{ display: none; }

    /* ---- Filtres dans un panneau qui monte du bas ---- */
    .filtres-fond{
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(10,8,6,0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s;
    }
    .filtres-ouverts .filtres-fond{ opacity: 1; visibility: visible; }
    .filtres-bar,
    .filtres-bar{
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 16px;
        margin: 0;
        max-height: 85vh;
        overflow-y: auto;
        padding: 0 18px calc(18px + env(safe-area-inset-bottom));
        background: #fff;
        border: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s;
    }
    .filtres-ouverts .filtres-bar{ transform: none; visibility: visible; }
    .filtres-ouverts{ overflow: hidden; }
    .filtres-tete{
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0 -18px;
        padding: 18px 18px 6px;
        background: #fff;
        font-size: 17px;
        font-weight: 800;
        color: #1c1c1e;
    }
    .filtres-tete::before{
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        background: #ddd;
        border-radius: 4px;
    }
    .filtres-tete button{
        width: 44px;
        height: 44px;
        margin-right: -10px;
        background: none;
        border: 0;
        color: #555;
        font-size: 18px;
        cursor: pointer;
    }
    .filtre-label{ display: block; font-size: 13px; padding-bottom: 2px; }
    .prix-tiret{ display: inline; }
    .filtre-champ{ gap: 6px; }
    .filtre-tri,
    .filtre-prix,
    .filtre-actions{ flex: none; width: 100%; }
    .filtre-actions{ display: flex; gap: 10px; }
    .filtres-bar select,
    .filtres-bar input[type="number"]{
        height: 46px;
        font-size: 16px;
        border-width: 1.5px;
        border-radius: 12px;
    }
    .filtres-bar select{ padding: 0 40px 0 14px; background-size: 18px; background-position: right 14px center; }
    .prix-duo{ gap: 10px; }
    .prix-duo input[type="number"]{ flex: 1 1 0; width: auto; padding: 0 12px; }
    .filtre-stock{ flex: 1 1 auto; height: 46px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
    .st-long{ display: inline; }
    .st-court{ display: none; }
    .filtre-reset{ width: auto; height: 46px; padding: 0 14px; border-radius: 12px; }
    .reset-texte{ display: inline; }
    .filtres-ok{
        display: block;
        width: 100%;
        height: 50px;
        color: #fff;
        background: #ff5e00;
        border: 0;
        border-radius: 12px;
        font-size: 16px; font-weight: 800;
        font-family: inherit;
        cursor: pointer;
    }

    /* ---- Cartes : grande photo carrée, prix bien visible ---- */
    #grille-articles.grille-articles{ gap: 12px; }
    .grille-articles .carte-article{ border-radius: 14px; }
    .grille-articles .carte-article:hover{ transform: none; }
    .grille-articles .carte-image{ position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f0ece8; }
    .grille-articles .carte-article .carte-image img,
    .grille-articles .carte-article > .no-photo{ width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
    .grille-articles .carte-article > .no-photo{ height: auto; }
    .grille-articles .carte-info{ padding: 9px 10px 10px; }
    .grille-articles .carte-categorie{ font-size: 10.5px; margin-bottom: 2px; }
    .grille-articles .carte-nom{ font-size: 14px; line-height: 1.3; margin-bottom: 2px; cursor: pointer; }
    .grille-articles .carte-desc,
    .grille-articles .desc-toggle,
    .grille-articles .badge-variantes-client{ display: none; }
    .grille-articles .carte-prix{ font-size: 16.5px; font-weight: 800; color: #ff5e00; margin: 2px 0 6px; }
    .grille-articles .carte-badges{ margin-bottom: 8px; }
    .grille-articles .carte-btn{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 40px;
        padding: 8px;
        border-radius: 10px;
        font-size: 13.5px;
    }

    /* ---- Fiche article : plein écran, photos à faire glisser ---- */
    #commande_overlay{ padding: 0; align-items: stretch; background: #fff; }
    #commande_overlay .commande-boite{
        display: flex;
        flex-direction: column;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }
    #commande_overlay .commande-haut{ flex: none; background: #f0ece8; }
    #commande_overlay .commande-haut > img,
    #commande_overlay .commande-haut .no-photo{ width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 58vh; object-fit: contain; }
    .fiche-photos{
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .fiche-photos::-webkit-scrollbar{ display: none; }
    .fiche-photos img{
        flex: 0 0 100%;
        width: 100%;
        height: auto !important;
        aspect-ratio: 1 / 1;
        max-height: 58vh;
        object-fit: contain !important;
        scroll-snap-align: center;
    }
    .fiche-points{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 10px;
        display: flex;
        justify-content: center;
        gap: 6px;
        pointer-events: none;
    }
    .fiche-points span{ width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,0.25); transition: width .2s ease, background .2s ease; }
    .fiche-points span.actif{ width: 18px; border-radius: 4px; background: #ff5e00; }
    #commande_overlay .commande-fermer{
        top: calc(10px + env(safe-area-inset-top));
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.95);
        color: #1c1c1e;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }
    #commande_overlay .btn-fav-modal{ top: calc(13px + env(safe-area-inset-top)); left: 12px; }
    #commande_overlay .commande-corps{ flex: 1 0 auto; display: flex; flex-direction: column; padding: 18px 18px 0; }
    #commande_overlay .commande-nom{ font-size: 20px; }
    #commande_overlay .commande-prix{ font-size: 22px; }
    #commande_overlay .commande-desc{ font-size: 15px; line-height: 1.55; }
    #commande_overlay .btn-commander-maintenant{
        position: sticky;
        bottom: 0;
        margin: auto -18px 0;
        width: calc(100% + 36px);
        padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
        border-radius: 0;
        font-size: 16.5px;
        box-shadow: 0 -6px 18px rgba(0,0,0,0.08);
    }
    #commande_overlay .commande-vendeur{ margin-bottom: 18px; }

    /* ---- Confort tactile ---- */
    .bn-item{ min-height: 52px; }
    .commande-choix select{ min-height: 44px; font-size: 16px; }
}

/* =========================================================
   CHARGEMENT : cartes grises animées à la place de la roue
   (téléphone et ordinateur)
========================================================= */
.squelette{
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ece5df;
    border-radius: 14px;
}
.sq-img,
.sq-l,
.sq-btn{
    background: linear-gradient(90deg, #eee8e2 0%, #f7f3ef 50%, #eee8e2 100%);
    background-size: 200% 100%;
    animation: sq-reflet 1.2s ease-in-out infinite;
}
.sq-img{ aspect-ratio: 1 / 1; }
.sq-l{ height: 11px; margin: 10px 10px 0; border-radius: 6px; }
.sq-l.court{ width: 55%; }
.sq-l.prix{ width: 40%; height: 15px; }
.sq-btn{ height: 38px; margin: 12px 10px 10px; border-radius: 10px; }
@keyframes sq-reflet{ from{ background-position: 200% 0; } to{ background-position: -200% 0; } }
@media (min-width: 901px){
    .squelette{ border-color: #ececf0; border-radius: 10px; }
    .sq-img{ aspect-ratio: auto; height: 120px; }
    .sq-l{ margin: 12px 14px 0; }
    .sq-btn{ height: 36px; margin: 14px 14px 14px; border-radius: 6px; }
}

@media (max-width: 380px){
    .grille-articles .carte-nom{ font-size: 13px; }
    .grille-articles .carte-prix{ font-size: 15px; }
    .grille-articles .carte-btn{ font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce){
    .sq-img, .sq-l, .sq-btn{ animation: none; }
    .filtres-bar, .filtres-fond{ transition: none; }
}


/* Titre lu par Google et les lecteurs d'écran, invisible à l'écran */
.titre-cache{
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


/* =========================================================
   ORDINATEUR : la photo d'un article ouvre sa fiche (comme sur téléphone)
   Plusieurs photos : défilement avec flèches
========================================================= */
.fiche-fleche{ display: none; }
@media (min-width: 901px){
    #commande_overlay .commande-boite{ max-width: 480px; }
    #commande_overlay .commande-haut{ background: #f3f1ef; }
    #commande_overlay .commande-haut > img{ height: 320px; object-fit: contain; background: #f3f1ef; }
    .fiche-photos{
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .fiche-photos::-webkit-scrollbar{ display: none; }
    .fiche-photos img{
        flex: 0 0 100%;
        width: 100%;
        height: 320px !important;
        object-fit: contain !important;
        background: #f3f1ef;
        scroll-snap-align: center;
    }
    .fiche-points{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 10px;
        display: flex;
        justify-content: center;
        gap: 6px;
        pointer-events: none;
    }
    .fiche-points span{ width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,0.25); transition: width .2s ease, background .2s ease; }
    .fiche-points span.actif{ width: 18px; border-radius: 4px; background: #ff5e00; }
    .fiche-fleche{
        position: absolute;
        top: 50%;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        margin-top: -19px;
        padding: 0;
        background: rgba(255,255,255,0.92);
        border: 0;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        color: #1c1c1e;
        cursor: pointer;
    }
    .fiche-fleche svg{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
    .fiche-fleche.prec{ left: 10px; }
    .fiche-fleche.suiv{ right: 10px; }
    .fiche-fleche:hover{ background: #fff; color: #ff5e00; }
    .grille-articles .carte-nom{ cursor: pointer; }
    .grille-articles .carte-nom:hover{ color: #ff5e00; }
}


/* =========================================================
   SUGGESTIONS DE RECHERCHE : les catégories gardent leur style de pastille claire
   (la règle « .nav-recherche button » les transformait en gros carrés orange)
========================================================= */
.nav-recherche .suggestions .sug-chip{
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 40px;
    padding: 8px 14px;
    background: #faf7f4;
    border: 1px solid #ece5df;
    border-radius: 999px;
    color: #1c1c1e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    box-shadow: none;
}
.nav-recherche .suggestions .sug-chip:hover{ background: #fff3ea; border-color: #ff5e00; }
.nav-recherche .suggestions .sug-chip svg{ flex: none; width: 17px; height: 17px; margin: 0; color: #ff5e00; }
.nav-recherche .suggestions .sug-lien,
.nav-recherche .suggestions .sug-x{
    flex: none;
    width: auto;
    min-width: 0;
    height: auto;
    background: none;
    border: 0;
    box-shadow: none;
}
.nav-recherche .suggestions .sug-lien{ padding: 6px 0; color: #ff5e00; font-size: 13px; }
.nav-recherche .suggestions .sug-x{ padding: 4px 8px; color: #999; font-size: 14px; }
.nav-recherche .suggestions .sug-x:hover{ color: #cc4b00; }
