/* Thème Noël activé par le marqueur du layout ; le thème standard reste indépendant.
   Les illustrations sont décoratives et ne capturent jamais les interactions. */
body:has(.storefront-christmas) {
    background: #fffaf0;
    /* Motifs de Noël fixes à 9 % d’opacité, limité au fond crème. */
    background-image: url('/img/christmas/gift-pattern.svg');
    background-size: 720px 540px;
    --christmas-red: #98283e;
    --christmas-green: #194b3d;
    --christmas-gold: #d1a251;
}
/* Les surfaces de lecture masquent les motifs sans changer la mise en page. */
.storefront-christmas .christmas-product [data-testid="product-info"],
.storefront-christmas .christmas-product > div:has(> div > .pd-tab-panel),
.storefront-christmas .christmas-product .pd-tab-panel[data-tab="faq"] details,
.storefront-christmas .christmas-product #pd-related > h2 { background-color: #fffaf0; }
body:has(.storefront-christmas) header.bg-brick { background: #8d2034; margin-bottom: 12px; }
body:has(.storefront-christmas) header.bg-brick [data-shipping-reassurance-state] { background: #711b2c; }
body:has(.storefront-christmas) header.bg-brick .bg-brick-light { background: var(--christmas-green); }
body:has(.storefront-christmas) header.bg-brick nav > div > ul { flex-wrap: wrap; }
body:has(.storefront-christmas) header.bg-brick::after {
    content: ''; position: absolute; inset: auto 0 -28px; height: 32px;
    background: url('/img/christmas/garland.webp') center top / auto 32px repeat-x;
    pointer-events: none; filter: drop-shadow(0 3px 3px #54230c18);
}
.storefront-christmas .christmas-ribbon {
    position: relative; isolation: isolate; display: flex; align-items: center;
    justify-content: center; gap: 12px; min-height: 64px; margin: 0 0 24px;
    padding: 10px 135px; border-block: 1px solid var(--christmas-gold);
    background: linear-gradient(105deg, #841c32, #a32d43 48%, #841c32);
    color: #fff0b5; font: 600 30px/1.2 'Caveat', cursive;
    box-shadow: 0 6px 20px #6e30200a;
}
.storefront-christmas .christmas-ribbon p { margin: 0; text-align: center; }
.storefront-christmas .christmas-gift { width: 25px; height: 25px; flex: none; }
.storefront-christmas .christmas-ribbon::before, .storefront-christmas .christmas-ribbon::after {
    content: ''; position: absolute; top: -5px; width: 118px; height: 78px;
    background: url('/img/christmas/pine-corner.webp') top left / contain no-repeat;
    pointer-events: none; z-index: -1;
}
.storefront-christmas .christmas-ribbon::before { left: 0; }
.storefront-christmas .christmas-ribbon::after { right: 0; transform: scaleX(-1); }
.storefront-christmas .christmas-product [data-ui-action="gallery-open"] { position: relative; border-color: #e6d3aa; }
.storefront-christmas .christmas-product [data-ui-action="gallery-open"]::before,
.storefront-christmas .christmas-product [data-ui-action="gallery-open"]::after {
    content: ''; position: absolute; top: 0; width: 100px; height: 100px;
    background: url('/img/christmas/pine-corner.webp') top left / contain no-repeat;
    pointer-events: none;
}
.storefront-christmas .christmas-product [data-ui-action="gallery-open"]::before { left: 0; }
.storefront-christmas .christmas-product [data-ui-action="gallery-open"]::after { right: 0; transform: scaleX(-1); }
.storefront-christmas .christmas-product #product-add-to-cart {
    position: relative; min-height: 58px; padding-left: 84px; padding-right: 46px;
    isolation: isolate; box-shadow: 0 4px 12px #8d20341a;
}
.storefront-christmas .christmas-product #product-add-to-cart[data-testid="product-add-to-cart-cta"],
body:has(.storefront-christmas) #pd-sticky-buy-button.bg-coral {
    background: linear-gradient(110deg, #a42b43, #8e2138);
}
.storefront-christmas .christmas-product #product-add-to-cart[data-testid="product-add-to-cart-cta"]:hover,
body:has(.storefront-christmas) #pd-sticky-buy-button.bg-coral:hover { background: #7b1c30; }
.storefront-christmas .christmas-product #product-add-to-cart::before {
    content: ''; position: absolute; width: 62px; height: 82px; bottom: -3px; left: 12px;
    background: url('/img/christmas/snowman.webp') center bottom / contain no-repeat;
    pointer-events: none;
}
.storefront-christmas .christmas-product #product-add-to-cart::after {
    content: ''; position: absolute; inset: -6px auto auto 50%; width: 70px; height: 19px;
    transform: translateX(-50%);
    background: url('/img/christmas/snow-cap.webp') center top / contain no-repeat;
    pointer-events: none;
}
body:has(.storefront-christmas) #pd-sticky-buy-button { position: relative; }
body:has(.storefront-christmas) #pd-sticky-buy-button::after {
    content: ''; position: absolute; top: -4px; left: 50%; width: 40px; height: 10px; transform: translateX(-50%);
    background: url('/img/christmas/snow-cap.webp') center top / contain no-repeat;
    pointer-events: none;
}
/* Les liens et les surfaces de réassurance gardent leurs couleurs sémantiques. */
.storefront-christmas .christmas-product #product-add-to-cart:focus-visible,
body:has(.storefront-christmas) #pd-sticky-buy-button:focus-visible { outline: 3px solid #194b3d; outline-offset: 4px; }
@media (max-width: 1023px) {
    .storefront-christmas .christmas-product #product-add-to-cart { padding-left: 62px; padding-right: 28px; }
    .storefront-christmas .christmas-product #product-add-to-cart::before { width: 47px; height: 63px; left: 9px; }
}
@media (max-width: 767px) {
    body:has(.storefront-christmas) header.bg-brick { margin-bottom: 6px; }
    body:has(.storefront-christmas) header.bg-brick::after { bottom: -17px; height: 20px; background-size: auto 20px; }
    /* Les espaces compacts gardent le bouton d’achat dans les premiers écrans. */
    .storefront-christmas .christmas-product { padding-top: 16px; }
    .storefront-christmas .christmas-product > nav[aria-label="Fil d'Ariane"] { margin-bottom: 16px; }
    /* Une seule ligne : sur deux (73 px), le ruban repoussait le bouton d'achat au-delà de 1,6 écran
       sous Linux, dont la police système élargit le titre (CI du 20/10/2026). */
    .storefront-christmas .christmas-ribbon { min-height: 36px; padding: 6px 36px; margin-bottom: 10px; font-size: 19px; }
    .storefront-christmas .christmas-ribbon p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .storefront-christmas .christmas-gift { display: none; }
    .storefront-christmas .christmas-ribbon::before, .storefront-christmas .christmas-ribbon::after { top: -2px; width: 38px; height: 40px; }
    .storefront-christmas .christmas-product [data-ui-action="gallery-open"]::before,
    .storefront-christmas .christmas-product [data-ui-action="gallery-open"]::after { width: 49px; height: 49px; }
    .storefront-christmas .christmas-product #product-add-to-cart { min-width: 0; min-height: 68px; padding: 12px 12px 12px 50px; font-size: 16px; line-height: 1.45; }
    .storefront-christmas .christmas-product #product-add-to-cart::before { width: 39px; height: 54px; left: 5px; bottom: 0; }
    .storefront-christmas .christmas-product #product-add-to-cart::after { top: -4px; width: 43px; height: 13px; }
    .storefront-christmas .christmas-product div:has(> #product-add-to-cart) { gap: 12px; }
    .storefront-christmas .christmas-product #pd-qty-value { padding-inline: 8px; min-width: 40px; }
}
@media (max-width: 359px) {
    .storefront-christmas .christmas-ribbon { font-size: 17px; padding-inline: 28px; }
    .storefront-christmas .christmas-product #product-add-to-cart { padding-left: 37px; padding-right: 8px; font-size: 14px; }
    .storefront-christmas .christmas-product #product-add-to-cart::before { width: 29px; height: 42px; left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .storefront-christmas .christmas-product #product-add-to-cart { transition: none; }
}
@media print {
    body:has(.storefront-christmas) { background: white; }
    .storefront-christmas .christmas-ribbon, body:has(.storefront-christmas) header.bg-brick::after,
    .storefront-christmas .christmas-product [data-ui-action="gallery-open"]::before,
    .storefront-christmas .christmas-product [data-ui-action="gallery-open"]::after,
    .storefront-christmas .christmas-product #product-add-to-cart::before,
    .storefront-christmas .christmas-product #product-add-to-cart::after { display: none; }
}
/* Les décors utilisent ::after : ::before reste réservé aux zones tactiles du header. */
body:has(.storefront-christmas) header.bg-brick a:is([href="/Account/Login"], [href="/Account/Manage"])::after {
    content: ''; position: absolute; top: -5px; left: 50%; width: 24px; height: 18px;
    transform: translateX(-50%) rotate(-12deg);
    background: url('/img/christmas/santa-hat.svg') center / contain no-repeat;
    pointer-events: none;
}
body:has(.storefront-christmas) header.bg-brick [data-testid="header-cart-link"]::after {
    content: ''; position: absolute; top: -7px; left: 50%; width: 28px; height: 25px;
    transform: translateX(-50%);
    background: url('/img/christmas/cart-gift.svg') center / contain no-repeat;
    pointer-events: none;
}
body:has(.storefront-christmas) #header-cart-count { z-index: 1; }
.storefront-christmas .christmas-crumb {
    display: inline-block; width: 12px; height: 18px; font-size: 0; vertical-align: middle;
    background: url('/img/christmas/candy-cane.svg') center / contain no-repeat;
    transform: rotate(18deg); pointer-events: none;
}
@media (max-width: 1023px) {
    .storefront-christmas .christmas-crumb.max-lg\:hidden { display: none; }
}
@media print {
    body:has(.storefront-christmas) header.bg-brick a::after { display: none; }
    .storefront-christmas .christmas-crumb { width: auto; height: auto; font-size: inherit; background: none; transform: none; vertical-align: baseline; }
}
/* Les recommandations reprennent les couleurs et les petits décors de la fiche. */
.storefront-christmas .christmas-product #pd-related { border-top-color: #d7bd85; }
.storefront-christmas .christmas-product #pd-related > h2 {
    position: relative; min-height: 42px; padding-left: 52px;
    color: var(--christmas-green); font: 700 34px/1.25 'Caveat', cursive;
}
.storefront-christmas .christmas-product #pd-related > h2::before {
    content: ''; position: absolute; left: 0; top: -2px; width: 42px; height: 42px;
    background: url('/img/christmas/pine-corner.webp') center / contain no-repeat;
    pointer-events: none;
}
.storefront-christmas [id^="product-card-"] {
    border-color: #dbc99f; border-top: 3px solid var(--christmas-green);
    background: #fff8eb; box-shadow: 0 4px 14px #6542220b;
}
.storefront-christmas [id^="product-card-"] > a:first-child { background: white; }
.storefront-christmas [id^="product-card-"] > a:first-child::after {
    content: ''; position: absolute; bottom: 0; right: 0; width: 38px; height: 38px;
    background: url('/img/christmas/pine-corner.webp') center / contain no-repeat;
    transform: rotate(180deg); pointer-events: none;
}
.storefront-christmas [id^="product-card-"] a.bg-coral { position: relative; background: var(--christmas-red); }
.storefront-christmas [id^="product-card-"] a.bg-coral:hover { background: #7b1c30; }
.storefront-christmas [id^="product-card-"] a.bg-coral::after {
    content: ''; position: absolute; top: -3px; left: 50%; width: 32px; height: 8px; transform: translateX(-50%);
    background: url('/img/christmas/snow-cap.webp') center top / contain no-repeat;
    pointer-events: none;
}
.storefront-christmas [data-card-add-to-cart] { color: var(--christmas-red); border-color: var(--christmas-red); }
.storefront-christmas [data-card-add-to-cart]:hover { color: white; background: var(--christmas-red); }
/* Le décor du footer dispose de son propre espace, au-dessus du contenu utile. */
body:has(.storefront-christmas) footer.bg-brick {
    position: relative; margin-top: 160px; padding-top: 16px; background: #153f34;
}
body:has(.storefront-christmas) footer.bg-brick::before {
    content: ''; position: absolute; inset: -17px 0 auto; height: 24px;
    background: url('/img/christmas/snow-cap.webp') center top / 180px auto repeat-x;
    pointer-events: none;
}
body:has(.storefront-christmas) footer.bg-brick::after {
    content: ''; position: absolute; top: -151px; left: 50%; transform: translateX(-50%);
    width: 240px; height: 158px;
    background: url('/img/christmas/footer-scene.webp') center bottom / contain no-repeat;
    pointer-events: none;
}
body:has(.storefront-christmas) footer.bg-brick .text-coral { color: #f0cf8b; }
body:has(.storefront-christmas) footer.bg-brick .bg-coral { background: var(--christmas-red); }
@media (max-width: 767px) {
    .storefront-christmas .christmas-product #pd-related > h2 { font-size: 30px; padding-left: 44px; }
    .storefront-christmas .christmas-product #pd-related > h2::before { width: 35px; height: 35px; }
    .storefront-christmas [id^="product-card-"] > a:first-child::after { width: 25px; height: 25px; }
    body:has(.storefront-christmas) footer.bg-brick { margin-top: 120px; padding-top: 12px; }
    body:has(.storefront-christmas) footer.bg-brick::after { top: -112px; width: 180px; height: 119px; }
}
@media print {
    .storefront-christmas .christmas-product #pd-related > h2::before,
    .storefront-christmas [id^="product-card-"] > a:first-child::after,
    .storefront-christmas [id^="product-card-"] a.bg-coral::after,
    body:has(.storefront-christmas) footer.bg-brick::before,
    body:has(.storefront-christmas) footer.bg-brick::after { display: none; }
}

/* Les blocs éditoriaux et les formulaires ont un fond uni, jamais de motif sous le texte. */
.storefront-christmas main > div[class*="max-w-"],
.storefront-christmas main > article,
.storefront-christmas .blog-review-layout > article,
.storefront-christmas main > section:not([class*="bg-"]),
.storefront-christmas main .prose { background-color: #fffaf0; }
/* La fiche validée garde ses espaces décorés entre les surfaces opaques. */
.storefront-christmas main > div.christmas-product { background-color: transparent; }
.storefront-christmas main > section:is(.bg-white, .bg-gray-50) { background-color: #fff8e9; }
.storefront-christmas main > section.bg-brick { background-color: var(--christmas-green); }
.storefront-christmas [data-testid="home-hero"] {
    position: relative; background: transparent;
}
.storefront-christmas [data-testid="home-hero"] h1 { color: var(--christmas-green); }
.storefront-christmas [data-testid="home-hero"]::after {
    content: ''; position: absolute; right: max(16px, calc((100% - 1505px) / 2)); bottom: 0;
    width: 100px; height: 100px;
    background: url('/img/christmas/pine-corner.webp') center / contain no-repeat;
    transform: rotate(180deg); pointer-events: none;
}
/* Petits bonnets de neige sur les actions principales ; aucun changement de dimensions. */
.storefront-christmas main :is(a, button).bg-coral {
    position: relative; background-color: var(--christmas-red);
}
.storefront-christmas main :is(a, button).bg-coral:hover { background-color: #7b1c30; }
.storefront-christmas main :is(a, button).bg-coral::after {
    content: ''; position: absolute; top: -3px; left: 50%; width: 32px; height: 8px; transform: translateX(-50%);
    background: url('/img/christmas/snow-cap.webp') center top / contain no-repeat;
    pointer-events: none;
}
@media (max-width: 767px) {
    .storefront-christmas [data-testid="home-hero"]::after { width: 42px; height: 42px; }
}
@media print {
    .storefront-christmas [data-testid="home-hero"]::after,
    .storefront-christmas main :is(a, button).bg-coral::after { display: none; }
    body:has(.storefront-christmas) footer.bg-brick { margin-top: 64px; padding-top: 0; }
}

/* Le Club conserve son contraste blanc avec une palette de sapin. */
.storefront-christmas .club-hero { background: linear-gradient(125deg, #194b3d, #2e6550); }
.storefront-christmas .club-hero a { color: var(--christmas-green); }
/* Le widget anti-robot impose 300 px : il reste entier dans les formulaires étroits. */
@media (max-width: 359px) {
    .storefront-christmas .cf-turnstile { zoom: .84; }
}

/* Sur l’accueil, les motifs restent visibles entre les cartes et autour des textes. */
.storefront-christmas main:has([data-testid="home-hero"]) > section:not([class*="bg-"]),
.storefront-christmas main:has([data-testid="home-hero"]) > section:is(.bg-white, .bg-gray-50) {
    background-color: transparent;
}
.storefront-christmas [data-testid="home-hero"] > div.flex > .flex-1,
.storefront-christmas main:has([data-testid="home-hero"]) > section > :is(h2, h3),
.storefront-christmas main:has([data-testid="home-hero"]) > section > div[class*="max-w-"] > :is(h2, h3),
.storefront-christmas .home-seo-copy,
.storefront-christmas [data-testid="home-deals-of-the-day"] > div > .mb-6,
.storefront-christmas #avis > div > .text-center { background-color: #fffaf0; }
/* Les pastilles de navigation gardent leur contour arrondi sans décor de neige. */
.storefront-christmas main [data-testid="subcategory-badges"] a.bg-coral::after { content: none; }
