/* social.css — Brick ZR : bouton du profil (barre du haut), écran Profil, vitrine, amis (social.js).
   Le style « Brick ZR, les briques » (skill brikz-ui) : uniquement les jetons de :root (styles.css). */

/* ── Bouton du profil, à côté du logo ── */
#top-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.social-avatar {
  position: relative; flex: none; width: 38px; height: 38px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 2px solid #fff; color: #fff; font: inherit; font-size: 16px; font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: 0 3px 0 var(--plaque-bord);
  transition: transform var(--appui) var(--ease-out), box-shadow var(--appui) var(--ease-out);
}
.social-avatar:active { transform: translateY(3px); box-shadow: 0 0 0 var(--plaque-bord); }
/* Sans compte : une brique bleue « Connexion » (icône + texte), avec ses tenons */
.social-avatar.invite {
  width: auto; height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; border: 0; border-radius: var(--r-brique);
  background: linear-gradient(180deg, var(--bleu-face) 0 3px, var(--bleu) 3px); color: #fff; font-size: 14px; font-weight: 700; text-shadow: none;
  box-shadow: 0 3px 0 var(--bleu-ombre), 0 6px 6px rgba(0,0,0,.25);
}
.social-avatar.invite::before {
  content: ''; position: absolute; left: 3px; right: 3px; top: -5px; height: 5px; pointer-events: none;
  background: linear-gradient(90deg, transparent 4.5px, var(--bleu-clair) 4.5px 7px, var(--bleu) 7px 11px, var(--bleu-ombre) 11px 13.5px, transparent 13.5px) 0 0 / 18px 100% space no-repeat;
  -webkit-mask: radial-gradient(4.5px 5px at 50% 100%, #000 98%, transparent) 0 0 / 18px 100% space no-repeat;
          mask: radial-gradient(4.5px 5px at 50% 100%, #000 98%, transparent) 0 0 / 18px 100% space no-repeat;
}
.social-avatar.invite:active { transform: translateY(3px); box-shadow: 0 0 0 var(--bleu-ombre); }
.social-avatar.invite svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 375px) {
  .social-avatar.invite { padding: 0 10px 0 8px; gap: 4px; font-size: 13px; }
  #top-bar-left:has(.social-avatar.invite) { gap: 7px; }
  #top-bar-left:has(.social-avatar.invite) .logo-marque { height: 26px; }
}
@media (max-width: 340px) { .social-avatar.invite { padding: 0 8px; } .social-avatar.invite .sa-texte { display: none; } }
.social-badge { position: absolute; top: -7px; right: -9px; box-shadow: 0 2px 0 var(--rouge-ombre), 0 0 0 2px var(--plaque-nuit); text-shadow: none; }
@media (max-width: 359px) { #top-bar .logo-marque { height: 24px; } }

/* ── Écran ── */
.social-scroll { padding: 12px 16px 48px; }
/* Le profil est une page (la ville, la vitrine de cartes, les chiffres, le compte ; la liste des amis) : elle défile, mais son
   haut (le retour, le nom, les onglets) reste en haut de l'écran (styles.css : comme le titre de la Collection), une épaisseur dessous */
.sc-tete { margin: -12px -16px 14px; padding: 12px 16px 10px; box-shadow: 0 3px 0 rgba(0,0,0,.22); }
.sc-tete .sc-top { margin-bottom: 12px; }
.sc-tete .sc-onglets { margin-bottom: 0; }
.sc-tete .sc-top:last-child { margin-bottom: 0; }
.sc-tete + .ech-ami { margin-top: 0; }
.ech-ami + .sc-ville { margin-top: 22px; }
.sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sc-avatar {
  flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 3px solid #fff; color: #fff; font-size: 24px; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.35); box-shadow: 0 3px 0 var(--plaque-bord);
}
.sc-blason { background: var(--plaque-haut); border-color: var(--jaune); font-size: 22px; text-shadow: none; }
.sc-blason .ico { width: 30px; height: 30px; }
.sc-titres { min-width: 0; }
.sc-titre { font-size: 22px; line-height: 1.12; overflow-wrap: anywhere; }
.sc-sous { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--texte-2); }

/* ── Le niveau de ville (niveau.js) : une tuile, l'écu, « Niveau 12 » en grand, la barre jusqu'au suivant, le détail en une ligne
   (sur « Moi » juste sous le nom, après la petite carte du code de testeur s'il y en a une ; sur le profil d'un ami, sous le
   cadeau et l'échange) ── */
.sc-niveau {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 11px 14px 10px 12px;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-tuile);
}
.sc-test-haut + .sc-niveau { margin-top: 12px; }
.ech-ami + .sc-niveau { margin-top: 18px; }
.sc-niveau + [data-zone="ville"], .sc-niveau + .sc-ville { margin-top: 14px; }
.scn-ecu { grid-row: 1 / span 2; display: flex; }
.scn-ecu .ico { width: 50px; height: 50px; }
.scn-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 1.1; }
.scn-titre b { font-size: 22px; font-weight: 900; white-space: nowrap; }
.scn-n { color: var(--jaune); font-size: 26px; font-variant-numeric: tabular-nums; }
.scn-sous { font-size: 13px; font-weight: 600; color: var(--texte-2); text-align: right; }
/* la barre : la jauge du jeu (une rainure, un remplissage vert à face claire), le niveau suivant au bout */
.scn-barre { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.scn-barre .jauge { flex: 1; height: 10px; }
.scn-barre .jauge > i { transition: width .4s var(--ease-out); }
.scn-suivant {
  flex: none; min-width: 26px; padding: 2px 5px 1px; border-radius: var(--r-brique); text-align: center;
  background: var(--plaque-haut); color: var(--texte-2); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
/* le détail : chaque chiffre et son icône, comme le haut de Ma ville ; une ligne sur toute la largeur de la tuile */
.scn-detail, .scn-iles { grid-column: 1 / -1; margin-top: 10px; }
.scn-detail { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; overflow: hidden; font-size: 13px; font-weight: 700; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.scn-detail > span { display: inline-flex; align-items: center; gap: 3px; flex: none; white-space: nowrap; }
.scn-detail .ico { width: 16px; height: 16px; }
/* (un profil d'avant, estimé : quatre chiffres seulement, serrés à gauche plutôt qu'étalés) */
.scn-estime .scn-detail { justify-content: flex-start; gap: 20px; }
.scn-iles { list-style: none; font-size: 13px; color: var(--texte-2); }
@media (max-width: 370px) {
  .sc-niveau { column-gap: 10px; padding: 10px 11px 9px 10px; }
  .scn-ecu .ico { width: 44px; height: 44px; }
  .scn-detail { gap: 6px; font-size: 12.5px; }
  .scn-detail .ico { width: 15px; height: 15px; }
}
/* le niveau sur le rond d'un ami (la liste des amis, les demandes d'ami) : un petit chiffre d'or, en bas à droite (.sc-pastille,
   plus bas, est en position: relative pour lui) */
.sc-niv {
  position: absolute; right: -7px; bottom: -5px; min-width: 20px; height: 17px; padding: 0 4px; border-radius: var(--r-brique);
  background: linear-gradient(180deg, var(--jaune-face) 0 2px, var(--jaune) 2px); color: var(--jaune-txt);
  box-shadow: 0 0 0 2px var(--plaque), 0 2px 0 2px var(--plaque-bord);
  font-size: 11px; font-weight: 800; line-height: 17px; text-align: center; text-shadow: none; font-variant-numeric: tabular-nums;
}
/* dans le titre de la visite d'une ville (city.js, City.showcase) : l'écu et « Niveau 12 », sous son nom, sur la tuile sombre des
   légendes du film (.ctt-hero) ; .ctt-title span (styles.css) en ferait un bloc : d'où les deux classes */
.ctt-title .ctt-niveau {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px 3px 6px; border-radius: var(--r-tuile);
  background: rgba(18,26,51,.78); box-shadow: 0 3px 0 rgba(10,16,34,.6); font-size: 15px; font-weight: 800; text-shadow: none; opacity: 1;
}
.ctt-niveau .ico { width: 24px; height: 24px; }

.sc-section { margin-top: 26px; }
.sc-section h3 { margin-bottom: 10px; font-size: 18px; font-weight: 800; line-height: 1.2; }
.sc-section h4 { margin: 16px 0 8px; font-size: 14px; font-weight: 700; color: var(--texte-2); }
.sc-section-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sc-section-tete h3 { margin-bottom: 10px; }
/* un lien d'action : « discret », un texte souligné */
.sc-lien {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: var(--texte); font: inherit; font-size: 14.5px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.sc-lien:disabled { opacity: .5; }
/* « J'ai un autre code de test » (profil, en bas, le bonus déjà reçu) : un lien discret qui déplie le champ */
.sc-code-test > summary { display: inline-block; list-style: none; cursor: pointer; }
.sc-code-test > summary::-webkit-details-marker { display: none; }
.sc-code-test[open] > summary { margin-bottom: 10px; }
/* « Tu as un code de testeur ? » (en haut de « Moi », tant que le bonus n'est pas reçu) : une petite tuile, le cadeau, la flèche ;
   le toucher déplie le champ dans la tuile */
.sc-test-haut { margin-top: 0; }
.sc-test-carte { border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-ligne), inset 0 0 0 2px rgba(255,197,46,.45); }
.sc-test-carte > .sc-test-tete { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.sc-test-carte[open] > .sc-test-tete { margin-bottom: 0; }
.sc-test-ico { flex: none; display: flex; }
.sc-test-ico .ico { width: 38px; height: 38px; }
.sc-test-txt { flex: 1; min-width: 0; }
.sc-test-txt b { display: block; font-size: 15.5px; line-height: 1.25; }
.sc-test-txt small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--texte-2); }
.sc-test-fleche { flex: none; width: 20px; height: 20px; color: var(--texte-2); transition: transform var(--appui) var(--ease-out); }
.sc-test-carte[open] .sc-test-fleche { transform: rotate(90deg); }
.sc-test-carte .sc-form-ligne { margin: 0 12px 12px; }
.sc-test-carte .sc-erreur { margin: -4px 12px 10px; }
.sc-discret { color: var(--texte-2); }
.sc-danger { color: var(--rouge-clair); }
/* rien encore : un emplacement vide, en pointillés (une plaque à remplir) */
.sc-vide {
  padding: 12px 14px; border-radius: var(--r-tuile); font-size: 14.5px; line-height: 1.45; color: var(--texte-2);
  background: transparent; border: 2px dashed var(--plaque-haut);
}
.sc-vide .sc-lien { padding: 0 2px; }
.sc-erreur { margin: 4px 0 6px; font-size: 14px; color: var(--rouge-clair); line-height: 1.4; font-weight: 600; }

/* ── La ville, en haut et en grand ── */
.sc-ville {
  display: block; width: 100%; margin-bottom: 4px; overflow: hidden; cursor: pointer;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-tuile);
  transition: transform var(--appui) var(--ease-out);
}
.sc-ville:active { transform: translateY(2px); }
.sc-ville:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.sc-ville-cadre { position: relative; aspect-ratio: 16 / 9; background: #a9daf7; }
.sc-ville-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-ville-bandeau {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(180deg, #a9daf7 0%, #86c9f1 52%, #3a9245 52%, #2c7436 100%); color: var(--plaque-nuit);
  font-size: 17px;
}
.sc-ville-bandeau span { font-size: 46px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.sc-ville-bandeau span .ico { width: 56px; height: 56px; }
.sc-ville-play {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 24px;
  background: rgba(18,26,51,.72); border: 3px solid #fff; box-shadow: 0 4px 0 rgba(10,16,34,.6);
}
.sc-ville-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 14px; }
.sc-ville-texte { min-width: 0; }
.sc-ville-texte b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-ville-texte small { font-size: 13px; color: var(--texte-2); }
/* « Visiter » : une petite brique jaune (la carte entière se touche) */
.sc-visiter {
  position: relative; flex: none; padding: 9px 14px 7px; border-radius: var(--r-brique); white-space: nowrap;
  background: linear-gradient(180deg, var(--jaune-face) 0 3px, var(--jaune) 3px); color: var(--jaune-txt);
  font-size: 14px; font-weight: 800; box-shadow: 0 3px 0 var(--jaune-ombre);
}
.sc-visiter::before {
  content: ''; position: absolute; left: 3px; right: 3px; top: -5px; height: 5px; pointer-events: none;
  background: linear-gradient(90deg, transparent 4.5px, var(--jaune-clair) 4.5px 7px, var(--jaune) 7px 11px, var(--jaune-ombre) 11px 13.5px, transparent 13.5px) 0 0 / 18px 100% space no-repeat;
  -webkit-mask: radial-gradient(4.5px 5px at 50% 100%, #000 98%, transparent) 0 0 / 18px 100% space no-repeat;
          mask: radial-gradient(4.5px 5px at 50% 100%, #000 98%, transparent) 0 0 / 18px 100% space no-repeat;
}
.sc-ville-invite {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; cursor: pointer; text-align: left;
  border-radius: var(--r-tuile); border: 2px dashed rgba(255,197,46,.5); background: transparent;
  color: var(--texte); font: inherit;
}
.sc-ville-invite:active { background: var(--plaque); }
.sc-ville-invite > span:first-child { flex: none; display: flex; }
.sc-ville-invite > span:first-child .ico { width: 40px; height: 40px; }
.sc-ville-invite b { display: block; font-size: 15px; }
.sc-ville-invite small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--texte-2); }

/* ── Vitrine ── */
.sc-vitrine { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sc-carte {
  position: relative; min-width: 0; padding: 6px 6px 8px; overflow: hidden; text-align: center; cursor: default;
  border-radius: var(--r-tuile); border: 2px solid var(--rc, var(--rarity-c));
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.12), transparent 68%), var(--plaque);
  box-shadow: 0 3px 0 var(--plaque-bord);
}
.sc-carte[role="button"] { cursor: pointer; transition: transform var(--appui) var(--ease-out); }
.sc-carte[role="button"]:active { transform: translateY(2px); }
.sc-r-SR { box-shadow: 0 3px 0 var(--plaque-bord), 0 0 12px rgba(180,98,230,.4); }
.sc-r-UR { box-shadow: 0 3px 0 var(--plaque-bord), 0 0 14px rgba(255,215,0,.45); }
/* Un reflet passe sur les Super et Ultra Rares (transform : animé par le compositeur, sans redessiner la carte) */
.sc-r-SR::after, .sc-r-UR::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-110%); animation: sc-reflet 3.2s ease-in-out infinite;
}
@keyframes sc-reflet { 0% { transform: translateX(-110%); } 60%, 100% { transform: translateX(110%); } }
@media (prefers-reduced-motion: reduce) { .sc-r-SR::after, .sc-r-UR::after { animation: none; transform: translateX(110%); } }
.sc-carte-art { aspect-ratio: 1; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--texte-2); }
.sc-carte-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0,0,0,.45)); }
.sc-img-ko { visibility: hidden; } /* image pas encore en cache, hors ligne : pas d'icône d'image cassée */
/* le nom sur deux lignes au plus (plus de points de suspension sur « Cathédrale Saint-Basile ») */
.sc-carte-nom {
  margin-top: 3px; font-size: 12px; font-weight: 700; line-height: 1.2; min-height: 2.4em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.sc-carte-etoiles { font-size: 11px; letter-spacing: 1px; color: var(--rc, var(--rarity-c)); }

/* ── Stats ── */
.sc-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sc-stat {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 11px;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-ligne);
}
.sc-stat-icone { flex: none; display: flex; }
.sc-stat-icone .ico { width: 28px; height: 28px; }
.sc-stat > div { min-width: 0; }
.sc-stat b { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sc-stat b small { font-size: 12px; font-weight: 600; color: var(--texte-2); }
.sc-stat span { display: block; font-size: 12.5px; color: var(--texte-2); line-height: 1.25; }
.sc-faits { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sc-fait {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 10px; border-radius: var(--r-tuile);
  background: var(--plaque); box-shadow: inset 4px 0 0 var(--rc, var(--vert-clair)), var(--ombre-ligne);
}
.sc-fait-art {
  flex: none; width: 48px; height: 48px; border-radius: var(--r-tuile); display: grid; place-items: center;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
}
.sc-fait-art img { width: 100%; height: 100%; object-fit: contain; }
.sc-fait-emoji .ico { width: 32px; height: 32px; }
.sc-fait > div { min-width: 0; }
.sc-fait small { display: block; font-size: 12.5px; color: var(--texte-2); }
.sc-fait b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-fait em { display: block; font-style: normal; font-size: 13px; font-weight: 600; color: var(--texte-2); }

/* ── Réglage : montrer ma ville (un interrupteur : une rainure, un plot qui glisse) ── */
.sc-interrupteur {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-ligne);
}
.sc-interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sc-glissiere {
  order: 2; flex: none; position: relative; width: 54px; height: 32px; border-radius: 8px;
  background: var(--plaque-bord); box-shadow: inset 0 2px 0 rgba(0,0,0,.45); transition: background 160ms var(--ease-out);
}
.sc-glissiere::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 22px; border-radius: 5px;
  background: linear-gradient(180deg, #ffffff 0 3px, #dfe4ef 3px); box-shadow: 0 2px 0 #7d879f; transition: transform 160ms var(--ease-out);
}
.sc-interrupteur input:checked + .sc-glissiere { background: var(--vert); box-shadow: inset 0 2px 0 rgba(0,0,0,.3); }
.sc-interrupteur input:checked + .sc-glissiere::after { transform: translateX(22px); }
.sc-interrupteur input:focus-visible + .sc-glissiere { outline: 3px solid var(--jaune); outline-offset: 2px; }
.sc-interrupteur-texte { order: 1; flex: 1; min-width: 0; }
.sc-interrupteur-texte b { display: block; font-size: 15px; }
.sc-interrupteur-texte small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--texte-2); line-height: 1.35; }

