.applications-main {
  width: min(100% - 2rem, 1270px);
  margin-inline: auto;
}

/* Sur la page Téléchargement, les trois boutiques remplacent les deux lignes
   habituelles du menu. Google Play et l’App Store ouvrent les guides bêta ;
   Microsoft Store propose les deux applications Windows. */
.applications-page .header-navigation {
  display: none;
}

.download-store-navigation {
  grid-column: 2;
  grid-row: 1 / 3;
  height: 56px;
  align-self: stretch;
  display: flex;
  align-items: center;
  overflow: visible;
  gap: 0.5rem;
}

.download-store-control {
  position: relative;
  width: auto;
  min-width: 0;
  height: 56px;
  flex: 0 1 auto;
}

.download-store-navigation .download-store-button {
  width: auto;
  height: 56px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #142033;
  text-decoration: none;
  overflow: hidden;
}

.download-store-navigation .download-store-button:hover,
.download-store-navigation .download-store-button:focus-visible,
.download-store-menu[open] > .download-store-button {
  color: #142033;
  background: transparent;
  box-shadow: 0 0 0 3px #ffbf47;
}

.download-store-badge {
  display: block;
  width: auto;
  max-width: none;
  height: 52px;
  object-fit: contain;
}

.download-store-badge-google {
  height: 68px;
  margin-block: -8px;
}

.store-program-icon,
.download-option-icon {
  display: block;
  width: auto;
  object-fit: cover;
}

.download-store-menu > summary {
  list-style: none;
  cursor: pointer;
}

.download-store-menu > summary::-webkit-details-marker {
  display: none;
}

.download-store-options {
  position: absolute;
  z-index: 500;
  top: calc(100% + 7px);
  right: 0;
  width: max-content;
  min-width: 250px;
  padding: 6px;
  border: 1px solid #27313f;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgb(20 32 51 / 24%);
}

.download-store-options a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: 5px;
  color: #142033;
  text-decoration: none;
  white-space: nowrap;
}

.download-store-options a:hover,
.download-store-options a:focus-visible {
  background: #0867dc;
  color: #ffffff;
}

.download-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.download-store-options strong {
  font-weight: 800;
}

.applications-hero {
  margin-bottom: 1rem;
}

.applications-hero h1,
.application-card h2 {
  margin-top: 0;
}

.applications-hero .lead {
  max-width: 78ch;
  margin-bottom: 0;
}

.applications-intro-highlight {
  display: inline;
  padding: 0.06em 0.35em 0.1em;
  border-radius: 0.2em;
  background: #ffe066;
  color: #10233f;
  font-weight: 800;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.applications-list {
  display: grid;
  gap: 1rem;
}

.application-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem 1.5rem;
}

.application-card > :not(.store-badge-list) {
  grid-column: 1;
}

.application-audience {
  margin: 0;
  color: #526276;
  font-weight: 700;
}

.application-card h2,
.application-card p,
.application-benefits {
  margin-bottom: 0;
}

.application-benefits {
  padding-left: 1.4rem;
}

.application-benefits li + li {
  margin-top: 0.35rem;
}

.store-badge-list {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: flex;
  flex-wrap: wrap;
  align-self: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.store-badge-button {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  text-decoration: none;
}

.store-badge-button:hover,
.store-badge-button:focus-visible {
  background: transparent;
  box-shadow: 0 0 0 3px #ffbf47;
}

.store-badge-image {
  display: block;
  width: auto;
  height: 48px;
  max-width: 190px;
  object-fit: contain;
}

.store-program-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 7px 0 0 7px;
}

.mobile-downloads {
  flex-direction: column;
  max-width: 22rem;
  gap: 1rem;
}

.store-badge-image.google-play-badge {
  /* The standard PNG includes clear space around the badge artwork. */
  height: 62px;
  margin-block: -7px;
}

.application-download-label {
  display: block;
  max-width: 24ch;
  font-weight: 700;
}

@media (max-width: 640px), (max-height: 360px) {
  .applications-page .header-main,
  .applications-page.has-header-secondary .header-main {
    grid-template-rows: 34px 30px 30px 56px;
  }

  .download-store-navigation {
    --download-mobile-unit: clamp(20px, 6.4vw, 32px);
    grid-column: 1 / -1;
    grid-row: 4;
    width: 100%;
    height: 56px;
    gap: 4px;
    justify-content: space-between;
    overflow-x: visible;
    overflow-y: visible;
  }

  .download-store-control {
    width: auto;
    height: 56px;
    flex: 0 0 auto;
  }

  .download-store-navigation .download-store-button {
    width: auto;
    height: 56px;
    min-height: 56px;
    padding-inline: 0;
    justify-content: center;
  }

  .download-store-badge {
    width: auto;
    height: var(--download-mobile-unit);
    max-height: var(--download-mobile-unit);
  }

  .download-store-badge-google {
    height: calc(var(--download-mobile-unit) * 1.31);
    max-height: none;
    margin-block: calc(var(--download-mobile-unit) * -0.155);
  }
}

@media (max-width: 760px) {
  .application-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-badge-list {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    margin-top: 0.4rem;
  }

  .mobile-downloads {
    max-width: 100%;
    align-self: start;
  }
}
