/*
 * Advanced Accessibility Tools - CSS Principal
 * Version: 2.2 - Corrigé
 * Description: Styles pour le plugin d'accessibilité WordPress
 */

/* Variables principales et thèmes */
:root {
    --a11y-primary: #0066cc;
    --a11y-primary-hover: #0052ac;
    --a11y-primary-light: #e6f0ff;
    --a11y-bg-white: #ffffff;
    --a11y-bg-light: #f8fafc;
    --a11y-bg-gray: #64748b;
    --a11y-bg-hover: #e2e8f0;
    --a11y-bg-profile: #f8fafc;
    --a11y-bg-profile-hover: #e0f2fe;
    --a11y-text-dark: #1a365d;
    --a11y-text-medium: #374151;
    --a11y-text-light: #64748b;
    --a11y-text-muted: #334155;
    --a11y-text-white: #ffffff;
    --a11y-border-light: #e0e6ed;
    --a11y-border-medium: #e2e8f0;
    --a11y-border-profile: #e2e8f0;
    --a11y-success: #48bb78;
    --a11y-warning: #ed8936;
    --a11y-error: #e53e3e;
    --a11y-shadow-light: 0 2px 4px rgba(0, 102, 204, 0.3);
    --a11y-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.25);
    --a11y-shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.2);
    --a11y-shadow-overlay: 0 20px 40px rgba(0, 0, 0, 0.3);
    --a11y-shadow-thumb: 0 2px 4px rgba(0, 0, 0, 0.2);
    --a11y-radius-small: 4px;
    --a11y-radius-medium: 6px;
    --a11y-radius-large: 8px;
    --a11y-radius-xl: 12px;
    --a11y-radius-full: 50%;
    --a11y-space-xs: 4px;
    --a11y-space-sm: 8px;
    --a11y-space-md: 12px;
    --a11y-space-lg: 16px;
    --a11y-space-xl: 20px;
    --a11y-toggle-size: 60px;
    --a11y-toggle-size-mobile: 50px;
    --a11y-panel-width: 360px;
    --a11y-panel-width-mobile: 320px;
    --a11y-thumb-size: 18px;
    --a11y-track-height: 6px;
    --a11y-option-min-height: 36px;
    --a11y-profile-min-height: 60px;
    --a11y-z-toolbar: 10000;
    --a11y-z-overlay: 10001;
    --a11y-transition-fast: 0.2s ease;
    --a11y-transition-medium: 0.3s ease;
    --a11y-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --a11y-font-size-multiplier: 1;
    --a11y-line-height: 1.5;
    --a11y-letter-spacing: 0px;
}

/* ===== CLASSES UTILITAIRES ===== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip link pour l'accessibilité */
.a11y-skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--a11y-text-dark);
    color: var(--a11y-text-white);
    padding: var(--a11y-space-sm);
    text-decoration: none;
    z-index: calc(var(--a11y-z-overlay) + 2);
    border-radius: var(--a11y-radius-small);
    font-weight: bold;
    font-family: var(--a11y-font-family);
}

.a11y-skip-link:focus {
    top: 6px;
    outline: 2px solid var(--a11y-primary);
    outline-offset: 2px;
}

/* ===== TOOLBAR PRINCIPAL ===== */

#a11y-toolbar {
    position: fixed;
    bottom: var(--a11y-space-xl);
    right: var(--a11y-space-xl);
    z-index: var(--a11y-z-toolbar);
    font-family: var(--a11y-font-family);
}

#a11y-toggle {
    width: var(--a11y-toggle-size);
    height: var(--a11y-toggle-size);
    border-radius: var(--a11y-radius-full);
    background: #adcb30;
    color: var(--a11y-text-white);
    border: none;
    cursor: pointer;
    box-shadow: var(--a11y-shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--a11y-transition-medium), 
                background-color var(--a11y-transition-medium);
    position: relative;
}

#a11y-toggle img {
    width: 50px;
    height: auto;
    pointer-events: none;
}