/* ── Listes : amis, demandes, guildes, membres ── */
.sc-code {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; padding: 10px 12px;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-ligne);
  font-size: 14px; color: var(--texte-2);
}
.sc-code b { color: var(--jaune); font-size: 19px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.sc-code .sc-lien { margin-left: auto; }
.sc-form-ligne { display: flex; gap: 8px; margin: 10px 0; align-items: center; }
.sc-champ { flex: 1; min-width: 0; width: 100%; min-height: 46px; padding: 0 12px; }
.sc-form-ligne .btn { flex: none; min-width: 88px; }
.sc-ligne {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 10px; padding: 10px 10px 10px 12px; border: 0;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-ligne);
  color: var(--texte); font: inherit; text-align: left;
}
.sc-ligne-lien { cursor: pointer; transition: transform var(--appui) var(--ease-out), box-shadow var(--appui) var(--ease-out); }
.sc-ligne-lien:active { transform: translateY(3px); box-shadow: 0 0 0 var(--plaque-bord); }
.sc-ligne-nom { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.sc-ligne-nom small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--texte-2); }
.sc-pastille {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.sc-pastille.sc-blason { font-size: 17px; border: 0; }
.sc-pastille.sc-blason .ico { width: 24px; height: 24px; }
.sc-chevron { flex: none; font-size: 1.3rem; color: var(--texte-3); }
.sc-rang { flex: none; width: 24px; text-align: center; font-weight: 800; color: var(--texte-2); }
.sc-moi {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; vertical-align: 1px;
  background: var(--plaque-haut); color: var(--jaune); font-size: 11.5px; font-style: normal; font-weight: 700;
}
.sc-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 2px solid var(--plaque); }

