/* ==========================================
   HEADER STICKY - VERSION PROPRE
   ========================================== */

header.container-fluid.no-gutter,
header.container-fluid,
body header.container-fluid {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background-color: #fff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  width: 100% !important;
}

/* ========== BANDEAU HAUT — UNE SEULE BANDE ==========
   Trois zones sur une ligne : origine à gauche, message au centre, contact et
   téléphone à droite. Cette bande remplace les deux rangées d'avant (bandeau
   coloré + barre de contact), ce qui rend une trentaine de pixels de hauteur.
   Sur mobile, seul le message reste ; le reste vit dans le menu burger.
   Toute la bande se replie au scroll. */
.top-banner {
  position: relative;
  z-index: 1000;
  display: block;
  padding: 7px 0;
  max-height: 60px;
  overflow: hidden;
  color: #fff;
  transition:
    max-height 0.25s ease,
    padding 0.25s ease,
    opacity 0.2s ease;
}

.top-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-banner-message {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* ── Origine, à gauche ── */
.top-pharmacy-badge {
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.top-pharmacy-badge__flag {
  border-radius: 2px;
  flex-shrink: 0;
}

.top-pharmacy-badge strong {
  font-weight: 700;
  color: #fff;
}

.top-pharmacy-badge__lieu::before {
  content: "·";
  margin-right: 5px;
  opacity: 0.6;
}

/* ── Contact et téléphone, à droite ── */
/* Masqué sous 992px : la classe Bootstrap d-none ne suffit pas, cette règle
   arrive après dans la feuille et son display:flex la battait — « Contact »
   s'affichait à la place du message sur mobile. */
.top-contact-menu {
  display: none;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (min-width: 992px) {
  .top-contact-menu {
    display: flex;
  }
}

.top-contact-menu li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border: 0 !important;
  padding: 0 !important;
}

.top-contact-menu a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.top-contact-menu a:hover {
  color: #fff;
  opacity: 0.75;
}

.top-contact-menu .pdc-icone {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #fff;
  margin: 0;
}

.top-contact-menu a[href^="tel"] {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* Les horaires alourdissaient la ligne ; l'information reste sur la page
   Contact et dans le menu mobile. */
.top-contact-menu li.telephone a em {
  display: none;
}

@media screen and (max-width: 991px) {
  .top-banner-message {
    font-size: 12.5px;
    line-height: 1.25;
  }

  /* Le menu du haut est le même qu'en bas du menu burger, et la feuille y pose
     un `display:flex !important` pour la colonne d'items. Dans le bandeau il
     faut le neutraliser, sinon « Contact » s'affiche à la place du message. */
  .top-banner .menu-top-header-1-container,
  .top-banner .top-contact-menu {
    display: none !important;
  }
}

/* Replié au scroll (classe posée par header-scroll.js) */
header.container-fluid.scrolled .top-banner {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* ========== CORRECTION BANDE BLANCHE MOBILE ========== */
@media screen and (max-width: 991px) {
  #app-menu-container,
  .sticky-footer,
  .mobile-footer,
  .footer-mobile,
  .cart-mobile-footer,
  footer.mobile-sticky,
  .mobile-bottom-nav,
  .bottom-navigation {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
  }

  body {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  main,
  #main,
  .site-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  main,
  #main,
  .site-content,
  #content {
    min-height: auto !important;
  }

  footer,
  .site-footer {
    margin-top: 0 !important;
  }

  .home-selection-produits,
  .home-reassurances,
  .home-articles {
    padding-bottom: 24px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .home-selection-produits .container,
  .home-reassurances .container,
  .home-articles .container {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* ========== LARGEUR DU HEADER ==========
   Le header s'étalait sur toute la largeur (padding 40px) alors que le contenu
   des pages est centré dans une colonne bien plus étroite (home.css :
   max-width 1400/1600/1800px, padding 80/120/160px). D'où l'impression d'un
   header « posé à côté » de la page. On reprend exactement les mêmes paliers à
   partir de 1200px ; en dessous on garde 40px, la place manque déjà. */
/* LARGEUR DE REFERENCE DU SITE.
   Toute section qui doit tomber sur les memes bords que le header porte
   « container large » et herite de ces paliers. Ils etaient reserves a
   « header .container.large », si bien que chaque section les recopiait avec
   ses propres valeurs : le header a 120 px de marge, « A propos » a 140 et le
   bandeau newsletter a 60, trois bords differents sur la meme page
   (2026-11-13). */
.container.large {
  padding-left: 40px;
  padding-right: 40px;
}

@media screen and (min-width: 1200px) {
  .container.large {
    max-width: 1400px;
    padding-left: 80px;
    padding-right: 80px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 1400px) {
  .container.large {
    max-width: 1600px;
    padding-left: 120px;
    padding-right: 120px;
  }
}

@media screen and (min-width: 1600px) {
  .container.large {
    max-width: 1800px;
    padding-left: 160px;
    padding-right: 160px;
  }
}

@media screen and (max-width: 991px) {
  .container.large {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ========== ROW PRINCIPALE ========== */
.header-main-row {
  padding: 15px 0;
  flex-wrap: nowrap !important;
}

.header-main-row > div {
  flex-shrink: 0;
}

@media screen and (max-width: 991px) {
  .header-main-row {
    padding: 10px 0;
    flex-wrap: wrap !important;
  }
}

/* ========== LOGO ========== */
.header-logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo-container .custom-logo-link {
  display: flex;
  align-items: center;
}

@media screen and (max-width: 991px) {
  .header-logo-container .custom-logo {
    max-height: 50px !important;
    width: auto !important;
  }
}

@media screen and (min-width: 992px) {
  .header-logo-container .custom-logo {
    max-height: 70px !important;
    width: auto !important;
  }
}

/* ========== DESKTOP : TOP MENU 2 + PANIER ========== */
@media screen and (min-width: 992px) {
  .header-actions-desktop {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
  }

  .menu-top-header-2-container ul {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 0;
    margin-bottom: 0;
    list-style-type: none;
  }

  .menu-top-header-2-container li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
  }

  .menu-top-header-2-container li a:hover {
    color: var(--wp--preset--color--color-1);
  }

  .menu-top-header-2-container li a svg,
  .menu-top-header-2-container li a i {
    font-size: 20px;
    transition: transform 0.3s ease;
  }

  .menu-top-header-2-container li a:hover svg,
  .menu-top-header-2-container li a:hover i {
    transform: scale(1.1);
  }

  header .cart,
  footer .cart-mobile {
    background-color: var(--wp--preset--color--color-1);
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(230, 44, 161, 0.3);
    white-space: nowrap;
  }

  header .cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 44, 161, 0.5);
    background-color: #c91f8a;
  }

  header .cart svg,
  header .cart i {
    color: #fff;
    font-size: 20px;
  }

  header .cart #cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #fff;
    color: var(--wp--preset--color--color-1);
    border: 2px solid var(--wp--preset--color--color-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
  }

  .logged .menu-top-header-2-container li.account {
    position: relative;
  }

  .logged .menu-top-header-2-container li.account a:before {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: -2px;
    left: -2px;
    background-color: var(--wp--preset--color--color-7);
    border: 2px solid white;
  }
}

/* ============================================================
   HEADER MOBILE — barre compacte et fixe
   Ordre : burger catégories | logo | compte | panier
   Puis la recherche sur toute la largeur.
   Hauteur visée : ~13 % de la hauteur d'écran, constante au scroll.
   ============================================================ */
@media screen and (max-width: 991px) {
  header .row.justify-content-between {
    align-items: center !important;
  }

  .container.large {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-main-row {
    padding: 8px 0 10px !important;
    row-gap: 8px;
    flex-wrap: wrap !important;
    align-items: center;
  }

  /* Les colonnes doivent pouvoir se comprimer, sinon le logo pousse les
     icônes hors de la barre (Bootstrap met flex-shrink:0 sur .col). */
  .header-main-row > div {
    flex-shrink: 1;
  }

  /* Colonnes burger / actions : largeur au contenu, sans gouttière */
  .header-burger-col,
  .header-actions-col {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Logo : prend toute la place restante, nettement plus grand qu'avant */
  .header-logo-container {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: hidden;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .header-logo-container .custom-logo-link {
    display: flex;
    max-width: 100%;
  }

  .header-logo-container .custom-logo {
    max-height: 34px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
  }

  /* ── Icônes : tracé fin, même gabarit pour les trois ── */
  .header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--wp--preset--color--color-1, #e62ca1);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .header-icon-btn:active {
    transform: scale(0.94);
  }

  .header-icon {
    width: 29px;
    height: 29px;
    display: block;
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  /* L'ancienne pastille rose pleine du compte disparaît : icône au trait */
  .mobile-account-icon,
  .mobile-cart-icon {
    position: relative;
    background: none !important;
    border-radius: 0;
    color: var(--wp--preset--color--color-1, #e62ca1) !important;
  }

  /* Compteur du panier */
  #cart-count-mobile {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: var(--wp--preset--color--color-1, #e62ca1);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  /* ── Barre de recherche : pleine largeur, toujours visible ── */
  /* Sans gouttière, le champ arrivait à 4px du bord de l'écran alors que le
     logo et les icônes commencent à 16px. On lui rend la marge des colonnes. */
  #mobile-searchbox.searchbox {
    display: block !important;
    padding-left: 16px;
    padding-right: 16px;
  }

  #mobile-searchbox.searchbox .aws-search-form {
    border-width: 1.5px !important;
  }

  #mobile-searchbox.searchbox input[type="search"],
  #mobile-searchbox.searchbox .aws-search-field {
    padding: 9px 8px 9px 16px !important;
    font-size: 15px !important;
  }

  /* La rangée du menu desktop ne doit rien peser sur mobile : seul
     l'offcanvas (position: fixed) y vit, mais .navbar garde son padding. */
  .header-menu-container,
  .header-menu-container .navbar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
  }

  /* Le bouton burger n'utilise plus les trois <span class="bar"> */
  .navbar-toggler {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
  }
}

/* Petits écrans en hauteur (iPhone SE et assimilés) : on resserre la barre
   pour qu'elle reste autour de 14 % de l'écran au lieu de 18 %. */
@media screen and (max-width: 991px) and (max-height: 720px) {
  .header-main-row {
    padding: 6px 0 8px !important;
    row-gap: 6px;
  }

  .header-logo-container .custom-logo {
    max-height: 30px !important;
  }

  .header-icon-btn {
    width: 40px;
    height: 40px;
  }

  .header-icon {
    width: 26px;
    height: 26px;
  }

  #mobile-searchbox.searchbox input[type="search"],
  #mobile-searchbox.searchbox .aws-search-field {
    padding: 7px 8px 7px 16px !important;
  }
}

/* ========== MENU DESKTOP ========== */
@media screen and (min-width: 992px) {
  .header-menu-container {
    margin-top: 15px;
  }

  #menu-menu-principal-bis-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  #menu-menu-principal-bis-1 li {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    margin: 0 8px;
  }

  #menu-menu-principal-bis-1 li.promos {
    background-color: var(--wp--preset--color--color-6);
    border-radius: 5px;
  }

  #menu-menu-principal-bis-1 li.promos a {
    color: var(--wp--preset--color--color-1);
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 15px;
  }

  #menu-menu-principal-bis-1 li span.menu-couleur {
    width: 5px;
    height: 50%;
  }

  /* Police et paddings continus : ajouter une entrée au menu resserre
     l'ensemble progressivement au lieu de provoquer un retour à la ligne. */
  #menu-menu-principal-bis-1 li .nav-link {
    padding: clamp(8px, 0.85vw, 12px) clamp(7px, 1.05vw, 15px);
    text-transform: uppercase;
    font-weight: 600;
    font-size: clamp(0.72rem, 0.78vw, 0.95rem);
    transition: color 0.2s;
    text-align: center;
    white-space: nowrap;
  }

  #menu-menu-principal-bis-1 li.promos a {
    padding: clamp(7px, 0.75vw, 10px) clamp(8px, 1.05vw, 15px);
    font-size: clamp(0.72rem, 0.78vw, 0.95rem);
  }

  #menu-menu-principal-bis-1 li {
    margin: 0 clamp(2px, 0.4vw, 8px);
  }

  #menu-menu-principal-bis-1 li .nav-link:hover,
  #menu-menu-principal-bis-1 li:hover .nav-link {
    color: var(--wp--preset--color--color-1);
  }

  /* ──── MENU COULEUR PAR CATÉGORIE — style "ghost flip" ────
     Le vrai conteneur du menu desktop est #desktop-nav-container > .desktop-nav.
     Le JS (main.js → applyMenuColors) lit le <span class="menu-couleur"> et
     pose --menu-color en CSS variable sur chaque <li>.
       • Repos : texte coloré sur fond transparent
       • Hover : texte blanc sur fond plein de la couleur de la catégorie
     Items sans couleur ACF → fallback rose principal.
     !important partout pour battre les règles du parent theme yawpt. */
  #desktop-nav-container .desktop-nav > li,
  #desktop-nav-container .navbar-nav > li {
    position: relative !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 6px;
    transition:
      background-color 0.25s ease,
      color 0.2s ease !important;
  }

  /* Texte coloré par défaut (couleur de la catégorie) */
  #desktop-nav-container .desktop-nav > li > a,
  #desktop-nav-container .desktop-nav > li > span:not(.menu-couleur),
  #desktop-nav-container .navbar-nav > li > a,
  #desktop-nav-container .navbar-nav > li > span:not(.menu-couleur) {
    color: var(--menu-color, #e62ca1) !important;
    transition: color 0.2s ease;
    font-weight: 600;
  }

  /* Hover : flip — fond plein + texte blanc */
  #desktop-nav-container .desktop-nav > li:hover,
  #desktop-nav-container .navbar-nav > li:hover {
    background-color: var(--menu-color, #e62ca1) !important;
  }

  #desktop-nav-container .desktop-nav > li:hover > a,
  #desktop-nav-container .desktop-nav > li:hover > span:not(.menu-couleur),
  #desktop-nav-container .navbar-nav > li:hover > a,
  #desktop-nav-container .navbar-nav > li:hover > span:not(.menu-couleur) {
    color: #fff !important;
  }

  /* Le span .menu-couleur reste utile en JS (source de la couleur) mais
     on le masque visuellement sur desktop : sa couleur sert au <li>. */
  #desktop-nav-container .menu-couleur {
    display: none !important;
  }

  #main-nav .menu li .sub-menu {
    background: white;
    border-top: 3px solid #e62ca1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  #main-nav .menu li .sub-menu li:hover {
    background: #f8f9fa;
  }
}

