/* Tikehub — Page d'accueil (variables globales dans site.css) */
.th-home {
    color: var(--th-text);
}

body:has(.th-home) > main {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body:has(.th-home) > footer {
    margin-top: 0 !important;
}

/* ——— Hero ——— */
.th-hero {
    position: relative;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background-color: var(--th-navy);
    background-image:
        linear-gradient(105deg, rgba(26, 43, 72, 0.94) 0%, rgba(26, 43, 72, 0.82) 45%, rgba(26, 43, 72, 0.75) 100%),
        url('https://images.unsplash.com/photo-1470229722913-7c0e2dbbafd3?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.th-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(242, 145, 36, 0.12), transparent 70%);
    pointer-events: none;
}

.th-hero__inner {
    position: relative;
    z-index: 1;
    /* Sous la navbar fixe (64px mobile / 80px desktop) + marge */
    padding-top: 5.5rem !important;
    padding-bottom: 2.5rem !important;
}

@media (min-width: 640px) {
    .th-hero__inner {
        padding-top: 6.5rem !important;
        padding-bottom: 3rem !important;
    }
}

@media (min-width: 1024px) {
    .th-hero__inner {
        padding-top: 7rem !important;
        padding-bottom: 4rem !important;
    }
}

.th-hero .th-hero-badge-wrap {
    margin-bottom: 1rem;
    position: relative;
    z-index: 20;
}

.th-hero .th-hero-badge,
.th-hero .th-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1.35;
    text-transform: uppercase;
    color: #ffffff !important;
    background: #f29124 !important;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    opacity: 1;
    visibility: visible;
}

@media (min-width: 640px) {
    .th-hero .th-hero-badge,
    .th-hero .th-badge {
        font-size: 0.78rem;
        padding: 0.6rem 1.35rem;
    }
}

.th-hero h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.th-hero h1 .th-accent {
    color: var(--th-orange);
}

.th-hero .th-lead {
    color: rgba(255, 255, 255, 0.85);
}

.th-hero .content-type-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--th-radius) !important;
    backdrop-filter: blur(12px);
}

.th-hero .type-dot.active,
.th-hero .hero-slide-dot.bg-cyan-400 {
    background-color: var(--th-orange) !important;
}

.th-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
}

.th-btn--primary {
    background: var(--th-orange);
    color: #fff;
    box-shadow: 0 4px 14px rgba(242, 145, 36, 0.4);
}

.th-btn--primary:hover {
    background: var(--th-orange-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(242, 145, 36, 0.45);
}

.th-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.th-btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

.th-hero .hero-slide-item > a > div,
.th-hero #hero-slider-container .bg-white\/10 {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: var(--th-radius-lg) !important;
}

/* ——— Sections ——— */
.th-section {
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .th-section {
        padding: 5rem 0;
    }
}

.th-section--light {
    background: var(--th-bg);
}

.th-section--white {
    background: var(--th-surface);
}

.th-section__header {
    margin-bottom: 2rem;
}

.th-section__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--th-navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .th-section__title {
        font-size: 2rem;
    }
}

.th-section__subtitle {
    color: var(--th-text-muted);
    font-size: 1rem;
}

.th-link {
    color: var(--th-orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.th-link:hover {
    color: var(--th-orange-hover);
}

/* ——— Catégories ——— */
.th-categories {
    background: var(--th-surface);
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--th-border);
}

.th-categories .th-section__title {
    text-align: center;
}

.th-categories .th-section__subtitle {
    text-align: center;
}

.th-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .th-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .th-categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.th-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.75rem;
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--th-shadow);
}

.th-category-card:hover {
    border-color: var(--th-orange);
    box-shadow: var(--th-shadow-hover);
    transform: translateY(-2px);
}

.th-category-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.th-category-card:hover .th-category-card__icon {
    transform: scale(1.08);
}

.th-category-card__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--th-navy);
    text-align: center;
}

