/* amazon-blackfriday.css
 * Feuille de la carte publicitaire Amazon « Black Friday », sortie de template_parts/banner_amazon_blackfriday.php le 18/11/2026
 * (elle était écrite en ligne dans CHAQUE page : 17 Ko de HTML). Chargée par
 * rk_amazon_css_link() (libs/rk_amazon_products.lib.php), hors minification
 * WP Rocket : une modification ici est servie dès l'envoi du fichier (?ver = date du fichier).
 */
@property --bf-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.rkbf {
    /* Charte Amazon BFW26 */
    --bf-orange: #ff6201;
    --bf-red: #fd1733;
    --bf-spruce: #003e33;
    --bf-ink: #161d26;
    --bf-acc: var(--bf-orange);
    --bf-acc-soft: rgba(255, 98, 1, .18);
    --bf-txt: #ffffff;
    --bf-mut: rgba(255, 255, 255, .78);

    position: relative;
    margin: 32px 0;
    padding: 2px;
    border-radius: 22px;
    isolation: isolate;
    overflow: hidden;
    container: rkbf / inline-size;
    background: var(--bf-spruce);
    box-shadow: 0 20px 44px -20px rgba(0, 40, 30, .6), 0 2px 6px rgba(16, 24, 40, .08);
    font-family: inherit;
    line-height: 1.4;
    text-align: left;
    transition: transform .3s cubic-bezier(.2, .7, .3, 1), box-shadow .3s ease;
}
.rkbf--ph-final {
    --bf-acc: var(--bf-red);
    --bf-acc-soft: rgba(253, 23, 51, .2);
}
.rkbf--sidebar { max-width: 340px; }
.rkbf,
.rkbf *,
.rkbf *::before,
.rkbf *::after { box-sizing: border-box; }
.rkbf[hidden] { display: none !important; }

/* Phase : on n affiche que les elements de la phase courante */
.rkbf--ph-week  [data-ph="final"],
.rkbf--ph-final [data-ph="week"] { display: none !important; }

/* Liseré qui tourne autour de la card (couleur de la phase + blanc) */
.rkbf::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(from var(--bf-a), var(--bf-acc) 0deg, #fff 40deg, var(--bf-acc) 90deg, var(--bf-spruce) 170deg, #0b5a49 250deg, var(--bf-acc) 360deg);
    animation: bf-ring 6s linear infinite;
}
.rkbf:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 56px -20px rgba(255, 98, 1, .45), 0 2px 6px rgba(16, 24, 40, .08);
}
.rkbf--ph-final:hover { box-shadow: 0 28px 56px -20px rgba(253, 23, 51, .45), 0 2px 6px rgba(16, 24, 40, .08); }

.rkbf__in {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    color: var(--bf-txt);
    background:
        radial-gradient(70% 60% at 100% 100%, var(--bf-acc-soft), transparent 65%),
        linear-gradient(165deg, #00523f 0%, #003e33 55%, #002b23 100%);
}

/* =======================================================================
   VISUEL OFFICIEL — banniere Amazon + effets legers poses dessus.
   Seuls transform / opacity sont animes.
   ======================================================================= */
.rkbf .rkbf__hero {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bf-acc);
    text-decoration: none !important;
}
.rkbf__art { position: relative; display: block; width: 100%; overflow: hidden; }
.rkbf__art--wide { display: none; }
.rkbf__art-in {
    position: absolute;
    inset: 0;
    display: block;
    transform-origin: 70% 60%;
    animation: bf-drift 14s ease-in-out infinite alternate;
}
.rkbf__art img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    margin: 0;
}
.rkbf .rkbf__hero:hover .rkbf__art-in { animation-play-state: paused; }
.rkbf .rkbf__hero:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }

.bfx { position: absolute; inset: 0; pointer-events: none; }
.bfx > * { position: absolute; display: block; }

/* Halo qui respire sur le neon de la banniere */
.bfx__glow {
    background: radial-gradient(closest-side, rgba(255, 255, 255, .75), rgba(255, 245, 225, .25) 55%, transparent 100%);
    mix-blend-mode: screen;
    opacity: 0;
    animation: bf-glow 3.4s ease-in-out infinite;
}

