/* Tikehub - Pages détail (événement, concours, collecte) */
body:has(.th-detail) > main {
    margin-top: 6.75rem !important;
    padding-top: 1.25rem !important;
}

@media (max-width: 640px) {
    body:has(.th-detail) > main {
        margin-top: 5.85rem !important;
        padding-top: 1rem !important;
    }
}

.th-detail {
    background: var(--th-bg);
    color: var(--th-text);
    padding-top: 0.35rem;
    padding-bottom: 3rem;
}

.th-detail__wrap {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 2rem;
}

@media (min-width: 640px) {
    .th-detail__wrap {
        padding: 1.25rem 1.5rem 2.5rem;
    }
}

.th-detail h1,
.th-detail h2,
.th-detail h3 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    color: var(--th-ink);
}

.th-detail-hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: transparent;
    border-radius: 0;
    padding: 0.15rem 0 0.5rem;
    box-shadow: none;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .th-detail-hero {
        flex-direction: row;
        align-items: stretch;
        padding: 0.25rem 0 0.75rem;
        gap: 1.5rem;
    }
}

.th-detail-date {
    flex-shrink: 0;
    min-width: 7.5rem;
    border-radius: 24px;
    padding: 1.1rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--th-peach);
    color: var(--th-ink);
}

.th-detail--contest .th-detail-date { background: var(--th-lavender); }
.th-detail--fundraising .th-detail-date { background: var(--th-mint); }

.th-detail-date__month {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

.th-detail-date__day {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1;
    margin: 0.15rem 0;
}

.th-detail-date__weekday {
    font-size: 0.9rem;
    font-weight: 700;
}

.th-detail-hero__body { flex: 1; min-width: 0; }

.th-detail-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: #f8e4b0;
    color: #c2782a;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
}

.th-detail--contest .th-detail-hero__badge { background: var(--th-lavender); color: #8a6bb5; }
.th-detail--fundraising .th-detail-hero__badge { background: var(--th-mint); color: #1e9a68; }

.th-detail-hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    margin: 0 0 0.75rem;
    line-height: 1.15;
}

.th-detail-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.92rem;
    color: var(--th-text);
}

.th-detail-hero__meta i {
    width: 1.15rem;
    color: var(--th-coral);
}

