/**
 * VST43° — En-tête du site (lot 2). Portée : #vst-bandeau, #vst-entete (en-tête et en-tête réduit de la commande), #vst-menu (tiroir), #vst-voile-mega.
 * Règles reprises de la maquette validée (maquettes/_commun/commun.css l. 44-104 et 313-322 ; maquettes/tunnel/src.html l. 9-13, 67-72).
 * Spécificité : « :is(…, #vst-x#vst-y) » vaut deux identifiants (même convention que vst-categorie.css) : passe devant les règles de Divi sans !important.
 */
:is(#vst-bandeau, #vst-entete, #vst-menu, #vst-voile-mega, #vst-x#vst-y) {
  --vst-rouge: var(--gcid-vst-rouge, #E21F20);
  --vst-rouge-fonce: var(--gcid-vst-rouge-fonce, #C41A1B);
  --vst-voile: var(--gcid-vst-voile, #FBE6DF);
  --vst-texte: var(--gcid-vst-texte, #575758);
  --vst-encre: var(--gcid-vst-encre, #232324);
  --vst-blanc: var(--gcid-vst-blanc, #FFFDFC);
  --vst-ligne: var(--gcid-vst-ligne, #E9DED7);
  --vst-photo: var(--gcid-vst-photo, #F4F2F1);
  --vst-corail-texte: var(--gcid-vst-corail-texte, #B5361C);
  --vst-ligne-ui: var(--gcid-vst-ligne-ui, #9C7763);
  --font-titre: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-corps: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --gouttiere: 20px;
  --rayon: var(--gvid-vst-rayon, 4px);
  --entete: 56px;
  box-sizing: border-box;
}
:is(#vst-bandeau, #vst-entete, #vst-menu, #vst-x#vst-y) *, :is(#vst-bandeau, #vst-entete, #vst-menu, #vst-x#vst-y) *::before, :is(#vst-bandeau, #vst-entete, #vst-menu, #vst-x#vst-y) *::after { box-sizing: border-box; }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) :focus-visible { outline: 2px solid var(--vst-encre); outline-offset: 2px; }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) button { font: inherit; color: inherit; cursor: pointer; }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) img { max-width: 100%; display: block; }
:is(#vst-entete, #vst-x#vst-y) .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Divi : plus d'en-tête fixe, donc plus de décalage du conteneur */
body.vst-entete-v2 #page-container { padding-top: 0; }

/* ——— Bandeau ——— */
:is(#vst-bandeau, #vst-x#vst-y) { background: var(--vst-voile); color: var(--vst-encre); font: 400 13px/1.3 var(--font-corps); letter-spacing: .01em; text-align: center; padding: 7px var(--gouttiere); text-wrap: balance; }
:is(#vst-bandeau, #vst-x#vst-y) a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
:is(#vst-bandeau, #vst-x#vst-y) b, :is(#vst-bandeau, #vst-x#vst-y) strong { font-weight: 700; }
/* Sous 420 px, le lien passe toujours à la ligne (comme la maquette à 375 px) : sinon le texte tient sur une ligne avec la police de secours
   et sur deux avec Open Sans, et toute la page descend de 17 px à l'arrivée de la police (CLS 0,34 mesuré par Lighthouse le 08.10). */
@media (max-width: 419px) { :is(#vst-bandeau, #vst-x#vst-y) a { display: block; width: fit-content; margin: 0 auto; } }

/* ——— En-tête ——— */
:is(#vst-entete, #vst-x#vst-y) { position: sticky; top: 0; z-index: 20; background: var(--vst-blanc); border-bottom: 1px solid var(--vst-ligne); font: 300 16px/1.6 var(--font-corps); color: var(--vst-texte); }
body.admin-bar :is(#vst-entete, #vst-x#vst-y) { top: var(--wp-admin--admin-bar--height, 32px); }
:is(#vst-entete, #vst-x#vst-y) .entete-int { max-width: 1440px; margin: 0 auto; height: var(--entete); padding: 0 8px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) .icone { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; padding: 0; position: relative; color: var(--vst-encre); text-decoration: none; }
:is(#vst-entete, #vst-x#vst-y) .icone svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
:is(#vst-entete, #vst-x#vst-y) .logo { justify-self: center; display: block; }
:is(#vst-entete, #vst-x#vst-y) .logo img { height: 26px; width: auto; }
:is(#vst-entete, #vst-x#vst-y) .actions { display: flex; }
:is(#vst-entete, #vst-x#vst-y) .pastille-panier { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--vst-rouge); color: #fff; font: 600 11px/18px var(--font-corps); text-align: center; padding: 0 4px; }
:is(#vst-entete, #vst-x#vst-y) .pastille-panier[data-vide="true"] { display: none; }
:is(#vst-entete, #vst-x#vst-y) .nav { display: none; }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) .rouge { color: var(--vst-rouge-fonce); }

/* Recherche : champ ouvert dans la barre, à gauche de la loupe (Gabrielle, 08.10) ; résultats WooCommerce.
   Mobile : le champ couvre le logo, entre le bouton menu et la loupe. Desktop : 280 px ; sous 1440 px il masque la navigation, faute de place. */
:is(#vst-entete, #vst-x#vst-y) .actions { position: relative; align-items: center; }
:is(#vst-entete, #vst-x#vst-y) .recherche { position: absolute; top: 50%; right: 100%; transform: translateY(-50%); width: calc(100vw - 196px); margin: 0 4px 0 0; padding: 0; }
:is(#vst-entete, #vst-x#vst-y) .recherche[hidden] { display: none; }
:is(#vst-entete, #vst-x#vst-y) .recherche input[type="search"] { display: block; width: 100%; height: 40px; margin: 0; border: 1px solid var(--vst-ligne-ui); border-radius: var(--rayon); background: var(--vst-blanc); padding: 0 12px; font: 400 16px/1.2 var(--font-corps); color: var(--vst-encre); text-overflow: ellipsis; -webkit-appearance: none; appearance: none; }
:is(#vst-entete, #vst-x#vst-y) .recherche input[type="search"]::placeholder { color: var(--vst-texte); opacity: 1; }
:is(#vst-entete, #vst-x#vst-y) .recherche input[type="search"]:focus { outline: 2px solid var(--vst-encre); outline-offset: -1px; border-color: var(--vst-encre); }
:is(#vst-entete, #vst-x#vst-y).cherche .logo { visibility: hidden; }

/* ——— Tiroir mobile : niveaux qui glissent (univers → types et marques) ——— */
:is(#vst-menu, #vst-x#vst-y) { border: 0; padding: 0; margin: 0 auto 0 0; width: min(88vw, 400px); max-width: none; height: 100vh; height: 100dvh; max-height: none; background: var(--vst-blanc); color: var(--vst-texte); overflow: hidden; font: 300 16px/1.6 var(--font-corps); }
:is(#vst-menu, #vst-x#vst-y)::backdrop { background: rgba(35,35,36,.45); }
:is(#vst-menu, #vst-x#vst-y) .tiroir-tete { display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 8px 0 var(--gouttiere); border-bottom: 1px solid var(--vst-ligne); }
:is(#vst-menu, #vst-x#vst-y) .tiroir-tete .logo img { height: 24px; width: auto; }
:is(#vst-menu, #vst-x#vst-y) .fermer { width: 44px; height: 44px; border: 0; background: none; padding: 0; font-size: 26px; line-height: 1; color: var(--vst-encre); }
:is(#vst-menu, #vst-x#vst-y) .niveaux { position: relative; height: calc(100% - 56px); }
:is(#vst-menu, #vst-x#vst-y) .niveau { position: absolute; inset: 0; overflow-y: auto; padding: 8px var(--gouttiere) 32px; background: var(--vst-blanc); transition: transform .28s ease; }
:is(#vst-menu, #vst-x#vst-y) .niveau[data-cache="droite"] { transform: translateX(100%); visibility: hidden; }
:is(#vst-menu, #vst-x#vst-y) .niveau[data-cache="gauche"] { transform: translateX(-30%); visibility: hidden; }
:is(#vst-menu, #vst-x#vst-y) .niveau .titre-groupe { margin: 20px 0 4px; padding: 0; font: 600 12px/1.3 var(--font-titre); text-transform: uppercase; letter-spacing: .14em; color: var(--vst-corail-texte); }
:is(#vst-menu, #vst-x#vst-y) .niveau ul { list-style: none; margin: 0; padding: 0; }
:is(#vst-menu, #vst-x#vst-y) .niveau li { margin: 0; padding: 0; }
:is(#vst-menu, #vst-x#vst-y) .niveau li > a, :is(#vst-menu, #vst-x#vst-y) .niveau li > button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border: 0; border-bottom: 1px solid var(--vst-ligne); background: none; padding: 0; text-align: left; text-decoration: none; font: 500 15px/1.2 var(--font-titre); color: var(--vst-encre); text-transform: uppercase; letter-spacing: .08em; }
:is(#vst-menu, #vst-x#vst-y) .niveau li > button::after, :is(#vst-menu, #vst-x#vst-y) .niveau summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); flex: none; margin-right: 4px; }
:is(#vst-menu, #vst-x#vst-y) .niveau li > a.rouge { color: var(--vst-rouge-fonce); }
:is(#vst-menu, #vst-x#vst-y) .niveau .fin a { font: 400 14px/1.2 var(--font-corps); text-transform: none; letter-spacing: 0; min-height: 46px; }
:is(#vst-menu, #vst-x#vst-y) .niveau .tout { font-weight: 600; }
:is(#vst-menu, #vst-x#vst-y) .retour { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 0; background: none; padding: 0; font: 400 13px/1 var(--font-corps); color: var(--vst-texte); }
:is(#vst-menu, #vst-x#vst-y) .retour::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
:is(#vst-menu, #vst-x#vst-y) .niveau-titre { margin: 0 0 4px; padding: 0; font: 600 22px/1.2 var(--font-titre); color: var(--vst-encre); text-transform: uppercase; letter-spacing: .06em; }
:is(#vst-menu, #vst-x#vst-y) .niveau details { border-bottom: 1px solid var(--vst-ligne); }
:is(#vst-menu, #vst-x#vst-y) .niveau summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 52px; font: 500 15px/1.2 var(--font-titre); color: var(--vst-encre); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
:is(#vst-menu, #vst-x#vst-y) .niveau summary::-webkit-details-marker { display: none; }
:is(#vst-menu, #vst-x#vst-y) .niveau summary::after { transform: rotate(135deg); transition: transform .2s; }
:is(#vst-menu, #vst-x#vst-y) .niveau details[open] summary::after { transform: rotate(-45deg); }
:is(#vst-menu, #vst-x#vst-y) .niveau details ul { padding: 0 0 12px 12px; }
:is(#vst-menu, #vst-x#vst-y) .niveau details li > a { min-height: 42px; border: 0; font: 400 14px/1.2 var(--font-corps); text-transform: none; letter-spacing: 0; }
:is(#vst-menu, #vst-x#vst-y) .niveau small { font: 400 13px/1 var(--font-corps); color: var(--vst-texte); text-transform: none; letter-spacing: 0; margin-left: auto; }

/* ——— Méga-menu desktop (au survol avec délai, au clic et au clavier) ——— */
:is(#vst-entete, #vst-x#vst-y) .mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--vst-blanc); border-top: 1px solid var(--vst-ligne); border-bottom: 1px solid var(--vst-ligne); box-shadow: 0 18px 30px -18px rgba(35,35,36,.25); }
:is(#vst-entete, #vst-x#vst-y) .mega[hidden] { display: none; }
:is(#vst-entete, #vst-x#vst-y) .mega-int { max-width: 1440px; margin: 0 auto; padding: 36px 40px 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 40px; }
:is(#vst-entete, #vst-x#vst-y) .mega-titre { margin: 0 0 14px; padding: 0; font: 600 12px/1.3 var(--font-titre); text-transform: uppercase; letter-spacing: .14em; color: var(--vst-corail-texte); }
:is(#vst-entete, #vst-x#vst-y) .mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
:is(#vst-entete, #vst-x#vst-y) .mega li { margin: 0; padding: 0; }
:is(#vst-entete, #vst-x#vst-y) .mega li a { display: inline-block; padding: 5px 0; font-size: 14px; color: var(--vst-encre); text-decoration: none; }
:is(#vst-entete, #vst-x#vst-y) .mega li a.rouge { color: var(--vst-rouge-fonce); }
:is(#vst-entete, #vst-x#vst-y) .mega li a:hover { text-decoration: underline; text-underline-offset: 3px; }
:is(#vst-entete, #vst-x#vst-y) .mega .tout { font: 600 12px/1.2 var(--font-titre); text-transform: uppercase; letter-spacing: .1em; }
:is(#vst-entete, #vst-x#vst-y) .mega-visuel { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; color: var(--vst-blanc); text-decoration: none; background: var(--vst-photo); }
:is(#vst-entete, #vst-x#vst-y) .mega-visuel img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
:is(#vst-entete, #vst-x#vst-y) .mega-visuel::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(35,35,36,0) 45%, rgba(35,35,36,.65) 100%); }
:is(#vst-entete, #vst-x#vst-y) .mega-visuel span { position: absolute; z-index: 2; left: 20px; bottom: 18px; font: 600 13px/1.3 var(--font-titre); text-transform: uppercase; letter-spacing: .1em; }
:is(#vst-entete, #vst-x#vst-y) .mega-marques { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(#vst-entete, #vst-x#vst-y) .mega-marques .mega-titre a { color: inherit; text-decoration: none; }
:is(#vst-voile-mega, #vst-x#vst-y) { position: fixed; inset: 0; z-index: 18; background: rgba(35,35,36,.25); }
:is(#vst-voile-mega, #vst-x#vst-y)[hidden] { display: none; }

/* ——— En-tête réduit de la commande (maquette tunnel) ——— */
:is(#vst-entete, #vst-x#vst-y).vst-ent-tunnel .tete-tunnel-int { max-width: 1440px; margin: 0 auto; height: 56px; padding: 0 var(--gouttiere); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
:is(#vst-entete, #vst-x#vst-y) .retour-lien { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--vst-encre); text-decoration: none; }
:is(#vst-entete, #vst-x#vst-y) .retour-lien::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
:is(#vst-entete, #vst-x#vst-y).vst-ent-tunnel .logo img { height: 24px; }
:is(#vst-entete, #vst-x#vst-y) .securise { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--vst-encre); }
:is(#vst-entete, #vst-x#vst-y) .securise svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
:is(#vst-entete, #vst-x#vst-y)[data-etape="confirmation"] .retour-lien, :is(#vst-entete, #vst-x#vst-y)[data-etape="confirmation"] .securise { visibility: hidden; }

@media (min-width: 960px) {
  :is(#vst-bandeau, #vst-entete, #vst-menu, #vst-voile-mega, #vst-x#vst-y) { --gouttiere: 40px; --entete: 68px; }
  :is(#vst-entete, #vst-x#vst-y) { z-index: 25; }
  :is(#vst-entete, #vst-x#vst-y) .entete-int { padding: 0 24px; grid-template-columns: auto 1fr auto; gap: 32px; }
  :is(#vst-entete, #vst-x#vst-y) .entete-int > .icone:first-child { display: none; }
  :is(#vst-entete, #vst-x#vst-y) .logo { justify-self: start; }
  :is(#vst-entete, #vst-x#vst-y) .logo img { height: 32px; }
  :is(#vst-entete, #vst-x#vst-y).cherche .logo { visibility: visible; }
  :is(#vst-entete, #vst-x#vst-y) .recherche { width: 280px; }
  :is(#vst-entete, #vst-x#vst-y) .nav { display: flex; justify-content: center; gap: 2px; }
  :is(#vst-entete, #vst-x#vst-y) .nav > a, :is(#vst-entete, #vst-x#vst-y) .nav > button { display: flex; align-items: center; height: var(--entete); padding: 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; text-decoration: none; font: 500 12px/1 var(--font-titre); text-transform: uppercase; letter-spacing: .12em; color: var(--vst-encre); }
  :is(#vst-entete, #vst-x#vst-y) .nav > a.rouge { color: var(--vst-rouge-fonce); }
  :is(#vst-entete, #vst-x#vst-y) .nav > a:hover, :is(#vst-entete, #vst-x#vst-y) .nav > button:hover, :is(#vst-entete, #vst-x#vst-y) .nav > [aria-expanded="true"], :is(#vst-entete, #vst-x#vst-y) .nav > [aria-current="page"] { border-bottom-color: var(--vst-encre); }
  :is(#vst-entete, #vst-x#vst-y).vst-ent-tunnel .tete-tunnel-int { height: 68px; }
  :is(#vst-entete, #vst-x#vst-y).vst-ent-tunnel .logo { justify-self: center; }
  :is(#vst-entete, #vst-x#vst-y).vst-ent-tunnel .logo img { height: 30px; }
}
@media (min-width: 960px) and (max-width: 1439px) {
  :is(#vst-entete, #vst-x#vst-y).cherche .nav { visibility: hidden; }
  :is(#vst-entete, #vst-x#vst-y) .recherche { width: min(480px, calc(100vw - 420px)); }
}
@media (prefers-reduced-motion: reduce) { :is(#vst-menu, #vst-x#vst-y) .niveau, :is(#vst-menu, #vst-x#vst-y) .niveau summary::after { transition: none; } }

/* Lien mis en avant d'un univers (data/entete.php « en_avant », 21.10 : Carte cadeau sous Accessoires). */
:is(#vst-entete, #vst-menu, #vst-x#vst-y) a.avant { font-weight: 600; color: var(--vst-encre); }
:is(#vst-entete, #vst-menu, #vst-x#vst-y) a.avant::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #ED7B01; vertical-align: middle; flex: none; }
:is(#vst-menu, #vst-x#vst-y) .niveau li > a.avant { justify-content: flex-start; }

/* Icône compte : point discret quand la personne est connectée */
:is(#vst-entete, #vst-x#vst-y) .point-compte { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--vst-rouge); box-shadow: 0 0 0 2px var(--vst-blanc); }
/* Bandeau : une ligne courte en mobile, texte complet dès 768 px */
:is(#vst-bandeau, #vst-x#vst-y) .bandeau-court { display: none; }
@media (max-width: 767px) {
  :is(#vst-bandeau, #vst-x#vst-y) .bandeau-long { display: none; }
  :is(#vst-bandeau, #vst-x#vst-y) .bandeau-court { display: block; font-weight: 700; white-space: nowrap; }
}
