/* ============================================================
   TRACK_05 LA RADIO : jeu de cartes (Classeur.exe, boosters).
   Une carte se dessine sur 354 × 496 : --u vaut 1/354e de sa largeur,
   toutes les mesures en découlent, de la vignette au grand format.
   ============================================================ */

.tc { container-type: inline-size; position: relative; aspect-ratio: 354 / 496; width: 100%; display: block; }
.tc-in {
  --u: calc(100cqw / 354);
  position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column;
  border: max(calc(2 * var(--u)), 1px) solid var(--black); background: var(--paper); color: var(--black);
  font-family: var(--mono); text-align: left;
}
.tc .ttl { font-family: "Arch", sans-serif; font-weight: 900; font-stretch: 62%; line-height: .92; text-transform: uppercase; font-size: calc(var(--ts, 44) * var(--u)); overflow-wrap: anywhere; }
.tc .sm { font-size: max(calc(11 * var(--u)), 6px); line-height: 1.3; text-transform: uppercase; }
.tc .row { display: flex; justify-content: space-between; align-items: center; gap: calc(8 * var(--u)); }
.tc .row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc img, .tc canvas { display: block; }
.tc .art { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #1a1a1a; }

/* Pressage */
.tc-bar {
  flex: none; height: calc(26 * var(--u)); display: flex; align-items: center; justify-content: center;
  border-bottom: max(calc(2 * var(--u)), 1px) solid var(--black);
  background: repeating-linear-gradient(to bottom, var(--paper) 0 max(calc(2 * var(--u)), 1px), var(--black) max(calc(2 * var(--u)), 1px) max(calc(3 * var(--u)), 2px));
}
.tc-bar span { background: var(--paper); padding: 0 calc(8 * var(--u)); font-size: max(calc(11 * var(--u)), 5px); font-weight: 700; white-space: nowrap; text-transform: uppercase; }
.tc-pressage .tc-pic { padding: calc(12 * var(--u)) calc(12 * var(--u)) 0; }
.tc-pressage .art { border: max(calc(2 * var(--u)), 1px) solid var(--black); }
.tc-pressage .tc-txt { flex: 1; min-height: 0; padding: calc(10 * var(--u)) calc(12 * var(--u)) calc(12 * var(--u)); display: flex; flex-direction: column; justify-content: space-between; }

/* Face B */
.tc-faceb { background: var(--black); color: var(--paper); }
.tc-top { padding: calc(12 * var(--u)) calc(14 * var(--u)) 0; }
.tc-big { min-height: calc(62 * var(--u)); margin: calc(2 * var(--u)) 0 calc(8 * var(--u)); display: flex; align-items: flex-end; padding-right: calc(52 * var(--u)); }
.tc-b { position: absolute; right: calc(12 * var(--u)); top: calc(8 * var(--u)); font: 900 calc(78 * var(--u))/1 "Arch", sans-serif; font-stretch: 62%; color: var(--lcd); }
.tc-faceb .art, .tc-or .art { width: calc(100% - 28 * var(--u)); margin: 0 calc(14 * var(--u)); flex: none; }
.tc-foot { margin-top: auto; padding: calc(10 * var(--u)) calc(14 * var(--u)); }

/* Picture disc */
.tc-disc { background: var(--blue); color: var(--white); align-items: center; padding: calc(14 * var(--u)); }
.tc-vinyl { flex: none; position: relative; width: calc(318 * var(--u)); height: calc(318 * var(--u)); border-radius: 50%; box-shadow: calc(4 * var(--u)) calc(4 * var(--u)) 0 var(--black); }
.tc-vinyl-in { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: max(calc(2 * var(--u)), 1px) solid var(--black); animation: tc-spin 5.4s linear infinite; }
.tc-vinyl-in img { width: 100%; height: 100%; object-fit: cover; }
.tc-vinyl-in::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 calc(5 * var(--u)), rgba(0, 0, 0, .13) calc(5 * var(--u)) calc(6 * var(--u))); }
.tc-hole { position: absolute; left: 50%; top: 50%; width: calc(24 * var(--u)); height: calc(24 * var(--u)); transform: translate(-50%, -50%); border-radius: 50%; background: var(--blue); border: max(calc(2 * var(--u)), 1px) solid var(--black); }
.tc-disc .tc-txt { width: 100%; margin-top: auto; }
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* Gatefold : pochette en gros pixels, lignes de balayage du lecteur */
.tc-gate { background: var(--black); color: var(--paper); }
.tc-gate canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.tc-scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .35) 2px 3px); }
.tc-veil { position: absolute; left: 0; right: 0; bottom: 0; height: 48%; background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .9)); }
.tc-gate .tc-tag { position: absolute; left: 0; right: 0; top: 0; padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(22 * var(--u)); background: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent); color: var(--lcd); }
.tc-gate .tc-txt { position: absolute; left: calc(14 * var(--u)); right: calc(14 * var(--u)); bottom: calc(12 * var(--u)); }
.tc-gate .tc-txt .sm { color: var(--lcd); margin-top: calc(5 * var(--u)); }

