/* ==========================================================================
   Thème "Maison en pain d'épice & Sucre d'orge" (BEM)
   ========================================================================== */

/* Fond ciel étoilé animé */
.sky-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(245, 194, 73, 0.12) 0%, transparent 38%),
    radial-gradient(circle at 82% 14%, rgba(255, 250, 242, 0.09) 0%, transparent 34%),
    radial-gradient(2px 2px at 12% 24%, rgba(255, 250, 242, 0.8), transparent),
    radial-gradient(2px 2px at 34% 12%, rgba(255, 226, 138, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 58% 19%, rgba(255, 250, 242, 0.75), transparent),
    radial-gradient(2px 2px at 76% 28%, rgba(255, 226, 138, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 90% 16%, rgba(255, 250, 242, 0.7), transparent),
    radial-gradient(2px 2px at 18% 66%, rgba(255, 250, 242, 0.55), transparent),
    radial-gradient(2px 2px at 85% 62%, rgba(255, 226, 138, 0.55), transparent);
}

/* Bordure Sucre d'orge CSS pure */
.candy-border {
  padding: 9px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: repeating-linear-gradient(
    45deg,
    var(--color-candy-red) 0 11px,
    var(--color-icing) 11px 22px
  );
  box-shadow: var(--shadow-card);
}

.gingerbread-surface {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffdf8 0%, var(--color-icing-soft) 100%);
  color: var(--color-text);
  border: 2px solid rgba(133, 70, 33, 0.25);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), inset 0 -6px 14px rgba(133, 70, 33, 0.08);
}

/* Glaçage royal décoratif en haut d'une carte */
.icing-trim {
  height: 14px;
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    radial-gradient(circle at 12px 0, var(--color-icing) 11px, transparent 12px) 0 0 / 24px 14px repeat-x;
  filter: drop-shadow(0 2px 2px rgba(87, 42, 18, 0.16));
}

/* Guirlande lumineuse animée */
.garland {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
  overflow: hidden;
}

.garland__wire {
  position: absolute;
  top: 4px;
  left: -2%;
  right: -2%;
  height: 10px;
  border-bottom: 2px solid rgba(255, 250, 242, 0.35);
  border-radius: 50%;
}

.garland__bulb {
  position: relative;
  width: 10px;
  height: 14px;
  margin-top: 5px;
  border-radius: 50% 50% 45% 45%;
  animation: garland-twinkle 2.4s ease-in-out infinite;
}

.garland__bulb::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #2f3b35;
}

.garland__bulb--red {
  background: #ff4d5a;
  filter: drop-shadow(0 0 6px rgba(255, 77, 90, 0.9));
  animation-delay: 0s;
}

.garland__bulb--gold {
  background: #ffd15c;
  filter: drop-shadow(0 0 6px rgba(255, 209, 92, 0.95));
  animation-delay: 0.6s;
}

.garland__bulb--emerald {
  background: #3be095;
  filter: drop-shadow(0 0 6px rgba(59, 224, 149, 0.85));
  animation-delay: 1.2s;
}

.garland__bulb--cream {
  background: #fff4d2;
  filter: drop-shadow(0 0 6px rgba(255, 244, 210, 0.9));
  animation-delay: 1.8s;
}

@keyframes garland-twinkle {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* Boutons BEM */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--sm {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 0.8rem;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-pine-light), var(--color-pine));
  color: var(--color-icing);
  border-color: rgba(255, 250, 242, 0.35);
  box-shadow: 0 6px 16px rgba(10, 35, 25, 0.35);
}

.btn--candy {
  background: linear-gradient(135deg, #db2c3d, var(--color-candy-red-dark));
  color: var(--color-icing);
  border-color: var(--color-icing);
  box-shadow: 0 6px 18px rgba(151, 23, 36, 0.42);
}

.btn--gold {
  background: linear-gradient(135deg, var(--color-gold-bright), #e6a825);
  color: var(--color-text);
  border-color: #fff6dc;
  box-shadow: 0 6px 16px rgba(230, 168, 37, 0.35);
}

.btn--ghost {
  background: rgba(255, 250, 242, 0.12);
  color: var(--color-icing);
  border-color: rgba(255, 250, 242, 0.28);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 250, 242, 0.2);
}
