/* ========================================================================== */
/* ETHNOS R136 — profil lisible, description complète et compact 1366 × 768 */
/* Base : R135. Correctifs ciblés demandés le 3 août 2026.                  */
/* ========================================================================== */

/* La croix supérieure de l'éditeur disparaît : fermeture par Annuler. */
html body .memberProfileEditorClose{
  display:none !important;
}
html body .memberProfileEditorHeader{
  grid-template-columns:minmax(0,1fr) !important;
}

/* -------------------------------------------------------------------------- */
/* Aperçu de la présentation : une ligne sur grands formats, deux en 1366.    */
/* Le texte intégral reste accessible par clic dans une fenêtre dédiée.       */
/* -------------------------------------------------------------------------- */
html body .memberProfileDrawer > .memberDescription{
  min-width:0 !important;
  padding-left:14px !important;
  padding-right:14px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  overflow-wrap:normal !important;
  cursor:pointer !important;
  user-select:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
html body .memberProfileDrawer > .memberDescription:hover{
  border-color:rgba(19,183,180,.34) !important;
  background:#fffaf2 !important;
}
html body .memberProfileDrawer > .memberDescription:focus-visible{
  outline:0 !important;
  border-color:#13b7b4 !important;
  box-shadow:inset 0 0 0 2px rgba(19,183,180,.15) !important;
}

/* -------------------------------------------------------------------------- */
/* Fenêtre centrale de lecture des descriptions longues (jusqu'à 1 200).      */
/* -------------------------------------------------------------------------- */
.memberProfileDescriptionDialog[hidden]{display:none !important}
.memberProfileDescriptionDialog{
  position:fixed;
  inset:0;
  z-index:260;
  display:grid;
  place-items:center;
  padding:22px;
  pointer-events:none;
}
.memberProfileDescriptionDialog.isOpen{pointer-events:auto}
.memberProfileDescriptionBackdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(1,10,16,.64);
  opacity:0;
  backdrop-filter:blur(4px);
  transition:opacity .22s ease;
}
.memberProfileDescriptionDialog.isOpen .memberProfileDescriptionBackdrop{opacity:1}
.memberProfileDescriptionPanel{
  position:relative;
  z-index:1;
  width:min(620px,calc(100vw - 44px));
  max-height:min(72vh,680px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(49,209,207,.26);
  border-radius:18px;
  background:#fff9f0;
  box-shadow:0 28px 80px rgba(0,0,0,.42);
  opacity:0;
  transform:translateY(14px) scale(.985);
  transition:opacity .22s ease,transform .22s ease;
}
.memberProfileDescriptionDialog.isOpen .memberProfileDescriptionPanel{
  opacity:1;
  transform:translateY(0) scale(1);
}
.memberProfileDescriptionPanel>header{
  padding:21px 24px 18px;
  border-bottom:1px solid rgba(49,209,207,.23);
  background:linear-gradient(112deg,#041520,#082634);
}
.memberProfileDescriptionPanel>header>span{
  display:block;
  margin-bottom:5px;
  color:#31d1cf;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:10px;
  font-weight:800;
  letter-spacing:.17em;
}
.memberProfileDescriptionPanel h2{
  margin:0;
  color:#fffaf3;
  font-family:Inter,"Segoe UI",Arial,sans-serif !important;
  font-size:clamp(25px,2vw,34px);
  font-weight:800;
  letter-spacing:-.035em;
  line-height:1.05;
}
.memberProfileDescriptionFull{
  min-height:130px;
  overflow:auto;
  padding:22px 24px;
  color:#35485d;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif;
  font-size:15px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  scrollbar-width:thin;
  scrollbar-color:rgba(7,26,57,.28) transparent;
}
.memberProfileDescriptionClose{
  min-height:48px;
  margin:0 24px 22px;
  border:1px solid #051b26;
  border-radius:11px;
  background:#051b26;
  color:#fffaf3;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 9px 20px rgba(5,27,38,.18);
}
.memberProfileDescriptionClose:hover,
.memberProfileDescriptionClose:focus-visible{
  background:#0b2c49;
  outline:0;
}
body.hasProfileDescriptionOpen{overflow:hidden}

/* -------------------------------------------------------------------------- */
/* Pseudonyme : même palette de 240 émojis, repliable pour garder le volet     */
/* éditeur compact.                                                            */
/* -------------------------------------------------------------------------- */
.memberProfileUsernameEmojiPicker{
  display:grid;
  gap:7px;
  margin-top:8px;
}
.memberProfileUsernameEmojiToggle[hidden]{display:none !important}
.memberProfileUsernameEmojiToggle{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 13px;
  border:1px solid rgba(19,183,180,.35);
  border-radius:10px;
  background:#effbf9;
  color:#071a39;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.memberProfileUsernameEmojiToggle small{
  color:#627985 !important;
  font-size:9px !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}
.memberProfileUsernameEmojiToggle b{color:#f26722}
.memberProfileUsernameEmojiToggle::after{
  content:"▾";
  color:#13a7a5;
  font-size:13px;
  transition:transform .16s ease;
}
.memberProfileUsernameEmojiToggle[aria-expanded="true"]::after{transform:rotate(180deg)}
.memberProfileUsernameEmojiToggle:hover,
.memberProfileUsernameEmojiToggle:focus-visible{
  border-color:#13b7b4;
  background:#e6f9f6;
  outline:0;
}
html body .memberProfileUsernameEmojiBar{
  max-height:190px !important;
  margin-top:0 !important;
}
html body .memberProfileUsernameEmojiBar[hidden]{display:none !important}

/* -------------------------------------------------------------------------- */
/* Réglage spécifique au format validé 1366 × 768.                            */
/* -------------------------------------------------------------------------- */
@media (min-width:1300px) and (max-width:1400px) and (max-height:820px){
  /* Aperçu limité à exactement deux lignes ; le clic donne accès au texte. */
  html body .memberProfileDrawer > .memberDescription{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    line-clamp:2 !important;
    white-space:normal !important;
    text-overflow:clip !important;
    min-height:46px !important;
    max-height:46px !important;
    padding:8px 11px !important;
    font-size:13px !important;
    line-height:1.28 !important;
  }

  /* Statistiques plus basses et plus discrètes. */
  html body .memberProfileDrawer > .memberStats{
    padding:0 3px !important;
  }
  html body .memberProfileDrawer .memberStats div{
    padding:4px 1px !important;
  }
  html body .memberProfileDrawer .memberStats b{
    font-size:13px !important;
    line-height:1 !important;
  }
  html body .memberProfileDrawer .memberStats span{
    font-size:5.8px !important;
    line-height:1.15 !important;
    letter-spacing:.02em !important;
  }

  /* Blason réduit de 50 % par rapport au réglage R132, texte compris. */
  html body .memberProfileDrawer > .memberTrophies{
    padding:7px 10px 8px !important;
  }
  html body .memberProfileDrawer .memberTrophyIntro{
    gap:3px !important;
  }
  html body .memberProfileDrawer .memberTrophyIntro > img{
    width:60px !important;
    height:60px !important;
    filter:drop-shadow(0 5px 7px rgba(7,26,57,.11)) !important;
  }
  html body .memberProfileDrawer .memberTrophyCopy span{
    font-size:12px !important;
    line-height:1.05 !important;
  }
  html body .memberProfileDrawer .memberTrophyCopy p{
    margin-top:2px !important;
    font-size:9.5px !important;
    line-height:1.1 !important;
  }

  /* Boutons d'action moins hauts et moins massifs. */
  html body .memberProfileDrawer .memberProfileActions{
    gap:6px !important;
    margin-top:6px !important;
  }
  html body .memberProfileDrawer .memberEdit,
  html body .memberProfileDrawer .memberLogout{
    min-height:30px !important;
    padding:0 7px !important;
    border-radius:8px !important;
    font-size:9.5px !important;
    line-height:1.05 !important;
    box-shadow:0 4px 10px rgba(7,26,57,.07) !important;
  }
}

@media(max-width:900px){
  html body .memberProfileDrawer > .memberDescription{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    line-clamp:2 !important;
    white-space:normal !important;
    text-overflow:clip !important;
  }
  .memberProfileDescriptionDialog{padding:12px}
  .memberProfileDescriptionPanel{width:min(100%,560px);max-height:82vh}
  .memberProfileDescriptionPanel>header{padding:18px}
  .memberProfileDescriptionFull{padding:18px;font-size:14px}
  .memberProfileDescriptionClose{margin:0 18px 18px}
}
