/* ============================================================
   STYLE-PATCHES.CSS - SMARTSWIKA
   Version 2.1.0 â€” Fix Ã‰toiles Avis, Design AliExpress, TÃ©moignages
   ============================================================ */

/* ============================================================
   0. POLICES ARABES Ã‰LÃ‰GANTES
   ============================================================ */
/* ============================================================
   0. POLICES ARABES — chargées via <link> dans le <head>
   ------------------------------------------------------------
   CORRECTIF AUDIT 2026-11-20 : l'@import ci-dessous bloquait le
   rendu (une requête CSS supplémentaire AVANT l'application des
   règles) et retardait le FCP sur mobile 4G. Les familles Cairo et
   Amiri sont désormais demandées dans la même feuille Google Fonts
   que Inter/Playfair, avec preconnect + display=swap.
   NE PAS RÉINTRODUIRE D'@import ICI.
   ============================================================ */

/* ============================================================
   1. NAVBAR â€” FIX MOBILE / TABLETTE
   ============================================================ */
@media screen and (max-width: 900px) {

    html body #navbar ul.nav-links,
    html body #navbar .nav-links,
    html body .nav-links {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }

    html body #navbar .burger-btn,
    html body #navbar button.burger-btn,
    html body .burger-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important;
        width: 44px !important;
        height: 44px !important;
        padding: 10px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
    }

    html body #navbar .burger-btn span,
    html body .burger-btn span {
        display: block !important;
        width: 24px !important;
        height: 2.5px !important;
        background: var(--text) !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }

    html body #navbar {
        flex-wrap: nowrap !important;
        overflow: visible !important;
        gap: 0.3rem !important;
    }

    html body #navbar .nav-left {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        max-width: 45% !important;
    }

    html body #navbar .nav-right {
        flex: 1 1 auto !important;
        justify-content: flex-end !important;
        gap: 0.3rem !important;
        min-width: 0 !important;
    }

    html body #navbar .logo-text {
        font-size: 0.95rem !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: inline-block !important;
        max-width: 100% !important;
    }

    html body #navbar .btn-account span {
        display: none !important;
    }

    html body #navbar .btn-account {
        padding: 0.5rem !important;
        min-width: 40px !important;
        justify-content: center !important;
    }

    html body #navbar #langSelect {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.3rem !important;
        max-width: 70px !important;
    }
}

@media screen and (max-width: 400px) {
    html body #navbar .logo-text {
        font-size: 0.85rem !important;
        letter-spacing: 0.3px !important;
    }
    html body #navbar #langSelect {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.25rem !important;
        max-width: 60px !important;
    }
}

@media screen and (max-width: 360px) {
    html body #navbar .logo-text {
        font-size: 0.78rem !important;
    }
    html body #navbar #langSelect {
        font-size: 0.6rem !important;
        max-width: 55px !important;
    }
}

/* ============================================================
   1b. ANIMATION BURGER â†’ CROIX QUAND OUVERT
   ============================================================ */
.burger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
}
.burger-btn.open span:nth-child(2) {
    opacity: 0 !important;
}
.burger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px) !important;
}

/* ============================================================
   1c. LOGO ARABE â€” POLICE AMIRI
   ============================================================ */
html[lang="ar"] .logo-text,
html[dir="rtl"] .logo-text {
    font-family: 'Amiri', 'Playfair Display', Georgia, serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
}

html[lang="ar"] .footer-logo,
html[dir="rtl"] .footer-logo {
    font-family: 'Amiri', 'Playfair Display', Georgia, serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

html[lang="ar"] .section-title,
html[dir="rtl"] .section-title,
html[lang="ar"] .hero-title,
html[dir="rtl"] .hero-title,
html[lang="ar"] .product-title,
html[dir="rtl"] .product-title,
html[lang="ar"] .product-features-title,
html[dir="rtl"] .product-features-title,
html[lang="ar"] .cart-page-title,
html[dir="rtl"] .cart-page-title,
html[lang="ar"] .cart-page-summary-title,
html[dir="rtl"] .cart-page-summary-title,
html[lang="ar"] .cart-page-form-title,
html[dir="rtl"] .cart-page-form-title {
    font-family: 'Amiri', 'Playfair Display', serif !important;
    letter-spacing: 0 !important;
}

@media screen and (max-width: 900px) {
    html[lang="ar"] .logo-text,
    html[dir="rtl"] .logo-text {
        font-size: 1.2rem !important;
    }
    html[lang="ar"] .footer-logo,
    html[dir="rtl"] .footer-logo {
        font-size: 1.7rem !important;
    }
}

@media screen and (max-width: 400px) {
    html[lang="ar"] .logo-text,
    html[dir="rtl"] .logo-text {
        font-size: 1.1rem !important;
    }
}

@media screen and (max-width: 360px) {
    html[lang="ar"] .logo-text,
    html[dir="rtl"] .logo-text {
        font-size: 1rem !important;
    }
}

/* ============================================================
   2. MENU MOBILE â€” FIX COMPLET
   ============================================================ */
@media screen and (max-width: 900px) {

    .nav-mobile {
        display: none !important;
        position: fixed !important;
        top: var(--nav-height) !important;
        inset-inline-start: 0 !important;
        inset-inline-end: 0 !important;
        background: var(--bg-card) !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 0.5rem 0 !important;
        flex-direction: column !important;
        gap: 0 !important;
        z-index: 9998 !important;
        max-height: calc(100dvh - var(--nav-height)) !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
        pointer-events: auto !important;
    }

    .nav-mobile.open {
        display: flex !important;
        animation: slideDownMenu 0.25s ease-out !important;
    }

    @keyframes slideDownMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-mobile a {
        display: block !important;
        padding: 0.9rem 1.5rem !important;
        font-size: 0.95rem !important;
        color: var(--text) !important;
        text-decoration: none !important;
        border-bottom: 1px solid var(--border) !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transition: background 0.2s, color 0.2s !important;
        text-align: left !important;
    }

    .nav-mobile a:hover,
    .nav-mobile a:active {
        background: rgba(var(--gold-rgb), 0.08) !important;
        color: var(--gold) !important;
    }

    .nav-mobile a:last-child {
        border-bottom: none !important;
    }

    [dir="rtl"] .nav-mobile a {
        text-align: right !important;
    }
}

/* ============================================================
   3. BANNIÃˆRE IMAGE
   ============================================================ */
.newphoto-banner-wrapper {
    max-width: var(--container-max);
    margin: 0 auto 1rem;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

.responsive-hero-image {
    width: 100%;
    height: auto;
    max-height: 45vh;
    min-height: 180px;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #f0ebe0, #e5dfd2);
    padding: 0.5rem;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .responsive-hero-image {
        max-height: 40vh;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 600px) {
    .newphoto-banner-wrapper {
        padding: 0 0.6rem;
    }
    .responsive-hero-image {
        max-height: 45vh;
        min-height: 200px;
        border-radius: var(--radius-md);
        padding: 0.4rem;
    }
}

@media (max-width: 360px) {
    .responsive-hero-image {
        min-height: 160px;
        max-height: 42vh;
        padding: 0.3rem;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .responsive-hero-image {
        max-height: 55vh;
        min-height: 120px;
    }
}

[dir="rtl"] .responsive-hero-image {
    object-position: center;
}

/* ============================================================
   4. ESPACE BAS DE PAGE
   ============================================================ */
body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.product-page,
main.product-page,
main[data-product-page] {
    padding-bottom: 10rem !important;
}

.cart-page-main {
    padding-bottom: 10rem !important;
}

.villes-container,
main.villes-container {
    padding-bottom: 8rem !important;
}

main.container,
main#main {
    padding-bottom: 8rem !important;
}

.section:last-of-type {
    padding-bottom: 5rem;
}

@media (min-width: 1024px) {
    .product-page,
    main.product-page,
    main[data-product-page],
    .cart-page-main,
    .villes-container,
    main.villes-container,
    main.container,
    main#main {
        padding-bottom: 5rem !important;
    }
}

/* ============================================================
   5. BOUTON PANIER FLOTTANT
   ============================================================ */
.cart-btn-float {
    position: fixed !important;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
    inset-inline-end: 1.5rem !important;
    z-index: 998 !important;
}

@media (max-width: 480px) {
    .cart-btn-float {
        width: 54px !important;
        height: 54px !important;
        bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
        inset-inline-end: 1.2rem !important;
    }
}

/* ============================================================
   6. BOUTON RETOUR EN HAUT
   ============================================================ */
.back-to-top {
    position: fixed !important;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
    inset-inline-end: 2rem !important;
    z-index: 997 !important;
}

@media (max-width: 480px) {
    .back-to-top {
        width: 44px !important;
        height: 44px !important;
        bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px)) !important;
        inset-inline-end: 1.5rem !important;
        font-size: 1.2rem !important;
    }
}

