/* ============================================================
   KOMA — accueil (catalogue ou boosters), boutons mis en avant, collection
   ============================================================ */
.landing {
  position: fixed; inset: 0; z-index: 66; overflow-y: auto; display: grid; grid-auto-rows: max-content; align-content: start; justify-items: center; gap: 18px;
  padding: max(16px, env(safe-area-inset-top)) 18px 40px;
  background:
    radial-gradient(circle at 50% 40%, rgba(229, 25, 47, 0.14), transparent 45%),
    repeating-conic-gradient(from 0deg at 50% 40%, rgba(20, 19, 18, 0.04) 0deg 2deg, transparent 2deg 7deg),
    radial-gradient(circle, rgba(20, 19, 18, 0.12) 1.1px, transparent 1.6px) 0 0 / 10px 10px,
    var(--paper);
  animation: ldIn 0.4s var(--ease);
}
.landing.leaving { animation: ldOut 0.35s var(--ease) forwards; }
@keyframes ldIn { from { opacity: 0; transform: scale(1.02); } }
@keyframes ldOut { to { opacity: 0; transform: scale(0.97); } }
.ld-top { width: min(1120px, 100%); display: flex; align-items: center; justify-content: space-between; }
.ld-logo { font: 400 28px/1 var(--manga); letter-spacing: 0.08em; }
.ld-logo i { font-style: normal; color: var(--red); font-size: 16px; margin-left: 8px; }
.ld-title { margin: 2px 0 0; font: 400 clamp(26px, 4.5vw, 46px)/1.1 var(--manga); text-align: center; text-shadow: 3px 3px 0 rgba(229, 25, 47, 0.25); }

/* bandeau de collection : le but du jeu, sous le titre */
.ld-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: -6px; }
.ld-stats span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 99px; background: #fff; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 900 13px/1 var(--round); }
.ld-stats b { font: 400 20px/1 var(--manga); color: var(--red); }

