/* ========================================================================== */
/* ETHNOS R134 — éditeur Profil entre les onglets Profil et Maps             */
/* Base : R133. Correctifs ciblés demandés le 3 août 2026.                    */
/* ========================================================================== */

/* La fiche Profil se ferme uniquement avec le bouton « Fermer » du bas. */
html body .memberProfileDrawer .memberProfileClose{
  display:none !important;
}

/* -------------------------------------------------------------------------- */
/* Géométrie : le volet sort de sous l'onglet Profil et s'arrête à Maps.       */
/* Les valeurs exactes sont calculées par JS à partir des cartes visibles.     */
/* -------------------------------------------------------------------------- */
html body .memberProfileEditorDrawer{
  --profile-editor-left:0px;
  --profile-editor-top:var(--ethnos-card-height,132px);
  --profile-editor-bottom:var(--ethnos-card-height,132px);
  z-index:80 !important;
}
html body .memberProfileEditorBackdrop{
  z-index:0;
  background:rgba(1,10,16,.32) !important;
}
html body .memberProfileEditorPanel{
  z-index:1;
  top:var(--profile-editor-top) !important;
  right:0 !important;
  bottom:var(--profile-editor-bottom) !important;
  left:var(--profile-editor-left) !important;
  border:0 !important;
  border-left:0 !important;
  outline:0 !important;
  background:#fff9f0 !important;
  box-shadow:-22px 0 64px rgba(0,0,0,.32) !important;
}
/* Profil et Maps restent au premier plan : le coulissement semble partir
   physiquement de dessous les deux onglets. */
html body .memberProfileCompact{
  z-index:120 !important;
}
html body .memberMapCard{
  z-index:82 !important;
}

/* Suppression du liseré clair et bandeau bleu jusqu'au bord gauche réel. */
html body .memberProfileEditorHeader{
  width:100% !important;
  margin:0 !important;
  border-left:0 !important;
  background:linear-gradient(112deg,#041520,#082634) !important;
  box-shadow:-2px 0 0 #041520,0 1px 0 rgba(49,209,207,.23) !important;
}

/* Typographie officielle de l'accueil commercial pour tous les titres. */
html body .memberProfileEditorHeader h2,
html body .memberProfileEditCard h3,
html body .memberProfileDeleteConfirm h4{
  font-family:Inter,"Segoe UI",Arial,sans-serif !important;
  font-style:normal !important;
  letter-spacing:-.035em !important;
}
html body .memberProfileEditorHeader h2{
  font-size:clamp(30px,2.35vw,46px) !important;
  font-weight:800 !important;
  line-height:1.02 !important;
}
html body .memberProfileEditCard h3{
  font-weight:800 !important;
}
html body .memberProfileEditorHeader p{
  line-height:1.55 !important;
}

/* Champs plus lisibles : contour visible au repos et accent clair au focus. */
html body .memberProfileEditCard input:not([type="checkbox"]),
html body .memberProfileEditCard select,
html body .memberProfileEditCard textarea{
  border:1.5px solid rgba(7,26,57,.38) !important;
  background:#fffdf9 !important;
  color:#071a39 !important;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif !important;
  box-shadow:inset 0 1px 0 rgba(7,26,57,.025) !important;
}
html body .memberProfileEditCard input:not([type="checkbox"]):hover,
html body .memberProfileEditCard select:hover,
html body .memberProfileEditCard textarea:hover{
  border-color:rgba(7,26,57,.58) !important;
}
html body .memberProfileEditCard input:focus,
html body .memberProfileEditCard select:focus,
html body .memberProfileEditCard textarea:focus{
  border-color:#13b7b4 !important;
  box-shadow:0 0 0 3px rgba(19,183,180,.16) !important;
}

/* -------------------------------------------------------------------------- */
/* Présentation : barre d'émojis équivalente à l'inscription.                 */
/* -------------------------------------------------------------------------- */
.memberProfileDescriptionField{position:relative}
.memberProfileEmojiBar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:2px;
  padding:9px;
  border:1px solid rgba(7,26,57,.18);
  border-radius:10px;
  background:rgba(245,250,248,.88);
}
.memberProfileEmojiBar button{
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(7,26,57,.16);
  border-radius:8px;
  background:#fffdf9;
  font-size:17px;
  line-height:1;
  cursor:pointer;
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.memberProfileEmojiBar button:hover,
.memberProfileEmojiBar button:focus-visible{
  border-color:#13b7b4;
  background:#effbf9;
  transform:translateY(-1px);
  outline:none;
}

/* -------------------------------------------------------------------------- */
/* Centres d'intérêt : bulles de sélection + ajout personnel.                 */
/* -------------------------------------------------------------------------- */
.memberProfileInterestEditor{
  display:grid;
  gap:12px;
}
.memberProfileFieldLabel{
  color:#355367;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.memberProfileInterestGrid,
.memberProfileSelectedInterests{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.memberProfileInterestGrid button,
.memberProfileSelectedInterests button{
  min-height:34px;
  padding:0 13px;
  border:1px solid rgba(19,183,180,.28);
  border-radius:999px;
  background:#fffdf9;
  color:#355367;
  font-family:Manrope,Inter,"Segoe UI",Arial,sans-serif;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.memberProfileInterestGrid button:hover,
.memberProfileInterestGrid button:focus-visible{
  border-color:#13b7b4;
  transform:translateY(-1px);
  outline:none;
}
.memberProfileInterestGrid button.isSelected{
  border-color:#f26722;
  background:rgba(242,103,34,.12);
  color:#071a39;
  box-shadow:0 4px 12px rgba(242,103,34,.09);
}
.memberProfileCustomInterest{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:9px;
}
html body .memberProfileCustomInterest input{
  height:43px !important;
  padding:0 13px !important;
}
.memberProfileCustomInterest button{
  min-height:43px;
  padding:0 18px;
  border:1px solid #13b7b4;
  border-radius:10px;
  background:#effbf9;
  color:#071a39;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.memberProfileSelectedInterests{
  min-height:0;
}
.memberProfileSelectedInterests:empty{display:none}
.memberProfileSelectedInterests button{
  border-color:rgba(242,103,34,.42);
  background:#fff4e7;
  color:#071a39;
}
.memberProfileSelectedInterests button::after{
  content:" ×";
  color:#a74419;
  font-weight:900;
}
.memberProfileInterestEditor.isLimitReached{
  animation:memberProfileInterestLimit .55s ease;
}
@keyframes memberProfileInterestLimit{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-5px)}
  50%{transform:translateX(5px)}
  75%{transform:translateX(-3px)}
}

/* Le contenu garde son propre défilement entre Profil et Maps. */
html body .memberProfileEditorScroll{
  overscroll-behavior:contain;
}

@media(max-width:900px){
  html body .memberProfileEditorDrawer{z-index:190 !important}
  html body .memberProfileEditorPanel{
    top:0 !important;
    right:0 !important;
    bottom:0 !important;
    left:0 !important;
  }
  .memberProfileEmojiBar{gap:5px;padding:7px}
  .memberProfileEmojiBar button{width:29px;height:29px;font-size:16px}
  .memberProfileCustomInterest{grid-template-columns:1fr}
}
