/* The site-wide sale (Admin > Réglages > Black Friday): only loaded while it runs (php/pages.php sale_dress). */

/* The ribbon under the header: the offer, scrolling slowly, fading at both ends. */
.sale-rb { position: relative; display: block; overflow: hidden; height: 40px; background: #000; border-bottom: 1px solid rgba(255,255,255,.07); text-decoration: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.sale-rb > div { position: absolute; top: 0; left: 0; display: flex; align-items: center; height: 100%; white-space: nowrap; animation: saleMq 45s linear infinite; }
.sale-rb:hover > div { animation-play-state: paused; }
.sale-rb span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: .7rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.sale-rb b { color: #ff6a2b; font-weight: 800; }
.sale-rb i { width: 4px; height: 4px; border-radius: 50%; background: #ff6a2b; }
@keyframes saleMq { to { transform: translateX(-50%); } }
@media (max-width: 760px) { .sale-rb { height: 34px; } .sale-rb span { font-size: .62rem; gap: 20px; padding-right: 20px; } }

/* The home title: a dot that breathes, the countdown in white. */
.hx.is-sale { position: relative; }
.hx.is-sale > * { position: relative; z-index: 1; }
.hx-k.sale-k { color: rgba(255,255,255,.75); }
.sale-dot { display: inline-block; width: 6px; height: 6px; margin: 0 9px 1px 0; border-radius: 50%; background: #ff6a2b; vertical-align: middle; animation: saleP 2.4s ease-in-out infinite; }
@keyframes saleP { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,106,43,.55); } 60% { box-shadow: 0 0 0 7px rgba(255,106,43,0); } }
.hx-l .sale-cd { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

/* The featured picture: a thin orange edge and a light that passes over it. */
.hx.is-sale .hx-mos a:nth-child(2) { box-shadow: 0 0 0 1px rgba(255,106,43,.55); }
.hx.is-sale .hx-mos a:nth-child(2)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%); background-size: 300% 100%; animation: saleSw 6s ease-in-out infinite; }
@keyframes saleSw { 0%, 55% { background-position: 100% 0; } 100% { background-position: -50% 0; } }

/* Behind the home hero: price tags floating in the side margins, two big pale percent signs. */
.sale-bg { position: absolute; left: 0; right: 0; top: 0; height: 980px; z-index: 0; pointer-events: none; overflow: hidden; }
.sale-t { position: absolute; color: #ff6a2b; animation: saleF 9s ease-in-out infinite; }
.sale-t svg { display: block; width: 100%; height: auto; }
.sale-pc { position: absolute; font-weight: 900; line-height: 1; color: transparent; letter-spacing: -.06em; -webkit-text-stroke: 1.5px rgba(255,106,43,.16); }
.sale-pc-a { right: -40px; top: 560px; font-size: 260px; }
.sale-pc-b { left: -60px; top: 20px; font-size: 200px; -webkit-text-stroke-color: rgba(255,255,255,.05); }
.sale-pc-m { display: none; }
@keyframes saleF { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-14px) rotate(calc(var(--r) + 4deg)); } }
/* Narrow screens have no side margins: one pale sign only. */
@media (max-width: 1300px) { .sale-t, .sale-pc-a, .sale-pc-b { display: none; } }
@media (max-width: 760px) { .sale-pc-m { display: block; right: -30px; top: 380px; font-size: 230px; -webkit-text-stroke: 1.2px rgba(255,106,43,.1); } }
@media (prefers-reduced-motion: reduce) { .sale-rb > div, .sale-t, .sale-dot, .hx.is-sale .hx-mos a:nth-child(2)::after { animation: none; } }

/* Prices: the old one crossed out, small and grey, after the new one. */
.sale-was { margin-left: 5px; color: rgba(255,255,255,.38); font-weight: 500; font-size: .86em; text-decoration: line-through; }
.hv-ft b .sale-was { font-size: .8em; }

/* The badge on product cards, beside New and Pro. */
.hv-tags i.sale-tag, .mv-tg i.sale-tag, .hv-wci u.sale-tag { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,106,43,.7); }
.sale-tag em { font-style: normal; color: #ff6a2b; }
.hv-wci u.sale-tag { left: auto; right: 12px; }
.hv-tags, .mv-tg { flex-wrap: wrap; }
.sale-tag { white-space: nowrap; }

/* Product page: the old price on its own line above the price, and under each format's price. */
html[data-sale] .pv-pr .pv-was { display: block; margin: 0 0 2px; font-size: .95rem; }
html[data-sale] .pv-fm button em { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.sc-fmts .sale-was { display: block; margin: 0; }

/* Product page: the buy box during the sale (orange edge, a warm top, the passing light), its badge, saving and countdown. */
.pv-buy.is-sale { position: relative; overflow: hidden; border-color: rgba(255,106,43,.55) !important; background: linear-gradient(180deg, rgba(255,106,43,.10), rgba(255,106,43,0) 38%), #0d0e12 !important; }
.pv-buy.is-sale::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%); background-size: 300% 100%; animation: saleSw 6s ease-in-out infinite; }
.pv-buy.is-sale > * { position: relative; z-index: 1; }
.sale-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-right: 84px; }
span.sale-tag { display: inline-flex; gap: 5px; padding: 5px 10px; border-radius: 99px; background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,106,43,.7); font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; }
html[data-sale] .pv-buy.is-sale .pv-pr .pv-was { display: inline; margin: 0; }
.sale-save { display: inline-block; margin: 0 0 4px 8px; padding: 2px 8px; border-radius: 6px; background: rgba(255,106,43,.14); color: #ff8a4c; font-size: .74rem; font-weight: 800; vertical-align: middle; }
.sale-save[hidden] { display: none; }
.sale-ends { margin: 6px 0 14px; color: rgba(255,255,255,.6); font-size: .74rem; font-weight: 600; }
.sale-ends b { color: #fff; font-variant-numeric: tabular-nums; }
/* Character page: the badge before the button, the old price inside it. */
.ig-nb + span.sale-tag, span.sale-tag + .ig-nb { margin-left: 10px; }
.ig-nb .sale-was { color: rgba(255,255,255,.6); }
@media (prefers-reduced-motion: reduce) { .pv-buy.is-sale::after { animation: none; } }
