/**
 * FAQ Page - Modern Flat Design
 * 
 * Beautiful accordion-based FAQ with dark atmospheric background
 * Similar to my-account page styling
 */

/* === FAQ Page Background === */
.faq-page {
    position: relative;
    background: var(--color-neutral-800);
    padding-bottom: 0;
    margin-bottom: 0 !important;
}

.faq-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1585320806297-9794b3e4eeae?w=1920&h=1080&fit=crop') center center / cover no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.faq-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(38, 38, 38, 0.6) 0%, rgba(38, 38, 38, 0.85) 100%);
    z-index: 0;
    pointer-events: none;
}

.faq-page>* {
    position: relative;
    z-index: 1;
}

/* === Hero Section === */
.faq-hero {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    text-align: center;
}

.faq-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.faq-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.3);
    border-radius: 100px;
    color: var(--color-primary-400);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}

.faq-hero-badge svg {
    width: 18px;
    height: 18px;
}

.faq-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: white;
    margin: 0 0 var(--spacing-md) 0;
    font-family: var(--font-heading, 'Playfair Display', serif);
    line-height: 1.2;
}

.faq-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 var(--spacing-xl) 0;
    line-height: 1.7;
}

/* Search Box */
.faq-search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.faq-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-400);
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-base);
}

.faq-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.faq-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* === Category Pills Navigation === */
.faq-categories-nav {
    padding-bottom: var(--spacing-xl);
}

.faq-categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.faq-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-base);
}

.faq-category-pill svg {
    width: 16px;
    height: 16px;
}

.faq-category-pill:hover {
    transform: translateY(-2px);
}

/* Green - Nos Serres */
.faq-category-pill--green {
    border: 1px solid rgba(22, 163, 74, 0.4);
    color: #4ade80;
}

.faq-category-pill--green:hover {
    background: rgba(22, 163, 74, 0.2);
    border-color: #16a34a;
    color: #86efac;
}

/* Blue - Livraison */
.faq-category-pill--blue {
    border: 1px solid rgba(2, 132, 199, 0.4);
    color: #38bdf8;
}

.faq-category-pill--blue:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #7dd3fc;
}

/* Orange - Installation */
.faq-category-pill--orange {
    border: 1px solid rgba(234, 88, 12, 0.4);
    color: #fb923c;
}

.faq-category-pill--orange:hover {
    background: rgba(234, 88, 12, 0.2);
    border-color: #ea580c;
    color: #fdba74;
}

/* Purple - Commande */
.faq-category-pill--purple {
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #a78bfa;
}

.faq-category-pill--purple:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #7c3aed;
    color: #c4b5fd;
}

/* Red - Garantie */
.faq-category-pill--red {
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #f87171;
}

.faq-category-pill--red:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #fca5a5;
}

/* === FAQ Content Section === */
.faq-content {
    padding: var(--spacing-xl) 0 var(--spacing-3xl);
}

.faq-content .container {
    max-width: 900px;
}

/* === FAQ Section (Category) === */
.faq-section {
    margin-bottom: var(--spacing-2xl);
}

.faq-section:last-child {
    margin-bottom: 0;
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-700) 100%);
    border-radius: var(--radius-md);
    color: white;
    flex-shrink: 0;
}

.faq-section-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon color variations */
.faq-section-icon--blue {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.faq-section-icon--orange {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.faq-section-icon--purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.faq-section-icon--red {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.faq-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
    font-family: var(--font-heading, 'Playfair Display', serif);
}

/* === FAQ Accordion === */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* FAQ Item (Flat shadcn style) */
.faq-item {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius, 0.75rem);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: hsl(var(--primary) / 0.4);
}

.faq-item.is-open {
    border-color: var(--color-neutral-300);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.faq-item.is-open--commande {
    border-color: #7c3aed;
}

/* Question Button */
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 1.5rem !important;
    background: transparent !important;
    border: none;
    color: var(--color-neutral-800);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-base);
    gap: 1rem;
}

.faq-question span {
    flex: 1;
    line-height: 1.5;
}

.faq-question:hover {
    color: var(--color-primary-600);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--color-neutral-400);
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-chevron {
    transform: rotate(180deg);
    color: var(--color-primary-600);
}

/* Answer Content */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.is-open .faq-answer {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--color-neutral-600);
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: var(--color-neutral-800);
    font-weight: 600;
}

.faq-answer ul,
.faq-answer ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: var(--color-neutral-600);
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.faq-answer li:last-child {
    margin-bottom: 0;
}

.faq-answer a {
    color: var(--color-primary-600);
    text-decoration: none;
    transition: var(--transition-base);
}

.faq-answer a:hover {
    color: var(--color-primary-700);
    text-decoration: underline;
}

/* === Contact CTA Section === */
.faq-contact-cta {
    padding: var(--spacing-2xl) 0 var(--spacing-3xl);
}

/* FAQ CTA Card (Flat shadcn style) */
.faq-cta-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) var(--spacing-2xl);
    background: linear-gradient(135deg, var(--color-neutral-800) 0%, var(--color-neutral-900) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius, 0.75rem);
    box-shadow: var(--shadow-xl);
    flex-wrap: wrap;
}

.faq-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    color: white;
    flex-shrink: 0;
}

.faq-cta-content {
    flex: 1;
    min-width: 250px;
}

.faq-cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.5rem 0;
    font-family: var(--font-heading, 'Playfair Display', serif);
}

.faq-cta-text {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.faq-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.faq-cta-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-base);
}

.faq-cta-buttons .btn.btn-primary {
    background: white !important;
    color: var(--color-primary-700) !important;
    border: none;
}

.faq-cta-buttons .btn.btn-primary:hover {
    background: var(--color-neutral-100) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-cta-buttons .btn.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.faq-cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .faq-hero {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    .faq-hero-title {
        font-size: 1.75rem;
    }

    .faq-hero-subtitle {
        font-size: 1rem;
    }

    .faq-categories-grid {
        gap: 0.5rem;
    }

    .faq-category-pill {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .faq-section-header {
        gap: var(--spacing-sm);
    }

    .faq-section-icon {
        width: 40px;
        height: 40px;
    }

    .faq-section-icon svg {
        width: 20px;
        height: 20px;
    }

    .faq-section-title {
        font-size: 1.25rem;
    }

    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-item.is-open .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }

    .faq-cta-card {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-xl);
        gap: var(--spacing-lg);
    }

    .faq-cta-icon {
        width: 60px;
        height: 60px;
    }

    .faq-cta-icon svg {
        width: 32px;
        height: 32px;
    }

    .faq-cta-content {
        min-width: 100%;
    }

    .faq-cta-title {
        font-size: 1.25rem;
    }

    .faq-cta-buttons {
        justify-content: center;
        width: 100%;
    }

    .faq-cta-buttons .btn {
        flex: 1;
        justify-content: center;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .faq-category-pill span {
        display: none;
    }

    .faq-category-pill {
        padding: 0.75rem;
    }

    .faq-category-pill svg {
        width: 20px;
        height: 20px;
        opacity: 1;
    }

    .faq-cta-buttons {
        flex-direction: column;
    }

    .faq-cta-buttons .btn {
        width: 100%;
    }
}