/* ============================================================
   PF2026 — TCG (extensions + cartes)
   ============================================================ */

/* ---------- Extension single ---------- */
.tcg-extension {
    padding: 28px 0 80px;
}

.tcg-extension-header {
    text-align: center;
    margin-bottom: 40px;
}
.tcg-extension-logo {
    max-width: 520px;
    margin: 0 auto 24px;
    padding: 18px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.tcg-extension-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.tcg-extension-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--ink);
    margin-bottom: 18px;
}
.tcg-extension-meta {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}
.tcg-extension-meta > div {
    text-align: center;
}
.tcg-extension-meta dt {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-faint);
    margin-bottom: 4px;
}
.tcg-extension-meta dd {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.tcg-cards-grid-section { margin-top: 48px; }

/* ---------- Cards grid (shared : extension single + archive) ---------- */
.tcg-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}
.tcg-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.tcg-card:hover { transform: translateY(-4px); }

/* Shine effect on hover — cf. brief "Conception d'un composant de visualisation
   d'image haute résolution avec effet de brillance dynamique" */
.tcg-card-shine {
    position: relative;
    aspect-ratio: 5/7;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream);
    box-shadow: 0 4px 12px rgba(13, 13, 28, .08);
    transition: box-shadow .25s;
}
.tcg-card-shine img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tcg-card-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255, 255, 255, .35) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform .55s cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
}
.tcg-card:hover .tcg-card-shine {
    box-shadow: 0 18px 38px rgba(13, 13, 28, .18);
}
.tcg-card:hover .tcg-card-shine::after {
    transform: translateX(100%);
}
.tcg-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 48px;
    color: var(--ink-faint);
    background: var(--cream);
}
.tcg-card-label {
    text-align: center;
    line-height: 1.3;
}
.tcg-card-num {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-faint);
    letter-spacing: .07em;
    text-transform: uppercase;
}
.tcg-card-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

/* ---------- Carte single ---------- */
.tcg-card-single {
    padding: 28px 0 80px;
}
.tcg-card-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 48px;
    align-items: start;
    max-width: 1080px;
    margin: 28px auto 0;
}
.tcg-card-art .tcg-card-shine--hero {
    border-radius: 16px;
    aspect-ratio: 5/7;
}
.tcg-card-info-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-faint);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.tcg-card-info-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--ink);
    margin-bottom: 12px;
}
.tcg-card-info-extension {
    display: inline-block;
    padding: 6px 14px;
    background: var(--cream);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-mid);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 24px;
}
.tcg-card-info-extension:hover {
    background: var(--ink);
    color: white;
}
.tcg-card-info-body {
    margin-top: 16px;
}
.tcg-card-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}
.tcg-card-nav a {
    color: var(--ink-light);
    transition: color .15s;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tcg-card-nav a:hover { color: var(--ink); }
.tcg-card-nav-next { text-align: right; }

/* ---------- Extension archive grid ---------- */
.tcg-extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding: 8px 0 40px;
}
.tcg-extension-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .2s cubic-bezier(.16, 1, .3, 1);
}
.tcg-extension-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.tcg-extension-card-logo {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #0B0B1E 0%, #2D1B69 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
}
.tcg-extension-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.tcg-extension-card-placeholder {
    font-size: 48px;
    color: rgba(255, 255, 255, .35);
}

/* ===== Promo / Énergies : placeholder stylé (remplace les monogrammes) ===== */
.tcg-secondary-art {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #ffffff;
}
.tcg-secondary-art::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(255,255,255,.18) 0, transparent 45%),
        radial-gradient(circle at 80% 75%, rgba(255,255,255,.12) 0, transparent 45%);
    pointer-events: none;
}
.tcg-secondary-art__label {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1;
    margin: 6px 0 0;
    text-shadow: 0 2px 6px rgba(0,0,0,.35);
    position: relative; z-index: 1;
}
.tcg-secondary-art__series {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.78);
    margin-top: 6px;
    position: relative; z-index: 1;
}
.tcg-secondary-art__sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-top: 4px;
    position: relative; z-index: 1;
}
.tcg-secondary-art__corner {
    position: absolute;
    top: 10px; left: 12px;
    font-size: 26px;
    color: #ffd166;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
    z-index: 1;
}