/* ========== MENU DESKTOP — RESPONSIVE 992 → 1199px ==========
   Plage critique : sur les tablettes paysage / petits laptops (typiquement
   1024px), le menu desktop passe en flex dès 992px mais avec 7 onglets ou
   plus, les libellés en nowrap + padding 15px + font 0.95rem ne tiennent
   pas sur une ligne. Comme le body est en overflow-x:clip, le dernier
   onglet à droite déborde et se fait couper.
   On resserre progressivement padding, marges et police pour faire entrer
   tous les items, sans toucher au rendu ≥1200px qui a la place. */
/* Ce palier 992→1199px imposait des valeurs fixes qui écrasaient le
   dimensionnement continu défini plus haut et recréaient une cassure à 1200px.
   On le garde uniquement pour le menu desktop (.desktop-nav), passé lui aussi
   en clamp() pour rester cohérent. */
@media screen and (min-width: 992px) {
  #menu-menu-principal-bis-1 li,
  #desktop-nav-container .desktop-nav > li {
    gap: 0;
  }

  #desktop-nav-container .desktop-nav > li {
    margin: 0 clamp(2px, 0.4vw, 8px);
  }

  #desktop-nav-container .desktop-nav > li > a {
    padding: clamp(8px, 0.85vw, 12px) clamp(6px, 1.05vw, 15px);
    font-size: clamp(0.72rem, 0.78vw, 0.95rem);
  }

  /* État scroll-compacté : on garde la même logique pour ne pas réintroduire
     la coupure quand le header se réduit au scroll sur cette plage. */
  header.container-fluid.scrolled #menu-menu-principal-bis-1 li .nav-link,
  header.container-fluid.scrolled #desktop-nav-container .desktop-nav > li > a {
    padding: 8px 5px;
    font-size: 0.76rem;
  }
}

/* ========== SEARCH BAR ==========
   Les règles historiques visaient `input[type=search]` et `button[type=submit]`,
   or le formulaire est rendu par Advanced Woo Search : son bouton n'est pas un
   <button type="submit"> mais un <div class="aws-search-btn aws-form-btn">.
   La règle ne matchait donc jamais et le bouton restait un carré détaché à côté
   du champ. On stylise le FORMULAIRE (bordure + arrondi) et on laisse le champ
   et le bouton transparents à l'intérieur — même principe que la barre du menu
   mobile, d'où un rendu identique sur les deux. */
.searchbox {
  position: relative;
}

.searchbox .aws-container {
  width: 100% !important;
  max-width: 100% !important;
}