/* ============================================================
   7. PAGE PRODUIT
   ============================================================ */

/* ------------------------------------------------------------
   FIX PRIX BARRÃ‰
   ------------------------------------------------------------ */
.product-old-price {
    position: relative !important;
    display: inline-block !important;
    text-decoration: line-through !important;
    -webkit-text-decoration-line: line-through !important;
    text-decoration-thickness: 1px !important;
    color: var(--text-muted) !important;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
}

.product-old-price::after {
    content: '' !important;
    position: absolute !important;
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    top: 50% !important;
    height: 1.5px !important;
    background: currentColor !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    opacity: 0.85 !important;
}

.p-price small,
.cart-item-old-price,
.cart-suggestion-old {
    position: relative !important;
    display: inline-block !important;
    text-decoration: line-through !important;
}

.p-price small::after,
.cart-item-old-price::after,
.cart-suggestion-old::after {
    content: '' !important;
    position: absolute !important;
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    top: 50% !important;
    height: 1px !important;
    background: currentColor !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    opacity: 0.85 !important;
}

/* ------------------------------------------------------------
   CONTENEUR FIXE (Aspect-Ratio 1:1) ET VIDÃ‰O ENTIÃˆREMENT VISIBLE
   ------------------------------------------------------------ */
.product-main-img-wrapper {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 auto !important;
}

.product-main-img-wrapper img,
.product-main-img-wrapper video,
.main-media-element,
#mainImage,
#mainVideo {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    background: #000 !important;
    margin: 0 auto !important;
    border-radius: var(--radius-md) !important;
}

.product-details-secondary {
    padding-bottom: 3rem !important;
    margin-top: 1rem;
}

.product-desc {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    color: var(--text-muted) !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    padding-bottom: 2rem !important;
    margin-bottom: 1rem !important;
}

.product-thumbnails {
    display: flex !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    margin-top: 0.8rem !important;
    justify-content: center !important;
}

.product-thumbnails img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--border) !important;
    cursor: pointer !important;
    transition: border-color 0.2s, transform 0.2s !important;
    background: var(--bg-surface);
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
    border-color: var(--gold) !important;
    transform: scale(1.05) !important;
}

.product-features-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0.8rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.product-features-list li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    font-size: 0.9rem !important;
    color: var(--text) !important;
    line-height: 1.5 !important;
}

.feature-check {
    color: var(--gold) !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

.feature-text {
    flex: 1 !important;
    min-width: 0 !important;
    word-break: break-word !important;
}

.product-price-stock-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 0.8rem !important;
    flex-wrap: wrap !important;
    margin: 0.8rem 0 !important;
}

.product-price-block {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
}

.product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    margin-top: 1rem !important;
}

@media (min-width: 600px) {
    .product-actions {
        flex-direction: row !important;
    }
    .product-actions .btn-primary,
    .product-actions .btn-secondary {
        flex: 1 !important;
    }
}

.product-actions .btn-primary,
.product-actions .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1.2rem !important;
}

.breadcrumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0.8rem !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.breadcrumbs a {
    color: var(--gold) !important;
    text-decoration: none !important;
}

.related-products-container {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid var(--border) !important;
}

.related-products-container .product-card {
    min-width: 0 !important;
}

[dir="rtl"] .product-features-list li {
    flex-direction: row-reverse !important;
    text-align: right !important;
}

[dir="rtl"] .breadcrumbs {
    flex-direction: row-reverse !important;
}

/* ============================================================
   8. PAGE VILLES
   ============================================================ */
.villes-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.villes-table {
    min-width: 500px;
}

@media (max-width: 600px) {
    .villes-container {
        padding: 0 0.8rem;
    }
    .villes-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem;
    }
    .ville-stat-card {
        padding: 0.7rem;
    }
    .ville-stat-card strong {
        font-size: 1.2rem;
    }
    .ville-stat-card span {
        font-size: 0.7rem;
    }
    .villes-table th,
    .villes-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* ============================================================
   9. PAGE BLOG
   ============================================================ */
