/* ========================================================================== */
/* ETHNOS R213 — correctifs audités et appliqués aux cibles réelles           */
/* Base : R212. Le fichier est chargé en dernier.                             */
/* ========================================================================== */

:root{
  --r213-clear-button-bg:#fffdf9;
  --r213-clear-button-ink:#071a39;
  --r213-clear-button-border:rgba(7,26,57,.34);
}

/* -------------------------------------------------------------------------- */
/* 1. R212 RÉAPPLIQUÉE SANS DÉPENDRE DU BOUTON SUPPRIMÉ PAR CSS.              */
/* -------------------------------------------------------------------------- */
html body .memberProfileCompact .memberProfileMetaRow{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
}
html body .memberProfileCompact .memberProfileMetaRow>p{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:clip !important;
}
html body .memberProfileCompact{
  position:relative !important;
  isolation:isolate !important;
  overflow:hidden !important;
}
html body .memberProfileCompact::before,
html body .memberProfileCompact::after{
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
}
html body .memberProfileCompact::before{
  width:138px;
  height:138px;
  right:-58px;
  top:-65px;
  border:1px solid rgba(38,112,154,.13);
  border-radius:50%;
  box-shadow:0 0 0 18px rgba(38,112,154,.035),0 0 0 36px rgba(38,112,154,.018);
}
html body .memberProfileCompact::after{
  width:112px;
  height:42px;
  right:16px;
  bottom:-23px;
  border-radius:50%;
  background:radial-gradient(ellipse at center,rgba(19,83,126,.12) 0%,rgba(19,83,126,.045) 48%,rgba(19,83,126,0) 74%);
  transform:rotate(-9deg);
}
html body .memberProfileCompact .memberIdentity{
  position:relative !important;
  z-index:1 !important;
}