#a11y-toggle:hover,
#a11y-toggle:focus {
    transform: scale(1.1);
    background: var(--a11y-primary-hover);
    outline: 3px solid var(--a11y-text-white);
    outline-offset: 2px;
}

/* ===== PANNEAU PRINCIPAL ===== */

#a11y-panel {
    position: absolute;
    bottom: calc(var(--a11y-toggle-size) + var(--a11y-space-lg));
    right: 0;
    width: var(--a11y-panel-width);
    max-width: calc(100vw - 2 * var(--a11y-space-xl));
    background: var(--a11y-bg-white);
    border-radius: var(--a11y-radius-xl);
    box-shadow: var(--a11y-shadow-heavy);
    overflow: hidden;
    transform: translateY(var(--a11y-space-xl));
    opacity: 0;
    pointer-events: none;
    transition: all var(--a11y-transition-medium);
    border: 1px solid var(--a11y-border-light);
}

#a11y-panel.a11y-panel-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.a11y-panel-hidden {
    display: none;
}

/* ===== HEADER DU PANNEAU ===== */

.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--a11y-space-lg) var(--a11y-space-xl);
    background: var(--a11y-bg-light);
    border-bottom: 1px solid var(--a11y-border-light);
}

.a11y-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--a11y-text-dark);
    font-family: var(--a11y-font-family);
}

.a11y-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--a11y-text-light);
    padding: var(--a11y-space-xs);
    border-radius: var(--a11y-radius-small);
    transition: all var(--a11y-transition-fast);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-close-btn:hover,
.a11y-close-btn:focus {
    background: var(--a11y-bg-hover);
    color: var(--a11y-text-muted);
    outline: 2px solid var(--a11y-primary);
    outline-offset: 1px;
}

/* ===== CONTENU DU PANNEAU ===== */

.a11y-content {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.a11y-content::-webkit-scrollbar {
    width: 6px;
}

.a11y-content::-webkit-scrollbar-track {
    background: #f7fafc;
}

.a11y-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.a11y-section {
    padding: var(--a11y-space-lg) var(--a11y-space-xl);
    border-bottom: 1px solid var(--a11y-border-light);
}

.a11y-section:last-child {
    border-bottom: none;
}

.a11y-section h3 {
    margin: 0 0 var(--a11y-space-md) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--a11y-text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--a11y-font-family);
}

/* ===== PROFILS RAPIDES ===== */

.a11y-profiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--a11y-space-sm);
}

.a11y-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--a11y-space-md);
    background: var(--a11y-bg-profile);
    border: 2px solid var(--a11y-border-profile);
    border-radius: var(--a11y-radius-large);
    cursor: pointer;
    transition: all var(--a11y-transition-fast);
    text-align: center;
    font-family: var(--a11y-font-family);
    min-height: var(--a11y-profile-min-height);
    justify-content: center;
}

.a11y-profile:hover,
.a11y-profile:focus {
    background: var(--a11y-bg-profile-hover);
    border-color: var(--a11y-primary);
    outline: none;
    transform: translateY(-1px);
}

.a11y-profile.active {
    background: var(--a11y-primary);
    border-color: var(--a11y-primary-hover);
    color: var(--a11y-text-white);
}

.a11y-profile-icon {
    font-size: 20px;
    margin-bottom: var(--a11y-space-xs);
    display: block;
    line-height: 1;
}

.a11y-profile-name {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--a11y-text-medium);
}

/* ===== OPTIONS GÉNÉRALES ===== */

.a11y-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--a11y-space-sm);
}

.a11y-option {
    padding: var(--a11y-space-sm) var(--a11y-space-md);
    background: var(--a11y-bg-gray);
    color: var(--a11y-text-white);
    border: 2px solid transparent;
    border-radius: var(--a11y-radius-medium);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--a11y-transition-fast);
    min-height: var(--a11y-option-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: var(--a11y-font-family);
    text-align: center;
}

