.pokehub-events-wrapper a:hover {
    color: #ffffff;
}

.pokehub-event-type-filter-form {
    display: flex;
    flex-direction: row;
}

/* Ajustements pour les classes unifiées */
.pokehub-event-type-filter-form label {
    display: none;
}

.pokehub-events-tabs {
    padding: 10px 0;
    display: block;
}

.pokehub-events-tabs .tab.me5rine-lab-form-button {
    margin-top: 0 !important;
}

.pokehub-events-button {
    align-self: flex-start;
    margin-top: auto;
    background: var(--e-global-color-primary);
    color: var(--e-global-color-43c1c0d);
    padding: 3px 6px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-right: 5px;
    display: inline-block;
}

.pokehub-events-button.active {
    background: var(--e-global-color-secondary);
}

.pokehub-events-group-title {
    font-size: 22px;
    margin-block-end: 5px !important;
    margin-block-start: 25px !important;
}

/* ===== Carte globale ===== */

.pokehub-event-card {
    margin-bottom: 14px;
}

.pokehub-event-card-inner {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 8px 12px 8px 8px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: #fff !important;
    border-left: 6px solid var(--event-color, #ff9800);
    background-color: #101010; /* ✅ fond uni */
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

/* ✅ Image à gauche, max 50%, sans dégradé interne */
.pokehub-event-card-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;

    width: 60%;                  /* max 50% de la largeur */
    height: 100%;

    background-image: var(--event-image, none);
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;

    z-index: 1;
}

/* ✅ Fondu de l’image vers la droite, sur la même moitié gauche */
.pokehub-event-card-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;                     /* on couvre la zone de l'image */
    width: 60%;
    height: 100%;

    /* Transparente à gauche (image pleine), puis fond uni à droite */
    background: linear-gradient(
        to right,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0) 35%,
        rgba(0,0,0,0.4) 65%,
        #101010 100%
    );

    z-index: 2;
    pointer-events: none;
}

/* Le contenu doit passer au-dessus de l'image + dégradé */
.event-inner-left,
.event-inner-center,
.event-inner-right {
    position: relative;
    z-index: 3;
}

.pokehub-event-card-inner:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    border-left-color: color-mix(in srgb, var(--event-color), black 40%);
}

/* ===== Colonnes internes ===== */

.event-inner-left,
.event-inner-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.event-inner-left {
    width: 200px;
}

.event-inner-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-inner-right {
    min-width: 120px;
    align-items: flex-end;
    text-align: right;
    gap: 6px;
}

/* ===== Badge type d’événement ===== */

.event-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--event-color); /* lisible sur le fond coloré */
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    width: fit-content;
}

/* ===== Titre ===== */

.event-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

/* ===== Titres principaux des blocs (identique à poke-hub-blocks-front.css) ===== */
[class*="wp-block-pokehub-"] .pokehub-block-title,
[class*="pokehub-"][class*="block-wrapper"] .pokehub-block-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #b91c1c !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    text-align: left !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

[class*="wp-block-pokehub-"] .pokehub-block-title-icon,
[class*="pokehub-"][class*="block-wrapper"] .pokehub-block-title-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: var(--pokehub-block-title-icon-box, 1.5rem);
    height: var(--pokehub-block-title-icon-box, 1.5rem);
    line-height: 0;
    color: inherit;
}

[class*="wp-block-pokehub-"] .pokehub-block-title-icon svg,
[class*="pokehub-"][class*="block-wrapper"] .pokehub-block-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

[class*="wp-block-pokehub-"] .pokehub-block-title-text,
[class*="pokehub-"][class*="block-wrapper"] .pokehub-block-title-text {
    min-width: 0;
}

/* ===== Bloc dates d'événement ===== */
.pokehub-event-dates-block-wrapper {
    margin: 2rem 0;
}

.pokehub-event-dates-block {
    margin-top: 0.5rem;
}

/* ===== Ligne des dates ===== */

.event-dates-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 3px;
    justify-content: center;
}

.event-date-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    font-size: 12px;
    white-space: nowrap;
}

.event-date-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

.event-date-dot--start {
    background: #00e676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.7);
}

.event-date-dot--end {
    background: #ff1744;
    box-shadow: 0 0 6px rgba(255, 23, 68, 0.9);
}