.th-category-card:hover .th-category-card__label {
    color: var(--th-orange);
}

.th-category-card__icon--indigo { background: #eef2ff; color: #4f46e5; }
.th-category-card__icon--green { background: #ecfdf5; color: #059669; }
.th-category-card__icon--purple { background: #f5f3ff; color: #7c3aed; }
.th-category-card__icon--blue { background: #eff6ff; color: #2563eb; }
.th-category-card__icon--yellow { background: #fffbeb; color: #d97706; }
.th-category-card__icon--gray { background: #f3f4f6; color: #4b5563; }

/* ——— Cartes événements / concours / collectes ——— */
.th-card {
    background: var(--th-surface);
    border-radius: var(--th-radius-lg);
    overflow: hidden;
    border: 1px solid var(--th-border);
    box-shadow: var(--th-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.th-card:hover {
    box-shadow: var(--th-shadow-hover);
    transform: translateY(-4px);
}

.th-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.th-card__media img,
.th-card__media .th-card__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.th-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.th-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.th-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.th-pill--open {
    background: #dcfce7;
    color: var(--th-success);
}

.th-pill--upcoming {
    background: var(--th-orange-light);
    color: #c2410c;
}

.th-pill--popular {
    background: #fef3c7;
    color: #b45309;
}

.th-pill--contest {
    background: #f5f3ff;
    color: #6d28d9;
}

.th-pill--fundraising {
    background: #ecfdf5;
    color: #047857;
}

.th-pill--virtual {
    background: #eff6ff;
    color: #1d4ed8;
}

.th-pill--free {
    background: #dcfce7;
    color: var(--th-success);
}

.th-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--th-navy);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    transition: color 0.2s;
}

.th-card:hover .th-card__title,
a:hover .th-card__title {
    color: var(--th-orange);
}

.th-card__organizer {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--th-text-muted);
    margin-bottom: 0.5rem;
    min-width: 0;
    line-height: 1.45;
}

.th-card__organizer > i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--th-orange);
    font-size: 0.95rem;
}

.th-card__organizer-text {
    min-width: 0;
    flex: 1;
}

.th-card__organizer-text a {
    display: inline;
    color: var(--th-orange);
    font-weight: 600;
    word-break: break-word;
}

.th-card__organizer-text a:hover {
    text-decoration: underline;
}

/* Ancien markup accueil : flex + lien séparé */
.th-card .p-6 > .flex.items-center a[href*="organizer"] {
    display: inline !important;
    width: auto !important;
    max-width: 100%;
    margin-left: 0.25rem !important;
}

.th-card .p-6 > .flex.items-center:has(.fa-user-circle) {
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.th-card__meta {
    font-size: 0.8125rem;
    color: var(--th-text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.th-card__meta i {
    color: var(--th-orange);
    margin-right: 0.25rem;
}

.th-card__price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--th-navy);
    margin-bottom: 1rem;
}

.th-card__price--free {
    color: var(--th-success);
}

.th-card__cta {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--th-orange);
    color: #fff !important;
    transition: background 0.2s;
}

.th-card__cta:hover {
    background: var(--th-orange-hover);
    color: #fff !important;
}

.th-card__cta--purple {
    background: #7c3aed;
}

.th-card__cta--purple:hover {
    background: #6d28d9;
}

.th-card__cta--green {
    background: var(--th-success);
}

.th-card__cta--green:hover {
    background: #15803d;
}

.th-card__desc {
    font-size: 0.875rem;
    color: var(--th-text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.th-card__price--contest {
    color: #6d28d9;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.th-card--contest:hover .th-card__title {
    color: #6d28d9;
}

.th-card--fundraising:hover .th-card__title {
    color: #047857;
}

.th-card__placeholder--popular {
    background: linear-gradient(135deg, #f59e0b 0%, var(--th-orange) 100%);
}

.th-card__placeholder--contest {
    background: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
}

.th-card__placeholder--fundraising {
    background: linear-gradient(135deg, #059669 0%, #14b8a6 100%);
}

.th-card__progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--th-text-muted);
    margin-bottom: 0.35rem;
}

.th-card__progress-percent {
    font-weight: 700;
    color: var(--th-success);
}

.th-card__progress-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--th-text-muted);
    margin-top: 0.35rem;
}

.th-section--contests {
    background: var(--th-surface);
}

.th-section--fundraisings {
    background: var(--th-bg);
}

.th-section__header-block .th-section__subtitle {
    margin-top: 0.35rem;
}

.th-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .th-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .th-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ——— Commission ——— */
.th-commission {
    background: var(--th-bg);
    padding: 3.5rem 0;
}

.th-commission__box {
    background: var(--th-surface);
    border-radius: var(--th-radius-xl);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--th-shadow);
    border: 1px solid var(--th-border);
}

@media (min-width: 640px) {
    .th-commission__box {
        padding: 3rem 2.5rem;
    }
}

.th-commission__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: var(--th-orange-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--th-orange);
    font-size: 1.75rem;
}

.th-commission__rate {
    color: var(--th-orange);
    font-weight: 800;
}

.th-commission__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .th-commission__stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.th-commission__stat {
    background: var(--th-bg);
    border-radius: var(--th-radius);
    padding: 1.25rem;
    border: 1px solid var(--th-border);
}

.th-commission__stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--th-navy);
}

