/*
Theme Name: BeBuddy Child
Description: Child theme for the bebuddy theme
Author: thunder-team
Author URI: http://themeforest.net/user/thunder-team
Template: bebuddy
Version: 1.0.0
Text Domain:  bebuddy
*/

/* Réglages buddypress */

.buddypress-wrap,
.bp-wrapper,
#em-wrapper,
.evenement,
#wpforo,
.em.em-view-container > .em-event-editor {
  max-width: 1500px;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
  margin: auto;
}

.element .woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
  border-radius: 8px;
}

.elementor-price-table__footer {
  border-radius: 0 0 16px 16px !important;
}
.elementor-price-table__header {
  border-radius: 16px 16px 0 0 !important;
}

.entry-content > .pmpro,
.entry-content > .buddypress-wrap,
.em.em-view-container > .em-event-editor {
  margin: 64px auto;
}

.bp-list#members-list .item-entry .item .action .generic-button button {
  color: var(--e-global-color-accent);
}

.bp-list#members-list .item-entry .item .action .generic-button button:hover,
#bp-browse-button {
  color: white;
}

/* Page profil */

.members-friends-list::before {
  display: none;
}

.alert.alert-warning {
  padding: 0;
}

#bp-browse-button,
button,
.pmpro_btn,
.pmpro_btn:link,
.pmpro_content_message a,
.pmpro_content_message a:link,
.lp-button,
#lp-button,
.a.em-button,
.button-primary,
input[type="button"],
input[type="reset"],
input[type="submit"],
button {
  color: white;
}

.buddypress-wrap .bp-feedback a {
  color: var(--e-global-color-secondary);
  text-decoration: underline;
}

.buddypress-wrap .bp-feedback a:hover,
input[type="reset"] {
  color: var(--e-global-color-accent);
}

div.bp-avatar-status p.success,
div.bp-cover-image-status p.success,
#buddypress p.warning,
body.profile_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning,
body.users_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning,
.bp-feedback.info {
  background-color: var(--e-global-color-a6288d3);
  color: var(--e-global-color-secondary);
}

button,
.pmpro_btn,
.pmpro_btn:link,
.pmpro_content_message a,
.pmpro_content_message a:link,
.lp-button,
#lp-button,
.a.em-button,
.button-primary,
input[type="button"],
input[type="reset"],
input[type="submit"],
button {
  color: var(--e-global-color-accent);
}

.pmpro_form_submit .pmpro_btn.pmpro_btn-submit {
  padding: 4px 24px;
}

#buddypress p.warning,
body.users_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning,
body.profile_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning {
  border-radius: 4px;
}

.buddypress-wrap .bp-feedback.info,
.buddypress-wrap .bp-feedback.help,
div.bp-avatar-status p.success,
div.bp-cover-image-status p.success,
#buddypress p.warning,
body.profile_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning,
body.users_page_bp-profile-edit.modal-open #TB_ajaxContent p.warning,
.bp-feedback.info,
.alert.alert-warning {
  border: none;
}

.bp-tooltip.bp-icons {
  background-color: transparent;
}
.bp-messages-content .actions .bp-icons:not(.bp-hide),
.message-action-star::before {
  color: var(--e-global-color-accent);
}

.message-action-star::before,
.message-action-unstar::before,
.message-action-view::before,
.message-action-delete::before,
.message-action-exit::before {
  font-size: 24px;
}

[data-bp-tooltip]::after {
  width: max-content !important;
}

.single-headers .bp-member-type-list,
.single-headers .bp-group-type-list {
  font-size: 18px;
  background-color: var(--e-global-color-secondary);
  width: max-content;
  padding: 4px 16px;
  border-radius: 100px;
  margin: 24px auto !important;
}

.single-headers .bp-member-type-list a,
.single-headers .bp-group-type-list a {
  color: white;
}

.single-headers .bp-member-type-list:hover,
.single-headers .bp-group-type-list:hover {
  background-color: var(--e-global-color-primary);
}

.lnr-bio.bp-bio-inline,
.lnr-bio.bp-bio-block,
.lnr-bio.bp-bio-block .bp-bio-edit {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.bp-bio-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

button.bp-bio-cancel {
  background: transparent;
  color: var(--e-global-color-pimary);
  padding: 0;
  border: none;
}

button.bp-bio-cancel:hover,
button.bp-bio-cancel:focus,
button.bp-bio-cancel:active {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--e-global-color-secondary);
}

.bp-bio-feedback {
  width: 100%;
}

#subsubnav {
  margin-top: 16px;
}

/* Réseau */
.friend-mini {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  width: 70px;
  margin-bottom: 12px;
}

