/**
 * Page Relations — profil particulier.
 *
 * La racine dediee protege le shell historique et les autres usages des
 * boutons/classes relationnelles partages.
 */

.profile-relations-page-column {
  min-width: 0;
  padding: 0 0 52px;
}

#profile-relations {
  --profile-relations-accent: var(--fl-color-entity-particulier-clair, #00a2b7);
  --profile-relations-accent-hover: color-mix(in srgb, var(--profile-relations-accent) 84%, #00343c);
  --profile-relations-accent-soft: color-mix(in srgb, var(--profile-relations-accent) 10%, #fff);
  --profile-relations-accent-softer: color-mix(in srgb, var(--profile-relations-accent) 5%, #fff);
  --profile-relations-danger: var(--fl-color-profile-action-delete, #be2828);
  --profile-relations-danger-hover: color-mix(in srgb, var(--profile-relations-danger) 86%, #2a0000);
  --profile-relations-ink: #17212b;
  --profile-relations-muted: #65788a;
  --profile-relations-border: #dbe7eb;
  --profile-relations-surface: var(--fl-color-surface, #fff);
  --profile-relations-canvas: #f6fafb;
  --profile-relations-shadow: 0 12px 34px rgba(27, 66, 76, .075);
  color: var(--profile-relations-ink);
  font-family: var(--fl-font-family-body, Poppins, Helvetica, sans-serif);
  margin: 0 auto;
  max-width: 1480px;
  min-width: 0;
  width: 100%;
}

#profile-relations *,
#profile-relations *::before,
#profile-relations *::after {
  box-sizing: border-box;
}

#profile-relations button,
#profile-relations input,
#profile-relations select {
  font-family: inherit;
}

.profile-relations-hero {
  align-items: flex-end;
  background:
    radial-gradient(circle at 91% 4%, rgba(255, 255, 255, .84) 0 7%, transparent 7.4%),
    linear-gradient(135deg, #eafafb 0%, #fff 56%, #f4fafb 100%);
  border: 1px solid var(--profile-relations-border);
  border-radius: 24px;
  box-shadow: var(--profile-relations-shadow);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.profile-relations-hero::before {
  background: linear-gradient(90deg, var(--profile-relations-accent), #31c8d7);
  border-radius: 0 0 999px 0;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  top: 0;
  width: 146px;
}

.profile-relations-hero__content {
  min-width: 0;
}

.profile-relations-eyebrow {
  color: var(--profile-relations-accent);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .105em;
  line-height: 1.3;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.profile-relations-hero h1 {
  color: var(--profile-relations-ink);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: 1.12;
  margin: 0;
}

.profile-relations-hero p {
  color: var(--profile-relations-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 10px 0 0;
  max-width: 720px;
}

.profile-relations-hero__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-end;
}

.profile-relations-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 14px 0 20px;
}

.profile-relations-metric {
  appearance: none;
  background: var(--profile-relations-surface);
  border: 1px solid var(--profile-relations-border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(29, 66, 77, .045);
  color: var(--profile-relations-ink);
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 104px;
  padding: 15px 16px;
  position: relative;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-relations-metric::after {
  background: transparent;
  border-radius: 999px;
  bottom: 10px;
  content: "";
  left: 16px;
  position: absolute;
  top: 10px;
  width: 3px;
}

.profile-relations-metric:hover,
.profile-relations-metric.is-active {
  border-color: color-mix(in srgb, var(--profile-relations-accent) 34%, transparent);
  box-shadow: 0 9px 25px rgba(22, 82, 94, .09);
  transform: translateY(-1px);
}

.profile-relations-metric.is-active::after {
  background: var(--profile-relations-accent);
}

.profile-relations-metric:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 27%, transparent);
  outline-offset: 2px;
}

.profile-relations-metric__label {
  color: var(--profile-relations-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .065em;
  padding-left: 10px;
  text-transform: uppercase;
}

.profile-relations-metric strong {
  color: var(--profile-relations-ink);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
  padding-left: 10px;
}

.profile-relations-metric__hint {
  color: var(--profile-relations-muted);
  font-size: 11px;
  line-height: 1.45;
  padding-left: 10px;
}

.profile-relations-metric--requests strong {
  color: var(--profile-relations-accent);
}

.profile-relations-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
}

.profile-relations-main,
.profile-relations-aside {
  min-width: 0;
}

.profile-relations-main {
  display: grid;
  gap: 18px;
}

.profile-relations-aside {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.profile-relations-panel {
  background: var(--profile-relations-surface);
  border: 1px solid var(--profile-relations-border);
  border-radius: 20px;
  box-shadow: 0 8px 27px rgba(28, 66, 77, .055);
  min-width: 0;
  padding: 20px;
}

.profile-relations-panel__header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-relations-panel__header h2,
.profile-relations-privacy h2 {
  color: var(--profile-relations-ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 0;
}

.profile-relations-panel__header p,
.profile-relations-privacy p {
  color: var(--profile-relations-muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 5px 0 0;
}

.profile-relations-panel__count {
  align-items: center;
  background: var(--profile-relations-accent-soft);
  border: 1px solid color-mix(in srgb, var(--profile-relations-accent) 12%, transparent);
  border-radius: 999px;
  color: var(--profile-relations-accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 5px 10px;
}

.profile-relations-request-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-relations-request-grid--received-empty {
  grid-template-columns: minmax(0, 1fr);
}

.profile-relations-request-grid--received-empty .profile-relations-list--requests {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-relations-request-column {
  background: var(--profile-relations-canvas);
  border: 1px solid var(--profile-relations-border);
  border-radius: 16px;
  min-width: 0;
  padding: 14px;
}

.profile-relations-request-column__header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-relations-request-column__header h3 {
  color: var(--profile-relations-ink);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.profile-relations-request-column__header > span {
  align-items: center;
  background: #fff;
  border: 1px solid var(--profile-relations-border);
  border-radius: 999px;
  color: var(--profile-relations-muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  min-height: 26px;
  min-width: 26px;
  padding: 3px 8px;
}

.profile-relations-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px);
  margin-bottom: 14px;
}

.profile-relations-search,
.profile-relations-sort {
  align-items: center;
  background: #fff;
  border: 1px solid var(--profile-relations-border);
  border-radius: 13px;
  color: var(--profile-relations-muted);
  display: flex;
  min-height: 46px;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.profile-relations-search:focus-within,
.profile-relations-sort:focus-within {
  border-color: var(--profile-relations-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-relations-accent) 13%, transparent);
}

.profile-relations-search__icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 42px;
  justify-content: center;
}

.profile-relations-search__icon svg,
.profile-relations-search__clear svg,
.profile-relations-state__icon svg,
.profile-relations-inline-empty__icon svg,
.profile-relations-privacy__icon svg {
  height: 100%;
  max-height: 100% !important;
  max-width: 100% !important;
  width: 100%;
}

#profile-relations .profile-relations-search__icon svg path,
#profile-relations .profile-relations-search__clear svg path,
#profile-relations .profile-relations-state__icon svg path,
#profile-relations .profile-relations-inline-empty__icon svg path,
#profile-relations .profile-relations-privacy__icon svg path {
  fill: currentColor !important;
}

.profile-relations-search input,
.profile-relations-sort select {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--profile-relations-ink);
  font-size: 13px;
  height: 44px;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  outline: 0;
  padding: 0 12px 0 0;
  width: 100%;
}

.profile-relations-search input::placeholder {
  color: #8293a2;
  opacity: 1;
}

.profile-relations-search__clear {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--profile-relations-muted);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  margin-right: 4px;
  padding: 9px;
  width: 36px;
}

.profile-relations-search__clear:hover {
  background: var(--profile-relations-accent-soft);
  color: var(--profile-relations-accent);
}

.profile-relations-sort {
  padding-left: 14px;
}

.profile-relations-sort > i {
  color: var(--profile-relations-accent);
  flex: 0 0 auto;
  font-size: 14px;
  margin-right: 10px;
}

.profile-relations-sort::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--profile-relations-muted);
  content: "";
  pointer-events: none;
  position: absolute;
  right: 14px;
}

.profile-relations-sort select {
  cursor: pointer;
  padding-right: 32px;
}

.profile-relations-result-count {
  color: var(--profile-relations-muted);
  font-size: 11px;
  line-height: 1.4;
  min-width: 92px;
  padding-top: 5px;
  text-align: right;
}

.profile-relations-tabs {
  background: var(--profile-relations-canvas);
  border: 1px solid var(--profile-relations-border);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 4px;
}

.profile-relations-tab {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--profile-relations-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: 7px 9px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.profile-relations-tab > span {
  background: rgba(101, 120, 138, .1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  max-width: 70px;
  overflow: hidden;
  padding: 3px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-relations-tab:hover {
  color: var(--profile-relations-accent);
}

.profile-relations-tab.active,
.profile-relations-tab[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 71, 82, .08);
  color: var(--profile-relations-accent);
}

.profile-relations-tab.active > span,
.profile-relations-tab[aria-selected="true"] > span {
  background: var(--profile-relations-accent-soft);
}

.profile-relations-tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 25%, transparent);
  outline-offset: 1px;
}

.profile-relations-tab-content,
.profile-relations-tab-content > .tab-pane {
  min-width: 0;
}

.profile-relations-tab-content > .tab-pane:focus {
  outline: 0;
}

.profile-relations-list,
.profile-relations-discovery__list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.profile-relation-card {
  list-style: none;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.profile-relation-card[hidden] {
  display: none !important;
}

.profile-relation-card.is-removing {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .15s ease, transform .15s ease;
}

.profile-relation-card__inner {
  align-items: center;
  background: #fff;
  border: 1px solid var(--profile-relations-border);
  border-radius: 16px;
  display: grid;
  gap: 13px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-relation-card__inner:hover {
  border-color: color-mix(in srgb, var(--profile-relations-accent) 29%, transparent);
  box-shadow: 0 8px 22px rgba(25, 76, 88, .075);
  transform: translateY(-1px);
}

.profile-relation-card__avatar {
  align-self: center;
  border-radius: 50%;
  display: block;
  height: 56px;
  overflow: hidden;
  position: relative;
  width: 56px;
}

.profile-relation-card__avatar::after {
  border: 2px solid color-mix(in srgb, var(--profile-relations-accent) 20%, transparent);
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.profile-relation-card__avatar picture,
.profile-relation-card__avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-relation-card__body {
  min-width: 0;
}

.profile-relation-card__title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.profile-relation-card__name {
  color: var(--profile-relations-ink);
  font-size: 14px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-relation-card__name:hover {
  color: var(--profile-relations-accent);
  text-decoration: none;
}

.profile-relation-card__status {
  background: var(--profile-relations-accent-soft);
  border-radius: 999px;
  color: var(--profile-relations-accent);
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.3;
  padding: 3px 7px;
  white-space: nowrap;
}

.profile-relation-card--requests_sent .profile-relation-card__status {
  background: #fff3e8;
  color: #9a4c00;
}

.profile-relation-card__handle {
  color: var(--profile-relations-muted);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-relation-card__meta {
  align-items: center;
  color: var(--profile-relations-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
  gap: 8px 12px;
  line-height: 1.4;
  margin-top: 5px;
}

.profile-relation-card__meta span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.profile-relation-card__meta i {
  color: var(--profile-relations-accent);
  flex: 0 0 auto;
}

.profile-relation-card__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

#profile-relations .profile-relations-button {
  align-items: center;
  appearance: none;
  border: 0;
  border-radius: 999px;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  height: 40px !important;
  justify-content: flex-start;
  line-height: 1;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 2px 14px 2px 2px !important;
  position: relative;
  text-decoration: none !important;
  transition: background .18s ease, box-shadow .18s ease, transform .12s ease;
  white-space: nowrap;
  width: auto !important;
}

#profile-relations .profile-relations-button--entity,
#profile-relations .profile-relations-button--neutral {
  background: var(--profile-relations-accent) !important;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--profile-relations-accent-hover) 16%, transparent);
}

#profile-relations .profile-relations-button--entity:hover,
#profile-relations .profile-relations-button--neutral:hover {
  background: var(--profile-relations-accent-hover) !important;
  box-shadow: 0 9px 20px color-mix(in srgb, var(--profile-relations-accent-hover) 21%, transparent);
}

#profile-relations .profile-relations-button--danger {
  background: var(--profile-relations-danger) !important;
  border: 0 !important;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--profile-relations-danger) 15%, transparent);
}

#profile-relations .profile-relations-button--danger:hover {
  background: var(--profile-relations-danger-hover) !important;
  box-shadow: 0 9px 20px color-mix(in srgb, var(--profile-relations-danger-hover) 20%, transparent);
}

#profile-relations .profile-relations-button:hover {
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

#profile-relations .profile-relations-button:active {
  box-shadow: none;
  transform: translateY(0);
}

#profile-relations .profile-relations-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 28%, transparent);
  outline-offset: 3px;
}

#profile-relations .profile-relations-button--danger:focus-visible {
  outline-color: color-mix(in srgb, var(--profile-relations-danger) 30%, transparent);
}

