/* Tikehub — Pages listes (événements, concours, collectes) */
.th-listing--events,
.th-listing--contests,
.th-listing--fundraisings {
    --th-shadow: 0 2px 12px rgba(26, 43, 72, 0.06);
    --th-shadow-hover: 0 12px 32px rgba(26, 43, 72, 0.12);
    --th-radius-lg: 16px;
    --th-success: #16a34a;
    background: var(--th-bg);
    min-height: calc(100vh - 80px);
    padding-bottom: 3rem;
}

.th-listing--contests {
    --th-listing-accent: #7c3aed;
    --th-listing-accent-hover: #6d28d9;
    --th-listing-accent-light: #f5f3ff;
    --th-listing-accent-ring: rgba(124, 58, 237, 0.15);
    --th-listing-accent-shadow: rgba(124, 58, 237, 0.35);
}

.th-listing--fundraisings {
    --th-listing-accent: #059669;
    --th-listing-accent-hover: #047857;
    --th-listing-accent-light: #ecfdf5;
    --th-listing-accent-ring: rgba(5, 150, 105, 0.15);
    --th-listing-accent-shadow: rgba(5, 150, 105, 0.35);
}

.th-listing--events {
    --th-listing-accent: var(--th-orange);
    --th-listing-accent-hover: var(--th-orange-hover);
    --th-listing-accent-light: var(--th-orange-light);
    --th-listing-accent-ring: rgba(242, 145, 36, 0.15);
    --th-listing-accent-shadow: rgba(242, 145, 36, 0.35);
}

.th-listing-hero {
    background: linear-gradient(135deg, var(--th-navy) 0%, #243a5e 55%, #2d4a6f 100%);
    position: relative;
    overflow: hidden;
    margin: -1rem -0.75rem 0;
    padding: 2rem 0 2.5rem;
}

@media (min-width: 640px) {
    .th-listing-hero {
        margin: -1rem -1rem 0;
        padding: 2.5rem 0 3rem;
    }
}

@media (min-width: 1024px) {
    .th-listing-hero {
        margin: -1rem 0 0;
        padding: 3rem 0 3.5rem;
    }
}

.th-listing-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(242, 145, 36, 0.18), transparent 55%);
    pointer-events: none;
}

.th-listing-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .th-listing-hero__inner {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .th-listing-hero__inner {
        padding: 0 2rem;
    }
}

.th-listing-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(242, 145, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 0.85rem;
}

.th-listing-hero__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .th-listing-hero__title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .th-listing-hero__title {
        font-size: 2.5rem;
    }
}

.th-listing-hero__subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9375rem;
    max-width: 36rem;
    line-height: 1.55;
}

@media (min-width: 640px) {
    .th-listing-hero__subtitle {
        font-size: 1.0625rem;
    }
}

.th-listing-body {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

@media (min-width: 640px) {
    .th-listing-body {
        padding: 2rem 1.5rem 0;
    }
}

@media (min-width: 1024px) {
    .th-listing-body {
        padding: 2.5rem 2rem 0;
    }
}

.th-listing-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .th-listing-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
}

/* Filtres */
.th-filters {
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .th-filters {
        width: 18.5rem;
        position: sticky;
        top: 6rem;
        z-index: 10;
    }
}

.th-filters__panel {
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-lg);
    box-shadow: var(--th-shadow);
    overflow: hidden;
}

.th-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #fafbfc 0%, var(--th-surface) 100%);
    border-bottom: 1px solid var(--th-border);
}

.th-filters__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--th-navy);
}

.th-filters__title i {
    color: var(--th-listing-accent, var(--th-orange));
}

.th-filters__body {
    padding: 1.25rem;
    max-height: none;
}

@media (min-width: 1024px) {
    .th-filters__body {
        max-height: calc(100vh - 11rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--th-border) transparent;
    }
}

.th-filters__field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--th-navy);
    margin-bottom: 0.4rem;
}

.th-filters__field + .th-filters__field {
    margin-top: 1rem;
}

.th-filters__input,
.th-filters__select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    color: var(--th-text);
    background: var(--th-bg);
    border: 1px solid var(--th-border);
    border-radius: 10px;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.th-filters__input:focus,