.event-date-text {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.event-date-middle {
    font-size: 18px;
    font-weight: 700;
    color: rgba(0,0,0,0.4);
}

/* ===== Statut + temps restant + bouton ===== */

.event-status-label {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.25);
}

.event-status-label--current {
    background: rgba(0, 200, 83, 0.25);
}

.event-status-label--upcoming {
    background: rgba(66, 133, 244, 0.25);
}

.event-status-label--past {
    background: rgba(158, 158, 158, 0.30);
}

.event-time-remaining {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
}

.event-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--event-color);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.pokehub-event-card-inner:hover .event-more-button {
    background: color-mix(in srgb, var(--event-color), black 40%);
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .pokehub-event-card-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* L’image prend TOUTE la largeur en mobile */
    .pokehub-event-card-inner::before {
        width: 100%;   /* full width */
        background-position: center top;
    }

    /* Mais le fade reste sur la moitié gauche */
    .pokehub-event-card-inner::after {
        width: 100%;      /* fade toujours sur la moitié */
        left: auto;
        right: 0;

        background: linear-gradient(
            to left,
            rgba(0,0,0,0) 0%,
            rgba(0,0,0,0.3) 40%,
            rgba(0,0,0,0.75) 80%,
            #101010 100%
        );
    }

    .event-inner-left,
    .event-inner-right {
        min-width: 0;
        align-items: flex-start;
        text-align: left;
    }

    .event-inner-right {
        align-items: flex-start;
    }

    .event-dates-row {
        gap: 1px;
    }

    .event-date-chip {
        font-size: 11.5px;
    }

    .event-time-remaining {
        margin-top: 2px;
    }

    .event-more-button {
        margin-top: 6px;
    }
}

/* Conteneur global des deux dates (si encore utilisé ailleurs) */
.event-dates {
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-date-separator {
    font-size: 18px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.35);
    margin: 0 2px;
}

.event-date-pill {
    display: inline-flex;
    align-items: stretch;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    overflow: visible;
}

.event-date-pill-left {
    position: relative;
    width: 26px;
    background: #101010;
    border: 3px solid #373a3d;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.event-date-pill-light {
    width: 16px;
    height: 16px;
    border-radius: 10px;
    background: #00c853;
    box-shadow: 0 0 6px rgba(0, 200, 83, 0.9);
}

.event-date-pill-light--start {
    background: #00c853;
    box-shadow: 0 0 6px rgba(0, 200, 83, 0.9);
    margin-top: -30px;
}

.event-date-pill-light--end {
    background: #ff1744;
    box-shadow: 0 0 6px rgba(255, 23, 68, 0.9);
    margin-top: 30px;
}

.event-date-pill-main {
    display: flex;
    text-align: center;
    flex-direction: column;
    min-width: 70px;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    margin-left: -12px;
}

.event-date-pill-top {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: #ffffff;
    padding: 4px 8px 2px 20px;
}

.event-date-day-short,
.event-date-month-short {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #d32f2f;
    letter-spacing: 0.04em;
}

.event-date-day-num {
    font-size: 18px;
    font-weight: 800;
    color: #111111;
    line-height: 1;
}

.event-date-pill-bottom {
    background: #5d5b5b;
    padding: 4px 8px 5px 20px;
}

