/* ==========================================================================
   TOPEAK CX-BIKE CHALLENGE NAMUROIS — Page Isolée (topeak-cx-challenge.valogeo.be)
   Design sportif, lisible et responsive
   ========================================================================== */

:root {
    --cx-bg: #f4f6f9;
    --cx-surface: #ffffff;
    --cx-surface-alt: #f8fafc;
    --cx-dark: #0f172a;
    --cx-darker: #090d16;
    --cx-accent: #f59e0b;
    --cx-accent-hover: #d97706;
    --cx-accent-soft: rgba(245, 158, 11, 0.14);
    --cx-teal: #0d9488;
    --cx-blue: #2563eb;
    --cx-green: #16a34a;
    --cx-red: #dc2626;
    --cx-text: #1e293b;
    --cx-muted: #64748b;
    --cx-border: #e2e8f0;
    --cx-radius: 14px;
    --cx-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --cx-gold: #eab308;
    --cx-silver: #94a3b8;
    --cx-bronze: #d97706;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.cx-body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--cx-bg);
    color: var(--cx-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HERO HEADER (AVEC PHOTO CYCLOCROSS NAMUR & RUBALISE) --- */
.cx-hero {
    background-color: var(--cx-darker);
    background-image:
        linear-gradient(
            95deg,
            rgba(9, 13, 22, 0.92) 0%,
            rgba(15, 23, 42, 0.82) 46%,
            rgba(15, 23, 42, 0.45) 76%,
            rgba(9, 13, 22, 0.68) 100%
        ),
        url("../images/cx_hero_namur.jpg?v=3.0");
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 1.75rem 1.5rem 2.35rem;
    position: relative;
    overflow: hidden;
}

/* Rubalise de parcours cyclocross (rouge et blanche) en bas du header */
.cx-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    background: repeating-linear-gradient(
        -45deg,
        #ef4444 0px,
        #ef4444 16px,
        #ffffff 16px,
        #ffffff 32px
    );
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.cx-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 55%, rgba(255, 255, 255, 0.07) 0%, transparent 55%);
    pointer-events: none;
}

.cx-container {
    max-width: 1360px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.cx-thanks-banner {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    background: linear-gradient(100deg, rgba(6, 78, 59, 0.88) 0%, rgba(13, 148, 136, 0.76) 55%, rgba(15, 23, 42, 0.86) 100%);
    border: 1px solid rgba(52, 211, 153, 0.5);
    border-left: 5px solid #10b981;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(6, 78, 59, 0.32);
}

.cx-thanks-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.cx-thanks-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.24);
    border: 1px solid rgba(251, 113, 133, 0.5);
    color: #fb7185;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.cx-thanks-text {
    color: #f0fdf4;
    font-size: 0.93rem;
    line-height: 1.45;
    flex: 1;
    min-width: 260px;
}

.cx-thanks-text strong {
    color: #6ee7b7;
    font-weight: 700;
}

.cx-thanks-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.cx-thanks-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(167, 243, 208, 0.4);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cx-thanks-link:hover {
    background: #10b981;
    border-color: #34d399;
    color: #064e3b;
}

.cx-thanks-link.fb {
    background: rgba(37, 99, 235, 0.28);
    border-color: rgba(96, 165, 250, 0.45);
}

