/* ============================================================
   POKEMON CHALLENGE — Dark Pokédex Theme
   Inspiré des jeux Pokémon : rouge Pokéball, jaune Pokémon,
   fond sombre Pokédex, bordures métal, ombres douces.
   ============================================================ */

:root {
    /* Couleurs primaires Pokémon */
    --pk-red: #DC0A2D;
    --pk-red-dark: #A3081E;
    --pk-red-light: #FF3350;
    --pk-yellow: #FFCB05;
    --pk-yellow-dark: #E0A800;
    --pk-blue: #3B4CCA;
    --pk-blue-light: #5B6FE6;

    /* Fond sombre Pokédex */
    --pk-bg-dark: #1a1a2e;
    --pk-bg-mid: #16213e;
    --pk-bg-light: #1f2b47;
    --pk-bg-card: #202845;
    --pk-bg-card-hover: #263055;

    /* Texte */
    --pk-text: #e8e8e8;
    --pk-text-muted: #a8b2d1;
    --pk-text-dim: #7b87a5;

    /* Bordures & surfaces */
    --pk-border: rgba(255, 255, 255, 0.08);
    --pk-border-hover: rgba(255, 255, 255, 0.15);
    --pk-surface: rgba(255, 255, 255, 0.04);

    /* Captures / Succès */
    --pk-gold: #FFD700;
    --pk-gold-soft: rgba(255, 215, 0, 0.15);
    --pk-success: #4CAF50;
    --pk-success-soft: rgba(76, 175, 80, 0.15);
}

/* ============================================================
   BASE / BODY
   ============================================================ */
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--pk-bg-dark) !important;
    color: var(--pk-text) !important;
    min-height: 100vh;
}

main {
    background: var(--pk-bg-dark);
    color: var(--pk-text);
}

/* Forcer Bootstrap .text-muted à être lisible sur fond sombre */
.text-muted {
    color: var(--pk-text-muted) !important;
}

/* Liens génériques */
a {
    color: var(--pk-red-light);
}