/* ——— Features ——— */
.th-feature-card {
    background: var(--th-surface);
    border-radius: var(--th-radius-lg);
    padding: 2rem;
    border: 1px solid var(--th-border);
    box-shadow: var(--th-shadow);
    transition: all 0.25s ease;
    border-left: 4px solid var(--th-orange);
}

.th-feature-card:hover {
    box-shadow: var(--th-shadow-hover);
    transform: translateY(-2px);
}

.th-feature-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--th-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--th-navy);
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.th-feature-advanced {
    background: var(--th-surface);
    border: 1px solid var(--th-border) !important;
    border-radius: var(--th-radius-lg) !important;
    box-shadow: var(--th-shadow);
    transition: all 0.25s ease;
}

.th-feature-advanced:hover {
    box-shadow: var(--th-shadow-hover);
    transform: translateY(-4px);
}

/* ——— Stats ——— */
.th-stats {
    background: var(--th-navy);
    padding: 3rem 0;
}

.th-stat-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--th-radius);
    padding: 1.5rem 1rem;
    text-align: center;
}

.th-stat-item__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--th-orange);
}

.th-stat-item__label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ——— CTA organisateur (style B2B) ——— */
.th-cta-block {
    background: var(--th-navy);
    border-radius: var(--th-radius-xl);
    padding: 3rem 1.5rem;
    margin: 0 1rem 4rem;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .th-cta-block {
        padding: 4rem 3rem;
        margin-bottom: 5rem;
    }
}

.th-cta-block::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(242, 145, 36, 0.15), transparent 70%);
    pointer-events: none;
}

.th-cta-block h2,
.th-cta-block h3,
.th-cta-block p {
    color: #fff;
    position: relative;
}

.th-cta-block .th-cta-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--th-radius-lg) !important;
}

.th-cta-block .th-cta-card:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(242, 145, 36, 0.5) !important;
}