/* ── Créer son compte (invité) : une tuile, un liseré jaune en haut ── */
.sc-compte { padding: 14px; border-radius: var(--r-tuile); background: var(--plaque); box-shadow: inset 0 3px 0 var(--jaune), var(--ombre-tuile); }
.sc-compte-texte { margin-bottom: 12px; font-size: 14.5px; color: var(--texte-2); line-height: 1.45; }
.sc-compte form { display: flex; flex-direction: column; gap: 10px; }
.sc-compte .btn-block { margin-top: 10px; }
.sc-compte > .sc-lien { display: block; margin: 10px auto 0; }

/* ── Feuille (choisir sa vitrine) et question ── */
.sc-fond {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5,8,20,.72); animation: sc-apparait .18s ease-out;
}
.sc-fond.sc-centre { align-items: center; padding: 16px; }
@keyframes sc-apparait { from { opacity: 0; } to { opacity: 1; } }
.sc-feuille {
  display: flex; flex-direction: column; width: 100%; max-width: 520px; max-height: 88vh;
  padding: 16px 14px calc(14px + var(--safe-bottom)); border-radius: var(--r-fenetre) var(--r-fenetre) 0 0; background: var(--plaque);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 -12px 30px rgba(0,0,0,.4);
}
.sc-feuille-tete { display: flex; align-items: baseline; justify-content: space-between; }
.sc-feuille-tete h3 { font-size: 19px; font-weight: 800; }
.sc-compteur { font-weight: 800; color: var(--jaune); font-variant-numeric: tabular-nums; }
.sc-feuille-aide { margin: 4px 0 10px; font-size: 14px; color: var(--texte-2); }
/* grid-auto-rows : sans lui, dans cette grille de hauteur fixe, les cartes (overflow: hidden) s'écrasent au lieu de défiler */
.sc-choix {
  flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: max-content;
  align-content: start; gap: 8px; padding: 4px 3px 8px;
}
.sc-choix .sc-carte { padding: 4px 4px 6px; opacity: .72; }
.sc-choix .sc-carte.choisie { opacity: 1; outline: 3px solid var(--jaune); outline-offset: 1px; }
.sc-choix .sc-carte-nom { font-size: 11px; -webkit-line-clamp: 3; min-height: 2.4em; }
.sc-numero {
  position: absolute; top: 3px; left: 3px; z-index: 1; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--jaune); color: var(--jaune-txt); font-size: 11px; font-weight: 800;
}
.sc-feuille-pied { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 14px; }
.sc-feuille-pied .btn:first-child { margin-right: auto; }
.sc-dialogue {
  width: 100%; max-width: 360px; padding: 18px; border-radius: var(--r-fenetre); background: var(--plaque);
  box-shadow: 0 5px 0 var(--plaque-bord), 0 18px 40px rgba(0,0,0,.45);
}
.sc-dialogue h3 { margin-bottom: 8px; font-size: 19px; font-weight: 800; }
.sc-dialogue p { font-size: 15px; color: var(--texte-2); line-height: 1.45; }
/* le numéro après le pseudo (« Zoé#4821 ») : plus petit et plus discret */
.sc-tag { margin-left: 1px; font-size: .78em; font-weight: 700; color: var(--texte-2); letter-spacing: .02em; }
.sc-titre .sc-tag { font-family: var(--font); font-weight: 700; text-shadow: none; }

