/* ==========================================================================
   H-TIC — Header en mode Noël
   Appliqué par le JS sur le hero ciblé (.home-main par défaut) via .htic-xmas.
   Couleurs de la marque : bleu nuit #071434 / #0B2154, jaune #F8BC0C.
   ========================================================================== */

/* Ciel d'hiver : halo doré (lune) + lueur rouge discrète, par-dessus le dégradé Elementor */
.htic-xmas {
  position: relative;
  isolation: isolate;
  overflow: hidden !important;
  background:
    radial-gradient(ellipse 42% 55% at 84% 10%, rgba(248, 188, 12, 0.17), transparent 70%),
    radial-gradient(ellipse 65% 55% at 0% 100%, rgba(214, 40, 57, 0.18), transparent 65%),
    linear-gradient(180deg, #0B2154 0%, #071434 58%, #040b22 100%) !important;
}

/* Calque des effets (sous le contenu Elementor, qui a un z-index de 3) */
.htic-xmas-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.htic-xmas-star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
  animation: htic-xmas-twinkle 3s ease-in-out infinite;
}

@keyframes htic-xmas-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

.htic-xmas-flake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.75);
  animation: htic-xmas-fall linear infinite;
  will-change: transform;
}

@keyframes htic-xmas-fall {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(var(--drift, 16px), calc(var(--htic-xmas-h, 800px) / 2), 0); }
  100% { transform: translate3d(calc(var(--drift, 16px) * -0.6), calc(var(--htic-xmas-h, 800px) + 24px), 0); }
}

/* Congère : le hero « se pose » dans la neige */
.htic-xmas-drift {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 64px;
}

/* --------------------------------------------------------------------------
   Guirlande lumineuse
   -------------------------------------------------------------------------- */
.htic-xmas-lights {
  position: absolute;
  top: var(--htic-xmas-lights-top, 0px);
  left: 0;
  right: 0;
  height: 48px;
  z-index: 4;
  pointer-events: none;
}

.htic-xmas-lights svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  overflow: visible;
}

.htic-xmas-lights path {
  fill: none;
  stroke: #26382f;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.htic-xmas-bulb {
  position: absolute;
  top: 19px;
  width: 11px;
  height: 17px;
  margin-left: -5.5px;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), var(--c) 45%);
  transform: rotate(var(--r, 0deg));
  transform-origin: 50% -4px;
  animation: htic-xmas-glow 1.7s ease-in-out infinite alternate;
}

.htic-xmas-bulb::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 2.5px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #3b4a42;
}

@keyframes htic-xmas-glow {
  from { opacity: 0.55; box-shadow: 0 0 3px 1px var(--c); }
  to   { opacity: 1;    box-shadow: 0 0 14px 5px var(--c); }
}

/* --------------------------------------------------------------------------
   Bandeau « case du jour » au-dessus du H1
   -------------------------------------------------------------------------- */
.htic-xmas .htic-xmas-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 8px 18px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 188, 12, 0.55);
  background: rgba(248, 188, 12, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFD24D;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(248, 188, 12, 0.4);
  animation: htic-xmas-badge-pulse 2.8s ease-in-out infinite;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.htic-xmas .htic-xmas-badge:hover,
.htic-xmas .htic-xmas-badge:focus-visible {
  background: #F8BC0C;
  color: #071434;
  transform: translateY(-2px);
}

.htic-xmas-badge-ico {
  display: inline-block;
  font-size: 18px;
  animation: htic-xmas-wiggle 3.2s ease-in-out infinite;
}

.htic-xmas-badge-arrow { transition: transform 0.25s ease; }
.htic-xmas .htic-xmas-badge:hover .htic-xmas-badge-arrow { transform: translateX(4px); }

@keyframes htic-xmas-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 188, 12, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(248, 188, 12, 0); }
}

@keyframes htic-xmas-wiggle {
  0%, 80%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(-14deg); }
  90% { transform: rotate(12deg); }
  95% { transform: rotate(-6deg); }
}

/* --------------------------------------------------------------------------
   Bonnet de Noël posé sur le mot surligné du H1
   -------------------------------------------------------------------------- */
.htic-xmas .htic-xmas-hat-host { position: relative; }

.htic-xmas .htic-xmas-hat {
  position: absolute;
  left: -0.42em;
  top: -0.66em;
  width: 1.1em;
  height: 0.9em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52'%3E%3Cpath d='M9 40 C12 24 22 9 40 6 C50 4 57 10 57 20 C53 15 47 15 44 19 C40 25 39 33 40 40 Z' fill='%23d62839'/%3E%3Cpath d='M40 6 C50 4 57 10 57 20 C53 15 47 15 44 19 Z' fill='%23a91d2e'/%3E%3Crect x='4' y='36' width='42' height='12' rx='6' fill='%23ffffff'/%3E%3Ccircle cx='57' cy='22' r='6.5' fill='%23ffffff'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-16deg);
  transform-origin: 30% 90%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  animation: htic-xmas-hat 4s ease-in-out infinite;
}

/* En-tête du calendrier dans le hero : place pour le bonnet sous le badge */
.htic-xmas .htic-adv-heading .htic-adv-badge { margin-bottom: 30px; }
.htic-xmas .htic-adv-heading .htic-xmas-hat { left: -0.3em; top: -0.6em; }

@keyframes htic-xmas-hat {
  0%, 100% { transform: rotate(-16deg); }
  50%      { transform: rotate(-10deg); }
}

/* --------------------------------------------------------------------------
   Texte défilant & boutons
   -------------------------------------------------------------------------- */
.htic-xmas .txt-slide .elementor-heading-title {
  -webkit-text-stroke-color: rgba(248, 188, 12, 0.5) !important;
}

/* Neige posée sur les boutons du hero */
.htic-xmas .btn-up .elementor-button {
  position: relative;
  overflow: visible;
}

.htic-xmas .btn-up .elementor-button::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 7%;
  right: 7%;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M1,9 C1,3 5,1 12,1 L88,1 C95,1 99,3 99,9 C99,11 96,11 94,10 C91,15 86,15 84,10 C76,11 69,11 63,10 C60,16 54,16 52,10 C41,11 30,11 21,10 C18,14 13,14 11,10 C6,11 1,11 1,9 Z' fill='%23ffffff'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px rgba(7, 20, 52, 0.3));
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Mobile & accessibilité
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .htic-xmas-drift { height: 38px; }
  .htic-xmas .htic-xmas-badge { font-size: 13px; padding: 7px 14px 7px 10px; }
  .htic-xmas-lights { transform: scale(0.85); transform-origin: top center; }
  /* Titre collé au bord sur mobile : le bonnet reste à l'intérieur */
  .htic-xmas .htic-xmas-hat { left: -0.08em; top: -0.72em; width: 0.95em; height: 0.78em; }
}

@media (prefers-reduced-motion: reduce) {
  .htic-xmas-star,
  .htic-xmas-bulb,
  .htic-xmas .htic-xmas-badge,
  .htic-xmas-badge-ico,
  .htic-xmas .htic-xmas-hat { animation: none; }
  .htic-xmas-flake { display: none; }
}
