/* Meung Toggle
   Variables par instance (via shortcode):
   --mt-bar-bg, --mt-bar-color, --mt-panel-bg, --mt-panel-color, --mt-border-color
*/

.meung-toggle {
    --mt-bar-bg: #780000;
    --mt-bar-color: #fbf8ee;
    --mt-panel-bg: #fbf8ee;
    --mt-panel-color: #111;
    --mt-border-color: #780000;

    overflow: hidden;
}

.meung-toggle__bar {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--mt-bar-bg);
    color: var(--mt-bar-color);

    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--mt-border-color);

    cursor: pointer;
    text-align: left;
}

.meung-toggle__bar:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.meung-toggle__title {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 700;
    /* cohérent avec ton style actuel */
}

.meung-toggle__icon {
    font-weight: 800;
    font-size: 20px;
    line-height: 1;
    margin-left: 12px;
}

/* Panel (avec transition) */
.meung-toggle__panel {
    background: var(--mt-panel-bg);
    color: var(--mt-panel-color);

    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: #00090E;

    overflow: hidden;
    height: 0;
    transition: height 260ms ease;
    will-change: height;

    border-left: 1px solid var(--mt-border-color);
    border-right: 1px solid var(--mt-border-color);
    border-bottom: 1px solid var(--mt-border-color);


}

.meung-toggle__panel-inner {
    padding: 16px;
}

.meung-toggle__panel-inner p:last-child {
    margin-bottom: 0;
}

/* Optionnel: si l'utilisateur préfère réduire les animations */
@media (prefers-reduced-motion: reduce) {
    .meung-toggle__panel {
        transition: none;
    }
}

/* Forcer les états hover/active/focus à garder les couleurs */
.meung-toggle__bar:hover,
.meung-toggle__bar:active,
.meung-toggle__bar:focus,
.meung-toggle__bar:focus-visible {
    background: var(--mt-bar-bg) !important;
    color: var(--mt-bar-color) !important;
}

/* Évite les effets “grisés”/transparence */
.meung-toggle__bar {
    opacity: 1 !important;
    filter: none !important;
    border: 0;
}

/* Si un thème ajoute un box-shadow au clic */
.meung-toggle__bar:active {
    box-shadow: none !important;
    transform: none !important;
}

.meung-toggle__bar:focus-visible {
    outline: 2px solid rgba(251, 248, 238, 0.8);
    /* proche de #fbf8ee */
    outline-offset: -2px;
}