.cx-thanks-link.fb:hover {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.cx-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cx-hero-headline {
    flex: 1;
    min-width: 300px;
}

.cx-discipline-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.cx-disc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.cx-disc-chip i {
    color: #cbd5e1;
}

.cx-hero-emblem {
    background: rgba(9, 13, 22, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    padding: 0.55rem 0.9rem 0.45rem;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.cx-emblem-svg {
    width: 220px;
    height: 96px;
    display: block;
}

.cx-emblem-caption {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: #cbd5e1;
    margin-top: 0.1rem;
}

.cx-emblem-caption strong {
    color: #ffffff;
}

.cx-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
    backdrop-filter: blur(6px);
}

.cx-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.cx-title span {
    color: #e2e8f0;
}

.cx-subtitle {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cx-subtitle a {
    color: #f8fafc;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-underline-offset: 3px;
    font-weight: 600;
}

.cx-subtitle a:hover {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

.cx-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-top: 1.35rem;
}

.cx-kpi-card {
    background: rgba(9, 13, 22, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.cx-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cx-kpi-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.cx-kpi-label {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 500;
}

/* --- STICKY CATEGORY BAR --- */
.cx-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cx-border);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    padding: 0.75rem 1.5rem;
}

.cx-selector-layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cx-selector-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cx-group-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cx-group-btn {
    border: 1px solid var(--cx-border);
    background: var(--cx-surface-alt);
    color: var(--cx-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.38rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cx-group-btn:hover {
    color: var(--cx-dark);
    border-color: #cbd5e1;
}

.cx-group-btn.active {
    background: var(--cx-dark);
    color: #ffffff;
    border-color: var(--cx-dark);
}

.cx-select-dropdown-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cx-select-dropdown-wrap label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cx-muted);
    white-space: nowrap;
}

.cx-category-select {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cx-dark);
    background-color: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 9px;
    padding: 0.42rem 0.85rem;
    cursor: pointer;
    min-width: 240px;
}

.cx-category-select:focus {
    outline: none;
    border-color: var(--cx-dark);
}

.cx-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cx-cat-pill {
    border: 1px solid var(--cx-border);
    background: #ffffff;
    color: var(--cx-text);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.26rem 0.62rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.cx-cat-pill:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.cx-cat-pill.active {
    background: var(--cx-dark);
    color: #ffffff;
    border-color: var(--cx-dark);
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.cx-cat-pill .count {
    font-size: 0.7rem;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.cx-cat-pill.active .count {
    background: rgba(255, 255, 255, 0.2);
}

/* --- MAIN NAVIGATION TABS (GRILLE VISIBLE EN UN COUP D'OEIL SANS SCROLL) --- */
.cx-main {
    flex: 1;
    padding: 1.35rem 1.5rem;
}

.cx-nav-tabs {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.4rem;
    background: #ffffff;
    border: 1px solid var(--cx-border);
    border-radius: 14px;
    padding: 0.45rem;
    box-shadow: var(--cx-shadow);
}

.cx-nav-tab {
    border: 1px solid transparent;
    background: var(--cx-surface-alt);
    color: var(--cx-text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.28rem;
    line-height: 1.15;
    transition: all 0.15s ease;
}

.cx-nav-tab i {
    font-size: 1.05rem;
    color: var(--cx-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.cx-nav-tab:hover {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--cx-dark);
    transform: translateY(-1px);
}

.cx-nav-tab:hover i {
    color: var(--cx-accent-hover);
    transform: scale(1.1);
}

/* Mise en valeur visuelle des 2 onglets Fun / Collector */
.cx-nav-tab-special {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #92400e;
}
.cx-nav-tab-special i {
    color: #d97706;
}

.cx-nav-tab-fun {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: rgba(219, 39, 119, 0.35);
    color: #9d174d;
}
.cx-nav-tab-fun i {
    color: #db2777;
}

.cx-nav-tab.active {
    background: var(--cx-dark);
    border-color: var(--cx-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.cx-nav-tab.active i {
    color: var(--cx-accent);
}

@media (max-width: 1180px) {
    .cx-nav-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cx-nav-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cx-tab-panel {
    display: none;
}

.cx-tab-panel.active {
    display: block;
}

/* --- CARDS & SECTIONS --- */
.cx-card {
    background: var(--cx-surface);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow);
    padding: 1.35rem;
    margin-bottom: 1.5rem;
}

.cx-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.cx-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cx-dark);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.cx-card-title i {
    color: var(--cx-accent-hover);
}

.cx-card-subtitle {
    font-size: 0.85rem;
    color: var(--cx-muted);
    margin-top: 0.15rem;
}

/* --- SEGMENTED CONTROLS (Joker, Regularity Top K, Perf filter) --- */
.cx-segmented {
    display: inline-flex;
    background: var(--cx-surface-alt);
    border: 1px solid var(--cx-border);
    border-radius: 10px;
    padding: 0.22rem;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.cx-seg-btn {
    border: none;
    background: transparent;
    color: var(--cx-muted);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cx-seg-btn:hover {
    color: var(--cx-dark);
}

.cx-seg-btn.active {
    background: var(--cx-accent);
    color: var(--cx-darker);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

/* --- PODIUM TOP 5 (WITH MULTI-RIDER STEP SUPPORT) --- */
.cx-podium-stage {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 0.85rem;
    align-items: end;
    padding: 1.25rem 0.5rem 0.5rem;
    overflow-x: auto;
}

.cx-podium-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 160px;
}

/* Ordre visuel classique d'un podium à 5 marches : 4e - 2e - 1er - 3e - 5e */
.cx-podium-column[data-step="4"] { order: 1; }
.cx-podium-column[data-step="2"] { order: 2; }
.cx-podium-column[data-step="1"] { order: 3; }
.cx-podium-column[data-step="3"] { order: 4; }
.cx-podium-column[data-step="5"] { order: 5; }

.cx-podium-riders {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.cx-podium-rider-card {
    background: #ffffff;
    border: 1px solid var(--cx-border);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease;
}

.cx-podium-rider-card:hover {
    transform: translateY(-2px);
}

.cx-podium-column[data-step="1"] .cx-podium-rider-card {
    border: 2px solid var(--cx-gold);
    background: linear-gradient(180deg, #fffef5 0%, #ffffff 100%);
}

.cx-podium-column[data-step="2"] .cx-podium-rider-card {
    border: 2px solid var(--cx-silver);
}

.cx-podium-column[data-step="3"] .cx-podium-rider-card {
    border: 2px solid var(--cx-bronze);
}

.cx-podium-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--cx-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.cx-podium-club {
    font-size: 0.72rem;
    color: var(--cx-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 0.1rem;
}

.cx-podium-metric {
    display: inline-block;
    margin-top: 0.35rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--cx-darker);
    background: var(--cx-accent-soft);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.cx-podium-submetric {
    font-size: 0.72rem;
    color: var(--cx-muted);
    margin-top: 0.18rem;
}

.cx-podium-pedestal {
    width: 100%;
    border-radius: 12px 12px 6px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.25);
}

.cx-podium-column[data-step="1"] .cx-podium-pedestal {
    height: 118px;
    background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
}

.cx-podium-column[data-step="2"] .cx-podium-pedestal {
    height: 94px;
    background: linear-gradient(180deg, #64748b 0%, #334155 100%);
}

.cx-podium-column[data-step="3"] .cx-podium-pedestal {
    height: 78px;
    background: linear-gradient(180deg, #d97706 0%, #78350f 100%);
}

.cx-podium-column[data-step="4"] .cx-podium-pedestal {
    height: 62px;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.cx-podium-column[data-step="5"] .cx-podium-pedestal {
    height: 52px;
    background: linear-gradient(180deg, #0d9488 0%, #115e59 100%);
}

.cx-podium-column.empty-step {
    opacity: 0.38;
}

.cx-podium-rank-num {
    font-size: 1.55rem;
    line-height: 1;
}

.cx-podium-tie-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    margin-top: 0.25rem;
}

/* --- CHART CONTAINER --- */
.cx-chart-wrapper {
    position: relative;
    height: 360px;
    width: 100%;
}

.cx-chart-hint {
    font-size: 0.8rem;
    color: var(--cx-muted);
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- TABLES --- */
.cx-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cx-search-input {
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--cx-border);
    border-radius: 9px;
    min-width: 250px;
    background: var(--cx-surface-alt);
}

.cx-search-input:focus {
    outline: none;
    border-color: var(--cx-accent);
    background: #ffffff;
}

.cx-legend-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--cx-muted);
}

.cx-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--cx-border);
    border-radius: 12px;
}

table.cx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    background: #ffffff;
}

table.cx-table th {
    background: var(--cx-dark);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 0.85rem;
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

table.cx-table th.num,
table.cx-table td.num {
    text-align: center;
}

table.cx-table td {
    padding: 0.68rem 0.85rem;
    border-bottom: 1px solid var(--cx-border);
    vertical-align: middle;
}

table.cx-table tbody tr:hover {
    background-color: #fffbeb;
}

table.cx-table tbody tr.is-top5 {
    background-color: rgba(245, 158, 11, 0.04);
}

.cx-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    background: var(--cx-surface-alt);
    color: var(--cx-dark);
}

.cx-rank-pill.r-1 { background: #fef08a; color: #854d0e; border: 1px solid #eab308; }
.cx-rank-pill.r-2 { background: #e2e8f0; color: #1e293b; border: 1px solid #94a3b8; }
.cx-rank-pill.r-3 { background: #ffedd5; color: #9a3412; border: 1px solid #d97706; }
.cx-rank-pill.r-4,
.cx-rank-pill.r-5 { background: #dbeafe; color: #1e40af; }

.cx-delta-pos {
    color: var(--cx-green);
    font-size: 0.74rem;
    font-weight: 700;
    margin-left: 0.3rem;
}

.cx-delta-neg {
    color: var(--cx-red);
    font-size: 0.74rem;
    font-weight: 700;
    margin-left: 0.3rem;
}

.cx-rider-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: var(--cx-dark);
}

.cx-badge-icon {
    font-size: 0.9rem;
    cursor: help;
}

.cx-round-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
}

.cx-round-pts {
    font-weight: 700;
    color: var(--cx-dark);
}

.cx-round-rk {
    font-size: 0.7rem;
    color: var(--cx-muted);
}

.cx-round-rk.rk-1 {
    color: #b45309;
    font-weight: 800;
}

.cx-round-rk.rk-dnf {
    color: var(--cx-red);
    font-weight: 700;
}

.cx-total-pts {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--cx-darker);
}

.cx-btn-mini {
    border: 1px solid var(--cx-border);
    background: #ffffff;
    color: var(--cx-text);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.22rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cx-btn-mini:hover,
.cx-btn-mini.active {
    background: var(--cx-accent);
    border-color: var(--cx-accent);
    color: var(--cx-darker);
}

/* --- REGULARITY STACKED BAR --- */
.cx-reg-bar {
    display: flex;
    height: 10px;
    width: 140px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.cx-reg-seg-1 { background: #16a34a; }
.cx-reg-seg-2 { background: #3b82f6; }
.cx-reg-seg-3 { background: #f59e0b; }
.cx-reg-seg-4 { background: #94a3b8; }
.cx-reg-seg-dnf { background: #ef4444; }

/* --- CIRCUITS & WEATHER CARDS --- */
.cx-circuits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}

.cx-circuit-card {
    background: #ffffff;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 1.2rem;
    box-shadow: var(--cx-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.9rem;
    border-top: 4px solid var(--cx-accent);
}

.cx-circuit-card.upcoming {
    border-top: 4px dashed #cbd5e1;
    background: #fcfdfe;
}

.cx-circuit-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.cx-circuit-tag {
    background: var(--cx-dark);
    color: var(--cx-accent);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.cx-circuit-tag.upcoming-tag {
    background: #e2e8f0;
    color: #475569;
}

.cx-circuit-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cx-dark);
    margin-top: 0.25rem;
}

.cx-circuit-date {
    font-size: 0.82rem;
    color: var(--cx-muted);
    margin-top: 0.12rem;
}

/* Badge coloré pour l'organisateur du circuit */
.cx-org-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    margin-top: 0.45rem;
    border: 1.5px solid transparent;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.cx-org-badge.org-0 { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.cx-org-badge.org-1 { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.cx-org-badge.org-2 { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.cx-org-badge.org-3 { background: #f5f3ff; color: #6d28d9; border-color: #c4b5fd; }
.cx-org-badge.org-4 { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.cx-org-badge.org-5 { background: #fdf2f8; color: #be185d; border-color: #f9a8d4; }
.cx-org-badge.org-6 { background: #ecfeff; color: #0e7490; border-color: #67e8f9; }
.cx-org-badge.org-7 { background: #fefce8; color: #a16207; border-color: #fde047; }

/* Carte humoristique du circuit */
.cx-circuit-fun-card {
    background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    position: relative;
}

.cx-circuit-card.upcoming .cx-circuit-fun-card {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
}

.cx-circuit-alias-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cx-circuit-alias-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    color: #92400e;
}

.cx-circuit-card.upcoming .cx-circuit-alias-title {
    color: #334155;
}

.cx-circuit-alias-icon {
    font-size: 1.25rem;
}

.cx-circuit-mini-bars {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    padding: 0.42rem 0.55rem;
}

.cx-circuit-bar-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 0.45rem;
}

.cx-circuit-bar-lbl {
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
}

.cx-circuit-fun-quote {
    font-size: 0.76rem;
    line-height: 1.38;
    color: #334155;
    font-style: italic;
    background: rgba(255, 255, 255, 0.75);
    border-left: 3px solid #f59e0b;
    padding: 0.4rem 0.55rem;
    border-radius: 0 7px 7px 0;
}

.cx-circuit-starters {
    text-align: right;
}

.cx-circuit-starters .num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--cx-dark);
    line-height: 1;
}

.cx-circuit-starters .lbl {
    font-size: 0.74rem;
    color: var(--cx-muted);
}

.cx-weather-box {
    background: var(--cx-surface-alt);
    border: 1px solid var(--cx-border);
    border-radius: 10px;
    padding: 0.8rem;
}

.cx-weather-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.cx-weather-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(245, 158, 11, 0.16);
    color: var(--cx-accent-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cx-weather-summary {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--cx-dark);
}

.cx-weather-station {
    font-size: 0.72rem;
    color: var(--cx-muted);
}

.cx-weather-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    font-size: 0.78rem;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--cx-border);
}

.cx-terrain-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    margin-top: 0.55rem;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cx-terrain-pill.wet {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.cx-terrain-pill.muddy {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* --- DUEL / FACE-A-FACE --- */
.cx-duel-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cx-duel-picker {
    background: var(--cx-surface-alt);
    border: 2px solid var(--cx-border);
    border-radius: 12px;
    padding: 1rem;
}

.cx-duel-picker.rider-a {
    border-color: #f59e0b;
}

.cx-duel-picker.rider-b {
    border-color: #2563eb;
}

.cx-duel-picker select {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--cx-border);
    margin-top: 0.4rem;
}

.cx-duel-vs {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    color: var(--cx-accent-hover);
    background: var(--cx-accent-soft);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cx-duel-scoreboard {
    display: block;
    margin-bottom: 1.5rem;
}

/* --- ARÈNE ARCADE STREET FIGHTER CX --- */
.cx-sf-arena {
    background:
        radial-gradient(circle at 18% 25%, rgba(245, 158, 11, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 82% 25%, rgba(37, 99, 235, 0.25) 0%, transparent 45%),
        linear-gradient(180deg, #090d16 0%, #111827 55%, #0f172a 100%);
    border: 3px solid #334155;
    border-radius: 18px;
    padding: 1.25rem 1.35rem 1.4rem;
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(9, 13, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

/* Barre HUD supérieure façon Street Fighter (1P Health vs KO vs 2P Health) */
.cx-sf-hud {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.cx-sf-hud-side {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.cx-sf-hud-side.p2 {
    text-align: right;
}

.cx-sf-player-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.cx-sf-hud-side.p2 .cx-sf-player-topline {
    flex-direction: row-reverse;
}

.cx-sf-ptag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.cx-sf-ptag.p1 {
    background: #f59e0b;
    color: #090d16;
}

.cx-sf-ptag.p2 {
    background: #3b82f6;
    color: #ffffff;
}

.cx-sf-fighter-name {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.cx-sf-hp-outer {
    height: 22px;
    background: #1e293b;
    border: 2px solid #fde047;
    border-radius: 6px;
    padding: 2px;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
    display: flex;
    overflow: hidden;
}

.cx-sf-hp-outer.p1 {
    justify-content: flex-end;
}

.cx-sf-hp-outer.p2 {
    justify-content: flex-start;
}

.cx-sf-hp-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cx-sf-hp-fill.p1 {
    background: linear-gradient(90deg, #dc2626 0%, #f59e0b 55%, #fde047 100%);
}

.cx-sf-hp-fill.p2 {
    background: linear-gradient(90deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
}

.cx-sf-alias-line {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fde047;
    letter-spacing: 0.01em;
}

.cx-sf-hud-side.p2 .cx-sf-alias-line {
    color: #7dd3fc;
}

.cx-sf-ko-box {
    width: 68px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%);
    border: 3px solid #fde047;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.cx-sf-ko-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fde047;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.cx-sf-ko-sub {
    font-size: 0.64rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0.18rem;
    text-transform: uppercase;
}

/* Scène centrale : Combattant 1P | Statistiques Réelles & Jauges | Combattant 2P */
.cx-sf-stage {
    display: grid;
    grid-template-columns: 270px 1fr 270px;
    gap: 1.15rem;
    align-items: stretch;
}

.cx-sf-fighter-card {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    position: relative;
}

.cx-sf-fighter-card.p1 {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: inset 0 0 24px rgba(245, 158, 11, 0.12);
}

.cx-sf-fighter-card.p2 {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: inset 0 0 24px rgba(59, 130, 246, 0.12);
}

.cx-sf-art-frame {
    height: 118px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    background: #090d16;
}

.cx-sf-art-frame .cx-poke-art-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cx-sf-elem-pill {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(9, 13, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 0.15rem 0.48rem;
    border-radius: 999px;
}

.cx-sf-alias-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    padding: 0.45rem 0.6rem;
    text-align: center;
}

.cx-sf-alias-main {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fde047;
    line-height: 1.2;
}

.cx-sf-fighter-card.p2 .cx-sf-alias-main {
    color: #7dd3fc;
}

.cx-sf-alias-sub {
    font-size: 0.7rem;
    color: #cbd5e1;
    margin-top: 0.15rem;
}

.cx-sf-special-move {
    font-size: 0.73rem;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #f59e0b;
    padding: 0.38rem 0.55rem;
    border-radius: 0 7px 7px 0;
    line-height: 1.32;
}

.cx-sf-fighter-card.p2 .cx-sf-special-move {
    border-left-color: #3b82f6;
}

.cx-sf-special-move strong {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fbbf24;
    margin-bottom: 0.1rem;
}

.cx-sf-fighter-card.p2 .cx-sf-special-move strong {
    color: #60a5fa;
}

/* Colonne centrale : Vrais chiffres comparés en barres d'opposition */
.cx-sf-center-stats {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 0.95rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
}

.cx-sf-stat-row {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
}

.cx-sf-stat-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.cx-sf-val-p1 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fbbf24;
    text-align: left;
}

.cx-sf-val-p1.is-win {
    color: #fde047;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}

.cx-sf-stat-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #cbd5e1;
    text-align: center;
}

.cx-sf-val-p2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #60a5fa;
    text-align: right;
}

.cx-sf-val-p2.is-win {
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

.cx-sf-tug-bar {
    height: 9px;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    gap: 2px;
}

.cx-sf-tug-p1 {
    height: 100%;
    background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
    border-radius: 999px 0 0 999px;
}

.cx-sf-tug-p2 {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
    border-radius: 0 999px 999px 0;
}

/* Bandeau des Rounds (Manche par Manche) en bas de l'arène */
.cx-sf-rounds-bar {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.55rem;
}

.cx-sf-round-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cx-sf-round-chip.win-p1 {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.1);
}

.cx-sf-round-chip.win-p2 {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.1);
}

.cx-sf-round-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.cx-sf-round-winner {
    font-size: 0.64rem;
    padding: 0.08rem 0.38rem;
    border-radius: 4px;
    font-weight: 900;
}

.cx-sf-round-winner.p1 {
    background: #f59e0b;
    color: #090d16;
}

.cx-sf-round-winner.p2 {
    background: #3b82f6;
    color: #ffffff;
}

.cx-sf-round-winner.draw {
    background: #475569;
    color: #f8fafc;
}

.cx-sf-round-scores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
}

@media (max-width: 980px) {
    .cx-sf-stage {
        grid-template-columns: 1fr;
    }
    .cx-sf-hud {
        grid-template-columns: 1fr;
    }
    .cx-sf-ko-box {
        margin: 0 auto;
    }
}

/* --- BOUTON MINI CARTE POKÉMON SUR LES NOMS DE COUREURS --- */
.cx-rider-card-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.cx-rider-card-trigger:hover {
    color: var(--cx-accent-hover);
    text-decoration: underline;
}

.cx-poke-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 6px;
    padding: 0.08rem 0.36rem;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cx-poke-mini-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   CARTES COLLECTOR STYLE POKÉMON CX
   ========================================================================== */
.cx-collector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.cx-poke-card {
    position: relative;
    border-radius: 20px;
    padding: 11px;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 35%, #fef08a 68%, #d97706 100%);
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.16),
        inset 0 1px 2px rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
    user-select: none;
    overflow: hidden;
}

.cx-poke-card:hover {
    transform: translateY(-6px) rotate(-0.5deg) scale(1.015);
    box-shadow:
        0 20px 38px rgba(15, 23, 42, 0.26),
        0 0 22px rgba(245, 158, 11, 0.4);
}

/* Reflet holographique diagonal */
.cx-poke-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.32) 45%,
        rgba(253, 224, 71, 0.18) 50%,
        transparent 70%
    );
    pointer-events: none;
    mix-blend-mode: overlay;
}

.cx-poke-inner {
    border-radius: 13px;
    padding: 0.85rem 0.9rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
    position: relative;
    z-index: 1;
    color: #0f172a;
    background: linear-gradient(165deg, #fffbeb 0%, #fef3c7 52%, #fde68a 100%);
    border: 2px solid rgba(180, 83, 9, 0.28);
}

/* Thèmes de couleur selon l'élément Pokémon */
.cx-poke-card[data-elem="feu"] .cx-poke-inner {
    background: linear-gradient(165deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%);
    border-color: rgba(225, 29, 72, 0.28);
}
.cx-poke-card[data-elem="glisse"] .cx-poke-inner {
    background: linear-gradient(165deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
    border-color: rgba(8, 145, 178, 0.28);
}
.cx-poke-card[data-elem="acier"] .cx-poke-inner {
    background: linear-gradient(165deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    border-color: rgba(51, 65, 85, 0.28);
}
.cx-poke-card[data-elem="legende"] .cx-poke-inner {
    background: linear-gradient(165deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%);
    border-color: rgba(124, 58, 237, 0.3);
}
.cx-poke-card[data-elem="boue"] .cx-poke-inner {
    background: linear-gradient(165deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border-color: rgba(194, 65, 12, 0.28);
}

.cx-poke-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.4rem;
}

.cx-poke-stage {
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #475569;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 0.15rem;
}

.cx-poke-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.22rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}

.cx-poke-elem-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    background: #0f172a;
    color: #fbbf24;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Fenêtre d'illustration de l'alias */
.cx-poke-art-window {
    position: relative;
    height: 142px;
    border-radius: 10px;
    border: 3px solid #eab308;
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.45),
        0 3px 8px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #1e293b 0%, #090d16 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cx-poke-art-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cx-poke-era-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(9, 13, 22, 0.78);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fde047;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* Bandeau Alias */
.cx-poke-alias-banner {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.42rem 0.65rem;
    text-align: center;
    border: 1px solid #f59e0b;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

.cx-poke-alias-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1.25;
    text-wrap: balance;
}

.cx-poke-alias-sub {
    font-size: 0.68rem;
    color: #cbd5e1;
    margin-top: 0.08rem;
}

/* 5 Barres de pouvoirs horizontales (sans chiffre pour rester 100% fun et valorisant) */
.cx-poke-powers {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 9px;
    padding: 0.5rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.cx-poke-power-row {
    display: grid;
    grid-template-columns: 74px 1fr;
    align-items: center;
    gap: 0.5rem;
}

.cx-poke-power-lbl {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #1e293b;
}

.cx-poke-power-track {
    height: 9px;
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.cx-poke-power-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.cx-poke-power-row:nth-child(1) .cx-poke-power-fill { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.cx-poke-power-row:nth-child(2) .cx-poke-power-fill { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.cx-poke-power-row:nth-child(3) .cx-poke-power-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.cx-poke-power-row:nth-child(4) .cx-poke-power-fill { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.cx-poke-power-row:nth-child(5) .cx-poke-power-fill { background: linear-gradient(90deg, #f59e0b, #eab308); }

/* Boîte Super-Pouvoir Humoristique */
.cx-poke-superpower {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px dashed rgba(180, 83, 9, 0.45);
    border-radius: 9px;
    padding: 0.5rem 0.65rem;
    flex: 1;
}

.cx-poke-sp-head {
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 0.32rem;
    margin-bottom: 0.18rem;
}

.cx-poke-sp-text {
    font-size: 0.73rem;
    line-height: 1.35;
    color: #334155;
    font-style: italic;
}

.cx-poke-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.64rem;
    font-weight: 700;
    color: #475569;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

/* --- MODALE CARTE COLLECTOR PLEIN ÉCRAN --- */
.cx-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.82);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.cx-modal-backdrop.open {
    display: flex;
    animation: cxFadeIn 0.2s ease;
}

@keyframes cxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.cx-modal-inner {
    position: relative;
    max-width: 390px;
    width: 100%;
}

.cx-modal-inner .cx-poke-card {
    cursor: default;
    transform: none !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(245, 158, 11, 0.45);
}

.cx-modal-inner .cx-poke-art-window {
    height: 175px;
}

.cx-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #fbbf24;
    background: #0f172a;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.cx-modal-close:hover {
    background: #ef4444;
    border-color: #ffffff;
}

/* ==========================================================================
   ONGLET CLASSEMENT FUN / BIDON DE LA SEMAINE
   ========================================================================== */
.cx-fun-banner {
    background: linear-gradient(135deg, #311042 0%, #701a75 52%, #be185d 100%);
    color: #ffffff;
    border-radius: var(--cx-radius);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 28px rgba(112, 26, 117, 0.25);
    border: 2px solid rgba(244, 114, 182, 0.45);
}

.cx-fun-banner-left {
    flex: 1;
    min-width: 280px;
}

.cx-fun-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(253, 224, 71, 0.2);
    border: 1px solid rgba(253, 224, 71, 0.55);
    color: #fde047;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.55rem;
}

.cx-fun-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.cx-fun-subtitle {
    color: #fbcfe8;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.cx-btn-fun-shuffle {
    background: #fde047;
    color: #3b0764;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 0.7rem 1.15rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, background 0.15s ease;
}

.cx-btn-fun-shuffle:hover {
    background: #facc15;
    transform: translateY(-2px) scale(1.03);
}

/* --- FOOTER --- */
.cx-footer {
    background: var(--cx-darker);
    color: #94a3b8;
    padding: 1.5rem;
    font-size: 0.82rem;
    margin-top: auto;
}

.cx-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cx-footer a {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 900px) {
    .cx-podium-stage {
        grid-template-columns: 1fr;
    }
    .cx-podium-column[data-step="1"] { order: 1; }
    .cx-podium-column[data-step="2"] { order: 2; }
    .cx-podium-column[data-step="3"] { order: 3; }
    .cx-podium-column[data-step="4"] { order: 4; }
    .cx-podium-column[data-step="5"] { order: 5; }
    .cx-podium-pedestal {
        height: 44px !important;
    }
    .cx-duel-selectors {
        grid-template-columns: 1fr;
    }
    .cx-duel-vs {
        margin: 0 auto;
    }
}
