/* =============================================
   PAGE PROFIL PUBLIC — /user/{username}/
   body.page-um-profile
   ============================================= */

/* ── Wrapper UM reset ───────────────────────── */

body.page-um-profile .colibri-profile.um {
  width: 100% !important;
  max-width: 720px !important;
  margin: 48px auto 80px !important;
  padding: 0 22px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

/* ── Carte profil ───────────────────────────── */

.up-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: #ffffff;
  border: 1px solid rgba(45, 74, 62, 0.1);
  border-top: 3px solid #6aaf6a;
  border-radius: 0 0 6px 6px;
  padding: 28px 28px 24px;
  margin-bottom: 0;
  box-shadow:
    0 4px 16px rgba(45, 74, 62, 0.07),
    0 16px 48px rgba(45, 74, 62, 0.05);
}

/* ── Avatar ─────────────────────────────────── */

.up-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(106, 175, 106, 0.3);
  background: #2d4a3e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.up-avatar__img {
  width: 88px !important;
  height: 88px !important;
  object-fit: cover;
  border-radius: 50% !important;
  display: block;
}

.up-avatar__fallback {
  color: #ffffff;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Overlay caméra (propre profil) ─────────── */

.up-avatar--editable {
  cursor: pointer;
  position: relative;
}

.up-avatar__edit-btn {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(45, 74, 62, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}

.up-avatar--editable:hover .up-avatar__edit-btn {
  opacity: 1;
}

.up-avatar__edit-btn i {
  color: #ffffff;
  font-size: 24px;
}

.up-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── État chargement ────────────────────────── */

.up-avatar--loading .up-avatar__img {
  opacity: 0.5;
}

.up-avatar--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #6aaf6a;
  animation: up-spin 0.7s linear infinite;
}

@keyframes up-spin {
  to { transform: rotate(360deg); }
}

/* ── Infos texte ────────────────────────────── */

.up-info {
  flex: 1;
  min-width: 0;
}

.up-info__name {
  margin: 0 0 2px;
  color: #2d4a3e;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.up-info__login {
  margin: 0 0 4px;
  color: #6b4f3a;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.up-info__since {
  margin: 0 0 14px;
  color: rgba(45, 74, 62, 0.5);
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 12px;
  font-style: italic;
}

/* ── Stats (compteurs) ──────────────────────── */

.up-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.up-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #6b4f3a;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 13px;
}

.up-stat strong {
  color: #2d4a3e;
  font-weight: 700;
  font-size: 15px;
}

.up-stat-sep {
  color: rgba(45, 74, 62, 0.3);
  font-size: 15px;
  line-height: 1;
}

/* ── Onglets ────────────────────────────────── */

.up-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(45, 74, 62, 0.1);
  margin-top: 24px;
  padding: 0;
  background: transparent;
}

.up-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  color: #6b4f3a !important;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.up-tab i {
  font-size: 16px;
}

.up-tab:hover {
  color: #2d4a3e !important;
  border-bottom-color: rgba(106, 175, 106, 0.4);
}

.up-tab--active {
  color: #2d4a3e !important;
  border-bottom-color: #6aaf6a;
}

/* ── Contenu ────────────────────────────────── */

.up-body {
  background: #ffffff;
  border: 1px solid rgba(45, 74, 62, 0.1);
  border-top: none;
  padding: 0;
  min-height: 120px;
}

/* ── Items (um-item de UM) ───────────────────── */

body.page-um-profile .colibri-profile .up-body .um-item {
  display: block;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(45, 74, 62, 0.06);
}

body.page-um-profile .colibri-profile .up-body .um-item:last-child {
  border-bottom: none;
}

body.page-um-profile .colibri-profile .up-body .um-item-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

body.page-um-profile .colibri-profile .up-body .um-item-link i {
  color: rgba(45, 74, 62, 0.4);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

body.page-um-profile .colibri-profile .up-body .um-item-link a {
  color: #2d4a3e !important;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.4;
}

body.page-um-profile .colibri-profile .up-body .um-item-link a:hover {
  color: #c97c5d !important;
}

body.page-um-profile .colibri-profile .up-body .um-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 24px;
}

body.page-um-profile .colibri-profile .up-body .um-item-meta span {
  color: rgba(45, 74, 62, 0.5);
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 12px;
}

body.page-um-profile .colibri-profile .up-body .um-item-meta a {
  color: rgba(45, 74, 62, 0.5) !important;
  text-decoration: none !important;
}

body.page-um-profile .colibri-profile .up-body .um-item-meta a:hover {
  color: #c97c5d !important;
}

/* ── Vide (aucune publication / commentaire) ─── */

body.page-um-profile .colibri-profile .up-body .um-profile-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 32px 24px;
  text-align: center;
}

body.page-um-profile .colibri-profile .up-body .um-profile-note span {
  color: rgba(45, 74, 62, 0.45);
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 13px;
  font-style: italic;
}

/* ── Bouton "charger plus" ──────────────────── */

body.page-um-profile .colibri-profile .up-body .um-load-items {
  text-align: center;
  padding: 16px 24px 24px;
}

body.page-um-profile .colibri-profile .up-body .um-load-items a.um-button {
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 20px !important;
  background: transparent !important;
  border: 1.5px solid rgba(45, 74, 62, 0.2) !important;
  border-radius: 5px !important;
  color: #2d4a3e !important;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: border-color 0.18s, background 0.18s !important;
}

body.page-um-profile .colibri-profile .up-body .um-load-items a.um-button:hover {
  background: rgba(45, 74, 62, 0.05) !important;
  border-color: #6aaf6a !important;
}

/* ── Réinitialiser styles UM par défaut ─────── */

body.page-um-profile .colibri-profile .um-form-group,
body.page-um-profile .colibri-profile .um-profile-body,
body.page-um-profile .colibri-profile .um-profile-navbar,
body.page-um-profile .colibri-profile .um-profile-menu {
  display: none !important;
}

body.page-um-profile .um-cover,
body.page-um-profile .um-profile-header {
  display: none !important;
}

/* ── Toast notification ─────────────────────── */

.up-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 6px;
  font-family: "Noto Sans JP", "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s;
}

.up-toast--info    { background: #2d4a3e; color: #ffffff; }
.up-toast--success { background: #6aaf6a; color: #ffffff; }
.up-toast--error   { background: #c97c5d; color: #ffffff; }

/* ── Responsive ─────────────────────────────── */

@media (max-width: 560px) {
  body.page-um-profile .colibri-profile.um {
    padding: 0 0 !important;
    margin-top: 32px !important;
  }

  .up-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px 20px;
  }

  .up-stats {
    justify-content: center;
  }

  .up-info__name {
    font-size: 19px;
  }

  .up-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
}