/* Variante PROMO : fond noir/rouge à la "Black Star" */
.tcg-secondary-art--promo {
    background:
        radial-gradient(circle at 50% 50%, rgba(255,209,102,.12) 0, transparent 55%),
        linear-gradient(135deg, #1a0708 0%, #4b0a14 55%, #220409 100%);
}
.tcg-secondary-art--promo::after {
    /* Bande diagonale "Promo" subtile */
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        135deg,
        transparent 0, transparent 24px,
        rgba(255,209,102,.05) 24px, rgba(255,209,102,.05) 26px
    );
    pointer-events: none;
}
.tcg-secondary-art--promo .tcg-secondary-art__label {
    color: #ffd166;
}

/* Variante ÉNERGIE : fond doré/dégradé multi-pips */
.tcg-secondary-art--energy {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.20) 0, transparent 50%),
        linear-gradient(135deg, #2a1d05 0%, #6b4d12 50%, #2a1d05 100%);
}
.tcg-secondary-art--energy .tcg-secondary-art__label {
    color: #ffe082;
}
.tcg-secondary-art__pips {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    position: relative; z-index: 1;
}
.tcg-secondary-art__pips .pip {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.55);
    box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.tcg-secondary-art__pips .pip-feu      { background: #E62829; }
.tcg-secondary-art__pips .pip-eau      { background: #2980EF; }
.tcg-secondary-art__pips .pip-plante   { background: #3FA129; }
.tcg-secondary-art__pips .pip-electrik { background: #FAC000; }
.tcg-secondary-art__pips .pip-psy      { background: #EF4179; }
.tcg-secondary-art__pips .pip-combat   { background: #C03028; }

@media (max-width: 600px) {
    .tcg-secondary-art__label   { font-size: 18px; }
    .tcg-secondary-art__series  { font-size: 11px; }
    .tcg-secondary-art__pips .pip { width: 14px; height: 14px; }
}
.tcg-extension-card-body {
    padding: 14px 16px;
}
.tcg-extension-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 6px;
}
.tcg-extension-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    color: var(--ink-light);
}
.tcg-extension-card-meta span + span::before {
    content: '·';
    margin-right: 6px;
    color: var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .tcg-card-layout { grid-template-columns: 1fr; max-width: 480px; gap: 28px; }
    .tcg-card-info-title { font-size: 28px; }
    .tcg-extension-title { font-size: 26px; }
    .tcg-extension-meta { gap: 18px; }
    .tcg-extension-meta dd { font-size: 15px; }
    .tcg-cards-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ============================================================
   pf2026 — Archive TCG groupée par bloc (Méga-Évolution, EV…)
   ============================================================ */

.tcg-archive .archive-header { margin-bottom: 32px; }

/* Jumper sticky en haut : tags cliquables vers chaque bloc */
.tcg-block-jumper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 12px 0;
    border-top: 1px solid var(--border, #e6e6e6);
}
.tcg-block-jumper__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--surface-2, #f5f5f7);
    border: 1px solid var(--border, #e6e6e6);
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: var(--ink, #111);
    transition: background .12s, border-color .12s, transform .12s;
}
.tcg-block-jumper__item:hover {
    background: var(--accent-soft, #fdecec);
    border-color: var(--accent, #d23);
    transform: translateY(-1px);
}
.tcg-block-jumper__count {
    font-size: 11px;
    color: var(--ink-soft, #888);
    background: white;
    border-radius: 999px;
    padding: 1px 8px;
    font-variant-numeric: tabular-nums;
}

/* Sections par bloc */
.tcg-block { margin: 48px 0; scroll-margin-top: 80px; }
.tcg-block__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink, #111);
}
.tcg-block__title {
    font-size: clamp(22px, 3vw, 28px);
    margin: 0;
    font-weight: 700;
    letter-spacing: -.02em;
}
.tcg-block__years {
    font-size: 13px;
    color: var(--ink-soft, #777);
    font-variant-numeric: tabular-nums;
}
.tcg-block__count {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-soft, #888);
    padding: 4px 10px;
    background: var(--surface-2, #f5f5f7);
    border-radius: 999px;
}

/* Code Zebradex en badge sur la logo */
.tcg-extension-card-logo { position: relative; }
.tcg-extension-card-code {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, .75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}

/* ===== Vue switch grille/liste sur fiche extension ===== */

.tcg-cards-section { margin-top: 48px; }
.tcg-cards-section .section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tcg-view-switch {
    display: inline-flex;
    gap: 0;
    background: var(--surface-subtle, #f3f4f6);
    border-radius: 8px;
    padding: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}
.tcg-view-switch button {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    color: var(--text-muted, #6b7280);
    font-size: 18px;
    line-height: 1;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.tcg-view-switch button:hover { color: var(--text, #111827); }
.tcg-view-switch button.is-active {
    background: white;
    color: var(--text, #111827);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Bascule entre grid/list selon data-view */
.tcg-cards-section[data-view="grid"] .tcg-cards-list { display: none; }
.tcg-cards-section[data-view="list"] .tcg-cards-grid { display: none; }

/* Vue liste : tableau avec metadata */
.tcg-cards-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tcg-cards-list thead th {
    text-align: left;
    background: var(--surface-subtle, #f9fafb);
    color: var(--text-muted, #4b5563);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.tcg-cards-list tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle, #f3f4f6);
    vertical-align: middle;
}
.tcg-cards-list tbody tr:last-child td { border-bottom: 0; }
.tcg-cards-list tbody tr:hover { background: var(--surface-subtle, #fafafa); }

.tcg-cards-list .col-num {
    width: 56px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted, #6b7280);
    font-weight: 600;
}
.tcg-cards-list .col-name a {
    color: var(--text, #111827);
    text-decoration: none;
    font-weight: 600;
}
.tcg-cards-list .col-name a:hover { color: var(--accent, #2563eb); text-decoration: underline; }
.tcg-cards-list .col-type { width: 130px; }
.tcg-cards-list .col-rarity { width: 160px; color: var(--text-muted, #6b7280); }
.tcg-cards-list .col-hp { width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.tcg-cards-list .col-illustrator { color: var(--text-muted, #6b7280); }

/* Type pill */
.tcg-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: .02em;
    color: white;
    background: #6b7280;
}
.tcg-type--plante     { background: #78c850; }
.tcg-type--feu        { background: #f08030; }
.tcg-type--eau        { background: #6890f0; }
.tcg-type--electrique { background: #f8d030; color: #1a1a1a; }
.tcg-type--electrik   { background: #f8d030; color: #1a1a1a; }
.tcg-type--psy        { background: #f85888; }
.tcg-type--combat     { background: #c03028; }
.tcg-type--obscurite, .tcg-type--obscurité, .tcg-type--noir { background: #2c2c2c; }
.tcg-type--metal      { background: #b8b8d0; color: #1a1a1a; }
.tcg-type--fee        { background: #ee99ac; }
.tcg-type--dragon     { background: #7038f8; }
.tcg-type--incolore   { background: #c8c8b8; color: #1a1a1a; }

@media (max-width: 720px) {
    .tcg-cards-list .col-rarity,
    .tcg-cards-list .col-illustrator { display: none; }
    .tcg-cards-list thead th, .tcg-cards-list tbody td { padding: 8px 8px; }
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ===== Fiche carte : métadonnées + attaques ===== */

.tcg-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px 22px;
    margin: 24px 0 16px;
    padding: 18px;
    background: var(--surface-subtle, #f9fafb);
    border-radius: 10px;
}
.tcg-card-meta > div { display: flex; flex-direction: column; gap: 4px; }
.tcg-card-meta dt {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted, #6b7280);
}
.tcg-card-meta dd {
    margin: 0;
    font-size: 15px;
    color: var(--text, #111827);
    font-weight: 500;
}

.tcg-card-attacks {
    margin-top: 24px;
}
.tcg-card-attacks h2 {
    font-size: 18px;
    margin: 0 0 12px;
    color: var(--text, #111827);
}
.tcg-card-attacks ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tcg-attack {
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.tcg-attack-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}
.tcg-attack-name { font-weight: 700; font-size: 16px; color: var(--text, #111827); }
.tcg-attack-damage {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent, #2563eb);
    font-size: 16px;
}
.tcg-attack-cost {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    margin-bottom: 6px;
    font-family: var(--font-mono, ui-monospace, monospace);
}
.tcg-attack-effect {
    font-size: 14px;
    color: var(--text, #374151);
    line-height: 1.55;
}

.tcg-block--no-source {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px dashed var(--border, #d1d5db);
    opacity: .96;
}
.tcg-block--no-source .tcg-block__title { color: var(--text-muted, #6b7280); }
.tcg-block--no-source .tcg-block__note {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    margin: 0 0 18px;
    max-width: 720px;
    line-height: 1.5;
}