/* les onglets du profil (Moi · Amis) : les onglets segmentés du jeu, une pastille rouge pour les demandes d'ami */
.sc-onglets { margin: 2px 0 14px; }
.sc-onglets .pg-onglet { position: relative; font-size: 14px; }
.sc-onglet-badge {
  position: absolute; top: -7px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--rouge); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 19px; text-align: center;
  box-shadow: 0 2px 0 var(--rouge-ombre);
}

/* ── Le classement entre amis (social.js : classementHTML), dans l'onglet Amis ── */
.sc-classement { margin: 4px 0 6px; }
.sc-classement .sc-section-tete h4 { margin-bottom: 8px; }
.sc-classement-rang { font-size: 13px; font-weight: 700; color: var(--jaune); white-space: nowrap; }
.sc-classement-rang sup { font-size: 9px; }
.sc-classement-choix { margin: 0 0 12px; }
.sc-classement-liste { list-style: none; margin: 0; padding: 0; }
.sc-ligne-moi { background: var(--plaque-haut); box-shadow: var(--ombre-ligne), inset 0 0 0 2px var(--jaune); }
.sc-rang { flex: none; width: 26px; height: 26px; border-radius: var(--r-brique); display: grid; place-items: center;
  font: 800 14px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--texte-2); background: var(--plaque-bord); }
