/* ==========================================================================
   ETHNOS R276 — CORRECTIONS CIBLEES
   - Profil : hauteur Fermer standard, tous formats.
   - Messages : largeur -5 px, tous formats.
   - 1280x720 :
       Photos/Documents : Ajouter une photo plus compact ;
       Aperçu = Modifier ; groupe décalé de 5 px à gauche ;
       scroll garanti pour rendre Fermer accessible.
       Annuaire : Rechercher = hauteur exacte du champ voisin ;
       scroll du contenu garanti.
   Tchat R275 : NON TOUCHE.
   ========================================================================== */

/* 1 — PROFIL : Fermer = hauteur standard claire, tous formats. */
html[data-ethnos-ui] body .memberProfileDrawer > button.memberProfileBottomClose{
  height:34px !important;
  min-height:34px !important;
  max-height:34px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  line-height:1 !important;
}

/* 2 — MESSAGES : largeur du tableau principal réduite de 5 px, tous formats. */
html[data-ethnos-ui] body .memberMessagesDrawer .memberMessageCenter{
  --message-dashboard-width:
    calc(var(--r141-message-dashboard-width, var(--ethnos-context-width,430px)) - 5px) !important;
}

/* 3 — 1280x720 uniquement. */
@media (width:1280px) and (height:720px){

  /* PHOTOS / DOCUMENTS : le contenu défile ; Fermer reste atteignable. */
  html[data-ethnos-ui] body .memberMediaDrawer .memberMediaShell{
    height:100% !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
  }

  html[data-ethnos-ui] body .memberMediaDrawer .memberMediaScroll{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-gutter:stable !important;
  }

  /* Ajouter une photo : largeur au contenu, sans chevaucher "Mes photos". */
  html[data-ethnos-ui] body .memberMediaPhotosSection
  button[data-media-library-upload="photos"].ethnosOfficialAction{
    width:auto !important;
    min-width:0 !important;
    max-width:145px !important;
    padding-left:11px !important;
    padding-right:11px !important;
    white-space:nowrap !important;
  }

  /* Aperçu + Modifier : mêmes dimensions, groupe 5 px visuels à gauche. */
  html[data-ethnos-ui] body .memberMediaPhotosSection .memberMediaBandActions{
    position:relative !important;
    left:-5px !important;
  }

  html[data-ethnos-ui] body .memberMediaPhotosSection
  .memberMediaBandActions > button.memberMediaPreviewButton,
  html[data-ethnos-ui] body .memberMediaPhotosSection
  .memberMediaBandActions > button.memberMediaEditProfileButton{
    box-sizing:border-box !important;
    width:74px !important;
    min-width:74px !important;
    max-width:74px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:0 8px !important;
  }

  /* ANNUAIRE : scroll garanti sur le contenu du volet. */
  html[data-ethnos-ui] body .memberDirectoryDrawer .memberDirectoryShell{
    height:100% !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
  }

  html[data-ethnos-ui] body .memberDirectoryDrawer .memberDirectoryContent{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-gutter:stable !important;
  }

  /* Rechercher prend exactement la hauteur du champ voisin, sans valeur inventée. */
  html[data-ethnos-ui] body .memberDirectoryDrawer .memberDirectoryInlineSearch{
    align-items:stretch !important;
  }

  html[data-ethnos-ui] body .memberDirectoryDrawer
  .memberDirectoryInlineSearch > button.ethnosOfficialAction{
    align-self:stretch !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
}
