/* CSS variables inherited from navbar.php */

body {
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
}

main {
    padding-top: calc(var(--topbar-h, 60px) + 12px);
    padding-bottom: 48px;
}

.container-custom {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

@media (min-width: 1400px) {
    .container-custom {
        max-width: 100%;
        padding: 0 10px;
    }
}

@media (min-width: 1800px) {
    .container-custom {
        max-width: 100%;
    }
}

.home-ad {
    max-width: 1280px;
    margin: 8px auto 16px;
    padding: 0 20px;
    text-align: center;
}

@media (min-width: 1400px) {
    .home-ad {
        max-width: 1600px;
    }
}

@media (min-width: 1800px) {
    .home-ad {
        max-width: 1920px;
    }
}
.home-ad--navbar-desktop iframe {
    display: inline-block;
    width: 728px;
    max-width: 100%;
    height: 90px;
    border: 0;
}
.home-ad--navbar-desktop {
    margin-top: 14px;
}
.home-ad--navbar-mobile {
    display: none;
    margin-top: 14px;
}
.home-ad--navbar-mobile iframe {
    display: inline-block;
    width: 320px;
    max-width: 100%;
    height: 50px;
    border: 0;
}
.home-controls {
    margin: 8px 0 36px;
}
.home-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.home-filter__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-secondary);
    background: rgba(15, 15, 15, 0.65);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.home-filter__icon {
    font-size: 13px;
    opacity: 0.85;
    transition: opacity 0.2s ease, color 0.2s ease;
}
@media (min-width: 1024px) {
    .home-controls {
        margin: 18px 0 22px;
    }
}
@media (max-width: 991px) {
    .home-ad--navbar-desktop {
        display: none;
    }
    .home-ad--navbar-mobile {
        display: block;
    }
    .home-controls {
        margin-top: 20px;
    }
}
@media (max-width: 520px) {
    .home-filter__btn {
        padding: 7px 14px;
        font-size: 13px;
        gap: 6px;
        border-radius: 10px;
    }
    .home-filter__icon {
        font-size: 12px;
    }
}
.home-filter__icon--new { color: var(--primary-300); }
.home-filter__icon--views { color: #737373; }
.home-filter__icon--likes { color: #f43f5e; }
.home-filter__icon--week { color: var(--primary-300); }
.home-filter__icon--browse { color: #737373; }
.home-filter__btn:hover {
    transform: translateY(-2px);
    border-color: rgba(194, 108, 0, 0.45);
    box-shadow: 0 16px 26px rgba(194, 108, 0, 0.22);
}
.home-filter__btn.is-active {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 22px 36px rgba(194, 108, 0, 0.3);
}
.home-filter__btn.is-active .home-filter__icon { opacity: 1; color: #fff; }
.home-filter__btn--outline {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.32);
}
.home-filter__btn--outline:hover {
    background: rgba(15, 15, 15, 0.7);
}

.home-feed { margin-top: 16px; margin-bottom: 32px; }
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 850px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
}
.video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.video-card:hover { transform: translateY(-6px); box-shadow: 0 28px 44px rgba(15, 15, 15, 0.32); }
.video-thumbnail {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.video-thumbnail img,
.video-thumbnail .preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}
.video-thumbnail img { z-index: 1; }
.preview-video { z-index: 1; opacity: 0; }
.video-card:hover .video-thumbnail img { transform: scale(1.06); }
.video-thumbnail.has-preview:hover .preview-video,
.video-thumbnail.is-playing .preview-video { opacity: 1; }
.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0) 40%, rgba(15, 15, 15, 0.82) 100%);
    opacity: 0.85;
    z-index: 2;
    pointer-events: none;
}
.video-duration {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 15, 15, 0.85);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}
.video-badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    padding: 5px 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.video-badge-top {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    padding: 5px 10px;
    border-radius: 6px;
    background: linear-gradient(black);
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}
.video-badge-top i {
    font-size: 9px;
}
.video-info {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.video-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.creator-name {
    color: var(--primary-400);
    font-weight: 600;
    text-decoration: none;
}
.creator-name:hover { color: var(--primary-300); }
.video-stats { display: flex; align-items: center; gap: 12px; }
.stat { display: inline-flex; align-items: center; gap: 6px; }
.stat i { font-size: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-400), var(--primary-500)); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); }

.weekly-hotspot {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(15, 15, 15, 0.92), rgba(20, 20, 20, 0.88));
    border: 1px solid rgba(194, 108, 0, 0.25);
    box-shadow: 0 36px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.weekly-hotspot__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.weekly-hotspot__title h3 {
    margin: 10px 0 0;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
}
.weekly-hotspot__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(194, 108, 0, 0.18);
    color: var(--primary-300);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.weekly-hotspot__timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}