/* Scintillement a 4 branches sur les reflets dores */
.bfx__star {
    width: calc(3.4% * var(--s, 1));
    min-width: 10px;
    aspect-ratio: 1;
    translate: -50% -50%;
    background:
        radial-gradient(closest-side, #fff 0 22%, transparent 60%),
        linear-gradient(90deg, transparent 46%, #fff 50%, transparent 54%),
        linear-gradient(0deg, transparent 46%, #fff 50%, transparent 54%);
    -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%);
    mask: radial-gradient(closest-side, #000 30%, transparent 100%);
    filter: drop-shadow(0 0 4px rgba(255, 236, 170, .95));
    opacity: 0;
    animation: bf-twinkle 3.6s ease-in-out var(--d, 0s) infinite;
}

/* Reflet de lumiere qui traverse le visuel */
.bfx__sheen {
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 22%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .28) 50%, transparent 100%);
    mix-blend-mode: soft-light;
    transform: translateX(-120%) skewX(-14deg);
    animation: bf-sheen 7s ease-in-out 1.5s infinite;
}

/* =======================================================================
   CONTENU
   ======================================================================= */
.rkbf__body {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 18px 16px;
}
.rkbf__main, .rkbf__side { min-width: 0; display: flex; flex-direction: column; }

.rkbf__kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rkbf__tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bf-mut);
}

.rkbf__count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--bf-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5);
}
.rkbf__count b { font-weight: 900; font-size: 13.5px; color: var(--bf-ink); }
.rkbf__count-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--bf-acc); flex-shrink: 0; }
.rkbf__count-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--bf-acc);
    animation: bf-ping 1.8s ease-out infinite;
}

.rkbf__title {
    font-size: 22px;
    font-size: clamp(20px, 1.5cqw + 12px, 28px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.02em;
}
.rkbf .rkbf__title a {
    color: #fff !important;
    text-decoration: none !important;
    background-image: linear-gradient(100deg, #fff 0%, #fff 40%, #ffd2b3 46%, #ffb27f 50%, #ffd2b3 54%, #fff 60%, #fff 100%) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent;
    animation: bf-shine 6s ease-in-out infinite;
}

.rkbf__sub { max-width: 64ch; font-size: 14.5px; line-height: 1.55; color: var(--bf-mut); }

/* Barre de recherche : le mot-cle tape change, le lien suit */
.rkbf .rkbf__search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    padding: 6px 6px 6px 16px;
    border-radius: 999px;
    background: #fff !important;
    color: var(--bf-ink) !important;
    text-decoration: none !important;
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .7);
    transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease;
}
.rkbf .rkbf__search:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .75), 0 0 0 3px var(--bf-acc); }
.rkbf__loupe { width: 18px; height: 18px; flex-shrink: 0; color: var(--bf-acc); }
.rkbf__kw {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.rkbf__caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 2px;
    flex-shrink: 0;
    background: var(--bf-acc);
    animation: bf-caret 1s steps(1) infinite;
}
.rkbf__go {
    flex-shrink: 0;
    padding: 9px 15px;
    border-radius: 999px;
    background: var(--bf-ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
}

/* Rayons */
.rkbf__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rkbf .rkbf__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform .22s cubic-bezier(.3, 1.5, .5, 1), background-color .2s ease, box-shadow .2s ease;
}
.rkbf .rkbf__chip:hover {
    background: var(--bf-acc-soft) !important;
    box-shadow: inset 0 0 0 1px var(--bf-acc), 0 8px 18px -10px var(--bf-acc);
    transform: translateY(-2px);
}
.rkbf__chip-ico { display: inline-block; font-size: 15px; line-height: 1; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.rkbf__chip:hover .rkbf__chip-ico { transform: rotate(-14deg) scale(1.3); }

/* CTA : couleur de la phase, texte Squid Ink (contraste AA) */
.rkbf__action {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.rkbf .rkbf__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1 1 100%;
    min-height: 54px;
    padding: 0 24px 0 18px;
    border-radius: 999px;
    overflow: hidden;
    white-space: nowrap;
    background: var(--bf-acc) !important;
    color: var(--bf-ink) !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.01em;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16);
    transition: transform .22s cubic-bezier(.2, .7, .3, 1), filter .22s ease;
    animation: bf-cta-glow 2.6s ease-in-out infinite, bf-nudge 7s ease-in-out 3s infinite;
}
.rkbf .rkbf__cta:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); animation-play-state: paused; }
.rkbf .rkbf__cta:active { transform: scale(.98); }
.rkbf .rkbf__cta:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bf-spruce), 0 0 0 6px #fff; }
.rkbf__cta-ico { position: relative; z-index: 1; width: 20px; height: 20px; flex-shrink: 0; transform-origin: 20% 20%; animation: bf-swing 2.4s ease-in-out infinite; }
.rkbf__cta-label { position: relative; z-index: 1; }
.rkbf__cta-arrow { position: relative; z-index: 1; width: 18px; height: 18px; flex-shrink: 0; transition: transform .22s cubic-bezier(.2, .7, .3, 1); }
.rkbf__cta:hover .rkbf__cta-arrow { transform: translateX(5px); }
.rkbf__cta-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: bf-cta-shine 4s ease-in-out infinite;
    pointer-events: none;
}

.rkbf__hint { display: none; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.rkbf__legal { font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, .62); }

/* Colonne etroite : 4 rayons */
.rkbf__chips .rkbf__chip:nth-child(n+5) { display: none; }