.a11y-option[aria-pressed="true"],
.a11y-option[aria-checked="true"] {
    background: var(--a11y-primary);
    color: var(--a11y-text-white);
    border-color: var(--a11y-primary);
    box-shadow: var(--a11y-shadow-light);
}

.a11y-option:hover,
.a11y-option:focus {
    background: #475569;
    outline: 2px solid var(--a11y-primary);
    outline-offset: 1px;
    transform: translateY(-1px);
}

.a11y-option[aria-pressed="true"]:hover,
.a11y-option[aria-checked="true"]:hover,
.a11y-option[aria-pressed="true"]:focus,
.a11y-option[aria-checked="true"]:focus {
    background: var(--a11y-primary-hover);
}

/* ===== CURSEURS (SLIDERS) ===== */

.a11y-slider {
    margin-bottom: var(--a11y-space-lg);
}

.a11y-slider label {
    display: block;
    margin-bottom: var(--a11y-space-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--a11y-text-medium);
    font-family: var(--a11y-font-family);
}

.a11y-slider input[type="range"] {
    width: 100%;
    height: var(--a11y-track-height);
    border-radius: calc(var(--a11y-track-height) / 2);
    background: var(--a11y-border-medium);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: calc(var(--a11y-thumb-size) / 2) 0;
}

.a11y-slider input[type="range"]:focus {
    outline: 2px solid var(--a11y-primary);
    outline-offset: 2px;
}

.a11y-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--a11y-thumb-size);
    height: var(--a11y-thumb-size);
    border-radius: var(--a11y-radius-full);
    background: var(--a11y-primary);
    cursor: pointer;
    transition: all var(--a11y-transition-fast);
    border: 2px solid var(--a11y-text-white);
    box-shadow: var(--a11y-shadow-thumb);
}

.a11y-slider input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--a11y-primary-hover);
    transform: scale(1.1);
}

.a11y-slider input[type="range"]::-moz-range-thumb {
    width: var(--a11y-thumb-size);
    height: var(--a11y-thumb-size);
    border-radius: var(--a11y-radius-full);
    background: var(--a11y-primary);
    cursor: pointer;
    border: 2px solid var(--a11y-text-white);
    box-shadow: var(--a11y-shadow-thumb);
    transition: all var(--a11y-transition-fast);
}

.a11y-slider input[type="range"]::-moz-range-thumb:hover {
    background: var(--a11y-primary-hover);
    transform: scale(1.1);
}

/* ===== FOOTER DU PANNEAU ===== */

.a11y-footer {
    padding: var(--a11y-space-lg) var(--a11y-space-xl);
    display: flex;
    justify-content: space-between;
    gap: var(--a11y-space-md);
    background: var(--a11y-bg-light);
    border-top: 1px solid var(--a11y-border-light);
}

.a11y-btn {
    padding: var(--a11y-space-sm) var(--a11y-space-lg);
    border: 2px solid transparent;
    border-radius: var(--a11y-radius-medium);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all var(--a11y-transition-fast);
    min-height: var(--a11y-option-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-family: var(--a11y-font-family);
    text-decoration: none;
}

.a11y-btn:focus {
    outline: 2px solid var(--a11y-primary);
    outline-offset: 1px;
}

.a11y-btn-primary {
    background: var(--a11y-primary);
    color: var(--a11y-text-white);
    border-color: var(--a11y-primary);
}

.a11y-btn-primary:hover,
.a11y-btn-primary:focus {
    background: var(--a11y-primary-hover);
    border-color: var(--a11y-primary-hover);
}

.a11y-btn:not(.a11y-btn-primary) {
    background: var(--a11y-bg-hover);
    color: var(--a11y-text-medium);
    border-color: var(--a11y-border-medium);
}

.a11y-btn:not(.a11y-btn-primary):hover,
.a11y-btn:not(.a11y-btn-primary):focus {
    background: #cbd5e0;
    border-color: var(--a11y-primary);
}

/* ===== PANNEAUX OVERLAY ===== */

.a11y-overlay-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--a11y-z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--a11y-transition-medium);
}