.friend-avatar {
  position: relative;
  display: inline-block;
}

.friend-avatar img {
  border-radius: 50%;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

/* Pastille verte si en ligne */
.friend-avatar.is-online::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #2d8659;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.friend-name {
  display: block;
  font-size: 12px;
  color: #373737;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Groupes */
.my-groups-widget .group-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ebe1d2;
  text-decoration: none;
  color: #373737;
}

.my-groups-widget .group-mini:last-child {
  border-bottom: none;
}

.group-avatar img {
  border-radius: 8px;
  width: 40px;
  height: 40px;
}

.group-name {
  display: block;
  font-weight: 500;
  font-size: 13px;
}

.group-members {
  display: block;
  font-size: 11px;
  color: #a29688;
}

/* Menu profile */

/* === Header BP — wrapper === */
.bp-header-icon svg {
  fill: var(--e-global-color-text);
  font-size: 20px;
}

.bp-dropdown .bp-header-icon:hover svg,
.bp-dropdown .bp-header-icon:focus svg {
  fill: var(--e-global-color-accent);
  stroke: var(--e-global-color-accent);
}

.bp-dropdown .bp-header-icon,
.bp-dropdown .bp-header-icon:hover,
.bp-dropdown .bp-header-icon:focus {
  background-color: transparent;
  color: #373737;
  text-decoration: none;
  padding: 0;
}

.bp-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff6b35;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 100px;
  border: 2px solid white;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* Sidebar */

.wpforo-widget-content p {
  text-align: left;
  width: fit-content;
}

.wpforo-widget-content.wpforo-ajax-widget.wpforo-ajax-widget-onload-false dl {
  display: none !important;
}

/* === Menu utilisateur === */
.bp-user-menu,
.bp-dropdown {
  position: relative;
  width: max-content;
}

.bp-user-menu-trigger {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bp-user-menu .bp-user-menu-trigger,
.bp-user-menu .bp-user-menu-trigger:hover {
  padding: 0;
  border: none;
  background: none !important;
  cursor: pointer;
  border-radius: 50%;
}

.bp-user-menu-trigger img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: block;
}

.bp-user-menu-dropdown,
.bp-dropdown-panel {
  position: absolute;
  width: max-content;
  background: var(--e-global-color-a6288d3);
  box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.18s ease;
  z-index: 1000;
  right: -16px;
}
.bp-user-menu.is-open .bp-user-menu-dropdown,
.bp-dropdown.is-open .bp-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bp-user-menu-link {
  font-size: 16px;
  color: var(--e-global-color-accent);
  text-decoration: none;
}

.bp-user-menu-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bp-user-menu-list li a,
#members-list > li .list-wrap .button,
#members-list > li .list-wrap a.button,
#members-list > li .members-meta a,
#members-list > li .action a,
#members-list > li .action .button,
#members-list > li .generic-button a,
.bp-list#members-list .item-entry .item .action .generic-button button {
  font-size: 15px;
  text-wrap: nowrap;
  padding: 8px 16px;
}
.bp-user-menu-list li a:hover {
  color: var(--e-global-color-secondary);
}
.bp-user-menu-divider {
  height: 1px;
  background: #e9d9c1;
}

/* === Auth links === */
.bp-header-auth {
  display: flex;
  gap: 10px;
  align-items: center;
  width: max-content;
}
.bp-header-auth .btn-login {
  color: #373737;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.bp-header-auth .btn-register {
  background: #373737;
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

/* === Dropdowns notifications & messages === */

.bp-dropdown-trigger {
  border: none;
  cursor: pointer;
}

.bp-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #ebe1d2;
  font-size: 14px;
}

.bp-dropdown-count {
  background: #ffe4d6;
  color: #d94e1f;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.bp-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
}

.bp-dropdown-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: #1f1b16;
  font-size: 13px;
  border-bottom: 1px solid #faf5ee;
  transition: background 0.12s;
}

.bp-dropdown-item:hover {
  background: #faf5ee;
}

.bp-dropdown-item:last-child {
  border-bottom: none;
}

.bp-dropdown-time {
  display: block;
  font-size: 11px;
  color: #a29688;
  margin-top: 4px;
}

.bp-dropdown-empty {
  padding: 24px 16px;
  text-align: center;
  color: #a29688;
  font-size: 13px;
}

.bp-dropdown-footer {
  padding: 12px 16px;
  border-top: 1px solid #ebe1d2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.bp-dropdown-footer a {
  color: var(--e-global-color-accent);
  text-decoration: none;
  font-weight: 500;
}

