/* ─── Profil V2 (handoff R1 : screens/profile.html) ─── */
.profile {
  margin: 0 auto;
  max-width: var(--layout-reading-max);
}

.profile__head {
  padding: 18px var(--space-4) 0;
}

.profile__top {
  align-items: center;
  display: flex;
  gap: 14px;
}

.profile__avatar {
  align-items: center;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.875rem;
  font-weight: 650;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.profile__avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile__id {
  min-width: 0;
}

.profile__name {
  align-items: center;
  color: var(--color-text);
  display: flex;
  flex-wrap: wrap;
  font-size: 1.1875rem;
  font-weight: 700;
  gap: var(--space-2);
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

/* Badge Nivo : discret, jamais une stat héros (R1, R11) */
.profile__level {
  align-items: center;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  display: inline-flex;
  font-size: 0.71875rem;
  font-weight: 650;
  gap: 3px;
  padding: 2px 8px 2px 6px;
}

.profile__level .material-icons {
  font-size: 13px;
}

.profile__since {
  color: var(--color-text-subtle);
  font-size: 0.78125rem;
  margin: 3px 0 0;
}

.profile__bio {
  color: var(--color-text);
  font-size: 0.90625rem;
  line-height: 1.55;
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}

.profile__cta {
  margin-top: 14px;
}

.profile__cta form {
  margin: 0;
}

.profile__cta .btn {
  gap: 6px;
}

.profile__cta .btn .material-icons {
  font-size: 18px;
}

.profile__stats {
  border-bottom: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  display: flex;
  margin: 18px 0 4px;
  padding: 14px 0;
}

.profile__stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  padding-right: 28px;
}

.profile__stat dd {
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.profile__stat dt {
  color: var(--color-text-muted);
  font-size: 0.78125rem;
}

.profile__tabs {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  margin: 6px calc(var(--space-4) * -1) 0;
  padding: 0 var(--space-1);
}

.profile__tab {
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: -1px;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

.profile__tab.is-active {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

/* Lignes de contribution */
.profile-row {
  border-bottom: 1px solid var(--color-border);
  color: inherit;
  display: grid;
  gap: 7px;
  padding: var(--space-4);
  text-decoration: none;
}

@media (hover: hover) {
  .profile-row:hover {
    background: var(--color-surface-soft);
  }
}

.profile-row__meta,
.profile-row__ctx {
  color: var(--color-text-muted);
  font-size: 0.78125rem;
}

.profile-row__ctx {
  color: var(--color-text-subtle);
}

.profile-row__title {
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

.profile-row__body {
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-row__acts {
  align-items: center;
  color: var(--color-text-muted);
  display: flex;
  font-size: 0.8125rem;
  gap: 20px;
}

.profile-row__acts > span {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.profile-row__acts .material-icons {
  color: var(--color-accent);
  font-size: 17px;
}

/* Titre d'un onglet racine dans l'en-tête (« Pwofil ou ») */
.navbar-title--root {
  margin-left: 0;
}

/* Modifye pwofil : foto */
/* ─── Modifye pwofil (V2) : écran poussé, champs ouverts, « Sove » dans l'en-tête ─── */
.nav-save {
  align-items: center;
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--color-on-accent);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 680;
  min-height: 36px;
  padding: 0 16px;
}

.nav-save:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.edit-profile {
  padding: 24px 16px 40px;
}

.edit-profile__photo {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.edit-profile__avatar {
  font-size: 2.25rem;
  height: 88px;
  position: relative;
  width: 88px;
}

.edit-profile__avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.edit-profile__spinner {
  animation: edit-profile-spin 0.8s linear infinite;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  border-top-color: var(--color-text);
  display: none;
  height: 28px;
  left: calc(50% - 14px);
  position: absolute;
  top: calc(50% - 14px);
  width: 28px;
}

.edit-profile__avatar.is-busy img,
.edit-profile__avatar.is-busy > span:not(.edit-profile__spinner) {
  opacity: 0.35;
}

.edit-profile__avatar.is-busy .edit-profile__spinner {
  display: block;
}

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

.edit-profile__photo-actions {
  align-items: center;
  display: flex;
  gap: 4px 18px;
}

.edit-profile__photo-actions form {
  margin: 0;
}

.edit-profile__photo-actions form[hidden] {
  display: none;
}

.edit-profile__link {
  align-items: center;
  background: none;
  border: 0;
  color: var(--color-accent);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  min-height: 44px;
  padding: 0;
}

.edit-profile__link--muted {
  color: var(--color-text-muted);
  font-weight: 560;
}

.edit-profile__link:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.edit-profile__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .edit-profile__spinner {
    animation-duration: 2s;
  }
}

/* ─── Pages d'info sobres (Nivo, Meday) — R11 ─── */
.info-page {
  margin: 0 auto;
  max-width: var(--layout-reading-max);
  padding-bottom: var(--space-8);
}

.info-page__intro {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
  padding: 18px 18px 4px;
}

.info-page__note {
  color: var(--color-text-subtle);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 4px 0 0;
  padding: 0 18px;
}

.info-page__thanks {
  color: var(--color-accent);
  font-weight: 650;
  margin: var(--space-6) 0 0;
  text-align: center;
}

.list-row--static {
  align-items: flex-start;
  cursor: default;
}

.list-row--static:hover {
  background: none;
}

.list-row__sub {
  color: var(--color-text-muted);
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-top: 2px;
}

.levels {
  list-style: none;
  margin: 0;
  padding: 0;
}

.level {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  padding: 14px 18px;
}

.level--mine {
  background: var(--color-accent-soft);
}

.level__icon {
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.level__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.level__name {
  align-items: center;
  color: var(--color-text);
  display: flex;
  font-weight: 680;
  gap: var(--space-2);
}

.level__desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.level__perk {
  color: var(--color-text-subtle);
  font-size: 0.78125rem;
}

.level__perk::before {
  content: "· ";
}

/* ─── Page Meday (R11) : mêmes lignes que les niveaux de la page Nivo ─── */
.medal {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  padding: 14px 18px;
}

.medal__icon {
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-subtle);
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.medal--earned .medal__icon {
  background: var(--color-accent-soft);
  border-color: transparent;
  color: var(--color-accent);
}

.medal__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.medal__name {
  color: var(--color-text);
  font-weight: 680;
}

.medal__story,
.medal__how {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.medal__when {
  color: var(--color-text-subtle);
  font-size: 0.78125rem;
}

/* ─── Swiv : deux onglets pleine largeur, compteur discret ─── */
.follow-tabs {
  margin: 0;
  padding: 0;
}

.follow-tabs .profile__tab {
  flex: 1;
  gap: 6px;
  justify-content: center;
  padding: 0 8px;
}

.follow-tabs small {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ─── Kategori mwen swiv : une ligne R7 par catégorie, bouton à droite ─── */
.category-follow {
  align-items: center;
  min-height: 60px;
  padding-bottom: 8px;
  padding-top: 8px;
}

.category-follow + .category-follow {
  border-top: 1px solid var(--color-border);
}

.category-follow__name {
  color: var(--color-text);
  flex: 1;
  text-decoration: none;
}

.category-follow form {
  margin: 0;
}