a:hover {
    color: var(--pk-yellow);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: linear-gradient(180deg, #0d0d1a 0%, #151530 100%);
    border-bottom: 3px solid var(--pk-red);
    padding: 0.75rem 0;
    position: relative;
    z-index: 10000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar::before {
    display: none; /* Supprime l'animation néon */
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff !important;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.navbar-brand:hover {
    color: var(--pk-yellow) !important;
    transform: none;
    text-shadow: none;
}

.navbar-brand i {
    color: var(--pk-yellow);
    filter: none;
    animation: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.9rem !important;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.nav-link::before {
    display: none; /* Supprime la barre animée néon */
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(220, 10, 45, 0.15);
    transform: none;
    box-shadow: none;
}

.nav-link.active {
    color: #fff !important;
    background: var(--pk-red);
    font-weight: 700;
    box-shadow: none;
}

.nav-link.active::before {
    display: none;
}

.nav-link i {
    transition: none;
}

.nav-link:hover i {
    transform: none;
}

.dropdown-menu {
    background: #151530;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    z-index: 10000;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: background 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(220, 10, 45, 0.15);
    color: #fff;
    transform: none;
}

.dropdown-item i {
    color: var(--pk-red);
    transition: none;
}

.dropdown-item:hover i {
    transform: none;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
}

.btn-warning {
    background: var(--pk-yellow);
    border: none;
    color: #1a1a2e !important;
    box-shadow: none;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}

.btn-warning:hover {
    background: var(--pk-yellow-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 203, 5, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.bg-dark {
    background: #0d0d1a !important;
    border-top: 2px solid rgba(220, 10, 45, 0.4);
}

/* ============================================================
   SHINYDEX — Header
   ============================================================ */
.shinydex-header {
    background: linear-gradient(135deg, var(--pk-bg-mid) 0%, var(--pk-bg-light) 100%);
    border: 1px solid var(--pk-border);
    border-left: 4px solid var(--pk-red);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.shinydex-header::before {
    display: none; /* Supprime l'animation shine */
}

.shinydex-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: none;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 1px;
}

.shinydex-subtitle {
    font-size: 1rem;
    color: var(--pk-text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
}

/* ============================================================
   SHINYDEX — Filtres
   ============================================================ */
.top-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 100;
}

.filter-section {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    padding: 1.25rem;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.filter-section:hover {
    border-color: var(--pk-border-hover);
    box-shadow: none;
}

.filter-label {
    font-weight: 600;
    color: var(--pk-text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pk-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    color: var(--pk-text);
    transition: border-color 0.2s;
}

.filter-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--pk-red);
    box-shadow: 0 0 0 2px rgba(220, 10, 45, 0.2);
    color: #fff;
    outline: none;
}

.filter-select option {
    background: var(--pk-bg-dark);
    color: #fff;
}

.btn-reset-filter {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pk-border);
    color: var(--pk-text-muted);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.btn-reset-filter:hover {
    background: rgba(220, 10, 45, 0.12);
    border-color: rgba(220, 10, 45, 0.4);
    color: var(--pk-red-light);
    box-shadow: none;
    transform: none;
}

/* Search */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pk-bg-dark);
    border: 1px solid var(--pk-border-hover);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-results.show { display: block; }

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--pk-border);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--pk-text);
}

.search-result-item:hover {
    background: rgba(220, 10, 45, 0.1);
    transform: none;
    box-shadow: none;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-image { width: 48px; height: 48px; object-fit: contain; }
.search-result-name { font-weight: 600; color: #fff; }
.search-result-number { color: var(--pk-text-muted); font-size: 0.85rem; }
.search-no-results { padding: 1.25rem; text-align: center; color: var(--pk-text-muted); font-style: italic; }

/* ============================================================
   SHINYDEX — Dashboard
   ============================================================ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.progress-container {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    padding: 1.75rem;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.progress-container:hover {
    border-color: var(--pk-border-hover);
    box-shadow: none;
}

.progress-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.progress-title h3 {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.progress-sparkle {
    font-size: 1.5rem;
    animation: none;
}

.progress {
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--pk-border);
    margin-bottom: 1.25rem;
}

.progress-bar {
    background: linear-gradient(135deg, var(--pk-red) 0%, var(--pk-red-light) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    transition: width 0.5s ease;
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-bar::after {
    display: none; /* Supprime shimmer */
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.progress-milestone {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    background: var(--pk-surface);
    border: 1px solid var(--pk-border);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.progress-milestone:hover {
    border-color: var(--pk-border-hover);
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

.milestone-icon {
    font-size: 1.5rem;
    filter: none;
    opacity: 0.7;
}

.progress-milestone:hover .milestone-icon {
    opacity: 1;
    transform: none;
    filter: none;
}

.milestone-label {
    font-size: 0.7rem;
    color: var(--pk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.milestone-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}

/* Stats */
.stats-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    padding: 1.25rem;
    border-radius: 12px;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-item:hover {
    border-color: var(--pk-border-hover);
    transform: none;
    box-shadow: none;
}

.stat-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(220, 10, 45, 0.12);
    border: 1px solid rgba(220, 10, 45, 0.25);
    box-shadow: none;
}

.stat-item:nth-child(1) .stat-icon { background: rgba(220, 10, 45, 0.12); border-color: rgba(220, 10, 45, 0.25); }
.stat-item:nth-child(2) .stat-icon { background: rgba(255, 203, 5, 0.12); border-color: rgba(255, 203, 5, 0.25); }
.stat-item:nth-child(3) .stat-icon { background: rgba(59, 76, 202, 0.12); border-color: rgba(59, 76, 202, 0.25); }

.stat-label {
    color: var(--pk-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    text-shadow: none;
}

/* ============================================================
   SHINYDEX — Grille Pokémon
   ============================================================ */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pokemon-card {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.pokemon-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 10, 45, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pokemon-card.captured {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, var(--pk-bg-card) 0%, rgba(255, 215, 0, 0.06) 100%);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.1);
}

.pokemon-card.captured::before {
    content: '✨';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    animation: none;
}

.pokemon-number {
    font-size: 0.8rem;
    color: var(--pk-text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.pokemon-image {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    display: block;
    filter: grayscale(100%) opacity(0.25);
    transition: filter 0.3s;
}

.pokemon-card.captured .pokemon-image {
    filter: none;
}

.pokemon-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

/* Types badges — garder les couleurs officielles déjà définies */
.types-container {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 0.6rem;
    min-height: 28px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.type-badge:hover {
    transform: scale(1.05);
}

/* Couleurs officielles */
.badge-type-normal { background: linear-gradient(135deg, #A8A878, #C6C6A7); color: #000; }
.badge-type-fire { background: linear-gradient(135deg, #F08030, #F5AC78); color: #fff; }
.badge-type-water { background: linear-gradient(135deg, #6890F0, #9DB7F5); color: #fff; }
.badge-type-electric { background: linear-gradient(135deg, #F8D030, #FAE078); color: #000; }
.badge-type-grass { background: linear-gradient(135deg, #78C850, #A7DB8D); color: #000; }
.badge-type-ice { background: linear-gradient(135deg, #98D8D8, #BCE6E6); color: #000; }
.badge-type-fighting { background: linear-gradient(135deg, #C03028, #D67873); color: #fff; }
.badge-type-poison { background: linear-gradient(135deg, #A040A0, #C183C1); color: #fff; }
.badge-type-ground { background: linear-gradient(135deg, #E0C068, #EBD69D); color: #000; }
.badge-type-flying { background: linear-gradient(135deg, #A890F0, #C6B7F5); color: #000; }
.badge-type-psychic { background: linear-gradient(135deg, #F85888, #FA92B2); color: #fff; }
.badge-type-bug { background: linear-gradient(135deg, #A8B820, #C6D16E); color: #000; }
.badge-type-rock { background: linear-gradient(135deg, #B8A038, #D1C17D); color: #000; }
.badge-type-ghost { background: linear-gradient(135deg, #705898, #A292BC); color: #fff; }
.badge-type-dragon { background: linear-gradient(135deg, #7038F8, #A27DFA); color: #fff; }
.badge-type-dark { background: linear-gradient(135deg, #705848, #A29288); color: #fff; }
.badge-type-steel { background: linear-gradient(135deg, #B8B8D0, #D1D1E0); color: #000; }
.badge-type-fairy { background: linear-gradient(135deg, #EE99AC, #F4BDC9); color: #000; }

/* Capture button */
.capture-btn {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--pk-border);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 0.4rem;
    color: var(--pk-text);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.pokemon-card.captured .capture-btn {
    background: var(--pk-yellow);
    border-color: var(--pk-yellow);
    color: #1a1a2e;
    font-weight: 700;
    box-shadow: none;
}

.capture-btn:hover {
    transform: none;
    background: rgba(220, 10, 45, 0.15);
    border-color: rgba(220, 10, 45, 0.4);
    color: var(--pk-red-light);
    box-shadow: none;
}

/* Animations de capture (garder les keyframes fonctionnels, pas le néon) */
.pokemon-card.capturing {
    animation: pokeball-shake 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    position: relative;
}

.pokemon-card.capture-animation {
    animation: capture-success 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.capture-flash {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%);
    border-radius: 14px;
    pointer-events: none;
    z-index: 5;
    animation: flash-effect 0.3s ease-out;
}

/* ============================================================
   SHINYDEX — Achievement Popup
   ============================================================ */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: -400px;
    width: 380px;
    z-index: 10001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-popup.show {
    right: 20px;
}

.achievement-popup-content {
    background: linear-gradient(135deg, var(--pk-yellow) 0%, var(--pk-yellow-dark) 100%);
    border: 2px solid var(--pk-gold);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    animation: none;
}

.achievement-popup-icon {
    font-size: 3rem;
    animation: achievement-bounce 0.6s ease-out;
    filter: none;
}

@keyframes achievement-bounce {
    0% { transform: scale(0) rotate(-180deg); }
    60% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.achievement-popup-text { flex: 1; color: #1a1a2e; }
.achievement-popup-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem; opacity: 0.8; }
.achievement-popup-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.2rem; }
.achievement-popup-reward { font-size: 1rem; font-weight: 700; color: #5a3500; display: flex; align-items: center; gap: 0.3rem; }
.achievement-popup-reward::before { content: '⭐'; font-size: 1.1rem; }

/* ============================================================
   SHINYDEX — Pagination
   ============================================================ */
.pagination { gap: 0.4rem; }

.pagination .page-item .page-link {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    color: var(--pk-text-muted);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    transition: all 0.2s;
    font-weight: 600;
    min-width: 42px;
    text-align: center;
}

.pagination .page-item .page-link:hover {
    background: rgba(220, 10, 45, 0.12);
    border-color: rgba(220, 10, 45, 0.3);
    color: var(--pk-red-light);
    box-shadow: none;
    transform: none;
}

.pagination .page-item.active .page-link {
    background: var(--pk-red);
    border-color: var(--pk-red);
    color: #fff;
    box-shadow: none;
    font-weight: 700;
}

.pagination .page-item.disabled .page-link {
    background: var(--pk-surface);
    border-color: var(--pk-border);
    color: var(--pk-text-muted);
    opacity: 0.5;
}

.pagination-info {
    color: var(--pk-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================================
   ACHIEVEMENTS — Header & Stats
   ============================================================ */
.achievements-header {
    text-align: center;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    position: relative;
}

.achievements-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--pk-red);
    border-radius: 2px;
}

.achievements-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.75rem;
}

.achievements-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.achievements-stats .stat-item {
    text-align: center;
    background: none;
    border: none;
    padding: 0;
}

.achievements-stats .stat-item:hover {
    transform: none;
}

.achievements-stats .stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--pk-red);
    text-shadow: none;
}

.achievements-stats .stat-label {
    color: var(--pk-text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ============================================================
   ACHIEVEMENTS — Tabs
   ============================================================ */
.tabs-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    border-radius: 14px;
    padding: 0.5rem;
}

.tab-button {
    flex: 1;
    padding: 0.9rem 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--pk-text-muted);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    display: none; /* Supprime l'animation */
}

.tab-button:hover {
    color: #fff;
    background: rgba(220, 10, 45, 0.1);
    border-color: transparent;
    transform: none;
}

.tab-button.active {
    background: var(--pk-red);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(220, 10, 45, 0.3);
}

.tab-button .tab-icon {
    font-size: 1.3rem;
    filter: none;
}

.tab-button.active .tab-icon {
    animation: none;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ACHIEVEMENTS — Category Sections
   ============================================================ */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    border-left: 4px solid var(--category-color, var(--pk-red));
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    display: none; /* Supprime le gradient-glow du haut */
}

.category-icon {
    font-size: 2rem;
    animation: none;
}

.category-info { flex: 1; }

.category-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.category-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.category-progress-fill {
    height: 100%;
    background: var(--category-color, var(--pk-red));
    border-radius: 6px;
    transition: width 0.4s ease;
    box-shadow: none;
    position: relative;
}

.category-progress-fill::after {
    display: none; /* Supprime shimmer */
}

.category-progress-text {
    font-size: 0.8rem;
    color: var(--pk-text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* ============================================================
   ACHIEVEMENTS — Cards
   ============================================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.achievement-card {
    background: var(--pk-bg-card);
    border: 1px solid var(--pk-border);
    border-radius: 14px;
    padding: 1.25rem;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--category-color, var(--pk-red));
    opacity: 0.3;
}

.achievement-card:hover {
    transform: translateY(-3px);
    border-color: var(--pk-border-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.achievement-card.unlocked {
    border-color: var(--category-color, var(--pk-red));
    background: linear-gradient(135deg, var(--pk-bg-card) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.achievement-card.unlocked::before {
    opacity: 1;
}

.achievement-card.unlocked::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: var(--category-color, var(--pk-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    font-weight: bold;
    box-shadow: none;
    animation: none;
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.achievement-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.achievement-icon {
    font-size: 2.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pk-surface);
    border-radius: 12px;
    border: 1px solid var(--pk-border);
    flex-shrink: 0;
}

.achievement-card.unlocked .achievement-icon {
    background: rgba(var(--category-color, 220, 10, 45), 0.1);
    border-color: var(--category-color, var(--pk-red));
    animation: none;
}

.achievement-info { flex: 1; }

.achievement-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3rem 0;
}

.achievement-card.unlocked .achievement-name {
    color: #fff;
    -webkit-text-fill-color: unset;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.achievement-description {
    color: var(--pk-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.achievement-progress { margin-top: 0.75rem; }

.achievement-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.achievement-progress-fill {
    height: 100%;
    background: var(--category-color, var(--pk-red));
    border-radius: 8px;
    transition: width 0.4s ease;
    box-shadow: none;
    position: relative;
}

.achievement-progress-fill::after {
    display: none;
}

.achievement-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
}

.achievement-requirement {
    font-size: 0.8rem;
    color: var(--pk-text-muted);
}

.achievement-requirement strong {
    color: #fff;
    font-weight: 700;
}

.achievement-reward {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background: var(--pk-gold-soft);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--pk-yellow);
    font-weight: 600;
}

.achievement-card.unlocked .achievement-reward {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

/* ============================================================
   ACHIEVEMENTS — Empty Tabs
   ============================================================ */
.empty-tab {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--pk-bg-card);
    border: 2px dashed var(--pk-border);
    border-radius: 20px;
    margin: 1.5rem 0;
}

.empty-tab-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; filter: grayscale(50%); }
.empty-tab-title { font-size: 1.6rem; font-weight: 700; color: var(--pk-text); margin-bottom: 0.75rem; }
.empty-tab-message { font-size: 1rem; color: var(--pk-text-muted); }

/* ============================================================
   HOME — Hero Section
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, var(--pk-red-dark) 0%, var(--pk-red) 40%, var(--pk-bg-dark) 40%, var(--pk-bg-dark) 100%);
    text-align: center;
    padding: 6rem 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--pk-red);
}

.hero-section::before {
    content: '⚪';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    opacity: 0.05;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: #333;
    transform: translateY(-50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    color: var(--pk-yellow);
    -webkit-text-stroke: 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: var(--pk-text);
    font-weight: 600;
}

.btn-hero {
    background: var(--pk-yellow);
    color: var(--pk-bg-dark);
    font-weight: 900;
    font-size: 1.3rem;
    padding: 1rem 3rem;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255, 203, 5, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    background: var(--pk-yellow-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 203, 5, 0.4);
    color: var(--pk-bg-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--pk-bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--pk-border);
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.stat-card.pokemon::before { background: var(--pk-red); }
.stat-card.types::before { background: var(--pk-blue); }
.stat-card.challenges::before { background: var(--pk-yellow); }

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--pk-border-hover);
}

.stat-card .stat-icon {
    margin-bottom: 1rem;
    background: none;
    border: none;
    width: auto;
    height: auto;
}

.stat-card .stat-number {
    font-size: 4rem;
    font-weight: 900;
    margin: 1rem 0;
    color: #fff;
    text-shadow: none;
    -webkit-text-fill-color: unset;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.stat-card .stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pk-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card h4 {
    color: #fff;
    font-weight: 700;
    margin-top: 1rem;
    font-size: 1.3rem;
}

.stat-card .text-muted {
    color: var(--pk-text-muted) !important;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.stat-icon { animation: bounce 2s infinite; }

/* ============================================================
   AUTH — Login / Register
   ============================================================ */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--pk-bg-card);
    border-radius: 16px;
    border: 1px solid var(--pk-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #fff;
    font-weight: 900;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--pk-text-muted);
    font-size: 1.1rem;
}

.auth-container .form-label {
    font-weight: 600;
    color: var(--pk-text);
    margin-bottom: 0.5rem;
}

.auth-container .form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pk-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    color: var(--pk-text);
    transition: border-color 0.2s;
}

.auth-container .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--pk-red);
    box-shadow: 0 0 0 2px rgba(220, 10, 45, 0.2);
    color: #fff;
}

.auth-container .form-control::placeholder {
    color: var(--pk-text-muted);
    opacity: 0.7;
}

.btn-login {
    width: 100%;
    background: var(--pk-red);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    margin-top: 1.5rem;
    transition: background 0.2s, transform 0.15s;
}

.btn-login:hover {
    background: var(--pk-red-dark);
    transform: translateY(-2px);
    color: #fff;
}

.btn-register {
    width: 100%;
    background: var(--pk-yellow);
    color: var(--pk-bg-dark);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.9rem;
    border: none;
    border-radius: 10px;
    margin-top: 1.5rem;
    transition: background 0.2s, transform 0.15s;
}

.btn-register:hover {
    background: var(--pk-yellow-dark);
    transform: translateY(-2px);
    color: var(--pk-bg-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pk-border);
}

.auth-footer a {
    color: var(--pk-red-light);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   GLOBAL FORM CONTROLS (Bootstrap overrides pour fond sombre)
   ============================================================ */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--pk-border) !important;
    color: var(--pk-text) !important;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--pk-red) !important;
    box-shadow: 0 0 0 2px rgba(220, 10, 45, 0.2) !important;
    color: #fff !important;
}

.form-control::placeholder {
    color: var(--pk-text-muted) !important;
    opacity: 0.6;
}

/* Inputs de recherche spécifiques */
#searchInput {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pk-border);
    color: var(--pk-text);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--pk-red);
    box-shadow: 0 0 0 2px rgba(220, 10, 45, 0.2);
    color: #fff;
    outline: none;
}

/* ============================================================
   POKÉDEX — Styles spécifiques
   ============================================================ */
.pokedex-card {
    cursor: pointer;
}

.pokedex-card .pokedex-image {
    filter: none !important;
    opacity: 1 !important;
}

.pokedex-card:hover {
    border-color: var(--pk-blue-light);
    box-shadow: 0 8px 24px rgba(59, 76, 202, 0.2);
}

.pokedex-mini-stats {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: var(--pk-text-muted);
    font-weight: 600;
}

.pokedex-mini-stats i {
    margin-right: 0.15rem;
    font-size: 0.65rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .top-controls { grid-template-columns: 1fr !important; }
    .shinydex-header { margin: 1rem 0; padding: 1.5rem; }
}

@media (max-width: 768px) {
    .shinydex-title { font-size: 1.8rem; }
    .achievements-header h1 { font-size: 1.8rem; }
    .achievements-stats { flex-direction: column; gap: 1rem; }
    .achievements-grid { grid-template-columns: 1fr; }
    .pokemon-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
    .pokemon-card { padding: 0.75rem; }
    .tabs-navigation { flex-direction: column; }
    .tab-button { padding: 0.75rem; }
    .category-header { flex-direction: column; text-align: center; }
    .category-progress { flex-direction: column; width: 100%; }
    .achievement-popup { width: calc(100% - 40px); right: -100%; }
    .achievement-popup.show { right: 20px; }
}

/* ============================================================
   CHALLENGE — Dark theme overrides for Bootstrap components
   ============================================================ */

/* Cards */
.card {
    background: var(--pk-bg-card) !important;
    border-color: var(--pk-border) !important;
    color: var(--pk-text) !important;
}

.card-header {
    background: var(--pk-bg-light) !important;
    border-color: var(--pk-border) !important;
    color: var(--pk-text) !important;
}

.card-footer {
    background: var(--pk-bg-light) !important;
    border-color: var(--pk-border) !important;
}

/* Tables */
.table {
    color: var(--pk-text) !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-hover-bg: rgba(255,255,255,0.05);
}

.table th,
.table td {
    border-color: var(--pk-border) !important;
    color: var(--pk-text) !important;
}

.table thead th {
    color: var(--pk-text) !important;
}

/* List groups */
.list-group-item {
    background: transparent !important;
    border-color: var(--pk-border) !important;
    color: var(--pk-text) !important;
}

/* Labels */
.form-label,
.form-check-label {
    color: var(--pk-text) !important;
}

/* Dropdown */
.dropdown-menu {
    background: var(--pk-bg-card) !important;
    border-color: var(--pk-border) !important;
}

.dropdown-item {
    color: var(--pk-text) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--pk-bg-light) !important;
    color: #fff !important;
}

.dropdown-divider {
    border-color: var(--pk-border) !important;
}

/* Alerts on dark */
.alert {
    color: #fff !important;
}

/* Form check inputs */
.form-check-input {
    background-color: rgba(255,255,255,0.1) !important;
    border-color: var(--pk-border) !important;
}

.form-check-input:checked {
    background-color: var(--pk-red) !important;
    border-color: var(--pk-red) !important;
}

/* btn-close on dark */
.btn-close {
    filter: brightness(0) invert(1);
}