#profile-relations .profile-relations-button[disabled],
#profile-relations .profile-relations-button.is-busy {
  cursor: wait;
  opacity: .72;
  pointer-events: none;
}

#profile-relations .profile-relations-button .icon-circle {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  color: var(--profile-relations-accent);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  padding: 7px;
  width: 36px;
}

#profile-relations .profile-relations-button--danger .icon-circle {
  color: var(--profile-relations-danger);
}

#profile-relations .profile-relations-button .icon-circle > svg,
#profile-relations .profile-relations-button .icon-circle > i {
  display: block;
  flex: 0 0 auto;
  font-size: 20px;
  height: 21px !important;
  line-height: 21px;
  max-height: 21px !important;
  max-width: 21px !important;
  text-align: center;
  width: 21px !important;
}

#profile-relations .profile-relations-button .icon-circle svg path,
#profile-relations .profile-relations-button .icon-circle svg g,
#profile-relations .profile-relations-button .icon-circle svg polygon,
#profile-relations .profile-relations-button .icon-circle svg circle {
  fill: currentColor !important;
}

#profile-relations .profile-relations-button .btn-text {
  color: #fff !important;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-decoration: none !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-relation-card__menu {
  flex: 0 0 auto;
}

.profile-relation-card__menu-toggle {
  align-items: center;
  appearance: none;
  background: var(--profile-relations-accent);
  border: 0;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  transition: background .18s ease, box-shadow .18s ease;
  width: 40px;
}