.a11y-overlay-panel.visible {
    opacity: 1;
    pointer-events: all;
}

.a11y-overlay-content {
    background: var(--a11y-bg-white);
    border-radius: var(--a11y-radius-xl);
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--a11y-shadow-overlay);
    margin: var(--a11y-space-xl);
    width: 100%;
    font-family: var(--a11y-font-family);
}

.a11y-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--a11y-space-xl);
    background: var(--a11y-bg-light);
    border-bottom: 1px solid var(--a11y-border-light);
}

.a11y-overlay-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--a11y-text-dark);
    font-family: var(--a11y-font-family);
}

.a11y-overlay-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--a11y-text-light);
    padding: var(--a11y-space-xs);
    border-radius: var(--a11y-radius-small);
    transition: all var(--a11y-transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.a11y-overlay-close:hover,
.a11y-overlay-close:focus {
    background: var(--a11y-bg-hover);
    color: var(--a11y-text-muted);
    outline: 2px solid var(--a11y-primary);
    outline-offset: 1px;
}

.a11y-overlay-body {
    padding: var(--a11y-space-xl);
    max-height: 400px;
    overflow-y: auto;
}

/* ===== LISTE DES TITRES ET LANDMARKS ===== */

.a11y-heading-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--a11y-space-sm) var(--a11y-space-md);
    margin: var(--a11y-space-xs) 0;
    background: none;
    border: 1px solid var(--a11y-border-medium);
    border-radius: var(--a11y-radius-medium);
    cursor: pointer;
    transition: all var(--a11y-transition-fast);
    font-size: 14px;
    font-family: var(--a11y-font-family);
    color: var(--a11y-text-medium);
}

.a11y-heading-item:hover,
.a11y-heading-item:focus {
    background: var(--a11y-primary-light);
    border-color: var(--a11y-primary);
    outline: none;
}

.a11y-heading-level {
    font-weight: bold;
    color: var(--a11y-primary);
    margin-right: var(--a11y-space-sm);
}

/* ===== ALERTES ET NOTIFICATIONS ===== */

.a11y-alert {
    position: fixed;
    bottom: var(--a11y-space-xl);
    left: 50%;
    transform: translateX(-50%);
    background: var(--a11y-success);
    color: var(--a11y-text-white);
    padding: var(--a11y-space-md) var(--a11y-space-xl);
    border-radius: var(--a11y-radius-medium);
    box-shadow: var(--a11y-shadow-light);
    z-index: calc(var(--a11y-z-overlay) + 1);
    font-weight: 500;
    font-family: var(--a11y-font-family);
    animation: slideInUp var(--a11y-transition-medium);
    max-width: 90vw;
}

.a11y-alert.a11y-alert-error {
    background: var(--a11y-error);
}

.a11y-alert.a11y-alert-warning {
    background: var(--a11y-warning);
}

@keyframes slideInUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* ===== TAILLE DE POLICE - BOUTONS ET AFFICHAGE ===== */

.a11y-font-buttons {
    display: flex;
    gap: var(--a11y-space-xs);
    margin: var(--a11y-space-md) 0;
    justify-content: center;
    flex-wrap: wrap;
}

.a11y-font-btn {
    background: var(--a11y-bg-light);
    border: 2px solid var(--a11y-border-medium);
    border-radius: var(--a11y-radius-small);
    padding: var(--a11y-space-sm) var(--a11y-space-md);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--a11y-transition-fast);
    min-width: 40px;
    min-height: 36px;
    font-family: var(--a11y-font-family);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--a11y-text-medium);
}

.a11y-font-btn:hover {
    background: var(--a11y-bg-hover);
    border-color: var(--a11y-primary);
}

.a11y-font-btn:focus {
    outline: 2px solid var(--a11y-primary);
    outline-offset: 2px;
}

.a11y-font-btn.active,
.a11y-font-btn[aria-checked="true"] {
    background: var(--a11y-primary);
    color: var(--a11y-text-white);
    border-color: var(--a11y-primary-hover);
}

