/* ==========================================================================
   Brillant Dog — calque visuel NOEL / FIN D ANNEE 2026
   Ambiance festive : blanc + rouge, vrais visuels (sapin decore, guirlande,
   feux d artifice, neige). A coller dans Kadence > CSS additionnel.
   Retirer ce bloc en entier apres l hiver (objectif : 1er mars 2027).
   Ne touche pas aux titres SEO, metas, contenus de fiches, ni aux prix.
   Neige CSS seulement (peu de flocons), guirlande clignotante CSS,
   respects prefers-reduced-motion, aucun JS, pas de CLS.
   Correctif inclus : bandeau .bd-saison trop haut sur mobile.
   Assets (a uploader en mediatheque, puis renseigner les URL ci-dessous) :
     hero-A.webp, hero-B.webp, newsletter-sapin-cadeaux.webp
   Variantes hero : ajouter la classe bd-noel-a OU bd-noel-b sur body.
   ========================================================================== */

/* Apres upload, renseigner les URL publiques, par ex. :
   --bd-noel-hero-a: url('https://brillant-dog.fr/wp-content/uploads/2026/11/hero-A.webp');
*/
body {
  --bd-noel-hero-a: none;
  --bd-noel-hero-b: none;
  --bd-noel-nl-illu: none;
}

/* Contrastes verifies (WCAG AA) :
   #B3202A sur #FFFFFF = 6.65:1  |  #FFFFFF sur #B3202A = 6.65:1
   #8E1A22 sur #FFFFFF = 9.05:1  (survol, texte rouge sur blanc) */

body {
  --bd-hiver-red: #B3202A;
  --bd-hiver-red-deep: #8E1A22;
  --bd-hiver-snow: #FFFFFF;
  --bd-hiver-ivory: #FAF7F4;
  --bd-hiver-frost: #F0F2F3;
  --bd-hiver-mist: #E4E8EA;
  --bd-hiver-ink: #1C1A1A;
  --bd-hiver-muted: #5A5856;
  --bd-hiver-fir: #3A5346; /* motif discret seulement, pas de grands fonds */
}

body {
  background-color: var(--bd-hiver-ivory);
  color: var(--bd-hiver-ink);
}

/* Ruban discret sous le header : 3 px rouge, sans toucher au logo orange */
#masthead {
  background: var(--bd-hiver-snow);
  border-top: 3px solid var(--bd-hiver-red);
  box-shadow: 0 1px 0 var(--bd-hiver-mist);
}

/* --------------------------------------------------------------------------
   Bandeau saison : correctif mobile + ruban rouge sur fond neige
   Cause du trou : .bd-saison-x { flex: 1 1 320px } devient une HAUTEUR
   des que le bandeau passe en colonne (< 600px).
   -------------------------------------------------------------------------- */
.bd-saison {
  gap: 8px 18px;
}
.bd-saison-t,
.bd-saison-x,
.bd-saison-cta {
  margin: 0;
}
.bd-saison-x {
  flex: 1 1 auto;
}
@media (min-width: 601px) {
  .bd-saison-x {
    flex: 1 1 320px;
  }
}
@media (max-width: 600px) {
  .bd-saison {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
  }
  .bd-saison-x {
    flex: 0 1 auto !important;
    width: 100%;
  }
  .bd-saison-cta {
    margin-top: 4px;
  }
}

/* Ruban de saison : fond rouge, texte blanc (contraste AA 6.65:1) */
.bd-saison.bd-saison-hiver {
  background: var(--bd-hiver-red) !important;
  border: 1px solid var(--bd-hiver-red-deep) !important;
  color: var(--bd-hiver-snow) !important;
}
.bd-saison-hiver .bd-saison-t {
  color: var(--bd-hiver-snow);
  letter-spacing: 0.03em;
  font-weight: 700;
}
.bd-saison-hiver .bd-saison-x {
  color: var(--bd-hiver-snow);
}
.bd-saison-hiver .bd-saison-lien {
  background: var(--bd-hiver-snow) !important;
  color: var(--bd-hiver-red) !important;
  border-radius: 8px;
  font-weight: 700;
}
.bd-saison-hiver .bd-saison-lien:hover,
.bd-saison-hiver .bd-saison-lien:focus {
  background: var(--bd-hiver-ivory) !important;
  color: var(--bd-hiver-red-deep) !important;
}
.bd-saison-hiver .bd-saison-promo {
  color: #FFF3F0;
  font-weight: 700;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Hero accueil : neige, motif sapin/flocon tres leger
   -------------------------------------------------------------------------- */
.bd-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #F7F8F9 58%, #EEF2F0 100%);
  border: 1px solid var(--bd-hiver-mist);
  border-radius: 14px;
}
/* Motif statique (SVG inline, aucune requete, aucune animation) */
.bd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%233A5346' stroke-width='1'%3E%3Cpath d='M28 20v16M20 28h16M22.4 22.4l11.2 11.2M33.6 22.4L22.4 33.6'/%3E%3Cpath d='M124 96v16M116 104h16M118.4 98.4l11.2 11.2M129.6 98.4l-11.2 11.2'/%3E%3C/g%3E%3Cpath d='M80 44l8 14h-5l7 12h-5l8 14H67l8-14h-5l7-12h-5z' fill='%233A5346' fill-opacity='0.35'/%3E%3Ccircle cx='48' cy='78' r='1.5' fill='%233A5346'/%3E%3Ccircle cx='142' cy='36' r='1.5' fill='%233A5346'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.bd-hero > * {
  position: relative;
  z-index: 1;
}
/* Surtitre saison sans modifier le H1 (SEO preserve) */
.bd-hero h1::before {
  content: "Joyeuses fêtes";
  display: block;
  font-family: Poppins, var(--global-heading-font-family, sans-serif);
  font-size: 0.42em;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bd-hiver-red);
  margin-bottom: 10px;
}

