/* Recherche mobile du thème agency (public/themes/agency/js/tl-mobile-search.js).
   ≤ 767 px : barre de résumé à la place du moteur ; au toucher, moteur en plein écran. Bureau : inchangé. */
.tl-msearch__bar, .tl-msearch__head{ display: none; }

@media (max-width: 767px){
  .tl-msearch .tl-msearch__bar{
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 12px 16px; border: 0; border-radius: 999px; background: #fff; color: #1f2633;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18); text-align: start; cursor: pointer;
  }
  .tl-msearch .tl-msearch__bar:focus-visible{ outline: 3px solid var(--main-color, #e8483b); outline-offset: 2px; }
  .tl-msearch__barIcon{
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--main-color, #e8483b); color: #fff;
  }
  .tl-msearch__barText{ display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
  .tl-msearch__barText strong{ font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tl-msearch__barText span{ font-size: 12.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tl-msearch__barText span:empty{ display: none; }

  /* Fermé : le moteur complet est masqué (seule la barre reste) */
  .tl-msearch .tl-msearch__panel{ display: none; }

  /* Ouvert : plein écran */
  html.tl-msearch-lock, html.tl-msearch-lock body{ overflow: hidden; }
  .tl-msearch.is-open{ position: fixed; inset: 0; z-index: 99990; margin: 0 !important; padding: 0 !important; background: #fff; }
  .tl-msearch.is-open .tl-msearch__panel{
    display: flex; flex-direction: column; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: #fff; overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .tl-msearch.is-open .tl-msearch__head{
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
    background: #fff; border-bottom: 1px solid #e8eaef; font-size: 17px; color: #1f2633;
  }
  .tl-msearch__close{
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f5f6f9; color: #1f2633;
    font-size: 26px; line-height: 1; cursor: pointer;
  }
  /* Onglets des moteurs : une ligne qui défile horizontalement */
  .tl-msearch.is-open .builder-search-tabs{
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 12px -16px 14px !important; padding: 2px 16px 6px;
    scrollbar-width: none;
  }
  .tl-msearch.is-open .builder-search-tabs::-webkit-scrollbar{ display: none; }
  .tl-msearch.is-open .builder-search-tab-btn{ flex: 0 0 auto; white-space: nowrap; }
  .tl-msearch.is-open .builder-search-panes{ flex: 1; padding-top: 4px; }
  /* Formulaires sur une colonne, bouton de recherche toujours visible en bas */
  .tl-msearch.is-open .builder-search-pane form{ background: transparent !important; box-shadow: none !important; padding: 0 !important; }
  .tl-msearch.is-open .builder-search-pane button[type="submit"]{
    position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 2; width: 100%;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px){
  .tl-msearch.is-open .tl-msearch__panel{ animation: tl-msearch-in .2s ease-out; }
  @keyframes tl-msearch-in{ from{ transform: translateY(16px); opacity: .6; } to{ transform: none; opacity: 1; } }
}

/* ── Panneaux voyageurs et destinations (tl-search-sheets.js) ─────────────────────────────────── */
.tl-sheet__head{ display: none; }
.tl-sheet__foot{ padding-top: 12px; margin-top: 8px; border-top: 1px solid #e8eaef; }
.tl-sheet__confirm{
  width: 100%; padding: 12px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--main-color, #e8483b); color: #fff; font-weight: 700; font-size: 15px;
}
.tl-sheet__confirm:focus-visible, .tl-sheet__close:focus-visible{ outline: 3px solid var(--main-color, #e8483b); outline-offset: 2px; }
.tl-sheet__close{
  width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; background: #f5f6f9; color: #1f2633;
  font-size: 26px; line-height: 1; cursor: pointer;
}
html.tl-sheet-lock, html.tl-sheet-lock body{ overflow: hidden; }
html.tl-sheet-lock .pac-container{ z-index: 1000002 !important; } /* suggestions d'adresse Google au-dessus */

@media (max-width: 767px){
  /* Panneau voyageurs ouvert : plein écran */
  .tl-sheet{
    position: fixed !important; inset: 0 !important; z-index: 99996 !important; width: auto !important; max-width: none !important;
    max-height: none !important; margin: 0 !important; border-radius: 0 !important; transform: none !important;
    display: flex !important; flex-direction: column; overflow-y: auto; background: #fff !important;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important; box-shadow: none !important;
  }
  .tl-sheet .tl-sheet__head, .tl-place .tl-sheet__head{
    display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 2;
    margin: 0 -16px 8px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
    background: #fff; border-bottom: 1px solid #e8eaef; font-size: 17px; color: #1f2633;
  }
  .tl-sheet .tl-sheet__foot{
    position: sticky; bottom: 0; margin: auto -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #e8eaef;
  }

  /* Destination : champ en haut, suggestions en dessous */
  .tl-place{
    position: fixed; inset: 0; z-index: 99997; display: flex; flex-direction: column; background: #fff;
    padding: 0 16px;
  }
  .tl-place__field input{
    width: 100% !important; font-size: 17px !important; padding: 14px 16px !important; margin: 4px 0 8px !important;
    border: 2px solid var(--main-color, #e8483b) !important; border-radius: 14px !important; background: #fff !important;
    color: #1f2633 !important; text-indent: 0 !important;
  }
  .tl-place__list{ flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
  .tl-place__list *{ position: static !important; max-height: none !important; box-shadow: none !important; }
  .tl-place__list ul, .tl-place__list > div{ width: 100% !important; border: 0 !important; margin: 0 !important; }
  .tl-place .tl-sheet__foot{
    margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e8eaef;
  }
}
@media (max-width: 767px){
  /* Suggestions déplacées hors de leur moteur : présentation de base lisible */
  .tl-place__list li, .tl-place__list [class*="item"]{
    display: flex; align-items: center; gap: 10px; padding: 12px 4px !important; border-bottom: 1px solid #eef0f4;
    cursor: pointer; list-style: none; font-size: 15px; color: #1f2633;
  }
}
/* Recherches récentes (écran destination, tl-search-sheets.js) */
.tl-place__recent{ display: flex; flex-direction: column; margin: 0 -16px; padding: 4px 16px 8px; border-bottom: 1px solid #eef0f4; }
.tl-place__recent[hidden]{ display: none; }
.tl-place__recentTitle{ font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; padding: 6px 0; }
.tl-place__recentItem{
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border: 0; background: none;
  text-align: start; font-size: 15px; color: #1f2633; cursor: pointer;
}
.tl-place__recentItem svg{ flex: 0 0 18px; color: #6b7280; }
.tl-place__recentItem span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