.a11y-font-btn.changing {
    transform: scale(1.1);
    background: var(--a11y-warning);
    border-color: #d69e2e;
    color: var(--a11y-text-white);
}

.a11y-font-display {
    text-align: center;
    font-size: 12px;
    color: var(--a11y-text-light);
    margin-top: var(--a11y-space-xs);
    font-family: var(--a11y-font-family);
}

/* Animation pour les changements de taille */
.a11y-font-transitioning * {
    transition: font-size var(--a11y-transition-medium) ease !important;
}

.a11y-font-changing {
    position: relative;
}

.a11y-font-changing::before {
    content: "Taille de police modifiée";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 95, 204, 0.9);
    color: var(--a11y-text-white);
    padding: var(--a11y-space-md) var(--a11y-space-xl);
    border-radius: var(--a11y-radius-medium);
    z-index: calc(var(--a11y-z-overlay) + 2);
    font-size: 14px;
    pointer-events: none;
    animation: fadeInOut 2s ease-in-out;
    font-family: var(--a11y-font-family);
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* ===== COMPATIBILITÉ WORDPRESS ===== */

.a11y-tools-active body,
.a11y-tools-active .entry-content,
.a11y-tools-active .post-content,
.a11y-tools-active article {
    font-size: calc(1em * var(--a11y-font-size-multiplier)) !important;
    line-height: var(--a11y-line-height) !important;
    letter-spacing: var(--a11y-letter-spacing) !important;
}

.a11y-tools-active h1,
.a11y-tools-active h2,
.a11y-tools-active h3,
.a11y-tools-active h4,
.a11y-tools-active h5,
.a11y-tools-active h6 {
    font-size: calc(var(--heading-size, 1.5em) * var(--a11y-font-size-multiplier)) !important;
    line-height: var(--a11y-line-height) !important;
    letter-spacing: var(--a11y-letter-spacing) !important;
}

.a11y-tools-active h1 { --heading-size: 2em; }
.a11y-tools-active h2 { --heading-size: 1.75em; }
.a11y-tools-active h3 { --heading-size: 1.5em; }
.a11y-tools-active h4 { --heading-size: 1.25em; }
.a11y-tools-active h5 { --heading-size: 1.1em; }
.a11y-tools-active h6 { --heading-size: 1em; }

/* ===== GUIDE DE LECTURE ===== */

.a11y-reading-guide {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, #ff6b35, #f7931e) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    transition: top 0.1s ease !important;
}

/* ===== TEXTES ALTERNATIFS ===== */

.a11y-alt-text {
    background: rgba(0, 0, 0, 0.8) !important;
    color: var(--a11y-text-white) !important;
    padding: var(--a11y-space-xs) var(--a11y-space-sm) !important;
    font-size: 12px !important;
    border-radius: var(--a11y-radius-small) !important;
    margin-top: var(--a11y-space-xs) !important;
    display: inline-block !important;
    font-family: var(--a11y-font-family) !important;
}

/* ===== ÉTATS SPÉCIAUX ===== */

/* Contenu simplifié */
.a11y-simplified header:not(.entry-header),
.a11y-simplified footer:not(.entry-footer),
.a11y-simplified aside,
.a11y-simplified .sidebar,
.a11y-simplified .widget,
.a11y-simplified .ads,
.a11y-simplified .advertisement,
.a11y-simplified .social-share,
.a11y-simplified nav:not(.post-navigation) {
    display: none !important;
}

.a11y-simplified .main-content,
.a11y-simplified main,
.a11y-simplified .content,
.a11y-simplified article {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: var(--a11y-space-xl) !important;
    float: none !important;
}

/* Images cachées */
.a11y-hidden {
    display: none !important;
}

/* ===== FOCUS MANAGEMENT ===== */

/* Focus visible amélioré */
.a11y-focus-visible:focus-visible,
*:focus-visible {
    outline: 3px solid var(--a11y-primary);
    outline-offset: 2px;
    border-radius: var(--a11y-radius-small);
}

