/* 🏪 LE MARCHÉ DECKARIA — habillage « à l'image du nouveau tacticia.fr » (30/09/2026, Progone : « fais la place de marché à
   l'image du nouveau site », « beaucoup plus stylée, du niveau du site »).
   🛑 Feuille SEULE : la logique du marché (app.jsx → essai.js, paiement, KYC, annonces) n'est pas touchée. Elle s'appuie sur
   /assets/site.css (en-tête, pied de page, fond .ambient, thème .t-tcg holographique) et ne fait que redessiner les classes
   que le marché produit déjà : .bandeau .entete .solde .carte .grille .objet .nom .vendeur .msg .probas .code button…
   Si un déploiement réécrit essai/index.html, remettre les 3 lignes <link> (polices, site.css, marche.css) et l'en-tête. */

body.t-tcg { padding: 0; font-family: var(--font-body); background: var(--bg); }
#app { width: 100%; max-width: 1160px; margin-inline: auto; padding: 0 var(--gutter, 20px) 72px; position: relative; }

/* ── bandeau MODE TEST : lisible, mais dans le ton ── */
.bandeau { position: sticky; top: 0; z-index: 60; margin: 0 calc(-1 * var(--gutter, 20px)) 22px; padding: 8px 14px; border-radius: 0;
  font: 800 11.5px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #231400;
  background: repeating-linear-gradient(135deg, #ffcf6a 0 14px, #ffbe45 14px 28px); box-shadow: 0 8px 30px -12px rgba(255, 190, 70, .6); }

/* ── en-tête de page (hors React) ── */
.marche-tete { max-width: 1160px; margin: 0 auto; padding: 44px var(--gutter, 20px) 6px; }
.marche-tete .surtitre { display: inline-flex; align-items: center; gap: 12px; font: 800 12px var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.marche-tete .surtitre::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.marche-tete .intro { color: var(--muted); max-width: 60ch; margin-top: 10px; }

/* ── titres ── */
#app h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6vw, 64px); line-height: 1.02; letter-spacing: -.01em; margin: 6px 0 22px;
  background: var(--holo); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: marcheHolo 10s linear infinite; }
#app h1::before { content: none; }
@keyframes marcheHolo { to { background-position: 220% 0; } }
#app h2 { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.6vw, 28px);
  color: var(--ink); margin: 46px 0 16px; letter-spacing: .01em; }
#app h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
#app h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0 0 8px; }

/* ── panneaux vitrés ── */
#app .carte, #app .entete { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)), var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin: 14px 0; box-shadow: 0 24px 60px -34px rgba(0,0,0,.9);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#app .carte::before, #app .entete::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; border-radius: 2px;
  background: var(--holo); background-size: 200% 100%; opacity: .8; animation: marcheHolo 12s linear infinite; }
#app .carte.centre { padding: 44px 26px; text-align: center; }
#app .carte.centre p { color: var(--muted); max-width: 46ch; margin: 8px auto 22px; }
#app .kyc { border-color: rgba(232,182,76,.55); box-shadow: 0 0 0 1px rgba(232,182,76,.25), 0 24px 60px -34px rgba(232,182,76,.5); }

/* porte-monnaie */
#app .entete { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; }
#app .entete b { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
#app .solde { display: block; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.1; margin-top: 4px;
  background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: marcheHolo 9s linear infinite; }
#app .droite { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── boutons (mêmes que le site : pilule, reflet) ── */
#app button { position: relative; overflow: hidden; font: 700 14.5px var(--font-body); letter-spacing: .01em; border: 0; border-radius: 999px; padding: 11px 20px;
  color: var(--accent-ink); background: linear-gradient(135deg, #ffffff 0%, var(--accent) 55%, #8fa6e8 100%); cursor: pointer;
  box-shadow: 0 10px 28px -12px var(--accent); transition: transform .2s var(--ease), box-shadow .2s, filter .2s; }
#app button::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transition: transform .7s var(--ease); }
#app button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px -14px var(--accent); }
#app button:hover:not(:disabled)::after { transform: translateX(120%); }
#app button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#app button.gros { width: 100%; padding: 14px 18px; font-size: 16px; }
#app button.discret { background: rgba(255,255,255,.04); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
#app button.discret:hover:not(:disabled) { border-color: var(--accent); }
#app button:disabled { opacity: .42; cursor: default; transform: none; }

/* ── la grille des cartes ── */
#app .grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
#app .objet { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 14px; border-radius: 20px; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), var(--panel); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
/* bordure holographique qui s'allume au survol */
#app .objet::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 21px; padding: 1.5px; background: var(--holo); background-size: 250% 250%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s; animation: marcheHoloBord 6s ease-in-out infinite alternate; }
@keyframes marcheHoloBord { to { background-position: 100% 100%; } }
#app .objet:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(160,190,255,.55); border-color: transparent; }
#app .objet:hover::before { opacity: 1; }
#app .objet img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #1b2136, #080a11); }
#app .nom { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.25; }
#app .vendeur { color: var(--muted); font-size: 12.5px; }
#app .objet button { margin-top: auto; }
#app .objet button + button { margin-top: 0; }
#app .grille > p { color: var(--muted); grid-column: 1 / -1; padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; }