.ld-grid { width: min(1120px, 100%); display: grid; grid-template-columns: 1fr 1.32fr; gap: 20px; align-items: stretch; }
.ld-tile {
  position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 0; overflow: hidden; text-align: left;
  border-radius: 22px; border: 4px solid var(--ink); background: #fffdf8; box-shadow: 7px 9px 0 var(--ink);
  transition: transform 0.35s var(--spring), box-shadow 0.3s;
}
.ld-tile:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: 10px 13px 0 var(--ink); }
.ld-tile:active { transform: scale(0.98); }
.ld-catalog { aspect-ratio: 0.92; }
.ld-boost { aspect-ratio: 1.2; }
.ld-art { position: relative; overflow: hidden; }
.ld-text { display: grid; gap: 4px; padding: 16px 20px 20px; border-top: 4px solid var(--ink); background: #fff; }
.ld-text b { font: 400 clamp(22px, 3vw, 32px)/1.05 var(--manga); }
.ld-text span { font: 700 14px/1.35 var(--round); color: #6b6259; }

/* carré catalogue : éventail de couvertures */
.ld-catalog .ld-art { background: radial-gradient(circle, rgba(20, 19, 18, 0.1) 1px, transparent 1.5px) 0 0 / 9px 9px, var(--paper); }
.ld-fan { position: absolute; left: 50%; bottom: 8%; width: 36%; aspect-ratio: 0.7; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #d8d1c4; box-shadow: 4px 5px 0 var(--ink); transform-origin: 50% 110%; transition: transform 0.5s var(--spring); }
.ld-fan img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-fan:nth-child(1) { transform: translateX(-50%) rotate(-16deg) translateX(-38%); }
.ld-fan:nth-child(2) { transform: translateX(-50%) translateY(-4%); z-index: 2; }
.ld-fan:nth-child(3) { transform: translateX(-50%) rotate(16deg) translateX(38%); }
.ld-catalog:hover .ld-fan:nth-child(1) { transform: translateX(-50%) rotate(-24deg) translateX(-48%); }
.ld-catalog:hover .ld-fan:nth-child(3) { transform: translateX(-50%) rotate(24deg) translateX(48%); }

/* carré boosters : mis en avant */
.ld-boost { box-shadow: 7px 9px 0 var(--red); }
.ld-boost:hover { box-shadow: 10px 13px 0 var(--red); }
.ld-boost .ld-art { background: radial-gradient(circle at 50% 55%, #ff4a5d, var(--red) 45%, #9c0c1a); }
.ld-boost .ld-art::before { content: ""; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0deg 4deg, transparent 4deg 12deg); animation: ldSpin 28s linear infinite; }
.ld-boost .ld-text { background: var(--ink); grid-template-columns: 1fr auto; align-items: center; }
.ld-boost .ld-text b { color: #fff; }
.ld-boost .ld-text span { color: var(--gold); font-size: 15px; font-weight: 900; grid-column: 1; }
.ld-open { grid-row: 1 / span 2; grid-column: 2; padding: 12px 20px; border-radius: 99px; background: var(--gold); color: var(--ink); border: 3px solid #fff; font: 400 16px/1 var(--manga); animation: heroPulse 1.8s ease-in-out infinite; }
.ld-pack { position: absolute; left: 42%; top: 52%; width: 34%; transform: translate(-50%, -50%) rotate(-6deg); filter: drop-shadow(8px 12px 0 rgba(20, 19, 18, 0.45)); animation: ldFloat 3.2s ease-in-out infinite; }
.ld-pack canvas { display: block; width: 100%; height: auto; border-radius: 6px; }
.ld-pack.b2 { width: 28%; left: 72%; top: 57%; transform: translate(-50%, -50%) rotate(10deg); animation-delay: -1.4s; }
.ld-pack::after { content: ""; position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 48%, transparent 60%) no-repeat; background-size: 250% 100%; animation: ldShine 3.5s ease-in-out infinite; }
@keyframes ldSpin { to { transform: rotate(360deg); } }
@keyframes ldFloat { 50% { margin-top: -10px; } }
@keyframes ldShine { 0%, 30% { background-position: 150% 0; } 70%, 100% { background-position: -60% 0; } }
.ld-ribbon { position: absolute; z-index: 3; left: -44px; top: 24px; padding: 8px 52px; background: var(--gold); border: 3px solid var(--ink); font: 400 13px/1 var(--manga); transform: rotate(-28deg); box-shadow: 0 3px 0 var(--ink); }

/* le carnet, mis en avant sous les deux carrés : éventail des cartes les plus rares */
.ld-binder {
  position: relative; width: min(1120px, 100%); display: flex; align-items: center; gap: 18px; padding: 16px 24px 16px 18px; border-radius: 18px; text-align: left; overflow: hidden;
  border: 4px solid var(--ink); background: var(--gold); box-shadow: 6px 7px 0 var(--ink); transition: transform 0.3s var(--spring);
}
.ld-binder:hover { transform: translateY(-3px) rotate(0.4deg); }
.ld-bfan { position: relative; flex: none; width: 150px; height: 92px; }
.ld-bcard { position: absolute; bottom: 0; left: 50%; width: 58px; aspect-ratio: 0.7; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 3px 4px 0 var(--ink); transform-origin: 50% 130%; transition: transform 0.4s var(--spring); }
.ld-bcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-bcard:nth-child(1) { transform: translateX(-50%) rotate(-24deg) translateX(-30px); }
.ld-bcard:nth-child(2) { transform: translateX(-50%) rotate(-8deg) translateX(-10px); }
.ld-bcard:nth-child(3) { transform: translateX(-50%) rotate(8deg) translateX(10px); }
.ld-bcard:nth-child(4) { transform: translateX(-50%) rotate(24deg) translateX(30px); }
.ld-binder:hover .ld-bcard:nth-child(1) { transform: translateX(-50%) rotate(-30deg) translateX(-40px); }
.ld-binder:hover .ld-bcard:nth-child(4) { transform: translateX(-50%) rotate(30deg) translateX(40px); }
.ld-bempty svg { width: 54px; height: 54px; fill: #fff; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; margin: 20px 48px; }
.ld-binder-txt { display: grid; gap: 4px; flex: 1; min-width: 0; }
.ld-binder-txt b { font: 400 clamp(19px, 2.4vw, 26px)/1.1 var(--manga); }
.ld-binder-txt small { font: 900 13.5px/1.3 var(--round); }
.ld-bar { height: 12px; border-radius: 6px; border: 2.5px solid var(--ink); background: #fff; overflow: hidden; max-width: 380px; }
.ld-bar i { display: block; height: 100%; background: var(--red); transition: width 0.6s var(--ease); }
.ld-binder > i { font: 400 30px/1 var(--manga); font-style: normal; }
.ld-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ld-links button { position: relative; height: 42px; padding: 0 18px; border-radius: 99px; border: 3px solid var(--ink); background: #fff; font: 900 14px/1 var(--round); box-shadow: 3px 3px 0 var(--ink); transition: transform 0.25s var(--spring); }
.ld-links button:hover { transform: translateY(-2px); }

/* boutons mis en avant dans l'en-tête du catalogue */
.top-center { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); display: flex; gap: 8px; pointer-events: auto; }
.hero-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 99px;
  background: #fff; border: 3px solid var(--ink); box-shadow: 3px 4px 0 var(--ink); font: 400 16px/1 var(--manga); white-space: nowrap;
  transition: transform 0.25s var(--spring), box-shadow 0.2s;
}
.hero-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero-btn:hover { transform: translateY(-2px) rotate(-1deg); }
.hero-btn.red { background: var(--red); color: #fff; animation: heroPulse 2.4s ease-in-out infinite; }
.hero-btn.ghost { background: rgba(255, 255, 255, 0.85); font: 900 14px/1 var(--round); height: 44px; }
.hb-badge { position: absolute; top: -9px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--ink); font: 400 12px/18px var(--manga); border: 2px solid var(--ink); text-align: center; }
.hero-btn.red .hb-badge { background: #fff; }
@keyframes heroPulse { 50% { box-shadow: 3px 4px 0 var(--ink), 0 0 0 6px rgba(229, 25, 47, 0.22); } }

/* rappel flottant dans le catalogue : boosters prêts à ouvrir */
.boost-cta {
  position: fixed; z-index: 24; right: 22px; bottom: 74px; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 99px;
  background: var(--red); color: #fff; border: 3px solid var(--ink); box-shadow: 4px 5px 0 var(--ink); font: 400 15px/1 var(--manga);
  animation: ctaBob 2s ease-in-out infinite;
}
.boost-cta svg { width: 26px; height: 26px; fill: #fff; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.boost-cta small { display: block; margin-top: 3px; font: 900 11px/1 var(--round); opacity: 0.9; }
.boost-cta:hover { transform: scale(1.05) rotate(-1deg); }
body.in-game .boost-cta, body.in-landing .boost-cta { display: none; }
@keyframes ctaBob { 50% { transform: translateY(-5px); } }

/* la collection dans la fiche d'un manga */
.sh-collect { margin-top: 16px; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--ink); background: #fff7c7; box-shadow: 3px 3px 0 var(--ink); }
.sh-collect-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sh-collect-head b { font: 400 16px/1.1 var(--manga); }
.sh-collect-head span { font: 900 12.5px/1 var(--round); color: #6b6259; }
.sh-collect .ld-bar { margin-top: 8px; max-width: none; }
.sh-collect-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.sh-collect-row img { width: 40px; aspect-ratio: 0.7; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 5px; background: #d8d1c4; }
.sh-collect .pbtn { margin-top: 10px; height: 38px; }

@media (max-width: 1100px) {
  .top-center { position: fixed; top: auto; bottom: 74px; }
  .hero-btn { height: 44px; padding: 0 14px; font-size: 14px; }
  .boost-cta { bottom: 130px; }
}
@media (max-width: 760px) {
  .ld-grid { grid-template-columns: 1fr; }
  .ld-catalog, .ld-boost { aspect-ratio: 1.15; }
  .ld-boost { order: -1; }
  .ld-bfan { width: 110px; }
  .top-center { left: 12px; right: 12px; transform: none; justify-content: center; bottom: 70px; }
  .hero-btn span { display: none; }
  .hero-btn.red span { display: inline; }
  .boost-cta { right: 12px; bottom: 124px; }
}
@media (prefers-reduced-motion: reduce) { .landing *, .hero-btn, .boost-cta { animation: none !important; } }

.ld-foot { margin: 6px 0 22px; text-align: center; font: 700 12.5px/1.3 var(--round); color: #6b6259; }
.ld-foot a { text-decoration: underline; text-underline-offset: 3px; }