.profile-relation-card__menu-toggle:hover,
.profile-relation-card__menu-toggle[aria-expanded="true"] {
  background: var(--profile-relations-accent-hover);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--profile-relations-accent-hover) 16%, transparent);
}

.profile-relation-card__menu-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 28%, transparent);
  outline-offset: 2px;
}

#profile-relations .profile-relation-card__menu .dropdown-menu {
  border: 1px solid var(--profile-relations-border);
  border-radius: 13px;
  box-shadow: 0 16px 34px rgba(24, 56, 68, .14);
  min-width: 226px;
  padding: 6px;
}

#profile-relations .profile-relation-card__menu .dropdown-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--profile-relations-ink);
  display: flex;
  font-size: 12px;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

#profile-relations .profile-relation-card__menu .dropdown-item:hover,
#profile-relations .profile-relation-card__menu .dropdown-item:focus-visible {
  background: var(--profile-relations-accent-softer);
  color: var(--profile-relations-accent);
}

#profile-relations .profile-relation-card__menu .profile-relation-card__remove,
#profile-relations .profile-relation-card__menu .profile-relation-card__remove:hover,
#profile-relations .profile-relation-card__menu .profile-relation-card__remove:focus-visible {
  color: var(--profile-relations-danger);
}

.profile-relations-list--requests .profile-relation-card__inner {
  align-items: start;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
}