/* Suppression du focus pour les utilisateurs souris */
.js-focus-visible *:focus:not(.focus-visible) {
    outline: none;
}

/* Indicateur de focus pour les éléments custom */
.a11y-focusable:focus {
    outline: 2px solid var(--a11y-primary);
    outline-offset: 1px;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    :root {
        --a11y-toggle-size: var(--a11y-toggle-size-mobile);
        --a11y-panel-width: var(--a11y-panel-width-mobile);
        --a11y-space-xl: var(--a11y-space-lg);
    }
    
    #a11y-toolbar {
        position: fixed !important;
        z-index: 999999 !important;
        bottom: var(--a11y-space-lg);
        right: var(--a11y-space-lg);
    }
    
    #a11y-panel {
        bottom: calc(var(--a11y-toggle-size-mobile) + var(--a11y-space-md));
        max-width: calc(100vw - 2 * var(--a11y-space-lg));
    }
    
    .a11y-header,
    .a11y-section,
    .a11y-footer {
        padding-left: var(--a11y-space-lg);
        padding-right: var(--a11y-space-lg);
    }
    
    .a11y-profiles {
        grid-template-columns: 1fr;
        gap: var(--a11y-space-xs);
    }
    
    .a11y-profile {
        flex-direction: row;
        justify-content: flex-start;
        padding: var(--a11y-space-sm) var(--a11y-space-md);
        min-height: auto;
        text-align: left;
    }
    
    .a11y-profile-icon {
        margin-right: var(--a11y-space-sm);
        margin-bottom: 0;
        font-size: 18px;
    }
    
    .a11y-options {
        gap: var(--a11y-space-xs);
    }
    
    .a11y-option {
        font-size: 12px;
        padding: var(--a11y-space-xs) var(--a11y-space-sm);
        min-height: 32px;
    }
    
    .a11y-overlay-content {
        margin: var(--a11y-space-md);
        max-height: 90vh;
    }
    
    .a11y-overlay-header,
    .a11y-overlay-body {
        padding: var(--a11y-space-lg);
    }
    
    .a11y-font-buttons {
        gap: var(--a11y-space-xs);
    }
    
    .a11y-font-btn {
        padding: var(--a11y-space-xs) var(--a11y-space-sm);
        min-width: 35px;
        min-height: 35px;
        font-size: 11px;
    }
}

/* ===== PETITS ÉCRANS ===== */

@media (max-width: 480px) {
    :root {
        --a11y-panel-width: 280px;
    }
    
    .a11y-profiles {
        grid-template-columns: 1fr;
    }
    
    .a11y-profile-name {
        font-size: 11px;
    }
    
    .a11y-option {
        font-size: 11px;
        padding: 6px var(--a11y-space-sm);
        min-height: 30px;
    }
    
    .a11y-btn {
        font-size: 12px;
        padding: 6px var(--a11y-space-sm);
    }
    
    .a11y-font-btn {
        min-width: 40px;
        min-height: 40px;
        padding: var(--a11y-space-sm);
        font-size: 12px;
    }
}

/* ===== MODE SOMBRE SYSTÈME ===== */

@media (prefers-color-scheme: dark) {
    :root {
        --a11y-bg-white: #2d3748;
        --a11y-bg-light: #1a202c;
        --a11y-text-dark: #e2e8f0;
        --a11y-text-medium: #cbd5e0;
        --a11y-text-light: #a0aec0;
        --a11y-text-muted: #718096;
        --a11y-border-light: #4a5568;
        --a11y-bg-hover: #4a5568;
        --a11y-border-medium: #4a5568;
        --a11y-bg-profile: #2d3748;
        --a11y-bg-profile-hover: #4a5568;
        --a11y-border-profile: #4a5568;
        --a11y-bg-gray: #4a5568;
    }
    
    .a11y-content::-webkit-scrollbar-track {
        background: #1a202c;
    }
    
    .a11y-content::-webkit-scrollbar-thumb {
        background: #4a5568;
    }
}

