/* ==========================================================================
   MUC Omnisports — FAQ Accordéon (MUC bleu/jaune)
   Spécificité très élevée (html body ...) pour battre Elementor / Hello Elementor.
   Préfixe `muc-` pour éviter les collisions.
   ========================================================================== */

/* === RESET DUR : ferme tout par défaut, indépendamment de l'état initial === */
html body .muc-faq-accordion .muc-faq-item .muc-faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
}

html body .muc-faq-accordion .muc-faq-item .muc-faq-answer[style] {
    /* Permet au JS d'écrire inline style="max-height: XXXpx" quand ouvert */
    max-height: 0 !important;
}

html body .muc-faq-accordion .muc-faq-item.is-open .muc-faq-answer {
    /* Laisse le JS appliquer la hauteur réelle via style inline */
    max-height: none !important;
}

html body .muc-faq-accordion .muc-faq-item .muc-faq-question {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1B3FBF !important;
    border: 2px solid #1B3FBF !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html body .muc-faq-accordion .muc-faq-item.is-open .muc-faq-question {
    background: #FFCD00 !important;
    background-color: #FFCD00 !important;
    color: #ffffff !important;
    border-color: #FFCD00 !important;
}

/* === VARIABLES & BASE === */
:root {
    --muc-faq-blue:        #1B3FBF;
    --muc-faq-blue-soft:   #4A6BE0;
    --muc-faq-yellow:      #FFCD00;
    --muc-faq-text:        #1F1F1F;
    --muc-faq-muted:       #555555;
}

.muc-faq-title {
    font-family: "Bebas Neue", "Oswald", "Arial Black", sans-serif;
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muc-faq-blue);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.05;
    margin: 0 0 32px;
    letter-spacing: 0.5px;
}

/* === CONTENEUR === */
html body .muc-faq-accordion {
    margin: 24px 0 48px !important;
    display: block !important;
    font-family: inherit !important;
    color: var(--muc-faq-text) !important;
}

/* === ITEM (carte) === */
html body .muc-faq-accordion .muc-faq-item {
    background: transparent !important;
    border: 0 !important;
    border-top: 2px solid var(--muc-faq-blue-soft) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body .muc-faq-accordion .muc-faq-item:last-child {
    border-bottom: 2px solid var(--muc-faq-blue-soft) !important;
}

/* === BOUTON QUESTION === */
html body .muc-faq-question {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 18px 24px !important;
    text-align: left !important;
    cursor: pointer !important;
    font-family: "Bebas Neue", "Oswald", "Arial Black", sans-serif !important;
    font-style: italic !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: clamp(1rem, 1.8vw, 1.3rem) !important;
    line-height: 1.2 !important;
    color: var(--muc-faq-blue) !important;
    letter-spacing: 0.5px !important;
    transition: color 200ms ease, background 200ms ease !important;
}

html body .muc-faq-question:hover {
    background: #F5F8FF !important;
}

html body .muc-faq-question:focus-visible {
    outline: 2px dashed var(--muc-faq-blue) !important;
    outline-offset: -4px !important;
}

html body .muc-faq-question-text {
    flex: 1 1 auto !important;
}

/* === ICÔNE + / − === */
html body .muc-faq-icon {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    color: var(--muc-faq-blue) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    font-style: normal !important;
    border-radius: 0 !important;
    transition: transform 200ms ease, color 200ms ease !important;
}

html body .muc-faq-item.is-open .muc-faq-icon {
    color: #ffffff !important;
}

/* === RÉPONSE (zone dépliable) === */
html body .muc-faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 320ms ease !important;
    background: #ffffff !important;
}

html body .muc-faq-answer-content {
    padding: 4px 24px 20px !important;
    color: var(--muc-faq-muted) !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    background: #ffffff !important;
}

/* === ÉTAT OUVERT — bandeau jaune === */
html body .muc-faq-item.is-open > .muc-faq-question {
    background: var(--muc-faq-yellow) !important;
    background-color: var(--muc-faq-yellow) !important;
    color: #ffffff !important;
    border-color: var(--muc-faq-yellow) !important;
    position: relative !important;
}

/* Bordures pointillées blanches intérieures (effet sticker) */
html body .muc-faq-item.is-open > .muc-faq-question::before,
html body .muc-faq-item.is-open > .muc-faq-question::after {
    content: "" !important;
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    height: 0 !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.55) !important;
}

html body .muc-faq-item.is-open > .muc-faq-question::before {
    top: 5px !important;
}

html body .muc-faq-item.is-open > .muc-faq-question::after {
    bottom: 5px !important;
}

/* === TYPOGRAPHIE DE LA RÉPONSE === */
html body .muc-faq-answer-content p {
    margin: 10px 0 !important;
}

html body .muc-faq-answer-content p:first-child {
    margin-top: 0 !important;
}

html body .muc-faq-answer-content p:last-child {
    margin-bottom: 0 !important;
}

html body .muc-faq-answer-content a {
    color: var(--muc-faq-blue) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    transition: color 200ms ease !important;
}

html body .muc-faq-answer-content a:hover,
html body .muc-faq-answer-content a:focus-visible {
    color: #0F2A8C !important;
}

html body .muc-faq-answer-content strong {
    color: var(--muc-faq-text) !important;
    font-weight: 700 !important;
}

html body .muc-faq-answer-content ul,
html body .muc-faq-answer-content ol {
    margin: 10px 0 10px 22px !important;
    padding: 0 !important;
}

html body .muc-faq-answer-content li {
    margin: 6px 0 !important;
}

/* === ÉTAT VIDE === */
.muc-faq-empty {
    padding: 20px 0 !important;
    color: var(--muc-faq-muted) !important;
    font-style: italic !important;
    border-bottom: 2px solid var(--muc-faq-blue-soft) !important;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    html body .muc-faq-question {
        padding: 14px 16px !important;
        font-size: 1rem !important;
    }
    html body .muc-faq-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 1.5rem !important;
    }
    html body .muc-faq-answer-content {
        padding: 4px 16px 16px !important;
        font-size: 0.95rem !important;
    }
    .muc-faq-title {
        font-size: 1.8rem !important;
    }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
    html body .muc-faq-answer,
    html body .muc-faq-item,
    html body .muc-faq-icon,
    html body .muc-faq-question {
        transition: none !important;
    }
}