/* ── champs ── */
#app .code, #app input, #app select, #app #choix-pays { font: 500 14.5px var(--font-body); padding: 11px 14px; border-radius: 12px; color: var(--ink);
  border: 1px solid var(--line); background: rgba(5,7,14,.55); outline: none; transition: border-color .2s, box-shadow .2s; }
#app .code:focus, #app input:focus, #app select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(188,208,255,.18); }
#app label input[type=checkbox] { width: auto; padding: 0; }

/* ── messages ── */
#app .msg { border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-weight: 600; border: 1px solid transparent; }
#app .msg.info { background: rgba(120,170,255,.10); color: #cfe0ff; border-color: rgba(120,170,255,.25); }
#app .msg.ok { background: rgba(62,240,143,.10); color: #9ff5c6; border-color: rgba(62,240,143,.28); }
#app .msg.err { background: rgba(255,90,106,.10); color: #ffb0b8; border-color: rgba(255,90,106,.3); }
#app .petit { color: var(--muted); font-size: 13.5px; }

/* ── probabilités des boosters ── */
#app .probas { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin: 10px 0 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
#app .probas td { padding: 9px 12px; background: rgba(255,255,255,.03); border: 0; }
#app .probas td:first-child { border-radius: 10px 0 0 10px; font-weight: 700; }
#app .probas td:last-child { border-radius: 0 10px 10px 0; color: var(--accent); font-weight: 800; }
#app code { font-size: 12px; color: #cfe0ff; }
#app a { color: var(--accent); text-underline-offset: 3px; }

@media (max-width: 620px) {
  #app .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #app .objet { padding: 9px 9px 11px; border-radius: 16px; }
  #app .nom { font-size: 13px; }
  #app button { padding: 10px 14px; font-size: 13.5px; }
  .marche-tete { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  #app h1, #app .solde, #app .carte::before, #app .entete::before, #app .objet::before { animation: none; }
  #app .objet, #app button { transition: none; }
}

/* ── ouverture du marché : titre irisé + éventail de cartes qui flottent (30/09, « du niveau du site ») ── */
.marche-tete { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 30px; align-items: center; padding-top: 56px; padding-bottom: 20px; }
.mt-titre { margin: 12px 0 6px; font: 700 clamp(46px, 8vw, 96px)/.95 var(--font-display); letter-spacing: -.02em;
  background: var(--holo); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: marcheHolo 10s linear infinite;
  filter: drop-shadow(0 10px 40px rgba(160,190,255,.25)); }
.mt-pastilles { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.mt-pastilles li { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.mt-pastilles li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mt-eventail { position: relative; height: clamp(250px, 30vw, 360px); perspective: 1000px; }
.mt-eventail .carte-f { position: absolute; top: 50%; left: 50%; width: clamp(150px, 17vw, 220px); aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); }
.mt-eventail .carte-f img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mt-eventail .c1 { transform: translate(-112%, -46%) rotate(-12deg); animation: flotteA 7s ease-in-out infinite; }
.mt-eventail .c2 { transform: translate(-50%, -58%); z-index: 2; animation: flotteB 6s ease-in-out infinite; box-shadow: 0 40px 80px -24px rgba(160,190,255,.55), 0 0 0 1.5px rgba(200,220,255,.4); }
.mt-eventail .c3 { transform: translate(12%, -46%) rotate(12deg); animation: flotteC 8s ease-in-out infinite; }
@keyframes flotteA { 0%,100% { transform: translate(-112%, -46%) rotate(-12deg); } 50% { transform: translate(-112%, -50%) rotate(-10deg); } }
@keyframes flotteB { 0%,100% { transform: translate(-50%, -58%); } 50% { transform: translate(-50%, -63%); } }
@keyframes flotteC { 0%,100% { transform: translate(12%, -46%) rotate(12deg); } 50% { transform: translate(12%, -50%) rotate(10deg); } }
/* reflet holographique qui balaie CHAQUE carte (découpé à sa forme) */
.mt-eventail .carte-f::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(255,159,214,.32) 42%, rgba(169,216,255,.38) 50%, rgba(185,255,224,.3) 58%, transparent 70%);
  background-size: 260% 100%; animation: marcheBalaye 5.5s ease-in-out infinite; }
.mt-eventail .c1::after { animation-delay: -1.2s; } .mt-eventail .c3::after { animation-delay: -2.4s; }
@keyframes marcheBalaye { 0% { background-position: 130% 0; } 70%,100% { background-position: -30% 0; } }
.mt-eventail::before { content: ""; position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(160,190,255,.28), transparent 70%); filter: blur(10px); }
/* le titre du marché dans l'application devient un intitulé discret (l'ouverture porte le grand titre) */
#app h1 { font-size: clamp(22px, 2.6vw, 30px); margin: 4px 0 16px; }
#app .carte.centre h2 { justify-content: center; }
#app .carte.centre h2::after { content: none; }
@media (max-width: 760px) {
  .marche-tete { grid-template-columns: 1fr; padding-top: 30px; gap: 8px; }
  .mt-eventail { height: 230px; order: -1; }
  .mt-eventail .carte-f { width: 136px; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-titre, .mt-eventail .carte-f, .mt-eventail .carte-f::after { animation: none; }
}
