/*
Theme Name: Momo Dramas
Template: astra
*/

/* =========================================
   1. BASES & RESET
   ========================================= */
:root {
    --c-dark: #061024;
    --c-light: #f1f1f2;
    --c-white: #ffffff;
    --c-accent: #b2def1;
    --c-grey-icon: #a4a9b3;
    --header-height: 70px;
    
    --font-title: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
}

html, body { margin: 0 !important; padding: 0 !important; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background-color: var(--c-light);
    color: var(--c-dark);
    padding-top: var(--header-height) !important;
}

/* Fix Admin Bar */
body.admin-bar .momo-desktop-hero, body.admin-bar .momo-mobilebar { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar .momo-desktop-hero, body.admin-bar .momo-mobilebar { top: 46px !important; }
}

* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
li { list-style: none !important; }


/* =========================================
   2. NAVBAR
   ========================================= */

.momo-desktop-hero {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    width: 100%; height: var(--header-height);
    background-image: url("https://momodramas.com/wp-content/uploads/2025/08/Banniere-scaled.jpg");
    background-size: cover; background-position: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.momo-desktop-hero::before {
    content: ""; position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.40); z-index: 0;
}

.momo-navbar {
    position: relative; z-index: 1;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    height: 100%;
    display: grid; 
    grid-template-columns: 60px 1fr 200px; 
    align-items: center;
}

.nav-left { justify-self: start; display: flex; align-items: center; }
.nav-center { justify-self: center; display: flex; align-items: center; }
.nav-right { justify-self: end; display: flex; align-items: center; }

/* --- BURGER --- */
.momo-burger {
    background: transparent !important; border: none; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; gap: 6px; width: 24px; transition: none;
}
.momo-burger span { display: block; width: 100%; height: 2px; background: #fff; }
.momo-burger:hover { opacity: 0.8; }

/* --- MENU --- */
.momo-banner-menu { display: flex; gap: 25px; align-items: center; margin: 0; padding: 0; }
.momo-banner-menu a {
    font-family: var(--font-title); font-size: 15px; color: #fff;
    text-transform: uppercase; letter-spacing: 1.5px;
    padding-bottom: 4px; border-bottom: 2px solid transparent;
    transition: 0.3s; line-height: 1;
}
.momo-banner-menu a:hover, .momo-banner-menu .current-menu-item > a {
    color: var(--c-accent); border-bottom-color: var(--c-accent);
}

/* --- SEARCH BAR NAV --- */
.momo-search-trigger {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 8px 15px;
    width: 180px; height: 36px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: 0.3s; color: #fff;
    font-family: var(--font-body); font-size: 13px;
}
.momo-search-trigger:hover { background: rgba(255,255,255,0.25) !important; border-color: #fff; }
.momo-search-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; }


/* =========================================
   3. DRAWER (Menu Latéral)
   ========================================= */

.momo-overlay {
    position: fixed; inset: 0;
    background: rgba(241, 241, 242, 0.7); backdrop-filter: blur(8px);
    z-index: 1500; opacity: 0; visibility: hidden; transition: 0.4s;
}
.momo-overlay.visible { opacity: 1; visibility: visible; }

.momo-mobile-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 340px; max-width: 85vw;
    background: #ffffff; color: #061024;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 30px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; overflow-y: auto;
}
.momo-mobile-drawer.open { transform: translateX(0); }

/* HEADER DRAWER */
.drawer-top-bar {
    position: relative; width: 100%; margin-bottom: 30px; padding-top: 10px;
    display: flex; justify-content: center; align-items: center;
}
.momo-drawer-close-btn {
    position: absolute; top: 0; right: 0;
    background: transparent !important; border: none;
    color: var(--c-grey-icon) !important; font-size: 30px; line-height: 1; cursor: pointer;
}
.drawer-logo { display: block; width: auto; max-width: 180px; height: auto; }

/* MENU */
.momo-mobile-menu { margin-bottom: 30px; }
.momo-mobile-menu li { border-bottom: 1px solid rgba(0,0,0,0.05); }
.momo-mobile-menu a {
    display: block; padding: 12px 0;
    font-family: var(--font-title); font-size: 16px; color: #061024;
    text-transform: uppercase; letter-spacing: 1px;
}
.momo-mobile-menu a:hover { color: var(--c-accent); padding-left: 10px; }

/* --- SEARCH DRAWER (STYLE MINIMAL SANS CONTOUR) --- */
.drawer-search-form { 
    width: 100%; 
    margin-top: 40px;    /* Espace important avec le menu */
    margin-bottom: 30px; 
    position: relative; 
}

