/* ============================================================
   home-overrides.css
   CSS externalisé depuis home.php — styles visuels de la page Dalal
   ============================================================ */

/* ─── Police et base ─────────────────────────────────────── */
body,
.sticky-bar,
.header-top,
.header-middle {
    font-family: 'Rubik', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: white;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
    position: relative;
}

body.loading { opacity: 0.95; }

/* ─── Sticky bar ─────────────────────────────────────────── */
.sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid #3b3b3b;
    z-index: 1000;
    height: 60px;
    padding: 0.8rem 2rem;
    box-sizing: border-box;
    justify-content: center;
    gap: 2rem;
}

.sticky-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    margin-left: 2rem;
    transition: height 420ms cubic-bezier(.22,1,.36,1), transform 300ms ease, opacity 260ms ease;
    will-change: height, transform, opacity;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

.sticky-logo-img:hover {
    transform: scale(1.05);
}

.menu-horizontal.menu-sticky {
    flex: 1;
    justify-content: center;
    gap: 1.5rem;
}

.sticky-search-icon {
    position: absolute;
    right: 2rem;
    background: white !important;
    color: #000 !important;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sticky-search-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sticky-search-icon i {
    font-size: 1.2rem;
    color: #000 !important;
}

.user-menu {
    position: absolute;
    right: calc(2rem + 55px);
}

/* Mobile : sticky en bas */
.sticky-bar.mobile {
    bottom: 0;
    border-radius: 25px 25px 0 0;
    border-bottom: none;
    border-top: 1px solid #3b3b3b;
}

.sticky-bar.mobile.visible { bottom: 0 !important; }
.sticky-bar.mobile.hidden  { bottom: -100px !important; }

/* ─── Logo principal ─────────────────────────────────────── */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    animation: logoSlideIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-img {
    height: auto;
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    transition: transform 300ms ease, filter 300ms ease;
}

.logo-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.4));
}

/* ─── Menu navigation ────────────────────────────────────── */
.menu-horizontal { display: flex; gap: 1.5rem; align-items: center; }

.menu-horizontal a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

/* ─── Header top (grille de base) ────────────────────────── */
header.header-top {
    background: #0a0a0a;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

main { animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes logoSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes logoShrink {
    0%   { max-height: 40px; }
    100% { max-height: 32px; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Cards ──────────────────────────────────────────────── */
.search-results {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)) !important;
    gap: 1.25rem !important;
    justify-items: stretch !important;
}

.search-results .card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.card .watch {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
    font-size: 1rem;
    font-weight: 800;
    padding: 16px 0 !important;
    text-transform: none;
    letter-spacing: 0;
    text-align: center;
}

.card .card-content .title { display: none; }

/* ─── Responsive mobile ──────────────────────────────────── */
@media (max-width: 768px) {
    .sticky-bar {
        justify-content: flex-start;
        top: auto !important;
        bottom: 0 !important;
    }

    .sticky-bar .menu-sticky { display: none; }

    .sticky-logo-img {
        height: 20px;
        margin-left: 0.1rem;
        margin-right: auto;
    }

    .logo-img {
        max-height: 40px;
        animation: logoShrink 800ms cubic-bezier(0.34, 1.56, 0.64, 1) 300ms forwards;
    }

    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 0.75rem !important;
        justify-items: stretch !important;
    }

    .card .watch { display: none !important; }
}

@media (min-width: 769px) {
    .sticky-bar {
        top: -50 !important;
        bottom: auto !important;
    }

    .sticky-bar .menu-sticky { display: flex !important; }
}


/* ============================================================
   HERO TRANSPARENT HEADER OVERLAY
   ============================================================ */

/* Headers absolus et transparents — hero visible derrière, scrollent avec la page */
header.header-top {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(180deg, rgba(10,10,10,0.88) 0%, rgba(10, 10, 10, 0.138) 80%, transparent 100%) !important;
    border-bottom: none !important;
    z-index: 200;
    display: flex !important;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 2rem !important;
    grid-template-columns: unset !important;
}

header.header-middle {
    position: absolute !important;
    top: 80px !important;
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
    border-bottom: none !important;
    z-index: 199;
}

/* Hero plein écran */
.hero-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: transparent !important;
    max-height: none !important;
    min-height: 75vh;
}

.slider-main {
    aspect-ratio: unset !important;
    min-height: 100vh;
}

/* Slider content positionné en bas du hero */
.slider-content {
    position: absolute !important;
    bottom: 22rem !important;
    left: 2rem !important;
    z-index: 20 !important;
    height: auto !important;
    padding-left: 0;
}

/* Titre du hero — toujours visible */
.slider-title {
    display: block !important;
    font-size: 2.6rem;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    text-shadow: 2px 2px 12px rgba(0,0,0,.9);
    line-height: 1.1;
}

@media (max-width: 768px) {
    .slider-title { font-size: 1.6rem; }
}

/* Ligne de boutons du hero */
.slider-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.slider-btn {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: 1.1rem 2.8rem;
    border-radius: 8px;
    font-family: 'Rubik', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background .22s ease, transform .18s ease, box-shadow .22s ease;
    white-space: nowrap;
    letter-spacing: .04em;
}

.slider-btn--primary {
    background: #e50914;
    color: rgba(255,248,235,0.96);
    box-shadow: 0 4px 18px rgba(229,9,20,.40);
}
.slider-btn--primary:hover {
    background: #c8060f;
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(229,9,20,.55);
}

