/* ===== extrait de index.html : style #24 ===== */
#public-profile-view .public-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: visible;
}

#public-profile-view .public-profile-identity {
  min-width: 0;
}

#public-profile-view .public-profile-identity h1,
#public-profile-view #public-profile-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/*
  Groupe d'actions à droite du nom.
*/

.public-profile-compact-actions {
  position: relative;

  display: flex;
  align-items: center;
  gap: 7px;

  flex: 0 0 auto;
}

.public-profile-compact-actions
#public-profile-follow-actions {
  width: auto;
  margin: 0;
  padding: 0;
}

.public-profile-compact-actions
#public-profile-follow-button {
  display: inline-flex;

  width: auto;
  min-width: 0;
  min-height: 36px;

  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 0 13px;

  border-radius: 11px;

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
}

.public-profile-compact-actions
#public-profile-follow-button::before {
  content: "+";

  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.public-profile-compact-actions
#public-profile-follow-button.is-following::before {
  content: "✓";

  font-size: 14px;
  font-weight: 800;
}


/*
  Bouton ...
*/

.public-profile-more-button {
  display: grid;

  width: 36px;
  height: 36px;

  place-items: center;

  flex: 0 0 36px;

  padding: 0;

  border: 1px solid #343434;
  border-radius: 11px;

  background: #111;
  color: #eee;

  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
}

.public-profile-more-button[hidden] {
  display: none !important;
}

.public-profile-more-button:hover {
  background: #181818;
  border-color: #444;
}

.public-profile-more-button:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
}


/*
  Menu secondaire.
*/

.public-profile-more-menu {
  position: absolute;

  top: calc(100% + 8px);
  right: 0;

  z-index: 100;

  width: 172px;

  padding: 6px;

  border: 1px solid #303030;
  border-radius: 12px;

  background: #111;

  box-shadow:
    0 16px 50px rgba(0,0,0,.55);
}

.public-profile-more-menu[hidden] {
  display: none !important;
}

.public-profile-more-menu button {
  display: flex;

  width: 100%;
  min-height: 40px;

  align-items: center;

  padding: 0 11px;

  border: 0;
  border-radius: 8px;

  background: transparent;

  font: inherit;
  font-size: 13px;
  font-weight: 750;

  cursor: pointer;

  text-align: left;
}

.public-profile-more-menu button:hover {
  background: rgba(255,255,255,.055);
}

.public-profile-menu-block {
  color: #ff4c9e;
}


/*
  Le bouton Block historique reste dans le DOM.
  Sa logique continue d'être utilisée, mais il
  n'est plus affiché sous les statistiques.
*/

#public-profile-block-actions {
  display: none !important;
}


/*
  Plus besoin du gros espace réservé aux actions.
*/

#public-profile-view .public-profile-social-stats {
  margin-top: 18px;
}

#public-profile-view #public-profile-grid {
  margin-top: 18px;
}


/*
  Mobile :
  Follow devient simplement + / ✓.
*/

@media (max-width: 420px) {

  #public-profile-view .public-profile-head {
    gap: 9px;
  }

  .public-profile-compact-actions {
    gap: 5px;
  }

  .public-profile-compact-actions
  #public-profile-follow-button {
    display: grid;

    width: 36px;
    height: 36px;
    min-height: 36px;

    place-items: center;
    gap: 0;

    padding: 0;

    font-size: 0;
    line-height: 1;
  }

  .public-profile-compact-actions
  #public-profile-follow-button::before {
    display: grid;

    width: 100%;
    height: 100%;

    place-items: center;

    margin: 0;

    font-size: 18px;
    line-height: 1;
  }

  .public-profile-compact-actions
  #public-profile-follow-button.is-following::before {
    font-size: 15px;
  }

}

/* GRFTSH PROFILE ACTION ICONS VECTOR FIX V2 */

.public-profile-compact-actions
#public-profile-follow-button::before {
  content: "" !important;
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  margin: 0 !important;
  background: currentColor !important;

  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat !important;

  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat !important;
}

.public-profile-compact-actions
#public-profile-follow-button.is-following::before {
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat !important;

  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat !important;
}

@media (max-width: 420px) {
  .public-profile-compact-actions
  #public-profile-follow-button {
    display: grid !important;
    place-items: center !important;
  }

  .public-profile-compact-actions
  #public-profile-follow-button::before,
  .public-profile-compact-actions
  #public-profile-follow-button.is-following::before {
    width: 19px !important;
    height: 19px !important;
    flex: 0 0 19px !important;
    margin: 0 !important;
  }
}

/* GRFTSH MOBILE PROFILE ACTIONS FRAMELESS V1 */
@media (max-width: 420px) {
  /*
    Sur smartphone, les actions du profil restent de vraies zones
    tactiles de 40px, mais sans carré visuel autour de l'icône.
  */
  .public-profile-compact-actions button,
  .public-profile-compact-actions
  .public-profile-message-button {
    display: grid !important;
    place-items: center !important;

    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    background-color: transparent !important;

    box-shadow: none !important;
    outline-offset: 3px;

    line-height: 1 !important;
  }

  .public-profile-compact-actions button:hover,
  .public-profile-compact-actions button:active,
  .public-profile-compact-actions button:focus-visible,
  .public-profile-compact-actions
  .public-profile-message-button:hover,
  .public-profile-compact-actions
  .public-profile-message-button:active,
  .public-profile-compact-actions
  .public-profile-message-button:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  /*
    Follow actif/inactif : aucune pastille blanche ou remplissage.
    Seule l'icône change.
  */
  .public-profile-compact-actions
  #public-profile-follow-button,
  .public-profile-compact-actions
  #public-profile-follow-button.is-following {
    border: 0 !important;
    background: transparent !important;
    color: inherit;
  }

  /*
    L'action Message conserve l'accent rose uniquement sur l'icône,
    pas sur un cadre autour.
  */
  .public-profile-compact-actions
  .public-profile-message-button {
    border: 0 !important;
    background: transparent !important;
  }

  /*
    Le bouton "..." reste parfaitement centré sans cadre.
  */
  .public-profile-compact-actions
  button:last-child {
    text-align: center !important;
  }
}

/* GRFTSH DEFAULT USER AVATAR V1 */

/*
  Ne jamais réafficher une action volontairement masquée par le JS.
  Important sur smartphone où les règles display:grid utilisent !important.
*/
.public-profile-message-button[hidden],
.public-profile-compact-actions
#public-profile-follow-button[hidden],
.public-profile-compact-actions
[hidden] {
  display: none !important;
}
