/* v330 : en-tête en grille (logo | menu centré | icônes), compaction au défilement, animations sobres, blocs de fin de page.
   Chargé en dernier : il reprend la main sur v3.css, compact.css, refonte.css et fete-deco.css. */

/* ---- 1. En-tête ---- */
.hdr .wrap{transition:height .25s ease}
.hdr::before{transition:opacity .4s,background-color .25s}
html .hdr.solid:not(.menu-open)::before{background:rgba(15,18,13,.78)}
@media(max-width:1280px){html .hdr .hdr-r{display:contents}}   /* burger et mobile : comme avant, le conteneur n'existe pas */
@media(min-width:1281px){
  html body .hdr .wrap{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;column-gap:1.25rem}
  html body .hdr .brand{margin:0;justify-self:start;min-width:0}
  html body .hdr .nav{position:relative;justify-self:center;margin:0}
  html body .hdr .nav>.btn{position:absolute;left:calc(100% + .75rem);top:50%;translate:0 -50%;margin:0;white-space:nowrap}   /* Réserver : hors du flux, seuls les onglets sont centrés */
  html body .hdr .hdr-r{display:flex;align-items:center;justify-content:flex-end;gap:.4rem;justify-self:end;min-width:0;margin:0}
  html body .hdr .hdr-cta{display:none}
}

