/*
 * Page FAQ
 * Extrait de templates/public/faq.html.twig : ce fichier remplace le bloc <style> que le
 * gabarit portait en ligne. Chargé via asset() (versionné par ASSETS_VERSION).
 */

/* Keep the navbar dark on the light FAQ page (override the transparent
   state used over dark hero backgrounds on other pages). */
.navbar,
.navbar.scrolled {
    background-color: rgba(12, 8, 20, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(112, 69, 225, 0.08);
}

.navbar .nav-link {
    color: #dcd0f8 !important;
}

.navbar .nav-link:hover {
    color: #9b7eed !important;
}

.faq-page {
    padding: 160px 1rem 6rem;
    position: relative;
    overflow: hidden;
    background: #f6f3fd;
}

.faq-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 40% at 90% 10%, rgba(72, 40, 179, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 45% 35% at 10% 60%, rgba(112, 69, 225, 0.08) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 90% 95%, rgba(72, 40, 179, 0.07) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}

.faq-page > * {
    position: relative;
    z-index: 1;
}

.faq-page-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero */
.faq-page-hero {
    text-align: center;
    margin-bottom: 3.5rem;
}

.faq-page-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(72, 40, 179, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #4828b3;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(44, 23, 138, 0.08);
}

.faq-page-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4828b3;
    box-shadow: 0 0 0 3px rgba(112, 69, 225, 0.22), 0 0 10px rgba(72, 40, 179, 0.55);
}

.faq-page-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.4rem;
    color: #1c1230;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin: 0 0 1.2rem;
}

.faq-page-hero h1 .accent {
    background: linear-gradient(120deg, #4828b3 0%, #7d52e8 50%, #4828b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-page-hero p {
    font-size: 1.05rem;
    color: rgba(20, 8, 70, 0.7);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
}

/* Search */
.faq-search {
    max-width: 640px;
    margin: 2.5rem auto 0;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 1rem 1.3rem 1rem 3rem;
    background: #ffffff;
    border: 1px solid rgba(72, 40, 179, 0.22);
    border-radius: 999px;
    color: #1c1230;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(44, 23, 138, 0.08);
    transition: all 0.3s ease;
}

.faq-search input::placeholder {
    color: rgba(20, 8, 70, 0.45);
}

.faq-search input:focus {
    outline: none;
    border-color: rgba(72, 40, 179, 0.55);
    box-shadow: 0 0 0 4px rgba(112, 69, 225, 0.18), 0 8px 24px rgba(44, 23, 138, 0.12);
}

.faq-search i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4828b3;
    font-size: 1rem;
}

/* Category tabs */
.faq-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin: 3rem 0 3rem;
}

.faq-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.4rem;
    background: #ffffff;
    border: 1px solid rgba(72, 40, 179, 0.14);
    border-radius: 999px;
    color: #25155e;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(44, 23, 138, 0.05);
}

.faq-tab i {
    font-size: 0.95rem;
    color: #4828b3;
}

.faq-tab .faq-tab-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4828b3;
    background: rgba(112, 69, 225, 0.14);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.faq-tab:hover {
    background: #ebe7fb;
    border-color: rgba(72, 40, 179, 0.4);
    color: #1c1230;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 23, 138, 0.12);
}

.faq-tab.active {
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 100%);
    border-color: #4828b3;
    color: #fff;
    box-shadow: 0 8px 22px rgba(44, 23, 138, 0.32), 0 0 0 1px rgba(112, 69, 225, 0.3);
}

.faq-tab.active i,
.faq-tab.active .faq-tab-count {
    color: #fff;
}

.faq-tab.active .faq-tab-count {
    background: rgba(255, 255, 255, 0.22);
}

/* Category section */
.faq-category {
    display: none;
    animation: faqFade 0.4s ease;
}

.faq-category.active {
    display: block;
}

/* When several categories are visible simultaneously (search results),
   give each subsequent one breathing room so its header isn't glued to
   the previous category's last question. */
.faq-category.active ~ .faq-category.active {
    margin-top: 4rem;
}

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

.faq-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(72, 40, 179, 0.18);
}

.faq-category-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 100%);
    border: 1px solid rgba(72, 40, 179, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(44, 23, 138, 0.28);
}

.faq-category-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: #1c1230;
    margin: 0;
    letter-spacing: -0.02em;
}