.profile-relations-list--requests .profile-relation-card__avatar {
  height: 46px;
  width: 46px;
}

.profile-relations-list--requests .profile-relation-card__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: 1px;
  width: 100%;
}

.profile-relations-list--requests .profile-relations-button {
  flex: 1 1 auto !important;
  max-width: 100%;
}

.profile-relations-list--requests .profile-relation-card__meta {
  display: none;
}

.profile-relations-list--requests.is-collapsed > .profile-relation-card:nth-child(n + 4) {
  display: none;
}

.profile-relations-request-toggle {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--profile-relations-accent);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  margin-top: 9px;
  min-height: 40px;
  padding: 7px 9px;
  width: 100%;
}

.profile-relations-request-toggle:hover {
  background: var(--profile-relations-accent-soft);
}

.profile-relations-request-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 25%, transparent);
  outline-offset: 1px;
}

.profile-relations-discovery__list {
  gap: 9px;
}

.profile-relations-discovery .profile-relation-card__inner {
  align-items: start;
  background: var(--profile-relations-canvas);
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
}

.profile-relations-discovery .profile-relation-card__avatar {
  height: 48px;
  width: 48px;
}

.profile-relations-discovery .profile-relation-card__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  width: 100%;
}

.profile-relations-discovery .profile-relations-button {
  max-width: 100%;
}

