/* ========================================================================== */
/* ETHNOS R152 — Contacts et résultats Annuaire : liste officielle unifiée    */
/* Base : R151. Corrections ciblées du 4 août 2026.                           */
/* ========================================================================== */

/* Palette commune validée : crème Ethnos, bleu nuit et orange. */
html body .bodyContactsDrawer,
html body .memberDirectoryShell{
  --r152-cream:#fff8ee;
  --r152-cream-alt:#fff1df;
  --r152-cream-soft:#fffaf4;
  --r152-navy:#071a39;
  --r152-orange:#f26722;
  --r152-line:rgba(7,26,57,.13);
}

/* -------------------------------------------------------------------------- */
/* 1 — Mes contacts : typographie, taille et axes officiels de l’Annuaire.    */
/* -------------------------------------------------------------------------- */
html body .bodyContactsDrawer{
  box-sizing:border-box !important;
  height:100% !important;
  min-height:0 !important;
  padding:0 !important;
  display:grid !important;
  grid-template-rows:auto auto minmax(0,1fr) auto !important;
  overflow:hidden !important;
  color:var(--r152-navy) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  background:var(--r152-cream) !important;
}
html body .bodyContactsDrawer>header{
  box-sizing:border-box !important;
  width:100% !important;
  min-height:0 !important;
  padding:10px 18px 10px !important;
  border-bottom:1px solid var(--r152-line) !important;
  background:var(--r152-cream) !important;
  text-align:center !important;
}
html body .bodyContactsDrawer>header>span{
  display:block !important;
  margin:0 !important;
  color:var(--r152-orange) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:9px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  letter-spacing:.15em !important;
  text-transform:uppercase !important;
}
html body .bodyContactsDrawer>header h2{
  width:100% !important;
  max-width:100% !important;
  margin:6px auto 0 !important;
  color:var(--r152-navy) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:30px !important;
  font-weight:800 !important;
  line-height:1.02 !important;
  letter-spacing:-.025em !important;
  text-align:center !important;
  text-wrap:balance !important;
}
html body .bodyContactsDrawer>header p{
  width:100% !important;
  max-width:36em !important;
  margin:6px auto 0 !important;
  color:#607481 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:11px !important;
  font-weight:600 !important;
  line-height:1.34 !important;
  text-align:center !important;
}

