/* ==========================================================================
   Accueil TCG — tapis de jeu émeraude, or foil, rail catégories défilant
   ========================================================================== */

:root {
    --tcg-felt: #0f3d2e;
    --tcg-felt-deep: #0a2a20;
    --tcg-ink: #0b1220;
    --tcg-gold: #c9a227;
    --tcg-gold-soft: #e8d48b;
    --tcg-mist: #e8eef2;
    --tcg-card: #f4f7f9;
    --tcg-line: rgba(201, 162, 39, .35);
}

body.tcg-home-page,
body.uh8-page[data-universe="tcg"] {
    background:
        radial-gradient(1200px 480px at 12% -10%, rgba(201, 162, 39, .12), transparent 55%),
        radial-gradient(900px 420px at 88% 0%, rgba(15, 61, 46, .18), transparent 50%),
        linear-gradient(180deg, #eef3f6 0%, #f7fafb 40%, #eef2f4 100%);
}

.tcg-home {
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--tcg-ink);
}

/* ---- Rail horizontal (style manga mg3-brands) ----------------------------- */
.tcg-rail {
    position: relative;
    z-index: 5;
    background:
        linear-gradient(180deg, var(--tcg-felt-deep), var(--tcg-felt));
    border-bottom: 3px solid var(--tcg-gold);
    box-shadow: 0 10px 28px rgba(10, 42, 32, .28);
    padding: .75rem 0 .85rem;
}

.tcg-rail__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(.75rem, 2vw, 1.25rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcg-rail__arrow {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(232, 212, 139, .45);
    background: rgba(255, 255, 255, .08);
    color: var(--tcg-gold-soft);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease;
}

.tcg-rail__arrow:hover {
    transform: scale(1.06);
    background: rgba(201, 162, 39, .22);
}

.tcg-rail__track {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 39, .45) transparent;
}

.tcg-rail__track::-webkit-scrollbar { height: 6px; }
.tcg-rail__track::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, .45);
    border-radius: 999px;
}

.tcg-rail__tile {
    flex: 0 0 clamp(148px, 15vw, 188px);
    scroll-snap-align: start;
    min-height: 92px;
    padding: .85rem .9rem;
    text-decoration: none;
    color: #fff;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)),
        #12382c;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .2rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tcg-rail__tile:hover {
    transform: translateY(-3px);
    border-color: var(--tcg-gold);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .32);
}

.tcg-rail__sub {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(232, 212, 139, .85);
}

.tcg-rail__label {
    font-family: 'Chakra Petch', 'Manrope', sans-serif;
    font-size: clamp(.95rem, 1.4vw, 1.1rem);
    font-weight: 700;
    line-height: 1.15;
}

