/* ========================================================================== */
/* ETHNOS R552 — badge Officiel iconique + rythme vertical du profil compact  */
/* Base figée : R551. Périmètre strict : carte profil compacte connectée.     */
/* ========================================================================== */

/* Trois lignes cohérentes : pseudonyme, e-mail, accroche officielle. */
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberIdentityText{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-content:center !important;
  row-gap:clamp(5px,1.75cqi,8px) !important;
}

/* Ligne 1 : 25 caractères max déjà imposés fonctionnellement + 1 badge fixe. */
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberIdentityText > h2[data-member-name]{
  display:flex !important;
  flex-flow:row nowrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:clamp(5px,1.55cqi,8px) !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .r551MemberNameText{
  flex:0 1 auto !important;
  min-width:0 !important;
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:visible !important;
  line-height:1.08 !important;
}

/* Le badge texte historique devient uniquement l'icône fournie. */
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberIdentityText > h2[data-member-name] > .r484OfficialBadge.r552OfficialBadge{
  position:relative !important;
  flex:0 0 auto !important;
  display:inline-grid !important;
  place-items:center !important;
  width:clamp(24px,7.8cqi,34px) !important;
  height:clamp(24px,7.8cqi,34px) !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:inherit !important;
  line-height:1 !important;
  overflow:visible !important;
  cursor:help !important;
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .r552OfficialBadgeIcon{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

/* Survol/focus : le mot demandé apparaît sans réintroduire le badge texte. */
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .r552OfficialBadge::after{
  content:attr(data-r552-tooltip);
  position:absolute;
  z-index:30;
  top:calc(100% + 4px);
  right:0;
  width:max-content;
  max-width:120px;
  padding:4px 7px;
  border:1px solid rgba(7,26,57,.16);
  border-radius:6px;
  background:#fffaf3;
  color:#071a39;
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:10px;
  font-weight:700;
  line-height:1.1;
  letter-spacing:0;
  box-shadow:0 5px 14px rgba(7,26,57,.14);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .12s ease,visibility .12s ease;
}
@media (hover:hover) and (pointer:fine){
  html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .r552OfficialBadge:hover::after{
    opacity:1;
    visibility:visible;
  }
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .r552OfficialBadge:focus-visible::after{
  opacity:1;
  visibility:visible;
}

/* Lignes 2 et 3 : même axe gauche et même intervalle vertical. */
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  align-items:start !important;
  justify-items:stretch !important;
  row-gap:clamp(5px,1.75cqi,8px) !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow > p[data-member-email],
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow > .r484OfficialLabel{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  text-align:left !important;
  justify-self:stretch !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow > p[data-member-email]{
  padding-bottom:1px !important;
  white-space:nowrap !important;
  line-height:1.3 !important;
  font-size:clamp(8px,3.2cqi,13px) !important;
}
html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow > .r484OfficialLabel{
  white-space:nowrap !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  line-height:1.22 !important;
  font-size:clamp(8.6px,3cqi,11px) !important;
}

/* Les formats les plus serrés gardent le badge sur la ligne du pseudonyme. */
@media (max-width:1366px){
  html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberIdentityText{
    row-gap:5px !important;
  }
  html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberProfileMetaRow{
    row-gap:5px !important;
  }
  html.ethnosConnectedUnified .memberProfileCompact:not(.isExpanded) .memberIdentityText > h2[data-member-name] > .r484OfficialBadge.r552OfficialBadge{
    width:24px !important;
    height:24px !important;
  }
}
