/*
 * H2A Accessibility Tools Styles
 */

/* Wrapper and main Accessibility button */
.h2a-accessibility-wrapper {
    position: relative; /* Sert de référence pour positionner la modale */
    display: inline-flex;
    z-index: 99999;

}

.h2a-accessibility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    border: 2px solid #ffffff;
    background: #000000;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
}

/* Panel (modal) */
.h2a-accessibility-panel {
    position: absolute;
    top: calc(100% + 10px); /* juste sous le bouton */
    right: 0;
    max-width: 420px;
    min-width: 300px;
    background: #111111;
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    padding: 1.8rem 2.2rem 2rem;
}

.h2a-accessibility-panel-inner {
    position: relative;
}

.h2a-accessibility-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.h2a-accessibility-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: transparent;
    color: #ffffff;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translate(50%, -50%);
}

.h2a-accessibility-close span {
    line-height: 1;
}

.h2a-accessibility-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.2rem;
}

.h2a-accessibility-label {
    font-size: 1rem;
}

/* Switch styles */
.h2a-switch {
    position: relative;
    width: 48px;
    height: 24px;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

.h2a-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #777777;
    display: flex;
    align-items: center;
    padding: 0 4px;
    transition: background 0.2s ease;
}

.h2a-switch-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateX(0);
    transition: transform 0.2s ease;
}

/* Active state for switches */
.h2a-switch[aria-pressed="true"] .h2a-switch-track {
    background: #e4002b;
}

.h2a-switch[aria-pressed="true"] .h2a-switch-thumb {
    transform: translateX(24px);
}


/* Styles for High Contrast Mode */
/*body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast button,
body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background-color: #222 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

body.high-contrast img,
body.high-contrast video,
body.high-contrast svg {
    border: 1px solid yellow !important; 
}*/

/* Add more specific high-contrast rules as needed */


/* Styles for Reduced Motion Mode */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important; /* Disable smooth scrolling */
    transition-delay: 0ms !important;
}

/* Target specific animations if the above is too broad or causes issues */
/* Example: Stop a specific CSS animation */
/*
body.reduce-motion .my-animated-element {
    animation: none !important;
}
*/

/* Example: Prevent parallax effects (often requires JS interaction or specific CSS override) */
/*
body.reduce-motion .parallax-background {
    background-attachment: scroll !important; 
    transform: none !important;
}
*/

/* Note: Stopping complex JS animations, videos, or SVGs might still require specific JS intervention */
