/* docs/compte/favoris.css
   Étoile des favoris et section « Mes suivis » (docs/compte/favoris.js).
   Uniquement les variables CSS du site : suit le thème clair/sombre. */

/* ---------------------------------------------------------------- étoile */

.compte-etoile-hote {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
}

.compte-etoile {
  /* Cible tactile de 44 px minimum, quelle que soit la taille de l'icône. */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.compte-etoile:hover {
  color: var(--gold);
  background: var(--bg-3);
}

.compte-etoile:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.compte-etoile:active {
  transform: scale(.92);
}

.compte-etoile-icone {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.compte-etoile[aria-pressed="true"] {
  color: var(--gold);
}

.compte-etoile[aria-pressed="true"] .compte-etoile-icone {
  fill: currentColor;
}

/* Petit message (connexion requise, échec) affiché sous l'étoile. */
.compte-etoile-message {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 5;
  width: max-content;
  max-width: 240px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-2);
  color: var(--text);
  font-size: var(--text-xs);
  line-height: var(--lh-snug);
  white-space: normal;
}

.compte-etoile-message[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .compte-etoile { transition: none; }
  .compte-etoile:active { transform: none; }
}

/* ------------------------------------------------------------ mes suivis */

.compte-suivis-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.compte-suivis-titre {
  margin: 0;
  color: var(--text);
  font-size: var(--text-lg);
  line-height: var(--lh-tight);
}

.compte-suivis-groupe {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.compte-suivis-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  overflow: hidden;
}

.compte-suivi {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-left: var(--space-4);
  padding-right: var(--space-1);
  border-top: 1px solid var(--border-subtle);
}

.compte-suivi:first-child {
  border-top: 0;
}

.compte-suivi-lien {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2) 0;
  color: var(--text);
  text-decoration: none;
}

a.compte-suivi-lien:hover .compte-suivi-nom {
  color: var(--gold);
}

a.compte-suivi-lien:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.compte-suivi-nom {
  overflow: hidden;
  font-size: var(--text-base);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compte-suivi-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compte-suivi-absent .compte-suivi-nom {
  color: var(--muted);
}

.compte-suivi-score {
  flex: none;
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Même code couleur que les scores du site : vert si >= 0, rouille sinon. */
.compte-score-positif { color: var(--green-500); }
.compte-score-negatif { color: var(--rust); }

.compte-suivi-ter {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
}

.compte-suivis-etat {
  padding: var(--space-5) var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

.compte-suivis-etat p {
  margin: 0;
}

.compte-suivis-etat p + p,
.compte-suivis-etat p + .compte-suivis-bouton {
  margin-top: var(--space-3);
}

.compte-suivis-aide {
  color: var(--text-faint);
  font-size: var(--text-xs);
}

.compte-suivis-bouton {
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.compte-suivis-bouton:hover {
  background: var(--bg-3);
}

.compte-suivis-bouton:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