@media (max-width: 600px) {
    .blog-article-body {
        padding: 1.2rem;
    }
    .blog-article-close {
        top: 0.6rem;
        inset-inline-end: 0.6rem;
        width: 36px;
        height: 36px;
    }
    .blog-search-bar input {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
}

/* ============================================================
   10. PAGE PANIER
   ============================================================ */
@media (max-width: 480px) {
    .cart-page-item {
        grid-template-columns: 80px 1fr !important;
        padding: 0.8rem !important;
        gap: 0.8rem !important;
    }
    .cart-page-item-img {
        width: 80px !important;
        height: 80px !important;
    }
    .cart-page-item-name {
        font-size: 0.88rem !important;
    }
    .cart-page-summary,
    .cart-page-form {
        padding: 1.1rem !important;
    }
}

/* ============================================================
   11. SECTION HERO
   ============================================================ */
@media (max-width: 600px) {
    .hero-section {
        padding: 1rem 1rem 1.5rem;
    }
    .hero-title {
        font-size: clamp(1.3rem, 5.5vw, 2rem);
    }
    .hero-sub {
        font-size: 0.9rem;
    }
    .hero-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ============================================================
   12. BANNIÃˆRES CARROUSELS
   ============================================================ */
@media (max-width: 768px) {
    .banners-section {
        grid-template-columns: 1fr !important;
        gap: 1.2rem;
    }
    .banner-wrapper {
        padding: 1rem;
    }
    .banner-item {
        flex: 0 0 calc(50% - 12px);
        margin-inline-end: 12px;
    }
}

@media (max-width: 480px) {
    .banner-track-wrapper {
        border-radius: var(--radius-md);
    }
    .banner-nav {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* ============================================================
   13. PRODUITS - Grille
   ------------------------------------------------------------
   Mesures relevees sur la prod AVANT ce changement (2026-11-18) :
     - 1440 px : 2 x 551 px (cartes enormes, 2 produits par ligne) ;
     - 768 px  : 2 x 328 px ;
     - 390 px  : 2 x 149 px, nom tronque, footer sur 2 lignes ;
     - 360 px  : 2 x 134 px, footer sur 3 lignes.
   Cible : 4 colonnes sur desktop, 3 sur tablette, 2 colonnes
   densifiees sur mobile (nom sur 2 lignes, description masquee).
   ============================================================ */

/* Desktop : 4 colonnes (vitrine type marketplace). */
@media (min-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
    /* Cartes plus etroites : on resserre ce qui deborderait. */
    .product-body {
        padding: 0.7rem;
    }
    .flash-card-countdown {
        font-size: 0.66rem;
        padding: 0.2rem 0.4rem;
        gap: 0.25rem;
    }
}

/* Tablette / petit desktop : 3 colonnes. */
@media (min-width: 768px) and (max-width: 1099px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile : 2 colonnes densifiees. */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem;
    }
    /* Padding reduit : rend ~20 px de largeur utile aux cartes. */
    .products-wrap {
        padding: 0.45rem;
        border-radius: var(--radius-md);
    }
    #produits {
        padding-inline-start: 0.5rem;
        padding-inline-end: 0.5rem;
    }
    .product-body {
        padding: 0.5rem;
    }
    /* Nom sur 2 lignes au lieu d une ligne tronquee. */
    .p-name {
        font-size: 0.78rem;
        line-height: 1.25;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: clip;
        min-height: 0;
    }
    /* Description masquee : elle poussait prix et bouton hors de la carte. */
    .p-desc {
        display: none;
    }
    .p-stats {
        font-size: 0.62rem;
        margin-bottom: 0.35rem;
    }
    .p-footer {
        gap: 0.25rem;
    }
    .p-price {
        font-size: 0.85rem;
        gap: 0.2rem;
    }
    .p-price small {
        font-size: 0.62rem;
    }
    .btn-add-to-cart {
        padding: 0.2rem 0.45rem;
        font-size: 0.62rem;
    }
    .badge {
        font-size: 0.55rem;
        padding: 0.12rem 0.4rem;
        top: 0.35rem;
        inset-inline-start: 0.35rem;
    }
    .favorite-btn {
        width: 26px;
        height: 26px;
        font-size: 0.78rem;
        top: 0.35rem;
        inset-inline-end: 0.35rem;
    }
    .flash-card-countdown {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        gap: 0.2rem;
        margin-bottom: 0.3rem;
    }
    .flash-card-countdown .flash-timer {
        font-size: 0.6rem;
    }
}

/* ============================================================
   13 bis. SECTIONS DE CONTENU DE L ACCUEIL
   ------------------------------------------------------------
   Audit du 2026-11-18. Les trois grilles (.features-grid,
   .trust-badges, .about-grid) etaient en UNE SEULE COLONNE, sans
   aucune media query. Mesures prod a 1440 px :
     - engagements      : 6 cartes x 1168 px, section 1313 px ;
     - confiance        : 4 cartes x 1168 px, section  923 px ;
     - qui sommes-nous  : 4 cartes x 1168 px, section  831 px.
   Soit ~3067 px de defilement pour trois blocs de contenu court.

   Nouvelle mise en page :
     engagements : 3 col. >= 1100 | 2 col. 640-1099 | 2 col. mobile
     confiance   : 4 col. >= 1100 | 2 col. 640-1099 | 2 col. mobile
     a-propos    : 2 col. >= 640  | 1 col. mobile (textes longs)
   ============================================================ */

/* Cartes de hauteur egale dans chaque rangee. */
.feature-card,
.trust-badge-item,
.about-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* L icone reste centree malgre le passage en flex. */
.feature-icon,
.trust-badge-icon {
    align-self: center;
}

/* ---------- Nos engagements (6 cartes) ---------- */

@media (min-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 640px) and (max-width: 1099px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 639px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .feature-card {
        padding: 0.9rem 0.7rem;
    }
    .feature-icon {
        margin-bottom: 0.5rem;
    }
    .feature-icon svg {
        width: 30px;
        height: 30px;
    }
    .feature-card h3 {
        font-size: 0.95rem;
        line-height: 1.2;
    }
    .feature-card p {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}

/* ---------- Achetez en toute confiance (4 cartes) ---------- */

@media (min-width: 1100px) {
    .trust-badges {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 640px) and (max-width: 1099px) {
    .trust-badges {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 639px) {
    .trust-badges {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .trust-badge-item {
        padding: 0.9rem 0.7rem;
    }
    .trust-badge-icon svg {
        width: 30px;
        height: 30px;
    }
    .trust-badge-item strong {
        font-size: 0.85rem;
    }
    .trust-badge-item small {
        font-size: 0.75rem;
        line-height: 1.35;
    }
}

/* ---------- Qui sommes-nous ? (4 textes longs) ---------- */

@media (min-width: 640px) {
    .about-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 639px) {
    .about-grid {
        gap: 0.85rem;
    }
    .about-card {
        padding: 1.1rem;
    }
    .about-card h3 {
        font-size: 1rem;
    }
    .about-card p {
        font-size: 0.86rem;
    }
}

/* ============================================================
   14. TRUST BAR
   ============================================================ */
@media (max-width: 600px) {
    .trust-bar {
        gap: 0.5rem 1rem;
        padding: 0.7rem 0.8rem;
    }
    .trust-item {
        font-size: 0.75rem;
    }
}

/* ============================================================
   15. FOOTER
   ============================================================ */
@media (max-width: 600px) {
    .site-footer {
        padding: 1.5rem 1rem;
    }
    .footer-logo {
        font-size: 1.3rem;
    }
    .footer-contact {
        flex-direction: column;
        gap: 0.6rem;
    }
    .footer-social-links {
        gap: 0.8rem;
    }
}

/* ============================================================
   16. PROMO BANNER MARQUEE
   ------------------------------------------------------------
   Sur mobile, le marquee (padding-left: 100% + animation) coupait
   le texte des deux cotes : a 390 px, le texte de 355 px etait
   positionne de -65 a 290 (mesure prod du 2026-11-18). Il tient
   pourtant dans 370 px utiles : on desactive donc le defilement,
   on centre le texte et on retire le masque lateral.
   ============================================================ */
@media (max-width: 480px) {
    .navbar-promo-banner {
        font-size: 0.7rem;
        padding: 0.3rem 0.55rem;
        white-space: normal;
        line-height: 1.3;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .navbar-promo-banner .marquee-text {
        display: block;
        padding-inline-start: 0;
        animation: none;
        white-space: normal;
    }
}

/* ============================================================
   17. RTL - Arabe
   ============================================================ */
[dir="rtl"] .nav-links {
    direction: rtl;
}

[dir="rtl"] .cart-btn-float {
    right: auto !important;
    left: 1.5rem !important;
}

[dir="rtl"] .back-to-top {
    right: auto !important;
    left: 2rem !important;
}

/* ============================================================
   18. LANDSCAPE MOBILE
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: calc(var(--nav-height) + 4px);
    }
    .hero-section {
        padding: 0.8rem 1rem;
    }
    .hero-glow {
        display: none;
    }
    .product-page,
    .cart-page-main,
    .villes-container,
    main.container,
    main#main {
        padding-bottom: 3rem !important;
    }
}

/* ============================================================
   19. SAFE AREA - iPhone avec encoche
   ============================================================ */
@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: calc(var(--nav-height) + 8px + env(safe-area-inset-top, 0px));
    }
    #navbar {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    }
    .nav-mobile {
        top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - var(--nav-height) - env(safe-area-inset-top, 0px));
    }
}

/* ============================================================
   20. FIX DIVERS
   ============================================================ */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

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

table {
    max-width: 100%;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ============================================================
   21. MINIATURE VIDÃ‰O (Galerie produit)
   ============================================================ */
.thumb-video {
    position: relative !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--border) !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: border-color 0.2s, transform 0.2s !important;
    flex-shrink: 0 !important;
    background: #000 !important;
}

.thumb-video img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 0.7 !important;
}

.thumb-video .play-icon-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
}

.thumb-video .play-icon-overlay > div {
    width: 28px !important;
    height: 28px !important;
    background: rgba(165, 123, 46, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4) !important;
}

.thumb-video:hover,
.thumb-video.active {
    border-color: var(--gold) !important;
    transform: scale(1.05) !important;
}

@media (max-width: 600px) {
    .thumb-video {
        width: 50px !important;
        height: 50px !important;
    }
    .thumb-video .play-icon-overlay > div {
        width: 22px !important;
        height: 22px !important;
    }
}

/* ============================================================
   22. SYSTÃˆME D'Ã‰TOILES POUR LES AVIS (Formulaire)
   ============================================================ */
.review-star-input {
    display: inline-flex;
    gap: 0.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    direction: ltr;
}

.review-star-input .star {
    color: var(--text-dim); /* Gris par dÃ©faut */
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
}

/* Survol (Hover) */
.review-star-input .star.hover,
.review-star-input .star:hover {
    color: var(--gold-light) !important;
    transform: scale(1.1);
}

/* SÃ©lectionnÃ© (Clic) */
.review-star-input .star.active {
    color: var(--gold) !important;
}

/* Label de note (ex: 3/5) */
#reviewStarLabel {
    font-family: var(--font-primary);
    font-weight: 800;
    color: var(--gold);
    background: rgba(165, 123, 46, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    border: 1px solid var(--border-gold);
    min-width: 50px;
    text-align: center;
}

/* ============================================================
   23. REVIEW MODAL (Quick Review - Mes Commandes)
   ============================================================ */
.review-modal-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    cursor: pointer;
    direction: ltr;
    margin-bottom: 1rem;
}

.review-modal-stars .star {
    color: var(--text-dim);
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.review-modal-stars .star:hover,
.review-modal-stars .star.hover {
    color: var(--gold-light);
    transform: scale(1.1);
}

.review-modal-stars .star.active {
    color: var(--gold);
}

/* ============================================================
   24. AFFICHAGE DES AVIS (Style AliExpress)
   ============================================================ */
.review-item {
    transition: background 0.2s ease;
}

.review-item:hover {
    background: var(--bg-surface);
}

/* Bouton Voir Tout les avis */
#toggleReviewsBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    transition: all 0.2s;
}

#toggleReviewsBtn:hover {
    background: var(--gold);
    color: white;
    box-shadow: var(--shadow-gold);
}

