/* ==================================================
   BLOC — FAQ
================================================== */

.faq__titre {
    margin-bottom: 1rem;
}

.faq__liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Figma : accordéon à 24 px de marge interne, angles à 12 px
   — plus serré que les cartes, qui sont à 16. */
.faq__item {
    background: var(--v-blanc);
    border: 1px solid var(--v-bordure);
    border-radius: var(--v-radius-md);
    padding: 24px;
}

/* ENTÊTE — question, bulle vidéo, chevron sur une ligne */
.faq__entete {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq__intitule {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.faq__bouton {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--v-font-corps);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--v-texte-titre);
}

.faq__bouton:focus-visible {
    outline: 2px solid var(--v-turquoise-400);
    outline-offset: 3px;
    border-radius: var(--v-radius-sm);
}

/* CHEVRON */
.faq__chevron {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: var(--v-radius-pill);
    background: var(--v-turquoise-100);
    position: relative;
    transition: background-color 0.2s ease, transform 0.25s ease;
}

.faq__chevron::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.6px solid var(--v-texte-titre);
    border-bottom: 1.6px solid var(--v-texte-titre);
    transform: translate(-50%, -70%) rotate(45deg);
}

.faq__item--ouvert .faq__chevron {
    background: var(--v-action);
    transform: rotate(180deg);
}

.faq__item--ouvert .faq__chevron::before {
    border-color: var(--v-texte-inverse);
}

/* BULLE VIDÉO — visible sur la ligne repliée, cible cliquable distincte */
.faq__bulle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--v-radius-pill);
    background: var(--v-violet-700);
    order: 1;
}

.faq__play {
    display: block;
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid var(--v-texte-inverse);
}

.faq__duree {
    flex: 0 0 auto;
    order: 2;
    font-family: var(--v-font-corps);
    font-size: 0.6875rem;
    color: var(--v-texte-meta);
    white-space: nowrap;
}

/* La bulle disparaît quand la question est ouverte : l'aperçu prend
   le relais dans la réponse, le même objet à une autre échelle. */
.faq__item--ouvert .faq__bulle,
.faq__item--ouvert .faq__duree {
    display: none;
}

/* RÉPONSE */
.faq__corps {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 0.875rem;
}

.faq__texte {
    flex: 1 1 auto;
    font-family: var(--v-font-corps);
    font-size: 0.875rem;
    line-height: var(--v-lh-corps);
    color: var(--v-texte-corps);
}

.faq__texte > *:first-child { margin-top: 0; }
.faq__texte > *:last-child  { margin-bottom: 0; }
.faq__texte p { margin-bottom: 0.7rem; }

/* APERÇU DÉPLIÉ — vignette 16:9 à droite du texte */
.faq__apercu {
    flex: 0 0 220px;
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--v-radius-md);
    background: var(--v-violet-700);
    overflow: hidden;
}

/* L'image de l'aperçu remplit le cadre : posée en `cover`, elle est
   rognée par ses bords plutôt que déformée. Celle de YouTube arrive en
   4/3 — le rognage retire exactement ses deux bandes noires. */
.faq__apercu img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.faq__apercu-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: var(--v-radius-pill);
    background: var(--v-blanc);
}

.faq__apercu-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 14px solid var(--v-violet-500);
}

.faq__apercu-duree {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--v-radius-pill);
    background: rgba(0, 0, 0, 0.55);
    color: var(--v-texte-inverse);
    font-family: var(--v-font-corps);
    font-size: 0.6875rem;
}

@media (max-width: 767px) {
    .faq__item { padding: 20px; }
    .faq__entete { gap: 10px; }
    .faq__bulle { width: 36px; height: 36px; }
    /* À cette largeur, la durée mange la place de la question */
    .faq__duree { display: none; }
    .faq__corps { flex-direction: column-reverse; }
    .faq__apercu { flex: 0 0 auto; width: 100%; }
}
