/* ================================
   🔥 THEME BLACK FRIDAY GLOBAL
   ================================ */

/* Palette ultra-marquée Black Friday */
body.blackfriday {
    --bf-red: #DC0000;         /* rouge éclatant et agressif */
    --bf-gold: #FFB800;        /* or brillant et saturé */
    --bf-black: #000000;       /* noir pur */
    --bf-white: #FFFFFF;       /* blanc pur pour contrastes */
    --bf-red-dark: #8B0000;    /* rouge foncé intense */
    --bf-glow-red: rgba(220, 0, 0, 0.9);
    --bf-glow-gold: rgba(255, 184, 0, 0.9);
    background:
      radial-gradient(1200px 600px at 10% -10%, rgba(220,0,0,.15), transparent 60%),
      radial-gradient(1200px 600px at 90% -10%, rgba(255,184,0,.12), transparent 60%),
      var(--bulma-body-background, #fff);
  }

  /* ================================
     1) Ruban "BLACK FRIDAY" - Ultra visible
     ================================ */
  body.blackfriday .bf-ribbon { position: relative; overflow: hidden; }
  body.blackfriday .bf-ribbon::after {
    content: "💥 BLACK FRIDAY";
    position: absolute; top: 12px; left: -36px;
    transform: rotate(-12deg);
    background: linear-gradient(135deg, var(--bf-black) 0%, var(--bf-red) 50%, var(--bf-red-dark) 100%);
    color: var(--bf-gold);
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 4px;
    border: 2px solid var(--bf-gold);
    box-shadow:
      0 0 20px var(--bf-glow-red),
      0 0 40px rgba(220,0,0,.5),
      0 8px 24px rgba(0,0,0,.4);
    animation: bf-pulse 1.2s ease-in-out infinite;
  }
  @keyframes bf-pulse {
    0%, 100% {
      transform: rotate(-12deg) scale(1);
      box-shadow:
        0 0 20px var(--bf-glow-red),
        0 0 40px rgba(220,0,0,.5),
        0 8px 24px rgba(0,0,0,.4);
    }
    50% {
      transform: rotate(-12deg) scale(1.08);
      box-shadow:
        0 0 30px var(--bf-glow-red),
        0 0 60px rgba(220,0,0,.8),
        0 12px 32px rgba(0,0,0,.5);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body.blackfriday .bf-ribbon::after { animation: none; }
  }

  /* ================================
     2) Séparateur thématique - Très contrasté
     ================================ */
  body.blackfriday .bf-divider {
    height: 3px;
    border: 0;
    margin: 2rem 0;
    background: linear-gradient(90deg,
      transparent,
      var(--bf-red) 20%,
      var(--bf-gold) 50%,
      var(--bf-red) 80%,
      transparent);
    box-shadow: 0 0 10px var(--bf-glow-red);
    opacity: 1;
  }

  /* ================================
     3) Coins décoratifs
     ================================ */
  /* Étiquette prix coin haut droit */
  body.blackfriday .bf-tag-corner { position: relative; }
  body.blackfriday .bf-tag-corner::before {
    content: "";
    position: absolute; top: 8px; right: 8px; width: 50px; height: 50px; opacity: .99;
    background: no-repeat center/contain
      url("/images_2/black_friday_3.png");
  }

  body.blackfriday .bf-tag-corner-alt { position: relative; }
  body.blackfriday .bf-tag-corner-alt::before {
    content: "";
    position: absolute; top: 8px; right: 8px; width: 100px; height: 100px; opacity: .99;
    background: no-repeat center/contain
      url("/images_2/black_friday_8.png");
  }

  body.blackfriday .bf-tag-corner-alt-alt { position: relative; }
  body.blackfriday .bf-tag-corner-alt-alt::after {
    content: "";
    position: absolute; top: 8px; right: 8px; width: 100px; height: 100px; opacity: .99;
    background: no-repeat center/contain
      url("/images_2/black_friday_2.png");
  }

  /* Panier coin bas gauche */
  body.blackfriday .bf-cart-corner { position: relative; }
  body.blackfriday .bf-cart-corner::before {
    content: "";
    position: absolute;
    bottom: 8px; left: 8px;
    width: 70px; height: 70px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_1.png");
    pointer-events: none;
  }

  /* Éclair coin bas droit */
  body.blackfriday .bf-lightning-corner { position: relative; }
  body.blackfriday .bf-lightning-corner::after {
    content: "";
    position: absolute;
    bottom: 8px; right: 8px;
    width: 80px; height: 80px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_2.png");
    pointer-events: none;
  }

  body.blackfriday .bf-lightning-corner-alt { position: relative; }
  body.blackfriday .bf-lightning-corner-alt::after {
    content: "";
    position: absolute;
    bottom: 8px; right: 8px;
    width: 80px; height: 80px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_5.png");
    pointer-events: none;
  }

  body.blackfriday .bf-lightning-corner-alt-alt { position: relative; }
  body.blackfriday .bf-lightning-corner-alt-alt::after {
    content: "";
    position: absolute;
    bottom: 8px; right: 8px;
    width: 90px; height: 90px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_1.png");
    pointer-events: none;
  }

  /* Coin bas gauche : speaker */
  body.blackfriday .bf-speaker-corner { position: relative; }
  body.blackfriday .bf-speaker-corner::before {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 80px;
    height: 80px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_10.png");
    pointer-events: none;
  }

  /* Coin haut gauche : citrouille remplacée par gland */
  body.blackfriday .bf-acorn-corner { position: relative; }
  body.blackfriday .bf-acorn-corner::before {
    content: "";
    position: absolute;
    top: 8px; left: 8px;
    width: 90px; height: 90px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_4.png");
    pointer-events: none;
  }

  body.blackfriday .bf-acorn-corner-alt { position: relative; }
  body.blackfriday .bf-acorn-corner-alt::before {
    content: "";
    position: absolute;
    top: 8px; left: 8px;
    width: 90px; height: 90px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_1.png");
    pointer-events: none;
  }

  body.blackfriday .bf-acorn-corner-alt-alt { position: relative; }
  body.blackfriday .bf-acorn-corner-alt-alt::before {
    content: "";
    position: absolute;
    top: 8px; left: 8px;
    width: 90px; height: 90px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/black_friday_7.png");
    pointer-events: none;
  }

  /* Coin bas droit : feuille d'érable */
  /* body.autumn .a-maple-corner { position: relative; }
  body.autumn .a-maple-corner::after {
    content: "";
    position: absolute;
    bottom: 8px; right: 8px;
    width: 80px; height: 80px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/umbrela.png");
    pointer-events: none;
  } */

  /* Coin bas droit : citrouille alternative (gland doré) */
  /* body.autumn .a-acorn-corner-alt { position: relative; }
  body.autumn .a-acorn-corner-alt::after {
    content: "";
    position: absolute;
    bottom: 8px; right: 8px;
    width: 80px; height: 80px;
    opacity: 0.95;
    background: no-repeat center/contain url("/images_2/mushroom.png");
    pointer-events: none;
  } */


  /* ================================
     4) Bouton Glow - Ultra lumineux et agressif
     ================================ */
  @keyframes bf-glow {
    0%, 100% {
      box-shadow:
        0 0 15px var(--bf-glow-red),
        0 0 30px rgba(220,0,0,.6),
        0 0 45px rgba(255,184,0,.4),
        inset 0 0 20px rgba(220,0,0,.3);
      transform: scale(1);
    }
    50% {
      box-shadow:
        0 0 25px var(--bf-glow-red),
        0 0 50px rgba(220,0,0,.9),
        0 0 75px rgba(255,184,0,.7),
        inset 0 0 30px rgba(220,0,0,.5);
      transform: scale(1.02);
    }
  }
  body.blackfriday .bf-glow {
    background: linear-gradient(135deg,
      var(--bf-black) 0%,
      var(--bf-red-dark) 40%,
      var(--bf-red) 100%);
    border: 3px solid var(--bf-gold);
    color: var(--bf-gold) !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    position: relative;
    animation: bf-glow 1.5s ease-in-out infinite;
  }
  body.blackfriday .bf-glow::before {
    content: "";
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, var(--bf-red), var(--bf-gold), var(--bf-red));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    animation: bf-border-glow 2s ease-in-out infinite;
  }
  @keyframes bf-border-glow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
  }
  @media (prefers-reduced-motion: reduce) {
    body.blackfriday .bf-glow { animation: none; }
    body.blackfriday .bf-glow::before { animation: none; }
  }

  /* ================================
     5) Deals tombants animés - Plus rapides et dynamiques
     ================================ */
  body.blackfriday .bf-deals { position: relative; overflow: visible; }
  body.blackfriday .bf-deals .deal {
    position: absolute; top: -8px; left: -10%;
    font-size: 32px;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(220,0,0,.8)) drop-shadow(0 4px 6px rgba(0,0,0,.6));
    animation: bf-deal-fall 5s ease-in-out 1 forwards;
  }
  body.blackfriday .bf-deals .deal:nth-child(2) { animation-delay: .6s; top: 12px; }
  body.blackfriday .bf-deals .deal:nth-child(3) { animation-delay: 1.2s; top: 30px; }
  body.blackfriday .bf-deals .deal:nth-child(4) { animation-delay: 1.8s; top: 45px; }
  @keyframes bf-deal-fall {
    0%   {
      transform: translateX(0) translateY(0) rotate(0deg) scale(1);
      opacity: 0;
      filter: drop-shadow(0 0 8px rgba(220,0,0,.8)) drop-shadow(0 4px 6px rgba(0,0,0,.6));
    }
    10%  {
      opacity: 1;
      filter: drop-shadow(0 0 15px rgba(220,0,0,1)) drop-shadow(0 4px 8px rgba(0,0,0,.7));
    }
    50%  {
      transform: translateX(60vw) translateY(15px) rotate(-15deg) scale(1.2);
      filter: drop-shadow(0 0 20px rgba(255,184,0,1)) drop-shadow(0 4px 10px rgba(0,0,0,.8));
    }
    100% {
      transform: translateX(110vw) translateY(30px) rotate(-20deg) scale(1);
      opacity: 0;
      filter: drop-shadow(0 0 8px rgba(220,0,0,.8)) drop-shadow(0 4px 6px rgba(0,0,0,.6));
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body.blackfriday .bf-deals .deal { animation: none; opacity: .7; }
  }

  /* ================================
     6) Particules dorées (sparkles) - Plus brillantes
     ================================ */
  @keyframes bf-float {
    0% {
      transform: translateY(0) translateX(0) scale(1);
      opacity: .6;
      box-shadow: 0 0 15px var(--bf-glow-gold);
    }
    50% {
      transform: translateY(-10px) translateX(4px) scale(1.3);
      opacity: 1;
      box-shadow: 0 0 30px var(--bf-glow-gold), 0 0 50px rgba(255,184,0,.5);
    }
    100% {
      transform: translateY(0) translateX(0) scale(1);
      opacity: .6;
      box-shadow: 0 0 15px var(--bf-glow-gold);
    }
  }
  body.blackfriday .bf-sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, var(--bf-white), var(--bf-gold) 50%, var(--bf-red) 100%);
    animation: bf-float 2s ease-in-out infinite;
    opacity: .8;
    box-shadow: 0 0 15px var(--bf-glow-gold);
  }
  @media (prefers-reduced-motion: reduce) {
    body.blackfriday .bf-sparkle { animation: none; }
  }

  /* ================================
     7) Tooltip personnalisé - Très visible
     ================================ */
  body.blackfriday .bf-tooltip { position: relative; }
  body.blackfriday .bf-tooltip::after {
    content: attr(data-tooltip);
    position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -6px);
    background: linear-gradient(135deg, var(--bf-black), var(--bf-red));
    color: var(--bf-gold);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    border: 2px solid var(--bf-gold);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow:
      0 0 20px var(--bf-glow-red),
      0 8px 20px rgba(0,0,0,.4);
    transition: opacity .2s ease, transform .2s ease;
  }
  body.blackfriday .bf-tooltip:hover::after,
  body.blackfriday .bf-tooltip:focus::after {
    opacity: 1;
    transform: translate(-50%, -12px);
  }

  /* ================================
     8) Curseur personnalisé (desktop)
     ================================ */
  @media (pointer: fine) {
    body.blackfriday { cursor: url('/images_2/black_friday_3.png') 8 8, auto; }
  }

  /* ================================
     9) Gradients de section
     ================================ */
  /* Gradient subtil mais marqué */
  body.blackfriday .bf-gradient {
    background:
      linear-gradient(to bottom, rgba(220,0,0,0.12), transparent 25%),
      linear-gradient(to top, rgba(255,184,0,0.10), transparent 25%),
      var(--bulma-body, #fff);
    color: var(--bf-black);
  }

  /* Gradient intense rouge/or - Très marqué */
  body.blackfriday .bf-gradient-intense {
    background:
      radial-gradient(800px at top center, rgba(220,0,0,0.4), transparent 65%),
      radial-gradient(800px at bottom center, rgba(255,184,0,0.3), transparent 65%),
      #0a0a0a;
    color: var(--bf-white);
    background-repeat: no-repeat;
    background-size: cover;
  }

  /* Fond noir profond avec halo rouge intense */
  body.blackfriday .bf-dark-bg {
    position: relative;
    background: var(--bf-black);
    color: var(--bf-white);
    overflow: hidden;
  }

  body.blackfriday .bf-dark-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 250px;
    pointer-events: none;
    background: radial-gradient(
      circle at top center,
      var(--bf-glow-red) 0%,
      rgba(220, 0, 0, 0.5) 30%,
      rgba(255, 184, 0, 0.2) 50%,
      transparent 80%
    );
    z-index: 0;
  }

  /* Assure que le contenu passe au-dessus */
  body.blackfriday .bf-dark-bg > * {
    position: relative;
    z-index: 1;
  }

  /* ================================
     10) Countdown skinné - Ultra visible
     ================================ */
  body.blackfriday .bf-countdown .cd__text {
    background: linear-gradient(135deg, var(--bf-black), var(--bf-red-dark));
    color: var(--bf-gold);
    font-weight: 900;
    border: 3px solid var(--bf-gold);
    box-shadow:
      0 0 20px var(--bf-glow-red),
      0 8px 25px rgba(0,0,0,.5);
  }

  /* ================================
     11) Conteneur toile animée (optionnel)
     ================================ */
  body.blackfriday .bf-web-wrap { position: relative; overflow: hidden; }

  /* Calque canvas derrière le contenu, non cliquable */
  body.blackfriday .bf-web {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
  }
  body.blackfriday .bf-web canvas {
    width: 100%; height: 100%; display: block;
  }

  /* Le contenu de la section passe devant */
  body.blackfriday .bf-web-wrap > .bf-web-content { position: relative; z-index: 1; }

  /* ================================
     12) Décor en bas de section
     ================================ */
  body.blackfriday .bf-bottom-decor {
    position: relative;
    overflow: hidden;
  }

  body.blackfriday .bf-bottom-decor::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100px;
    background: url("/images_2/black_friday_4.png") no-repeat bottom center;
    background-size: cover;
    pointer-events: none;
    z-index: 1;
  }

/* ================================
  Variante Black Friday : ambiance intense rouge/or
  ================================ */
body.blackfriday .bf-gradient-warm {
  background:
    radial-gradient(700px at top center, rgba(220, 0, 0, 0.15), transparent 70%),
    radial-gradient(700px at bottom center, rgba(255, 0, 0, 0.15), transparent 70%),
    #FAFAFA;
  color: #1a1a1a;
  background-repeat: no-repeat;
  background-size: cover;
}