.bd-hero-img {
  border: 1px solid rgba(28, 26, 26, 0.08);
  box-shadow: 0 12px 28px -16px rgba(28, 26, 26, 0.28);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.bd-btn {
  background: var(--bd-hiver-red);
  color: #fff !important;
}
.bd-btn:hover,
.bd-btn:focus-visible {
  background: var(--bd-hiver-red-deep);
  color: #fff !important;
}
.bd-btn2 {
  border: 2px solid var(--bd-hiver-red);
  color: var(--bd-hiver-red) !important;
  background: transparent;
}
.bd-btn2:hover,
.bd-btn2:focus-visible {
  background: var(--bd-hiver-red);
  color: #fff !important;
}

/* Reassurances : filet rouge discret sur fond neige */
.bd-reas div {
  background: var(--bd-hiver-snow);
  border: 1px solid var(--bd-hiver-mist);
  box-shadow: inset 0 3px 0 var(--bd-hiver-red);
}

/* Univers */
.bd-univ {
  border-color: var(--bd-hiver-mist);
  background: var(--bd-hiver-snow);
}
.bd-univ:hover,
.bd-univ:focus-visible {
  border-color: var(--bd-hiver-red);
  box-shadow: 0 2px 12px rgba(179, 32, 42, 0.12);
}
.bd-univ-n {
  color: var(--bd-hiver-red);
}

/* --------------------------------------------------------------------------
   Cartes produits WooCommerce
   -------------------------------------------------------------------------- */
ul.products li.product {
  position: relative;
  background: var(--bd-hiver-snow);
  border: 1px solid var(--bd-hiver-mist);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px -12px rgba(28, 26, 26, 0.16);
}
ul.products li.product:hover {
  box-shadow: 0 14px 28px -12px rgba(28, 26, 26, 0.22);
  border-color: #D8C5C6;
}
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product a.add_to_cart_button,
.woocommerce ul.products li.product a.product_type_variable,
.woocommerce div.product form.cart button.single_add_to_cart_button {
  background: var(--bd-hiver-red) !important;
  background-color: var(--bd-hiver-red) !important;
  color: #fff !important;
  border-radius: 30px;
}
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product a.add_to_cart_button:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
  background: var(--bd-hiver-red-deep) !important;
  background-color: var(--bd-hiver-red-deep) !important;
  color: #fff !important;
}

/* Badges saison : position absolute, aucun decalage de layout (CLS) */
ul.products li.product.product_cat-manteaux-et-vetements-pour-chien::after,
ul.products li.product.product_cat-lits-et-matelas::after,
ul.products li.product.product_cat-harnais::after {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bd-hiver-red);
  color: var(--bd-hiver-snow);
  font-family: Nunito, var(--global-body-font-family, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  pointer-events: none;
}
ul.products li.product.product_cat-manteaux-et-vetements-pour-chien::after {
  content: "Idéal hiver";
}
ul.products li.product.product_cat-lits-et-matelas::after {
  content: "Loin du sol froid";
}
ul.products li.product.product_cat-harnais::after {
  content: "Visible le soir";
}

/* Titres des cartes : encre. Une regle globale
   a { color:#B85C1A !important } force sinon l orange AA du theme. */
.woocommerce ul.products li.product a,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title a,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
  color: var(--bd-hiver-ink) !important;
}
.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
  color: var(--bd-hiver-red) !important;
}

/* Guides accueil */
.bd-guides a,
.bd-guides > * {
  background: var(--bd-hiver-snow);
  border-color: var(--bd-hiver-mist);
}

/* --------------------------------------------------------------------------
   Boutique / blog : reduire le bandeau de titre presque vide (~200 px)
   -------------------------------------------------------------------------- */