.bp-dropdown-footer .btn-compose {
  background: #1f1b16;
  color: white;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* Messages */
.bp-message-item.is-unread {
  background: #fff8f0;
}

.bp-dropdown-item .bp-message-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  height: max-content;
}

.bp-message-sender {
  font-weight: 600;
  font-size: 13px;
}

.bp-message-excerpt {
  font-size: 12px;
  color: #6b6056;
  margin-top: 2px;
}

/* Activité */

li.activity-item {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.activity-content {
  width: 80%;
  margin-left: 16px;
}

#activity-stream {
  padding: 0;
}

.activity-content .-meta.action {
  display: flex;
  gap: 16px;
  margin: 32px 0;
}

.ac-textarea {
  margin: 16px 0 32px 0;
}

#whats-new-submit {
  display: flex;
  gap: 16px;
}

.bebuddy-livefeed-element
  .live-feed
  .activity-list
  .activity-item
  .item-wrapper {
  width: 100%;
}

.bebuddy-livefeed-element .live-feed .activity-list {
  display: flex !important;
}

li.activity-item {
  width: 100%;
}

.elementor-shortcode #wpforo {
  padding: 0 !important;
}

.elementor-counter-title.elementor-inline-editing {
  text-align: center;
}

/* Forum */
.wpf-extra-fields:empty {
  display: none !important;
}

#wpforo #wpforo-wrap .wpf-post-create .wpf-extra-fields {
  margin-bottom: 0;
  padding: 0;
}

.wpforo-widget-content.wpforo-ajax-widget.wpforo-ajax-widget-onload-false dd {
  margin-left: 0 !important;
}

.wpf-dl-item {
  margin-bottom: 8px;
}

.wpforo-main .wpforo-content .wpforo-cat-panel .cat-name {
  font-size: var(--e-global-typography-719e8d2-font-size) !important;
  font-weight: bold !important;
  font-family: var(--e-global-typography-9d6ecdd-font-family) !important;
  color: var(--e-global-color-text) !important;
}

.linkHover:hover .elementor-heading-title {
  color: var(--e-global-color-secondary) !important;
  cursor: pointer;
}

.linkHover:hover .iconMenu {
  background-color: var(--e-global-color-secondary) !important;
  cursor: pointer;
}

.jet-mega-menu.jet-mega-menu--layout-horizontal
  .jet-mega-menu-mega-container__inner {
  background-color: #fff4ef;
  padding: 0;
  border-radius: 24px;
}

.jet-mega-menu.jet-mega-menu--layout-horizontal .jet-mega-menu-mega-container {
  left: -150px;
}

body.pmpro-checkout.bebuddy-full-width-template .pmpro .pmpro_form {
  max-width: 1100px;
}

body.pmpro-checkout.bebuddy-full-width-template .pmpro {
  max-width: 1600px;
}

.pmpro .pmpro_form .pmpro_form_field-checkbox .pmpro_form_label,
.pmpro .pmpro_form .pmpro_form_label:not(.pmpro_form_label-inline),
.pmpro_form_hint {
  text-align: left;
}

input[type="radio"],
input[type="checkbox"] {
  flex-shrink: 0;
}

.member-header-actions .friendship-button {
  font-size: 0 !important;
}
.member-header-actions .friendship-button::before {
  font-size: 18px !important; /* ajuste à la taille voulue */
}

#wpforo #wpforo-wrap input[type="submit"],
#wpforo #wpforo-wrap input[type="reset"],
#wpforo #wpforo-wrap input[type="button"] {
  padding: inherit !important;
}

.member-search-form {
  position: relative;
}
#member-search-results {
  position: absolute;
  background: #fff;
  width: 100%;
  border: 1px solid #ddd;
  z-index: 999;
  margin-top: 4px;
  border-radius: 100px;
  padding: 4px 16px;
}
#member-search-results div {
  padding: 8px;
  cursor: pointer;
}

#member-search-results:empty {
  display: none;
}

#member-search-results div:hover {
  color: var(--e-global-color-accent);
}

#member-search-input {
  background-color: white;
}

/* Événement*/

.em.em-item.em-item-single .em-item-image {
  padding-bottom: 0 !important;
}
.em-event.em-item > .em-item-image {
  height: auto !important;
}

.em.em-item .em-item-image {
  height: 400px;
  width: 400px;
}

.evenement.type-evenement {
  margin-top: 64px;
}

.em.em-item.em-item-single .em-item-header {
  display: flex;
  gap: 32px;
}

.em-event-location {
  display: none;
}

.em.em-item.em-item-single .em-item-meta > section section {
  height: 164px;
}