/* Recherche contacts : zone propre, sans carte supplémentaire. */
html body .bodyContactSearch{
  box-sizing:border-box !important;
  width:100% !important;
  margin:0 !important;
  padding:12px 14px !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  border-bottom:1px solid var(--r152-line) !important;
  background:var(--r152-cream-soft) !important;
}
html body .bodyContactSearch input{
  box-sizing:border-box !important;
  width:100% !important;
  min-width:0 !important;
  height:42px !important;
  padding:0 14px !important;
  border:1px solid rgba(7,26,57,.22) !important;
  border-radius:10px !important;
  outline:0 !important;
  background:rgba(255,255,255,.72) !important;
  color:var(--r152-navy) !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:11px !important;
}
html body .bodyContactSearch input:focus{
  border-color:rgba(242,103,34,.62) !important;
  box-shadow:0 0 0 3px rgba(242,103,34,.09) !important;
}
html body .bodyContactSearch span{
  color:#607481 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:9px !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}

/* -------------------------------------------------------------------------- */
/* 2 — Contacts : une liste de bandeaux, jamais une grille de carrés.         */
/* -------------------------------------------------------------------------- */
html body .bodyContactGrid{
  box-sizing:border-box !important;
  width:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  align-content:start !important;
  gap:0 !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-gutter:stable !important;
  scrollbar-width:thin !important;
  scrollbar-color:rgba(7,26,57,.30) transparent !important;
  background:var(--r152-cream) !important;
}
html body .bodyContactGrid::-webkit-scrollbar{width:6px !important}
html body .bodyContactGrid::-webkit-scrollbar-track{background:transparent !important}
html body .bodyContactGrid::-webkit-scrollbar-thumb{
  border-radius:10px !important;
  background:rgba(7,26,57,.28) !important;
}
html body .bodyContactCard{
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-height:72px !important;
  margin:0 !important;
  padding:10px 14px !important;
  display:grid !important;
  grid-template-columns:52px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:11px !important;
  border:0 !important;
  border-bottom:1px solid var(--r152-line) !important;
  border-radius:0 !important;
  background:var(--r152-cream) !important;
  color:var(--r152-navy) !important;
  box-shadow:none !important;
  transform:translateZ(0) !important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease !important;
}
html body .bodyContactCard:nth-child(even){background:var(--r152-cream-alt) !important}
html body .bodyContactCard:hover,
html body .bodyContactCard:focus-within{
  position:relative !important;
  z-index:1 !important;
  filter:brightness(1.012) !important;
  transform:translateY(-1px) !important;
  box-shadow:0 9px 20px rgba(7,26,57,.09) !important;
}
html body .bodyContactAvatar{
  position:relative !important;
  width:48px !important;
  height:48px !important;
  border:2px solid rgba(242,103,34,.72) !important;
  border-radius:50% !important;
  display:grid !important;
  place-items:center !important;
  background:#0a3042 !important;
  color:#fffaf3 !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:13px !important;
  font-weight:800 !important;
}
html body .bodyContactAvatar i{
  right:-1px !important;
  bottom:1px !important;
  width:10px !important;
  height:10px !important;
  border:2px solid var(--r152-cream) !important;
}
html body .bodyContactCard:nth-child(even) .bodyContactAvatar i{border-color:var(--r152-cream-alt) !important}
html body .bodyContactCard>div:nth-child(2){
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:27px minmax(0,1fr) !important;
  grid-template-areas:
    "flag name"
    "flag meta"
    "flag interest" !important;
  align-items:center !important;
  column-gap:8px !important;
  row-gap:2px !important;
}
html body .bodyContactCard .bodyFlag{
  grid-area:flag !important;
  align-self:center !important;
  width:25px !important;
  height:17px !important;
  object-fit:cover !important;
  border-radius:2px !important;
  box-shadow:0 0 0 1px rgba(7,26,57,.10) !important;
}
html body .bodyContactCard h3{
  grid-area:name !important;
  min-width:0 !important;
  margin:0 !important;
  overflow:visible !important;
  color:var(--r152-navy) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.12 !important;
  letter-spacing:-.012em !important;
  text-overflow:clip !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html body .bodyContactCard span{
  grid-area:meta !important;
  min-width:0 !important;
  margin:0 !important;
  overflow:visible !important;
  color:#607481 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:8px !important;
  font-weight:650 !important;
  line-height:1.25 !important;
  text-overflow:clip !important;
  white-space:normal !important;
}
html body .bodyContactCard p{
  grid-area:interest !important;
  min-width:0 !important;
  margin:0 !important;
  overflow:visible !important;
  color:#6d7f89 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:8px !important;
  line-height:1.25 !important;
  text-overflow:clip !important;
  white-space:normal !important;
}
html body .bodyContactCard>button{
  min-width:58px !important;
  min-height:32px !important;
  padding:0 10px !important;
  border:1px solid rgba(242,103,34,.34) !important;
  border-radius:8px !important;
  background:transparent !important;
  color:var(--r152-orange) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:9px !important;
  font-weight:800 !important;
  cursor:pointer !important;
}
html body .bodyContactCard>button.isFollowing{
  border-color:rgba(7,26,57,.14) !important;
  background:rgba(7,26,57,.055) !important;
  color:var(--r152-navy) !important;
}
html body .bodyContactsDrawer>.memberDrawerCloseButton{
  box-sizing:border-box !important;
  width:calc(100% - 28px) !important;
  min-width:0 !important;
  min-height:44px !important;
  margin:12px 14px 14px !important;
  border:1px solid var(--r152-navy) !important;
  border-radius:10px !important;
  background:var(--r152-navy) !important;
  color:#fffaf3 !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:14px !important;
  font-weight:800 !important;
}

/* -------------------------------------------------------------------------- */
/* 3 — Résultats Annuaire : exactement la même logique de bandeaux crème.     */
/*     Le pseudonyme dispose d’une vraie zone de lecture et ne s’ellipse plus. */
/* -------------------------------------------------------------------------- */
html body .memberDirectoryShell.isResultsMode .memberDirectoryContent{
  padding-left:0 !important;
  padding-right:0 !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryResults{
  width:100% !important;
  gap:0 !important;
  padding:0 !important;
  background:var(--r152-cream) !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryResult{
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-height:72px !important;
  margin:0 !important;
  padding:10px 14px !important;
  display:grid !important;
  grid-template-columns:52px minmax(0,1fr) 27px 40px !important;
  grid-template-areas:
    "avatar identity flag shield"
    "avatar presence presence presence" !important;
  align-items:center !important;
  column-gap:10px !important;
  row-gap:3px !important;
  border:0 !important;
  border-bottom:1px solid var(--r152-line) !important;
  border-radius:0 !important;
  background:var(--r152-cream) !important;
  color:var(--r152-navy) !important;
  box-shadow:none !important;
  cursor:pointer !important;
  transform:translateZ(0) !important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryResult:nth-child(even){
  background:var(--r152-cream-alt) !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryResult:hover,
html body .memberDirectoryShell.isResultsMode .memberDirectoryResult:focus-visible{
  position:relative !important;
  z-index:1 !important;
  filter:brightness(1.012) !important;
  transform:translateY(-1px) !important;
  box-shadow:0 9px 20px rgba(7,26,57,.09) !important;
  outline:none !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryAvatar{
  grid-area:avatar !important;
  width:48px !important;
  height:48px !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity{
  grid-area:identity !important;
  min-width:0 !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity strong{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  overflow:visible !important;
  color:var(--r152-navy) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.12 !important;
  letter-spacing:-.012em !important;
  text-overflow:clip !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity small{
  display:block !important;
  margin-top:3px !important;
  overflow:visible !important;
  color:#607481 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:8px !important;
  font-weight:650 !important;
  line-height:1.25 !important;
  text-overflow:clip !important;
  white-space:normal !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryFlag{
  grid-area:flag !important;
  width:25px !important;
  max-height:17px !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryShield{
  grid-area:shield !important;
  width:38px !important;
  height:38px !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryPresence{
  grid-area:presence !important;
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryPresenceDot{
  flex:0 0 auto !important;
  margin:0 !important;
}
html body .memberDirectoryShell.isResultsMode .memberDirectoryPresence span{
  min-width:0 !important;
  overflow:visible !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:8px !important;
  font-weight:700 !important;
  line-height:1.25 !important;
  text-overflow:clip !important;
  white-space:normal !important;
}

/* Le bouton Fermer garde ses marges validées et ne colle pas aux bandeaux. */
html body .memberDirectoryShell.isResultsMode .memberDirectoryInlineClose{
  margin-left:14px !important;
  margin-right:14px !important;
}

/* -------------------------------------------------------------------------- */
/* 4 — Ajustements 1920 × 1080 et formats compacts.                           */
/* -------------------------------------------------------------------------- */
@media (max-width:1920px) and (max-height:1080px){
  html body .bodyContactsDrawer>header{
    padding:8px 16px 9px !important;
  }
  html body .bodyContactsDrawer>header>span{font-size:8px !important}
  html body .bodyContactsDrawer>header h2{font-size:25px !important}
  html body .bodyContactsDrawer>header p{
    margin-top:5px !important;
    font-size:9.5px !important;
  }
  html body .bodyContactSearch{padding:10px 12px !important}
  html body .bodyContactSearch input{height:40px !important;font-size:10px !important}
  html body .bodyContactCard,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult{
    grid-template-columns:48px minmax(0,1fr) 25px 37px !important;
    min-height:68px !important;
    padding:9px 12px !important;
  }
  html body .bodyContactCard{
    grid-template-columns:48px minmax(0,1fr) auto !important;
  }
  html body .bodyContactAvatar,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryAvatar{
    width:44px !important;
    height:44px !important;
  }
  html body .bodyContactCard h3,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity strong{
    font-size:13px !important;
  }
}

@media (max-width:1600px) and (max-height:920px){
  html body .bodyContactsDrawer>header{
    padding:6px 11px 7px !important;
  }
  html body .bodyContactsDrawer>header>span{font-size:6.8px !important}
  html body .bodyContactsDrawer>header h2{
    margin-top:4px !important;
    font-size:21px !important;
    line-height:1.01 !important;
  }
  html body .bodyContactsDrawer>header p{
    margin-top:3px !important;
    font-size:8px !important;
    line-height:1.24 !important;
  }
  html body .bodyContactSearch{
    padding:7px 10px !important;
    gap:7px !important;
  }
  html body .bodyContactSearch input{
    height:36px !important;
    padding:0 11px !important;
    font-size:8.5px !important;
  }
  html body .bodyContactSearch span{font-size:7px !important}
  html body .bodyContactCard,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult{
    min-height:61px !important;
    padding:7px 10px !important;
    column-gap:8px !important;
  }
  html body .bodyContactCard{
    grid-template-columns:42px minmax(0,1fr) auto !important;
  }
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult{
    grid-template-columns:42px minmax(0,1fr) 22px 32px !important;
  }
  html body .bodyContactAvatar,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryAvatar{
    width:39px !important;
    height:39px !important;
    font-size:10px !important;
  }
  html body .bodyContactCard>div:nth-child(2){
    grid-template-columns:23px minmax(0,1fr) !important;
    column-gap:6px !important;
  }
  html body .bodyContactCard .bodyFlag,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryFlag{
    width:21px !important;
    height:14px !important;
  }
  html body .memberDirectoryShell.isResultsMode .memberDirectoryShield{
    width:31px !important;
    height:31px !important;
  }
  html body .bodyContactCard h3,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity strong{
    font-size:11px !important;
  }
  html body .bodyContactCard span,
  html body .bodyContactCard p,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryIdentity small,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryPresence span{
    font-size:6.8px !important;
  }
  html body .bodyContactCard>button{
    min-width:48px !important;
    min-height:27px !important;
    padding:0 7px !important;
    font-size:7px !important;
  }
  html body .bodyContactsDrawer>.memberDrawerCloseButton{
    min-height:40px !important;
    font-size:11px !important;
  }
}

@media (prefers-reduced-motion:reduce){
  html body .bodyContactCard,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult{
    transition:none !important;
  }
  html body .bodyContactCard:hover,
  html body .bodyContactCard:focus-within,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult:hover,
  html body .memberDirectoryShell.isResultsMode .memberDirectoryResult:focus-visible{
    transform:none !important;
  }
}
