/* MYLOCALEXPLORE 2.4.93 — Explorer, variante 2 retenue : capsules horizontales iOS.
   Le style se limite aux liens de l'accueil; les catégories et leurs URLs ne changent pas. */

#root div:has(> a[data-testid^="shortcut-"]) {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 11px;
  padding: 6px 5px 16px 3px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 3px;
  scrollbar-width: none;
}
#root div:has(> a[data-testid^="shortcut-"])::-webkit-scrollbar { display: none; }

#root a[data-testid^="shortcut-"] {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  gap: 11px;
  width: 214px;
  min-width: 214px;
  max-width: 248px;
  min-height: 68px;
  height: 68px;
  padding: 8px 17px 8px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #152238;
  background: linear-gradient(130deg,#fff 0%,#fff 67%,#fafcff 100%);
  box-shadow: 0 2px 5px rgba(27,45,77,.035), 0 8px 18px rgba(27,45,77,.055);
  text-decoration: none;
  text-align: left;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-x;
  user-select: none;
  transition: transform .18s cubic-bezier(.2,.75,.2,1), background-color .18s ease,
              border-color .18s ease, box-shadow .18s ease;
}
#root a[data-testid="shortcut-loisirs"] { width: 235px; min-width: 235px; }

#root a[data-testid^="shortcut-"] > span:first-child {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.72);
  font-size: 23px;
  line-height: 1;
}
#root a[data-testid^="shortcut-"] > span:last-child {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  overflow-wrap: normal;
  hyphens: none;
  color: #142238;
  font-size: 13px;
  line-height: 1.23;
  font-weight: 720;
  letter-spacing: -.014em;
  text-align: left;
  text-wrap: balance;
}
/* Chevrons purement décoratifs : toute la capsule reste un seul lien. */
#root a[data-testid^="shortcut-"]::after {
  content: '';
  display: block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-top: 2px solid #94a3b8;
  border-right: 2px solid #94a3b8;
  transform: rotate(45deg);
  margin-right: 1px;
  pointer-events: none;
}

#root a[data-testid="shortcut-restaurant"] > span:first-child { background: #f3e8ff; color: #7c3aed; }
#root a[data-testid="shortcut-randonnee"] > span:first-child { background: #ffedd5; color: #c2410c; }
#root a[data-testid="shortcut-location"] > span:first-child { background: #dbeafe; color: #1d4ed8; }
#root a[data-testid="shortcut-loisirs"] > span:first-child { background: #e0e7ff; color: #4338ca; }
#root a[data-testid="shortcut-plage"] > span:first-child { background: #ccfbf1; color: #0f766e; }
#root a[data-testid="shortcut-bien_etre"] > span:first-child { background: #fef3c7; color: #b45309; }

@media (hover: hover) and (pointer: fine) {
  #root a[data-testid^="shortcut-"]:hover {
    transform: translateY(-2px);
    background: #f8fbff;
    border-color: #cad9ec;
    box-shadow: 0 6px 18px rgba(30,58,100,.09);
  }
}
#root a[data-testid^="shortcut-"]:active {
  transform: scale(.975);
  background: #edf5ff;
  border-color: #b5d2ff;
  box-shadow: 0 2px 8px rgba(30,58,100,.07);
}
#root a[data-testid^="shortcut-"]:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* Mobile : les catégories suivantes restent légèrement visibles et invitent à glisser. */
@media (max-width: 639.98px) {
  #root div:has(> a[data-testid^="shortcut-"]) {
    gap: 10px;
    padding: 5px 3px 13px 2px;
  }
  #root a[data-testid^="shortcut-"] {
    width: 156px;
    min-width: 156px;
    max-width: 208px;
    min-height: 62px;
    height: 62px;
    padding: 7px 11px 7px 8px;
    gap: 6px;
  }
  #root a[data-testid="shortcut-loisirs"] { width: 197px; min-width: 197px; }
  #root a[data-testid^="shortcut-"] > span:first-child {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    flex-basis: 38px;
    font-size: 19px;
  }
  #root a[data-testid^="shortcut-"] > span:last-child { font-size: 11.5px; }
}
@media (max-width: 359.98px) {
  #root a[data-testid^="shortcut-"] { width: 150px; min-width: 150px; padding-right: 9px; }
  #root a[data-testid="shortcut-loisirs"] { width: 190px; min-width: 190px; }
  #root a[data-testid^="shortcut-"] > span:last-child { font-size: 11px; }
}

/* Accueil : vignette logement plus compacte, tout le cadre reste cliquable. */
#root a[data-testid="housing-card"] {
  min-width: 0;
  min-height: 0;
  padding: 12px 13px;
  gap: 12px;
  border-radius: 24px;
}
#root a[data-testid="housing-card"] > img {
  width: 62px;
  min-width: 62px;
  height: 62px;
  min-height: 62px;
  border-radius: 17px;
  object-fit: cover;
}
#root [data-testid="housing-card-name"] { font-size: 15px; line-height: 1.25; }
#root [data-testid="housing-card-public"] {
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
}
@media (max-width: 359.98px) {
  #root a[data-testid="housing-card"] { padding: 10px; gap: 10px; }
  #root a[data-testid="housing-card"] > img { width: 56px; min-width: 56px; height: 56px; min-height: 56px; }
}

/* Cohérence des appels à l'action publics : rendu en pilule, sans toucher aux formulaires. */
#root [data-testid^="home-offer-open-"],
#root [data-testid^="offer-card-open-"],
#root [data-testid="for-you-now-offer-button"] {
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

/* 2.4.93 : évitement des raccourcis par le bouton MyAssistant, géré par JS. */
#mle-myassistant.mle-ma-avoid-category:not(.mle-ma-open) .mle-ma-trigger {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #root a[data-testid^="shortcut-"] { transition: none; }
  #root a[data-testid^="shortcut-"]:hover,
  #root a[data-testid^="shortcut-"]:active { transform: none; }
}