/* ---- 2. Appel à l'action de fin de page ---- */
.cta-end{margin:3rem 0 1rem;padding:1.6rem 1.2rem;text-align:center;border:1px solid var(--line,#2c3524);border-radius:var(--r,12px);background:linear-gradient(180deg,rgba(242,106,27,.07),rgba(15,18,13,0))}
.cta-end h2{margin:0 0 .4rem;font-size:clamp(1.3rem,3.6vw,1.8rem)}
.cta-end p{margin:0 auto 1rem;max-width:36rem}
.cta-end .btn+.btn{margin-left:.6rem}
@media(max-width:480px){.cta-end .btn{display:flex;justify-content:center;width:100%}.cta-end .btn+.btn{margin:.6rem 0 0}}
#pdAdd,#pdBuy,#achat{scroll-margin-top:40vh}

/* ---- 3. Carte BOUTIQUE de la grille des tarifs (accueil) : seulement quand la case est vide (terrain fermé) ---- */
html.t-open .price.shop-card{display:none}
@media(max-width:980px){.price.shop-card{grid-column:1/-1}}

/* ---- 4. Grilles de la boutique : plus d'air, jamais plus de 4 colonnes ----
   2 colonnes (mobile, tablette), 3 dès 1000 px, 4 dès 1700 px ; 1 colonne sous 360 px. */
html .shop-grid,html .gd-sec .shop-grid,html #nouveautes .shop-grid,html #nouveautes .shop-grid:has(>:nth-child(8):last-child),html .shop-grid:has(>:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.85rem!important}
html .shop-p{padding:.75rem;gap:.45rem}
html .shop-p .shop-img img{object-fit:contain}   /* le ratio de la photo est gardé */
@media(max-width:599px){html .shop-act{flex-direction:column}html .shop-act .btn.ghost{flex:1 1 auto}}
@media(max-width:359px){html .shop-grid,html .gd-sec .shop-grid,html #nouveautes .shop-grid{grid-template-columns:minmax(0,1fr)!important}}
@media(min-width:700px){html .shop-grid,html .gd-sec .shop-grid,html #nouveautes .shop-grid,html #nouveautes .shop-grid:has(>:nth-child(8):last-child),html .shop-grid:has(>:nth-child(4):last-child){gap:1.5rem!important}html .shop-p{padding:1rem}}
@media(min-width:1000px){html .shop-grid,html .gd-sec .shop-grid,html #nouveautes .shop-grid,html #nouveautes .shop-grid:has(>:nth-child(8):last-child),html .shop-grid:has(>:nth-child(4):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.75rem!important}html .shop-p{padding:1.1rem}html .shop-cats{gap:1.5rem}}
@media(min-width:1700px){html .shop-grid,html .gd-sec .shop-grid,html #nouveautes .shop-grid,html #nouveautes .shop-grid:has(>:nth-child(8):last-child),html .shop-grid:has(>:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:2rem!important}}
/* produits liés de la fiche : même règle */
html .pd-sim{grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
@media(min-width:700px){html .pd-sim{gap:1.5rem}}
@media(min-width:1000px){html .pd-sim{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.75rem}}
@media(min-width:1700px){html .pd-sim{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:359px){html .pd-sim{grid-template-columns:minmax(0,1fr)}}

/* ---- 5. Boutique : une seule barre de filtres (listes déroulantes) ----
   Les pastilles restent dans la page (sans JS, robots, liens partagés) ; s330.js les relaie et les masque (html.s330-fb). */
html.s330-fb #shopCatalog .shop-subs[data-cat],html.s330-fb #shopCatalog .shop-aff[data-cat]{display:none!important}
html #shopCatalog .shop-tools{display:flex!important;flex-wrap:wrap;align-items:center;gap:.7rem 1.2rem;margin:1rem 0 1.5rem;padding:.8rem 1rem;border:1px solid #2c3524;border-radius:12px;background:rgba(243,237,220,.03)}
html #shopCatalog .shop-tools label{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.9rem}
html #shopCatalog .shop-tools label[hidden]{display:none}
html #shopCatalog .shop-tools select{max-width:100%;min-width:0;text-overflow:ellipsis}
html #shopCatalog .shop-tools label:has(>select[data-k=col]){order:6}
html #shopCatalog .shop-tools label:has(>select[data-k=av]){order:7}
html #shopCatalog .shop-tools label:has(>select[data-k=sort]){order:8}
.s330-reset{order:9;margin-left:auto;color:#FF9A5C;font-size:.9rem;text-decoration:underline;text-underline-offset:3px}
.s330-reset[hidden]{display:none}
.s330-fbtn{display:none;order:0}
@media(max-width:699px){
  html.s330-fb #shopCatalog .shop-tools{gap:.6rem}
  html.s330-fb #shopCatalog .shop-tools label{flex:1 1 100%}
  html.s330-fb #shopCatalog .shop-tools label select{flex:1 1 auto}
  html.s330-fb #shopCatalog .shop-tools label:has(>select[data-k=sort]){flex:1 1 0}
  html.s330-fb #shopCatalog .shop-tools:not(.s330-open)>label:not(:has(>select[data-k=sort])){display:none}
  html.s330-fb .s330-fbtn{display:inline-flex;align-items:center;height:2.4rem;padding:0 1rem;border:1px solid #F26A1B;border-radius:8px;background:rgba(242,106,27,.12);color:#FFB27A;font:600 .9rem Mont,Montserrat,system-ui,sans-serif;cursor:pointer}
  html.s330-fb .s330-fbtn:focus-visible{outline:2px solid #F26A1B;outline-offset:2px}
  .s330-reset{margin-left:0;flex:1 1 100%}
}

/* ---- 6. Recherche de l'en-tête ---- */
.hdr-sx{display:none}
.hdr-sx svg{width:1.3rem;height:1.3rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
@media(max-width:1280px){
  html .hdr-s .hdr-sb{border-color:rgba(242,106,27,.8);background:rgba(242,106,27,.14);color:#FFB27A}
  html .hdr-s .hdr-sp:not([hidden]){position:fixed;inset:0;z-index:2000;display:flex;flex-direction:column;width:auto;padding:4.8rem 1rem 1rem;border:0;border-radius:0;background:#141711;box-shadow:none}
  html .hdr-s .hdr-sp:not([hidden]) .hdr-sx{display:flex;position:absolute;top:.9rem;right:.9rem;width:3rem;height:3rem;align-items:center;justify-content:center;padding:0;border:1px solid rgba(243,237,220,.3);border-radius:50%;background:rgba(243,237,220,.06);color:#F3EDDC;cursor:pointer}
  html .hdr-s .hdr-sp input{padding:1rem 1.1rem;font-size:1rem;border-color:rgba(243,237,220,.4)}
  html .hdr-s .hdr-sp ul{flex:1 1 auto;min-height:0;max-height:none}
  html:has(.hdr-s .hdr-sp:not([hidden])) body{overflow:hidden}
}
@media(min-width:1281px){
  html .hdr-s{flex:0 1 auto;position:relative;z-index:140;width:clamp(11rem,14vw,22rem);min-width:0;margin:0}
  @media(min-width:1700px){html .hdr-s{width:clamp(18rem,19vw,22rem)}}
  html .hdr-s .hdr-sp input{display:block;width:100%;margin-left:auto;box-sizing:border-box}
  html .hdr-s .hdr-sb{display:none}
  html .hdr-s .hdr-sp,html .hdr-s .hdr-sp[hidden]{display:block!important;position:static;width:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
  html .hdr-s .hdr-sp input{height:2.9rem;padding:0 1rem 0 2.7rem;border-radius:999px;border:1px solid rgba(243,237,220,.45);background:rgba(243,237,220,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3EDDC' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 1rem 50%/1.1rem;color:#F3EDDC;font-size:.88rem;text-overflow:ellipsis}
  html .hdr-s .hdr-sp input::placeholder{color:rgba(243,237,220,.8);opacity:1}
  html .hdr-s .hdr-sp input:focus{border-color:#F26A1B;outline:2px solid #F26A1B;outline-offset:1px;background-color:rgba(243,237,220,.15)}
  html .hdr-s .hdr-sp input:focus{background-color:#262d20}
  @media(max-width:1699px){html .hdr-s .hdr-sp input:focus{width:22rem;margin-left:calc(100% - 22rem)}}   /* le placeholder complet tient quand on tape */
  html .hdr-s .hdr-sp ul,html .hdr-s .hdr-sp p{position:absolute;right:0;top:calc(100% + .5rem);z-index:130;width:min(26rem,90vw);margin:0;padding:.5rem;border:1px solid rgba(243,237,220,.14);border-radius:14px;background:#1E241A;box-shadow:0 18px 40px rgba(0,0,0,.45)}
  html .hdr-s:not(:focus-within) .hdr-sp ul,html .hdr-s:not(:focus-within) .hdr-sp p{display:none}
}

/* ---- 7. Animations sobres (200 à 400 ms ; classe posée par s330.js, jamais dans le tunnel d'achat ni l'admin) ---- */
@media(prefers-reduced-motion:no-preference){
  html.s330-anim .rv,html.s330-anim .reveal{transform:translateY(14px);transition-property:opacity,transform;transition-duration:.35s}
  html.s330-anim .rv.in,html.s330-anim .reveal.in{transform:none}
  html.s330-anim .shop-p,html.s330-anim .price{transition-property:opacity,transform,translate,border-color,box-shadow;transition-duration:.35s,.35s,.25s,.25s,.25s}
  html.s330-anim .btn:active,html.s330-anim .hdr-sb:active{scale:.97}
  html.s330-anim h2.hud{position:relative}
  html.s330-anim h2.hud::after{content:"";position:absolute;left:0;bottom:-.3rem;width:3.2rem;height:2px;background:linear-gradient(90deg,#F26A1B,rgba(242,106,27,0));transform:scaleX(0);transform-origin:left;transition:transform .4s ease;pointer-events:none}
  html.s330-anim h2.hud-c::after{left:50%;margin-left:-1.6rem;transform-origin:center}
  html.s330-anim h2.hud.in::after{transform:none}
}
@media(prefers-reduced-motion:no-preference) and (hover:hover){
  html.s330-anim .shop-p:hover,html.s330-anim .price:hover{translate:0 -4px;border-color:rgba(242,106,27,.6);box-shadow:0 16px 36px rgba(0,0,0,.4),0 0 28px rgba(242,106,27,.14)}
  html.s330-anim .btn-primary:hover{box-shadow:0 0 0 3px rgba(242,106,27,.22),0 8px 22px rgba(242,106,27,.25)}
}

/* v330 : action principale visible dans l'en-tete de page */
html .phero .phero-act{margin:1rem 0 0;display:flex;flex-wrap:wrap;gap:.6rem}