/* ============================================================
   25. DESIGN DES TÃ‰MOIGNAGES (2 Colonnes + RTL)
   ============================================================ */

/* Grille responsive de la page d'accueil */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 par ligne sur tablette */
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 par ligne sur desktop */
    }
}

/* Carte TÃ©moignage */
.testimonial-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-md);
}

/* Colonne Image (Gauche en FR/EN, Droite en AR) */
.testimonial-img-col {
    width: 140px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 0.5rem;
}

.testimonial-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.testimonial-img-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
}

.testimonial-product-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Colonne Contenu (Ã‰toiles, Nom, Avis) */
.testimonial-content-col {
    flex: 1;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.testimonial-stars {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.t-author-name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.testimonial-verified {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.testimonial-city {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    display: block;
}

.testimonial-comment {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-style: italic;
    margin-top: 0.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* âœ… RTL - Arabe (Inverser les colonnes) */
[dir="rtl"] .testimonial-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .testimonial-img-col {
    border-right: none;
    border-left: 1px solid var(--border);
}

[dir="rtl"] .testimonial-content-col {
    text-align: right;
}

[dir="rtl"] .testimonial-author {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* âœ… Responsive (Mobile) */
@media (max-width: 600px) {
    .testimonial-img-col {
        width: 110px;
        padding: 0.8rem;
    }
    .testimonial-img, .testimonial-img-placeholder {
        width: 80px;
        height: 80px;
    }
    .testimonial-content-col {
        padding: 1rem;
    }
    .testimonial-comment {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }
}

/* ============================================================
   LOG
   ============================================================ */
/* style-patches.css v2.1.0 â€” Fix Ã‰toiles Avis, Design AliExpress, TÃ©moignages */

/* ============================================================
   VENTE FLASH â€” AFFICHAGE CLIENT (audit 2026-11-16)
   ------------------------------------------------------------
   InspirÃ© des places de marchÃ© (AliExpress / Temu) : badge pulsant,
   bandeau compte Ã  rebours, prix remisÃ© en Ã©vidence, prix barrÃ©.
   Toutes les valeurs sont bornÃ©es et testÃ©es cÃ´tÃ© serveur.
   ============================================================ */
.flash-badge {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 3;
  background: linear-gradient(135deg, #ff4e50 0%, #f9701c 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(249, 112, 28, 0.45);
  animation: flashPulse 1.8s ease-in-out infinite;
}

@keyframes flashPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(249, 112, 28, 0.45); }
  50%      { transform: scale(1.06); box-shadow: 0 4px 14px rgba(249, 112, 28, 0.65); }
}

/* Bandeau compte Ã  rebours en haut du corps de carte */
.flash-card-countdown {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: -0.15rem 0 0.4rem;
  padding: 0.24rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,78,80,0.12) 0%, rgba(249,112,28,0.12) 100%);
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.flash-card-countdown .flash-timer {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.74rem;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: rgba(194, 65, 12, 0.12);
}

/* Prix remisÃ© : mis en avant, prix de rÃ©fÃ©rence barrÃ© */
.p-price.p-price-flash {
  color: #c2410c;
  font-weight: 800;
}

.p-price.p-price-flash small {
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-inline-start: 0.35rem;
}

/* Carte en vente flash : liserÃ© discret */
.product-card.has-flash {
  border-color: rgba(249, 112, 28, 0.45);
  box-shadow: 0 0 0 1px rgba(249, 112, 28, 0.25);
}

/* Pastille de dÃ©lai dans le panier (correctif C13) */
.cart-delivery-delay {
  display: inline-block;
  margin-inline-start: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(165, 123, 46, 0.12);
  color: var(--gold, #a57b2e);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .flash-badge { animation: none; }
}


/* ============================================================
   DELAI DE LIVRAISON REEL PAR VILLE (correctif C13)
   ------------------------------------------------------------
   Affiche sous le libelle Â« Livraison Â» du panier le delai exact
   synchronise depuis Livo pour la ville selectionnee (24h / 48h / 72h).
   Style discret : pastille doree, taille reduite, sans gras.
   ============================================================ */
/* ============================================================
   SECTION VENTES FLASH â€” ACCUEIL (audit 2026-11-16)
   ------------------------------------------------------------
   Charte respectee : or #a57b2e sur ivoire, Playfair pour le titre,
   rouge sombre #b03a2e reserve au compte a rebours.
   Aucun orange criard. Aucun liserÃ© agressif.
   La section est `hidden` par defaut : le JS l'affiche seulement
   s il existe au moins une vente active.
   ============================================================ */
.flash-hero {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.flash-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.6rem 1.35rem 1.35rem;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(212, 163, 75, 0.10) 0%, rgba(248, 246, 242, 0) 55%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%);
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 34px -18px rgba(165, 123, 46, 0.40);
}

.flash-hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.flash-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(165, 123, 46, 0.12);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flash-hero-title {
  font-family: var(--font-secondary);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: var(--text);
  margin: 0.55rem 0 0.25rem;
  letter-spacing: -0.01em;
}

.flash-hero-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  max-width: 46ch;
}

/* Compte a rebours : seul endroit ou le rouge sombre apparait */
.flash-hero-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.flash-hero-timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}

.flash-hero-timer-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--danger);
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  background: rgba(176, 58, 46, 0.07);
  border: 1px solid rgba(176, 58, 46, 0.16);
}

/* Carrousel horizontal */
.flash-hero-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-gold) transparent;
}

.flash-hero-track::-webkit-scrollbar { height: 6px; }
.flash-hero-track::-webkit-scrollbar-thumb {
  background: var(--border-gold);
  border-radius: 3px;
}

/* Carte produit dans le carrousel */
.flash-item {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.flash-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -16px rgba(26, 26, 46, 0.35);
  border-color: var(--border-gold);
}

.flash-item-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f3efe7;
  overflow: hidden;
}

.flash-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flash-item-pct {
  position: absolute;
  top: 0.45rem;
  inset-inline-start: 0.45rem;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px -2px rgba(165, 123, 46, 0.6);
}

.flash-item-body {
  padding: 0.6rem 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.flash-item-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
}

.flash-item-prices {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: auto;
}

.flash-item-now {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
}

.flash-item-was {
  font-size: 0.76rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* Barre de progression du stock vendu (si quota defini) */
.flash-item-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(165, 123, 46, 0.14);
  overflow: hidden;
  margin-top: 0.15rem;
}

.flash-item-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 2px;
}

.flash-item-stock {
  font-size: 0.68rem;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .flash-hero-inner { padding: 1.2rem 1rem 1rem; border-radius: 14px; }
  .flash-hero-timer { align-items: flex-start; }
  .flash-hero-track { grid-auto-columns: minmax(150px, 1fr); gap: 0.7rem; }
}




/* ============================================================
   DRAPEAUX DU SELECTEUR DE LANGUE â€” images SVG
   ------------------------------------------------------------
   Les drapeaux emoji (ðŸ‡²ðŸ‡¦ ðŸ‡«ðŸ‡· ðŸ‡¬ðŸ‡§) ne s'affichent PAS de faÃ§on
   fiable : sous Windows la police Segoe UI Emoji ne contient pas
   les glyphes "regional indicator", et le navigateur retombe sur
   les initiales du pays -> l'utilisateur voit Â« FR FR Â» au lieu
   du drapeau.

   Solution : de vraies images SVG dans /assets/, posÃ©es en
   background-image par langue. Fonctionne partout, sans dÃ©pendre
   d'une police emoji installÃ©e.

   Astuce de positionnement : on garde les <option> avec le code
   langue seul (AR / FR / EN) et on rÃ©serve un espace Ã  gauche du
   select pour le drapeau correspondant Ã  la langue ACTIVE.
   ============================================================ */
