/* Yafoye — le menu deroulant premium a icone et libelle.
 *
 * V101.627. Ces regles vivaient dans le `<head>` d'`explorer-annonces.html`.
 * La V101.622 a EXPOSE le composant (`YIPremiumSelects.appliquer`) pour que le
 * tri de Yafoye Match et les questionnaires aient la meme apparence — mais sa
 * feuille de style, elle, est restee dans la page d'Explorer.
 *
 * CE QUE CA DONNAIT SUR YAFOYE MATCH. Le composant s'installait bien, sans une
 * seule de ses regles : le menu s'affichait deplie en permanence (il n'est
 * masque que par `.yi-premium-select-menu{visibility:hidden}`), et le select
 * natif restait visible a cote (il n'est efface que par
 * `.yi-native-select-hidden`). D'ou les DEUX menus de tri sur un meme ecran.
 *
 * Un composant partage a besoin d'une feuille partagee. Toute page qui appelle
 * `YIPremiumSelects.appliquer` doit charger ce fichier.
 */

.yi-native-select-hidden{
  position:absolute!important;width:1px!important;height:1px!important;
  opacity:0!important;pointer-events:none!important;clip:rect(0 0 0 0)!important;
}
.yi-premium-select{position:relative;width:100%;font-family:Manrope,Arial,sans-serif}
.yi-premium-select-trigger{
  width:100%;min-height:54px;padding:8px 46px 8px 14px;border:1px solid var(--trait);
  border-radius:var(--r-carte);background:linear-gradient(180deg,#fff,var(--surface));color:var(--encre);
  display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;
  box-shadow:var(--ombre);transition:.2s ease
}
.yi-premium-select-trigger:hover{border-color:#b8c5d4;box-shadow:var(--ombre)}
.yi-premium-select.open .yi-premium-select-trigger,
.yi-premium-select-trigger:focus-visible{outline:0;border-color:var(--encre);box-shadow:0 0 0 4px rgba(3,27,58,.09)}
.yi-premium-select-icon{
  width:34px;height:34px;flex:0 0 34px;border-radius:var(--r-carte);display:grid;place-items:center;
  background:var(--fond);color:var(--encre);font-size:var(--t-corps)
}
.yi-premium-select-copy{min-width:0;display:grid;gap:1px}
.yi-premium-select-label{font-size:var(--t-nano);font-weight:800;color:#7b8797;text-transform:uppercase;letter-spacing:.055em}
.yi-premium-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--t-second);font-weight:800;color:var(--encre)}
.yi-premium-select-chevron{
  position:absolute;right:16px;top:50%;transform:translateY(-50%);pointer-events:none;
  color:var(--encre-douce);transition:transform .2s ease
}
.yi-premium-select.open .yi-premium-select-chevron{transform:translateY(-50%) rotate(180deg)}
.yi-premium-select-menu{
  position:absolute;z-index:3200;left:0;right:0;top:calc(100% + 9px);padding:9px;
  border:1px solid var(--trait);border-radius:var(--r-carte);background:rgba(255,255,255,.985);
  box-shadow:var(--ombre-haute);backdrop-filter:blur(16px);
  opacity:0;visibility:hidden;transform:translateY(-6px) scale(.985);transform-origin:top;
  transition:.18s ease
}
.yi-premium-select.open .yi-premium-select-menu{opacity:1;visibility:visible;transform:none}
.yi-premium-select-search-wrap{position:relative;margin-bottom:7px}
.yi-premium-select-search-wrap i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--encre-douce);font-size:var(--t-micro)}
.yi-premium-select-search{
  width:100%;height:42px;padding:0 12px 0 36px;border:1px solid var(--trait);border-radius:var(--r-carte);
  background:var(--fond);color:var(--encre);font:700 12px Poppins,Arial,sans-serif
}
.yi-premium-select-search:focus{outline:0;border-color:#9aaabd;background:#fff;box-shadow:0 0 0 3px rgba(3,27,58,.06)}
.yi-premium-select-options{max-height:235px;overflow:auto;display:grid;gap:3px;scrollbar-width:thin}
.yi-premium-option{
  min-height:43px;padding:0 11px;border:0;border-radius:var(--r-carte);background:transparent;color:#344054;
  display:grid;grid-template-columns:1fr;align-items:center;gap:0;text-align:left;
  font:700 12px Poppins,Arial,sans-serif;cursor:pointer
}
.yi-premium-option:hover,.yi-premium-option.focused{background:var(--fond);color:var(--encre)}
.yi-premium-option.selected{background:var(--marque-fond);color:var(--encre);font-weight:850}
.yi-premium-empty{padding:18px 10px;text-align:center;color:var(--encre-douce);font-size:var(--t-micro)}
.toolbar .yi-premium-select{width:190px}
.toolbar .yi-premium-select-trigger{min-height:42px;border-radius:var(--r-carte);padding-top:5px;padding-bottom:5px}
.toolbar .yi-premium-select-icon,.toolbar .yi-premium-select-label{display:none}
.toolbar .yi-premium-select-menu{left:auto;width:255px}
@media(max-width:700px){
  .toolbar .yi-premium-select{width:150px}
  .toolbar .yi-premium-select-trigger{padding-left:13px}
  .toolbar .yi-premium-select-menu{
    position:fixed;left:10px;right:10px;top:auto;bottom:calc(84px + env(safe-area-inset-bottom));
    width:auto;border-radius:var(--r-carte);padding:12px
  }
  .yi-explorer-filter-sheet .yi-premium-select-menu{
    position:fixed;left:10px;right:10px;top:auto;bottom:calc(12px + env(safe-area-inset-bottom));
    width:auto;max-height:72dvh;border-radius:var(--r-carte);padding:13px;z-index:4000
  }
  .yi-explorer-filter-sheet .yi-premium-select-options{max-height:46dvh}
}

/* ------------------------------------------------------------------
   Yafoye Match — la barre de tri.
   Le composant occupe toute la largeur par defaut, ce qui conviendrait
   a un formulaire mais pas a un menu range au bout d'un titre. Meme
   forme que dans la barre d'outils d'Explorer : une pastille compacte,
   alignee a droite, pleine largeur sur telephone.
   ------------------------------------------------------------------ */
.summary .yi-premium-select{width:auto;min-width:212px;margin-left:auto}
.summary .yi-premium-select-trigger{min-height:44px;border-radius:var(--r-carte);padding:6px 42px 6px 13px}
.summary .yi-premium-select-icon{width:28px;height:28px;flex:0 0 28px;border-radius:var(--r-petit);font-size:var(--t-micro)}
.summary .yi-premium-select-menu{left:auto;right:0;width:262px}
@media(max-width:650px){
  .summary .yi-premium-select{width:100%;min-width:0;margin-left:0}
  .summary .yi-premium-select-menu{left:0;right:0;width:auto}
}
