/* ==========================================================================
   Correctifs de l'audit du 23/09/2026 — surcouche chargée en dernier.
   Fichier maintenu à la main (hors build) : à chaque modification, mettre à
   jour le paramètre ?v= dans index.html.
   ========================================================================== */

/* A-15 : PayPal suspendu (configuré en sandbox en production).
   La carte bancaire (Stripe) occupe toute la largeur. */
.col-md-6:has(> .payment-option img[alt="PayPal"]) {
  display: none !important;
}
.col-md-6:has(> .payment-option img[alt="Stripe"]) {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* A-44 : une étoile vide ne doit jamais paraître pleine (thème sombre compris).
   Étoiles vides dessinées en contour, étoiles obtenues en or. */
.star:not(.filled) {
  color: transparent !important;
  -webkit-text-stroke: 1px #8a94a6;
  text-shadow: none !important;
}
.star.filled {
  color: #f5b301 !important;
  -webkit-text-stroke: 0;
}

/* A-74 : en-tête mobile — les 4 icônes (recherche, adresse, compte, panier) tiennent
   de 320 à 412 px. Cibles tactiles de 44 x 44 px, marges intérieures réduites. */
@media (max-width: 767.98px) {
  header.py-2 { padding-left: 8px !important; padding-right: 8px !important; }
  header .icon-group { gap: 2px !important; flex-shrink: 0; }
  header .icon-group .icon-container > .btn {
    padding: 8px !important;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }
}
@media (max-width: 359.98px) {
  header.py-2 .container { padding-left: 0 !important; padding-right: 0 !important; }
}

/* A-74 (MOB-01) : menu mobile défilable ; liens de dernier niveau lisibles et hauts de 44 px. */
@media (max-width: 991.98px) {
  .mobile-menu {
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-menu a.subsubcategory-link {
    display: block !important;
    color: #e8ecf1 !important;
    min-height: 44px;
    line-height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
}

/* A-74 (MOB-09) : bouton de thème en bas à gauche, sous les menus et fenêtres,
   pour ne plus recouvrir l'assistant, la barre de filtres ni les boutons d'achat. */
@media (max-width: 991.98px) {
  #lux-theme-toggle {
    left: 12px !important;
    right: auto !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 1030 !important;
  }
}
/* Thème clair : les icônes blanches de l'en-tête restaient invisibles sur fond crème. */
html[data-theme="light"] header .text-white,
html[data-theme="light"] header .icon-container .btn {
  color: #10233e !important;
}

/* ==========================================================================
   A-77 : thèmes et contrastes (WCAG AA, mesuré avec axe-core le 23/09/2026)
   ========================================================================== */

/* En-tête, thème clair : l'icône Compte porte un style en ligne color:white et
   le menu burger est orange clair sur fond crème (ratios 1,1 et 2,1). */
html[data-theme="light"] header .bi-person,
html[data-theme="light"] header .bi-list,
html[data-theme="light"] header .bi-search,
html[data-theme="light"] header .bi-geo-alt,
html[data-theme="light"] header .bi-cart,
html[data-theme="light"] header .bi-cart3,
html[data-theme="light"] header .bi-house {
  color: #10233e !important;
}

/* Boutons du menu principal (les deux thèmes) : blanc sur orange 2,2 et blanc sur rouge 4,0. */
.btn.btn-info,
.btn.btn-info .button-text,
.btn.btn-info i {
  color: #10233e !important;
}
a.menu-item.btn[href$="promotions"] {
  background: #c8202d !important;
  border-color: #c8202d !important;
}

/* Pastilles de remise de l'accueil : blanc sur #e5484d (3,9). */
.cg-badge:not(.cg-badge-nouveau) {
  background: #c8202d !important;
}

/* Thème clair : textes principaux sous 4,5:1. */
html[data-theme="light"] .cg-lien-tout { color: #8a5a00 !important; }
html[data-theme="light"] .sous-titre { color: #8a5a00 !important; }
html[data-theme="light"] .breadcrumb-item,
html[data-theme="light"] a.breadcrumb-item { color: #5f6b73 !important; }
html[data-theme="light"] .product-card .product-price,
html[data-theme="light"] .product-card .product-info .price,
html[data-theme="light"] .hero-product-price,
html[data-theme="light"] .price-container > .product-price { color: #1f68ad !important; }
html[data-theme="light"] .price-and-availability,
html[data-theme="light"] .price-and-availability .original-price,
html[data-theme="light"] label.floating-label { color: #5c5c5c !important; }
html[data-theme="light"] #cg-cookies a { color: #9a5c00 !important; }
html[data-theme="light"] #cg-cookies button { border-color: #9a5c00 !important; color: #9a5c00 !important; }
html[data-theme="light"] #cg-cookies button.cg-ok { background: #9a5c00 !important; color: #fff !important; }

/* Page bannière, thème sombre : titres clairs (#e8ecf1) sur cartes blanches (1,2:1).
   Les cartes passent en sombre ; les zones photo restent claires pour les produits détourés. */
html[data-theme="dark"] .banner-products-page { background: #0b1424 !important; }
html[data-theme="dark"] .banner-products-page .banner-header,
html[data-theme="dark"] .banner-products-page .hero-product-card,
html[data-theme="dark"] .banner-products-page .product-card {
  background: #111c2e !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35) !important;
}
html[data-theme="dark"] .banner-products-page .page-title,
html[data-theme="dark"] .banner-products-page .hero-product-title,
html[data-theme="dark"] .banner-products-page .product-title { color: #e8ecf1 !important; }
html[data-theme="dark"] .banner-products-page .banner-header,
html[data-theme="dark"] .banner-products-page .banner-header p { color: #c5ccd6 !important; }
html[data-theme="dark"] .banner-products-page .product-price,
html[data-theme="dark"] .banner-products-page .discounted-price { color: #f0a35a !important; }
html[data-theme="dark"] .banner-products-page .original-price { color: #aab3c0 !important; }