select#langSelect,
.legal-lang-select,
.login-lang-select,
.v-lang-select,
#langSelect {
  /* Espace rÃ©servÃ© au drapeau dessinÃ© en background. */
  padding-left: 34px !important;
  background-repeat: no-repeat !important;
  background-position: 10px center !important;
  background-size: 18px 12px !important;
  background-color: #ffffff;
}

/* Drapeau selon la langue actuellement sÃ©lectionnÃ©e.
   [dir] est posÃ© sur <html> par setLang() / initLangToggle(). */
html[lang="ar"] select#langSelect,
html[lang="ar"] .legal-lang-select,
html[lang="ar"] .login-lang-select,
html[lang="ar"] .v-lang-select {
  background-image: url("/assets/flag-ma.svg") !important;
}

html[lang="fr"] select#langSelect,
html[lang="fr"] .legal-lang-select,
html[lang="fr"] .login-lang-select,
html[lang="fr"] .v-lang-select {
  background-image: url("/assets/flag-fr.svg") !important;
}

html[lang="en"] select#langSelect,
html[lang="en"] .legal-lang-select,
html[lang="en"] .login-lang-select,
html[lang="en"] .v-lang-select {
  background-image: url("/assets/flag-gb.svg") !important;
}

/* En RTL le drapeau passe Ã  droite. */
html[dir="rtl"] select#langSelect,
html[dir="rtl"] .legal-lang-select,
html[dir="rtl"] .login-lang-select,
html[dir="rtl"] .v-lang-select {
  padding-left: 0 !important;
  padding-right: 34px !important;
  background-position: right 10px center !important;
}

/* La liste dÃ©roulante ouverte ne peut pas afficher d'image : on y
   remet les drapeaux emoji en secours, et Ã  dÃ©faut le code langue
   reste lisible. Aucun risque : le code est toujours prÃ©sent. */

/* ============================================================
   VITRINE COMMERCIALE â€” KOULCHI (achat groupe) + VENTES FLASH
   ------------------------------------------------------------
   Direction artistique inspiree des places de marche asiatiques
   (AliExpress / Temu) : contraste eleve, bandeau degrade, prix en
   rouge, badge de remise massif et preuve sociale (etoiles + ventes).

   Charte respectee :
     - l or (#a57b2e) reste la signature de Koulchi (bandeau, tag) ;
     - le rouge/orange signale uniquement l urgence commerciale
       (remise, prix, compte a rebours) ;
     - tout est scope sous #koulchiSection / #flashSection, donc le
       reste du site n est pas touche.
   ============================================================ */

.promo-duo {
  --promo-red: #e5321b;
  --promo-red-dark: #bf1d0a;
  --promo-orange: #ff7a1a;
  --promo-ink: #17110c;
  --promo-muted: #8a7f75;
  --promo-line: rgba(23, 17, 12, 0.09);
  gap: 1.25rem;
}

/* ---------------------------------------------- KOULCHI (gauche) */

#koulchiSection .koulchi-home-inner {
  max-width: none;
  padding: 0 0 1rem;
  border-radius: 22px;
  border: 1px solid rgba(var(--gold-rgb), 0.22);
  background: #fff;
  box-shadow: 0 26px 60px -38px rgba(120, 88, 20, 0.55),
    0 1px 0 rgba(var(--gold-rgb), 0.06);
  overflow: hidden;
}

#koulchiSection .koulchi-home-head {
  position: relative;
  text-align: center;
  margin: 0 0 0.85rem;
  padding: 1.05rem 1.2rem 1.1rem;
  background: linear-gradient(135deg, #fffdf6 0%, #fdf3dd 48%, #f8e6bd 100%);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.22);
}

#koulchiSection .koulchi-home-head::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--gold-rgb), 0.22),
    rgba(var(--gold-rgb), 0) 68%
  );
  pointer-events: none;
}

#koulchiSection .koulchi-home-tag {
  margin-bottom: 0.5rem;
  padding: 0.28rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: 0 8px 18px -12px rgba(120, 88, 20, 0.9);
}

#koulchiSection .koulchi-home-head .section-title {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--promo-ink);
  line-height: 1.15;
}

/* Titre cliquable vers la page dediee (demande client 2026-11-18).
   Le h2 reste dans le lien pour conserver aria-labelledby de la
   section (#koulchiHomeTitle). */
#koulchiSection .koulchi-home-title-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

#koulchiSection .koulchi-home-title-link:hover .section-title,
#koulchiSection .koulchi-home-title-link:focus-visible .section-title {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

#koulchiSection .koulchi-home-title-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#koulchiSection .koulchi-home-head .section-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--promo-muted);
}

#koulchiSection .koulchi-home-rules {
  margin: 0 auto 0.9rem;
  padding: 0 1.1rem;
  gap: 0.45rem;
}

#koulchiSection .koulchi-home-rules li {
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f4efe3;
  color: #6b5a3a;
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.18);
}

#koulchiSection .koulchi-home-rules li:nth-child(1) {
  background: #f6ecd4;
  color: #7a5c17;
}

#koulchiSection .koulchi-home-rules li:nth-child(2) {
  background: #ffe9d3;
  color: #a8410f;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.28);
}

#koulchiSection .koulchi-home-rules li:nth-child(3) {
  background: linear-gradient(135deg, var(--promo-orange), var(--promo-red));
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(229, 50, 27, 0.9);
}

#koulchiSection .koulchi-home-rules li strong {
  color: inherit;
  font-weight: 800;
}
#koulchiSection .koulchi-chips {
  padding: 0 1.1rem 0.75rem;
}

#koulchiSection .koulchi-chip {
  border: 1px solid var(--promo-line);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #544a3f;
  background: #fff;
}

#koulchiSection .koulchi-chip.is-active {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
}

#koulchiSection .koulchi-home-track {
  padding: 0 1.1rem 0.4rem;
  gap: 0.75rem;
}

#koulchiSection .koulchi-card {
  flex: 0 0 178px;
}

#koulchiSection .koulchi-card-link {
  gap: 0.3rem;
  padding: 0.5rem 0.5rem 0.6rem;
  border: 1px solid var(--promo-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px -20px rgba(23, 17, 12, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

#koulchiSection .koulchi-card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--gold-rgb), 0.4);
  box-shadow: 0 22px 34px -20px rgba(120, 88, 20, 0.45);
}

#koulchiSection .koulchi-card-img {
  border-radius: 12px;
  background: linear-gradient(160deg, #fffaf0, #f6ead4);
  transition: transform 0.35s ease;
}

#koulchiSection .koulchi-card-link:hover .koulchi-card-img {
  transform: scale(1.05);
}

#koulchiSection .koulchi-card-badge {
  top: 0.45rem;
  inset-inline-start: 0.45rem;
  inset-inline-end: auto;
  padding: 0.26rem 0.5rem;
  border-radius: 10px 10px 10px 2px;
  background: linear-gradient(135deg, var(--promo-orange), var(--promo-red));
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 16px -8px rgba(229, 50, 27, 0.85);
}

#koulchiSection .koulchi-card-name {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--promo-ink);
  min-height: 2.05em;
}

#koulchiSection .koulchi-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.67rem;
  color: var(--promo-muted);
  line-height: 1.1;
}

#koulchiSection .koulchi-card-stars {
  color: #ff9500;
  font-weight: 800;
}

#koulchiSection .koulchi-card-stars i {
  color: var(--promo-muted);
  font-style: normal;
  font-weight: 500;
}

#koulchiSection .koulchi-card-prices {
  gap: 0.35rem;
  margin-top: 0.1rem;
}

#koulchiSection .koulchi-card-prices strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--promo-red);
  letter-spacing: -0.02em;
}

