/**
 * Barre de navigation basse My Best Réseau — commune à toutes les applications
 * Orbe central animé (Moob)
 */

body.has-mbr-taskbar {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.mbr-taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: 0.35rem 0.5rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

.mbr-taskbar__inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.15rem;
}

.mbr-taskbar__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: 0.35rem 0.2rem 0.25rem;
  min-height: 52px;
  border-radius: 12px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mbr-taskbar__item i {
  font-size: 1.2rem;
  line-height: 1;
}

.mbr-taskbar__item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mbr-taskbar__item:hover {
  color: #cbd5e1;
}

.mbr-taskbar__item--active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.18);
}

/* ——— Orbe central Moob ——— */
.mbr-taskbar__orb-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem 0.15rem;
  margin-top: -1.35rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mbr-taskbar__orb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 4px 24px rgba(99, 91, 255, 0.45),
    0 0 40px rgba(14, 165, 233, 0.25);
  animation: mbr-orb-float 4s ease-in-out infinite;
}

.mbr-taskbar__orb-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #38bdf8,
    #818cf8,
    #c084fc,
    #f472b6,
    #fb923c,
    #fbbf24,
    #34d399,
    #38bdf8
  );
  animation: mbr-orb-spin 10s linear infinite;
  opacity: 0.95;
}

.mbr-taskbar__orb-mid {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 25%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 62%
  );
  animation: mbr-orb-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.mbr-taskbar__orb-core {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 35%,
    rgba(255, 255, 255, 0.35),
    rgba(120, 180, 255, 0.25) 45%,
    rgba(99, 91, 255, 0.5) 100%
  );
  filter: blur(0.5px);
  animation: mbr-orb-core 5s ease-in-out infinite;
  pointer-events: none;
}

.mbr-taskbar__orb-blobs {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}

.mbr-taskbar__orb-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.85;
  mix-blend-mode: screen;
}

.mbr-taskbar__orb-blob--a {
  width: 70%;
  height: 70%;
  left: -5%;
  top: 10%;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  animation: mbr-blob-a 6s ease-in-out infinite;
}

.mbr-taskbar__orb-blob--b {
  width: 65%;
  height: 65%;
  right: -8%;
  bottom: 0;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  animation: mbr-blob-b 7s ease-in-out infinite;
}

.mbr-taskbar__orb-blob--c {
  width: 55%;
  height: 55%;
  left: 22%;
  bottom: -5%;
  background: radial-gradient(circle, #fb7185 0%, transparent 70%);
  animation: mbr-blob-c 5.5s ease-in-out infinite;
}

@keyframes mbr-orb-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mbr-orb-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes mbr-orb-pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes mbr-orb-core {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}

@keyframes mbr-blob-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(8px, -6px) scale(1.08);
  }
  66% {
    transform: translate(-4px, 4px) scale(0.95);
  }
}

@keyframes mbr-blob-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-10px, -8px) scale(1.1);
  }
}

@keyframes mbr-blob-c {
  0%,
  100% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(6px, 8px);
  }
  80% {
    transform: translate(-6px, -4px);
  }
}

/* Thème clair (pages avec fond clair) */
body.mbr-taskbar--light .mbr-taskbar {
  background: rgba(255, 255, 255, 0.82);
  border-top-color: rgba(100, 62, 235, 0.15);
  box-shadow: 0 -8px 32px rgba(100, 62, 235, 0.1);
}

body.mbr-taskbar--light .mbr-taskbar__item {
  color: #64748b;
}

body.mbr-taskbar--light .mbr-taskbar__item:hover {
  color: #475569;
}

body.mbr-taskbar--light .mbr-taskbar__item--active {
  color: #643eeb;
  background: rgba(100, 62, 235, 0.12);
}

@media (min-width: 1024px) {
  .mbr-taskbar__inner {
    max-width: 560px;
  }
}