/* Input minimaliste : pas de fond, pas de bordure */
.drawer-search-input {
    width: 100% !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 30px 10px 0 !important; /* Padding à droite pour laisser place à l'icône */
    font-family: var(--font-body);
    font-size: 16px; /* Texte lisible */
    color: #555;
    outline: none;
    height: auto !important;
    box-shadow: none !important;
}
.drawer-search-input::placeholder { color: #a4a9b3; opacity: 1; }

/* Icone Loupe à DROITE */
.drawer-search-icon {
    position: absolute; 
    right: 0;           /* Collé à droite */
    left: auto;         /* On annule la gauche */
    top: 50%; 
    transform: translateY(-50%);
    width: 20px; 
    height: 20px; 
    pointer-events: none; 
    color: #a4a9b3;     /* Gris icône */
}

/* SOCIALS */
.drawer-socials { display: flex; gap: 15px; justify-content: center; margin-top: auto; }
.drawer-socials img { height: 24px; width: auto; transition: 0.3s; }
.drawer-socials a:hover img { transform: translateY(-3px); }

/* =========================================
   4. BACK TO TOP 
   ========================================= */

/* 1. On éradique le bouton d'origine du thème Astra (toutes les variantes possibles) */
#ast-scroll-top, 
.ast-scroll-to-top,
.ast-scroll-to-top-right {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 2. Notre bouton personnalisé */
#momo-back-to-top {
    position: fixed; 
    bottom: 30px; 
    right: 30px;
    
    /* TAILLE : 60px (Net et précis) */
    width: 60px !important; 
    height: 60px !important;
    
    /* L'IMAGE DE FOND */
    background-image: url('https://momodramas.com/wp-content/uploads/2026/01/Bouton-revenir-vers-le-haut.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: transparent !important;
    
    border: none !important; 
    box-shadow: none !important;
    padding: 0 !important; 
    cursor: pointer; 
    z-index: 99999;
    
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* 3. ANTI-FLÈCHE : On interdit au thème d'ajouter du contenu texte/icone dedans */
#momo-back-to-top::before,
#momo-back-to-top::after {
    content: none !important;
    display: none !important;
}

/* 4. SÉCURITÉ : Si une balise <img> traîne encore dedans, on la cache */
#momo-back-to-top img {
    display: none !important;
}

/* L'état visible */
#momo-back-to-top.visible { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

/* Mobile */
@media (max-width: 768px) {
    #momo-back-to-top {
        width: 50px !important;
        height: 50px !important;
        bottom: 20px;
        right: 20px;
    }
}


/* =========================================
   5. SEARCH MODAL (DESIGN V21 - FOND DRAWER)
   ========================================= */

.momo-search-modal {
    position: fixed; inset: 0; z-index: 9999;
    
    /* MODIF ICI : Couleur #f1f1f2 (votre gris clair) avec transparence */
    background: rgba(241, 241, 242, 0.90); 
    
    /* MODIF ICI : Flou plus prononcé (8px) comme le drawer */
    backdrop-filter: blur(8px);
    
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
.momo-search-modal.open { opacity: 1; visibility: visible; }

/* CONTENEUR */
.momo-search-container { 
    width: 90%; max-width: 600px; 
    position: relative; 
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}

/* BOUTON FERMER (X) */
.momo-search-close {
    position: absolute; 
    top: 40px; 
    right: 40px;
    background: transparent !important; 
    border: none; 
    font-size: 40px; 
    line-height: 1;
    color: #333; 
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s;
}
.momo-search-close:hover { 
    transform: rotate(90deg); 
    background: transparent !important; 
    color: #000;
}

/* LA BARRE DE RECHERCHE */
.momo-modal-form {
    width: 100%;
    
    /* Le fond reste BLANC pour bien ressortir sur le gris #f1f1f2 */
    background: #ffffff;
    
    border-radius: 50px; 
    padding: 12px 25px;
    display: flex; align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Ombre plus douce */
    border: 1px solid rgba(255,255,255,0.5); 
    transition: box-shadow 0.3s, transform 0.3s;
}

/* AU FOCUS/SURVOL */
.momo-modal-form:focus-within,
.momo-modal-form:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transform: translateY(-2px); /* Petit effet de levitation */
}