.profile-relations-discovery .profile-relation-card__meta {
  display: none;
}

.profile-relations-load-more {
  align-items: center;
  appearance: none;
  background: var(--profile-relations-accent-softer);
  border: 1px solid color-mix(in srgb, var(--profile-relations-accent) 18%, transparent);
  border-radius: 12px;
  color: var(--profile-relations-accent);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  justify-content: center;
  margin-top: 12px;
  min-height: 44px;
  padding: 9px 14px;
  width: 100%;
}

.profile-relations-load-more:hover {
  background: var(--profile-relations-accent-soft);
}

.profile-relations-load-more:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-relations-accent) 25%, transparent);
  outline-offset: 2px;
}

.profile-relations-load-more.done {
  cursor: default;
  opacity: .72;
}

.profile-relations-inline-empty,
.profile-relations-login-gate {
  align-items: flex-start;
  background: #fff;
  border: 1px dashed var(--profile-relations-border);
  border-radius: 13px;
  color: var(--profile-relations-muted);
  display: flex;
  gap: 10px;
  padding: 12px;
}

.profile-relations-inline-empty__icon,
.profile-relations-privacy__icon,
.profile-relations-state__icon {
  align-items: center;
  background: var(--profile-relations-accent-soft);
  border-radius: 50%;
  color: var(--profile-relations-accent);
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  padding: 8px;
  width: 36px;
}

