/* ==========================================================================
   ETHNOS R252 — 1280x720 UNIQUEMENT — TCHAT
   AUDIT DE CAUSE :
   - R251 donnait 72% aux deux boutons mais sur deux parents de largeurs différentes.
   - largeur commune désormais calculée depuis la largeur réelle du panneau :
       calc(var(--ethnos-search-width) * .72)
   - séparateur unique = border-bottom de .salonQuickSearch.
   ========================================================================== */

/* 1. Rechercher -> 4 px -> trait */
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch{
  position:relative !important;
  margin:0 !important;
  padding-bottom:4px !important;
  border-bottom:1px solid rgba(149,205,218,.38) !important;
}

/* Aucun ancien pseudo-séparateur */
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch::before,
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch::after,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch::before,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch::after{
  content:none !important;
  display:none !important;
  margin:0 !important;
}

/* 2. trait -> 4 px -> Recherche approfondie */
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch{
  margin-top:0 !important;
  padding-top:4px !important;
  border-top:0 !important;
}

html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch::before,
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch::after,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch::before,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonDeepSearch::after{
  content:none !important;
  display:none !important;
  margin:0 !important;
}

/* 3. Rechercher = EXACTEMENT la même géométrie que Fermer.
   La largeur est calculée depuis le même référentiel : le panneau TCHAT. */
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch > button.ethnosActionOrange,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen .salonQuickSearch > button.ethnosActionOrange{
  box-sizing:border-box !important;
  width:calc(var(--ethnos-search-width) * .72) !important;
  min-width:calc(var(--ethnos-search-width) * .72) !important;
  max-width:calc(var(--ethnos-search-width) * .72) !important;
  height:25px !important;
  min-height:25px !important;
  max-height:25px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  justify-self:center !important;
  align-self:center !important;
}

/* 4. Fermer : même largeur/hauteur + remontée visuelle exacte de 4 px */
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange,
html[data-ethnos-format-1280="1"][data-ethnos-ui]
body.isTchatDrawerClosing button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerOpen button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange,
html[data-ethnos-r234-1280="1"][data-ethnos-ui]
body.isTchatDrawerClosing button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange{
  box-sizing:border-box !important;
  position:relative !important;
  top:-4px !important;
  transform:none !important;
  width:calc(var(--ethnos-search-width) * .72) !important;
  min-width:calc(var(--ethnos-search-width) * .72) !important;
  max-width:calc(var(--ethnos-search-width) * .72) !important;
  flex:0 0 25px !important;
  height:25px !important;
  min-height:25px !important;
  max-height:25px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Fallback strict viewport 1280x720 */
@media (width:1280px) and (height:720px){
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch{
    position:relative !important;
    margin:0 !important;
    padding-bottom:4px !important;
    border-bottom:1px solid rgba(149,205,218,.38) !important;
  }

  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch::before,
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch::after,
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonDeepSearch::before,
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonDeepSearch::after{
    content:none !important;
    display:none !important;
    margin:0 !important;
  }

  html[data-ethnos-ui] body.isTchatDrawerOpen .salonDeepSearch{
    margin-top:0 !important;
    padding-top:4px !important;
    border-top:0 !important;
  }

  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch > button.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerOpen button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerClosing button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange{
    box-sizing:border-box !important;
    width:calc(var(--ethnos-search-width) * .72) !important;
    min-width:calc(var(--ethnos-search-width) * .72) !important;
    max-width:calc(var(--ethnos-search-width) * .72) !important;
    height:25px !important;
    min-height:25px !important;
    max-height:25px !important;
  }

  html[data-ethnos-ui] body.isTchatDrawerOpen button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerClosing button[data-r186-tchat-close].r186TchatClose.ethnosActionOrange{
    position:relative !important;
    top:-4px !important;
    transform:none !important;
    flex:0 0 25px !important;
  }
}