#koulchiSection .koulchi-card-prices s {
  font-size: 0.72rem;
  color: var(--promo-muted);
}

#koulchiSection .koulchi-card-cta {
  display: block;
  margin-top: 0.15rem;
  padding: 0.38rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px -12px rgba(120, 88, 20, 0.95);
}

#koulchiSection .koulchi-home-foot {
  padding: 0.85rem 1.1rem 0;
  border-top: 1px dashed rgba(var(--gold-rgb), 0.25);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#koulchiSection .koulchi-home-rule-text {
  font-size: 0.72rem;
  color: var(--promo-muted);
}

#koulchiSection .koulchi-home-foot .btn-secondary {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 20px -14px rgba(120, 88, 20, 0.95);
}
/* ---------------------------------------------- FLASH (droite) */

#flashSection .flash-hero {
  padding: 0;
}

#flashSection .flash-hero-inner {
  max-width: none;
  margin: 0;
  padding: 0 0 1rem;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 26px 60px -34px rgba(229, 50, 27, 0.5),
    0 1px 0 rgba(229, 50, 27, 0.05);
  overflow: hidden;
}

#flashSection .flash-hero-head {
  position: relative;
  margin: 0 0 0.9rem;
  padding: 1.05rem 1.2rem;
  align-items: center;
  background: linear-gradient(
    120deg,
    var(--promo-orange) 0%,
    var(--promo-red) 55%,
    var(--promo-red-dark) 100%
  );
  color: #fff;
  overflow: hidden;
}

#flashSection .flash-hero-head::after {
  content: "";
  position: absolute;
  inset: -70% -8% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0) 66%
  );
  pointer-events: none;
}

#flashSection .flash-hero-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  padding: 0.28rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

#flashSection .flash-hero-title {
  color: #fff;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  margin: 0.4rem 0 0.15rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

#flashSection .flash-hero-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  max-width: 34ch;
}

#flashSection .flash-hero-deal {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: var(--promo-red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.55);
}

#flashSection .flash-hero-timer {
  position: relative;
  z-index: 1;
  align-items: flex-end;
  gap: 0.3rem;
}

#flashSection .flash-hero-timer-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.66rem;
  font-weight: 700;
}

#flashSection .flash-hero-timer-value {
  background: #fff;
  color: var(--promo-red);
  border: 0;
  border-radius: 12px;
  padding: 0.28rem 0.8rem;
  font-size: 1.42rem;
  box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.6);
}
#flashSection .flash-hero-track {
  padding: 0 1.15rem 0.45rem;
  gap: 0.75rem;
  grid-auto-columns: minmax(158px, 1fr);
  scrollbar-color: rgba(229, 50, 27, 0.35) transparent;
}

#flashSection .flash-hero-track::-webkit-scrollbar-thumb {
  background: rgba(229, 50, 27, 0.35);
}

#flashSection .flash-item {
  border: 1px solid var(--promo-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px -20px rgba(23, 17, 12, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

#flashSection .flash-item:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 50, 27, 0.35);
  box-shadow: 0 22px 34px -18px rgba(229, 50, 27, 0.42);
}

#flashSection .flash-item-img {
  background: linear-gradient(160deg, #fff7f3, #ffe7dc);
}

#flashSection .flash-item-img img {
  transition: transform 0.35s ease;
}

#flashSection .flash-item:hover .flash-item-img img {
  transform: scale(1.06);
}

#flashSection .flash-item-pct {
  top: 0.45rem;
  inset-inline-start: 0.45rem;
  padding: 0.26rem 0.5rem;
  border-radius: 10px 10px 10px 2px;
  background: linear-gradient(135deg, var(--promo-orange), var(--promo-red));
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 8px 16px -8px rgba(229, 50, 27, 0.85);
}

#flashSection .flash-item-body {
  padding: 0.6rem 0.65rem 0.7rem;
  gap: 0.22rem;
}

#flashSection .flash-item-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--promo-ink);
}

#flashSection .flash-item-prices {
  gap: 0.35rem;
}

#flashSection .flash-item-now {
  font-size: 1.16rem;
  font-weight: 900;
  color: var(--promo-red);
  letter-spacing: -0.02em;
}

#flashSection .flash-item-was {
  font-size: 0.71rem;
  color: var(--promo-muted);
}

#flashSection .flash-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.67rem;
  color: var(--promo-muted);
  line-height: 1.1;
}

#flashSection .flash-item-stars {
  color: #ff9500;
  font-weight: 800;
}

#flashSection .flash-item-progress {
  margin-top: 0.2rem;
  background: rgba(229, 50, 27, 0.14);
}

#flashSection .flash-item-progress > span {
  background: linear-gradient(90deg, #ff9a3d, var(--promo-red));
}

#flashSection .flash-item-stock {
  color: var(--promo-red);
  font-size: 0.66rem;
  font-weight: 700;
}

/* ---------------------------------------------- petits ecrans */

@media (max-width: 640px) {
  #koulchiSection .koulchi-card {
    flex: 0 0 152px;
  }

  #flashSection .flash-hero-track {
    grid-auto-columns: minmax(146px, 1fr);
    padding: 0 0.9rem 0.4rem;
  }

  #koulchiSection .koulchi-home-track {
    padding: 0 0.9rem 0.4rem;
  }

  #flashSection .flash-hero-head,
  #koulchiSection .koulchi-home-head {
    padding: 0.9rem 0.95rem;
  }
}

/* ============================================================
   PAGE DEDIEE AUX OFFRES GROUPEES (/koulchi.html)
   ------------------------------------------------------------
   Mecanique reprise des places de marche (AliExpress "Bundle
   deals") : panier collant a gauche, bandeau de suggestions a
   defilement horizontal, categories, tri, puis grille infinie.

   Charte : le degrade or -> orange -> rouge ne sert QU ICI et sur
   les deux blocs promo de l accueil. Les couleurs sont reutilisees
   via les variables --promo-* definies pour .promo-duo, donc les
   deux ecrans restent strictement coherents.
   ============================================================ */

.koulchi-page {
  --promo-red: #e5321b;
  --promo-red-dark: #bf1d0a;
  --promo-orange: #ff7a1a;
  --promo-ink: #17110c;
  --promo-muted: #8a7f75;
  --promo-line: rgba(23, 17, 12, 0.09);
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.1rem 3rem;
}

/* ---------------------------------------------- bandeau d accroche */

.koulchi-hero {
  margin: 0.4rem 0 1.4rem;
  border-radius: 24px;
  background: linear-gradient(
    125deg,
    var(--gold-light) 0%,
    var(--gold) 45%,
    var(--promo-orange) 78%,
    var(--promo-red) 100%
  );
  box-shadow: 0 30px 60px -34px rgba(191, 29, 10, 0.55);
  overflow: hidden;
}

.koulchi-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.6rem 1.6rem 1.5rem;
  color: #fff;
}

.koulchi-hero-tag {
  display: inline-block;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.koulchi-hero-title {
  margin: 0.5rem 0 0.4rem;
  font-family: var(--font-secondary);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.koulchi-hero-sub {
  margin: 0;
  max-width: 62ch;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.94);
}

.koulchi-hero-tiers {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.koulchi-hero-tiers li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 76px;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.55);
}

.koulchi-hero-tiers strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--promo-ink);
}

.koulchi-hero-tiers span {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--promo-red);
}

/* ---------------------------------------------- mise en page */

.koulchi-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.koulchi-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* ---------------------------------------------- panier a gauche */

.koulchi-cart {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  background: #fff;
  box-shadow: 0 24px 50px -32px rgba(120, 88, 20, 0.5);
}

.koulchi-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.koulchi-cart-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--promo-ink);
}

.koulchi-cart-count {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--gold-rgb), 0.14);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
}

.koulchi-cart-progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(229, 50, 27, 0.12);
  overflow: hidden;
}

.koulchi-cart-progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--promo-orange), var(--promo-red));
  transition: width 0.25s ease;
}

.koulchi-cart-hint {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--promo-red);
}

.koulchi-cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
}

