/*
 * Styles front des blocs Gutenberg.
 *
 * VRAI déplacement : aucune dépendance à `poke-hub-events-front.css`.
 * Ce fichier contient les règles CSS nécessaires au rendu des blocs :
 * - dates d'événement
 * - quêtes (field research)
 * - habitats
 * - pokemons sauvages (wild)
 * - nouveaux Pokémon / évolutions, horaires vedette, œufs
 * - études spéciales, défis de collection
 * Titres principaux des blocs : `.pokehub-block-title` = Field Research (#b91c1c, gauche, uppercase).
 * Sélecteurs : tout bloc `pokehub/*` (classe wp-block-pokehub-*) + wrappers *-block-wrapper.
 * Icône SVG à gauche (optionnel) : filtre PHP `pokehub_block_title_icon_svg` + `pokehub_render_block_title()`.
 * Variables optionnelles sur le wrapper : `--pokehub-block-title-icon-box` (taille du carré, défaut 1.5rem).
 * (Bonus : contenu cartes dans `poke-hub-bonus-front.css`.)
 */

/* ===== Titres principaux des blocs (référence = Field Research) ===== */
[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;
}

/*
 * Cadre discret commun (esprit .pokehub-evolution-line : fond + bord arrondi).
 * Faible emprise largeur : padding horizontal en clamp, pas de max-width — la colonne
 * du thème reste la même ; seuls quelques pixels sont « réservés » sur les côtés.
 */
[class*="pokehub-"][class*="block-wrapper"] {
    --pokehub-block-frame-bg: rgba(249, 250, 251, 0.94);
    --pokehub-block-frame-border: rgba(15, 23, 42, 0.09);
    --pokehub-block-frame-radius: 8px;
    --pokehub-block-frame-pad-x: clamp(6px, 1.8vw, 12px);
    --pokehub-block-frame-pad-y: 0.7rem;

    background-color: var(--pokehub-block-frame-bg);
    border: 1px solid var(--pokehub-block-frame-border);
    border-radius: var(--pokehub-block-frame-radius);
    padding: var(--pokehub-block-frame-pad-y) var(--pokehub-block-frame-pad-x);
    box-sizing: border-box;
}

/* Nouveaux Pokémon : le cadre fort est déjà sur chaque .pokehub-evolution-line — pas de double boîte */
.pokehub-new-pokemon-evolutions-block-wrapper {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* ===== Bloc dates d'événement ===== */
.pokehub-event-dates-block-wrapper {
    margin: 2rem 0;
    --pokehub-event-dates-shell-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
    --pokehub-event-dates-shell-border: rgba(15, 23, 42, 0.1);
    --pokehub-event-dates-shell-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    background: var(--pokehub-event-dates-shell-bg);
    border-color: var(--pokehub-event-dates-shell-border);
    box-shadow: var(--pokehub-event-dates-shell-shadow);
    padding: 0.95rem clamp(0.75rem, 2.2vw, 1.15rem) 1.05rem;
    overflow: hidden;
}

.pokehub-event-dates-block {
    margin-top: 0;
    padding-top: 0.55rem;
}

.pokehub-event-dates-block-wrapper .pokehub-block-title {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 0 !important;
}

.pokehub-event-dates-block-wrapper .pokehub-block-title-text {
    font-size: 0.95em;
}

/* ===== Ligne des dates ===== */
.event-dates-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    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);
}

/* ===== Responsive (dates) ===== */
@media (max-width: 768px) {
    .pokehub-event-dates-block-wrapper {
        padding: 0.8rem 0.72rem 0.9rem;
    }

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

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

    .event-date-chip {
        font-size: 11.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;
    /* Aligné sur .pokehub-wild-pokemon-card (cartes + carte quête) */
    --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);
}

.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;
}

.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;
}

.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;
}

/* Replié : chevron vers le bas ; déplié : vers le haut */
.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;
}

.pokehub-quest-item:not(.expanded) .pokehub-quest-details {
    display: none;
}

.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;
}

.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--resource .pokehub-quest-reward-resource-visual {
    width: 56px;
    min-width: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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);
}

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

.pokehub-wild-pokemon-block-wrapper {
    margin: 2rem 0;
    /* Même contour que Field Research / quêtes (.pokehub-event-quests-list) */
    --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 — contour identique aux vignettes Field Research (fallback si hors .pokehub-wild-pokemon-block-wrapper / habitats, etc.) */
.pokehub-wild-pokemon-card {
    position: relative;
    border-radius: var(--pokehub-fr-card-radius, 12px);
    overflow: hidden; /* Icônes shiny / régional restent dans le contour */
    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 et régional) — coins intérieurs 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;
    }

    /* Grilles sauvages / habitats / rares uniquement (pas les mini-tuiles Field Research) */
    .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;
    }
}

