/* echanges.css — Brick ZR : les écrans des échanges de cartes v2 (echanges-ui.js ; préfixe tr- : « troc »). D'après la maquette
   validée par le propriétaire (novembre 2026). Chargée après styles.css, social.css, objectifs.css et icones.css : les briques,
   les fenêtres, les onglets et les tuiles viennent du jeu ; ici, seulement ce qui est nouveau. Le style « Brick ZR, les briques »
   (skill brikz-ui) : les couleurs nouvelles sont des jetons de :root, d'après les cartes du jeu (booster.js, .bp-tc-*). */

:root {
  /* le cadre d'une carte, par rareté (le même métal que les cartes de la Collection) */
  --cadre-C: linear-gradient(145deg, #eef0f3 0%, #9ea4ad 24%, #f7f8fa 46%, #7e858f 70%, #d7dbe0 100%);
  --cadre-PC: linear-gradient(145deg, #c6f7cd 0%, #34a853 24%, #e3fbe6 46%, #1e7b39 70%, #93e3a2 100%);
  --cadre-R: linear-gradient(145deg, #cfe7ff 0%, #2477e0 24%, #e8f3ff 46%, #1553a8 70%, #86c3ff 100%);
  --cadre-SR: linear-gradient(145deg, #f3dcff 0%, #9346d6 24%, #fbeeff 46%, #5f2398 70%, #d39cff 100%);
  --cadre-UR: linear-gradient(145deg, #fff7c9 0%, #dba516 20%, #fffbe3 40%, #b07c07 60%, #ffe680 80%, #c9930f 100%);
  /* le fond de l'image et sa lueur, par rareté */
  --fond-C: #20242c;  --lueur-C: rgba(200,210,225,.18);
  --fond-PC: #11301e; --lueur-PC: rgba(76,217,100,.28);
  --fond-R: #0f2547;  --lueur-R: rgba(64,156,255,.32);
  --fond-SR: #2a1147; --lueur-SR: rgba(190,110,255,.36);
  --fond-UR: #3a2906; --lueur-UR: rgba(255,214,64,.42);
  /* les états d'une carte dans l'échange */
  --tr-gris: rgba(174,184,212,.62);   /* le pointillé d'une carte présélectionnée (--texte-2 à 62 %) */
  --tr-voile: rgba(8,12,28,.62);      /* le voile d'une carte indisponible */
  --tr-nb: rgba(8,12,28,.86);         /* le fond du « x N » */
  --tr-case: 7px;                     /* les coins d'une case */
  --tr-fini: rgba(29,40,73,.62);      /* une ligne d'échange terminé : la plaque, plus effacée */
  --tr-rouge-fond: #3b1a22;           /* la boîte d'une raison d'échec (son texte : --rouge-clair, 5,9:1) */
}

/* ══ Une carte dans l'échange : un petit cadre de sa rareté, l'image, « x N » en bas à droite ══ */
.tr-carte {
  --cadre: var(--cadre-C); --fond: var(--fond-C); --lueur: var(--lueur-C);
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 2.5px; border: 0; border-radius: var(--tr-case);
  background: var(--cadre); box-shadow: 0 2px 0 var(--plaque-bord); color: var(--texte); font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform var(--appui) var(--ease-out);
}
.tr-carte:active { transform: scale(.96); }
.tr-carte:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.tr-carte.r-PC { --cadre: var(--cadre-PC); --fond: var(--fond-PC); --lueur: var(--lueur-PC); }
.tr-carte.r-R  { --cadre: var(--cadre-R);  --fond: var(--fond-R);  --lueur: var(--lueur-R); }
.tr-carte.r-SR { --cadre: var(--cadre-SR); --fond: var(--fond-SR); --lueur: var(--lueur-SR); }
.tr-carte.r-UR { --cadre: var(--cadre-UR); --fond: var(--fond-UR); --lueur: var(--lueur-UR); }
.tr-art {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 5px;
  background: radial-gradient(circle at 50% 44%, var(--lueur), transparent 72%), var(--fond);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.45);
}
.tr-art img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.1); -webkit-user-drag: none; pointer-events: none; }
/* le nombre d'exemplaires ; « x0 » a la même allure que les autres (ni grisé, ni retiré) */
.tr-nb {
  position: absolute; right: 3px; bottom: 3px; z-index: 3; min-width: 19px; padding: 2px 4px 1px; border-radius: 4px;
  background: var(--tr-nb); color: #fff; font: 800 11.5px/1 var(--font); text-align: center; font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* grisé = présélectionné : demandée, pas encore engagée par son propriétaire (pointillés, image en gris) */
.tr-carte.est-gris { padding: 1px; background: transparent; border: 2px dashed var(--tr-gris); box-shadow: none; }
.tr-carte.est-gris .tr-art { background: rgba(255,255,255,.05); box-shadow: none; }
.tr-carte.est-gris img { filter: grayscale(1) brightness(1.1); opacity: .42; }
.tr-carte.est-gris .tr-nb { background: rgba(8,12,28,.7); }
/* plein = engagé : la carte en couleur, son cadre plein (le style de base) */
/* verrouillé = indisponible : un voile, le cadenas, la raison (« posée », « engagée ») */
.tr-carte.est-verrou img { filter: saturate(.55) brightness(.62); }
.tr-carte.est-verrou .tr-art::after { content: ''; position: absolute; inset: 0; background: var(--tr-voile); }
.tr-cadenas { position: absolute; left: 50%; top: 47%; z-index: 2; width: 18px; height: 18px; transform: translate(-50%, -50%); pointer-events: none; }
.tr-cadenas .ico { display: block; width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.tr-raison {
  position: absolute; left: 0; right: 0; top: 4px; z-index: 2; color: #fff; font: 800 10px/1 var(--font); letter-spacing: -.1px;
  text-align: center; text-shadow: 0 1px 2px #000, 0 0 3px #000; pointer-events: none; white-space: nowrap;
}
/* dans ma zone : demandée mais indisponible chez moi (posée depuis) : un bord rouge, le cadenas */
.tr-carte.est-rouge { background: var(--rouge); box-shadow: 0 2px 0 var(--rouge-ombre); }
.tr-carte.est-rouge img { filter: saturate(.55) brightness(.62); }
/* dans une Collection : pointillés jaunes = demandée par mon ami ; bord jaune plein = dans la zone d'échange */
.tr-carte.est-demandee { outline: 2px dashed var(--jaune); outline-offset: 2px; }
.tr-carte.est-choisie { outline: 3px solid var(--jaune); outline-offset: 1px; }

/* une case vide de la zone (6 cases : 6 cartes différentes au plus) */
.tr-vide { display: block; aspect-ratio: 1; border-radius: var(--tr-case); border: 2px dashed var(--plaque-haut); }

/* ══ L'écran d'un échange : deux panneaux côte à côte, chacun sa zone et, dessous, sa Collection ══ */
.tr-ecran {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  padding: calc(4px + var(--safe-top)) 6px calc(7px + var(--safe-bottom));
  background: var(--tenons-fond), var(--plaque-nuit); color: var(--texte);
  animation: fade-in .18s ease;
}
.tr-tete { flex: none; display: flex; align-items: center; gap: 10px; padding: 2px 4px 6px 2px; }
.tr-titres { flex: 1; min-width: 0; }
.tr-titre { font: 400 20px/1.1 var(--font-titre); letter-spacing: .5px; text-shadow: 0 3px 0 var(--plaque-bord); }
.tr-sous { margin-top: 3px; font-size: 13px; line-height: 1.25; color: var(--texte-2); }
.tr-sous b { color: var(--texte); }
.tr-sous .sc-tag { font-size: .92em; }
.tr-insec { white-space: nowrap; }
.tr-tete .btn-icon { background: var(--plaque); }
.tr-aide { flex: none; margin: 0 6px 8px; font-size: 13px; line-height: 1.36; color: var(--texte-2); }
.tr-aide b { color: var(--texte); font-weight: 700; }
/* « cet échange n'est pas équilibré » (Trocs.equilibre) : un avertissement, jamais un blocage */
.tr-alerte {
  flex: none; display: flex; align-items: flex-start; gap: 7px; margin: 0 0 8px; padding: 7px 10px; border-radius: var(--r-tuile);
  background: var(--plaque-haut); box-shadow: inset 3px 0 0 var(--jaune); color: var(--jaune); font-size: 12.5px; font-weight: 700; line-height: 1.32;
}
.tr-alerte .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.tr-ecran > .tr-alerte { margin: -2px 6px 8px; }

.tr-panneaux { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tr-panneau {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 7px 5px 6px;
  border-radius: var(--r-tuile); background: var(--plaque); box-shadow: var(--ombre-tuile);
}
/* le joueur : son rond, pseudo#tag (deux lignes au plus) */
.tr-joueur { flex: none; display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 2px 6px; }
.tr-joueur .sc-pastille { width: 30px; height: 30px; font-size: 14px; border: 2px solid #fff; }
.tr-nom { min-width: 0; font-size: 14px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.tr-toi {
  display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 4px; vertical-align: 1px;
  background: var(--plaque-haut); color: var(--jaune); font-size: 11px; font-weight: 700;
}
/* la zone d'échange : un bac enfoncé, 3 × 2 cases */
.tr-zone-tete { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 0 3px 4px; }
.tr-zone-tete b { font-size: 13px; font-weight: 800; }
.tr-compte { font-size: 12px; font-weight: 700; color: var(--texte-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-compte.fait { color: var(--vert-clair); }
.tr-zone {
  flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: 9px; background: var(--plaque-bord); box-shadow: inset 0 2px 0 rgba(0,0,0,.45);
}
/* « Tout monter » : de la Collection (en bas) vers la zone (en haut) */
.tr-monter { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 12px 1px 0; }
.tr-monter .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.tr-monter .ico { width: 18px; height: 18px; }
.tr-monte { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; font-size: 13px; font-weight: 700; color: var(--vert-clair); text-align: center; }
.tr-monte .ico { width: 18px; height: 18px; }
.tr-monte.manque { color: var(--rouge-clair); }
/* la Collection du joueur : elle défile dans son cadre */
.tr-coll-tete { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin: 10px 3px 4px; }
.tr-coll-tete b { font-size: 13.5px; font-weight: 800; }
.tr-coll-tete span { font-size: 12px; font-weight: 700; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.tr-coll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 7px 6px;
  padding: 5px; border-radius: 9px; background: var(--plaque-nuit); box-shadow: inset 0 2px 0 rgba(0,0,0,.3);
}
.tr-coll::-webkit-scrollbar { display: none; }
/* « Il te manque » / « Tu l'as déjà » : la ligne qui sépare la Collection de l'ami */
.tr-separe {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 1px 0 -1px; font-size: 11.5px; font-weight: 700;
  color: var(--texte-2); white-space: nowrap;
}
.tr-separe::after { content: ''; flex: 1; height: 2px; border-radius: 1px; background: var(--plaque-haut); }
.tr-separe b { color: var(--vert-clair); font-variant-numeric: tabular-nums; }
/* la Collection d'un ami pas encore lue, ou pas lisible : un texte à la place des cartes */
.tr-coll-texte { grid-column: 1 / -1; padding: 8px 4px; font-size: 12.5px; line-height: 1.35; color: var(--texte-2); text-align: center; }
/* les décisions, dans le panneau de l'ami */
.tr-actions { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 13px 1px 0; }
.tr-actions .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.tr-actions .btn:not(.btn-sm):not(.btn-discret) { font-size: 15px; min-height: 48px; }
.tr-actions .btn-discret { min-height: 44px; margin-top: -7px; padding: 4px 2px; font-size: 13.5px; }
.tr-actions .tr-note { margin-top: -6px; font-size: 12px; line-height: 1.3; color: var(--texte-2); text-align: center; }
.tr-actions .tr-note .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* la bulle qui nomme la carte touchée */
.tr-bulle {
  position: absolute; z-index: 20; width: max-content; max-width: 176px; padding: 7px 10px 7px; border-radius: 8px;
  background: var(--plaque-vive); color: var(--texte); font-size: 12.5px; line-height: 1.3; text-align: left;
  box-shadow: 0 3px 0 var(--plaque-bord), 0 10px 18px rgba(0,0,0,.4); pointer-events: none;
  animation: fade-in .12s ease;
}
.tr-bulle b { display: block; font-size: 14px; font-weight: 800; }
.tr-bulle span { color: var(--texte-2); }
.tr-bulle .fen-rarete { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.tr-bulle::after {
  content: ''; position: absolute; left: var(--pointe, 50%); bottom: -5px; width: 11px; height: 11px; margin-left: -5.5px;
  background: var(--plaque-vive); border-radius: 2px; transform: rotate(45deg); box-shadow: 2px 2px 0 var(--plaque-bord);
}
/* (posée sous la carte : la pointe en haut) */
.tr-bulle.dessous::after { bottom: auto; top: -5px; box-shadow: none; }

/* ══ L'onglet « Échanges » du profil : la liste des demandes ══ */
.sc-onglets .pg-onglet .ico { width: 18px; height: 18px; vertical-align: -4px; }
.tr-liste-aide { margin: 0 2px 12px; font-size: 14px; line-height: 1.4; color: var(--texte-2); }
.tr-liste-aide b { color: var(--texte); }
.tr-nouvel { margin: 16px 0 4px; }
.tr-section { margin-top: 20px; }
.tr-section h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; line-height: 1.2; }
.tr-section h4 { display: flex; align-items: baseline; gap: 8px; margin: 12px 2px 8px; font-size: 14px; font-weight: 700; color: var(--texte-2); }
.tr-section .sc-vide { margin-top: 4px; }
.tr-ligne {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: center; column-gap: 10px; width: 100%;
  margin-bottom: 10px; padding: 9px 8px 9px 11px; border: 0; border-radius: var(--r-tuile); cursor: pointer;
  background: var(--plaque); box-shadow: var(--ombre-ligne); color: var(--texte); font: inherit; text-align: left;
  transition: transform var(--appui) var(--ease-out), box-shadow var(--appui) var(--ease-out);
}
.tr-ligne:active { transform: translateY(3px); box-shadow: 0 0 0 var(--plaque-bord); }
.tr-ligne:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.tr-ligne.a-toi { box-shadow: var(--ombre-ligne), inset 0 0 0 2px var(--jaune); }
.tr-ligne.fini { background: var(--tr-fini); }
.tr-ligne > .sc-pastille { align-self: start; margin-top: 1px; }
.tr-ligne > .ico { width: 18px; height: 18px; color: var(--texte-3); }
.tr-ltxt { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tr-l1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 1.15; }
.tr-l1 b { min-width: 0; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.tr-date { flex: none; font-size: 12px; font-weight: 600; color: var(--texte-3); white-space: nowrap; }
.tr-l2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; line-height: 1.25; color: var(--texte-2); }
.tr-statut {
  flex: none; padding: 3px 6px 2px; border-radius: 4px; font-size: 12px; font-weight: 800; line-height: 1.2;
  background: var(--plaque-haut); color: var(--texte-2); white-space: nowrap;
}
.tr-statut.jaune { background: var(--jaune); color: var(--jaune-txt); box-shadow: 0 2px 0 var(--jaune-ombre); }
.tr-statut.vert { background: var(--vert); color: #fff; box-shadow: 0 2px 0 var(--vert-ombre); }
.tr-statut.rouge { color: var(--rouge-clair); }
.tr-l3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texte-3); }
.tr-l3 > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tr-l3 .tr-sep { width: 8px; }
.tr-mini { position: relative; flex: none; width: 24px; height: 24px; padding: 1.5px; border-radius: 5px; background: var(--cadre, var(--cadre-C)); }
.tr-mini.r-PC { --cadre: var(--cadre-PC); --fond: var(--fond-PC); } .tr-mini.r-R { --cadre: var(--cadre-R); --fond: var(--fond-R); }
.tr-mini.r-SR { --cadre: var(--cadre-SR); --fond: var(--fond-SR); } .tr-mini.r-UR { --cadre: var(--cadre-UR); --fond: var(--fond-UR); }
.tr-mini i { display: block; width: 100%; height: 100%; border-radius: 3.5px; background: var(--fond, var(--fond-C)) center / 112% no-repeat; }
.tr-plus { font-size: 11.5px; font-weight: 800; color: var(--texte-2); }

/* les amis (onglet Amis) : où en est l'échange avec chacun */
.tr-ami-etat { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--jaune); }
.sc-ligne-nom small.tr-ami-etat { color: var(--jaune); font-weight: 700; }
.sc-ligne-nom small.tr-ami-etat.attente { color: var(--texte-2); font-weight: 600; }
.tr-ami-etat .ico { flex: none; width: 16px; height: 16px; }

/* ══ Les fenêtres : récapitulatifs, confirmation, résultat, les états ══ */
.fen-troc { max-width: 380px; }
.fen-troc .fen-titre { padding: 13px 58px 12px 16px; font-size: 18.5px; }
/* le corps est une colonne : seule la liste des cartes (.tr-defile) défile, l'aide et les avertissements restent */
.fen-troc .fen-corps { display: flex; flex-direction: column; overflow: hidden; padding: 12px 14px 2px; font-size: 14px; line-height: 1.4; }
.fen-troc .fen-corps > * { flex: none; }
.fen-troc .fen-corps > .tr-defile { flex: 0 1 auto; min-height: 0; }
.tr-defile { overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 3px; }
/* (plus longue que la fenêtre : un fondu en bas, tant qu'il reste à défiler) */
.tr-defile.deborde {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}
.fen-troc .fen-boutons { padding: 16px 14px 14px; }
.fen-troc .fen-boutons .btn-danger { --c-txt: #fff; }
.tr-statut-ligne { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px; font-size: 13px; color: var(--texte-2); }
.tr-statut-ligne b { color: var(--texte); }
.tr-statut-ligne .ico { width: 16px; height: 16px; vertical-align: -3px; }
.tr-fen-aide { margin: 0 0 10px; font-size: 13.5px; line-height: 1.4; color: var(--texte-2); }
.tr-fen-aide b { color: var(--texte); }
.tr-fen-aide.centre { text-align: center; }
.tr-fen-aide .ico { width: 18px; height: 18px; vertical-align: -4px; }
.tr-recap-titre { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 0 6px; font-size: 14.5px; font-weight: 800; }
.tr-defile > .tr-recap-titre:first-child { margin-top: 2px; }
.tr-recap-titre span { font-size: 12.5px; font-weight: 700; color: var(--texte-3); }
.tr-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-recap li {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 5px 10px 5px 5px;
  border-radius: var(--r-tuile); background: var(--plaque-haut); box-shadow: 0 2px 0 var(--plaque-bord);
}
.tr-recap .tr-carte { width: 42px; cursor: default; }
.tr-recap .tr-carte:active { transform: none; }
.tr-recap .tr-carte .tr-nb { display: none; }
.tr-rnom { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-rnom b { font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.tr-rnom small { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.25; color: var(--texte-2); }
.tr-rnom small .fen-rarete { width: 10px; height: 10px; }
.tr-rnom em { font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--jaune); }
.tr-rnom em.calme { color: var(--texte-2); font-weight: 600; }
.tr-rnom em.manque { color: var(--rouge-clair); }
.tr-rnom em .ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.tr-rx { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-nouvelle { display: inline-block; margin-left: 4px; padding: 2px 5px 1px; border-radius: 4px; background: var(--rouge); color: #fff; font-size: 10.5px; font-weight: 800; vertical-align: 1px; }
.tr-fige { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; padding: 8px 10px; border-radius: var(--r-tuile); font-size: 13px; line-height: 1.35; color: var(--texte-2); border: 2px dashed var(--plaque-vive); }
.tr-fige .ico { flex: none; width: 20px; height: 20px; }
.tr-fige b { color: var(--texte); }
/* une attente (« Échange en cours… ») : le texte au milieu, sous les boutons qui ne se touchent plus */
.tr-attente { margin: 4px 0 8px; font-size: 14px; font-weight: 700; color: var(--texte); text-align: center; }
/* le résultat */
.tr-recus { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin: 2px 0 12px; }
.tr-recu { position: relative; width: 104px; text-align: center; }
.tr-recu .tr-carte { width: 92px; margin: 0 auto; cursor: default; padding: 3.5px; border-radius: 10px; }
.tr-recu .tr-carte:active { transform: none; }
.tr-recu .tr-carte .tr-art { border-radius: 7px; }
.tr-recu .tr-carte .tr-nb { font-size: 13px; }
.tr-recu b { display: block; margin-top: 7px; font-size: 13.5px; line-height: 1.2; overflow-wrap: anywhere; }
.tr-recu .tr-nouvelle { position: absolute; top: -7px; left: 2px; z-index: 4; margin: 0; box-shadow: 0 2px 0 var(--rouge-ombre); }
/* (4 cartes reçues ou plus : plus petites, trois par rangée) */
.tr-recus.serre { gap: 10px 8px; }
.tr-recus.serre .tr-recu { width: 96px; }
.tr-recus.serre .tr-carte { width: 70px; padding: 3px; }
.tr-recus.serre .tr-recu b { margin-top: 5px; font-size: 12.5px; }
.tr-raison-box { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-tuile); background: var(--tr-rouge-fond); color: var(--rouge-clair); font-size: 14px; font-weight: 700; line-height: 1.4; box-shadow: 0 3px 0 var(--plaque-bord); }
.tr-revenues { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; font-size: 13px; color: var(--texte-2); }
.tr-revenues .tr-carte { width: 34px; cursor: default; }
.tr-revenues .tr-carte .tr-nb { display: none; }
/* la légende des états */
.tr-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tr-legende li { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; column-gap: 12px; font-size: 13.5px; line-height: 1.35; color: var(--texte-2); }
.tr-legende li b { color: var(--texte); }
.tr-legende .tr-carte { width: 46px; margin: 2px; cursor: default; }
.tr-legende .tr-carte:active { transform: none; }
/* choisir un ami (« Nouvel échange ») : la liste des amis défile dans la fenêtre */
.tr-amis { display: flex; flex-direction: column; }
.tr-amis .sc-ligne { background: var(--plaque-haut); }
.tr-amis .sc-ligne:last-child { margin-bottom: 4px; }
.tr-amis .sc-chevron .ico { width: 18px; height: 18px; color: var(--texte-3); }

/* ══ La Collection principale et la fiche d'une carte : un exemplaire mis de côté pour un échange (app.js) ══ */
.coll-engage {
  position: absolute; left: -5px; bottom: -5px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: url(art/icones/verrou.svg) center / 15px 15px no-repeat, var(--plaque-haut);
  box-shadow: 0 2px 0 var(--plaque-bord), 0 0 0 2px var(--plaque-nuit);
}
.detail-note .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }

/* ══ « Réduire les animations » : une carte ou une ligne touchée ne bouge plus, elle fonce un peu (comme les briques, styles.css) ══ */
@media (prefers-reduced-motion: reduce) {
  .tr-carte:active, .tr-ligne:active { transform: none !important; filter: brightness(.9); }
}

/* ══ Les écrans étroits (360 px : des cartes de 46 px) : le mot et le cadenas d'une carte indisponible un peu plus petits ══ */
@media (max-width: 370px) {
  .tr-raison { font-size: 9.5px; letter-spacing: -.35px; }
  .tr-cadenas, .tr-cadenas .ico { width: 16px; height: 16px; }
}

/* ══ Les écrans bas (375 × 667) : un peu plus serré, après les règles qu'il change ══ */
@media (max-height: 700px) {
  .tr-tete { padding-bottom: 4px; }
  .tr-aide { margin-bottom: 6px; font-size: 12.5px; line-height: 1.32; }
  .tr-ecran > .tr-alerte { margin-bottom: 6px; padding: 5px 9px; font-size: 12px; }
  .tr-joueur { padding-bottom: 5px; }
  .tr-coll-tete { margin-top: 8px; }
  .tr-actions { gap: 11px; padding-top: 12px; }
  .tr-monter { padding-top: 11px; }
  .fen-troc .fen-titre { padding-top: 11px; padding-bottom: 10px; }
  .tr-recap li { padding-top: 4px; padding-bottom: 4px; }
  .tr-recap-titre { margin: 9px 0 5px; }
  .tr-fen-aide { margin-bottom: 8px; }
  .tr-fige { margin-top: 8px; padding: 6px 10px; }
}