.th-filters__select:focus {
    outline: none;
    border-color: var(--th-listing-accent, var(--th-orange));
    box-shadow: 0 0 0 3px var(--th-listing-accent-ring, rgba(242, 145, 36, 0.15));
    background: #fff;
}

.th-filters__checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.th-filters__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--th-text);
    cursor: pointer;
}

.th-filters__checkbox input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--th-listing-accent, var(--th-orange));
    border-radius: 4px;
}

.th-filters__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--th-border);
}

.th-filters__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: var(--th-listing-accent, var(--th-orange));
    border: none;
    border-radius: 9999px;
    min-height: 44px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px var(--th-listing-accent-shadow, rgba(242, 145, 36, 0.35));
}

.th-filters__submit:hover {
    background: var(--th-listing-accent-hover, var(--th-orange-hover));
    transform: translateY(-1px);
}

.th-filters__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-text-muted);
    text-decoration: none;
    border-radius: 9999px;
    min-height: 44px;
    transition: color 0.2s, background 0.2s;
}

.th-filters__reset:hover {
    color: var(--th-listing-accent, var(--th-orange));
    background: var(--th-listing-accent-light, var(--th-orange-light));
}

/* Contenu principal */
.th-listing-main {
    flex: 1;
    min-width: 0;
}

.th-listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.15rem;
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    box-shadow: var(--th-shadow);
}

.th-listing-toolbar__count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-navy);
}

.th-listing-toolbar__count i,
.th-listing-toolbar__count strong {
    color: var(--th-listing-accent, var(--th-orange));
}

.th-listing-toolbar__count strong {
    font-weight: 800;
}

/* Cartes événements — page liste */
.th-listing--events .th-card__placeholder--event {
    background: linear-gradient(135deg, var(--th-navy) 0%, #3d5a80 50%, var(--th-orange) 150%);
}

.th-listing--events .th-pill--category {
    background: var(--th-orange-light);
    color: #c2410c;
}

.th-listing--events .th-card__cta {
    margin-top: auto;
}

/* État vide */
.th-listing-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--th-surface);
    border: 1px dashed var(--th-border);
    border-radius: var(--th-radius-lg);
}

.th-listing-empty__icon {
    font-size: 3.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.th-listing-empty__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--th-navy);
    margin-bottom: 0.35rem;
}

.th-listing-empty__text {
    font-size: 0.875rem;
    color: var(--th-text-muted);
}

/* Pagination */
.th-listing-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.th-listing-pagination nav {
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    box-shadow: var(--th-shadow);
    padding: 0.5rem 0.75rem;
}

.th-listing-pagination span[aria-current="page"] span {
    background: var(--th-listing-accent, var(--th-orange)) !important;
    border-color: var(--th-listing-accent, var(--th-orange)) !important;
    color: #fff !important;
}

.th-listing-pagination a:hover {
    color: var(--th-listing-accent, var(--th-orange)) !important;
    border-color: var(--th-listing-accent, var(--th-orange)) !important;
}

.th-listing-pagination .text-indigo-600,
.th-listing-pagination .border-indigo-500 {
    color: var(--th-listing-accent, var(--th-orange)) !important;
    border-color: var(--th-listing-accent, var(--th-orange)) !important;
}

/* ——— Concours ——— */
.th-listing--contests .th-listing-hero::after {
    background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(124, 58, 237, 0.22), transparent 55%);
}

.th-listing--contests .th-listing-hero__badge {
    background: rgba(124, 58, 237, 0.92);
}

.th-listing-hero__row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .th-listing-hero__row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.th-listing-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: var(--th-listing-accent, var(--th-orange));
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--th-listing-accent-shadow, rgba(242, 145, 36, 0.35));
    transition: background 0.2s, transform 0.2s;
}

.th-listing-hero__cta:hover {
    background: var(--th-listing-accent-hover, var(--th-orange-hover));
    color: #fff;
    transform: translateY(-1px);
}

.th-listing--contests .th-card__cta,
.th-listing--fundraisings .th-card__cta {
    margin-top: auto;
}

/* ——— Collectes ——— */
.th-listing--fundraisings .th-listing-hero::after {
    background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(5, 150, 105, 0.22), transparent 55%);
}

.th-listing--fundraisings .th-listing-hero__badge {
    background: rgba(5, 150, 105, 0.92);
}