/* ===== Avatar shop / Stickers blocks: lead row + square tiles ===== */
.pokehub-shop-highlights.pokehub-shop-avatar-highlights-block,
.pokehub-shop-highlights.pokehub-shop-sticker-highlights-block {
    margin: 2rem 0;
}

.pokehub-shop-highlights-panel {
    margin-top: 1rem;
    background: var(--admin-lab-color-white, #ffffff);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    box-sizing: border-box;
}

/* Top row: cover image (contain) + paragraph */
.pokehub-shop-highlights-lead {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    padding: 1.05rem 1.15rem 1rem;
    box-sizing: border-box;
}

.pokehub-shop-highlights-lead__figure {
    flex: 0 1 auto;
    width: min(100%, 380px);
    max-width: 42%;
    min-width: 160px;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, #f1f5f9 0%, #e8eef5 100%);
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pokehub-shop-highlights-lead__figure.pokehub-shop-highlights-hero img,
.pokehub-shop-highlights-lead__figure .pokehub-shop-highlights-hero-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(52vh, 400px);
    object-fit: contain;
    object-position: center;
}

.pokehub-shop-highlights-lead__text {
    flex: 1 1 220px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--admin-lab-color-text, #4b5563);
}

.pokehub-shop-highlights-lead__text:only-child {
    max-width: 100%;
}

/* Tiles: standard wild pokemon grid (square cards) */
.pokehub-shop-highlights-panel__tiles {
    padding: 0.85rem 1.1rem 1.15rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.pokehub-shop-highlights-panel__tiles-title {
    margin: 0 0 0.7rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
}

.pokehub-shop-highlights .pokehub-shop-highlights-items.pokehub-wild-pokemon-grid {
    margin-bottom: 0;
}

/* Legacy selectors (backward compatibility) */
.pokehub-shop-avatar-hero,
.pokehub-shop-sticker-hero {
    margin: 0 0 1.25rem;
}

.pokehub-shop-avatar-hero-img,
.pokehub-shop-sticker-hero-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 560px);
    object-fit: contain;
    border-radius: 10px;
}

@media (max-width: 767px) {
    .pokehub-shop-highlights-lead {
        flex-direction: column;
        padding: 0.95rem 0.85rem 0.85rem;
    }

    .pokehub-shop-highlights-lead__figure {
        max-width: 100%;
        width: 100%;
    }

    .pokehub-shop-highlights-lead__figure.pokehub-shop-highlights-hero img,
    .pokehub-shop-highlights-lead__figure .pokehub-shop-highlights-hero-img {
        max-height: min(48vh, 320px);
    }

    .pokehub-shop-highlights .pokehub-shop-highlights-items.pokehub-wild-pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    }
}

@media (max-width: 480px) {
    .pokehub-shop-highlights-panel__tiles {
        padding: 0.75rem 0.65rem 1rem;
    }

    .pokehub-shop-highlights .pokehub-shop-highlights-items.pokehub-wild-pokemon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===== Bloc Day Pokémon Hours ===== */
.pokehub-day-pokemon-hours-block-wrapper {
    margin: 2rem 0;
}

.pokehub-day-pokemon-hours-global-time {
    text-align: center;
    margin: -0.25rem 0 1rem;
}

.pokehub-day-pokemon-hours-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pokehub-day-pokemon-hours-row {
    background: var(--admin-lab-color-white, #ffffff);
    border: 1px solid var(--admin-lab-color-block-border, var(--admin-lab-color-borders, #e6e6e6));
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.pokehub-day-pokemon-hours-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pokehub-day-pokemon-hours-row-time {
    font-size: 0.875rem;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5D697D));
}

.pokehub-day-pokemon-hours-row-pokemon {
    margin-top: 0.35rem;
    font-weight: 600;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
}

/* Featured hours : piste horizontale, tuiles type Pokémon sauvage + bandeau date/heure */
.pokehub-day-pokemon-hours--featured {
    --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);
}

.pokehub-day-pokemon-hours-featured-root {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pokehub-day-pokemon-hours-featured-track {
    --pokehub-featured-tile-size: 122px;
    --pokehub-featured-gap: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--pokehub-featured-tile-size), 1fr));
    gap: var(--pokehub-featured-gap);
    padding: var(--pokehub-featured-gap);
    align-items: start;
}

.pokehub-day-pokemon-hours-featured-track-item {
    min-width: 0;
}

.pokehub-day-pokemon-hours-featured-track-item--double {
    grid-column: span 2;
}