.th-detail--contest .th-detail-hero__meta i { color: #8a6bb5; }
.th-detail--fundraising .th-detail-hero__meta i { color: #1e9a68; }

.th-detail-hero__badge--online {
    background: var(--th-sky, #d6eef8);
    color: #1a5f7a;
}

.th-detail--virtual .th-detail-date {
    background: var(--th-sky, #d6eef8);
}

.th-detail--virtual .th-detail-hero__meta i {
    color: #1a5f7a;
}

.th-detail--virtual .th-detail-cover__fallback {
    background: var(--th-sky, #d6eef8);
    color: #3b6ea8;
}

.th-virtual-note {
    background: #d6eef8;
    border-left: 4px solid #3b6ea8;
    border-radius: 12px;
    color: #1a1a1a;
}

.th-virtual-note i {
    color: #1a5f7a;
}

.th-detail-hero__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
    width: 100%;
    flex-shrink: 0;
}

.th-detail-hero__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.35rem;
    border: none;
    border-radius: 9999px;
    background: #fff;
    color: var(--th-ink);
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 42px;
    white-space: nowrap;
    box-shadow: var(--th-shadow);
}

@media (min-width: 768px) {
    .th-detail-hero__actions {
        flex-direction: column;
        width: auto;
        min-width: 9.75rem;
        align-self: flex-start;
        gap: 0.5rem;
    }

    .th-detail-hero__actions button {
        flex: none;
        width: 100%;
        gap: 0.45rem;
        padding: 0.55rem 0.95rem;
        font-size: 0.78rem;
    }
}

.th-detail-hero__actions button:hover {
    background: var(--th-peach);
}

.th-detail-cover {
    margin-bottom: 1.25rem;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--th-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
}

.th-detail-cover img {
    max-width: 100%;
    max-height: min(85vh, 960px);
    object-fit: contain;
}

.th-detail .bg-white.rounded-lg,
.th-detail .bg-white.rounded-lg.shadow-md,
.th-detail .bg-white.rounded-lg.shadow-lg {
    border-radius: 28px !important;
    box-shadow: var(--th-shadow) !important;
    border: none !important;
}

.th-detail h2.border-b-2,
.th-detail h2.border-red-600,
.th-detail h2[class*="border-b"] {
    border-bottom: none !important;
    padding-bottom: 0.35rem !important;
    margin-bottom: 1rem;
}

.th-detail .text-red-600,
.th-detail .hover\:text-red-700:hover,
.th-detail .text-red-700 {
    color: var(--th-coral) !important;
}

.th-detail .bg-red-600,
.th-detail .hover\:bg-red-700:hover,
.th-detail .hover\:bg-red-800:hover,
.th-detail .active\:bg-red-800:active {
    background: var(--th-coral) !important;
    border-radius: 9999px !important;
}

.th-detail .bg-red-50,
.th-detail .bg-pink-50 {
    background: var(--th-peach) !important;
    border: none !important;
    border-radius: 18px !important;
}

.th-detail .border-l-4 {
    border-left: none !important;
}

.th-detail .bg-gray-100.rounded-lg {
    background: var(--th-cream) !important;
    border-radius: 28px !important;
}

.th-detail .w-16.h-16.bg-red-600,
.th-detail .w-16.h-16.rounded-full {
    background: var(--th-coral) !important;
    border-radius: 50% !important;
}

.th-detail #ticket-cart {
    border-top: none !important;
    box-shadow: 0 -12px 40px rgba(40, 30, 20, 0.12) !important;
    border-radius: 28px 28px 0 0;
}

.th-detail #ticket-cart .text-red-600,
.th-detail .text-2xl.font-bold.text-red-600 {
    color: var(--th-coral) !important;
    font-family: var(--font-display);
}

.th-detail .ticket-increase,
.th-detail #checkout-btn {
    background: var(--th-coral) !important;
    border-radius: 9999px !important;
}

.th-detail .border.border-gray-200.rounded-lg {
    border: none !important;
    background: var(--th-bg);
    border-radius: 22px !important;
}

.th-detail .hover\:border-red-500:hover {
    box-shadow: var(--th-shadow);
}

.th-detail--contest .bg-purple-600,
.th-detail--contest .hover\:bg-purple-700:hover {
    background: #8a6bb5 !important;
    border-radius: 9999px !important;
}

.th-detail--contest .text-purple-600 {
    color: #8a6bb5 !important;
}

.th-detail--fundraising .bg-green-600,
.th-detail--fundraising .hover\:bg-green-700:hover {
    background: var(--th-green) !important;
    border-radius: 9999px !important;
}

.th-detail--fundraising .text-green-600 {
    color: var(--th-green) !important;
}

.th-detail input,
.th-detail select,
.th-detail textarea {
    border-radius: 16px !important;
    border-color: var(--th-border) !important;
}

.th-detail input:focus,
.th-detail select:focus,
.th-detail textarea:focus {
    outline: none;
    border-color: var(--th-coral) !important;
    box-shadow: 0 0 0 3px var(--th-coral-soft) !important;
}

.th-detail--contest input:focus,
.th-detail--contest select:focus,
.th-detail--contest textarea:focus {
    border-color: #8a6bb5 !important;
    box-shadow: 0 0 0 3px var(--th-lavender) !important;
}

.th-progress {
    height: 8px;
    background: var(--th-border);
    border-radius: 9999px;
    overflow: hidden;
}

.th-progress__bar {
    height: 100%;
    background: var(--th-green);
    border-radius: 9999px;
}

.th-detail-cover__fallback {
    width: 100%;
    min-height: 16rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--th-peach);
    color: #e05538;
    font-size: 4.5rem;
}

@media (min-width: 640px) {
    .th-detail-cover__fallback {
        min-height: 22rem;
        font-size: 5.5rem;
    }
}

.th-detail--contest .th-detail-cover__fallback {
    background: var(--th-lavender);
    color: #8a6bb5;
}

.th-detail-cover__fallback--sm {
    min-height: 12rem;
    font-size: 3rem;
    border-radius: 22px;
    margin-bottom: 1rem;
}