.th-cta-block .th-btn--white {
    background: #fff;
    color: var(--th-navy);
    border-radius: 9999px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.th-cta-block .th-btn--white:hover {
    background: var(--th-orange-light);
    color: var(--th-navy);
}

.th-cta-block > .max-w-7xl > .text-center > .th-btn--primary,
.th-cta-block a.th-btn--primary {
    background: var(--th-orange);
    color: #fff;
    border-radius: 9999px;
    padding: 1rem 2rem;
    font-weight: 600;
    display: inline-flex;
}

/* ——— Progress bar collecte ——— */
.th-progress {
    height: 6px;
    background: var(--th-border);
    border-radius: 9999px;
    overflow: hidden;
}

.th-progress__bar {
    height: 100%;
    background: var(--th-success);
    border-radius: 9999px;
}

/* ——— Rotator / slider (conservés) ——— */
.th-hero .type-dot.active {
    background-color: var(--th-orange) !important;
    width: 1.5rem !important;
}

.content-type-card {
    transform: translateX(0);
}

.content-type-card.hidden {
    opacity: 0;
    transform: translateX(-100%);
}

.content-type-card.active {
    opacity: 1;
    transform: translateX(0);
}

.content-type-card.next {
    opacity: 0;
    transform: translateX(100%);
}

#hero-slider-container {
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.hero-slide-item {
    will-change: transform, opacity;
    visibility: visible !important;
    transition: opacity 700ms ease-in-out, transform 700ms ease-in-out;
}

.hero-slide-item.slide-left {
    transform: translateX(-100%);
}

.hero-slide-item.opacity-30 {
    opacity: 0.3;
    pointer-events: none;
}

.hero-slide-item.opacity-100 {
    pointer-events: auto;
}

.z-5 {
    z-index: 5;
}

@media (min-width: 640px) {
    #hero-slider-container {
        min-height: 320px;
    }
}

@media (min-width: 1024px) {
    #hero-slider-container {
        min-height: 360px;
    }
}

.feature-card-main,
.feature-card-advanced,
.cta-card {
    animation: thFadeInUp 0.6s ease-out backwards;
}

.feature-card-main:nth-child(1) { animation-delay: 0.1s; }
.feature-card-main:nth-child(2) { animation-delay: 0.2s; }
.feature-card-main:nth-child(3) { animation-delay: 0.3s; }
.feature-card-main:nth-child(4) { animation-delay: 0.4s; }

.feature-card-advanced:nth-child(1) { animation-delay: 0.1s; }
.feature-card-advanced:nth-child(2) { animation-delay: 0.2s; }
.feature-card-advanced:nth-child(3) { animation-delay: 0.3s; }
.feature-card-advanced:nth-child(4) { animation-delay: 0.4s; }
.feature-card-advanced:nth-child(5) { animation-delay: 0.5s; }

.cta-card:nth-child(1) { animation-delay: 0.1s; }
.cta-card:nth-child(2) { animation-delay: 0.2s; }
.cta-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes thFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cartes : compatibilité avec le markup existant */
.th-card > a.block:first-child,
.th-card > a.th-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.th-card > a.block:first-child img,
.th-card > a.th-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.th-card > a.block:first-child .w-full.h-48,
.th-card > a.block:first-child > div {
    width: 100%;
    height: 100%;
    min-height: 12rem;
}

.th-card .p-6 {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.th-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--th-navy);
}

.th-card .text-indigo-600 {
    color: var(--th-navy) !important;
}

.th-home a.text-indigo-600:hover,
.th-home .hover\:text-indigo-600:hover {
    color: var(--th-orange) !important;
}

.th-home .feature-card-main {
    border-left-color: var(--th-orange) !important;
    box-shadow: var(--th-shadow) !important;
    transform: none !important;
}

.th-home .feature-card-main:hover {
    box-shadow: var(--th-shadow-hover) !important;
    transform: translateY(-2px) !important;
}

.th-home .feature-card-advanced {
    border-color: var(--th-border) !important;
}

.th-home .cta-card {
    border-radius: var(--th-radius-lg) !important;
}

.th-cta-section {
    padding: 4rem 0;
    background: var(--th-bg);
}

.th-cta-section .th-cta-block {
    margin-bottom: 0;
}

.th-cta-block .text-indigo-100 {
    color: rgba(255, 255, 255, 0.82) !important;
}

.th-cta-block .cta-card h3 {
    color: #fff;
}

.th-hero .type-dot[data-index="0"] {
    background-color: var(--th-orange) !important;
}