/* -------- Card large : bandeau officiel + contenu sur deux colonnes -------- */
@container rkbf (min-width: 640px) {
    .rkbf__art--wide   { display: block; }
    .rkbf__art--narrow { display: none; }
    .rkbf__body {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        column-gap: 28px;
        padding: 22px 26px 18px;
    }
    .rkbf__side { padding-top: 34px; }
    .rkbf__legal { grid-column: 1 / -1; }
    .rkbf__hint { display: inline; }
}
@container rkbf (min-width: 900px) {
    .rkbf__chips .rkbf__chip:nth-child(n+5) { display: inline-flex; }
}
/* Telephone : le visuel et les rayons suffisent, le sous-titre repete les rayons */
@container rkbf (max-width: 480px) {
    .rkbf .rkbf__sub { display: none !important; }
}
@container rkbf (max-width: 420px) {
    .rkbf .rkbf__cta { gap: 8px; padding: 0 16px; font-size: 15px; }
}
@container rkbf (max-width: 360px) {
    .rkbf__go { display: none; }
    .rkbf .rkbf__search { padding: 12px 16px; }
    .rkbf__count { margin-left: 0; }
}

/* -------- Garde anti-reset des gabarits hotes -------- */
.rkbf .rkbf__title  { margin: 0 0 10px !important; padding: 0 !important; }
.rkbf .rkbf__sub    { margin: 0 0 16px !important; padding: 0 !important; }
.rkbf .rkbf__chips  { margin: 14px 0 18px !important; padding: 0 !important; }
.rkbf .rkbf__legal  { margin: 12px 0 0 !important; padding: 0 !important; }
.rkbf p::first-letter { float: none !important; font-size: inherit !important; line-height: inherit !important; margin: 0 !important; font-weight: inherit !important; color: inherit !important; }
.rkbf a[target="_blank"]::after { content: none !important; }
@container rkbf (min-width: 640px) {
    .rkbf .rkbf__chips { margin: 0 0 18px !important; }
}

/* -------- Etat JS : entree orchestree --------
   .is-armed : visuel legerement zoome, rayons caches ; .is-seen (card a
   l ecran) : le visuel se pose, les rayons arrivent un par un. */
.rkbf.is-armed .rkbf__art-in { animation: none; transform: scale(1.08); opacity: .6; }
.rkbf.is-armed .rkbf__chip { opacity: 0; }
.rkbf.is-seen .rkbf__art-in { animation: bf-land .9s cubic-bezier(.2, .7, .3, 1) both, bf-drift 14s ease-in-out .9s infinite alternate; }
.rkbf.is-seen .rkbf__chip { animation: bf-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 80ms + .5s); }

.rkbf.is-off,
.rkbf.is-off::before,
.rkbf.is-off * { animation-play-state: paused !important; }

/* -------- Keyframes -------- */
@keyframes bf-ring    { to { --bf-a: 360deg; } }
@keyframes bf-drift   { from { transform: scale(1); } to { transform: scale(1.035); } }
@keyframes bf-land    { from { transform: scale(1.08); opacity: .6; } to { transform: scale(1); opacity: 1; } }
@keyframes bf-glow    { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
@keyframes bf-twinkle {
    0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
    18%      { opacity: 1; transform: scale(1) rotate(45deg); }
    36%      { opacity: 0; transform: scale(.4) rotate(90deg); }
}
@keyframes bf-sheen   { 0%, 55% { transform: translateX(-120%) skewX(-14deg); } 100% { transform: translateX(560%) skewX(-14deg); } }
@keyframes bf-ping    { 0% { opacity: .7; scale: 1; } 100% { opacity: 0; scale: 2.8; } }
@keyframes bf-shine   { 0%, 15% { background-position: 100% 0; } 65%, 100% { background-position: 0% 0; } }
@keyframes bf-caret   { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes bf-pop     { from { opacity: 0; translate: 0 10px; scale: .85; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes bf-swing   { 0%, 100% { rotate: -9deg; } 50% { rotate: 9deg; } }
@keyframes bf-cta-glow {
    0%, 100% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 12px 26px -12px var(--bf-acc), 0 0 0 0 rgba(255, 255, 255, .35); }
    60%      { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 14px 30px -12px var(--bf-acc), 0 0 0 12px rgba(255, 255, 255, 0); }
}
@keyframes bf-nudge {
    0%, 86%, 100% { scale: 1; }
    89% { scale: 1.06; }
    92% { scale: .98; }
    95% { scale: 1.03; }
}
@keyframes bf-cta-shine { 0%, 30% { transform: translateX(-100%); } 65%, 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
    .rkbf,
    .rkbf::before,
    .rkbf * {
        animation: none !important;
        transition: none !important;
    }
    .bfx { display: none; }
}