.th-detail .bg-purple-50 {
    background: var(--th-lavender) !important;
    border: none !important;
    border-radius: 18px !important;
}

.th-detail .bg-green-50 {
    background: var(--th-mint) !important;
    border: none !important;
    border-radius: 18px !important;
}

.th-detail .bg-blue-50 {
    background: var(--th-sky) !important;
    border: none !important;
    border-radius: 18px !important;
}

.th-detail .text-indigo-600,
.th-detail .hover\:text-indigo-800:hover,
.th-detail a.text-indigo-600 {
    color: var(--th-coral) !important;
}

.th-detail--contest .text-purple-800,
.th-detail--contest .hover\:text-purple-800:hover {
    color: #8a6bb5 !important;
}

.th-detail .fa-check-circle.text-green-600 {
    color: var(--th-green) !important;
}

.th-detail--contest .bg-purple-100 {
    background: var(--th-lavender) !important;
    color: #8a6bb5 !important;
}

.th-detail--contest .border-2.border-gray-200,
.th-detail--contest .border-2.rounded-lg {
    border: none !important;
    background: var(--th-bg);
    border-radius: 22px !important;
}

.th-detail--contest .border-yellow-400,
.th-detail--contest .bg-yellow-50 {
    background: var(--th-cream) !important;
    border: none !important;
}

.th-detail--contest .hover\:border-purple-500:hover {
    box-shadow: var(--th-shadow);
}

.th-detail #eventMap,
.th-detail #contestMap,
.th-detail #fundraisingMap {
    border-radius: 22px !important;
    border: none !important;
    overflow: hidden;
}

.th-detail .bg-gray-50.rounded-lg {
    background: var(--th-cream) !important;
    border-radius: 18px !important;
}

.th-detail .px-3.py-1.bg-red-100,
.th-detail .bg-red-100 {
    background: var(--th-peach) !important;
    color: #e05538 !important;
    border: none !important;
    border-radius: 9999px !important;
}

.th-detail .bg-green-100 {
    background: var(--th-mint) !important;
    color: #1e9a68 !important;
    border: none !important;
    border-radius: 9999px !important;
}

.th-detail .bg-blue-100 {
    background: var(--th-sky) !important;
    color: #3b6ea8 !important;
    border: none !important;
    border-radius: 9999px !important;
}

.th-detail .w-full.bg-gray-200.rounded-full {
    background: var(--th-border) !important;
    border-radius: 9999px !important;
}

.th-detail--fundraising .bg-green-600.h-3,
.th-detail--fundraising .h-3.rounded-full {
    background: var(--th-green) !important;
}

.th-detail .rounded-lg.p-6.max-w-md {
    border-radius: 28px !important;
}

.th-detail--contest .w-full.h-48.bg-gradient-to-br,
.th-detail--contest .from-purple-400 {
    background: var(--th-lavender) !important;
    border-radius: 22px !important;
}

.th-detail img.rounded-lg {
    border-radius: 18px !important;
}

.th-detail .ticket-decrease,
.th-detail--fundraising button.w-10.h-10.bg-gray-200 {
    border-radius: 9999px !important;
    background: var(--th-cream) !important;
}

.th-detail a.flex-1.bg-blue-600,
.th-detail a.flex-1.bg-blue-400 {
    border-radius: 9999px !important;
}

.th-detail--contest .text-2xl.font-bold.text-purple-600,
.th-detail--contest .text-xl.font-semibold {
    font-family: var(--font-display);
}

.th-detail--fundraising input:focus,
.th-detail--fundraising select:focus,
.th-detail--fundraising textarea:focus {
    border-color: var(--th-green) !important;
    box-shadow: 0 0 0 3px var(--th-mint) !important;
}

.th-mini-cal {
    background: #fff;
    border-radius: 28px;
    padding: 1.15rem 1.1rem 1.2rem;
    box-shadow: var(--th-shadow);
}

.th-mini-cal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.th-mini-cal__head h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    color: var(--th-ink);
}

.th-mini-cal__head p {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--th-text-muted);
}