.searchbox .aws-search-form {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  border: 2px solid var(--wp--preset--color--color-1, #e62ca1) !important;
  border-radius: 999px !important;
  background: #fff !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.searchbox .aws-search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(230, 44, 161, 0.12);
}

.searchbox .aws-wrapper {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.searchbox input[type="search"],
.searchbox .aws-search-field {
  width: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: clamp(9px, 0.8vw, 12px) 8px clamp(9px, 0.8vw, 12px)
    clamp(14px, 1.3vw, 20px) !important;
  font-size: clamp(13px, 1.05vw, 15px) !important;
}

/* Le bouton est le DERNIER élément du formulaire : `margin-left: auto` le colle
   à droite quel que soit le dimensionnement des éléments qui le précèdent
   (selon les versions, AWS enrobe ou non le champ dans .aws-wrapper). */
.searchbox .aws-search-form .aws-form-btn,
.searchbox .aws-search-form .aws-search-btn,
.searchbox button[type="submit"] {
  flex: 0 0 auto !important;
  position: static !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  width: clamp(40px, 3.4vw, 50px) !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--wp--preset--color--color-1, #e62ca1) !important;
  cursor: pointer;
}

/* AWS emboîte l'icône dans un ou deux <span> : on les rend transparents au
   centrage, sinon la loupe se retrouve calée à gauche de son conteneur. */
.searchbox .aws-search-form .aws-form-btn > *,
.searchbox .aws-search-form .aws-search-btn > *,
.searchbox .aws-search-btn_icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* La loupe fournie par AWS est une icône pleine (style Material) très épaisse :
   on la masque et on la redessine au trait via un masque CSS, pour rester
   cohérent avec les autres icônes du header. */
.searchbox .aws-search-btn_icon svg,
.mobile-menu-search .aws-search-btn_icon svg {
  display: none !important;
}

.searchbox .aws-search-btn_icon::before,
.mobile-menu-search .aws-search-btn_icon::before {
  content: "";
  display: block;
  width: 21px;
  height: 21px;
  background-color: currentColor;
  -webkit-mask: var(--icon-search) center / contain no-repeat;
  mask: var(--icon-search) center / contain no-repeat;
}

:root {
  --icon-etiquette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.4 12.4 12.3 20.5a1.7 1.7 0 0 1-2.4 0l-6.4-6.4a1.7 1.7 0 0 1-.5-1.2V4.7c0-.9.7-1.7 1.7-1.7h8.2c.4 0 .9.2 1.2.5l6.3 6.3a1.7 1.7 0 0 1 0 2.6Z'/%3E%3Ccircle cx='7.7' cy='7.7' r='1.3'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.7-3.7'/%3E%3C/svg%3E");
}

/* Indicateur de chargement d'AWS : il occupe la place de la loupe */
.searchbox .aws-search-btn_loader {
  display: none !important;
}

.searchbox .aws-search-form .aws-form-btn svg,
.searchbox .aws-search-form .aws-search-btn svg,
.searchbox .aws-search-form .aws-form-btn img,
.searchbox .aws-search-form .aws-search-btn img,
.searchbox button[type="submit"] svg,
.searchbox button[type="submit"] i {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  color: inherit !important;
  fill: currentColor;
}

/* ==========================================
   MENU MOBILE - OFFCANVAS VERSION AMÉLIORÉE
   ========================================== */
@media screen and (max-width: 991px) {
  /* Bouton toggle */
  .header-menu-container .navbar-toggler {
    outline: none;
    border: none;
    padding: 0;
    background: none;
  }

  /* Structure offcanvas */
  .navbar .offcanvas.show {
    left: 0;
    width: 100%;
    border-left: 0;
  }

  /* En-tête avec logo (reste fixe) */
  .navbar .offcanvas .logo-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 28px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1070;
    border-bottom: 1px solid #eee;
    min-height: 70px;
    max-height: 70px;
  }

  /* Backdrop Bootstrap offcanvas : on l'abaisse SOUS le header (z-index:1000)
     pour qu'il ne piège pas le menu. L'offcanvas, lui, est dans le contexte
     d'empilement du header donc passe naturellement au-dessus. Sans ça, le
     backdrop intercepte les clics sur les items à dropdown et ferme le menu. */
  .offcanvas-backdrop,
  .offcanvas-backdrop.show {
    z-index: 999 !important;
  }

  /* Logo plus petit */
  .navbar .offcanvas .logo-row .custom-logo {
    max-height: 45px;
    width: auto;
  }

  /* Bouton fermeture */
  .navbar .offcanvas .logo-row .back-toggler {
    position: relative;
    padding: 0;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--wp--preset--color--color-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* Corps du menu - ALIGNEMENT GAUCHE + PLEINE LARGEUR */
  .navbar .offcanvas .offcanvas-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
    justify-content: flex-start !important;
    padding-top: 85px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 30px;
    text-align: left;
    overflow-y: auto;
    background: white;
  }

  /* Annuler l'indentation par défaut des UL - FIX DOTS */
  .offcanvas .offcanvas-body .mobile-nav,
  .offcanvas .offcanvas-body ul,
  .offcanvas .dropdown-menu {
    padding-left: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
    width: 100%;
  }

  /* Supprimer TOUS les dots, bullets, markers */
  .offcanvas .offcanvas-body li,
  .offcanvas .mobile-nav li,
  .offcanvas .dropdown-menu li {
    list-style: none !important;
    list-style-type: none !important;
  }

  .offcanvas .offcanvas-body li::marker,
  .offcanvas .mobile-nav li::marker,
  .offcanvas .dropdown-menu li::marker {
    display: none !important;
    content: none !important;
  }

  /* Items du menu principal */
  .offcanvas .mobile-nav > li,
  .offcanvas .offcanvas-body > .menu-main-menu-container li,
  .offcanvas .offcanvas-body > .menu-menu-principal-bis-1-container li {
    position: relative;
    border-bottom: 1px solid rgba(44, 70, 58, 0.1);
    padding: 18px 0;
    text-align: left;
    list-style: none !important;
  }

  .offcanvas .mobile-nav > li > a,
  .offcanvas .mobile-nav > li > span:not(.menu-couleur),
  .offcanvas .offcanvas-body > .menu-main-menu-container li a,
  .offcanvas
    .offcanvas-body
    > .menu-main-menu-container
    li
    span:not(.menu-couleur),
  .offcanvas .offcanvas-body > .menu-menu-principal-bis-1-container li a,
  .offcanvas
    .offcanvas-body
    > .menu-menu-principal-bis-1-container
    li
    span:not(.menu-couleur) {
    color: #000;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
  }

  /* Hover */
  .offcanvas .mobile-nav > li > a:hover,
  .offcanvas #menu-main-menu li a:hover,
  .offcanvas #menu-menu-principal-bis-1 li a:hover {
    color: var(--wp--preset--color--color-1);
  }

  /* FIX DOUBLES FLÈCHES - Supprimer TOUS les pseudo-éléments de flèches non désirés */
  .offcanvas .dropdown-toggle::after,
  .offcanvas .dropdown-toggle::before,
  .offcanvas a[data-bs-toggle="dropdown"]::after,
  .offcanvas a[data-bs-toggle="dropdown"]::before {
    display: none !important;
    content: none !important;
  }

  /* UNE SEULE flèche SVG pour les items avec sous-menu */
  .offcanvas .mobile-nav > li.menu-item-has-children > a::after,
  .offcanvas
    .mobile-nav
    > li.menu-item-has-children
    > span:not(.menu-couleur)::after,
  .offcanvas li.menu-item-has-children > a::after,
  .offcanvas li.menu-item-has-children > span:not(.menu-couleur)::after {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    content: "" !important;
    background-image: url("../images/chevron-right-solid.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 16px;
    height: 16px;
    display: block;
  }

  /* S'assurer qu'il n'y a PAS de ::before sur les flèches */
  .offcanvas li.menu-item-has-children > a::before,
  .offcanvas li.menu-item-has-children > span::before {
    display: none !important;
    content: none !important;
  }

  /* ── Flèche cliquable dans son cadre gris ──
     Dès qu'un bouton est injecté (classe posée par le JS), la flèche en
     ::after ci-dessus est masquée : sinon on en verrait deux. */
  .offcanvas li.has-nav-toggle > a::after,
  .offcanvas li.has-nav-toggle > span:not(.menu-couleur)::after {
    display: none !important;
    content: none !important;
  }

  /* Le libellé s'arrête avant le cadre pour rester cliquable sans ambiguïté */
  .offcanvas li.has-nav-toggle > a,
  .offcanvas li.has-nav-toggle > span:not(.menu-couleur) {
    padding-right: 62px !important;
  }

  .offcanvas .mobile-nav-toggle,
  ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #f1f1f3;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease;
  }

  .offcanvas .mobile-nav-toggle:hover,
  ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle:hover {
    background: #e3e3e6;
  }

  /* Chevron dessiné en CSS (pas d'image à charger) */
  .mobile-nav-toggle::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin-left: -3px;
    border-right: 2px solid #4a4a4a;
    border-bottom: 2px solid #4a4a4a;
    transform: rotate(-45deg);
  }

  /* ── Compteur de produits ── */
  .offcanvas .mobile-nav .menu-count,
  ul.dropdown-menu[data-mobile-menu-detached="1"] .menu-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f1f3;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
  }

  /* ── Promotions ──
     Le magenta sur fond jaune passait sous le seuil de contraste lisible et
     criait plus fort que les catégories. Fond plein, texte blanc.
     Le jaune est posé selon les menus soit sur le <li>, soit sur le <a>
     (via des sélecteurs à #id) : on neutralise les deux. */
  .offcanvas li.promos {
    margin-top: 8px;
    background-color: transparent !important;
  }

  .offcanvas li.promos > a,
  .offcanvas li.promos > a:hover {
    background-color: var(--wp--preset--color--color-1) !important;
    background-image: none !important;
    color: #fff !important;
    border-radius: 10px !important;
  }

  .offcanvas li.promos > a i,
  .offcanvas li.promos > a svg,
  .offcanvas li.promos > a .menu-count {
    color: #fff !important;
  }

  .offcanvas li.promos > a .menu-count {
    background: rgba(255, 255, 255, 0.25) !important;
  }

  /* Sous-menus en plein écran avec animation */
  .navbar .offcanvas .dropdown-menu {
    position: fixed;
    left: 0 !important;
    top: 0;
    width: 100% !important;
    height: 100%;
    background: white;
    z-index: 1065;
    display: none;
    flex-direction: column;
    justify-content: flex-start !important;
    margin: 0;
    padding: 140px 20px 30px 20px !important;
    overflow-y: auto !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    /* Animation fluide */
    opacity: 0;
    transform: translateX(100%);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  .navbar .offcanvas .dropdown-menu.show {
    display: flex !important;
    opacity: 1;
    transform: translateX(0);
  }

  /* Bouton retour dans les sous-menus */
  .navbar .offcanvas .dropdown-menu.show .back-toggler {
    position: fixed;
    left: 0;
    top: 70px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 18px 20px;
    font-size: 16px;
    gap: 10px;
    color: var(--wp--preset--color--color-1);
    background: white;
    border: none;
    border-bottom: 1px solid #eee;
    text-align: left;
    z-index: 1066;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .navbar .offcanvas .dropdown-menu.show .back-toggler:hover {
    background: rgba(230, 44, 161, 0.05);
  }

  /* Texte "Retour" avec flèche */
  .navbar .offcanvas .dropdown-menu.show .back-toggler::before {
    content: "‹ Retour";
    font-size: 20px;
  }

  /* Masquer les icônes dans le bouton retour */
  .navbar .offcanvas .dropdown-menu.show .back-toggler i,
  .navbar .offcanvas .dropdown-menu.show .back-toggler svg {
    display: none !important;
  }

  /* Items dans les sous-menus */
  .offcanvas .dropdown-menu li,
  ul.dropdown-menu[data-mobile-menu-detached="1"] li {
    position: relative;
    border-bottom: 1px solid rgba(44, 70, 58, 0.1);
    padding: 0;
    list-style: none !important;
  }

  .offcanvas .dropdown-menu li a,
  .offcanvas .dropdown-menu li span:not(.menu-couleur),
  ul.dropdown-menu[data-mobile-menu-detached="1"] li a,
  ul.dropdown-menu[data-mobile-menu-detached="1"] li span:not(.menu-couleur) {
    color: #000;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 0;
    transition: color 0.2s ease;
  }

  .offcanvas .dropdown-menu li a:hover,
  ul.dropdown-menu[data-mobile-menu-detached="1"] li a:hover {
    color: var(--wp--preset--color--color-1);
  }

  /* Container du menu */
  .offcanvas.show .menu-main-menu-container,
  .offcanvas.show .menu-menu-principal-bis-1-container {
    width: 100%;
  }

  /* Menu Promos */
  #menu-menu-principal-bis li.promos a {
    background-color: var(--wp--preset--color--color-6);
    color: var(--wp--preset--color--color-1);
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 20px;
    border-radius: 8px;
    display: block;
    transition: transform 0.2s ease;
  }

  #menu-menu-principal-bis li.promos a:hover {
    transform: translateX(5px);
  }

  /* Span couleur (ne doit pas avoir de flèche) */
  #menu-menu-principal-bis li span.menu-couleur {
    width: 5px;
    height: 50%;
    position: absolute;
    left: 0;
  }

  #menu-menu-principal-bis li span.menu-couleur::after,
  #menu-menu-principal-bis li span.menu-couleur::before {
    display: none !important;
    content: none !important;
  }

  /* Top Menu 3 (si présent) */
  #menu-top-header-3 {
    list-style-type: none;
    padding-left: 0;
    width: 100%;
  }

  #menu-top-header-3 li {
    position: relative;
    border-bottom: 1px solid rgba(44, 70, 58, 0.1);
    padding: 15px 0;
    text-align: left;
    list-style: none !important;
  }

  #menu-top-header-3 li a {
    color: #000;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
  }

  #menu-top-header-3 li a svg {
    color: var(--wp--preset--color--color-2);
    margin-right: 10px;
  }

  #menu-top-header-3 li.telephone a em {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
  }
}