.entry-hero {
  min-height: 0 !important;
  background: var(--bd-hiver-ivory) !important;
}
.entry-hero .entry-hero-container-inner,
.hero-container-inner,
.entry-hero-container-inner {
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}

/* --------------------------------------------------------------------------
   Newsletter : bloc rouge, texte blanc, pour qu elle se demarque.
   IMPORTANT : les styles .bd-nl-* sont imprimes dans le BODY par un snippet,
   donc plus tard que le CSS additionnel Kadence (dans le HEAD). Il faut une
   specificite plus forte, sinon le fond peche d origine gagne.
   -------------------------------------------------------------------------- */
body .bd-nl-band .bd-nl-inner,
body section.bd-nl-band .bd-nl-inner {
  background: var(--bd-hiver-red) !important;
  border: 1px solid var(--bd-hiver-red-deep) !important;
  color: var(--bd-hiver-snow) !important;
}
body .bd-nl-band .bd-nl-title {
  color: var(--bd-hiver-snow) !important;
}
body .bd-nl-band .bd-nl-text,
body .bd-nl-band .bd-nl-consent,
body .bd-nl-band .bd-nl-label {
  color: var(--bd-hiver-snow) !important;
}
body .bd-nl-band .bd-nl-input {
  border-color: #E8C9CB !important;
  background: var(--bd-hiver-snow) !important;
  color: var(--bd-hiver-ink) !important;
}
body .bd-nl-band .bd-nl-btn {
  background: var(--bd-hiver-snow) !important;
  color: var(--bd-hiver-red) !important;
  border-radius: 8px;
  font-weight: 700;
}
body .bd-nl-band .bd-nl-btn:hover {
  background: var(--bd-hiver-ivory) !important;
  color: var(--bd-hiver-red-deep) !important;
}
body .bd-nl-band .bd-nl-consent a {
  color: #FFE6E4 !important;
  text-decoration: underline;
}
/* Case a cocher plus lisible sur fond rouge */
body .bd-nl-band .bd-nl-consent input[type="checkbox"] {
  accent-color: var(--bd-hiver-snow);
}

/* Footer : filet rouge */
#colophon,
footer#colophon,
.site-footer {
  border-top: 3px solid var(--bd-hiver-red);
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Guirlande lumineuse sous le header (HTML : div.bd-guirlande > span x 24)
   -------------------------------------------------------------------------- */
.bd-guirlande {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  height: 16px;
  padding: 2px 8px 0;
  background: linear-gradient(180deg, #1a2240 0%, #14182a 100%);
  overflow: hidden;
  line-height: 0;
}
.bd-guirlande span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #F5E2A3;
  box-shadow: 0 0 7px 2px rgba(245, 226, 163, 0.85);
  flex: 0 0 9px;
  animation: bd-twinkle 1.5s ease-in-out infinite alternate;
}
.bd-guirlande span:nth-child(3n) {
  background: #B3202A;
  box-shadow: 0 0 7px 2px rgba(179, 32, 42, 0.75);
  animation-delay: 0.35s;
}
.bd-guirlande span:nth-child(3n+1) {
  background: #fff6d0;
  box-shadow: 0 0 8px 3px rgba(255, 246, 208, 0.9);
  animation-delay: 0.7s;
}
.bd-guirlande span:nth-child(4n) { animation-duration: 1.15s; }
@keyframes bd-twinkle {
  from { opacity: 0.45; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.08); }
}

/* --------------------------------------------------------------------------
   Neige CSS (HTML : div.bd-neige > span x 20, dans le hero, aria-hidden)
   Position absolute : aucun impact sur le layout (CLS 0).
   -------------------------------------------------------------------------- */