.event-date-time {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .event-dates {
        gap: 8px;
    }

    .event-date-pill-main {
        min-width: 64px;
    }

    .event-date-day-num {
        font-size: 16px;
    }

    .event-date-time {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .pokehub-event-card .event-content {
        flex-direction: column;
    }

    .pokehub-event-card .event-thumb {
        flex: 0 0 auto;
        width: 100%;
        max-height: 180px;
        margin-top: 10px;
    }

    .pokehub-event-card .event-thumb img {
        border-radius: 0;
    }

    .pokehub-event-card .event-header,
    .pokehub-event-card .event-dates,
    .pokehub-event-card .event-meta-line,
    .pokehub-event-card .event-link {
        padding-left: 14px;
        padding-right: 14px;
    }

    .event-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .event-time-info {
        text-align: left;
    }

    .event-more-button {
        position: absolute;
        right: 0px;
        bottom: 5px;
    }
}

/* ===== Styles pour les habitats ===== */

.pokehub-habitats-block-wrapper {
    margin: 2rem 0;
}


.pokehub-habitat-item {
    margin-bottom: 2rem;
}

.pokehub-habitat-item:last-child {
    margin-bottom: 0;
}

.pokehub-habitat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pokehub-habitat-schedule-box {
    background: var(--admin-lab-color-white, #ffffff);
    border: 1px solid var(--admin-lab-color-block-border, var(--admin-lab-color-borders, #e6e6e6));
    border-left: 4px solid var(--admin-lab-color-primary, #880051);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
}

.pokehub-habitat-all-pokemon-box {
    background: var(--admin-lab-color-white, #ffffff);
    border: 1px solid var(--admin-lab-color-block-border, var(--admin-lab-color-borders, #e6e6e6));
    border-left: 4px solid var(--admin-lab-color-primary, #880051);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.pokehub-habitat-all-pokemon-info {
    background: var(--admin-lab-color-block-background, #f7f9fa);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
}

.pokehub-habitat-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.pokehub-habitat-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
    margin: 0;
    flex: 1;
}

.pokehub-habitat-schedule-inline {
    font-size: 0.875rem;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
    font-weight: 400;
}

.pokehub-habitat-schedule {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
}

.pokehub-habitat-all-message {
    font-style: italic;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
    margin-top: 0.5rem;
}

/* ===== Styles pour les quêtes d'événement (nouveau design) ===== */

.pokehub-event-quests-block-wrapper {
    margin: 2rem 0;
}


.pokehub-event-quests-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    --pokehub-fr-card-radius: 12px;
    --pokehub-fr-card-border: 1px solid rgba(15, 23, 42, 0.12);
    --pokehub-fr-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .pokehub-event-quests-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pokehub-quest-item {
    background: #ffffff;
    border: var(--pokehub-fr-card-border);
    border-radius: var(--pokehub-fr-card-radius);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    box-shadow: var(--pokehub-fr-card-shadow);
}

.pokehub-quest-item.expanded {
    background: #f4f6f8;
    border-color: var(--e-global-color-primary, #0073aa);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--e-global-color-primary, #0073aa) 22%, transparent);
}

.pokehub-quest-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* En-tête quête (enroulé) : intitulé à gauche, aperçu récompenses à droite (type Leek Duck) */
.pokehub-quest-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Lignes enroulées : hauteur homogène (aperçu sur une seule rangée de tuiles 48px). */
.pokehub-quest-item:not(.expanded) .pokehub-quest-main {
    min-height: calc(48px + 1rem);
    box-sizing: border-box;
}

.pokehub-quest-task {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
}

.pokehub-quest-task-placeholder {
    font-weight: 500;
    font-style: italic;
    color: #64748b;
}

.pokehub-quest-rewards-preview {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    max-width: min(52%, 280px);
}

.pokehub-quest-item:not(.expanded) .pokehub-quest-rewards-preview {
    margin-top: 0;
    flex-wrap: nowrap;
    align-items: center;
    height: 48px;
    overflow: hidden;
}

/* Aperçu : mini-cartes = mêmes classes que Pokémon sauvés, taille réduite */
.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile.pokehub-wild-pokemon-card {
    width: 52px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: var(--pokehub-fr-card-radius);
    border: var(--pokehub-fr-card-border);
    box-shadow: var(--pokehub-fr-card-shadow);
    box-sizing: border-box;
}

.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-card-inner {
    padding: 3px;
    gap: 0;
    justify-content: center;
}

.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-image-wrapper {
    width: 46px;
    height: 46px;
}

.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-shiny-icon,
.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-regional-icon {
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    top: 3px;
    border-width: 1px;
}

.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-shiny-icon {
    right: 3px;
}

.pokehub-quest-rewards-preview .pokehub-field-research-preview-tile .pokehub-wild-pokemon-regional-icon {
    left: 3px;
}

/* +N Pokémon supplémentaires, ×M lignes objet/poussière/… */
.pokehub-quest-preview-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.pokehub-quest-preview-other-count {
    white-space: nowrap;
    font-size: 0.64rem;
    letter-spacing: 0.02em;
    padding: 0 7px;
}

@media (max-width: 520px) {
    .pokehub-quest-main {
        flex-wrap: wrap;
    }

    .pokehub-quest-rewards-preview {
        max-width: 100%;
        justify-content: flex-start;
    }

    .pokehub-quest-item:not(.expanded) .pokehub-quest-rewards-preview {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        max-width: 100%;
    }
}

/* Masquer les images preview quand la quête est déroulée */
.pokehub-quest-item.expanded .pokehub-quest-rewards-preview {
    display: none;
}

.pokehub-quest-reward-preview-icon {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.pokehub-quest-reward-preview-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--admin-lab-color-block-background, #f7f9fa);
    z-index: 0;
}

.pokehub-quest-reward-preview-icon img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    border-radius: 50%;
    display: block;
}

.pokehub-quest-shiny-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--admin-lab-color-white, #ffffff);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--admin-lab-color-white, #ffffff);
    z-index: 2;
    line-height: 1;
}

.pokehub-quest-toggle {
    flex-shrink: 0;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 0.125rem;
    cursor: pointer;
    color: #475569;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.pokehub-quest-toggle svg {
    display: block;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.pokehub-quest-item:not(.expanded) .pokehub-quest-toggle svg {
    transform: rotate(0deg);
}

.pokehub-quest-item.expanded .pokehub-quest-toggle svg {
    transform: rotate(180deg);
}

.pokehub-quest-toggle:hover {
    color: #0f172a;
}


.pokehub-quest-details {
    padding: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-lab-color-borders, #e6e6e6);
    border-top: 1px solid color-mix(in srgb, var(--e-global-color-primary, #0073aa) 32%, transparent);
    background: #ffffff;
}

/* Par défaut : replié ; classe .expanded ajoutée au clic (JS) */
.pokehub-quest-item:not(.expanded) .pokehub-quest-details {
    display: none;
}

/* rotation du chevron gérée sur le <svg> (ci-dessus) */

.pokehub-quest-rewards-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.pokehub-quest-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pokehub-quest-reward-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Détail : tuile image = carte wild (sans nom dans la tuile ; nom à côté) */
.pokehub-quest-reward-item--pokemon .pokehub-field-research-detail-tile.pokehub-wild-pokemon-card {
    width: 76px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: var(--pokehub-fr-card-radius);
    border: var(--pokehub-fr-card-border);
    box-shadow: var(--pokehub-fr-card-shadow);
    box-sizing: border-box;
}

.pokehub-quest-reward-item--pokemon .pokehub-field-research-detail-tile .pokehub-wild-pokemon-card-inner {
    padding: 4px;
    gap: 0;
    justify-content: center;
}

.pokehub-quest-reward-item--pokemon .pokehub-field-research-detail-tile .pokehub-wild-pokemon-image-wrapper {
    width: 72px;
    height: 72px;
}

.pokehub-quest-reward-item--pokemon .pokehub-field-research-detail-tile .pokehub-wild-pokemon-name {
    display: none;
}

.pokehub-quest-reward-item--other {
    align-items: center;
}

.pokehub-quest-reward-item--other .pokehub-quest-reward-other-symbol {
    width: 40px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
}

.pokehub-quest-reward-item--other .pokehub-quest-reward-info {
    min-width: 0;
}

.pokehub-quest-reward-item--other .pokehub-quest-reward-name {
    white-space: normal;
}

.pokehub-quest-reward-item .pokehub-quest-reward-image {
    flex-shrink: 0;
}

.pokehub-quest-reward-item .pokehub-quest-reward-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.pokehub-quest-reward-item .pokehub-quest-reward-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pokehub-quest-reward-item .pokehub-quest-reward-cp {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    width: auto;
    max-width: min(12rem, 48%);
    min-width: 0;
}

.pokehub-quest-reward-image {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.pokehub-quest-reward-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--admin-lab-color-block-background, #f7f9fa);
    z-index: 0;
}

.pokehub-quest-reward-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    border-radius: 50%;
    display: block;
}

.pokehub-quest-reward-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.pokehub-quest-reward-cp {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    align-items: center;
}

.pokehub-quest-cp-box {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.15rem;
    padding: 0.3rem 0.55rem;
    background: var(--admin-lab-color-block-background, #f7f9fa);
    border: 1px solid var(--admin-lab-color-block-border, var(--admin-lab-color-borders, #e6e6e6));
    border-radius: 6px;
    min-width: 0;
    max-width: 100%;
}

.pokehub-quest-cp-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
    text-transform: uppercase;
    margin-bottom: 0;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
}

.pokehub-quest-cp-value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
    flex-shrink: 0;
    line-height: 1.2;
}

.pokehub-quest-cp-box--max .pokehub-quest-cp-value {
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
}

.pokehub-quest-cp-box--min {
    background: color-mix(in srgb, var(--admin-lab-color-block-background, #f7f9fa) 86%, #ffffff);
    border-color: color-mix(in srgb, var(--admin-lab-color-block-border, #e6e6e6) 70%, #ffffff);
}

.pokehub-quest-cp-box--min .pokehub-quest-cp-label {
    color: color-mix(in srgb, var(--admin-lab-color-text, #5D697D) 72%, #ffffff);
}

.pokehub-quest-cp-box--min .pokehub-quest-cp-value {
    color: color-mix(in srgb, var(--admin-lab-color-text-accent, #011322) 65%, #ffffff);
}

/* ===== Ancien système de quêtes (compatibilité) ===== */

.event-field-research-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-field-research-list .quest-item {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.event-field-research-list .quest-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-field-research-list .quest-header {
    margin-bottom: 0.75rem;
}

.event-field-research-list .quest-task {
    font-size: 0.95rem;
    font-weight: 500;
    color: #011322;
    line-height: 1.4;
}

.event-field-research-list .reward-section {
    margin-top: 0.75rem;
}

.event-field-research-list .reward-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #5D697D;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.event-field-research-list .reward-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Mode non déroulé : texte à gauche, images à droite */
.event-field-research-list .quest-item:not(.expanded) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    position: relative;
    min-height: 40px;
}

.event-field-research-list .quest-item:not(.expanded) .quest-header {
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-field-research-list .quest-item:not(.expanded) .reward-section {
    margin-top: 0;
    margin-left: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.event-field-research-list .quest-item:not(.expanded) .reward-label {
    display: none;
}

.event-field-research-list .quest-item:not(.expanded) .reward-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow: hidden;
    justify-content: flex-end;
}

.event-field-research-list .quest-item:not(.expanded) .reward-pokemon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-field-research-list .quest-item:not(.expanded) .reward-pokemon-info {
    display: none;
}

/* Mode déroulé : une ligne par Pokémon avec image, nom, CP */
.event-field-research-list .quest-item.expanded .reward-list {
    flex-direction: column;
    gap: 0.75rem;
}

.event-field-research-list .quest-item.expanded .reward-pokemon {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-image-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-field-research-list .quest-item.expanded .pokehub-wild-pokemon-shiny-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 1rem;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info .reward-label {
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #011322;
    text-transform: none;
    letter-spacing: normal;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info .cp-values-boxes {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info .cp-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f7f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    min-width: 70px;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info .cp-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #5D697D;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.event-field-research-list .quest-item.expanded .reward-pokemon-info .cp-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #011322;
}

/* Bouton toggle */
.event-field-research-list .quest-toggle {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #5D697D;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.event-field-research-list .quest-toggle:hover {
    color: #011322;
}

.event-field-research-list .quest-toggle-icon {
    display: block;
}

/* ============================================================================
   BLOC POKÉMON SAUVAGES (WILD POKÉMON)
   Styles uniformisés avec variables admin-lab / me5rine-lab
   ============================================================================ */

.pokehub-wild-pokemon-block-wrapper {
    margin: 2rem 0;
    --pokehub-fr-card-radius: 12px;
    --pokehub-fr-card-border: 1px solid rgba(15, 23, 42, 0.12);
    --pokehub-fr-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Grille principale */
.pokehub-wild-pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* Carte Pokémon — même contour que Field Research */
.pokehub-wild-pokemon-card {
    position: relative;
    border-radius: var(--pokehub-fr-card-radius, 12px);
    overflow: hidden;
    background: var(--admin-lab-color-white, #ffffff);
    border: var(--pokehub-fr-card-border, 1px solid rgba(15, 23, 42, 0.12));
    box-shadow: var(--pokehub-fr-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    padding: 0; /* Pas de padding pour les tuiles carrées */
    aspect-ratio: 1; /* Tuile carrée */
}

.pokehub-wild-pokemon-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pokehub-wild-pokemon-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    background: linear-gradient(
        to bottom,
        rgba(240, 240, 240, 0.3) 0%,
        var(--admin-lab-color-white, #ffffff) 50%
    );
    height: 100%;
    border-radius: calc(var(--pokehub-fr-card-radius, 12px) - 1px);
    padding: 0.5rem; /* Padding réduit */
    overflow: hidden; /* Le inner peut avoir overflow hidden */
    justify-content: center;
}

/* Icônes shiny / régional — à l'intérieur du contour de la carte */
.pokehub-wild-pokemon-shiny-icon,
.pokehub-wild-pokemon-regional-icon {
    position: absolute;
    top: 4px;
    font-size: 1rem;
    z-index: 2;
    background: var(--admin-lab-color-white, #ffffff);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    line-height: 1;
    border: 2px solid var(--admin-lab-color-white, #ffffff);
    box-sizing: border-box;
}

.pokehub-wild-pokemon-shiny-icon {
    right: 4px;
    left: auto;
}

.pokehub-wild-pokemon-regional-icon {
    left: 4px;
    right: auto;
}

/* Wrapper image */
.pokehub-wild-pokemon-image-wrapper {
    position: relative;
    width: clamp(84px, 80%, 104px);
    height: clamp(84px, 80%, 104px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
}

.pokehub-wild-pokemon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    transform-origin: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Nom du Pokémon */
.pokehub-wild-pokemon-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: anywhere;
    width: 100%;
    flex-shrink: 0;
}

/* Section Pokémon rares */
.pokehub-wild-pokemon-rare-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--admin-lab-color-block-border, var(--admin-lab-color-borders, #e6e6e6));
}

.pokehub-wild-pokemon-rare-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
    text-align: center;
}

.pokehub-wild-pokemon-grid--rare {
    margin-bottom: 0;
}

.pokehub-wild-pokemon-card--rare {
    border: 1px solid #d4af37;
    background: linear-gradient(135deg, var(--admin-lab-color-white, #ffffff) 0%, #fffef7 100%);
}

.pokehub-wild-pokemon-card--rare:hover {
    border-color: #b8941f;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .pokehub-wild-pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 0.75rem;
    }

    .pokehub-wild-pokemon-grid > .pokehub-wild-pokemon-card,
    .pokehub-wild-pokemon-grid--rare > .pokehub-wild-pokemon-card {
        aspect-ratio: auto;
        height: auto;
    }

    .pokehub-wild-pokemon-grid > .pokehub-wild-pokemon-card > .pokehub-wild-pokemon-card-inner,
    .pokehub-wild-pokemon-grid--rare > .pokehub-wild-pokemon-card > .pokehub-wild-pokemon-card-inner {
        height: auto;
        min-height: 0;
        overflow: visible;
        justify-content: flex-start;
        padding: 0.45rem 0.4rem 0.6rem;
    }

    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-image-wrapper {
        width: clamp(78px, 82%, 96px);
        height: clamp(78px, 82%, 96px);
    }

    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-name {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .pokehub-event-quests-list {
        grid-template-columns: 1fr;
    }
    
    .pokehub-quest-reward-item .pokehub-quest-reward-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pokehub-quest-reward-item .pokehub-quest-reward-cp {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .pokehub-wild-pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
        gap: 0.6rem;
    }

    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-image-wrapper {
        width: clamp(76px, 84%, 92px);
        height: clamp(76px, 84%, 92px);
    }

    .pokehub-wild-pokemon-grid > .pokehub-wild-pokemon-card,
    .pokehub-wild-pokemon-grid--rare > .pokehub-wild-pokemon-card {
        padding: 0;
    }

    .pokehub-wild-pokemon-grid > .pokehub-wild-pokemon-card > .pokehub-wild-pokemon-card-inner,
    .pokehub-wild-pokemon-grid--rare > .pokehub-wild-pokemon-card > .pokehub-wild-pokemon-card-inner {
        padding: 0.5rem 0.45rem 0.65rem;
    }

    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-shiny-icon,
    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-regional-icon {
        width: 20px;
        height: 20px;
        font-size: 1rem;
        top: 4px;
    }

    .pokehub-wild-pokemon-grid .pokehub-wild-pokemon-name {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}

/* ===== Page Research (toutes les quêtes) ===== */
.pokehub-research-page .pokehub-page-title {
    margin-bottom: 1rem;
}
.pokehub-research-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 768px) {
    .pokehub-research-cols {
        grid-template-columns: 1fr;
    }
}
.pokehub-research-col {
    min-width: 0;
}
.pokehub-quest-group {
    margin-top: 1.25rem;
}
.pokehub-quest-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--pokehub-quest-group-color, #666);
    background: rgba(0,0,0,0.08);
}
.pokehub-quests-event-title {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
}
.pokehub-quests-section-title {
    margin-top: 0;
}
.pokehub-quests-empty {
    color: #666;
    font-style: italic;
}
