/* ==========================================================
   FAQ (includes/section_faq.inc.php) — questions dépliables
   (<details>/<summary>), 2 dispositions :
   .uw-faq--left   : en-tête + bouton à gauche, questions à droite
   .uw-faq--centre : en-tête centré au-dessus, questions centrées
   Couleurs via --card / --line / --ink / --muted (uw-core.css) :
   le mode sombre (html.uw-dark) s'applique sans règle dédiée.
   Padding vertical commun : .uw-section (uw-core.css).
========================================================== */

.uw-faq-grid {
    display: grid;
    gap: 48px;
}

.uw-faq--left .uw-faq-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
}

.uw-faq--centre .uw-faq-grid {
    gap: 32px;
}

/* ── En-tête ── */
.uw-faq-head .title-line {
    margin-bottom: 10px;
}

.uw-faq-title {
    margin: 0;
}

.uw-faq-intro {
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.uw-faq-btn {
    margin-top: 24px;
}

.uw-faq--centre .uw-faq-head {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.uw-faq--centre .uw-faq-head .title-line {
    justify-content: center;
}

.uw-faq--centre .uw-faq-list {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Questions ── */
.uw-faq-item {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.uw-faq-item:last-child {
    margin-bottom: 0;
}

.uw-faq-item[open] {
    border-color: color-mix(in srgb, var(--couleur) 45%, var(--line));
    box-shadow: 0 8px 24px rgba(10, 20, 34, .06);
}

.uw-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
}

.uw-faq-q::-webkit-details-marker {
    display: none;
}

.uw-faq-q:focus-visible {
    outline: 2px solid var(--couleur);
    outline-offset: -2px;
    border-radius: 12px;
}

.uw-faq-q h3 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    transition: color .25s ease;
}

.uw-faq-q:hover h3,
.uw-faq-item[open] .uw-faq-q h3 {
    color: var(--couleur);
}

/* Icône + / − dans un rond (deux traits en CSS, le vertical disparaît à l'ouverture) */
.uw-faq-icon {
    position: relative;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--couleur) 10%, transparent);
}

.uw-faq-icon::before,
.uw-faq-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--couleur);
    transform: translate(-50%, -50%);
    transition: transform .3s ease;
}

.uw-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.uw-faq-item[open] .uw-faq-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.uw-faq-a {
    padding: 0 24px 22px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

/* Ouverture en douceur (navigateurs récents) */
@supports (interpolate-size: allow-keywords) {
    .uw-faq-item {
        interpolate-size: allow-keywords;
    }

    .uw-faq-item::details-content {
        height: 0;
        overflow: hidden;
        transition: height .3s ease, content-visibility .3s allow-discrete;
    }

    .uw-faq-item[open]::details-content {
        height: auto;
    }
}

/* ── Tablette / mobile ── */
@media (max-width: 900px) {
    .uw-faq--left .uw-faq-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 480px) {
    .uw-faq-q {
        padding: 16px 18px;
    }

    .uw-faq-q h3 {
        font-size: 15px;
    }

    .uw-faq-a {
        padding: 0 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uw-faq-item,
    .uw-faq-item::details-content,
    .uw-faq-icon::before,
    .uw-faq-icon::after {
        transition: none;
    }
}

/* Mode sombre : ombre de la question ouverte plus marquée sur fond sombre */
html.uw-dark .uw-faq-item[open] {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