/* 1366 × 768 uniquement. */
@media (min-width:1340px) and (max-width:1392px) and (min-height:730px) and (max-height:800px){
  html body .memberProfileCompact .memberIdentity h2{
    font-size:16px !important;
    line-height:1.02 !important;
  }
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch>button.ethnosActionOrange{
    width:62% !important;
    min-width:0 !important;
    max-width:none !important;
    height:29px !important;
    min-height:29px !important;
    max-height:29px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 9px !important;
    font-size:9px !important;
  }
  html[data-ethnos-ui] body.isTchatDrawerOpen button.r186TchatClose.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerOpen.isTchatDrawerClosing button.r186TchatClose.ethnosActionOrange{
    width:62% !important;
    height:29px !important;
    min-height:29px !important;
    max-height:29px !important;
    flex:0 0 29px !important;
    margin:6px auto 9px !important;
    padding:0 9px !important;
    font-size:9px !important;
  }
  html body.isTchatDrawerOpen .memberExplorerBody{
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-gutter:stable !important;
  }
  html[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberExplorerPanel .salonContinentShortcuts{
    grid-template-rows:repeat(7,38px) !important;
    gap:5px !important;
    min-height:0 !important;
  }
  html[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberExplorerPanel .salonContinentShortcuts button{
    min-height:38px !important;
    height:38px !important;
    padding:4px 8px !important;
  }
  html body.isTchatDrawerOpen .salonContinentShortcuts button span{font-size:10px !important;}
}

/* 1536 × 864 uniquement. */
@media (min-width:1510px) and (max-width:1562px) and (min-height:830px) and (max-height:900px){
  html body .memberProfileCompact .memberIdentity h2{
    font-size:18px !important;
    line-height:1.02 !important;
  }
  html[data-ethnos-ui] body.isTchatDrawerOpen .salonQuickSearch>button.ethnosActionOrange{
    width:66% !important;
    min-width:0 !important;
    max-width:none !important;
    height:32px !important;
    min-height:32px !important;
    max-height:32px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 10px !important;
    font-size:10px !important;
  }
  html[data-ethnos-ui] body.isTchatDrawerOpen button.r186TchatClose.ethnosActionOrange,
  html[data-ethnos-ui] body.isTchatDrawerOpen.isTchatDrawerClosing button.r186TchatClose.ethnosActionOrange{
    width:66% !important;
    height:32px !important;
    min-height:32px !important;
    max-height:32px !important;
    flex:0 0 32px !important;
    margin:7px auto 10px !important;
    padding:0 10px !important;
    font-size:10px !important;
  }
  html body.isTchatDrawerOpen .memberExplorerBody{
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-gutter:stable !important;
  }
  html[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberExplorerPanel .salonContinentShortcuts{
    grid-template-rows:repeat(7,44px) !important;
    gap:6px !important;
    min-height:0 !important;
  }
  html[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberExplorerPanel .salonContinentShortcuts button{
    min-height:44px !important;
    height:44px !important;
    padding:5px 9px !important;
  }
  html body.isTchatDrawerOpen .salonContinentShortcuts button span{font-size:10.5px !important;}
}

/* -------------------------------------------------------------------------- */
/* 2. FERMETURE TCHAT : préparation puis trajet inverse visible.             */
/* -------------------------------------------------------------------------- */
@media (min-width:901px){
  html body.isTchatDrawerOpen.isTchatDrawerClosing .memberExplorerPanel{
    display:flex !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:none !important;
    transform:translateY(0) !important;
    transition:none !important;
  }
  html body.isTchatDrawerOpen.isTchatDrawerClosing.isTchatDrawerClosingActive .memberExplorerPanel{
    display:flex !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:none !important;
    transform:translateY(calc(100% + var(--r190-map-tab-height,var(--ethnos-card-height)) + 12px)) !important;
    transition:transform .38s cubic-bezier(.22,.72,.25,1) !important;
  }
  html body.isTchatDrawerOpen.isTchatDrawerClosing .memberExplorerBody{
    display:flex !important;
  }
  html body.isTchatDrawerOpen.isTchatDrawerClosing .r186TchatClose{
    display:flex !important;
  }
}

/* -------------------------------------------------------------------------- */
/* 3. BOUTON FERMER CLAIR UNIQUE — copie de la référence Profil.             */
/* -------------------------------------------------------------------------- */
html body .memberDirectoryContent>.memberDirectoryInlineClose,
html body .memberMediaShell>.memberMediaCloseButton,
html body .memberTrophiesShell>.memberDrawerCloseButton,
html body .bodyReportsDrawer>.memberDrawerCloseButton,
html body .bodyContactsDrawer>.memberDrawerCloseButton,
html body .memberFavoritesShell>.memberDrawerCloseButton,
html body .memberMessagesDrawer .memberMessageDashboardClose,
html body .memberMessagesDrawer .memberMessageWorkspaceHeader>button[data-close-message-workspace]{
  appearance:none !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  justify-self:center !important;
  width:auto !important;
  min-width:116px !important;
  max-width:none !important;
  height:auto !important;
  min-height:34px !important;
  margin:10px auto 14px !important;
  padding:0 22px !important;
  border:1px solid var(--r213-clear-button-border) !important;
  border-radius:999px !important;
  background:var(--r213-clear-button-bg) !important;
  color:var(--r213-clear-button-ink) !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-decoration:none !important;
  text-transform:none !important;
  text-shadow:none !important;
  white-space:nowrap !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
  cursor:pointer !important;
}
html body .memberDirectoryContent>.memberDirectoryInlineClose:hover,
html body .memberDirectoryContent>.memberDirectoryInlineClose:focus-visible,
html body .memberMediaShell>.memberMediaCloseButton:hover,
html body .memberMediaShell>.memberMediaCloseButton:focus-visible,
html body .memberTrophiesShell>.memberDrawerCloseButton:hover,
html body .memberTrophiesShell>.memberDrawerCloseButton:focus-visible,
html body .bodyReportsDrawer>.memberDrawerCloseButton:hover,
html body .bodyReportsDrawer>.memberDrawerCloseButton:focus-visible,
html body .bodyContactsDrawer>.memberDrawerCloseButton:hover,
html body .bodyContactsDrawer>.memberDrawerCloseButton:focus-visible,
html body .memberFavoritesShell>.memberDrawerCloseButton:hover,
html body .memberFavoritesShell>.memberDrawerCloseButton:focus-visible,
html body .memberMessagesDrawer .memberMessageDashboardClose:hover,
html body .memberMessagesDrawer .memberMessageDashboardClose:focus-visible,
html body .memberMessagesDrawer .memberMessageWorkspaceHeader>button[data-close-message-workspace]:hover,
html body .memberMessagesDrawer .memberMessageWorkspaceHeader>button[data-close-message-workspace]:focus-visible{
  border-color:rgba(7,26,57,.48) !important;
  background:var(--r213-clear-button-bg) !important;
  color:var(--r213-clear-button-ink) !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
  outline:none !important;
}

/* -------------------------------------------------------------------------- */
/* 4. SIGNALEMENTS : motifs dans le rendu source et bouton orange centré.     */
/* -------------------------------------------------------------------------- */
html body .bodyReportsDrawer .bodyModerationQueue article>button,
html body .bodyReportsDrawer .bodyModerationQueue article>.bodyModerationActionR213{
  display:grid !important;
  place-items:center !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  line-height:1 !important;
  padding-left:12px !important;
  padding-right:12px !important;
}
html body .bodyReportsDrawer .bodyReportReasonsR213{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
}
html body .bodyReportsDrawer .bodyReportReasonListR213{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  gap:8px !important;
}
html body .bodyReportsDrawer .bodyReportReasonListR213>span{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:34px !important;
  padding:0 13px !important;
  border:1px solid rgba(242,103,34,.28) !important;
  border-radius:999px !important;
  background:#fffaf4 !important;
  color:#071a39 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:10px !important;
  font-weight:700 !important;
  text-align:center !important;
}

/* -------------------------------------------------------------------------- */
/* 5. +10 px ENTRE LE BORD SUPÉRIEUR ET LA PREMIÈRE LIGNE DE TEXTE.          */
/* -------------------------------------------------------------------------- */
html body .memberMessagesDrawer .memberMessageDashboardHeader>span:first-child,
html body .memberMessagesDrawer .memberMessageWorkspaceHeader>div>span:first-child,
html body .bodyReportsDrawer>header>span:first-child,
html body .bodyContactsDrawer>header>span:first-child,
html body .memberMediaHeader .memberMediaEyebrow{
  display:block !important;
  margin-top:10px !important;
}
html body .memberDirectoryHeader>h2:first-child,
html body .memberFavoritesShell>header>h2:first-child,
html body .memberTrophiesHeader>h2:first-child{
  margin-top:10px !important;
}
