/* Dashboard - objectifs et conversions */

.dash-objectives {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--tt-border);
  border-radius: 12px;
  background: var(--tt-surface);
  box-shadow: var(--tt-shadow-1);
}

.dash-objectives > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dash-objectives > header strong {
  display: block;
  color: var(--tt-fg);
  font-size: 14px;
}

.dash-objectives > header em {
  color: var(--tt-fg-3);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.dash-objective-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dash-objective-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tt-border);
  border-radius: 10px;
  background: var(--tt-surface-2);
}

.dash-objective-card span,
.dash-objective-card em,
.dash-objective-card small {
  display: block;
}

.dash-objective-card span {
  color: var(--tt-fg-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dash-objective-card strong {
  display: block;
  margin-top: 3px;
  color: var(--tt-fg);
  font-size: 22px;
  line-height: 1;
}

.dash-objective-card em {
  margin-top: 4px;
  color: var(--tt-fg-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.dash-objective-card small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--tt-fg-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-objective-ring {
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}

.dash-objective-ring text {
  transform: rotate(90deg);
  transform-origin: center;
  fill: var(--tt-fg);
  font-family: var(--tt-font-mono, ui-monospace);
  font-size: 11px;
  font-weight: 700;
}

.dash-ring-track,
.dash-ring-value {
  fill: none;
  stroke-width: 5;
}

.dash-ring-track {
  stroke: var(--tt-surface-3);
}

.dash-ring-value {
  stroke: var(--tt-accent);
  stroke-linecap: round;
}

.dash-objective-card.is-success .dash-ring-value { stroke: var(--tt-success); }
.dash-objective-card.is-warn .dash-ring-value { stroke: var(--tt-warn); }
.dash-objective-card.is-danger .dash-ring-value { stroke: var(--tt-danger); }

@media (max-width: 1100px) {
  .dash-objective-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dash-objectives > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dash-objective-grid {
    grid-template-columns: 1fr;
  }
}
