/* On Fait Quoi Demain — V241.62
   Communes : autocomplétion mobile compacte et lisible.
   Aucun changement de logique, de recherche ni de données.
*/

@media (max-width: 600px) {
  body.ofqd-communes-directory-page-v24162 .ofqd-communes-input-wrap-v76 {
    position: relative !important;
    z-index: 40 !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 {
    position: absolute !important;
    z-index: 4000 !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 210px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
    padding: 4px !important;
    border: 1px solid #d7e3f2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 44, 100, .16) !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76[hidden] {
    display: none !important;
  }

  /* Neutralise les styles globaux de boutons qui transformaient les
     suggestions en gros pavés bleus. */
  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #102a59 !important;
    box-shadow: none !important;
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button + button {
    margin-top: 2px !important;
    border-top: 1px solid #eef3f8 !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button:hover,
  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button:focus,
  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button.is-active {
    background: #edf5ff !important;
    color: #0b2c68 !important;
    outline: none !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 > button > span:first-child {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 strong,
  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 small {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 strong {
    color: #102a59 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 small {
    margin-top: 2px !important;
    color: #66768f !important;
    font-size: 10px !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 .ofqd-v76-postal {
    display: block !important;
    flex: none !important;
    color: #58708f !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  body.ofqd-communes-directory-page-v24162 .ofqd-communes-suggestions-v76 .ofqd-v76-empty {
    padding: 9px 10px !important;
    color: #66768f !important;
    background: #fff !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
}
