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

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

.profile__top {
  align-items: center;
  display: flex;
  gap: var(--space-4);
}

.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: var(--ds-font-size-2xl);
  font-weight: var(--ds-font-weight-semibold);
  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: var(--ds-font-size-lg);
  font-weight: var(--ds-font-weight-semibold);
  gap: var(--space-2);
  line-height: var(--ds-line-height-heading);
  margin: 0;
  overflow-wrap: anywhere;
}

/* Badge Nivo : discret, jamais une stat héros (R1, R11) */

.profile__since {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  margin: var(--space-1) 0 0;
}

.profile__bio {
  color: var(--color-text);
  font-size: var(--ds-font-size-sm);
  line-height: var(--ds-line-height-prose);
  margin: var(--space-3) 0 0;
  overflow-wrap: anywhere;
}

.profile__cta {
  margin-top: var(--space-4);
}

.profile__cta form {
  margin: 0;
}



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

.profile__stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 0;
  padding-right: var(--ds-space-7);
}

.profile__stat dd {
  color: var(--color-text);
  font-size: var(--ds-font-size-xl);
  font-weight: var(--ds-font-weight-semibold);
  margin: 0;
}

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

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

/* Lignes de contribution */
.profile-row {
  border-bottom: 1px solid var(--color-border-subtle);
  color: inherit;
  display: grid;
  gap: var(--space-2);
  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: var(--ds-font-size-xs);
}

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

.profile-row__title {
  color: var(--color-text);
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  letter-spacing: var(--ds-letter-spacing-tight);
  line-height: var(--ds-line-height-heading);
  margin: 0;
}

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

.profile-row__acts {
  align-items: center;
  color: var(--color-text-muted);
  display: flex;
  font-size: var(--ds-font-size-sm);
  gap: var(--space-5);
}

.profile-row__acts > span {
  align-items: center;
  display: inline-flex;
  gap: var(--space-1);
}

.profile-row__acts .icon {
  color: var(--color-accent);
}

/* 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 ─── */
.edit-profile {
  padding: var(--space-6) var(--space-4) var(--space-10);
}

.edit-profile__photo {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--ds-space-7);
}

.edit-profile__avatar {
  font-size: var(--ds-font-size-2xl);
  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; /* boucle de chargement : durée hors jetons assumée */
  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: var(--space-1) var(--space-4);
}

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

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

/* Le champ fichier est caché dans le libellé : l'anneau de focus du système passe sur le libellé */
.edit-profile__link:focus-within {
  outline: 2px solid var(--ds-info);
  outline-offset: 2px;
}

.edit-profile__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@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: var(--ds-font-size-md);
  line-height: var(--ds-line-height-prose);
  margin: 0;
  padding: var(--space-4) var(--space-4) var(--space-1);
}

.info-page__note {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  line-height: var(--ds-line-height-body);
  margin: var(--space-1) 0 0;
  padding: 0 var(--space-4);
}

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

/* Nivo et Meday : des lignes du système (ds-row). Une explication ne se coupe pas : elle passe à la ligne,
   comme ds-row__meta au téléphone (« une description coupée ne dit plus rien »). */
.info-page .ds-row__meta {
  white-space: normal;
}

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

/* Le niveau de la personne : une zone en retrait, en plus de la pastille « Nivo ou » */
.level--mine {
  background: var(--ds-bg-subtle);
}

.level__name {
  align-items: center;
  display: flex;
  gap: var(--space-2);
}

.level__perk {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
}

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

/* Meday : gagnée, l'icône à l'encre ; à découvrir, l'icône au repos */
.medal .ds-row__icon {
  color: var(--color-text-subtle);
}

.medal--earned .ds-row__icon {
  color: var(--color-text);
}

.medal__when {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
}

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

.follow-tabs .ds-tab {
  flex: 1;
  gap: var(--space-2);
  justify-content: center;
  padding: 0 var(--space-2);
}

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

/* ─── Kategori mwen swiv : une ligne R7 par catégorie, bouton à droite ─── */

/* Kategori mwen swiv : des lignes du système, pleine largeur de la colonne */
.category-follow__name {
  color: inherit;
  text-decoration: none;
}
