/* Feed Maintenant V4 — plein écran entre header + bottom nav */

html:has(body.page-maintenant--v4),
body.page-maintenant--v4 {
    overflow: hidden;
    height: 100%;
    background: #000;
}

body.page-maintenant--v4 {
    margin: 0;
    padding-bottom: 0 !important;
}

body.page-maintenant--v4 .active-salon-nav,
body.page-maintenant--v4 .site-footer {
    display: none !important;
}

.fn4-page {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--nav-h, 68px);
    bottom: calc(var(--app-bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px));
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #000;
}

.fn4-immersive-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.fn4-immersive-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fn4-immersive-btn:hover {
    background: rgba(255, 56, 92, 0.9);
    border-color: transparent;
    color: #fff;
}

.fn4-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    background: #111;
    color: #fff;
}

.fn4-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: none;
    scroll-behavior: auto;
    scroll-padding: 0;
    overscroll-behavior-y: none;
    touch-action: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fn4-feed::-webkit-scrollbar {
    display: none;
}

/* Réutilise le markup / classes slides V3 */
.fn4-shell .fn3-slide {
    position: relative;
    width: 100%;
    height: var(--fn-slide-h, 100%);
    min-height: var(--fn-slide-h, 100%);
    max-height: var(--fn-slide-h, 100%);
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: #111;
    isolation: isolate;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.fn4-shell .fn3-slide__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(120% 80% at 50% 20%, var(--fn3-accent, #ff385c) 0%, #0a0a0a 72%);
}

.fn4-shell .fn3-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.88;
    animation: fn4-kenburns 14s ease-in-out infinite alternate;
}

.fn4-shell .fn3-slide__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.fn4-shell .fn3-slide__fallback i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.28);
}

.fn4-shell .fn3-slide__gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 22%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 46%);
    pointer-events: none;
}

@keyframes fn4-kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.fn4-shell .fn3-slide__type {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 56, 92, 0.92);
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255, 56, 92, 0.35);
}

.fn4-shell .fn3-slide__badges {
    position: absolute;
    top: 14px;
    left: 110px;
    right: 14px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fn4-shell .fn3-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    font-size: 10px;
    font-weight: 800;
}

.fn4-shell .fn3-badge--hot { background: rgba(255, 56, 92, 0.9); }
.fn4-shell .fn3-badge--boosted { background: rgba(251, 191, 36, 0.9); color: #1f2430; }
.fn4-shell .fn3-badge--demo { background: rgba(255, 255, 255, 0.14); }
.fn4-shell .fn3-badge--suspicious { background: rgba(107, 114, 128, 0.85); }

.fn4-shell .fn3-slide__side {
    position: absolute;
    right: 8px;
    top: auto;
    bottom: 8px;
    transform: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.fn4-shell .fn3-action {
    display: grid;
    place-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    font: inherit;
    text-decoration: none;
    pointer-events: auto;
    box-shadow: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

.fn4-shell .fn3-action i,
.fn4-shell .fn3-action .spiitz-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 16px;
    color: inherit !important;
    line-height: 1;
}

.fn4-shell .fn3-action .spiitz-icon__svg {
    width: 18px;
    height: 18px;
    display: block;
}

.fn4-shell .fn3-slide__hint {
    display: none !important;
}

.fn4-shell .fn3-action > span:not(.spiitz-icon) {
    display: none;
}

.fn4-shell .fn3-action.is-liked,
.fn4-shell .fn3-action.is-active,
.fn4-shell .fn3-action--cta {
    background: transparent;
    color: var(--fn3-accent, #ff385c);
    box-shadow: none;
}

.fn4-shell .fn3-slide__info {
    position: absolute;
    left: 14px;
    right: 78px;
    bottom: 24px;
    z-index: 4;
}

.fn4-shell .fn3-slide__author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.fn4-shell .fn3-slide__avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
    background: var(--fn3-accent, #ff385c);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.fn4-shell .fn3-slide__username {
    font-size: 15px;
    font-weight: 800;
}

.fn4-shell .fn3-slide__open {
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.fn4-shell .fn3-slide__caption {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.fn4-shell .fn3-slide__sub {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.fn4-shell .fn3-slide__meta {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.fn4-shell .fn3-slide__hint {
    bottom: 12px;
    z-index: 6;
}

.fn4-shell .fn3-slide.is-active .fn3-slide__hint {
    opacity: 1;
}

.fn4-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 12%;
    background: #ff385c;
    z-index: 6;
    transition: width 0.25s ease;
}

.fn4-empty {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: none;
    place-items: center;
    padding: 32px;
    text-align: center;
    background: #0a0a0a;
}
.fn4-empty:not([hidden]) {
    display: grid;
}
.fn4-empty[hidden] {
    display: none !important;
}

.fn4-empty h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #fff;
}

.fn4-empty p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.7);
}

.fn4-empty button {
    border: none;
    background: #ff385c;
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

@media (min-width: 769px) {
    body.page-maintenant--v4 {
        --app-bottom-nav-h: 0px;
    }

    .fn4-page {
        bottom: 0;
        /* Colonne centrée type feed vidéo, toujours pleine hauteur */
        left: 50%;
        right: auto;
        width: 100%;
        max-width: 480px;
        transform: translateX(-50%);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
}