/* ============================================================
   MOBILE MENU OFFCANVAS — REFONTE COMPLÈTE
   Design intuitif avec : search bar, quick actions, items
   à bandeau couleur large, PROMOTIONS card, phone CTA, trust badge.
   Le JS (main.js → applyMenuColors) injecte --menu-color sur les <li>
   à partir du span .menu-couleur — on l'utilise pour les accents.
   ============================================================ */
@media screen and (max-width: 991px) {
  /* Body du menu : plus de padding latéral, fond légèrement gris-bleu
     align-items: stretch !important pour que les containers wp_nav_menu
     prennent toute la largeur (le parent theme met flex-start). */
  .navbar .offcanvas .offcanvas-body {
    padding: 80px 16px 24px !important;
    gap: 8px;
    background: #fafbfc !important;
    align-items: stretch !important;
  }

  /* TOUS les enfants directs de l'offcanvas-body prennent 100% de largeur :
     les wp_nav_menu containers ont une largeur naturelle minuscule et ne
     se stretch pas avec align-items:flex-start hérité. On force ici. */
  .navbar .offcanvas .offcanvas-body > * {
    width: 100% !important;
    align-self: stretch !important;
  }

  /* Tablette (768→991px) : offcanvas en panneau latéral 420px au lieu
     de plein écran → respecte les standards UI tablette + overlay sombre
     visible derrière pour le contexte. */
  @media screen and (min-width: 768px) {
    .navbar .offcanvas.show {
      width: 420px !important;
      max-width: 100vw;
      box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    }

    /* Overlay sombre derrière le panneau */
    .offcanvas-backdrop.show {
      opacity: 0.55 !important;
    }

    /* Logo header du menu : aligné à gauche du panneau 420px */
    .navbar .offcanvas .logo-row {
      width: 420px !important;
      max-width: 100vw;
      left: auto !important;
      right: 0;
    }
  }

  /* ── Search bar — scrolle normalement avec le reste du menu ── */
  .mobile-menu-search {
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
  }

  .mobile-menu-search .aws-container,
  .mobile-menu-search form {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* La bordure/arrondi portent sur le FORMULAIRE, pas sur le champ : c'est ce
     qui fusionne le bouton loupe et la barre en un seul bloc (avant, le champ
     était une pilule autonome et la loupe flottait à côté). */
  .mobile-menu-search .aws-search-form {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 999px !important;
    background: #fff !important;
    overflow: hidden;
    transition: border-color 0.2s ease;
  }

  .mobile-menu-search .aws-search-form:focus-within {
    border-color: var(--wp--preset--color--color-1) !important;
    box-shadow: 0 0 0 3px rgba(230, 44, 161, 0.1);
  }

  .mobile-menu-search .aws-wrapper {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .mobile-menu-search input[type="search"],
  .mobile-menu-search input[type="text"] {
    width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 12px 8px 12px 18px !important;
    font-size: 15px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-menu-search input:focus {
    outline: none !important;
    box-shadow: none !important;
  }

  .mobile-menu-search .aws-search-form .aws-form-btn,
  .mobile-menu-search .aws-search-form .aws-search-btn {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px 0 8px !important;
    background: transparent !important;
    border: 0 !important;
  }

  /* Croix de fermeture : dimensions explicites sur l'icône (FontAwesome la
     remplace par un <svg>, d'où le double ciblage i + svg) pour qu'elle soit
     réellement centrée dans son carré de 40px. */
  .navbar .offcanvas .logo-row .back-toggler {
    line-height: 1;
    padding: 0;
    align-self: center;
    flex: 0 0 40px;
  }

  /* Cas SVG (FontAwesome remplace le <i>) : boîte carrée explicite. */
  .navbar .offcanvas .logo-row .back-toggler svg {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0;
    vertical-align: middle;
  }

  /* Cas webfont (avant le remplacement, ou si le JS échoue) : là il ne faut
     PAS de boîte fixe — le glyphe se centre par line-height, sinon il est
     décalé dans son cadre. */
  .navbar .offcanvas .logo-row .back-toggler i {
    display: block;
    width: auto;
    height: auto;
    font-size: 24px;
    line-height: 1;
    margin: 0;
  }

  /* ═══════════════════════════════════════════════════════════
     RÉGLAGE MANUEL DE LA POSITION DE LA CROIX
     Seules ces deux valeurs sont à modifier :
       top   →  négatif = monte      |  positif = descend
       right →  positif = vers la gauche | négatif = vers la droite
     0px = position par défaut. Le bouton est en position:relative,
     ces décalages ne modifient donc rien d'autre dans la barre.
     ═══════════════════════════════════════════════════════════ */
  .navbar .offcanvas .logo-row .back-toggler {
    top: 0px;
    right: 0px;
  }

  /* ── Quick actions : Compte + Panier ── */
  .mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin: 0 0 24px;
  }

  .mobile-menu-action {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none !important;
    color: #2a4e49 !important;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .mobile-menu-action:active {
    transform: scale(0.97);
    background: #f9fafb;
  }

  .mobile-menu-action i {
    font-size: 22px;
    color: var(--wp--preset--color--color-1);
  }

  .mobile-menu-action--cart {
    background: linear-gradient(135deg, #e62ca1 0%, #c91f8a 100%);
    border-color: transparent;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(230, 44, 161, 0.25);
  }

  .mobile-menu-action--cart i {
    color: #fff;
  }

  .mobile-menu-action__badge {
    position: absolute;
    top: 8px;
    right: 12px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #fff;
    color: var(--wp--preset--color--color-1);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* ── Section titles ── */
  .mobile-menu-section-title {
    width: 100%;
    margin: 8px 0 4px;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
  }

  .mobile-menu-section-title--secondary {
    margin-top: 24px;
  }

  /* ── ITEMS DU MENU PRINCIPAL — refonte ──
     On override TOUTES les anciennes règles avec une nouvelle structure :
     fond blanc sur carte arrondie, bandeau couleur (8px) à gauche, padding
     généreux, chevron à droite. */
  .navbar .offcanvas .offcanvas-body .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100%;
  }

  .offcanvas .mobile-nav > li {
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.2s ease;
  }

  .offcanvas .mobile-nav > li:active {
    transform: scale(0.99);
    background: #f9fafb !important;
  }

  /* Bandeau couleur à gauche (large) — utilise --menu-color injecté en JS */
  .offcanvas .mobile-nav > li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: var(--menu-color, transparent);
    border-radius: 0;
  }

  /* On masque le span .menu-couleur d'origine — remplacé par notre ::before */
  .offcanvas .mobile-nav > li > span.menu-couleur {
    display: none !important;
  }

  /* Lien principal de l'item */
  .offcanvas .mobile-nav > li > a,
  .offcanvas .mobile-nav > li > span:not(.menu-couleur) {
    display: flex !important;
    align-items: center;
    width: 100%;
    padding: 18px 44px 18px 22px !important;
    color: #1f2937 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .offcanvas .mobile-nav > li > a:hover {
    color: var(--menu-color, var(--wp--preset--color--color-1)) !important;
    background: transparent !important;
  }

  /* Chevron à droite pour les items avec sous-menu */
  .offcanvas .mobile-nav > li.menu-item-has-children > a::after,
  .offcanvas
    .mobile-nav
    > li.menu-item-has-children
    > span:not(.menu-couleur)::after {
    content: "" !important;
    position: absolute;
    right: 18px !important;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-top: 2px solid #9ca3af !important;
    border-right: 2px solid #9ca3af !important;
    transform: translateY(-50%) rotate(45deg);
    background: none !important;
  }

  /* ── PROMOTIONS — carte spéciale gradient ── */
  .offcanvas .mobile-nav > li.promos {
    background: linear-gradient(135deg, #fde047 0%, #fbbf24 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35) !important;
    margin: 6px 0 !important;
  }

  .offcanvas .mobile-nav > li.promos::before {
    display: none !important; /* pas de bandeau couleur sur le promo card */
  }

  .offcanvas .mobile-nav > li.promos > a {
    padding: 18px 22px !important;
    color: #c91f8a !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    justify-content: center;
  }

  /* L'emoji cadeau detonnait avec les icones au trait du reste du header :
     il etait remplace par une etiquette en masque CSS. Depuis que les lignes
     du menu portent leur tuile (lib/header-icones.php), cette etiquette
     ferait double emploi — Promotions en affichait deux. */
  .offcanvas .mobile-nav > li.promos > a::before {
    display: none !important;
    content: none !important;
  }

  /* La ligne Promotions est deja sur fond jaune : la tuile se contente d'un
     voile blanc, sinon elle disparait dans le fond. */
  .offcanvas .mobile-nav > li.promos .pdc-tuile {
    background: rgba(255, 255, 255, 0.55);
  }

  .offcanvas .mobile-nav > li.promos .pdc-icone--tuile {
    color: #c91f8a;
  }

  /* ── Top-menu-1 (Articles, Contact, Téléphone) ── */
  .menu-top-header-1-container {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  .menu-top-header-1-container ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  /* Items utilitaires (Articles & Conseils, Contact) — style compact */
  .menu-top-header-1-container li {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    list-style: none !important;
  }

  .menu-top-header-1-container li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 18px !important;
    color: #2a4e49 !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    text-decoration: none;
  }

  .menu-top-header-1-container li a svg,
  .menu-top-header-1-container li a i {
    width: 18px;
    height: 18px;
    color: var(--wp--preset--color--color-2);
    flex-shrink: 0;
    margin: 0 !important;
  }

  /* Téléphone : carte CTA mise en avant (à la fin grâce à order:99) */
  .menu-top-header-1-container li.telephone {
    order: 99;
    margin-top: 12px;
    background: var(--wp--preset--color--color-2) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(57, 195, 168, 0.3) !important;
    padding: 0 !important;
  }

  .menu-top-header-1-container li.telephone a {
    padding: 18px 22px !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative;
  }

  .menu-top-header-1-container li.telephone a::before {
    content: "Appelez-nous";
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 2px;
  }

  .menu-top-header-1-container li.telephone a svg,
  .menu-top-header-1-container li.telephone a i {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px !important;
    height: 28px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    padding: 8px;
    box-sizing: content-box;
  }

  .menu-top-header-1-container li.telephone a em {
    font-style: normal;
    display: block;
    font-size: 12px !important;
    font-weight: 500 !important;
    opacity: 0.9;
    margin-top: 2px;
  }

  /* ── Trust badge en bas du menu ── */
  .mobile-menu-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 12px;
    padding: 14px;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
  }

  .mobile-menu-trust svg {
    border-radius: 2px;
    flex-shrink: 0;
  }

  .mobile-menu-trust__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }

  .mobile-menu-trust__text strong {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
  }

  .mobile-menu-trust__text small {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
  }

  /* ── Override des règles existantes qui cassent notre nouvelle structure ── */
  .offcanvas .mobile-nav > li,
  .offcanvas .offcanvas-body > .menu-main-menu-container li,
  .offcanvas .offcanvas-body > .menu-menu-principal-bis-1-container li {
    border-bottom: none !important;
    padding: 0 !important;
  }

  /* Le span menu-couleur en absolute n'est plus utilisé */
  .offcanvas .mobile-nav > li > span.menu-couleur,
  #menu-menu-principal-bis li span.menu-couleur,
  #menu-menu-principal-bis-1 li span.menu-couleur {
    display: none !important;
  }
}