/* ===== MOUVEMENT RÉDUIT ===== */

@media (prefers-reduced-motion: reduce) {
    :root {
        --a11y-transition-fast: 0.01ms;
        --a11y-transition-medium: 0.01ms;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #a11y-toggle:hover,
    #a11y-toggle:focus {
        transform: none;
    }
    
    .a11y-profile:hover,
    .a11y-profile:focus,
    .a11y-option:hover,
    .a11y-option:focus {
        transform: none;
    }
    
    .a11y-font-btn:hover {
        transform: none;
    }
    
    .a11y-font-btn:active,
    .a11y-font-btn.changing {
        animation: none;
        transform: none;
    }
    
    .a11y-font-transitioning * {
        transition: none !important;
    }
}

/* ===== CONTRASTE ÉLEVÉ ===== */

@media (prefers-contrast: high) {
    :root {
        --a11y-primary: #0052cc;
        --a11y-primary-hover: #003d99;
        --a11y-border-light: #000000;
        --a11y-border-medium: #000000;
    }
    
    .a11y-option,
    .a11y-profile,
    .a11y-btn,
    .a11y-font-btn {
        border-width: 3px;
        font-weight: bold;
    }
    
    .a11y-option:focus,
    .a11y-profile:focus,
    .a11y-btn:focus,
    .a11y-font-btn:focus {
        outline: 4px solid #000000;
        outline-offset: 2px;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    #a11y-toolbar,
    .a11y-overlay-panel,
    .a11y-alert,
    .a11y-reading-guide {
        display: none !important;
    }
    
    .a11y-alt-text {
        background: transparent !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
        padding: 2px 4px !important;
    }
}

/* ===== UTILITAIRES SUPPLÉMENTAIRES ===== */

/* Région live pour les annonces */
.a11y-live-region {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* État de chargement */
.a11y-loading {
    position: relative;
    pointer-events: none;
}

.a11y-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--a11y-border-medium);
    border-top-color: var(--a11y-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* État désactivé */
.a11y-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Texte tronqué avec ellipsis */
.a11y-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Clearfix pour les floats */
.a11y-clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ===== CORRECTIONS SPÉCIFIQUES ===== */

/* Correction du positionnement du panneau sur mobile */
@media (max-width: 768px) {
    #a11y-panel {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 2 * var(--a11y-space-lg));
        max-height: calc(100vh - 2 * var(--a11y-space-lg));
    }
    
    #a11y-panel.a11y-panel-visible {
        transform: translate(-50%, -50%);
    }
}

/* Amélioration de l'accessibilité des sliders */
.a11y-slider input[type="range"]::-moz-range-track {
    background: var(--a11y-border-medium);
    height: var(--a11y-track-height);
    border: none;
    border-radius: calc(var(--a11y-track-height) / 2);
}

/* Correction des marges pour les éléments inline */
.a11y-option,
.a11y-font-btn {
    box-sizing: border-box;
}

/* Amélioration de la lisibilité des textes */
.a11y-section p,
.a11y-overlay-body p {
    line-height: 1.6;
    margin-bottom: var(--a11y-space-sm);
}

.a11y-section p:last-child,
.a11y-overlay-body p:last-child {
    margin-bottom: 0;
}


/* Ajouter à la fin du fichier a11y-tools.css */

/* ===== STYLES POUR LES IMAGES SANS ALT ===== */

/* Surlignage rouge pour les images sans attribut ALT ou avec ALT vide */
.a11y-missing-alt {
    border: 3px solid #dc3545 !important;
    border-radius: var(--a11y-radius-small) !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3) !important;
    position: relative !important;
    animation: a11y-missing-alt-pulse 2s infinite !important;
}

/* Animation de pulsation pour attirer l'attention */
@keyframes a11y-missing-alt-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.6);
    }
}