.faq-category-subtitle {
    font-size: 0.9rem;
    color: rgba(20, 8, 70, 0.6);
    margin: 0.2rem 0 0;
}

/* Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.faq-item {
    border: 1px solid rgba(72, 40, 179, 0.12);
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(44, 23, 138, 0.06);
}

.faq-item.hidden {
    display: none;
}

.faq-item:hover {
    border-color: rgba(72, 40, 179, 0.35);
    box-shadow: 0 10px 24px rgba(44, 23, 138, 0.12), 0 0 0 1px rgba(112, 69, 225, 0.18);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: rgba(72, 40, 179, 0.5);
    box-shadow: 0 12px 28px rgba(44, 23, 138, 0.16), 0 0 0 1px rgba(112, 69, 225, 0.28);
}

.faq-question {
    background: transparent;
    padding: 1.3rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
    gap: 1rem;
}

.faq-question:hover {
    background: rgba(112, 69, 225, 0.08);
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, rgba(112, 69, 225, 0.14) 0%, rgba(72, 40, 179, 0.08) 100%);
}

.faq-question-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #1c1230;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.faq-icon {
    color: #4828b3;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    background: #f3f0fc;
    border-top: 1px solid rgba(72, 40, 179, 0);
}

.faq-item.active .faq-answer {
    max-height: 1200px;
    padding: 1.4rem 1.5rem;
    border-top-color: rgba(72, 40, 179, 0.14);
}

.faq-answer-text {
    font-size: 0.95rem;
    color: rgba(20, 8, 70, 0.78);
    line-height: 1.7;
    margin: 0;
}

.faq-answer-text strong {
    color: #4828b3;
    font-weight: 600;
}

.faq-answer-text a {
    color: #4828b3;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-answer-text a:hover {
    color: #2c178a;
}

.faq-answer-text + .faq-answer-text {
    margin-top: 0.8rem;
}

/* Empty state */
.faq-empty {
    display: none; /* affiché par le JS quand la recherche ne trouve rien */
    text-align: center;
    padding: 4rem 1rem;
    color: rgba(20, 8, 70, 0.6);
}

.faq-empty i {
    font-size: 2.5rem;
    color: #4828b3;
    margin-bottom: 1rem;
    display: block;
}

.faq-empty p {
    margin: 0;
    font-size: 1rem;
}

/* CTA */
.faq-cta {
    margin-top: 5rem;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #ebe7fb 100%);
    border: 1px solid rgba(72, 40, 179, 0.22);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(44, 23, 138, 0.10);
}

.faq-cta h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    color: #1c1230;
    margin: 0 0 0.8rem;
    letter-spacing: -0.02em;
}

.faq-cta p {
    font-size: 1rem;
    color: rgba(20, 8, 70, 0.72);
    max-width: 600px;
    margin: 0 auto 1.8rem;
    line-height: 1.6;
}

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

.faq-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-cta-btn.primary {
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 100%);
    color: #fff;
    border: 1.5px solid #4828b3;
    box-shadow: 0 8px 20px rgba(44, 23, 138, 0.28);
}

.faq-cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(44, 23, 138, 0.36), 0 0 24px rgba(112, 69, 225, 0.35);
}

.faq-cta-btn.secondary {
    background: #ffffff;
    color: #25155e;
    border: 1.5px solid rgba(72, 40, 179, 0.32);
}

.faq-cta-btn.secondary:hover {
    background: #ebe7fb;
    border-color: rgba(72, 40, 179, 0.55);
    color: #1c1230;
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .faq-page {
        padding: 130px 1rem 4rem;
    }

    .faq-page-hero h1 {
        font-size: 2.2rem;
    }

    .faq-page-hero p {
        font-size: 0.95rem;
    }

    .faq-tabs {
        gap: 0.5rem;
        margin: 2rem 0;
    }

    .faq-tab {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }

    .faq-category-title {
        font-size: 1.3rem;
    }

    .faq-category-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .faq-category.active ~ .faq-category.active {
        margin-top: 2.5rem;
    }

    .faq-question {
        padding: 1.1rem 1.2rem;
    }

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

    .faq-item.active .faq-answer {
        padding: 1.2rem;
    }

    .faq-answer-text {
        font-size: 0.9rem;
    }

    .faq-cta {
        padding: 2.2rem 1.2rem;
        margin-top: 3.5rem;
    }

    .faq-cta h2 {
        font-size: 1.4rem;
    }
}
