/* ========================================================================== */
/* ETHNOS R158 — bibliothèque compacte + dock inférieur structurel            */
/* Base : R157. Correctifs graphiques ciblés, backend inchangé.               */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 1 — Photos et documents : hiérarchie typographique réduite sur tout format */
/* -------------------------------------------------------------------------- */
html body .memberMediaHeader{
  min-height:clamp(106px,13.2vh,138px) !important;
  padding:16px clamp(20px,1.75vw,30px) !important;
}
html body .memberMediaHeader h2{
  max-width:100% !important;
  font-size:clamp(23px,1.58vw,30px) !important;
  line-height:1.02 !important;
  letter-spacing:-.018em !important;
  text-wrap:balance !important;
}
html body .memberMediaHeader p{
  max-width:620px !important;
  margin-top:7px !important;
  font-size:clamp(10px,.72vw,13px) !important;
  line-height:1.38 !important;
}
html body .memberMediaEyebrow{
  margin-bottom:6px !important;
  font-size:clamp(7px,.48vw,9px) !important;
}
html body .memberMediaSectionHeader{
  min-height:58px !important;
  gap:8px !important;
  padding:9px clamp(12px,1vw,17px) !important;
}
html body .memberMediaSectionHeader h3{
  min-width:0 !important;
  font-size:clamp(15px,.92vw,18px) !important;
  line-height:1.04 !important;
  letter-spacing:-.012em !important;
  white-space:nowrap !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
html body .memberMediaSectionHeader > div:first-child > span{
  margin-bottom:2px !important;
  font-size:clamp(7px,.46vw,8.5px) !important;
}
html body .memberMediaActions button{
  min-height:30px !important;
  height:30px !important;
  padding:0 7px !important;
  border-radius:8px !important;
  font-size:clamp(7.5px,.5vw,9px) !important;
  line-height:1 !important;
}

/* Une respiration crème nette entre Photos et Documents. */
html body .memberMediaDocumentsSection{
  margin-top:0 !important;
  border-top:28px solid #fff1df !important;
}
html body .memberMediaSection{
  padding-bottom:12px !important;
}

/* Le bouton officiel reste visible dans le volet, y compris avec du contenu. */
html body .memberMediaCloseButton{
  position:sticky !important;
  z-index:12 !important;
  bottom:14px !important;
  width:calc(100% - 28px) !important;
  margin:40px 14px 14px !important;
}

/* -------------------------------------------------------------------------- */
/* 2 — Dock inférieur : élément HTML réel, visible sans dépendre du chargement */
/* -------------------------------------------------------------------------- */
html body .memberWorldDock{
  display:grid !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
  position:fixed !important;
  z-index:220 !important;
  left:0 !important;
  right:max(0px,calc(var(--ethnos-context-width,0px) - 16px)) !important;
  bottom:var(--footer-legal,22px) !important;
  width:auto !important;
  height:var(--r110-dock-height,54px) !important;
  min-height:var(--r110-dock-height,54px) !important;
  max-height:var(--r110-dock-height,54px) !important;
  box-sizing:border-box !important;
  grid-template-columns:repeat(7,minmax(0,1fr)) !important;
  gap:5px !important;
  padding:5px 5px 5px calc(var(--ethnos-search-width,258px) + 49px) !important;
  overflow:visible !important;
  border:1px solid rgba(7,26,57,.18) !important;
  border-radius:0 16px 16px 0 !important;
  background:linear-gradient(180deg,rgba(255,252,247,.995),rgba(255,249,240,.98)) !important;
  box-shadow:0 18px 45px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.9) !important;
  backdrop-filter:blur(16px) saturate(1.06) !important;
  -webkit-backdrop-filter:blur(16px) saturate(1.06) !important;
  transform:none !important;
}
html body .memberWorldDock[hidden]{display:grid !important}
html body .memberWorldDock button{
  min-width:0 !important;
  min-height:38px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  padding:0 6px !important;
  border:1px solid transparent !important;
  border-radius:10px !important;
  background:transparent !important;
  color:rgba(7,26,57,.7) !important;
  font-family:var(--ethnos-official-title,Inter,"Segoe UI",Arial,sans-serif) !important;
  font-size:clamp(8px,.66vw,11px) !important;
  font-weight:750 !important;
  cursor:pointer !important;
}
html body .memberWorldDock button:hover,
html body .memberWorldDock button:focus-visible{
  color:#071a39 !important;
  background:rgba(255,255,255,.72) !important;
  outline:none !important;
}
html body .memberWorldDock button.isActive{
  border-color:rgba(19,183,180,.36) !important;
  background:linear-gradient(135deg,rgba(19,183,180,.14),rgba(242,103,34,.09)) !important;
  color:#071a39 !important;
}
html body .memberWorldDock i{
  flex:0 0 auto !important;
  display:grid !important;
  place-items:center !important;
  width:25px !important;
  height:25px !important;
  border-radius:50% !important;
  background:rgba(7,26,57,.06) !important;
  color:#13b7b4 !important;
  font-style:normal !important;
  font-size:15px !important;
}
html body .memberFooter{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  z-index:210 !important;
}

/* Tchat reste au-dessus de la partie gauche du dock, sans le faire disparaître. */
@media (min-width:901px){
  html[data-ethnos-ui="discord-r111"] body .memberExplorerPanel{
    z-index:230 !important;
  }
}

@media (max-width:1600px) and (max-height:920px){
  html body .memberMediaHeader{
    min-height:104px !important;
    padding:13px 18px !important;
  }
  html body .memberMediaHeader h2{font-size:23px !important}
  html body .memberMediaHeader p{font-size:10px !important;margin-top:6px !important}
  html body .memberMediaSectionHeader{
    min-height:52px !important;
    padding:7px 9px !important;
  }
  html body .memberMediaSectionHeader h3{font-size:14px !important}
  html body .memberMediaActions button{
    min-height:27px !important;
    height:27px !important;
    padding:0 5px !important;
    font-size:7px !important;
  }
  html body .memberMediaDocumentsSection{border-top-width:24px !important}
}

@media (max-width:1100px){
  html body .memberWorldDock button span{display:none !important}
  html body .memberWorldDock i{font-size:17px !important}
}

@media (max-width:900px){
  html body .memberWorldDock{
    left:8px !important;
    right:8px !important;
    bottom:calc(var(--footer-legal,22px) + 5px) !important;
    padding:5px !important;
    border-radius:14px !important;
  }
}

@media (max-width:520px){
  html body .memberMediaHeader h2{font-size:22px !important}
  html body .memberMediaSectionHeader{
    grid-template-columns:minmax(0,1fr) auto !important;
    text-align:left !important;
  }
  html body .memberMediaActions{justify-content:flex-end !important}
}