.th-mini-cal__status {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.th-mini-cal__status--upcoming {
    background: var(--th-mint);
    color: #1e9a68;
}

.th-mini-cal__status--ongoing {
    background: var(--th-sky);
    color: #3b6ea8;
}

.th-mini-cal__status--closed {
    background: var(--th-peach);
    color: #e05538;
}

.th-mini-cal__weekdays,
.th-mini-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.2rem;
    text-align: center;
}

.th-mini-cal__weekdays {
    margin-bottom: 0.35rem;
}

.th-mini-cal__weekdays span {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--th-text-muted);
    padding: 0.15rem 0;
}

.th-mini-cal__day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--th-ink);
}

.th-mini-cal__day.is-muted {
    color: #cbbfaf;
    font-weight: 600;
}

.th-mini-cal__day.is-range {
    background: var(--th-peach);
    border-radius: 10px;
}

.th-mini-cal__day.is-event {
    background: var(--th-coral);
    color: #fff;
    border-radius: 50%;
    font-weight: 800;
}

.th-mini-cal__day.is-today:not(.is-event) {
    box-shadow: inset 0 0 0 2px var(--th-coral);
}

.th-detail--contest .th-mini-cal__day.is-range {
    background: var(--th-lavender);
}

.th-detail--contest .th-mini-cal__day.is-event {
    background: #8a6bb5;
}

.th-detail--contest .th-mini-cal__day.is-today:not(.is-event) {
    box-shadow: inset 0 0 0 2px #8a6bb5;
}

.th-detail--fundraising .th-mini-cal__day.is-range {
    background: var(--th-mint);
}

.th-detail--fundraising .th-mini-cal__day.is-event {
    background: var(--th-green);
}

.th-detail--fundraising .th-mini-cal__day.is-today:not(.is-event) {
    box-shadow: inset 0 0 0 2px var(--th-green);
}

.th-mini-cal__meta {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--th-border);
}

.th-mini-cal__date {
    margin: 0;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--th-ink);
    text-transform: capitalize;
}

.th-mini-cal__time {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--th-text-muted);
}

.th-suggest {
    margin-top: 2.25rem;
    padding-top: 0.25rem;
}

.th-suggest__head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
}

@media (min-width: 768px) {
    .th-suggest__head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.th-suggest__head .th-section__title {
    margin-bottom: 0.25rem;
}

.th-suggest__head .th-section__subtitle {
    margin: 0;
}

.th-suggest .th-card__placeholder--event {
    background: var(--th-peach);
    color: #e05538;
    font-size: 3rem;
}

@media (min-width: 1024px) {
    .th-detail__grid {
        align-items: start;
    }

    .th-detail__aside {
        position: -webkit-sticky;
        position: sticky;
        top: 8.5rem;
        z-index: 10;
        max-height: calc(100vh - 9.5rem);
        overflow-y: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .th-detail__aside::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

#action-buy,
#action-vote,
#action-donate {
    scroll-margin-top: 6.5rem;
}

.th-sticky-cta {
    display: none;
}

@media (max-width: 1023px) {
    .th-sticky-cta {
        display: flex;
        position: fixed;
        left: 0.85rem;
        right: 0.85rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        z-index: 45;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        min-height: 52px;
        padding: 0.85rem 1.15rem;
        border-radius: 9999px;
        background: var(--th-coral);
        color: #fff;
        font-size: 0.95rem;
        font-weight: 800;
        text-decoration: none;
        box-shadow: 0 12px 32px rgba(40, 30, 20, 0.22);
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .th-sticky-cta:hover,
    .th-sticky-cta:focus {
        color: #fff;
        filter: brightness(0.96);
    }

    .th-sticky-cta--contest {
        background: #8a6bb5;
    }

    .th-sticky-cta--fundraising {
        background: var(--th-green);
    }

    .th-detail:has(.th-sticky-cta) {
        padding-bottom: 5.5rem;
    }

    body:has(.th-sticky-cta) a[aria-label="Contact WhatsApp Support"] {
        bottom: 5.5rem;
    }

    body:has(.th-sticky-cta) .th-country-fab {
        bottom: 5.5rem;
    }

    body:has(#ticket-cart:not(.translate-y-full)) .th-sticky-cta {
        opacity: 0;
        pointer-events: none;
        transform: translateY(140%);
    }
}