.profile-relations-inline-empty strong {
  color: var(--profile-relations-ink);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.profile-relations-inline-empty p,
.profile-relations-login-gate p {
  font-size: 11px;
  line-height: 1.5;
  margin: 3px 0 0;
}

.profile-relations-login-gate {
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 12px;
}

.profile-relations-login-gate p {
  flex: 1 1 220px;
  margin: 0;
}

.profile-relations-state {
  align-items: center;
  background: var(--profile-relations-canvas);
  border: 1px dashed var(--profile-relations-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 28px 18px;
  text-align: center;
}

.profile-relations-state__icon {
  height: 48px;
  margin-bottom: 12px;
  padding: 11px;
  width: 48px;
}

.profile-relations-state h3 {
  color: var(--profile-relations-ink);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.profile-relations-state p {
  color: var(--profile-relations-muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 6px 0 0;
  max-width: 420px;
}

.profile-relations-state--private .profile-relations-state__icon {
  background: #fff2e7;
  color: #9a4c00;
}

.profile-relations-state--search {
  margin-top: 10px;
  min-height: 180px;
}

.profile-relations-text-link {
  color: var(--profile-relations-accent);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  margin-top: 12px;
  text-decoration: none;
}

.profile-relations-text-link:hover {
  color: var(--profile-relations-accent-hover);
  text-decoration: underline;
}

.profile-relations-text-link--arrow {
  align-items: center;
}

.profile-relations-privacy {
  align-items: flex-start;
  background: linear-gradient(145deg, #f2fbfc 0%, #fff 100%);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
}

.profile-relations-privacy__icon {
  height: 42px;
  padding: 9px;
  width: 42px;
}

.profile-relations-confirm-dialog {
  align-items: center;
  background: rgba(18, 38, 46, .56);
  backdrop-filter: blur(2px);
  color: var(--profile-relations-ink);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  position: fixed;
  z-index: 100100;
}

.profile-relations-confirm-dialog[hidden] {
  display: none;
}

.profile-relations-confirm-dialog__surface {
  background: var(--profile-relations-surface);
  border: 1px solid var(--profile-relations-border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(18, 47, 58, .2);
  max-height: calc(100vh - 32px);
  max-width: 560px;
  overflow: hidden;
  width: 100%;
}

.profile-relations-confirm-dialog .modal-header,
.profile-relations-confirm-dialog .modal-footer {
  border-color: var(--profile-relations-border);
  gap: 10px;
  padding: 18px 20px;
}

.profile-relations-confirm-dialog .modal-title {
  color: var(--profile-relations-ink);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.profile-relations-confirm-dialog .modal-body {
  color: var(--profile-relations-muted);
  font-size: 13px;
  line-height: 1.65;
  padding: 20px;
}

.profile-relations-confirm-dialog .modal-body p {
  margin: 0;
}

.profile-relations-status {
  bottom: 18px;
  left: 50%;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  z-index: 100050;
}

.profile-relations-status.is-visible {
  background: #173941;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(18, 47, 58, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 15px;
  text-align: center;
  width: max-content;
}

@media (max-width: 1199.98px) {
  .profile-relations-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-relations-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    position: static;
  }

  .profile-relations-discovery,
  .profile-relations-privacy {
    height: 100%;
  }

  .profile-relations-discovery__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .profile-relations-page-column {
    padding-bottom: 32px;
  }

  #profile-relations {
    padding: 0 12px;
  }

  .profile-relations-hero {
    align-items: stretch;
    border-radius: 20px;
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px 20px;
  }

  .profile-relations-hero h1 {
    font-size: 28px;
  }

  .profile-relations-hero__actions,
  .profile-relations-hero__actions .profile-relations-button {
    justify-content: flex-start;
    width: 100% !important;
  }

  .profile-relations-metrics {
    display: flex;
    gap: 9px;
    margin: 12px 0 16px;
    overflow-x: auto;
    padding: 2px 1px 7px;
    scroll-snap-type: x proximity;
  }

  .profile-relations-metric {
    flex: 0 0 158px;
    min-height: 100px;
    scroll-snap-align: start;
  }

  .profile-relations-panel {
    border-radius: 17px;
    padding: 15px;
  }

  .profile-relations-request-grid,
  .profile-relations-toolbar,
  .profile-relations-aside,
  .profile-relations-discovery__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-relations-request-grid--received-empty .profile-relations-list--requests {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-relations-panel__header--directory {
    flex-direction: column;
    gap: 4px;
  }

  .profile-relations-result-count {
    min-width: 0;
    padding: 0;
    text-align: left;
  }

  .profile-relations-tabs {
    overflow-x: auto;
  }

  .profile-relations-tab {
    min-height: 44px;
    min-width: 112px;
  }

  .profile-relation-card__inner {
    align-items: start;
    gap: 11px;
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 11px;
  }

  .profile-relation-card__avatar {
    height: 52px;
    width: 52px;
  }

  .profile-relation-card__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: 100%;
  }

  #profile-relations .profile-relations-button {
    height: 44px !important;
    min-height: 44px;
    padding: 2px 15px 2px 2px !important;
  }

  #profile-relations .profile-relations-button .icon-circle {
    flex-basis: 40px;
    height: 40px;
    padding: 8px;
    width: 40px;
  }

  #profile-relations .profile-relations-button .icon-circle > svg,
  #profile-relations .profile-relations-button .icon-circle > i {
    font-size: 21px;
    height: 22px !important;
    line-height: 22px;
    max-height: 22px !important;
    max-width: 22px !important;
    width: 22px !important;
  }

  .profile-relation-card__menu-toggle {
    height: 44px;
    width: 44px;
  }

  .profile-relations-list--requests .profile-relations-button {
    flex: 1 1 150px !important;
  }

  .profile-relations-request-toggle {
    min-height: 44px;
  }

  .profile-relations-confirm-dialog .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .profile-relations-confirm-dialog .modal-footer .profile-relations-button {
    justify-content: flex-start;
    width: 100% !important;
  }
}

@media (max-width: 399.98px) {
  #profile-relations {
    padding: 0 9px;
  }

  .profile-relations-hero {
    padding-left: 17px;
    padding-right: 17px;
  }

  .profile-relations-panel {
    padding: 13px;
  }

  .profile-relations-tabs {
    display: flex;
  }

  .profile-relations-tab {
    flex: 0 0 122px;
  }

  .profile-relation-card__actions .profile-relations-button {
    flex: 1 1 180px !important;
  }
}

body.night-mode #profile-relations {
  --profile-relations-accent: var(--fl-color-entity-particulier-clair, #00a2b7);
  --profile-relations-accent-hover: color-mix(in srgb, var(--profile-relations-accent) 84%, #00343c);
  --profile-relations-accent-soft: color-mix(in srgb, var(--profile-relations-accent) 12%, transparent);
  --profile-relations-accent-softer: color-mix(in srgb, var(--profile-relations-accent) 7%, transparent);
  --profile-relations-ink: var(--fl-color-dark-text, #c1d4e3);
  --profile-relations-muted: #91a7b8;
  --profile-relations-border: var(--fl-color-dark-border, #2e3f4d);
  --profile-relations-surface: var(--fl-color-dark-surface, #262d34);
  --profile-relations-canvas: var(--fl-color-dark-canvas, #1e252b);
}

body.night-mode .profile-relations-hero {
  background: linear-gradient(135deg, #24353b 0%, #262d34 58%, #223037 100%);
}

body.night-mode #profile-relations .profile-relations-metric,
body.night-mode #profile-relations .profile-relations-search,
body.night-mode #profile-relations .profile-relations-sort,
body.night-mode #profile-relations .profile-relations-tab.active,
body.night-mode #profile-relations .profile-relation-card__inner,
body.night-mode #profile-relations .profile-relations-inline-empty,
body.night-mode #profile-relations .profile-relations-login-gate,
body.night-mode #profile-relations .profile-relations-request-column__header > span {
  background: var(--profile-relations-surface);
}

body.night-mode #profile-relations .profile-relations-privacy {
  background: linear-gradient(145deg, #253a40 0%, #262d34 100%);
}

@media (prefers-reduced-motion: reduce) {
  #profile-relations *,
  #profile-relations *::before,
  #profile-relations *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
