:root {
    --surface: var(--ui-surface);
    --line: var(--ui-border);
    --ink: var(--ui-text);
    --ink-soft: var(--ui-muted);
    --accent: var(--ui-accent);
    --accent-2: var(--ui-accent-2);
    /* Couleur propre à l'univers Dragon */
    --fire: #f0874b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 24px;
    font-family: var(--ui-font);
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(240, 135, 75, 0.10), transparent 35%),
        var(--ui-bg);
    min-height: calc(100vh - var(--ui-bar-h, 0px));
}

h1, h2, h3 { margin: 0.7rem 0; line-height: 1.25; }
h1 { text-align: center; font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--ink); letter-spacing: -0.02em; }
h2 { color: var(--accent-2); }
h3 { color: var(--fire); }
p { margin: 0.4rem 0 0.9rem; }
ol { margin: 0; padding: 0; }

li {
    list-style: none;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(6px);
}

img {
    width: min(100%, 340px);
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--ui-shadow);
}

/* ── UNIVERSE SELECTOR ── */
.page-title { text-align: center; margin-bottom: 0.4rem; }
.page-subtitle { text-align: center; color: var(--ink-soft); margin-bottom: 2rem; }

.univers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
    padding: 1rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.univers-card {
    border-radius: var(--ui-radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    text-decoration: none;
    display: block;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    padding: 2.5rem 2rem;
    text-align: center;
}
.univers-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
    border-color: var(--accent);
}
.univers-card .uc-icon { font-size: 4rem; margin-bottom: 1rem; display: block; }
.univers-card h3 { font-size: 1.5rem; color: var(--ink); margin-bottom: 0.4rem; }
.univers-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* ── CATEGORY GRID ── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 680px;
    margin: 2rem auto 0;
}
.category-card {
    border-radius: var(--ui-radius);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    text-decoration: none;
    display: block;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
    border-color: var(--accent);
}
.category-card .cat-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.category-card h2 { color: var(--ink); margin-bottom: 0.4rem; }
.category-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* ── GALLERY GRID ── */
.section-gallery { margin-bottom: 2.5rem; }
.gallery-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fire);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}
.gallery-sublabel {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.2rem 0 0.5rem;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.2rem;
}
.gallery-card {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(6px);
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.45);
    border-color: var(--accent);
}
.gallery-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: block;
}
.gallery-card-name {
    padding: 0.65rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    line-height: 1.3;
}

/* ── DETAIL PAGE ── */
.back-nav { margin-bottom: 1.5rem; }
.detail-wrap { max-width: 920px; margin: 0 auto; }

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: start;
}
.detail-hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--ui-radius);
    border: 1px solid var(--line);
    box-shadow: var(--ui-shadow);
    display: block;
}
.detail-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.4rem; color: var(--ink); }
.detail-subtitle { color: var(--ink-soft); margin: 0 0 1.4rem; font-size: 0.95rem; }

.section-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
}
.section-box h2 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0 0 1rem;
}

.info-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:last-child { border-bottom: none; }
.info-table td:first-child {
    color: var(--ink-soft);
    padding: 0.45rem 0.8rem 0.45rem 0;
    width: 42%;
    font-weight: 500;
    white-space: nowrap;
}
.info-table td:last-child { padding: 0.45rem 0; color: var(--ink); }

/* Stats bars */
.stats-list { list-style: none; padding: 0; margin: 0; }
.stats-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.55rem;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
}
.stat-label { width: 130px; font-size: 0.88rem; color: var(--ink-soft); flex-shrink: 0; }
.stat-bar-wrap {
    flex: 1;
    height: 7px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}
.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width 0.6s ease;
}
.stat-bar-fill.fire { background: linear-gradient(90deg, #f0874b, #ff5500); }
.stat-value { width: 28px; text-align: right; font-size: 0.88rem; font-weight: 700; color: var(--ink); }

/* Capacity pills */
.cap-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cap-list li {
    background: var(--ui-accent-soft);
    border: 1px solid rgba(var(--ui-accent-rgb), 0.28);
    border-radius: 20px;
    padding: 0.28rem 0.85rem;
    font-size: 0.84rem;
    color: var(--ink);
    margin: 0;
    backdrop-filter: none;
}

/* Role tag */
.role-tag {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.role-hero { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.role-ally { background: rgba(97, 210, 130, 0.15); color: #7de8a0; border: 1px solid rgba(97,210,130,0.3); }
.role-villain { background: rgba(255, 80, 80, 0.15); color: #ff9090; border: 1px solid rgba(255,80,80,0.3); }

/* More info button */
.more-info-wrap { margin-top: 2rem; text-align: center; padding-bottom: 1rem; }
.btn-more-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 999px;
    border: 1px solid rgba(240, 135, 75, 0.65);
    background: linear-gradient(130deg, rgba(240, 135, 75, 0.35), rgba(240, 135, 75, 0.12));
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-more-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(240, 135, 75, 0.28);
}

.button_slide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button_slide:hover {
    transform: translateY(-2px);
    color: var(--ink);
    border-color: var(--accent);
}


a[href^="http"] {
    color: var(--accent);
}

a[href^="http"]:hover {
    color: #ffffff;
}

@media (max-width: 760px) {
    body {
        padding: 14px;
    }

    li {
        padding: 10px;
    }

    .detail-hero,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-img {
        max-width: 320px;
        margin: 0 auto;
    }

    .stat-label {
        width: 105px;
    }
}
