/* =============================================================
   atlas-edn · BRIQUE B — pastille score onglet
   ============================================================= */

/* Badge dans .tab */
.tab-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #cbd5e0;
  border: 1.5px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
  vertical-align: middle;
}
.tab-score:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.tab-score:focus-visible {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

/* Couleurs par état */
.tab-score.is-ok      { background: #38a169; }   /* vert */
.tab-score.is-partial { background: #dd6b20; }   /* orange */
.tab-score.is-redo    { background: #e53e3e; }   /* rouge */
.tab-score.is-empty   { background: #cbd5e0; color: #4a5568; } /* gris */

/* Override = liseré pointillé pour distinguer du calcul auto */
.tab-score.is-override {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.85);
}
.tab-score.is-empty.is-override {
  border-color: #4a5568;
}

/* Popover */
.tab-score-popover {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  font-size: 13px;
}
.tab-score-popover__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  color: #2d3748;
  transition: background 100ms ease;
}
.tab-score-popover__btn:hover {
  background: #f7fafc;
}
.tab-score-popover__btn::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.tab-score-popover__btn.is-ok::before      { background: #38a169; }
.tab-score-popover__btn.is-partial::before { background: #dd6b20; }
.tab-score-popover__btn.is-redo::before    { background: #e53e3e; }
.tab-score-popover__btn.is-auto::before    { background: #cbd5e0; border: 1.5px dashed #4a5568; box-sizing: border-box; }

/* Dark mode */
body.dark-mode .tab-score.is-empty   { background: #4a5568; color: #cbd5e0; }
body.dark-mode .tab-score.is-ok      { background: #48bb78; }
body.dark-mode .tab-score.is-partial { background: #ed8936; }
body.dark-mode .tab-score.is-redo    { background: #fc8181; }
body.dark-mode .tab-score.is-override { border-color: rgba(255, 255, 255, 0.7); }
body.dark-mode .tab-score.is-empty.is-override { border-color: #cbd5e0; }

body.dark-mode .tab-score-popover {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}
body.dark-mode .tab-score-popover__btn         { color: #e2e8f0; }
body.dark-mode .tab-score-popover__btn:hover   { background: #4a5568; }
body.dark-mode .tab-score-popover__btn.is-auto::before { border-color: #cbd5e0; background: #4a5568; }