/* ============================================================
   SOUS-MENU MOBILE DÉTACHÉ — Styles indépendants du parent
   Le JS déplace le sous-menu actif vers <body> pour échapper aux
   contextes parents qui bloquent les clics. Du coup les règles
   `.navbar .offcanvas .dropdown-menu` ne s'appliquent plus. Ces
   règles ici ciblent l'attribut data-mobile-menu-detached pour que
   le rendu reste cohérent.
   ============================================================ */
ul.dropdown-menu[data-mobile-menu-detached="1"] {
  flex-direction: column !important;
  justify-content: flex-start !important;
  list-style: none !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] li {
  display: block !important;
  width: 100% !important;
  flex: none !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] li a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  color: #000 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  width: 100% !important;
  text-align: left !important;
  padding: 16px 0 !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"]
  li.menu-item-has-children
  > a::after {
  content: "" !important;
  width: 8px;
  height: 8px;
  border-top: 2px solid #9ca3af;
  border-right: 2px solid #9ca3af;
  transform: rotate(45deg);
  margin-left: 8px;
  flex-shrink: 0;
}

/* Back-toggler (×) en haut du sous-menu détaché — bandeau Retour */
/* ── Flèche cliquable dans les sous-menus DÉTACHÉS ──
   Ces sous-menus sont déplacés dans <body>, donc hors de `.offcanvas` : toutes
   les règles scopées `.offcanvas` cessent de s'appliquer et il faut les
   redéclarer ici. */
ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  flex: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f1f1f3 !important;
  z-index: 3 !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle::before {
  content: "" !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  margin-left: -3px !important;
  border-right: 2px solid #4a4a4a !important;
  border-bottom: 2px solid #4a4a4a !important;
  border-top: 0 !important;
  border-left: 0 !important;
  background: none !important;
  transform: rotate(-45deg) !important;
}

/* Le compteur est un <span> : même règle `li span { width:100% }` du thème à
   neutraliser, sinon la pastille s'étire sur toute la ligne. */
.offcanvas .dropdown-menu li .menu-count,
ul.dropdown-menu[data-mobile-menu-detached="1"] .menu-count {
  display: inline-block !important;
  width: auto !important;
  flex: none !important;
  margin-left: 8px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: #f1f1f3 !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* Sinon la flèche SVG d'origine du thème s'ajoute à la nôtre */
ul.dropdown-menu[data-mobile-menu-detached="1"] li.has-nav-toggle > a::after {
  display: none !important;
  content: none !important;
}

/* Le libellé s'arrête avant le cadre de la flèche */
ul.dropdown-menu[data-mobile-menu-detached="1"] li.has-nav-toggle > a {
  padding-right: 62px !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 18px 20px !important;
  font-size: 16px !important;
  gap: 10px !important;
  color: var(--wp--preset--color--color-1) !important;
  background: white !important;
  border: none !important;
  border-bottom: 1px solid #eee !important;
  z-index: 10001 !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler::before {
  content: "‹ Retour" !important;
  font-size: 20px !important;
}

ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler svg,
ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler i {
  display: none !important;
}

/* ========== MENU MOBILE OUVERT : on masque les barres fixes du bas ==========
   Barre de filtres des archives (.mobile-filter-bar) et CTA d'ajout au panier
   de la fiche produit (.mobile-sticky-bar) sont en position:fixed et
   flottaient par-dessus le menu. Règle ici car header.css est chargé partout,
   contrairement à categories.css / product-mobile.css. */
body.mobile-menu-open .mobile-filter-bar,
body.mobile-menu-open .mobile-sticky-bar {
  display: none !important;
}

/* ========== FIX BANDE BLANCHE ========== */
html {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  max-width: 100vw;
  width: 100%;
}

main,
#main,
.site-content,
#content {
  overflow-x: clip;
  max-width: 100vw;
}

/* ========== HEADER AU SCROLL ==========
   Le header ne se compacte plus : seul le bandeau du haut (et, sur desktop,
   la barre de contact) disparaît. Tout le reste garde sa taille, ce qui évite
   le saut de mise en page et le flou d'un logo qui rétrécit. */
/* ============================================================
   MENU MOBILE — panneau à GAUCHE sur tablette (768 → 991px)
   Sous 768px il reste en plein écran (le mieux sur un téléphone) ;
   au-delà, un panneau pleine largeur est disproportionné et le geste
   naturel est de le voir arriver du côté du bouton hamburger, à gauche.
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .navbar .offcanvas.offcanvas-start,
  .navbar .offcanvas.offcanvas-start.show {
    left: 0 !important;
    right: auto !important;
    width: min(420px, 88vw) !important;
    max-width: min(420px, 88vw) !important;
    border-right: 1px solid #eee;
  }

  /* L'en-tête fixe du menu doit suivre la largeur du panneau */
  .navbar .offcanvas .logo-row {
    left: auto !important;
    right: 0 !important;
    width: min(420px, 88vw) !important;
  }

  /* Les sous-menus détachés sont envoyés dans <body> : on les cale sur
     le panneau, sinon ils s'ouvriraient en plein écran. */
  ul.dropdown-menu[data-mobile-menu-detached="1"] {
    left: 0 !important;
    right: auto !important;
    width: min(420px, 88vw) !important;
  }

  ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler {
    left: 0 !important;
    right: auto !important;
    width: min(420px, 88vw) !important;
  }
}