.koulchi-cart-vide {
  padding: 0.6rem 0;
  font-size: 0.78rem;
  color: var(--promo-muted);
}

.koulchi-cart-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--promo-line);
}

.koulchi-cart-line img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #f6ecdb;
}

.koulchi-cart-line-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.koulchi-cart-line-txt span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--promo-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.koulchi-cart-line-txt small {
  font-size: 0.7rem;
  color: var(--promo-red);
  font-weight: 800;
}

.koulchi-cart-qty {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.koulchi-cart-qty button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--promo-line);
  background: #fff;
  color: var(--promo-ink);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.koulchi-cart-qty b {
  min-width: 16px;
  text-align: center;
  font-size: 0.78rem;
}

.koulchi-cart-x {
  border: 0;
  background: transparent;
  color: var(--promo-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 0.15rem;
}

.koulchi-cart-totals {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--promo-line);
  font-size: 0.8rem;
  color: var(--promo-muted);
}

.koulchi-cart-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.koulchi-cart-row.is-saving {
  color: var(--promo-red);
  font-weight: 700;
}

.koulchi-cart-row.is-total {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--promo-ink);
}

.koulchi-cart-cta {
  display: block;
  padding: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 26px -16px rgba(120, 88, 20, 0.95);
}

.koulchi-cart-cta.is-disabled {
  opacity: 0.45;
  box-shadow: none;
  pointer-events: none;
}

/* ---------------------------------------------- bandeau de suggestions */

.koulchi-suggest {
  padding: 1rem 1.1rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--promo-line);
  background: #fff;
  box-shadow: 0 20px 44px -32px rgba(23, 17, 12, 0.5);
}

.koulchi-suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.koulchi-suggest-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--promo-ink);
}

.koulchi-suggest-arrows {
  display: flex;
  gap: 0.35rem;
}

.koulchi-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--promo-line);
  background: #fff;
  color: var(--promo-ink);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px -14px rgba(23, 17, 12, 0.65);
}

.koulchi-arrow:hover {
  border-color: rgba(229, 50, 27, 0.4);
  color: var(--promo-red);
}

/* Exactement 4 cartes visibles sur grand ecran, comme les bandeaux
   commerciaux : le reste defile aux fleches ou au doigt. */
.koulchi-suggest-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2.25rem) / 4);
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 50, 27, 0.35) transparent;
}

.koulchi-suggest-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.koulchi-suggest-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff7f3, #ffe7dc);
}

.koulchi-suggest-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.koulchi-suggest-card:hover .koulchi-suggest-media img {
  transform: scale(1.06);
}

.koulchi-suggest-name {
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--promo-ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.95em;
}

.koulchi-suggest-prices {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.koulchi-suggest-prices strong {
  font-size: 1rem;
  font-weight: 900;
  color: var(--promo-red);
  letter-spacing: -0.02em;
}

.koulchi-suggest-prices s {
  font-size: 0.68rem;
  color: var(--promo-muted);
}

/* ---------------------------------------------- categories et tri */

.koulchi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.koulchi-cats {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  max-width: 100%;
}

.koulchi-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--promo-line);
  border-radius: 999px;
  padding: 0.36rem 0.85rem;
  background: #fff;
  color: #544a3f;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.koulchi-cat i {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--promo-muted);
}

.koulchi-cat.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--promo-orange), var(--promo-red));
  color: #fff;
  box-shadow: 0 10px 20px -14px rgba(229, 50, 27, 0.9);
}

.koulchi-cat.is-active i {
  color: rgba(255, 255, 255, 0.85);
}

.koulchi-sort {
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--promo-line);
  background: #fff;
  color: var(--promo-ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.koulchi-count {
  margin: 0;
  font-size: 0.78rem;
  color: var(--promo-muted);
  font-weight: 600;
}

/* ---------------------------------------------- grille infinie */

.koulchi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.koulchi-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--promo-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 26px -20px rgba(23, 17, 12, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.koulchi-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 50, 27, 0.32);
  box-shadow: 0 22px 34px -20px rgba(229, 50, 27, 0.42);
}

.koulchi-tile-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(160deg, #fffaf0, #f6ead4);
}

.koulchi-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.koulchi-tile:hover .koulchi-tile-media img {
  transform: scale(1.06);
}

.koulchi-tile-off {
  position: absolute;
  top: 0.45rem;
  inset-inline-start: 0.45rem;
  padding: 0.26rem 0.5rem;
  border-radius: 10px 10px 10px 2px;
  background: linear-gradient(135deg, var(--promo-orange), var(--promo-red));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 16px -8px rgba(229, 50, 27, 0.85);
}

.koulchi-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.62rem 0.68rem 0.72rem;
  flex: 1;
}

.koulchi-tile-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--promo-ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
}

.koulchi-tile-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--promo-muted);
  line-height: 1.1;
}

.koulchi-tile-stars {
  color: #ff9500;
  font-weight: 800;
}

.koulchi-tile-stars i {
  font-style: normal;
  font-weight: 500;
  color: var(--promo-muted);
}

.koulchi-tile-prices {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: auto;
}

.koulchi-tile-prices strong {
  font-size: 1.14rem;
  font-weight: 900;
  color: var(--promo-red);
  letter-spacing: -0.02em;
}

.koulchi-tile-prices s {
  font-size: 0.71rem;
  color: var(--promo-muted);
}

.koulchi-tile-add {
  margin-top: 0.35rem;
  padding: 0.48rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px -14px rgba(120, 88, 20, 0.95);
}

.koulchi-tile-add:hover {
  filter: brightness(1.06);
}

.koulchi-tile-add:disabled {
  opacity: 0.7;
  cursor: default;
}

.koulchi-sentinel {
  height: 40px;
}

.koulchi-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--promo-muted);
  font-size: 0.92rem;
}

/* ---------------------------------------------- responsive */

@media (max-width: 1199px) {
  .koulchi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .koulchi-layout {
    grid-template-columns: 1fr;
  }

  .koulchi-cart {
    position: static;
    order: 2;
  }

  .koulchi-main {
    order: 1;
  }
}

@media (max-width: 899px) {
  .koulchi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .koulchi-suggest-track {
    grid-auto-columns: calc((100% - 0.75rem) / 2);
  }
}

@media (max-width: 640px) {
  .koulchi-page {
    padding: 0.6rem 0.8rem 2.5rem;
  }

  .koulchi-hero-inner {
    padding: 1.15rem 1rem;
  }

  .koulchi-hero-tiers li {
    min-width: 66px;
    padding: 0.45rem 0.6rem;
  }
}

/* ============================================================
   20. LOGO DANS L EN-TETE ET SELECTEUR DE LANGUE
   ------------------------------------------------------------
   Demande client 2026-11-18 :
     - logo image a cote du nom SMARTSWIKA (toutes les pages) ;
     - selecteur de langue lisible : FR, EN puis AR (AR a droite) ;
     - logo egalement dans l en-tete de l admin.

   Le drapeau affiche suit la langue active via html[lang], positionne
   par initLang()/initLangToggle() : aucun JS supplementaire.
   ============================================================ */

.logo-img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 8px;
    margin-inline-end: 0.55rem;
    background: #fffdf6;
    box-shadow: 0 2px 6px -3px rgba(120, 88, 20, 0.45);
}

[dir="rtl"] .logo-img {
    margin-right: 0;
    margin-left: 0.55rem;
}

/* Selecteur de langue : pastille doree + drapeau de la langue active. */
#langSelect {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 0 0 auto;
    min-width: 78px;
    background-color: var(--bg-card);
    background-repeat: no-repeat;
    background-position: 0.45rem center;
    background-size: 18px 13px;
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    color: var(--text);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    padding: 0.32rem 1.5rem 0.32rem 1.85rem;
    cursor: pointer;
    line-height: 1.2;
}

html[lang="fr"] #langSelect { background-image: url("/assets/flag-fr.svg"); }
html[lang="en"] #langSelect { background-image: url("/assets/flag-gb.svg"); }
html[lang="ar"] #langSelect { background-image: url("/assets/flag-ma.svg"); }

#langSelect:hover,
#langSelect:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.15);
}