.tcg-rail__tile--ygo { background: linear-gradient(145deg, #1e3a5f, #0f172a); }
.tcg-rail__tile--pkm { background: linear-gradient(145deg, #b45309, #7c2d12); }
.tcg-rail__tile--op { background: linear-gradient(145deg, #0e7490, #164e63); }
.tcg-rail__tile--mtg { background: linear-gradient(145deg, #92400e, #451a03); }
.tcg-rail__tile--lol { background: linear-gradient(145deg, #0f766e, #134e4a); }
.tcg-rail__tile--box { background: linear-gradient(145deg, #334155, #0f172a); }
.tcg-rail__tile--single { background: linear-gradient(145deg, #365314, #1a2e05); }
.tcg-rail__tile--fr { background: linear-gradient(145deg, #1d4ed8, #1e3a8a); }
.tcg-rail__tile--jp { background: linear-gradient(145deg, #b91c1c, #7f1d1d); }
.tcg-rail__tile--acc { background: linear-gradient(145deg, #475569, #1e293b); }

/* ---- Hero ---------------------------------------------------------------- */
.tcg-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(201, 162, 39, .16), transparent 60%),
        linear-gradient(135deg, #071912 0%, #0f3d2e 48%, #0a221a 100%);
    color: #fff;
    padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2rem, 4.5vw, 3.25rem);
    border-bottom: 1px solid rgba(201, 162, 39, .25);
}

.tcg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    pointer-events: none;
    opacity: .55;
}

.tcg-hero__grid {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(.75rem, 2vw, 1.25rem);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
}

.tcg-hero__eyebrow {
    margin: 0 0 .55rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tcg-gold-soft);
}

.tcg-hero__title {
    margin: 0;
    font-family: 'Chakra Petch', 'Manrope', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.02em;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}

.tcg-hero__amp {
    display: inline-block;
    margin: 0 .12em;
    color: var(--tcg-gold);
    font-weight: 600;
}

.tcg-hero__tag {
    margin: .9rem 0 0;
    max-width: 36rem;
    font-size: clamp(.95rem, 1.5vw, 1.08rem);
    line-height: 1.45;
    color: rgba(236, 242, 244, .82);
}

.tcg-hero__meta {
    margin-top: 1rem;
    font-size: .92rem;
    color: rgba(232, 212, 139, .9);
}

.tcg-hero__meta strong {
    color: #fff;
    font-size: 1.15em;
}

.tcg-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
}

.tcg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .72rem 1.15rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: .88rem;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.tcg-btn:hover { transform: translateY(-2px); }

.tcg-btn--solid {
    background: linear-gradient(135deg, #e8d48b, #c9a227);
    color: #142018;
    border: 1px solid transparent;
}

.tcg-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(232, 212, 139, .45);
}

.tcg-hero__mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(110px, 1fr));
    gap: 10px;
    min-height: 240px;
}

.tcg-hero__tile {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
    transform: rotate(-1.2deg);
    transition: transform .2s ease;
}

.tcg-hero__tile:nth-child(even) { transform: rotate(1.4deg); }
.tcg-hero__tile:hover { transform: rotate(0deg) scale(1.03); z-index: 2; }

.tcg-hero__tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f8fafc, #fff);
    display: block;
}

/* ---- Grille catégories --------------------------------------------------- */
.tcg-cats__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.tcg-catcard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-height: 118px;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tcg-catcard::after {
    content: '';
    position: absolute;
    inset: auto -20% -40% auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}

.tcg-catcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, .16);
}

.tcg-catcard__sub {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .8;
}

.tcg-catcard__label {
    font-family: 'Chakra Petch', 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
}

.tcg-catcard__go {
    margin-top: auto;
    font-size: .78rem;
    font-weight: 700;
    opacity: .9;
}

.tcg-catcard--ygo { background: linear-gradient(145deg, #1e3a5f, #0f172a); }
.tcg-catcard--pkm { background: linear-gradient(145deg, #b45309, #7c2d12); }
.tcg-catcard--op { background: linear-gradient(145deg, #0e7490, #164e63); }
.tcg-catcard--mtg { background: linear-gradient(145deg, #92400e, #451a03); }
.tcg-catcard--lol { background: linear-gradient(145deg, #0f766e, #134e4a); }
.tcg-catcard--box { background: linear-gradient(145deg, #334155, #0f172a); }
.tcg-catcard--single { background: linear-gradient(145deg, #365314, #1a2e05); }
.tcg-catcard--fr { background: linear-gradient(145deg, #1d4ed8, #1e3a8a); }
.tcg-catcard--jp { background: linear-gradient(145deg, #b91c1c, #7f1d1d); }
.tcg-catcard--acc { background: linear-gradient(145deg, #475569, #1e293b); }

.tcg-section .uh-section__eyebrow {
    color: #0f3d2e;
}

.tcg-home .uh-section__more {
    color: #0f3d2e;
    font-weight: 800;
}

@media (max-width: 980px) {
    .tcg-hero__grid { grid-template-columns: 1fr; }
    .tcg-hero__mosaic { min-height: 180px; grid-template-rows: repeat(2, minmax(88px, 1fr)); }
    .tcg-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .tcg-rail__arrow { flex-basis: 32px; width: 32px; height: 32px; font-size: 1.2rem; }
    .tcg-rail__tile { flex-basis: 136px; min-height: 84px; }
    .tcg-cats__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