/* ============================================================
   MENU TABLETTE — ancrage à GAUCHE, par sélecteur d'ID
   Le bouton hamburger est à gauche : le panneau arrive du même côté
   (2026-11-12, il venait de la droite). Les règles précédentes
   (.navbar .offcanvas.show { left: 0 }) sont scopées par classes ; un
   sélecteur d'#id les emporte quel que soit l'ordre des feuilles.
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 991px) {
  #primary-nav-mobile,
  #primary-nav-mobile.show,
  #primary-nav-mobile.offcanvas-start,
  #primary-nav-mobile.offcanvas-start.show {
    left: 0 !important;
    right: auto !important;
    width: min(420px, 88vw) !important;
    max-width: min(420px, 88vw) !important;
    border-right: 1px solid #eee !important;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
  }

  /* L'en-tête du menu est en position:fixed : il doit suivre le panneau,
     sinon il reste étalé sur toute la largeur de l'écran. */
  #primary-nav-mobile .logo-row {
    left: 0 !important;
    right: auto !important;
    width: min(420px, 88vw) !important;
  }
}


/* ============================================================
   HEADER PC — mise en page et couleurs
   Trois partis pris, tous regroupés ici pour être faciles à défaire :
     1. la recherche prend la place disponible entre le logo et les actions ;
     2. le menu des catégories est gris au repos, la couleur de la catégorie
        n'apparaît qu'au survol — le header comptait une dizaine de teintes
        affichées en même temps ;
     3. les espaces verticaux sont resserrés.
   ============================================================ */
@media screen and (min-width: 992px) {
  /* ── Rangée principale : logo | recherche extensible | actions ── */
  .header-main-row {
    padding: 12px 0 8px;
    flex-wrap: nowrap !important;
  }

  /* Les gouttières Bootstrap (.row à -12px, colonnes à +12px) s'annulent :
     y toucher décalerait le logo de 12px par rapport au menu du dessous. */
  .header-logo-container {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 252px !important;
  }

  #mobile-searchbox.searchbox {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  /* Compte, Favoris et Panier : un seul écartement pour les trois. La liste
     de menu et le bouton panier sont deux éléments distincts, d'où le même
     gap posé sur le conteneur et sur la liste. */
  .header-main-row > .d-lg-flex {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    gap: 24px;
  }

  .menu-top-header-2-container ul {
    gap: 24px;
  }

  header .cart.ms-2 {
    margin-left: 0 !important;
  }

  /* ── Menu : collé à la rangée du dessus ── */
  .header-menu-container {
    margin-top: 2px;
    padding-bottom: 4px;
  }

  /* ── Actions : compte et favoris en gris, le panier garde l'accent ── */
  .menu-top-header-2-container li a {
    color: #4b5563;
    font-size: 14px;
    gap: 7px;
  }

  .menu-top-header-2-container li a .pdc-icone,
  .menu-top-header-2-container li a svg {
    width: 21px;
    height: 21px;
    color: #8a909c;
    font-size: 21px;
  }

  .menu-top-header-2-container li a:hover,
  .menu-top-header-2-container li a:hover .pdc-icone,
  .menu-top-header-2-container li a:hover svg {
    color: var(--wp--preset--color--color-1);
  }

  header .cart {
    padding: 10px 18px;
    font-size: 14px;
    box-shadow: none;
  }

  header .cart:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(230, 44, 161, 0.35);
  }

  header .cart .pdc-icone {
    width: 21px;
    height: 21px;
    color: #fff;
  }

  /* ── Menu des catégories ──
     Le fond plein au survol était illisible : la couleur de chaque catégorie
     est posée en style inline par le JS (applyMenuColors), donc impossible à
     corriger en CSS, et plusieurs sont trop claires pour du texte blanc —
     « Promotions » en jaune disparaissait complètement.
     On garde donc le libellé lisible en toutes circonstances et la couleur
     passe dans un soulignement qui se déploie au survol. */
  #desktop-nav-container .desktop-nav > li,
  #desktop-nav-container .navbar-nav > li {
    position: relative !important;
    overflow: visible;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-radius: 0;
  }

  /* L'ancienne règle de survol a une pseudo-classe de plus : il faut la
     neutraliser à spécificité égale, sinon le fond plein revient au survol. */
  #desktop-nav-container .desktop-nav > li:hover,
  #desktop-nav-container .navbar-nav > li:hover {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
  }

  #desktop-nav-container .desktop-nav > li::after,
  #desktop-nav-container .navbar-nav > li::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: -2px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--menu-color, var(--wp--preset--color--color-1));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
  }

  #desktop-nav-container .desktop-nav > li:hover::after,
  #desktop-nav-container .navbar-nav > li:hover::after {
    transform: scaleX(1);
  }

  #desktop-nav-container .desktop-nav > li > a,
  #desktop-nav-container .desktop-nav > li > span:not(.menu-couleur),
  #desktop-nav-container .navbar-nav > li > a,
  #desktop-nav-container .navbar-nav > li > span:not(.menu-couleur) {
    color: #3f4652 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  #desktop-nav-container .desktop-nav > li:hover > a,
  #desktop-nav-container .desktop-nav > li:hover > span:not(.menu-couleur),
  #desktop-nav-container .navbar-nav > li:hover > a,
  #desktop-nav-container .navbar-nav > li:hover > span:not(.menu-couleur) {
    color: #14181f !important;
  }

  /* Promotions garde son accent de marque dans le libellé. */
  #desktop-nav-container .desktop-nav > li.promos > a,
  #desktop-nav-container .navbar-nav > li.promos > a {
    color: var(--wp--preset--color--color-1) !important;
    font-weight: 700;
  }

  #desktop-nav-container .desktop-nav > li.promos:hover > a,
  #desktop-nav-container .navbar-nav > li.promos:hover > a {
    color: var(--wp--preset--color--color-1) !important;
  }

  /* ── Icônes des catégories (remplacent les emojis) ── */
  .pdc-icone--categorie {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    color: #8a909c;
  }

  #desktop-nav-container .desktop-nav > li:hover .pdc-icone--categorie,
  #desktop-nav-container .navbar-nav > li:hover .pdc-icone--categorie {
    color: var(--menu-color, var(--wp--preset--color--color-1));
  }
}

/* Le libellé des catégories est désormais enrobé : il ne doit pas se couper. */
.pdc-libelle {
  white-space: nowrap;
}


/* ============================================================
   ICÔNES DU HEADER — gabarit commun
   Toutes les icônes du header viennent de la même bibliothèque
   (lib/header-icones.php) : même grille de 24, même épaisseur de
   trait (1,7), mêmes terminaisons arrondies. Ce bloc ne fixe que
   les tailles selon l'endroit.
   ============================================================ */
/* Taille de repli, pour qu'une icône sans règle dédiée ne sorte pas à la
   taille par défaut d'un SVG. `:where()` lui donne une spécificité nulle :
   n'importe quelle règle de contexte la remplace, où qu'elle soit dans la
   feuille (sans ça, ce bloc placé en fin de fichier écrasait les 21px des
   icônes de catégorie). */
:where(.pdc-icone) {
  width: 1.4em;
  height: 1.4em;
}

.pdc-icone {
  flex-shrink: 0;
}

/* Menu burger : compte et panier des actions rapides */
.mobile-menu-action .pdc-icone--action {
  width: 25px;
  height: 25px;
  color: var(--wp--preset--color--color-1);
}

.mobile-menu-action--cart .pdc-icone--action {
  color: #fff;
}

/* Croix de fermeture du menu burger : l'icône FontAwesome occupait un carré
   de 40px, trop massif pour un trait fin. */
.navbar .offcanvas .logo-row .back-toggler .pdc-icone--fermer,
.back-toggler .pdc-icone--fermer {
  width: 26px !important;
  height: 26px !important;
  display: block;
  margin: 0 auto;
}

/* =============================================================================
   TABLETTES (768 - 991 px) : LE HEADER TIENT SUR UNE LIGNE

   Entre ces deux largeurs, le header gardait la disposition du telephone :
   une rangee logo + icones, puis la recherche en dessous, soit 144 px de haut
   pour un ecran qui a largement la place de tout mettre cote a cote. Le logo
   s'etalait sur 578 px pour une image de 34.

   Le menu des categories reste dans le burger : a 820 px, six onglets avec
   leurs icones ne tiendraient pas sans tout serrer.
   ============================================================================= */

@media screen and (min-width: 768px) and (max-width: 991px) {
  .header-main-row {
    flex-wrap: nowrap !important;
    column-gap: 14px;
    padding: 10px 0 12px !important;
  }

  /* L'ordre du HTML place la recherche en dernier : on la remonte entre le
     logo et les icones, la ou on l'attend. */
  .header-burger-col {
    order: 1;
  }

  .header-logo-container {
    order: 2;
    flex: 0 1 auto !important;
    padding-left: 10px !important;
    padding-right: 0 !important;
  }

  .header-logo-container .custom-logo {
    max-height: 38px !important;
  }

  #mobile-searchbox.searchbox {
    order: 3;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header-actions-col {
    order: 4;
  }

  /* Les deux icones de droite peuvent respirer, la place ne manque plus. */
  .mobile-top-actions {
    gap: 6px;
  }
}