.weekly-hotspot__timer-label { font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.weekly-hotspot__countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.weekly-hotspot__rail {
    position: relative;
    padding: 0 56px;
}
.weekly-hotspot__viewport {
    width: 100%;
    overflow: hidden;
}
.weekly-hotspot__scroller {
    --hotspot-gap: 18px;
    --hotspot-visible: 5;
    display: flex;
    gap: var(--hotspot-gap);
    align-items: stretch;
    padding: 4px 0;
    margin: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* Agrandir les cartes créateurs sur grands écrans */
@media (min-width: 1400px) {
    .weekly-hotspot__scroller {
        --hotspot-visible: 4;
        --hotspot-gap: 24px;
    }
}
.weekly-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 26px 22px 28px;
    border-radius: 20px;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.22);
    min-height: 260px;
    flex: 0 0 calc((100% - (var(--hotspot-visible) - 1) * var(--hotspot-gap)) / var(--hotspot-visible));
    max-width: calc((100% - (var(--hotspot-visible) - 1) * var(--hotspot-gap)) / var(--hotspot-visible));
    min-width: 220px;
}
.weekly-card__badge {
    position: absolute;
    top: 18px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(194, 108, 0, 0.16);
    color: var(--primary-300);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.weekly-card__avatar-link {
    display: inline-flex;
    text-decoration: none;
    color: inherit;
}
.weekly-card__avatar-link:focus-visible {
    outline: 2px solid rgba(194, 108, 0, 0.55);
    outline-offset: 4px;
}
.weekly-card__avatar {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(194, 108, 0, 0.28), rgba(194, 108, 0, 0.18));
    font-weight: 700;
    font-size: 32px;
    color: var(--primary-200);
}
.weekly-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.weekly-card__avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.weekly-card__avatar.is-placeholder {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(194, 108, 0, 0.18));
    color: var(--primary-200);
}
.weekly-card__avatar.is-placeholder span {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-200);
}
.weekly-card__name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.weekly-card__name a {
    color: #fff;
    text-decoration: none;
}
.weekly-card__name a:hover { color: var(--primary-300); }
.weekly-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.weekly-card__cta {
    width: 100%;
    justify-content: center;
    gap: 8px;
}
.weekly-card--cta {
    background: rgba(15, 15, 15, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #fff;
    text-decoration: none;
}
.weekly-card--cta .weekly-card__badge { font-weight: 600; }
.weekly-card--cta .weekly-card__avatar i { font-size: 20px; }
.weekly-card--cta .weekly-card__name { color: #fff; }
.weekly-card--cta .weekly-card__meta {
    color: var(--text-muted);
    text-align: center;
}
.weekly-card--cta .weekly-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    color: #fff;
    font-weight: 700;
    gap: 10px;
    font-size: 13px;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(194, 108, 0, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.weekly-card--cta .weekly-card__cta::after {
    content: '\2192';
    font-size: 16px;
}
.weekly-card--cta .weekly-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(194, 108, 0, 0.3);
}

.weekly-hotspot__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.weekly-hotspot__nav.weekly-hotspot__nav--prev { left: 12px; }
.weekly-hotspot__nav.weekly-hotspot__nav--next { right: 12px; }
.weekly-hotspot__nav:disabled { opacity: 0.35; cursor: not-allowed; }
.weekly-hotspot__nav:hover:not(:disabled) { transform: translateY(calc(-50% - 2px)); }
.weekly-hotspot__dots { display: none; }
.weekly-hotspot__dots[hidden] { display: none !important; }

.weekly-auth {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(194, 108, 0, 0.18), rgba(194, 108, 0, 0.12));
    border: 1px solid rgba(148, 163, 184, 0.24);
}
.weekly-auth__copy { display: flex; flex-direction: column; gap: 10px; }
.weekly-auth__copy h4 { margin: 0; font-size: 20px; font-weight: 700; }
.weekly-auth__copy p { margin: 0; color: var(--text-muted); max-width: 520px; }
.weekly-auth__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(194, 108, 0, 0.2);
    color: var(--primary-300);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    white-space: nowrap;
    width: fit-content;
}
.weekly-auth__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.home-creators { margin-top: 48px; }
.home-creators__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.home-creators__header h2 { margin: 0; font-size: 22px; }
.home-creators__link {
    text-decoration: none;
    color: var(--primary-400);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.home-creators__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.creator-pill {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
}
.creator-pill__avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(194, 108, 0, 0.2);
    font-weight: 700;
}
.creator-pill__avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-pill__body { flex: 1; }
.creator-pill__body p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.creator-pill__cta {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.home-empty {
    text-align: center;
    padding: 60px 20px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(15, 15, 15, 0.6);
}
.home-empty i { font-size: 40px; margin-bottom: 12px; color: var(--primary-400); }

.infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 40px;
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.85;
}
.infinite-loader[hidden] { display: none; }
.loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    box-shadow: 0 0 12px rgba(194, 108, 0, 0.45);
    animation: loader-bounce 0.8s ease-in-out infinite alternate;
}
.infinite-sentinel { width: 100%; height: 1px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes loader-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-6px); }
}

