/**
 * Scripts FAQ - Accordéon natif <details>/<summary>
 * SEO-friendly, accessible, Schema.org FAQPage
 *
 * Classes identiques au widget FAQ existant (pdc-faq__*)
 * pour assurer la cohérence visuelle.
 *
 * @package WP_PDC_Scripts
 */

/* Container */
.pdc-faq {
    width: 100%;
}

.pdc-faq__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--script-text, #1f2937);
}

/* Panels container */
.pdc-faq__panels {
    display: flex;
    flex-direction: column;
}

/* Panel (details element) */
.pdc-faq__panel {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--script-border, #e8e8e8);
}

.pdc-faq__panel:last-child {
    border-bottom: none;
}

/* Toggle (summary element) */
.pdc-faq__toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 14px 20px;
    background: transparent !important;
    border: none;
    border-radius: inherit;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    color: var(--script-text-secondary, #666);
    text-transform: none;
    letter-spacing: normal;
    transition: color var(--script-transition, 200ms ease);
    list-style: none;
}

/* Remove native disclosure triangle */
.pdc-faq__toggle::-webkit-details-marker {
    display: none;
}

.pdc-faq__toggle::marker {
    display: none;
    content: '';
}

.pdc-faq__toggle:hover {
    color: var(--script-text, #333);
}

.pdc-faq__toggle:focus {
    outline: none;
}

.pdc-faq__panel[open] .pdc-faq__toggle {
    color: var(--script-text, #333);
}

/* Icon +/- */
.pdc-faq__icon {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 3px;
    background: transparent;
}

.pdc-faq__icon::before,
.pdc-faq__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--script-text-secondary, #666);
    transition: transform var(--script-transition, 200ms ease),
                opacity var(--script-transition, 200ms ease);
}

/* Horizontal line */
.pdc-faq__icon::before {
    width: 10px;
    height: 2px;
    transform: translate(-50%, -50%);
}

/* Vertical line (+ sign) */
.pdc-faq__icon::after {
    width: 2px;
    height: 10px;
    transform: translate(-50%, -50%);
}

/* Open state: + becomes - */
.pdc-faq__panel[open] .pdc-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* Title text */
.pdc-faq__title-text {
    flex: 1;
    line-height: 1.4;
}

/* Body */
.pdc-faq__body {
    background: transparent;
    border-top: none;
    overflow: hidden;
}

/* Content */
.pdc-faq__content {
    padding: 20px;
    color: var(--script-text-secondary, #666);
    font-size: 14px;
    line-height: 1.7;
}

.pdc-faq__content p:last-child {
    margin-bottom: 0;
}

.pdc-faq__content a {
    color: var(--script-color-primary, #ffb606);
    text-decoration: underline;
}

.pdc-faq__content a:hover {
    opacity: 0.8;
}

.pdc-faq__content ul,
.pdc-faq__content ol {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.pdc-faq__content li {
    margin-bottom: 0.25rem;
}

.pdc-faq__content strong {
    color: var(--script-text, #1f2937);
}

/* Responsive */
@media (max-width: 768px) {
    .pdc-faq__title {
        font-size: 1.5rem;
    }

    .pdc-faq__toggle {
        padding: 12px 15px;
        font-size: 14px;
        gap: 12px;
    }

    .pdc-faq__icon {
        width: 20px;
        height: 20px;
    }

    .pdc-faq__content {
        padding: 15px;
        font-size: 13px;
    }
}