/* Disque d'or : feuille d'or, petit vinyle, reflet discret, petites étoiles */
.tc-or {
  color: #1A1202;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, rgba(0, 0, 0, .035) 1px 2px),
    linear-gradient(125deg, #9A7318 0%, #C4932A 12%, #F3DC8E 24%, #F8E9B0 29%, #D9AA3A 38%, #B08A25 50%, #D6A735 60%, #F5E19C 71%, #E3B848 80%, #A07A1C 92%, #C4932A 100%);
}
.tc-or .sm { font-weight: 700; }
.tc-or .art { border: max(calc(2 * var(--u)), 1px) solid var(--black); }
.tc-or .tc-big { padding-right: calc(76 * var(--u)); }
.tc-mark { position: absolute; right: calc(14 * var(--u)); top: calc(14 * var(--u)); width: calc(66 * var(--u)); height: calc(66 * var(--u)); border-radius: 50%; overflow: hidden; border: max(calc(2 * var(--u)), 1px) solid var(--black); background: repeating-radial-gradient(circle, #0A0A0A 0 calc(2 * var(--u)), #1D1D1D calc(2 * var(--u)) calc(3 * var(--u))); display: grid; place-items: center; animation: tc-spin 5.4s linear infinite; }
.tc-mark img { width: 42%; height: 42%; border-radius: 50%; object-fit: cover; }
.tc-sheen { position: absolute; inset: -30%; pointer-events: none; background: linear-gradient(115deg, transparent 44%, rgba(255, 248, 214, .28) 50%, transparent 56%); animation: tc-sheen 4s linear infinite; }
@keyframes tc-sheen { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
.tc-star { position: absolute; width: calc(30 * var(--u)); height: calc(30 * var(--u)); margin: calc(-15 * var(--u)); pointer-events: none; opacity: 0; animation: tc-star 4s linear infinite;
  background: radial-gradient(circle, #fff 0 8%, transparent 26%), linear-gradient(90deg, transparent 0 46%, #fff 50%, transparent 54%), linear-gradient(0deg, transparent 0 46%, #fff 50%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 70%); mask: radial-gradient(circle, #000 0 22%, transparent 70%); }
@keyframes tc-star { 0%, 82%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 91% { opacity: 1; transform: scale(1.1) rotate(45deg); } }

/* Pass backstage : les cartes succès */
.tc-pass { background: var(--paper); }
.tc-hang { flex: none; width: calc(70 * var(--u)); height: calc(14 * var(--u)); margin: calc(12 * var(--u)) auto calc(10 * var(--u)); background: var(--blue); border: max(calc(2 * var(--u)), 1px) solid var(--black); border-radius: calc(8 * var(--u)); }
.tc-band { flex: none; background: var(--black); color: var(--paper); text-align: center; font: 900 calc(54 * var(--u))/1 "Arch", sans-serif; font-stretch: 62%; padding: calc(8 * var(--u)) 0 calc(7 * var(--u)); text-transform: uppercase; }
.tc-icon { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--blue); }
.tc-icon .px { display: block; width: calc(150 * var(--u)); height: calc(150 * var(--u)); }
.tc-icon svg { display: block; width: 100%; height: 100%; }
.tc-info { flex: none; padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(12 * var(--u)); border-top: max(calc(2 * var(--u)), 1px) solid var(--black); }
.tc-info p { font-size: max(calc(12 * var(--u)), 6px); line-height: 1.3; margin: calc(4 * var(--u)) 0 calc(7 * var(--u)); min-height: 2.6em; }

/* Carte manquante */
.tc-miss { border: max(calc(2 * var(--u)), 1px) dashed rgba(0, 0, 0, .35); background: var(--paper-d); color: rgba(0, 0, 0, .4); align-items: center; justify-content: center; text-align: center; }
.tc-miss b { font: 900 calc(84 * var(--u))/1 "Arch", sans-serif; font-stretch: 62%; }
.tc-miss p { font-size: max(calc(13 * var(--u)), 6px); line-height: 1.35; padding: calc(10 * var(--u)) calc(26 * var(--u)) 0; }

/* Dos des cartes */
.tc-back { background: var(--black); align-items: center; justify-content: center; }
.tc-back img { width: 58%; filter: invert(1); }
.tc-frame { position: absolute; inset: calc(10 * var(--u)); border: max(calc(2 * var(--u)), 1px) solid var(--white); }
/* coins en pixel art : un angle de trois carrés, dessiné sans image */
.tc-corner { --p: calc(6 * var(--u)); position: absolute; width: calc(var(--p) * 3); height: calc(var(--p) * 3); background: linear-gradient(var(--white), var(--white)) 0 0 / 100% var(--p) no-repeat, linear-gradient(var(--white), var(--white)) 0 0 / var(--p) 100% no-repeat; }
.tc-corner.tl { left: calc(10 * var(--u)); top: calc(10 * var(--u)); }
.tc-corner.tr { right: calc(10 * var(--u)); top: calc(10 * var(--u)); transform: scaleX(-1); }
.tc-corner.bl { left: calc(10 * var(--u)); bottom: calc(10 * var(--u)); transform: scaleY(-1); }
.tc-corner.br { right: calc(10 * var(--u)); bottom: calc(10 * var(--u)); transform: scale(-1); }
.tc-lock { position: absolute; left: 0; right: 0; bottom: calc(26 * var(--u)); text-align: center; color: var(--paper); opacity: .65; font: 900 calc(38 * var(--u))/1 "Arch", sans-serif; font-stretch: 62%; }

/* Classeur.exe */
.win-body.classeur { padding: 0; display: block; }
.cl-player { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 2px solid var(--black); }
.cl-player .ach-lvl { font-size: 8px; }
.cl-player .ach-lvl b { font-size: 32px; }
.cl-player .ach-who b { font-size: 22px; }
.cl-card-btns { display: flex; gap: 6px; }
.cl-riddle { margin-top: 4px; font-size: 14px; line-height: 1.4; }
.cl-reveal .tc { animation: cl-reveal .6s steps(10) both; }
@keyframes cl-reveal { from { transform: perspective(600px) rotateY(180deg); } to { transform: perspective(600px) rotateY(0); } }
.cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-bottom: 2px solid var(--black); }
.cl-season { font: 900 30px/1 "Arch", sans-serif; font-stretch: 62%; text-transform: uppercase; }
.cl-season { display: flex; align-items: center; gap: 6px; }
.cl-se-nav { width: 24px; height: 26px; border: 2px solid var(--black); background: var(--paper); color: var(--black); font: 600 13px/1 var(--mono); padding: 0; }
.cl-se-nav:disabled { opacity: .3; cursor: default; }
.cl-note-se { padding: 8px 14px; font-size: 11px; line-height: 1.4; border-bottom: 2px solid var(--black); }
.cl-k7 { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cl-k7 .px { display: block; width: 24px; height: 24px; }
.cl-k7 svg { display: block; width: 100%; height: 100%; }
.cl-prog { flex: 1 1 150px; min-width: 130px; }
.cl-prog-txt { font-size: 11px; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; }
.cl-prog .xp span { width: 0; }
.cl-open { white-space: nowrap; }
.cl-open:disabled { opacity: .45; cursor: default; }
.cl-tabs { display: flex; overflow-x: auto; border-bottom: 2px solid var(--black); scrollbar-width: none; }
.cl-tabs::-webkit-scrollbar { display: none; }
.cl-tabs button { flex: none; padding: 7px 12px; font: 600 11px/1.25 var(--mono); text-transform: uppercase; text-align: left; color: var(--black); background: var(--paper-d); border: 0; border-right: 2px solid var(--black); }
.cl-tabs button small { display: block; font-weight: 400; font-size: 10px; }
.cl-tabs button[aria-selected="true"] { background: var(--black); color: var(--paper); }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 12px 14px 16px; }
.cl-cell { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: inherit; text-align: left; }
.cl-cell:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Grandes vues : détail d'une carte, ouverture de booster */
.cl-modal { position: fixed; inset: 0; z-index: 1700; display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding: 44px 16px 32px; background: rgba(0, 10, 90, .86); color: var(--white); font-family: var(--mono); }
.cl-x { position: absolute; right: 14px; top: 14px; padding: 6px 12px; border: 2px solid var(--black); background: var(--paper); color: var(--black); font: 600 12px var(--mono); box-shadow: 3px 3px 0 var(--black); }
.cl-big { width: min(354px, 100%); flex: none; filter: drop-shadow(5px 5px 0 var(--black)); }
.cl-eds { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; max-width: 354px; }
.cl-eds button { padding: 5px 9px; border: 2px solid var(--black); background: var(--paper); color: var(--black); font: 600 11px var(--mono); text-transform: uppercase; }
.cl-eds button[aria-pressed="true"] { background: var(--black); color: var(--paper); border-color: var(--paper); }
.cl-sheet { width: min(354px, 100%); flex: none; margin-top: 14px; padding: 12px 14px; background: var(--paper); color: var(--black); border: 2px solid var(--black); box-shadow: 5px 5px 0 var(--black); font-size: 12px; line-height: 1.45; }
.cl-sheet b { display: block; font-size: 13px; text-transform: uppercase; }
.cl-sheet .cl-meta { opacity: .65; margin-bottom: 10px; }
.cl-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-links .btn { flex: 1 1 auto; justify-content: center; }
.cl-sheet .cl-note { margin-top: 8px; font-size: 11px; opacity: .7; }

/* Booster */
.bo-stage { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 1000px; }
.bo-pack { position: relative; width: min(230px, 62vw); aspect-ratio: 230 / 340; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(6px 6px 0 var(--black)); }
.bo-body, .bo-strip { position: absolute; left: 0; right: 0; display: block; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .06) 0 2px, transparent 2px 5px), var(--blue); border: 3px solid var(--black); }
.bo-strip { top: 0; height: 12%; background: var(--black); transition: transform .32s steps(6), opacity .32s; }
.bo-body { top: 12%; bottom: 0; border-top: 3px dashed var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; color: var(--white); }
.bo-body img { width: 74%; filter: invert(1); }
.bo-body b { font: 900 40px/1 "Arch", sans-serif; font-stretch: 62%; text-transform: uppercase; }
.bo-body small { font: 400 11px var(--mono); text-transform: uppercase; }
.bo-pack.torn .bo-strip { transform: translate(18%, -60%) rotate(9deg); opacity: 0; }
.bo-pack.gone { transform: translateY(40px) scale(.9); opacity: 0; transition: transform .25s steps(5), opacity .25s; }
.bo-hint { margin-top: 18px; font-size: 12px; text-transform: uppercase; }
.bo-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; width: 100%; }
.bo-card { position: relative; perspective: 900px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: block; width: 100%; text-align: center; }
.bo-flip { position: relative; display: block; aspect-ratio: 354 / 496; transform-style: preserve-3d; transition: transform .42s; }
.bo-card.on .bo-flip { transform: rotateY(180deg); }
.bo-face { position: absolute; inset: 0; display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; filter: drop-shadow(3px 3px 0 var(--black)); }
.bo-front { transform: rotateY(180deg); }
.bo-lab { display: block; min-height: 2.8em; margin-top: 8px; font: 600 10px/1.3 var(--mono); text-transform: uppercase; opacity: 0; color: var(--white); }
.bo-card.on .bo-lab { opacity: 1; }
.bo-lab em { display: inline-block; font-style: normal; background: var(--white); color: var(--black); padding: 1px 5px; margin-bottom: 2px; }
.bo-lab em.new { background: var(--lcd); }
.cl-modal .btn:not(.btn-blue) { color: var(--black); }
.cl-share { z-index: 1750; }
.cl-story { display: block; flex: none; height: min(66vh, 640px); width: auto; aspect-ratio: 1080 / 1920; max-width: 100%; border: 2px solid var(--black); box-shadow: 5px 5px 0 var(--black); }
.bo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; min-height: 44px; }

@media (min-width: 821px) {
  .win-classeur { width: 760px; height: 620px; }
}
@media (max-width: 820px) {
  .win-classeur { scroll-margin-top: 62px; }
  .cl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cl-open { flex: 1 1 100%; justify-content: center; }
  .cl-player { grid-template-columns: 62px minmax(0, 1fr); }
  .cl-card-btns { grid-column: 1 / -1; }
  .cl-card-btns .btn { flex: 1; justify-content: center; }
  .cl-prog { flex-basis: 100%; }
  .bo-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .bo-card { grid-column: span 2; }
  .bo-card:nth-child(4) { grid-column: 2 / span 2; }
  .cl-modal { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-vinyl-in, .tc-mark, .tc-sheen, .tc-star, .cl-reveal .tc { animation: none; }
  .bo-flip, .bo-strip { transition: none; }
}