.bd-hero { isolation: isolate; }
.bd-neige {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}
.bd-neige span {
  position: absolute;
  top: -8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
  opacity: 0.85;
  animation: bd-snow 11s linear infinite;
}
.bd-neige span:nth-child(1)  { left: 4%;  animation-duration: 9s;  animation-delay: -1s; }
.bd-neige span:nth-child(2)  { left: 11%; animation-duration: 12s; animation-delay: -4s; width: 3px; height: 3px; }
.bd-neige span:nth-child(3)  { left: 18%; animation-duration: 10s; animation-delay: -2s; }
.bd-neige span:nth-child(4)  { left: 24%; animation-duration: 13s; animation-delay: -7s; width: 4px; height: 4px; }
.bd-neige span:nth-child(5)  { left: 31%; animation-duration: 8s;  animation-delay: -3s; }
.bd-neige span:nth-child(6)  { left: 38%; animation-duration: 14s; animation-delay: -6s; width: 3px; height: 3px; }
.bd-neige span:nth-child(7)  { left: 45%; animation-duration: 11s; animation-delay: -1s; }
.bd-neige span:nth-child(8)  { left: 52%; animation-duration: 9s;  animation-delay: -8s; }
.bd-neige span:nth-child(9)  { left: 59%; animation-duration: 12s; animation-delay: -2s; width: 4px; height: 4px; }
.bd-neige span:nth-child(10) { left: 65%; animation-duration: 10s; animation-delay: -5s; }
.bd-neige span:nth-child(11) { left: 71%; animation-duration: 13s; animation-delay: -3s; width: 3px; height: 3px; }
.bd-neige span:nth-child(12) { left: 77%; animation-duration: 8s;  animation-delay: -6s; }
.bd-neige span:nth-child(13) { left: 83%; animation-duration: 11s; animation-delay: -2s; }
.bd-neige span:nth-child(14) { left: 89%; animation-duration: 14s; animation-delay: -9s; width: 4px; height: 4px; }
.bd-neige span:nth-child(15) { left: 94%; animation-duration: 9s;  animation-delay: -4s; }
.bd-neige span:nth-child(16) { left: 8%;  animation-duration: 15s; animation-delay: -10s; width: 3px; height: 3px; }
.bd-neige span:nth-child(17) { left: 42%; animation-duration: 12s; animation-delay: -5s; }
.bd-neige span:nth-child(18) { left: 56%; animation-duration: 10s; animation-delay: -7s; }
.bd-neige span:nth-child(19) { left: 73%; animation-duration: 13s; animation-delay: -1s; width: 3px; height: 3px; }
.bd-neige span:nth-child(20) { left: 27%; animation-duration: 16s; animation-delay: -11s; }
@keyframes bd-snow {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 0.85; }
  100% { transform: translateY(110vh) translateX(18px); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .bd-guirlande span,
  .bd-neige span {
    animation: none !important;
  }
  .bd-neige { display: none; }
  .bd-guirlande span { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Variante A : banniere pleine largeur (sapin + feux + cadre manteau)
   -------------------------------------------------------------------------- */
body.bd-noel-a .bd-hero {
  display: flex;
  align-items: center;
  min-height: 720px;
  padding: 36px 28px;
  border-radius: 14px;
  border: 1px solid rgba(28, 26, 26, 0.08);
  background:
    var(--bd-noel-hero-a) 70% 78% / cover no-repeat,
    linear-gradient(180deg, #1a2a4e, #faf7f4);
  overflow: hidden;
}
body.bd-noel-a .bd-hero-img-wrap {
  display: none !important;
}
body.bd-noel-a .bd-hero-txt {
  position: relative;
  z-index: 4;
  max-width: 420px;
  background: rgba(255, 252, 248, 0.90);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 26px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 32px -12px rgba(20, 20, 40, 0.28);
}
body.bd-noel-a .bd-hero::before { display: none; } /* motif SVG remplace par la photo */
@media (max-width: 767px) {
  body.bd-noel-a .bd-hero {
    min-height: 0;
    background-position: 78% 42% !important;
    background-size: cover !important;
    align-items: stretch;
    justify-content: flex-end;
    /* Fenetre d image au-dessus du texte, sans recouvrir le sapin */
    padding: 230px 12px 16px;
  }
  body.bd-noel-a .bd-hero-txt {
    max-width: none;
    width: 100%;
    padding: 18px 16px 16px;
  }
}

/* --------------------------------------------------------------------------
   Variante B : deux colonnes, scene generee (chien, sapin, feux)
   -------------------------------------------------------------------------- */
body.bd-noel-b .bd-hero {
  background:
    linear-gradient(180deg, #FFFFFF 0%, #F4F6F9 60%, #E8EEF4 100%);
  border: 1px solid #E4E8EA;
}
body.bd-noel-b .bd-hero::before { opacity: 0.08; }
body.bd-noel-b .bd-hero-img {
  border: 2px solid #fff;
  box-shadow: 0 14px 32px -14px rgba(20, 20, 40, 0.35), 0 0 0 1px rgba(179, 32, 42, 0.15);
}

/* Newsletter : illustration sapin + cadeaux (img.bd-nl-img ou .bd-nl-pic img) */
body .bd-nl-band .bd-nl-img,
body .bd-nl-band .bd-nl-pic img {
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 16px rgba(20, 10, 10, 0.25);
}

/* Popup maison (PicoClaw, classes prevues, reste eteint jusqu a validation) */
.bd-nl-popup,
.bd-popup-nl {
  background: #FFFAF8;
  color: #1C1A1A;
  border: 2px solid #B3202A;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 10, 10, 0.28);
}
.bd-nl-popup h2,
.bd-nl-popup .bd-nl-title,
.bd-popup-nl h2 {
  color: #B3202A;
}
.bd-nl-popup .bd-nl-btn,
.bd-popup-nl button {
  background: #B3202A;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}