.single-evenement .lnr-breadcrumb {
  margin-bottom: 40px;
  font-family: var(
    --e-global-typography-text-font-family,
    "Figtree",
    sans-serif
  );
  font-size: 15px;
  line-height: 1.4;
  color: #373737;
}
.single-evenement .lnr-breadcrumb a {
  color: var(--e-global-color-primary, #984d40);
  text-decoration: none;
}
.single-evenement .lnr-breadcrumb a:hover {
  text-decoration: underline;
}
.single-evenement .lnr-breadcrumb .lnr-sep {
  margin: 0 8px;
  color: #984d40;
  opacity: 0.6;
}
.single-evenement .lnr-breadcrumb .lnr-current {
  color: #373737;
  opacity: 0.75;
}

/* === Section Autres événements === */
.single-evenement .lnr-other-events {
  margin-top: 64px;
}

.single-evenement .lnr-other-events > h2 {
  font-family: var(
    --e-global-typography-primary-font-family,
    "DM Serif Display",
    serif
  );
  color: var(--e-global-color-primary, #984d40);
  margin-bottom: 24px;
}

.billing .pmpro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Annuaire */

/* Stabilise les cartes et boutons de la liste des membres (fix clignotement au survol) */
button:hover,
#members-list .item-entry,
#members-list .item-entry .item,
#members-list .item-entry .list-wrap,
#members-list li.generic-button,
#members-list .generic-button button.friendship-button {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease !important;
  transition: none !important;
  animation: none !important;
}

.lnr-type-badge {
  display: inline-block;
  background: #d28070;
  color: #fff !important;
  border-radius: 100px;
  padding: 3px 14px;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none !important;
  margin-top: 6px;
  font-weight: 500;
}
.lnr-type-badge:hover {
  background: #984d40;
}
#members-list > li .lnr-type-badge-wrap {
  text-align: center;
  margin-top: 2px;
}

#buddypress #dir-filters.component-filters {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}
#buddypress #dir-filters.component-filters > .filter {
  margin: 0 !important;
}

#members-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#members-dir-list .lnr-group-header {
  grid-column: 1 / -1 !important;
}

#members-list > li.item-entry {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

#members-list > li .list-wrap {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  border-radius: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
  padding: 28px 24px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  gap: 4px !important;
}

#members-list > li .item {
  width: 100% !important;
}

#members-list > li .item-avatar {
  margin: 0 auto !important;
}

#members-dir-list .lnr-group-header {
  width: 100%;
  box-sizing: border-box;
  font-size: 20px;
  font-weight: 700;
  color: #984d40;
  border-bottom: 2px solid #d28070;
  padding-bottom: 6px;
  margin: 0 0 32px 0; /* 32px titre -> cartes */
}
#members-dir-list .lnr-group-header.lnr-not-first {
  margin-top: 64px;
}

.hidedesktop {
  display: none;
}

#members-list .lnr-group-header {
  grid-column: 1 / -1 !important;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .hidedesktop {
    display: block;
  }
}

@media (min-width: 992px) {
  #members-list {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .friendship-button,
  .send-message,
  .mention {
    font-size: 0; /* Cache le texte */
  }

  #post-mention::after,
  .friendship-button::after,
  #send-private-message::after {
    display: block;
    font-size: 14px;
    margin-top: 8px;
  }

  #post-mention::after {
    content: "Mentionner cette membre";
  }

  #friendship-button-22::after {
    content: "Ajouter dans mon réseau";
  }

  #friendship-button-23::after {
    content: "Supprimer de mon réseau";
  }

  #send-private-message::after {
    content: "Écrire en privé";
  }

  .member-header-actions.action .generic-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
  }

  .single-headers
    #item-header-avatar
    + #item-header-content
    .action
    .generic-button {
    flex-grow: unset;
    flex-basis: unset;
  }

  ul.member-header-actions.action {
    display: flex;
    gap: 16px;
  }

  .single-headers #item-header-avatar + #item-header-content .action {
    margin-top: 0;
    position: absolute;
    right: 1rem;
    top: calc(8px - 1rem);
    transform: translateY(-50%);
  }
}

@media (max-width: 768px) {
  .bp-user-menu-dropdown {
    width: 240px;
    right: -8px;
  }
  .buddypress-wrap,
  .bp-wrapper,
  #buddypress {
    padding-left: 16px;
    padding-right: 16px;
  }

  .evenement.type-evenement {
    margin-top: 32px;
  }

  .wpforo-cat-panel .cat-name {
    font-size: 21px !important;
  }

  #members-list {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #members-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .bp-dropdown-panel {
    width: calc(100vw - 32px);
    right: -8px;
  }
}
