/* #GIGI 2026-12-05 00:40 — EntiPa e UtentiPa: le PREFERENZE DI ACCESSIBILITÀ, le stesse del sito istituzionale
   (copia di assets/sito/accessibilita.css di oesissrl/sitoistituzionale). Differenze: la dimensione del
   testo è uno zoom sui figli di <body> (le pagine sono in pixel), i livelli stanno sopra quelli del
   gestionale, il pulsante sta sopra quello dei cookie del Desk. ⛔ Tutto spento a riposo: ogni regola
   vale solo con un attributo data-a11y-* su <html>. Font OFL in fonts/accessibilita/. */

@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/accessibilita/atkinson-hyperlegible-latin-400-normal-2tcpIt-.woff2") format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/accessibilita/atkinson-hyperlegible-latin-700-normal--Us-gGc.woff2") format('woff2')}
@font-face{font-family:'OpenDyslexic';font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/accessibilita/opendyslexic-latin-400-normal-AHK3jza.woff2") format('woff2')}
@font-face{font-family:'OpenDyslexic';font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/accessibilita/opendyslexic-latin-700-normal-h40azbk.woff2") format('woff2')}

/* ═══════════════════════════════════════════════ IL PULSANTE E IL PANNELLO ══ */

.a11y-pulsante {
    position: fixed; left: 14px; bottom: 68px; z-index: 29990;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--bs-primary, #0066cc);
    border: 3px solid var(--bs-primary, #0066cc);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; padding: 0;
}
.a11y-pulsante:hover { background: var(--bs-primary, #0066cc); color: #fff; }
.a11y-pulsante:focus-visible { outline: 3px solid #ffb400; outline-offset: 3px; }
.a11y-pulsante svg { width: 30px; height: 30px; }
.a11y-pulsante[data-attive]::after {
    content: ''; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px;
    border-radius: 50%; background: #d1344c; border: 2px solid #fff;
}
.a11y-pulsante[hidden] { display: none; }

.a11y-velo { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 30000; }
.a11y-pannello {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 30010;
    width: 440px; max-width: 100vw; background: #fff; color: #1a1a1a;
    border-top: 4px solid var(--bs-primary, #0066cc);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .25);
    display: flex; flex-direction: column;
    font-family: 'Titillium Web', Geneva, Tahoma, sans-serif; font-size: 16px; line-height: 1.4;
    letter-spacing: normal; word-spacing: normal; text-align: left;
}
.a11y-pannello * { font-family: inherit; letter-spacing: inherit; word-spacing: inherit; }
.a11y-testa { padding: 18px 24px 14px; border-bottom: 1px solid #e3e4e6; }
.a11y-testa-riga { display: flex; align-items: center; gap: 10px; }
.a11y-titolo { font-size: 1.6rem; font-weight: 700; margin: 0; color: #1a1a1a; flex: 1; }
.a11y-titolo-icona { color: var(--bs-primary, #0066cc); width: 30px; height: 30px; flex-shrink: 0; }
.a11y-chiudi { background: none; border: 0; padding: 6px; color: var(--bs-primary, #0066cc); cursor: pointer; border-radius: 4px; }
.a11y-chiudi svg { width: 26px; height: 26px; }
.a11y-sotto { margin: 4px 0 12px; color: #4d4d4d; }
.a11y-azioni { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.a11y-ripristina {
    display: inline-flex; align-items: center; gap: 6px; background: #fff; cursor: pointer;
    border: 2px solid var(--bs-primary, #0066cc); color: var(--bs-primary, #0066cc);
    border-radius: 4px; padding: 6px 14px; font-weight: 600;
}
.a11y-ripristina svg { width: 18px; height: 18px; }
.a11y-dichiarazione { color: var(--bs-primary, #0066cc); font-weight: 600; text-decoration: underline; }
.a11y-corpo { flex: 1; overflow-y: auto; padding: 4px 24px 24px; overscroll-behavior: contain; }
.a11y-sezione { margin-top: 20px; }
.a11y-sezione-titolo {
    font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #1a1a1a; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--bs-primary, #0066cc);
}
.a11y-riga { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #e3e4e6; }
.a11y-riga:hover { background: #f5f6f7; }
.a11y-icona {
    width: 40px; height: 40px; border-radius: 50%; background: #eef0f3; color: var(--bs-primary, #0066cc);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.a11y-icona svg { width: 22px; height: 22px; }
.a11y-etichetta { flex: 1; min-width: 0; }
.a11y-nome { display: block; font-weight: 600; color: #1a1a1a; }
.a11y-descr { display: block; font-size: .875rem; color: #5c6f82; }

/* L'interruttore: un pulsante con role="switch" (si legge «attivato / disattivato»). */
.a11y-interruttore {
    position: relative; width: 50px; height: 28px; border-radius: 14px; flex-shrink: 0;
    border: 2px solid #5c6f82; background: #fff; cursor: pointer; padding: 0;
}
.a11y-interruttore::before {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: #5c6f82; transition: left .15s;
}
.a11y-interruttore[aria-checked="true"] { background: var(--bs-primary, #0066cc); border-color: var(--bs-primary, #0066cc); }
.a11y-interruttore[aria-checked="true"]::before { left: 24px; background: #fff; }
.a11y-interruttore:focus-visible, .a11y-passo:focus-visible, .a11y-scelta:focus-visible, .a11y-ripristina:focus-visible,
.a11y-chiudi:focus-visible, .a11y-vai:focus-visible, .a11y-voce-btn:focus-visible {
    outline: 3px solid #ffb400; outline-offset: 2px;
}

/* − valore + */
.a11y-passi { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.a11y-passo {
    width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--bs-primary, #0066cc);
    background: #fff; color: var(--bs-primary, #0066cc); font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
}
.a11y-passo:disabled { opacity: .35; cursor: default; }
.a11y-valore { min-width: 64px; text-align: center; font-weight: 600; font-size: .9rem; }

/* Scelte (carattere, contrasto, colori…): pulsanti con aria-pressed. */
.a11y-scelte { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 4px 12px; border-bottom: 1px solid #e3e4e6; }
.a11y-scelte-nome { width: 100%; font-weight: 600; margin-bottom: 2px; }
.a11y-scelta {
    border: 2px solid #c5c7c9; background: #fff; color: #1a1a1a; border-radius: 4px;
    padding: 5px 10px; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.a11y-scelta[aria-pressed="true"] { border-color: var(--bs-primary, #0066cc); background: var(--bs-primary, #0066cc); color: #fff; }
.a11y-campione { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .35); display: inline-block; }

/* Lettura ad alta voce, In questa pagina */
.a11y-voce { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 4px; }
.a11y-voce-btn {
    border: 2px solid var(--bs-primary, #0066cc); background: #fff; color: var(--bs-primary, #0066cc);
    border-radius: 4px; padding: 6px 12px; font-weight: 600; cursor: pointer;
}
.a11y-voce-btn[aria-pressed="true"] { background: var(--bs-primary, #0066cc); color: #fff; }
.a11y-voce-btn:disabled { opacity: .4; cursor: default; }
.a11y-vai-lista { list-style: none; margin: 0; padding: 6px 0 0; }
.a11y-vai { display: block; padding: 7px 6px; color: var(--bs-primary, #0066cc); text-decoration: underline; border-radius: 4px; }
.a11y-vai:hover { background: #f5f6f7; }
.a11y-piede { padding: 12px 24px 12px 70px; background: #f5f6f7; border-top: 1px solid #e3e4e6; font-size: .9rem; color: #4d4d4d; }
.a11y-piede button { background: none; border: 0; padding: 0; color: var(--bs-primary, #0066cc); text-decoration: underline; font-weight: 600; cursor: pointer; }
.a11y-annuncio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a11y-avviso {
    position: fixed; z-index: 30020; padding: 6px 12px; border-radius: 4px; background: #1a1a1a; color: #fff;
    font: 600 14px/1.3 'Titillium Web', sans-serif; pointer-events: none; max-width: 280px;
}
@media (max-width: 576px) {
    .a11y-pulsante { left: 12px; bottom: 66px; width: 46px; height: 46px; }
    .a11y-pannello { width: 100vw; }
}

/* ═══════════════════════════════════════════════════════════ LE FUNZIONI ══
   Si applicano a tutto TRANNE l'interfaccia del pannello (.a11y-ui). */

/* Dimensione del testo: uno zoom, come il vecchio A−/A/A+ del piè di pagina (le pagine sono in pixel).
   #GIGI 2026-12-05 11:19 — NON sul banner dei cookie del Desk (.ocmp-*): ingrandito, il suo pulsante
   cresceva verso l'alto e finiva sotto quello dell'accessibilità (Federico: «copre l'icona dei cookie»). */
html[data-a11y-dimensione="-1"] body > :not(.a11y-ui):not([class*="ocmp"]) { zoom: .9; }
html[data-a11y-dimensione="1"] body > :not(.a11y-ui):not([class*="ocmp"]) { zoom: 1.1; }
html[data-a11y-dimensione="2"] body > :not(.a11y-ui):not([class*="ocmp"]) { zoom: 1.2; }
html[data-a11y-dimensione="3"] body > :not(.a11y-ui):not([class*="ocmp"]) { zoom: 1.35; }
html[data-a11y-dimensione="4"] body > :not(.a11y-ui):not([class*="ocmp"]) { zoom: 1.5; }

html[data-a11y-interlinea] body :not(.a11y-ui):not(.a11y-ui *) { line-height: var(--a11y-interlinea) !important; }
html[data-a11y-spaziatura] body :not(.a11y-ui):not(.a11y-ui *) {
    letter-spacing: var(--a11y-lettere) !important; word-spacing: var(--a11y-parole) !important;
}
html[data-a11y-carattere="leggibile"] body :not(.a11y-ui):not(.a11y-ui *):not(svg):not(svg *):not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not(.glyphicon):not([class*="material-icons"]):not([class*="material-symbols"]) { font-family: 'Atkinson Hyperlegible', Verdana, sans-serif !important; }
html[data-a11y-carattere="dislessia"] body :not(.a11y-ui):not(.a11y-ui *):not(svg):not(svg *):not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not(.glyphicon):not([class*="material-icons"]):not([class*="material-symbols"]) { font-family: 'OpenDyslexic', 'Comic Sans MS', Verdana, sans-serif !important; }
html[data-a11y-allineamento="sinistra"] body :not(.a11y-ui):not(.a11y-ui *) { text-align: left !important; }

/* #GIGI 2026-12-05 00:43 — Il carattere scelto non tocca i font delle ICONE (FontAwesome, Material): con
   OpenDyslexic sulle <i class="fa"> le icone diventavano quadratini. */

/* Filtri di colore (contrasto alto, bianco e nero, saturazione): sui figli di <body>, non su
   <html>, altrimenti il pannello fisso si sposterebbe con la pagina. */
html[data-a11y-filtro] body > :not(.a11y-ui) { filter: var(--a11y-filtro); }

/* Contrasto scuro e chiaro: colori pieni al posto di quelli del tema. */
html[data-a11y-contrasto="scuro"] body, html[data-a11y-contrasto="scuro"] body :not(.a11y-ui):not(.a11y-ui *) {
    background-color: #000 !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important;
}
html[data-a11y-contrasto="scuro"] body a:not(.a11y-ui *), html[data-a11y-contrasto="scuro"] body a:not(.a11y-ui *) * { color: #ffeb3b !important; }
html[data-a11y-contrasto="scuro"] body svg:not(.a11y-ui *) { fill: #fff !important; }
html[data-a11y-contrasto="chiaro"] body, html[data-a11y-contrasto="chiaro"] body :not(.a11y-ui):not(.a11y-ui *) {
    background-color: #fff !important; color: #000 !important; border-color: #000 !important; box-shadow: none !important;
}
html[data-a11y-contrasto="chiaro"] body a:not(.a11y-ui *), html[data-a11y-contrasto="chiaro"] body a:not(.a11y-ui *) * { color: #0000c8 !important; }
html[data-a11y-contrasto="chiaro"] body svg:not(.a11y-ui *) { fill: #000 !important; }

/* Colori scelti per testo, titoli e sfondo. */
html[data-a11y-c-testo] body :not(.a11y-ui):not(.a11y-ui *):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) { color: var(--a11y-c-testo) !important; }
html[data-a11y-c-titoli] body :is(h1, h2, h3, h4, h5, h6):not(.a11y-ui *), html[data-a11y-c-titoli] body :is(h1, h2, h3, h4, h5, h6):not(.a11y-ui *) * { color: var(--a11y-c-titoli) !important; }
html[data-a11y-c-sfondo] body, html[data-a11y-c-sfondo] body :not(.a11y-ui):not(.a11y-ui *):not(img):not(svg):not(svg *) { background-color: var(--a11y-c-sfondo) !important; }

/* Evidenziare. */
html[data-a11y-link] body a:not(.a11y-ui *) {
    text-decoration: underline !important; text-underline-offset: 3px; outline: 2px solid #ffb400 !important; outline-offset: 1px;
    background-color: #fff3c4 !important; color: #1a1a1a !important;
}
html[data-a11y-link] body a:not(.a11y-ui *) * { color: #1a1a1a !important; }
html[data-a11y-titoli] body :is(h1, h2, h3, h4, h5, h6):not(.a11y-ui *) {
    outline: 3px solid var(--bs-primary, #0066cc) !important; outline-offset: 4px; background-color: #eef4fb !important; color: #1a1a1a !important;
}
html[data-a11y-focus] body :focus:not(.a11y-ui *) { outline: 4px solid #ffb400 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #1a1a1a !important; }
.a11y-sotto-mouse { outline: 3px dashed #d1344c !important; outline-offset: 2px !important; }

/* Guida e maschera di lettura, lente. */
.a11y-guida { position: fixed; left: 0; right: 0; height: 12px; margin-top: -6px; background: rgba(255, 180, 0, .45); border-top: 2px solid #1a1a1a; border-bottom: 2px solid #1a1a1a; pointer-events: none; z-index: 29980; }
.a11y-maschera { position: fixed; left: 0; right: 0; background: rgba(0, 0, 0, .6); pointer-events: none; z-index: 29980; }
.a11y-lente {
    position: fixed; z-index: 29985; max-width: 520px; padding: 10px 14px; pointer-events: none;
    background: #1a1a1a; color: #fff; border: 3px solid #ffb400; border-radius: 6px;
    font: 600 26px/1.3 'Titillium Web', sans-serif;
}

/* Cursore grande (immagine in data:, ammessa dalla CSP: img-src 'self' data:). */
html[data-a11y-cursore] body, html[data-a11y-cursore] body * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11.5-6.6 1 3.9 7.3-2.7 1.4-3.9-7.3L4 20.6z' fill='%23000' stroke='%23fff' stroke-width='1.3'/%3E%3C/svg%3E") 6 3, auto !important;
}
html[data-a11y-cursore] body a, html[data-a11y-cursore] body a *, html[data-a11y-cursore] body button, html[data-a11y-cursore] body button * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M9 2.5a1.5 1.5 0 0 1 3 0V10l1-.2a1.5 1.5 0 0 1 2.9.4l.6-.1a1.5 1.5 0 0 1 2.8.6l.4-.1A1.5 1.5 0 0 1 21 12v5c0 3-2.5 5.5-5.5 5.5H12c-1.7 0-3.2-.9-4.1-2.3L4.4 14.6a1.5 1.5 0 0 1 2.4-1.8L9 15z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 14 2, pointer !important;
}

/* Ferma le animazioni; nascondi le immagini. */
html[data-a11y-animazioni] *, html[data-a11y-animazioni] *::before, html[data-a11y-animazioni] *::after {
    animation-duration: 0s !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important;
}
html[data-a11y-immagini] body :is(img, picture, video, iframe, figure):not(.a11y-ui *) { visibility: hidden !important; }
html[data-a11y-immagini] body :not(.a11y-ui):not(.a11y-ui *) { background-image: none !important; }

/* Il testo letto ad alta voce. */
.a11y-in-lettura { background-color: #fff3c4 !important; color: #1a1a1a !important; outline: 2px solid #ffb400 !important; }
