/* ── Icônes science animées ────────────────────────────────── */

/* Wrapper = lien cliquable autour de l'icône */
a.sci-wrap {
  position: relative;
  display: inline-block;
  margin-left: 1vw;
  text-decoration: none;
  vertical-align: middle;
}

.sci-icon {
  display: inline-block;
  width: 3.2375vw;
  height: 2.59vw;
  min-width: 28px;
  min-height: 22px;
  vertical-align: middle;
  filter: drop-shadow(0 0 5px rgba(99,179,237,0.35));
  transition: filter 0.25s, transform 0.25s;
}

.sci-icon svg {
  width: 100%;
  height: 100%;
}

/* Hover sur le wrapper → agrandit l'icône */
a.sci-wrap:hover .sci-icon {
  filter: drop-shadow(0 0 14px rgba(99,179,237,0.9));
  transform: scale(1.3);
}

/* ── Tooltip ───────────────────────────────────────────────── */
.sci-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(8, 16, 42, 0.93);
  color: #e2e8f0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 5px 13px;
  border-radius: 8px;
  border: 1px solid rgba(99,179,237,0.5);
  box-shadow: 0 0 10px rgba(99,179,237,0.18), 0 4px 18px rgba(0,0,0,0.65);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

/* Petite flèche pointant vers l'icône */
.sci-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(99,179,237,0.5);
}

/* Affichage au survol */
a.sci-wrap:hover .sci-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Tooltip vers le bas dans les level-unit ───────────────── */
.level-unit .sci-tip {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-6px);
}

.level-unit .sci-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(99,179,237,0.5);
}

a.sci-wrap:hover .level-unit .sci-tip,
.level-unit a.sci-wrap:hover .sci-tip {
  transform: translateX(-50%) translateY(0);
}

/* ── Hover sur les boutons de niveaux ──────────────────────── */

/* Livre (manuel) */
a.btn.sci-wrap {
  position: relative;
}

.book-icon {
  transition: transform 0.25s, filter 0.25s;
}

a.btn.sci-wrap:hover .book-icon {
  transform: scale(1.25);
  filter: drop-shadow(0 0 12px rgba(99,179,237,0.85));
}

/* Cube (cours) — pas de hover tooltip ni d'accélération */
a.cube-link.sci-wrap {
  position: relative;
}

a.cube-link.sci-wrap .sci-tip {
  display: none;
}

a.cube-link.sci-wrap:hover .cube-3d {
  /* pas d'accélération pour éviter le saut de rotation */
}