/* Badge d'erreur positionné sur l'image */
.a11y-missing-alt::before {
    content: "❌ ALT";
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: #dc3545 !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: bold !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    z-index: 1000 !important;
    font-family: var(--a11y-font-family) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    pointer-events: none !important;
}

/* Messages d'information pour les textes alternatifs */
.a11y-alt-text {
    background: rgba(0, 128, 0, 0.8) !important;
    color: white !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: var(--a11y-radius-small) !important;
    margin-top: var(--a11y-space-xs) !important;
    display: inline-block !important;
    font-family: var(--a11y-font-family) !important;
    border-left: 3px solid #28a745 !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
}

/* Messages d'erreur pour les images sans ALT */
.a11y-alt-error {
    background: rgba(220, 53, 69, 0.9) !important;
    color: white !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: var(--a11y-radius-small) !important;
    margin-top: var(--a11y-space-xs) !important;
    display: inline-block !important;
    font-family: var(--a11y-font-family) !important;
    font-weight: bold !important;
    border-left: 3px solid #dc3545 !important;
    animation: a11y-error-fade-in 0.3s ease !important;
}

/* Messages d'avertissement pour les images avec ALT vide */
.a11y-alt-warning {
    background: rgba(255, 140, 0, 0.9) !important;
    color: white !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: var(--a11y-radius-small) !important;
    margin-top: var(--a11y-space-xs) !important;
    display: inline-block !important;
    font-family: var(--a11y-font-family) !important;
    border-left: 3px solid #ffc107 !important;
}

/* Animation d'apparition pour les messages d'erreur */
@keyframes a11y-error-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration pour les images dans des conteneurs flexbox */
.a11y-missing-alt {
    display: inline-block !important;
}

/* Styles spéciaux pour les petites images */
.a11y-missing-alt {
    min-width: 20px !important;
    min-height: 20px !important;
}

/* Pour les images très petites, ajuster le badge */
.a11y-missing-alt[width="1"],
.a11y-missing-alt[height="1"],
.a11y-missing-alt[style*="width: 1px"],
.a11y-missing-alt[style*="height: 1px"] {
    border-width: 1px !important;
}

.a11y-missing-alt[width="1"]::before,
.a11y-missing-alt[height="1"]::before,
.a11y-missing-alt[style*="width: 1px"]::before,
.a11y-missing-alt[style*="height: 1px"]::before {
    font-size: 8px !important;
    padding: 1px 2px !important;
    top: -3px !important;
    right: -3px !important;
}

/* Responsive : ajustements pour mobile */
@media (max-width: 768px) {
    .a11y-alt-text,
    .a11y-alt-error,
    .a11y-alt-warning {
        font-size: 11px !important;
        padding: 3px 6px !important;
        max-width: 250px !important;
    }
    
    .a11y-missing-alt::before {
        font-size: 9px !important;
        padding: 1px 4px !important;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .a11y-alt-text {
        background: rgba(0, 150, 0, 0.9) !important;
        border-left-color: #32d74b !important;
    }
    
    .a11y-alt-error {
        background: rgba(255, 69, 89, 0.9) !important;
        border-left-color: #ff4569 !important;
    }
    
    .a11y-alt-warning {
        background: rgba(255, 160, 0, 0.9) !important;
        border-left-color: #ffa000 !important;
    }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .a11y-missing-alt {
        animation: none !important;
    }
    
    .a11y-alt-error {
        animation: none !important;
    }
    
    .a11y-missing-alt {
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5) !important;
    }
}

/* Contraste élevé */
@media (prefers-contrast: high) {
    .a11y-missing-alt {
        border-width: 4px !important;
        border-color: #ff0000 !important;
    }
    
    .a11y-alt-text {
        background: #008000 !important;
        border-left-width: 4px !important;
    }
    
    .a11y-alt-error {
        background: #cc0000 !important;
        border-left-width: 4px !important;
    }
    
    .a11y-alt-warning {
        background: #ff8c00 !important;
        border-left-width: 4px !important;
        color: #000000 !important;
    }
}
/* ===== FIN DU FICHIER ===== */