/* CHAMP INPUT */
.momo-modal-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-family: var(--font-body);
    font-size: 18px;
    color: #333;
    padding: 0 10px;
    outline: none !important;
    box-shadow: none !important;
}
.momo-modal-input::placeholder { color: #aaa; font-weight: 300; }

/* BOUTON LOUPE */
.momo-modal-submit {
    background: transparent; border: none; padding: 0;
    color: #aaa; cursor: pointer; display: flex; align-items: center;
}
.momo-modal-submit:hover { color: #666; } 

/* --- CATÉGORIES DYNAMIQUES (TAGS) --- */
.momo-modal-tags {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin-top: 5px;
}

.momo-tag {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 6px 18px;
    border-radius: 20px;
    
    background-color: var(--c-accent); 
    color: #ffffff !important; 
    text-decoration: none !important;
    
    transition: transform 0.2s;
}

.momo-tag:hover { 
    transform: translateY(-2px); 
    color: #ffffff !important;
    opacity: 1; 
}

/* Mobile responsive */
@media (max-width: 600px) {
    .momo-search-close { top: 20px; right: 20px; font-size: 30px; }
    .momo-modal-input { font-size: 16px; }
    .momo-modal-form { padding: 8px 15px; }
}

/* =========================================
   6. HEADER LOGO
   ========================================= */

.momo-site-header {
    width: 100%; 
    background-color: transparent;
    padding: 20px 20px 50px; 
    text-align: center; 
    position: relative; 
    z-index: 10;
    
    /* L'astuce "Ascenseur" pour remonter le logo sous la barre */
    margin-top: -30px !important; 
    
    opacity: 0; 
    animation: fadeInHeader 0.8s ease-out forwards;
}

.momo-header-logo {
    display: block; 
    margin: 0 auto;
    width: 100%; 
    max-width: 480px; /* Taille idéale définie ensemble */
    transition: transform 0.3s ease;
}

.momo-header-logo:hover { 
    transform: scale(1.02); 
}

@keyframes fadeInHeader {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajustement Mobile pour le logo */
@media (max-width: 768px) {
    .momo-site-header { 
        padding: 0 20px 30px; 
        margin-top: -20px !important; 
    }
    .momo-header-logo { max-width: 280px; }
}

/* ======================================================================
   STYLES DU SLIDER "UPCOMING DRAMAS" - VERSION AJUSTÉE
   ====================================================================== */

/* --- Conteneur Global (Fond Gris) --- */
.momo-slider-container {
    background-color: var(--c-light);
    padding: 30px 0; /* Réduit de 50px à 30px */
    position: relative;
    overflow-x: hidden;
}

/* --- Gestion des Vagues SVG --- */
.custom-shape-divider-top,
.custom-shape-divider-bottom {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.custom-shape-divider-top svg,
.custom-shape-divider-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 60px; /* Réduit de 80px à 60px pour plus de finesse */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.custom-shape-divider-top path,
.custom-shape-divider-bottom path {
    fill: #ffffff; /* Garde le blanc pour le contraste avec le fond gris */
}

.custom-shape-divider-top svg {
    transform: translateX(-50%) rotate(180deg);
}

/* --- Section Centrale --- */
.white-content-section {
    background-color: #ffffff;
    width: 100%;
    padding: 5px 0 40px 0; /* Réduit pour limiter l'espace */
    position: relative;
    z-index: 5;
}

/* Conteneur Pleine Largeur */
.content-container {
    width: 100%;
    max-width: 100%; /* Permet aux slides d'aller jusqu'au bout */
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

/* --- Titre de Section (Espace réduit) --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px; /* Réduit l'espace avec les fiches */
    gap: 20px;
}

.section-header::before,
.section-header::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #062954;
    opacity: 0.6;
}

.title-decor {
    font-family: var(--font-title);
    font-size: 1.5rem; /* Un peu plus petit */
    letter-spacing: 0.15em;
    margin: 0;
    text-transform: uppercase;
    font-weight: 600;
    color: #062954;
}

/* --- Wrapper du Slider --- */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* --- Masques Latéraux (Adaptés au blanc de la section) --- */
.fade-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 20;
    pointer-events: none;
}

.left-mask {
    left: 0;
    background: linear-gradient(to right, #ffffff 10%, rgba(255,255,255,0) 100%);
}

.right-mask {
    right: 0;
    background: linear-gradient(to left, #ffffff 10%, rgba(255,255,255,0) 100%);
}

/* --- Piste de Défilement (Track) --- */
.slider-track {
    display: flex;
    gap: 15px; /* Espace entre les fiches réduit */
    overflow-x: auto;
    width: 100%;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.slider-track::-webkit-scrollbar { display: none; }

/* --- Cartes (Taille réduite) --- */
.slider-card {
    flex: 0 0 240px; /* Plus petit pour en voir plus à l'écran */
    position: relative;
    transition: transform 0.3s ease;
    scroll-snap-align: center;
}

.slider-card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 350px; /* Plus court pour réduire la hauteur totale */
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Filtre Blanc (Idle) */
.card-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
    transition: opacity 0.4s ease;
}

.slider-card:hover .card-image::before {
    opacity: 0;
}

/* Filtre Noir (Overlay Texte) */
.card-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 100%);
    padding: 60px 15px 15px 15px;
    text-align: left;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.drama-title {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin: 0 0 3px 0;
    text-transform: uppercase;
    font-weight: 700;
}

.drama-date {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Navigation (Boutons ajustés) --- */
.nav-btn {
    background: #ffffff;
    border: 1px solid #f1f1f2;
    color: #062954;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background: #062954;
    color: #fff;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- Pagination --- */
.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 7px;
    height: 7px;
    background-color: #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #062954;
    transform: scale(1.2);
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .nav-btn { display: none; }
    .slider-card { flex: 0 0 75vw; }
    .content-container { padding: 0 15px; }
}