/* ============================================================
   PF2026 — Pokédex (single + archive)
   Source : Pokemon-France.com Redesign/pokedex.html
   ============================================================ */

/* ============================================================ Single entry */
.dex-entry { padding: 16px 0 80px; }

.dex-hero {
    border-radius: var(--r-xl);
    overflow: hidden;
    color: white;
    margin-bottom: 28px;
    position: relative;
}
.dex-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 60%, rgba(255,255,255,.15) 0%, transparent 60%);
    pointer-events: none;
}
.dex-hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 40px 48px;
    align-items: center;
    position: relative;
    z-index: 1;
    min-height: 280px;
}
.dex-hero-num {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: .7;
    margin-bottom: 4px;
}
.dex-hero-name {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.05;
    margin: 0 0 6px;
}
.dex-hero-species {
    font-size: 14px;
    opacity: .85;
    margin-bottom: 16px;
}
.dex-hero-types {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dex-hero-art {
    flex-shrink: 0;
}
.dex-hero-art img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .35));
}

/* Cards : caractéristiques + stats */
.dex-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 18px;
}
.dex-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px 24px;
}
.dex-card h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
    margin-bottom: 14px;
}

.dex-card--physique dl {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 0;
}
.dex-card--physique dt {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-faint);
    margin-bottom: 4px;
}
.dex-card--physique dd {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

/* Stats bars */
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stat-row {
    display: grid;
    grid-template-columns: 90px 36px 1fr;
    gap: 12px;
    align-items: center;
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.stat-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    text-align: right;
}
.stat-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s cubic-bezier(.16, 1, .3, 1);
}
.stat-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--ink-light);
    font-weight: 600;
}
.stat-total strong {
    color: var(--ink);
    font-size: 18px;
}

/* Flavor */
.dex-flavor {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.dex-flavor h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ============================================================ Archive */
.dex-archive-hero {
    background: linear-gradient(135deg, var(--ink) 0%, var(--type-dragon) 100%);
    color: white;
    border-radius: var(--r-xl);
    padding: 40px 48px;
    margin: 16px 0 28px;
}
.dex-archive-hero-text h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 8px;
}
.dex-archive-hero-text p {
    font-size: 15px;
    opacity: .8;
    max-width: 560px;
}

/* Toolbar */
.dex-archive-toolbar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}
.dex-search {
    display: flex;
    gap: 10px;
    max-width: 480px;
}
.dex-search input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    transition: border-color .15s;
}
.dex-search input[type="search"]:focus {
    outline: none;
    border-color: var(--ink);
}

.dex-type-filters,
.dex-gen-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dex-gen-filters {
    margin-top: 8px;
}
.type-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: var(--r-full);
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--ink-light);
    text-decoration: none;
    transition: all .15s;
}
.type-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}
.type-chip.active {
    background: var(--ink);
    border-color: var(--ink);
    color: white;
}
/* Type colors on filter chips */
.type-chip.type-normal.active   { background: var(--type-normal);   border-color: var(--type-normal); }
.type-chip.type-feu.active      { background: var(--type-feu);      border-color: var(--type-feu); }
.type-chip.type-eau.active      { background: var(--type-eau);      border-color: var(--type-eau); }
.type-chip.type-plante.active   { background: var(--type-plante);   border-color: var(--type-plante); }
.type-chip.type-electrik.active { background: var(--type-electrik); border-color: var(--type-electrik); color: var(--ink); }
.type-chip.type-glace.active    { background: var(--type-glace);    border-color: var(--type-glace); color: var(--ink); }
.type-chip.type-combat.active   { background: var(--type-combat);   border-color: var(--type-combat); }
.type-chip.type-poison.active   { background: var(--type-poison);   border-color: var(--type-poison); }
.type-chip.type-sol.active      { background: var(--type-sol);      border-color: var(--type-sol); }
.type-chip.type-vol.active      { background: var(--type-vol);      border-color: var(--type-vol); color: var(--ink); }
.type-chip.type-psy.active      { background: var(--type-psy);      border-color: var(--type-psy); }
.type-chip.type-insecte.active  { background: var(--type-insecte);  border-color: var(--type-insecte); }
.type-chip.type-roche.active    { background: var(--type-roche);    border-color: var(--type-roche); color: var(--ink); }
.type-chip.type-spectre.active  { background: var(--type-spectre);  border-color: var(--type-spectre); }
.type-chip.type-dragon.active   { background: var(--type-dragon);   border-color: var(--type-dragon); }
.type-chip.type-tenebre.active  { background: var(--type-tenebre);  border-color: var(--type-tenebre); }
.type-chip.type-acier.active    { background: var(--type-acier);    border-color: var(--type-acier); color: var(--ink); }
.type-chip.type-fee.active      { background: var(--type-fee);      border-color: var(--type-fee); color: var(--ink); }

/* Grid */
.dex-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 18px;
}
.archive .dex-grid,
.post-type-archive-pokedex_entry .dex-grid,
.tax-pokemon_type .dex-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.dex-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
    transition: all .2s cubic-bezier(.16, 1, .3, 1);
}
.dex-cell:hover {
    transform: translateY(-4px) rotate(-.4deg);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.dex-cell-art {
    width: 96px;
    height: 96px;
    margin-bottom: 6px;
}
.dex-cell-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.dex-cell:hover .dex-cell-art img {
    transform: scale(1.12) translateY(-3px);
}
.dex-cell-num {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-faint);
    letter-spacing: .08em;
}
.dex-cell-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    text-align: center;
}
.dex-cell-types {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================================ Responsive */
@media (max-width: 900px) {
    .dex-hero-inner { grid-template-columns: 1fr; padding: 24px; min-height: 0; }
    .dex-hero-art img { width: 160px; height: 160px; }
    .dex-hero-name { font-size: 32px; }
    .dex-grid { grid-template-columns: 1fr; }
    .dex-archive-hero { padding: 24px; }
    .dex-archive-hero-text h1 { font-size: 26px; }
    .stat-row { grid-template-columns: 80px 30px 1fr; }
}
