/* ==========================================================================
   ETHNOS R228 — BASE STRICTE R226
   R227 volontairement ignorée.

   CORRECTIONS :
   1) Tous formats : CENTRAL, alignement vertical cibles / encoches.
   2) 1707x1067 uniquement : ajustements CENTRAL / Profil / Tchat.
   3) Tous formats : Messages > Mes messages > Gérer la discussion :
      bandeau + Fermer au standard.
   ========================================================================== */


/* ==========================================================================
   TOUS FORMATS — CENTRAL
   ========================================================================== */
html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
.r180TrajectorySteps .r180Milestone{
  align-items:start !important;
}

html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
.r180TrajectorySteps .r180MilestoneTarget,
html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
.r180TrajectorySteps .r180MilestoneReward{
  align-self:start !important;
}

html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
.r180TrajectorySteps .r180MilestoneReward > b{
  align-self:start !important;
}


/* ==========================================================================
   TOUS FORMATS — VRAI VOLET :
   Messages > Mes messages > Gérer la discussion

   AUDIT :
   R226 avait bien ajouté les classes locales au bon mode JS,
   MAIS son CSS était préfixé par ".memberMessagesDrawer".
   Cette classe N'EXISTE PAS dans le DOM construit par espace-membre-r144.js.
   Les règles ne pouvaient donc jamais correspondre.

   R228 cible le vrai ancêtre présent :
   [data-message-center] > .memberMessageSideDrawer
   ========================================================================== */

/* Bandeau titre : standard clair officiel. */
html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer .memberConversationManageHeaderR226{
  box-sizing:border-box !important;
  width:100% !important;
  border:0 !important;
  border-bottom:1px solid var(--r211-cream-line,#d8c8b3) !important;
  background-color:var(--r211-cream-top,#fffdf9) !important;
  background-image:var(--r211-cream,linear-gradient(180deg,#fffdf9 0%,#eee1d0 100%)) !important;
  color:var(--r211-navy,#071a39) !important;
  box-shadow:0 1px 0 rgba(7,26,57,.04) !important;
}

html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer .memberConversationManageHeaderR226 > span{
  color:var(--r211-orange,#f26722) !important;
  text-shadow:none !important;
}

html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer .memberConversationManageHeaderR226 > h3{
  color:var(--r211-navy,#071a39) !important;
  text-shadow:none !important;
}

/* Fermer : standard clair Profil, uniquement dans ce volet. */
html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer button.memberConversationManageCloseR226{
  appearance:none !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:calc(100% - 28px) !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:44px !important;
  height:auto !important;
  margin:10px 14px 14px !important;
  padding:0 14px !important;
  border:1px solid rgba(7,26,57,.34) !important;
  border-radius:10px !important;
  background:#fffdf9 !important;
  color:#071a39 !important;
  font-family:var(--font-interface,Manrope,"Segoe UI",Arial,sans-serif) !important;
  font-size:clamp(10px,.72vw,13px) !important;
  font-weight:500 !important;
  font-style:normal !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  text-align:center !important;
  text-shadow:none !important;
  box-shadow:0 8px 18px rgba(7,26,57,.09) !important;
  filter:none !important;
  transform:none !important;
}

html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer button.memberConversationManageCloseR226:hover,
html[data-ethnos-ui] body
[data-member-drawer-panel="messages"] [data-message-center]
.memberMessageSideDrawer button.memberConversationManageCloseR226:focus-visible{
  border-color:rgba(7,26,57,.48) !important;
  background:#fffdf9 !important;
  color:#071a39 !important;
  filter:none !important;
  transform:none !important;
  outline:none !important;
  box-shadow:0 8px 18px rgba(7,26,57,.09) !important;
}


/* ==========================================================================
   1707 x 1067 UNIQUEMENT
   ========================================================================== */
@media (width:1707px) and (height:1067px){

  /* CENTRAL : éléments textuels de droite, 20 px vers la gauche. */
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180TrajectoryEyebrow,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180MembersValue strong,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180MembersValue span,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180ProgressMeta,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180TrajectoryManifesto,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180MilestoneTarget strong,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180MilestoneTarget small,
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180MilestoneReward span{
    position:relative !important;
    left:-20px !important;
  }

  /* CENTRAL : cibles réduites. */
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
  .r180TrajectorySteps .r180MilestoneTarget strong{
    font-size:12px !important;
    line-height:1 !important;
  }

  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
  .r180TrajectorySteps .r180MilestoneTarget small{
    font-size:5.5px !important;
    line-height:1 !important;
  }

  /* CENTRAL : encoches réduites + 6 px d'écart au texte. */
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
  .r180MilestoneReward{
    grid-template-columns:11px minmax(0,1fr) !important;
    column-gap:6px !important;
    gap:6px !important;
    align-items:start !important;
  }

  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
  .r180MilestoneReward > b{
    width:11px !important;
    height:11px !important;
    min-width:11px !important;
    min-height:11px !important;
    font-size:7.5px !important;
    line-height:1 !important;
  }

  /* CENTRAL : >= 3 px entre "membres" et la cible suivante. */
  html[data-ethnos-ui="discord-r111"] body.isEthnosHomeView
  .r180MembersValue{
    margin-right:4px !important;
  }

  /* PROFIL : bouclier réduit de 10 % sur ce format uniquement. */
  html[data-ethnos-ui] body
  [data-member-drawer-panel="profile"] .memberTrophyIntro > img{
    width:94px !important;
    height:94px !important;
  }

  /* PROFIL : boutons plus compacts. */
  html[data-ethnos-ui] body
  [data-member-drawer-panel="profile"] .memberProfileActions{
    gap:6px !important;
  }

  html[data-ethnos-ui] body
  [data-member-drawer-panel="profile"] .memberEdit,
  html[data-ethnos-ui] body
  [data-member-drawer-panel="profile"] .memberLogout{
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    padding:0 8px !important;
    font-size:8px !important;
    line-height:1 !important;
  }

  html[data-ethnos-ui] body
  [data-member-drawer-panel="profile"] .memberDrawerCloseButton{
    min-height:30px !important;
    height:30px !important;
    padding:0 15px !important;
    font-size:8px !important;
    line-height:1 !important;
  }

  /* TCHAT : Fermer remonté de 5 px uniquement. */
  html[data-ethnos-ui] body.isTchatDrawerOpen button.r186TchatClose.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerClosing button.r186TchatClose.ethnosActionOrange{
    position:relative !important;
    top:-5px !important;
  }
}