.slider-btn--ghost {
    background: rgba(255,255,255,.10);
    color: rgba(255,248,235,0.92);
    border: 1.5px solid rgba(255,255,255,.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.slider-btn--ghost:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .slider-btn {
        padding: .85rem 1.8rem;
        font-size: 1rem;
    }
}

/* Gradient bas du hero pour la lisibilité du contenu suivant */
.slider-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75%;
    background: linear-gradient(0deg,
        #0a0a0a 0%,
        rgba(10,10,10,0.95) 15%,
        rgba(10,10,10,0.75) 40%,
        rgba(10,10,10,0.3) 70%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* ─── Sections qui chevauchent le bas du hero ─────────────── */
#snw-continue-section {
    position: relative;
    z-index: 10;
    padding-top: 0.5rem;
    background: transparent;
    padding-left: 2rem;
    padding-right: 2rem;
}

.content {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, transparent 0%, #0a0a0a 6rem, #0a0a0a 100%);
    transform: none !important;
}

/* ─── Mode sans hero (recherche / catégorie) ──────────────── */
main.snw-hero-hidden {
    padding-top: 140px;
}

main.snw-hero-hidden #snw-continue-section,
main.snw-hero-hidden .content {
    background: none !important;
}

/* ─── Annuler le fond noir du mode overlay (home.min.css) ─── */
header.header-top.overlay .search-container {
    position: static !important;
    left: unset !important;
    right: unset !important;
    top: unset !important;
    bottom: unset !important;
    background-color: transparent !important;
    padding: 0 !important;
    z-index: unset !important;
}

header.header-top.overlay .logo {
    opacity: 1 !important;
}

/* ─── Zone de recherche restylee ──────────────────────────── */
.search-container {
    flex: 1 !important;
    max-width: 540px !important;
    position: static !important;
    right: unset !important;
}

.search-inner-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 40px;
    padding: 0;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.search-inner-wrap:focus-within {
    border-color: rgba(229,9,20,0.7);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.15);
}

.search-inner-wrap .search-icon {
    position: static !important;
    padding: 0 0.75rem 0 1.1rem;
    color: rgba(255,255,255,0.45);
    font-size: 1rem;
    pointer-events: none;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.search-inner-wrap:focus-within .search-icon {
    color: #e50914;
}

.search-inner-wrap .search-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 0.65rem 0 0.65rem 0 !important;
    caret-color: #e50914;
}

.search-inner-wrap .search-input::placeholder {
    color: rgba(255,255,255,0.35) !important;
    font-style: normal !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
}

.search-inner-wrap .search-clear-btn {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.4) !important;
    font-size: 0.85rem !important;
    cursor: pointer;
    padding: 0 1rem 0 0.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.search-inner-wrap .search-clear-btn:hover {
    color: #e50914 !important;
}

.search-container.has-value .search-clear-btn { display: flex !important; }
.search-container.has-value .search-icon    { display: flex !important; }

/* Bouton icône search (mobile) */
.search-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.search-icon-btn:hover {
    background: rgba(229,9,20,0.3) !important;
    border-color: #e50914 !important;
}

/* ─── Bouton charger plus ─────────────────────────────────── */
.snw-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 2rem 0 3rem;
}

.snw-load-more-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(6px);
}

.snw-load-more-btn:hover {
    background: rgba(229,9,20,0.7);
    border-color: #e50914;
    transform: scale(1.12);
}

.snw-load-more-btn:active {
    transform: scale(0.95);
}

/* ─── Responsive mobile (hero + search) ───────────────────── */
@media (max-width: 768px) {
    header.header-top {
        top: 0 !important;
        padding: 0.6rem 1rem !important;
        gap: 0.75rem;
    }

    header.header-middle {
        top: 64px !important;
    }

    .hero-slider { min-height: 56vw; }
    .slider-main { min-height: 56vw; }

    .slider-content { bottom: 12rem !important; }

    main.snw-hero-hidden { padding-top: 120px; }

    .search-container { display: none !important; }

    .search-container.active {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        padding: 0.6rem 1rem;
        background: rgba(10,10,10,0.97) !important;
        backdrop-filter: blur(16px);
        animation: activSearchSlideInDown 0.25s ease;
    }

    .search-container.active .search-inner-wrap { width: 100%; }

    .search-icon-btn { display: flex !important; }
}

/* ================================================================
   Carrousel nav partagé — utilisé par home + profile
   ================================================================ */
.snw-carousel-nav {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.snw-carousel-arrow {
    background: none;
    border: none;
    color: rgba(255,255,255,.65);
    font-size: 1.3rem;
    cursor: pointer;
    padding: .1rem .25rem;
    outline: none;
    flex-shrink: 0;
    transition: color .2s;
    line-height: 1;
}
.snw-carousel-arrow:hover { color: #e50914; }
.snw-carousel-arrow:disabled { opacity: .25; cursor: default; pointer-events: none; }
.snw-carousel-dots {
    display: flex;
    align-items: center;
    gap: .35rem;
}
.snw-carousel-dot {
    display: inline-block;
    font-size: 1rem;
    color: rgba(255,255,255,.50);
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: color .2s, font-weight .15s;
    user-select: none;
    letter-spacing: .08em;
}
.snw-carousel-dot.active {
    color: #fff;
    font-weight: 900;
}

/* Aligner le titre et la nav sur la même ligne */
.snw-continue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
