/*
 * La page d'un voyageur (comptes/templates/comptes/profil.html), comme un profil d'application (ADR 0028) :
 * l'en-tête, les voyages « à la une » en vignettes rondes, puis la grille de ses cartes postales.
 */
.profil {
  padding-top: var(--esp-4);
}

.profil-entete {
  display: flex;
  align-items: center;
  gap: var(--esp-4);
  margin-bottom: var(--esp-4);
}

.profil-avatar {
  width: 80px;
  height: 80px;
  background: var(--vermillon);
  color: var(--sur-vermillon);
  font-size: 1.5rem;
}

.profil-identite {
  min-width: 0;
}

.profil-pseudo {
  margin-bottom: var(--esp-1);
  font: 800 1.5rem/1.25 var(--texte);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.profil-etiquette {
  display: inline-block;
  margin: 0 0 var(--esp-1);
  padding: var(--esp-1) var(--esp-2);
  border-radius: var(--rayon-md);
  background: var(--soleil-pale);
  color: var(--encre);
  font-size: 0.875rem;
  font-weight: 600;
}

.profil-depart {
  margin: 0;
  color: var(--encre-douce);
  font-weight: 600;
}

/*
 * Cartes, abonnés, abonnements sur une ligne, puis Suivre et Écrire : le bloc .relation (remplacé par htmx) se
 * fond dans cette rangée (display: contents), ses compteurs à côté du nombre de cartes.
 */
.profil-chiffres {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--esp-2) var(--esp-5);
  margin-bottom: var(--esp-4);
}

.profil-chiffres .relation {
  display: contents;
}

.profil-nombre-de-cartes {
  margin: 0;
}

.profil-sous-titre {
  margin: 0 0 var(--esp-3);
  font-size: 1rem;
}

.profil-partie {
  margin-top: var(--esp-5);
}

.profil-texte {
  color: var(--encre-douce);
}

.profil-mes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
}

.profil-mes-actions .bouton {
  flex: 1 1 10rem;
}

/* Le rouage des réglages : une cible carrée de 44 px, à droite des deux boutons. */
.profil-mes-actions .profil-reglages {
  flex: 0 0 var(--cible-tactile);
  width: var(--cible-tactile);
  padding: 0;
}

.profil-reglages .menu-compte-svg {
  width: 22px;
  height: 22px;
}

/* Les voyages « à la une » : une rangée de vignettes rondes qui défile, comme des souvenirs épinglés. */
.a-la-une {
  display: flex;
  gap: var(--esp-3);
  margin: 0 calc(-1 * var(--esp-4));
  padding: var(--esp-1) var(--esp-4) var(--esp-2);
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.a-la-une > li {
  flex: none;
  scroll-snap-align: start;
}

.a-la-une-lien {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--esp-2);
  width: 84px;
  padding: var(--esp-1) 0;
  border-radius: var(--rayon-md);
  color: var(--encre);
  text-decoration: none;
}

.a-la-une-rond {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--rayon-pilule);
  background: var(--chargement);
  box-shadow: 0 0 0 2px var(--papier), 0 0 0 3.5px var(--trait-fort);
}

.a-la-une-rond img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.a-la-une-plus {
  background: var(--carton);
  color: var(--vermillon);
  font: 400 1.75rem/1 var(--texte);
}

/* Le titre du voyage, en deux lignes au plus */
.a-la-une-titre {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font: 600 0.75rem/1.3 var(--texte);
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.a-la-une-lien:hover .a-la-une-titre {
  text-decoration: underline;
}

/* La grille des cartes postales : 3 colonnes de vignettes carrées, bord à bord sur téléphone. */
.grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 37.49rem) {
  .grille {
    margin: 0 calc(-1 * (var(--esp-4) + var(--zone-droite))) 0 calc(-1 * (var(--esp-4) + var(--zone-gauche)));
  }
}

.grille-vignette {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--chargement);
}

/* « Original certifié » ou « vérifié » : un petit bouclier dans le coin de la vignette (le nom est caché). */
.grille-badge {
  position: absolute;
  right: var(--esp-1);
  bottom: var(--esp-1);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--rayon-pilule);
  background: var(--sapin);
  color: var(--carton);
}

.grille-badge .icone {
  width: 14px;
  height: 14px;
}

.grille-vignette img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grille-vignette:focus-visible {
  position: relative;
  z-index: 1;
}

.grille-suite {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  padding-top: var(--esp-4);
}

/* Les raccourcis, sur sa propre page */
.raccourcis-liste {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--trait);
  list-style: none;
}

.raccourcis-liste > li {
  border-bottom: 1px solid var(--trait);
}

.raccourci {
  display: flex;
  align-items: center;
  min-height: var(--cible-tactile);
  padding: var(--esp-2) 0;
  color: var(--encre);
  font-weight: 600;
  text-decoration: none;
}

.raccourci::after {
  margin-left: auto;
  padding-left: var(--esp-3);
  color: var(--encre-douce);
  content: "›";
}

.raccourci:hover {
  color: var(--vermillon);
}

.raccourcis-pied {
  margin-top: var(--esp-3);
  color: var(--encre-douce);
  font-size: 0.8125rem;
}

/* Abonnement : compteurs, bouton Suivre et son état (abonnements/relation.html) */
.relation {
  margin: var(--esp-3) 0 var(--esp-4);
}

/* « 3 abonnés », « 2 abonnements » (et le nombre de cartes postales, à côté) : le nombre en gras, au-dessus. */
.relation-compteurs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2) var(--esp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.relation-compteurs,
.profil-nombre-de-cartes {
  color: var(--encre-douce);
  font-size: 0.875rem;
}

.relation-compteurs a {
  display: inline-block;
  min-height: var(--cible-tactile);
  color: inherit;
  text-decoration: none;
}

.relation-compteurs a:hover {
  text-decoration: underline;
}

.relation-nombre {
  display: block;
  color: var(--encre);
  font: 800 1.125rem/1.2 var(--texte);
}

.relation-actions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--esp-3);
}

.relation-actions form,
.relation-etat {
  margin: 0;
}

.relation-etat {
  padding: var(--esp-1) var(--esp-3);
  border-radius: var(--rayon-pilule);
  background: var(--lagon-pale);
  color: var(--encre);
  font-size: 0.875rem;
  font-weight: 600;
}

.relation-erreur {
  margin-top: var(--esp-2);
  color: var(--danger);
  font-weight: 600;
}

.profil-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-5);
  margin-top: var(--esp-5);
}

.profil-bloquer {
  padding: 0;
  color: var(--encre-douce);
}

/* « 87 % compatible » : le voyageur montre son ADN (adn.views.comparaison_avec). */
.profil-compatibilite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--esp-1) var(--esp-3);
  margin: var(--esp-2) 0;
}

.pastille-compatibilite {
  display: inline-flex;
  align-items: center;
  min-height: var(--cible-tactile);
  padding: 0 var(--esp-4);
  border-radius: var(--rayon-pilule);
  background: var(--lagon-pale);
  color: var(--lagon);
  font: 700 0.9375rem/1 var(--texte);
  text-decoration: none;
}

.profil-explication {
  color: var(--encre-douce);
  font-size: 0.875rem;
}
