/* Style de boîte « NES » : boîte en carton noire (façon « black box » des années 80), mate et usée.
   Format 12,7 × 17,8 cm (5:7), 3,2 cm d'épaisseur. S'ajoute à css/gamebox.css. Sans logos officiels. */
.gbox--nes {
  --depth: 22cqw;                 /* carton épais : bien visible quand la boîte pivote */
  --board: #111015;               /* carton noir */
  --board-edge: #2B2A31;
  --grid: rgba(255, 255, 255, .055);
  --band-h: 9cqw;                 /* bandeau du bas : même hauteur sur la façade, la tranche et le côté */
  --band-line: .6cqw solid rgba(0, 0, 0, .35);
  --holo: #F5B8D2, #FFF0A8 25%, #B8F0D6 50%, #B8D6FF 75%, #DCC2FF;
}

/* Carton noir quadrillé, bords usés, pli en diagonale. */
.gbox--nes .gbox-front,
.gbox--nes .gbox-back,
.gbox--nes .gbox-spine,
.gbox--nes .gbox-right,
.gbox--nes .gbox-cap {
  background:
    repeating-linear-gradient(0deg, var(--grid) 0 .25cqw, transparent .25cqw 4cqw),
    repeating-linear-gradient(90deg, var(--grid) 0 .25cqw, transparent .25cqw 4cqw),
    var(--board);
}
.gbox--nes .gbox-face { border-radius: .8cqw; }
.gbox--nes .gbox-front { padding: 0; box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 0 7cqw rgba(0, 0, 0, .65); }
.gbox--nes .gbox-front::before { /* coins râpés et pli du carton (remplace la charnière des boîtiers) */
  inset: 0; width: auto; z-index: 5; pointer-events: none; box-shadow: none;
  background:
    radial-gradient(circle at 0 0, rgba(232, 222, 205, .5) 0 1cqw, transparent 3cqw),
    radial-gradient(circle at 100% 0, rgba(232, 222, 205, .4) 0 .8cqw, transparent 2.6cqw),
    radial-gradient(circle at 0 100%, rgba(232, 222, 205, .45) 0 1cqw, transparent 3cqw),
    radial-gradient(circle at 100% 100%, rgba(232, 222, 205, .5) 0 1.2cqw, transparent 3.4cqw),
    linear-gradient(104deg, transparent 57%, rgba(255, 255, 255, .045) 57.6%, rgba(0, 0, 0, .14) 58.4%, transparent 59.4%);
}