[dir="rtl"] #langSelect {
    padding: 0.32rem 1.85rem 0.32rem 1.5rem;
    background-position: right 0.45rem center;
}

/* Page de reinitialisation : logo + nom sur une seule ligne. */
.reset-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .logo-img {
        width: 26px;
        height: 26px;
        margin-inline-end: 0.35rem;
        border-radius: 6px;
    }
    .logo-text {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }
    #langSelect {
        font-size: 0.72rem;
        min-width: 64px;
        padding: 0.28rem 1.35rem 0.28rem 1.65rem;
        background-size: 16px 12px;
    }
}
/* ============================================================
   FOOTER LEGAL (present sur toutes les pages)
   ------------------------------------------------------------
   Deplace depuis css/legal.css : cette feuille n est chargee que
   sur les 4 pages legales, donc les regles ne s appliquaient pas
   a l accueil ni aux autres pages. style-patches.css est charge
   partout (verifie par build-css.cjs).
   Taille = celle du copyright (0.75rem), demande client du
   2026-11-19.
   ============================================================ */
.site-footer .footer-legal,
.page-legal-footer .footer-legal {
    margin-top: 1.1rem;
    text-align: center;
}

.site-footer .footer-legal-title,
.page-legal-footer .footer-legal-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold, #b8860b);
    margin: 0 0 0.5rem;
}

.site-footer .footer-legal-links,
.page-legal-footer .footer-legal-links {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.25rem;
    max-width: 640px;
}

.site-footer .footer-legal-links li,
.page-legal-footer .footer-legal-links li {
    margin: 0;
}

.site-footer .footer-legal-links a,
.page-legal-footer .footer-legal-links a {
    font-size: 0.75rem;
    color: inherit;
    opacity: 0.85;
    text-decoration: none;
}

.site-footer .footer-legal-links a:hover,
.site-footer .footer-legal-links a:focus-visible,
.page-legal-footer .footer-legal-links a:hover,
.page-legal-footer .footer-legal-links a:focus-visible {
    opacity: 1;
    color: var(--gold, #b8860b);
    text-decoration: underline;
}


/* Footer de vendor-login : la classe est .login-footer, pas .site-footer.
   Sans ce bloc, les 4 liens legaux existaient mais s affichaient en style
   navigateur (gros, bleus). Demande client du 2026-11-19. */
.login-footer .footer-legal {
    margin-top: 1rem;
    text-align: center;
}

.login-footer .footer-legal-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold, #b8860b);
    margin: 0 0 0.5rem;
}

.login-footer .footer-legal-links {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.25rem;
    max-width: 640px;
}

.login-footer .footer-legal-links li {
    margin: 0;
}

.login-footer .footer-legal-links a {
    font-size: 0.75rem;
    color: inherit;
    opacity: 0.85;
    text-decoration: none;
}
/* ============================================================
   19. CORRECTIFS AUDIT 2026-11-20
       CLS — CONTRASTES — CIBLES TACTILES — RTL — TYPOGRAPHIE AR
   ------------------------------------------------------------
   Bloc ADDITIF (chargé après style.css). Aucune règle existante
   n'est supprimée : on surcharge uniquement ce qui a échoué aux
   mesures réelles (Playwright / calcul de contraste WCAG 2.2).
   ============================================================ */

/* ---------- 19.1 Fallbacks métriques : supprime le CLS ----------
   Cause mesurée : au chargement de Inter/Playfair, le texte du hero
   changeait de métriques et déplaçait .hero-actions de 42 px
   (CLS 0,229 à 0,488). Ces @font-face locales reproduisent les
   métriques des webfonts : le swap ne provoque plus de reflow. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia');
  size-adjust: 96%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Cairo Fallback';
  src: local('Tahoma');
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Amiri Fallback';
  src: local('Times New Roman');
  size-adjust: 98%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* Réserve la hauteur du hero : les boutons ne poussent plus le
   contenu quand la police arrive en retard. */
.hero-content {
  contain: layout;
}
.hero-actions {
  min-height: 48px;
}
.hero-actions .btn-primary,
.hero-actions .btn-ghost {
  min-height: 48px;
}
@media (max-width: 600px) {
  .hero-actions {
    min-height: 104px; /* deux boutons empilés */
  }
}

/* ---------- 19.2 Boutons : contraste AA garanti ----------
   Blanc sur #8a6a24 = 5,04:1 (AA). L'ancien dégradé partait de
   #a57b2e (3,84:1) : le libellé échouait sur la moitié du bouton. */
.btn-primary {
  background: linear-gradient(135deg, var(--btn-gold-from, #8a6a24), var(--btn-gold-to, #5f4315));
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #6f5219, #4b340f);
}
.btn-ghost {
  color: var(--gold-text, #6f5219);
}

/* ---------- 19.3 Cibles tactiles >= 44 px ----------
   Mesures avant : #langSelect 64x19, .btn-account 40x35,
   .banner-nav 28x28, .favorite-btn 26x26. */
select#langSelect,
.legal-lang-select,
.login-lang-select,
.v-lang-select,
#langSelect {
  min-height: 44px;
  min-width: 84px;
  font-size: 0.9rem;
}
.btn-account {
  min-height: 44px;
  min-width: 44px;
}
.banner-nav {
  width: 44px;
  height: 44px;
}
.blog-article-close {
  width: 44px;
  height: 44px;
}
@media (max-width: 480px) {
  .favorite-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
  .badge {
    font-size: 0.75rem;
  }
  .flash-card-countdown {
    font-size: 0.75rem;
  }
  .btn-add-to-cart {
    font-size: 0.8125rem;
    padding: 0.5rem 0.6rem;
    min-height: 40px;
  }
}

/* ---------- 19.4 RTL : miroir des éléments positionnés ----------
   Les déclarations left/right physiques ne s'inversent pas seules.
   On rétablit la symétrie en logique (inset-inline-*). */
html[dir="rtl"] .favorite-btn {
  right: auto !important;
  inset-inline-end: 0.5rem;
}
html[dir="rtl"] .badge {
  left: auto !important;
  inset-inline-start: 0.35rem;
}
html[dir="rtl"] .blog-article-close {
  right: auto !important;
  inset-inline-end: 0.6rem;
}
html[dir="rtl"] .flash-item-pct,
html[dir="rtl"] .koulchi-tile-off {
  left: auto !important;
  inset-inline-start: 0.45rem;
}
html[dir="rtl"] .banner-item {
  margin-right: 0 !important;
  margin-inline-end: 12px;
}
html[dir="rtl"] .p-price small,
html[dir="rtl"] .cart-delivery-delay {
  margin-left: 0 !important;
  margin-inline-start: 0.35rem;
}

/* ---------- 19.5 Typographie arabe ----------
   Inter ne contient AUCUN glyphe arabe : le corps retombait sur la
   police système (rendu différent selon iOS/Android/Windows).
   Cairo est désormais explicitement appliqué au corps, Amiri aux
   titres avec un interlignage sûr (1,55) : l'ancien 1,07 rognait
   les ascendantes de l'Amiri. */
html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: 'Cairo', 'Cairo Fallback', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  line-height: 1.85;
  letter-spacing: 0;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .product-title,
html[dir="rtl"] .footer-logo {
  font-family: 'Amiri', 'Amiri Fallback', 'Cairo', Georgia, serif;
  line-height: 1.55;
  padding-block: 0.12em;
  letter-spacing: 0;
}
html[dir="rtl"] .hero-title {
  line-height: 1.6;
}

/* ---------- 19.6 Plancher de lisibilité ----------
   ~100 déclarations étaient sous 0,85rem (9,6 à 13,4 px), illisibles
   en plein soleil sur mobile. */
@media (max-width: 600px) {
  .product-desc,
  .product-features-list li,
  .trust-item,
  .footer-legal-links a,
  .product-category,
  .product-vendor-label {
    font-size: 0.8125rem; /* 13 px minimum */
  }
}


.login-footer .footer-legal-links a:hover,
.login-footer .footer-legal-links a:focus-visible {
    opacity: 1;
    color: var(--gold, #b8860b);
    text-decoration: underline;
}