.pokehub-day-pokemon-hours-featured-track-item--triple {
    grid-column: span 3;
}

.pokehub-day-pokemon-hours-featured-track-item--quadruple {
    grid-column: span 4;
}

.pokehub-day-pokemon-hours-spotlight-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card {
    border-radius: var(--pokehub-fr-card-radius, 12px) var(--pokehub-fr-card-radius, 12px) 0 0;
    border-bottom: 0;
    box-shadow: none;
    height: var(--pokehub-featured-tile-size);
    min-height: var(--pokehub-featured-tile-size);
    aspect-ratio: auto;
}

/* Featured Hours: image size must stay identical (solo + multi) */
.pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-image-wrapper {
    width: 90px;
    height: 90px;
}

.pokehub-day-pokemon-hours-spotlight-card--multi .pokehub-wild-pokemon-card-inner {
    padding: 0.45rem 0.45rem 0.4rem;
    gap: 0.35rem;
    justify-content: center;
}

.pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card.pokehub-day-pokemon-hours-spotlight-card--multi {
    height: var(--pokehub-featured-tile-size);
    min-height: var(--pokehub-featured-tile-size);
    aspect-ratio: auto;
}

.pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card.pokehub-day-pokemon-hours-spotlight-card--triple {
    height: var(--pokehub-featured-tile-size);
    min-height: var(--pokehub-featured-tile-size);
    aspect-ratio: auto;
}

.pokehub-day-pokemon-hours-spotlight-card--multi .pokehub-wild-pokemon-name {
    display: block;
}

.pokehub-day-pokemon-hours-spotlight-images {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
}

.pokehub-day-pokemon-hours-spotlight-card--triple .pokehub-day-pokemon-hours-spotlight-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pokehub-day-pokemon-hours-spotlight-card--quadruple .pokehub-day-pokemon-hours-spotlight-images {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pokehub-day-pokemon-hours-spotlight-image-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.pokehub-day-pokemon-hours-spotlight-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
}

.pokehub-day-pokemon-hours-spotlight-fallback {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    font-weight: 700;
    color: #475569;
}

.pokehub-day-pokemon-hours-spotlight-more {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.35;
}

.pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card:hover {
    transform: none;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

.pokehub-day-pokemon-hours-spotlight-meta {
    background: var(--admin-lab-color-white, #ffffff);
    border: var(--pokehub-fr-card-border, 1px solid rgba(15, 23, 42, 0.12));
    border-top: 0;
    border-radius: 0 0 var(--pokehub-fr-card-radius, 12px) var(--pokehub-fr-card-radius, 12px);
    box-shadow: var(--pokehub-fr-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
    padding: 0.35rem 0.45rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--admin-lab-color-text, var(--admin-lab-color-pagination-text, #5d697d));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.28rem;
}

.pokehub-day-pokemon-hours-spotlight-meta-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1.25;
    min-width: 0;
    width: 100%;
}

.pokehub-day-pokemon-hours-spotlight-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-lab-color-text-accent, var(--admin-lab-color-header-text, #011322));
    opacity: 0.85;
}

.pokehub-day-pokemon-hours-spotlight-icon svg {
    display: block;
}

.pokehub-day-pokemon-hours-spotlight-meta-text {
    min-width: 0;
    text-align: center;
    word-break: break-word;
}

@media (max-width: 768px) {
    .pokehub-day-pokemon-hours-featured-track {
        --pokehub-featured-tile-size: 118px;
        --pokehub-featured-gap: 0.6rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pokehub-day-pokemon-hours-featured-track-item--double {
        grid-column: span 2;
    }

    .pokehub-day-pokemon-hours-featured-track-item--triple {
        grid-column: span 2;
    }

    .pokehub-day-pokemon-hours-featured-track-item--quadruple {
        grid-column: span 2;
    }

    .pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card {
        aspect-ratio: auto;
        height: auto;
    }

    .pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-card-inner {
        height: auto;
        min-height: 0;
        overflow: visible;
        justify-content: flex-start;
    }

    .pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-image-wrapper {
        width: 78px;
        height: 78px;
    }

    .pokehub-day-pokemon-hours-spotlight-card--multi .pokehub-wild-pokemon-card-inner {
        gap: 0.24rem;
    }

    .pokehub-day-pokemon-hours-spotlight-images {
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .pokehub-day-pokemon-hours-featured-track {
        --pokehub-featured-tile-size: 112px;
        --pokehub-featured-gap: 0.5rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pokehub-day-pokemon-hours-spotlight-tile .pokehub-wild-pokemon-image-wrapper {
        width: 74px;
        height: 74px;
    }
}