/* Ordre de lecture NES : titre en haut, illustration, ligne « Série », bandeau du bas. */
.gbox--nes .gb-plate { order: 1; position: static; background: none; border: 0; padding: 4.5cqw 5.5cqw 2.6cqw; }
.gbox--nes .gb-art { order: 2; margin: 0 5.5cqw; border: .7cqw solid #3A3944; border-radius: .6cqw; }
.gbox--nes .gb-series { order: 3; display: block; padding: 2cqw 5.5cqw 1.6cqw; text-align: right;
  font: italic 800 3.5cqw var(--font-body); text-transform: uppercase; color: var(--r); letter-spacing: .04em; }
.gbox--nes .gb-band { order: 4; }

/* Titre penché façon arcade, avec une ombre à la couleur de la rareté. */
.gbox--nes .gb-title { color: #fff; font-size: 7.6cqw; line-height: 1; transform: skewX(-8deg); transform-origin: left;
  text-shadow: .5cqw .5cqw 0 var(--r-edge), 1cqw 1cqw 0 rgba(0, 0, 0, .6); -webkit-line-clamp: 2; }
.gbox--nes .gb-meta { color: #B8B7C6; padding-right: 0; margin-top: 1.4cqw; font-size: 3.2cqw; }
.gbox--nes .gb-num { display: none; }
.gbox--nes .gb-sticker { display: none; }

/* Illustration : lignes d'écran et petite trame, comme une capture de télé cathodique. */
.gbox--nes .gb-art img { filter: saturate(1.08) contrast(1.06); }
.gbox--nes .gb-art::after { opacity: 1; mix-blend-mode: multiply;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 .45cqw, transparent .45cqw 1.1cqw); }

/* Sceau doré rond avec le % d'avis positifs. */
.gbox--nes .gb-rating { display: flex; position: absolute; z-index: 3; left: 3cqw; bottom: 14cqw; width: 17cqw; height: 17cqw;
  flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; color: #3B2A12;
  background: radial-gradient(circle at 35% 30%, #FFF3B8, #E9C45A 55%, #B98A22);
  box-shadow: 0 0 0 .6cqw #7A5A12, inset 0 0 0 1.4cqw rgba(255, 255, 255, .25), .6cqw .9cqw 0 rgba(0, 0, 0, .5);
  transform: rotate(-12deg); }
.gbox--nes .gb-rating strong { font-family: var(--font-display); font-weight: 400; font-size: 5.2cqw; }
.gbox--nes .gb-rating span { font-size: 2.2cqw; font-weight: 800; margin-top: .4cqw; }

/* Bandeau du bas : bande de couleur de la rareté, texte encre. */
.gbox--nes .gb-band { flex: none; box-sizing: border-box; height: var(--band-h); background: var(--r); color: var(--ink); border: 0; border-top: var(--band-line); padding: 0 5.5cqw; }
.gbox--nes .gb-platform { background: var(--ink); color: var(--r); }
.gbox--nes .gb-band .pips i { box-shadow: inset 0 0 0 .5cqw var(--ink); }
.gbox--nes .gb-band .pips i.on { background: var(--ink); }
.gbox--nes[data-rarity="mythique"] .gb-band { background: linear-gradient(90deg, var(--holo)); }
.gbox--nes[data-rarity="mythique"] .gbox-front { background:
    repeating-linear-gradient(0deg, var(--grid) 0 .25cqw, transparent .25cqw 4cqw),
    repeating-linear-gradient(90deg, var(--grid) 0 .25cqw, transparent .25cqw 4cqw), var(--board); }
.gbox--nes[data-rarity="mythique"] .gb-plate { background: none; }

/* Carton mat : à peine un reflet. */
.gbox--nes .gb-gloss { opacity: .3; mix-blend-mode: soft-light; }

/* Dos : carton noir, fausses captures, texte et code-barres. */
.gbox--nes .gbox-back { padding: 8cqw 7cqw 6cqw; justify-content: flex-start; gap: 5cqw; box-shadow: inset 0 0 0 .5cqw var(--board-edge); }
.gbox--nes .gb-back-lines::before { content: ''; display: block; height: 30cqw; margin-bottom: 4cqw;
  background: linear-gradient(90deg, var(--sky) 0 47%, transparent 47% 53%, var(--mint) 53%); border: .6cqw solid #3A3944; opacity: .8; }
.gbox--nes .gb-back-lines i { background: rgba(255, 255, 255, .2); }
.gbox--nes .gb-barcode { margin-top: auto; }

/* Tranche : titre blanc penché, bande de rareté en bas. */
.gbox--nes .gbox-spine { box-shadow: inset 0 0 0 .5cqw var(--board-edge); }
/* Le bandeau du bas fait le tour de la boîte, aligné sur celui de la façade.
   Tranche : son bord droit touche le bord gauche de la façade. Côté droit : son bord gauche touche le
   bord droit de la façade. Le dégradé holographique se poursuit donc sans rupture aux arêtes. */
.gbox--nes .gbox-spine::after,
.gbox--nes .gbox-right::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--band-h); box-sizing: border-box;
  background: var(--r); border-top: var(--band-line); z-index: 1;
}
.gbox--nes[data-rarity="mythique"] .gbox-spine::after { background: linear-gradient(90deg, #DCC2FF, #F5B8D2); }
.gbox--nes[data-rarity="mythique"] .gbox-right::after { background: linear-gradient(90deg, #DCC2FF, #F5B8D2); }
.gbox--nes .gbox-spine span { color: #fff; font-size: 8cqw; font-style: italic; margin-bottom: 16cqw; padding-top: 5cqw; }

/* Côtés, dessus et dessous : carton noir, arêtes râpées ; pas de jointure (une boîte s'ouvre par les rabats). */
.gbox--nes .gbox-right, .gbox--nes .gbox-cap { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 0 0 1cqw rgba(232, 222, 205, .08); }
.gbox--nes .gb-seam, .gbox--nes .gb-notch { display: none; }
.gbox--nes .gbox-top { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 3cqw 0 rgba(0, 0, 0, .35); } /* rabat rentré */
