/* =========================================================
   Divilogy — FAQ Ultra Premium (0 JS, 100% CSS)
   Luxe minimaliste, transitions feutrées, accessibilité OK
   ========================================================= */
.dv-faq {
    /* Tokens */
    --radius: 28px;
    --pad: 1.4rem;
    --gap: 1rem;
    --bg: #ffffff;
    --bg-soft: #f7f9fb;
    --text: #0f172a;
    --muted: #475569;
    --border: rgba(15, 23, 42, .08);
    --accent: #25AD9D;
    --accent2: #3AD1A9;
    --shadow: 0 8px 40px rgba(2, 12, 27, .08);
    --shadow-lg: 0 12px 56px rgba(2, 12, 27, .12);
    --ring: color-mix(in oklab, var(--accent) 65%, white 35%);
    --curve: cubic-bezier(.19, 1, .22, 1);
    --icon-offset: 3px;
    --curve: cubic-bezier(.19, 1, .22, 1);
    --t-open: 1.05s;
    /* ouverture (max-height) */
    --t-fade: .80s;
    /* ouverture (opacity/translate) */
    --t-close: .85s;
    /* fermeture (max-height) */
    --t-close-fade: .60s;
    /* fermeture (opacity/translate) */
    /* centrage optique du signe */
}

/* ---- Stagger d’entrée (douce) ---- */
@keyframes dvFadeRise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dv-faq>.dv-faq__item {
    animation: dvFadeRise .5s var(--curve) both;
}

.dv-faq>.dv-faq__item:nth-child(2) {
    animation-delay: .05s;
}

.dv-faq>.dv-faq__item:nth-child(3) {
    animation-delay: .10s;
}

.dv-faq>.dv-faq__item:nth-child(4) {
    animation-delay: .15s;
}

.dv-faq>.dv-faq__item:nth-child(5) {
    animation-delay: .20s;
}

/* ---- Carte FAQ ---- */
.dv-faq__item {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 18px 0;
    overflow: hidden;
    transition:
        transform .35s var(--curve),
        box-shadow .35s var(--curve),
        border-color .35s var(--curve),
        background .35s var(--curve);
    will-change: transform;
}

/* Barre d’accent (fermée = invisible) */
.dv-faq__item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(180deg, var(--accent), var(--accent2));
    transition: width .45s var(--curve);
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

/* Glow radial très doux sur la zone ouverte */
.dv-faq__item::after {
    content: "";
    position: absolute;
    inset: -30% -15% auto -15%;
    height: 60%;
    pointer-events: none;
    background: radial-gradient(60% 60% at 50% 0%,
            rgba(37, 173, 157, .10), transparent 60%);
    opacity: 0;
    transition: opacity .45s var(--curve);
}

.dv-faq__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ---- En-tête ---- */
.dv-faq__summary {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--gap);
    padding: var(--pad) calc(var(--pad) + .3rem);
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .3s var(--curve);
    outline: none;
}

.dv-faq__summary h3 {
    font-size: clamp(1rem, 1.15vw, 1.1rem);
}

.dv-faq__summary::-webkit-details-marker {
    display: none;
}

.dv-faq__summary:hover {
    background: var(--bg-soft);
}

.dv-faq__q {
    margin: 0;
    line-height: 1.4;
}

/* ---- Icône + / − : centrée, scale + glow ---- */
.dv-faq__icon {
    inline-size: 28px;
    block-size: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    position: relative;
    transition:
        transform .35s var(--curve),
        background .35s var(--curve),
        border-color .35s var(--curve),
        box-shadow .35s var(--curve),
        color .35s var(--curve);
    font-size: 0;
    line-height: 0;
    color: transparent;
}

.dv-faq__icon>* {
    display: none !important;
}

/* neutralise tout contenu HTML */
.dv-faq__icon::before {
    content: "+";
    font-size: 16px;
    line-height: 1;
    color: var(--muted);
    transform: translateY(var(--icon-offset));
}

details[open] .dv-faq__icon {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-color: transparent;
    transform: scale(1.06);
    box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 18%, transparent);
}

details[open] .dv-faq__icon::before {
    content: "\2212";
    color: #fff;
    transform: translateY(var(--icon-offset));
}

/* 0) Override du style utilisateur : on force l’affichage du contenu même quand <details> est fermé
   (sinon aucune transition possible) */
details>.dv-faq__content {
    display: block !important;
}

/* 1) Fermeture (état par défaut) — contenu rendu mais invisible et sans interaction */
.dv-faq__content {
    padding: 0 !important;
    /* padding déplacé dans .dv-faq__inner */
    overflow: hidden;
    max-height: 0;
    transition: none;
    /* le JS contrôle la hauteur */
    will-change: max-height;
}

/* Wrapper interne pour le contenu (porte le padding et l'anim fade/slide) */
.dv-faq__inner {
    padding: .6rem calc(var(--pad) + .3rem) var(--pad);
    opacity: 0;
    transform: translateY(-6px);
    will-change: opacity, transform;
}

/* 2) Ouverture — slide du haut vers le bas + fade + padding */
details[open] .dv-faq__content {
    max-height: 520px;
    /* borne haute confortable */
    opacity: 1;
    transform: translateY(0);
    /* descend visuellement */
    padding-top: .6rem;
    padding-bottom: var(--pad);
    visibility: visible;
    pointer-events: auto;

    transition:
        max-height 1.10s var(--curve),
        opacity 0.80s ease-out .05s,
        /* petit délai pour un rendu soyeux */
        transform 0.80s ease-out .05s,
        padding 0.45s ease-out,
        visibility 0s;
}

/* ---- États ouverts : accent & glow ---- */
details[open].dv-faq__item::before {
    width: 3px;
}

details[open].dv-faq__item::after {
    opacity: 1;
}

/* ---- Focus visible, élégant ---- */
.dv-faq__summary:focus-visible {
    box-shadow: 0 0 0 4px var(--ring);
    border-radius: calc(var(--radius) - 4px);
}

/* ---- Motion reduce ---- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .dv-faq__summary {
        padding: 1rem;
    }

    .dv-faq__content {
        padding: 0 1rem 1rem;
    }
}

/* État de fermeture : on force l'icône en + dès le début */
details.is-closing .dv-faq__icon {
    background: #fff !important;
    border-color: var(--border) !important;
    transform: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

details.is-closing .dv-faq__icon::before {
    content: "+" !important;
    color: var(--muted) !important;
    transform: translateY(var(--icon-offset)) !important;
}

/* Optionnel : coupe la barre d’accent/halo pendant la fermeture */
details.is-closing.dv-faq__item::before {
    width: 0 !important;
}

details.is-closing.dv-faq__item::after {
    opacity: 0 !important;
}