@media (max-width: 991px) {
    main { padding-top: 72px; }
    .weekly-hotspot { padding: 24px; }
    .weekly-hotspot__rail { padding: 0 36px; }
    .weekly-auth { grid-template-columns: 1fr; text-align: center; }
    .weekly-auth__actions { justify-content: center; }
}
@media (max-width: 768px) {
    .weekly-hotspot__nav { width: 38px; height: 38px; }
}
                                /* ===== Weekly hotspot: responsive slider ===== */
@media (max-width: 1024px) {
    .weekly-hotspot { padding: 20px; gap: 18px; }
    .weekly-hotspot__rail { padding: 0; }
    .weekly-hotspot__viewport { overflow: visible; }
    .weekly-hotspot__nav { display: none; }
    .weekly-hotspot__scroller {
        --hotspot-visible: 1;
        transform: none !important;
        transition: none !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 0 22px 20px;
        margin: 0 -14px;
        scrollbar-width: none;
    }
    .weekly-hotspot__scroller::-webkit-scrollbar { display: none; }
    .weekly-card {
        box-sizing: border-box;
        flex: 0 0 clamp(200px, 48vw, 300px);
        max-width: clamp(200px, 48vw, 300px);
        min-width: clamp(180px, 40vw, 260px);
        padding: 16px 18px 20px;
        border-radius: 18px;
        align-items: center;
        text-align: center;
        gap: 12px;
        scroll-snap-align: center;
    }
    .weekly-card__badge {
        position: static;
        margin-bottom: 8px;
        font-size: 11px;
        padding: 4px 10px;
    }
    .weekly-card__avatar { width: 70px; height: 70px; border-radius: 22px; }
    .weekly-card__name { font-size: 16px; }
    .weekly-card__meta { font-size: 12px; gap: 4px; align-items: center; }
    .weekly-card__cta {
        width: auto;
        padding: 8px 18px;
        border-radius: 999px;
        font-size: 14px;
    }
    .weekly-hotspot__dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding-top: 10px;
    }
    .weekly-hotspot__dots button {
        width: 6px;
        height: 6px;
        border: 0;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.35);
    }
    .weekly-hotspot__dots button.is-active {
        background: linear-gradient(90deg, var(--primary-400), var(--primary-500));
    }
}

@media (max-width: 768px) {
    .weekly-hotspot { padding: 18px; gap: 14px; }
    .weekly-hotspot__header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 12px;
    }
    .weekly-hotspot__title,
    .weekly-hotspot__timer {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .weekly-hotspot__timer { gap: 6px; }
    .weekly-card {
        flex: 0 0 clamp(190px, 56vw, 260px);
        max-width: clamp(190px, 56vw, 260px);
        padding: 14px 16px 18px;
    }
    .weekly-card__avatar { width: 62px; height: 62px; }
    .weekly-card__name { font-size: 15px; }
    .weekly-card__meta { font-size: 11.5px; }
    .weekly-card__cta { padding: 8px 16px; font-size: 13px; }
}

@media (max-width: 560px) {
    .weekly-hotspot { padding: 18px; }
    .weekly-hotspot__rail { padding: 0; }
    .weekly-hotspot__scroller {
        scroll-snap-type: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 0;
        margin: 0;
        overflow: visible;
    }
    .weekly-hotspot__dots { display: none; }
    .weekly-card {
        flex: 0 1 calc(50% - 12px);
        max-width: calc(50% - 12px);
        min-width: 150px;
        padding: 14px 16px;
        border-radius: 16px;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .weekly-card__badge {
        align-self: center;
        margin: 0 0 6px;
        font-size: 11px;
        padding: 4px 10px;
        letter-spacing: 0.04em;
    }
    .weekly-card__avatar { width: 54px; height: 54px; border-radius: 18px; }
    .weekly-card__name { font-size: 15px; }
    .weekly-card__meta {
        align-items: center;
        font-size: 11px;
        gap: 4px;
    }
    .weekly-card__cta {
        width: 100%;
        max-width: 180px;
        padding: 7px 14px;
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .weekly-hotspot { padding: 16px; }
    .weekly-card {
        flex-basis: calc(50% - 10px);
        max-width: calc(50% - 10px);
        padding: 12px 14px;
        gap: 8px;
    }
    .weekly-card__avatar { width: 50px; height: 50px; border-radius: 16px; }
    .weekly-card__badge { font-size: 10px; padding: 3px 9px; }
}

