/* ==========================================================
   DECSI – Bulles de technologies (section Expertise)
   Thème sombre par défaut, surcharge pour html[data-theme="light"]
   ========================================================== */

.bubbles {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.2rem 0 0;
  padding: 0;
}

.bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem .55rem .9rem;
  border-radius: 999px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: default;

  /* sombre */
  color: #ece7f7;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(34, 245, 232, .32);
  box-shadow: 0 0 0 0 rgba(34, 245, 232, 0);
  transition: transform .25s ease, box-shadow .25s ease,
              border-color .25s ease, background .25s ease;
  animation: bubble-float 5s ease-in-out infinite;
}

/* petit point dégradé, rappel du D du logo */
.bubble::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c010c8, #22f5e8);
  flex: none;
}

.bubble:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(192, 16, 200, .7);
  background: rgba(192, 16, 200, .12);
  box-shadow: 0 8px 22px rgba(192, 16, 200, .28), 0 0 18px rgba(34, 245, 232, .18);
  animation-play-state: paused;
}

/* léger flottement décalé pour un rendu organique */
.bubble:nth-child(2n)  { animation-delay: -1.2s; animation-duration: 5.6s; }
.bubble:nth-child(3n)  { animation-delay: -2.4s; animation-duration: 4.6s; }
.bubble:nth-child(4n)  { animation-delay: -3.3s; animation-duration: 6s; }

@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ---------------- MODE CLAIR ---------------- */
html[data-theme="light"] .bubble {
  color: #1c1130;
  background: #ffffff;
  border: 1px solid rgba(122, 8, 166, .22);
  box-shadow: 0 4px 12px rgba(122, 8, 166, .08);
}

html[data-theme="light"] .bubble::before {
  background: linear-gradient(135deg, #c010c8, #0a9f96);
}

html[data-theme="light"] .bubble:hover {
  color: #7a08a6;
  border-color: #c010c8;
  background: #fbf3fd;
  box-shadow: 0 10px 24px rgba(192, 16, 200, .2);
}

/* Accessibilité : pas d'animation si l'utilisateur la désactive */
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; transition: none; }
  .bubble:hover { transform: none; }
}