/* =============================================================================
   EN-TETE DES SOUS-MENUS DU MENU BURGER  (2026-11-12)

   Le panneau d'un sous-rayon n'affichait qu'un « Retour » : on ne savait plus
   dans quel rayon on etait, et le rayon lui-meme n'etait plus atteignable.
   assets/js/menu-mobile.js pose ce bandeau par-dessus le panneau.
   ============================================================================= */

/* Voir le bloc « PANNEAU DE SOUS-RAYON » en fin de fichier. */

/* Le bandeau d'origine ferait doublon sous le notre. */
body.a-entete-sous-menu ul.dropdown-menu[data-mobile-menu-detached="1"] .back-toggler {
  display: none !important;
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  /* Le panneau ne fait que 420 px sur tablette : le bandeau le suit. */
  .pdc-sous-menu-entete {
    right: auto;
    width: min(420px, 88vw);
  }
}

/* =============================================================================
   MENU BURGER : LES RAYONS EN TUILES  (2026-11-12)

   Une ligne de texte avec un filet de couleur a gauche se lit comme une
   liste : on la parcourt mot a mot. Une tuile coloree de 48 px se reconnait
   d'un coup d'oeil et se vise du pouce. Le gabarit est pose par
   lib/header-icones.php (span.pdc-tuile + span.pdc-libelle).

   La couleur vient de --menu-color, posee element par element par
   assets/js/main.js d'apres le champ « couleur » du rayon : la tuile en
   prend une teinte claire, l'icone la couleur pleine.
   ============================================================================= */

