/* =========================================
   iVRA COSMETICS — FAQ (Sagesse & Rituels)
   Split-Screen Editorial Layout v2
   ========================================= */

/* Loading state — hide content behind preloader */
body.is-loading {
    overflow: hidden;
}

/* ===== HERO ===== */
.faq-page {
    background: var(--bg-void);
    min-height: 100vh;
    position: relative;
    overflow: clip; /* Use clip instead of hidden — hidden breaks position:sticky */
}

.faq-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(ellipse at 30% 20%, rgba(197, 160, 89, 0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(197, 160, 89, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.faq-hero {
    position: relative;
    z-index: 1;
    padding: 200px 5% 80px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.faq-hero__breadcrumb {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent-gold);
    margin-bottom: 2rem;
    opacity: 0;
}

.faq-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(4rem, 8vw, 7rem);
    font-style: italic;
    font-weight: 300;
    color: var(--text-pearl);
    line-height: 1.05;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(40px);
}

.faq-hero__subtitle {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
    opacity: 0;
    transform: translateY(20px);
}

.faq-hero__line {
    width: 60px;
    height: 1px;
    background: var(--accent-gold);
    margin-top: 3rem;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
}

/* ===== SPLIT LAYOUT ===== */
.faq-layout {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 5% 120px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 8rem;
    align-items: start;
}

/* ===== SIDEBAR (Sticky) ===== */
.faq-sidebar {
    position: sticky;
    top: 140px;
}

.faq-sidebar__heading {
    font-family: var(--ff-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.faq-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 0 1rem 20px;
    font-size: 0.85rem;
    color: var(--text-ash);
    letter-spacing: 0.05em;
    transition: all 0.4s ease;
    position: relative;
}

.faq-nav-link::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-nav-link:hover {
    color: var(--text-pearl);
}

.faq-nav-link.is-active {
    color: var(--accent-gold);
}

.faq-nav-link.is-active::before {
    transform: scaleY(1);
}

.faq-nav-index {
    font-family: var(--ff-display);
    font-size: 0.7rem;
    font-style: italic;
    color: var(--accent-gold);
    opacity: 0.5;
    min-width: 18px;
}

.faq-nav-link.is-active .faq-nav-index {
    opacity: 1;
}

/* ===== CONTENT & ACCORDIONS ===== */
.faq-content {
    padding-bottom: 0;
}

.faq-group {
    margin-bottom: 5rem;
}

.faq-group:last-of-type {
    margin-bottom: 3rem;
}

.faq-group-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-group-index {
    font-family: var(--ff-display);
    font-size: 3rem;
    font-style: italic;
    font-weight: 300;
    color: var(--accent-gold);
    opacity: 0.2;
    line-height: 1;
}

.faq-group-title {
    font-family: var(--ff-display);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text-pearl);
}

/* --- Accordion Items --- */
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-color 0.3s;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item.is-open {
    border-bottom-color: rgba(197, 160, 89, 0.1);
}

.faq-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 0;
    cursor: pointer;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-pearl);
    transition: color 0.3s;
}

.faq-header:hover {
    color: var(--accent-gold);
}

.faq-question {
    font-family: var(--ff-body);
    font-size: 1.05rem;
    font-weight: 400;
    padding-right: 2rem;
    line-height: 1.4;
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-gold);
    opacity: 0.5;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-icon svg {
    width: 100%;
    height: 100%;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
    opacity: 1;
}

.faq-item.is-open .faq-question {
    color: var(--accent-gold);
}

.faq-body {
    height: 0;
    overflow: hidden;
}

.faq-inner {
    padding: 0 4rem 2.5rem 0;
    opacity: 0;
    transform: translateY(10px);
}

.faq-inner p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-ash);
}

/* ===== CONTACT CTA ===== */
.faq-contact-cta {
    margin-top: 5rem;
    padding: 5rem 0;
    text-align: center;
}

.faq-cta-line {
    width: 40px;
    height: 1px;
    background: var(--accent-gold);
    margin: 0 auto 3rem;
    opacity: 0.4;
}

.faq-cta-title {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-style: italic;
    font-weight: 300;
    color: var(--text-pearl);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.faq-cta-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.faq-cta-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-cta-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--accent-gold);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.4s ease;
}

.faq-cta-btn--outline {
    background: transparent;
    color: var(--text-ash);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-cta-btn:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.faq-cta-btn--outline:hover {
    border-color: #fff;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-ash);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.4s ease;
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ===== FOOTER WRAP ===== */
.faq-footer-wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 3rem 5%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .faq-sidebar {
        position: relative;
        top: 0;
        padding-bottom: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .faq-nav {
        border-left: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
    }

    .faq-nav-link {
        padding: 0.8rem 1.2rem 0.8rem 0;
    }

    .faq-nav-link::before {
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 1px;
        transform: scaleX(0);
        transform-origin: left;
    }

    .faq-nav-link.is-active::before {
        transform: scaleX(1);
    }
}

@media (max-width: 640px) {
    .faq-hero {
        padding-top: 150px;
        padding-bottom: 60px;
    }

    .faq-hero__title {
        font-size: 3.5rem;
    }

    .faq-header {
        padding: 1.5rem 0;
    }

    .faq-question {
        font-size: 0.95rem;
    }

    .faq-inner {
        padding-right: 0;
    }

    .faq-group-index {
        font-size: 2rem;
    }

    .faq-group {
        margin-bottom: 4rem;
    }

    .faq-cta-actions {
        flex-direction: column;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