.sc-rang-1 { color: var(--jaune-txt); background: linear-gradient(180deg, var(--jaune-face) 0 2px, var(--jaune) 2px); box-shadow: 0 2px 0 var(--jaune-ombre); }
.sc-rang-2 { color: #1f2740; background: linear-gradient(180deg, #e6ebf5 0 2px, #c3cbdc 2px); box-shadow: 0 2px 0 #7d879e; }
.sc-rang-3 { color: #2b1405; background: linear-gradient(180deg, #e9a46a 0 2px, #cf7f42 2px); box-shadow: 0 2px 0 #8a4d1f; }

/* ── Le coffre secret (social.js, city.js) : l'indice sur le profil d'un ami, la fenêtre des gains au-dessus de la balade ── */
.sc-coffre-indice { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-tuile);
  background: var(--plaque-haut); box-shadow: var(--ombre-ligne), inset 0 0 0 2px var(--jaune); font-size: 14px; line-height: 1.35; color: var(--texte-2); }
.sc-coffre-indice b { color: var(--texte); }
.sc-coffre-indice .ico { flex: none; width: 34px; height: 34px; }
.fen-fond:has(.fen-coffre-secret) { z-index: 700; -webkit-backdrop-filter: none; backdrop-filter: none; } /* (pas de flou sur la 3D : il faisait ramer) */
.fen-coffre-secret.cs-tresor .fen-titre, .fen-coffre-secret.cs-superbe .fen-titre { color: var(--jaune); }