@media screen and (max-width: 991px) {
  .offcanvas .mobile-nav > li > a,
  .offcanvas .mobile-nav > li > span:not(.menu-couleur) {
    display: flex !important;
    align-items: center;
    gap: 14px;
    min-height: 48px;
  }

  .pdc-tuile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    /* Repli pour les navigateurs sans color-mix : un gris tres clair. */
    background: #f3f4f6;
    background: color-mix(in srgb, var(--menu-color, #8a909c) 13%, #fff);
  }

  .pdc-icone--tuile {
    width: 25px;
    height: 25px;
    color: var(--menu-color, #5e6470);
  }

  .offcanvas .mobile-nav > li > a .pdc-libelle,
  .offcanvas .mobile-nav > li > span .pdc-libelle {
    flex: 1 1 auto;
    min-width: 0;
    /* Le libelle reste sombre : « Materiel medical » est en bleu clair
       (#83D0F5), illisible sur blanc. C'est la tuile qui porte la couleur,
       le texte porte la lisibilite. */
    color: #1a1a1a;
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.25;
  }

  /* Le compteur de produits reste a droite du libelle, pas sous la tuile. */
  .offcanvas .mobile-nav > li > a .menu-count {
    flex: 0 0 auto;
  }

  /* Les lignes respirent un peu plus : la tuile fait 48, la ligne 72. */
  .offcanvas .mobile-nav > li {
    padding: 12px 0;
  }

  /* ── Le bouton de fermeture porte son mot ── */
  .navbar .offcanvas .logo-row .back-toggler {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    width: auto !important;
    height: 38px;
    padding: 0 14px 0 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #3f4652;
  }

  .back-toggler__texte {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .navbar .offcanvas .logo-row .back-toggler .pdc-icone--fermer {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Le bandeau du sous-menu reprend la couleur du rayon : on sait de quel
   rayon on explore les rayons. */



/* =============================================================================
   MENU BURGER : DES LIGNES, PAS DES CARTES  (2026-11-13)

   Chaque rayon etait une carte blanche avec bordure, coin arrondi, ombre et
   filet de couleur : six cartes empilees font un menu lourd a parcourir. Une
   ligne separee d'un filet se lit plus vite, et la tuile suffit a porter la
   couleur. Le libelle repasse en casse normale : les capitales ralentissent
   la lecture d'un mot long comme « Matériel médical ».
   ============================================================================= */

@media screen and (max-width: 991px) {
  .offcanvas .mobile-nav > li {
    background: none !important;
    border: 0 !important;
    border-bottom: 1px solid #f0f0f3 !important;
    border-radius: 0 !important;
    padding: 6px 0 !important;
  }

  .offcanvas .mobile-nav > li:last-child {
    border-bottom: 0 !important;
  }

  .offcanvas .mobile-nav > li:active {
    transform: none;
    background: #fafafb !important;
  }

  /* Le filet de couleur a gauche faisait doublon avec la tuile. */
  .offcanvas .mobile-nav > li > .menu-couleur {
    display: none !important;
  }

  .pdc-tuile {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .pdc-icone--tuile {
    width: 21px;
    height: 21px;
  }

  .offcanvas .mobile-nav > li > a .pdc-libelle,
  .offcanvas .mobile-nav > li > span .pdc-libelle {
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
  }

  .offcanvas .mobile-nav > li > a,
  .offcanvas .mobile-nav > li > span:not(.menu-couleur) {
    gap: 12px;
    min-height: 44px;
    padding: 4px 0 !important;
  }

  /* Le bouton chevron s'allege : un carre gris de 44 px a cote d'une tuile
     de 38 pesait autant que la ligne elle-meme. */
  .offcanvas .mobile-nav-toggle,
  ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 40px !important;
    color: #9aa0ab !important;
  }

  .offcanvas li.has-nav-toggle > a,
  .offcanvas li.has-nav-toggle > span:not(.menu-couleur) {
    padding-right: 44px !important;
  }

  /* La ligne Promotions garde son fond jaune : elle redevient une carte. */
  .offcanvas .mobile-nav > li.promos {
    border-bottom: 0 !important;
    border-radius: 12px !important;
    margin: 6px 0 !important;
    padding: 6px 12px !important;
  }
}

@media screen and (max-width: 991px) {
  /* Le filet de couleur en ::before du <li> faisait doublon avec la tuile :
     deux fois la meme information sur la meme ligne. */
  .offcanvas .mobile-nav > li::before {
    display: none !important;
    content: none !important;
  }

  /* ── Pied du menu : contact et telephone dans une carte ──
     C'etait une liste de liens comme une autre ; le numero de la pharmacie
     merite mieux que la quatrieme ligne d'une liste grise. */
  .offcanvas .menu-top-header-1-container {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f4f8f6;
  }

  .offcanvas .menu-top-header-1-container ul {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    margin: 0 !important;
    padding: 0 !important;
  }

  .offcanvas .menu-top-header-1-container li {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
  }

  .offcanvas .menu-top-header-1-container li a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 9px 0 !important;
    color: #2c463a !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
  }

  .offcanvas .menu-top-header-1-container .pdc-icone {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: var(--wp--preset--color--color-8, #2a4e49);
  }

  /* Le numero de telephone : la ligne qu'on veut pouvoir toucher. */
  .offcanvas .menu-top-header-1-container li.telephone a {
    margin-top: 4px;
    padding: 12px 14px !important;
    border-radius: 10px;
    background: var(--wp--preset--color--color-8, #2a4e49);
    color: #fff !important;
    font-weight: 700 !important;
  }

  .offcanvas .menu-top-header-1-container li.telephone a .pdc-icone {
    color: #fff;
  }

  .offcanvas .menu-top-header-1-container li.telephone em {
    display: none;
  }
}

/* =============================================================================
   PANNEAU DE SOUS-RAYON ET EN-TETE DU MENU BURGER  (2026-11-13)

   Trois reproches au panneau precedent : le bouton « Voir tout » collait au
   bandeau, on ne voyait pas ou commencait une ligne de sous-rayon, et le
   bandeau plein de couleur ecrasait tout. Il se decompose maintenant en deux
   temps : une ligne de retour sobre, puis un bloc teinte qui rappelle le
   rayon et propose sa page.

   La structure est posee par assets/js/menu-mobile.js.
   ============================================================================= */

.pdc-sous-menu-entete {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: #fff;
}

/* ── Ligne de retour ── */
.pdc-sous-menu-entete__retour {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #ececf0;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.pdc-sous-menu-entete__retour svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* ── Bloc du rayon : teinte de sa couleur, jamais la couleur pleine ── */
.pdc-sous-menu-entete__rayon {
  padding: 14px 16px 16px;
  background: #f6f6f8;
  background: color-mix(in srgb, var(--pdc-couleur-rayon, #8a909c) 11%, #fff);
}

.pdc-sous-menu-entete__titre {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.pdc-sous-menu-entete__tuile .pdc-tuile {
  width: 40px;
  height: 40px;
  background: #fff;
}

.pdc-sous-menu-entete__nom {
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
}

/* Bouton blanc plutot que colore : sur une teinte claire, un aplat de la
   meme couleur disparaissait. */
.pdc-sous-menu-entete__tout {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--pdc-couleur-rayon, var(--wp--preset--color--color-1)) !important;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.pdc-sous-menu-entete__tout::before,
.pdc-sous-menu-entete__tout::after {
  display: none !important;
  content: none !important;
}

.pdc-sous-menu-entete__tout[hidden] {
  display: none;
}

/* ── Les sous-rayons : des lignes franches, separees ── */
body.a-entete-sous-menu ul.dropdown-menu[data-mobile-menu-detached="1"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.a-entete-sous-menu
  ul.dropdown-menu[data-mobile-menu-detached="1"]
  > li {
  border-bottom: 1px solid #f0f0f3;
}

body.a-entete-sous-menu
  ul.dropdown-menu[data-mobile-menu-detached="1"]
  > li:last-child {
  border-bottom: 0;
}

body.a-entete-sous-menu
  ul.dropdown-menu[data-mobile-menu-detached="1"]
  > li
  > a {
  padding: 15px 16px !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  .pdc-sous-menu-entete {
    right: auto;
    width: min(420px, 88vw);
  }
}

/* =============================================================================
   EN-TETE DU MENU : CROIX, LOGO, COMPTE, PANIER
   ============================================================================= */

@media screen and (max-width: 991px) {
  .navbar .offcanvas .logo-row {
    gap: 6px;
    padding: 8px 10px !important;
  }

  .navbar .offcanvas .logo-row .back-toggler {
    order: 1;
    width: 42px !important;
    height: 42px;
    padding: 0 !important;
    border-radius: 12px;
    justify-content: center;
  }

  /* La croix revient a une croix : son mot n'a plus sa place maintenant
     qu'elle partage la rangee avec le logo et deux icones. */
  .navbar .offcanvas .logo-row .back-toggler .back-toggler__texte {
    display: none;
  }

  /* flex-basis a 0 et overflow caches : sinon le logo garde sa largeur
     naturelle (300 px) et pousse l'icone du panier hors de l'ecran. */
  .navbar .offcanvas .logo-row .menu-logo {
    order: 2;
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    padding-left: 4px;
  }

  .navbar .offcanvas .logo-row .menu-logo img,
  .navbar .offcanvas .logo-row .menu-logo .custom-logo {
    max-height: 30px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto;
  }

  .menu-action {
    order: 3;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--wp--preset--color--color-1);
  }

  .menu-action--panier {
    order: 4;
  }

  .pdc-icone--entete {
    width: 24px;
    height: 24px;
  }

  .menu-action__badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--wp--preset--color--color-1);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
  }

  .menu-action__badge:empty,
  .menu-action__badge[data-count="0"] {
    display: none;
  }
}

@media screen and (max-width: 991px) {
  /* Le menu s'arrete au sous-rayon : plus aucune ligne du panneau n'ouvre
     quoi que ce soit. WordPress garde la classe menu-item-has-children meme
     quand la profondeur coupe les enfants, d'ou ces chevrons qui ne menaient
     nulle part. */
  ul.dropdown-menu[data-mobile-menu-detached="1"] .mobile-nav-toggle {
    display: none !important;
  }

  ul.dropdown-menu[data-mobile-menu-detached="1"] li > a::after,
  ul.dropdown-menu[data-mobile-menu-detached="1"] li > span::after {
    display: none !important;
    content: none !important;
  }

  body.a-entete-sous-menu
    ul.dropdown-menu[data-mobile-menu-detached="1"]
    li.has-nav-toggle
    > a {
    padding-right: 16px !important;
  }

  /* Le libelle du bouton prend la couleur du rayon assombrie : en clair sur
     blanc, « Voir la page Materiel medical » ne se lisait pas. */
  .pdc-sous-menu-entete__tout {
    color: color-mix(
      in srgb,
      var(--pdc-couleur-rayon, var(--wp--preset--color--color-1)) 62%,
      #1a1a1a
    ) !important;
  }
}

/* =============================================================================
   DEUX CORRECTIONS D'AFFICHAGE  (2026-11-13)
   ============================================================================= */

/* 1. En quittant le mega menu, l'ancien tiroir lateral reapparaissait une
      fraction de seconde : le panneau retrouvait ses regles d'origine
      (position fixe a gauche, 25 % de large) et leur transition de 0,3 s
      les animait a l'ecran. Hors ouverture, le panneau ne doit rien peindre
      du tout. */
#mega-menu-panel:not(.pdc-mega-actif) {
  display: none !important;
  transition: none !important;
}

#mega-menu-panel.pdc-mega-actif {
  transition: none;
}

/* 2. La ligne Promotions du menu burger etait un pave jaune deux fois plus
      haut que les autres : elle redevient une ligne, et c'est sa tuile qui
      la distingue, comme pour tous les rayons. */
@media screen and (max-width: 991px) {
  .offcanvas .mobile-nav > li.promos {
    background: none !important;
    border-bottom: 1px solid #f0f0f3 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    box-shadow: none !important;
  }

  /* Le lien gardait le rembourrage du pave jaune (18 px en haut et en bas,
     22 sur les cotes) : la ligne faisait 74 px contre 46 pour les autres. */
  .offcanvas .mobile-nav > li.promos > a {
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 4px 44px 4px 0 !important;
    font-size: 0.9375rem !important;
  }

  .offcanvas .mobile-nav > li.promos .pdc-libelle {
    color: #1a1a1a !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  .offcanvas .mobile-nav > li.promos .pdc-tuile {
    background: #fff7dd;
  }

  .offcanvas .mobile-nav > li.promos .pdc-icone--tuile {
    color: #d9a400;
  }
}

/* =============================================================================
   EN-TETE DU MENU BURGER : PLUS LISIBLE  (2026-11-13)

   Le logo tenait sur 30 px, les icones sur 24, et la pastille du panier
   faisait 18 px sur une icone de 24 : elle la recouvrait presque entierement.
   La rangee gagne quelques pixels, tout le monde respire, et un filet marque
   la separation avec le reste du menu.
   ============================================================================= */

@media screen and (max-width: 991px) {
  .navbar .offcanvas .logo-row {
    padding: 11px 12px !important;
    border-bottom: 1px solid #e3e4e8 !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  }

  .navbar .offcanvas .logo-row .menu-logo img,
  .navbar .offcanvas .logo-row .menu-logo .custom-logo {
    max-height: 38px !important;
  }

  .navbar .offcanvas .logo-row .back-toggler {
    width: 44px !important;
    height: 44px;
  }

  .navbar .offcanvas .logo-row .back-toggler .pdc-icone--fermer {
    width: 22px !important;
    height: 22px !important;
  }

  .menu-action {
    width: 44px;
    height: 44px;
  }

  .pdc-icone--entete {
    width: 27px;
    height: 27px;
  }

  /* La pastille se pose dans le coin au lieu de couvrir le panier. */
  .menu-action__badge {
    top: 3px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    border: 1.5px solid #fff;
    font-size: 0.5625rem;
    line-height: 12px;
  }
}

/* ── Plus de barre de recherche dans le header sur telephone (2026-11-13) ──
   Elle occupait une rangee entiere sous le logo, soit une cinquantaine de
   pixels de hauteur avant d'arriver au contenu, sur l'ecran ou la place
   manque le plus. La recherche reste accessible dans le menu burger, ou elle
   est en haut du panneau et ou son placeholder s'anime
   (assets/js/search-placeholder.js). */
@media screen and (max-width: 991px) {
  /* Meme specificite que la regle « display: block !important » posee plus
     haut dans ce fichier, et apres elle : sans cela, c'est elle qui gagne. */
  #mobile-searchbox.searchbox {
    display: none !important;
  }
}

/* =============================================================================
   PETIT ÉCRAN D'ORDINATEUR : 992 À 1199 PX  (2026-11-17)

   La barre de recherche tombait a 206 px de colonne et 106 px de champ, le
   texte d'invite coupe au milieu d'un mot. Les reglages du palier 992+ sont
   poses en !important : on reprend les trois memes proprietes ici, en plus
   serre. Le logo passe de 252 a 186 px, la barre perd ses 28 px de marge
   interieure de chaque cote, et les trois outils de droite se resserrent.
   ============================================================================= */

@media screen and (min-width: 992px) and (max-width: 1199px) {
  header .header-main-row > .header-logo-container {
    max-width: 186px !important;
  }

  header .header-main-row > .header-logo-container img,
  header .header-main-row > .header-logo-container svg {
    max-width: 100%;
    height: auto;
  }

  header #mobile-searchbox.searchbox {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  header .header-main-row > .d-lg-flex {
    gap: 14px;
  }

  header .menu-top-header-2-container ul {
    gap: 14px;
  }

  header .cart {
    padding: 10px 14px;
  }
}

/* =============================================================================
   RETOURS DU GÉRANT  (2026-11-17)

   Le bandeau du haut sur une ligne a 1024 px, et les icones du menu burger
   plus grandes, pastille du panier dans le coin.
   ============================================================================= */

/* ── « Frais de port gratuit... » : une seule ligne ───────────────────────────
   Les trois blocs du bandeau (badge, message, contact) demandaient ensemble
   plus que la largeur disponible : le message, seul a pouvoir se retrecir,
   tombait a 295 px et passait sur deux lignes. On resserre le badge et le
   contact, et le message ne se coupe plus. */

@media screen and (min-width: 992px) and (max-width: 1299px) {
  .top-banner-message {
    white-space: nowrap;
    font-size: 13px;
  }

  .top-pharmacy-badge {
    font-size: 12px;
  }

  .menu-top-header-1-container a {
    font-size: 13px;
  }
}

/* ── Menu burger : des icones qu'on voit ─────────────────────────────────── */

@media screen and (max-width: 991px) {
  .navbar .offcanvas .logo-row .menu-action {
    width: 46px;
    height: 46px;
  }

  .navbar .offcanvas .logo-row .pdc-icone--entete {
    width: 30px;
    height: 30px;
  }

  .navbar .offcanvas .logo-row .back-toggler .pdc-icone--fermer {
    width: 26px !important;
    height: 26px !important;
  }

  /* La pastille se pose dans le coin, jamais sur l'icone. Les deux classes
     sont visees : le gabarit pose menu-action__badge, et une page servie
     depuis un cache peut encore porter l'ancienne. */
  .navbar .offcanvas .logo-row .menu-action__badge,
  .navbar .offcanvas .logo-row .mobile-menu-action__badge {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--wp--preset--color--color-1, #e62ca1);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
