/* ==========================================================================
   Statistiques présentées comme une fiche App Store
   ========================================================================== */

.app-store {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px;
  padding: 22px;
}

/* ---- En-tête : icône, nom, bouton « Obtenir » ---- */
.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  flex: none;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--color-fg) 22%, transparent));
}

.app-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.app-icon .logo-bg {
  fill: var(--color-fg);
}

.app-icon .logo-glyph {
  fill: var(--color-bg);
}

.app-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.app-info b {
  font: 700 18px/1.15 var(--font-sans);
  letter-spacing: -0.02em;
}

.app-info > span {
  color: var(--color-muted);
  font-size: 12.5px;
}

.app-get {
  margin-top: 6px;
  padding: 5px 18px;
  border-radius: 99px;
  background: var(--color-system-blue);
  color: #fff;
  font: 700 12px var(--font-sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s;
}

.app-get:hover {
  background: #0071e3;
}

/* ---- Bandeau de statistiques défilant ---- */
.app-stats {
  display: flex;
  margin: 0 -22px;
  padding: 12px 22px;
  overflow-x: auto;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 22px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.app-stats::-webkit-scrollbar {
  display: none;
}

.app-stats > div {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 92px;
  padding: 0 12px;
  border-left: 1px solid var(--color-line);
  text-align: center;
  scroll-snap-align: start;
}

.app-stats > div:first-child {
  min-width: 80px;
  padding-left: 0;
  border-left: 0;
}

.app-stats em {
  color: var(--color-muted);
  font: 600 9.5px var(--font-sans);
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.app-stats b {
  color: color-mix(in srgb, var(--color-fg) 80%, transparent);
  font: 700 22px/1 var(--font-sans);
  letter-spacing: -0.03em;
}

.app-stats small {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-height: 15px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

/* Mini histogramme : durée de chaque mission */
.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.mini-bars i {
  width: 3px;
  height: calc(var(--bar-height) * 12px + 2px);
  border-radius: 1px;
  background: var(--color-muted);
}

/* ---- Nouveautés ---- */
.whats-new-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.whats-new-header b {
  font: 700 15px var(--font-sans);
}

.version-history {
  color: var(--color-system-blue);
  font-size: 12.5px;
  text-decoration: none;
}

.version-history:hover {
  text-decoration: underline;
}

.whats-new-meta {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 6px;
  color: var(--color-muted);
  font-size: 11.5px;
}

.whats-new p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .app-store {
    grid-column: span 12;
  }
}
