/*
 * ImajeSanté - accessibilité et confort de lecture
 * Les réglages de chaque personne (Mon compte > Affichage et accessibilité) posent des classes sur <html> :
 *   a11y-t115 / t130 / t150  taille du texte
 *   a11y-f-lisible / f-dys   police
 *   a11y-l-aere / l-tres     espacement des lignes
 *   a11y-sombre              mode sombre (a11y-theme-auto : selon l'appareil)
 *   a11y-calme               animations réduites (sinon : selon l'appareil)
 *   a11y-sans-symboles       pas d'icônes de type ni de noms de lieu dans le planning
 * Ce qui ne dépend d'aucun réglage (case active visible au clavier, boutons assez grands au doigt)
 * s'applique à tout le monde.
 */

/* ---------- Polices (hébergées sur le NAS, licence libre SIL OFL) ---------- */
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap;
  src: url('../font/a11y/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap;
  src: url('../font/a11y/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'OpenDyslexic'; font-weight: 400; font-display: swap;
  src: url('../font/a11y/opendyslexic-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'OpenDyslexic'; font-weight: 700; font-display: swap;
  src: url('../font/a11y/opendyslexic-latin-700-normal.woff2') format('woff2'); }

/* ---------- Taille du texte (le thème est en rem : tout suit) ---------- */
html.a11y-t115 { font-size: 17.25px; }
html.a11y-t130 { font-size: 19.5px; }
html.a11y-t150 { font-size: 22.5px; }
html.a11y-t115 .fc, html.a11y-t130 .fc, html.a11y-t150 .fc { font-size: 1em; }
/* le thème Materialize d'origine fixe certaines tailles en pixels : on les convertit (base 15 px) pour qu'elles suivent.
   :where() garde une priorité minimale : les réglages plus précis du thème l'emportent toujours. */
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) body { font-size: .9333rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) p { font-size: 1.2rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) :is(.btn, .btn-flat, .tabs .tab a, .sidenav li > a, .fc-list-table .fc-list-item) { font-size: .9333rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) :is(input, select, textarea, .dropdown-content li > a, .dropdown-content li > span, .select-wrapper input.select-dropdown) { font-size: 1.0667rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) :is(.chip) { font-size: .8667rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) :is(.input-field .helper-text) { font-size: .8rem; }
:where(html.a11y-t115, html.a11y-t130, html.a11y-t150) .material-icons { font-size: 1.6rem; }

/* ---------- Police ---------- */
html.a11y-f-lisible, html.a11y-f-lisible body,
html.a11y-f-lisible :is(button, input, select, textarea, .btn, .btn-flat, h1, h2, h3, h4, h5, h6, .fc, .chip) { font-family: 'Atkinson Hyperlegible', 'Open Sans', Arial, sans-serif; }
html.a11y-f-dys, html.a11y-f-dys body,
html.a11y-f-dys :is(button, input, select, textarea, .btn, .btn-flat, h1, h2, h3, h4, h5, h6, .fc, .chip) { font-family: 'OpenDyslexic', 'Open Sans', Arial, sans-serif; }
html.a11y-f-dys { font-size: 14px; }   /* OpenDyslexic est plus large : on compense un peu */
html.a11y-f-dys.a11y-t115 { font-size: 16px; }
html.a11y-f-dys.a11y-t130 { font-size: 18px; }
html.a11y-f-dys.a11y-t150 { font-size: 21px; }

/* ---------- Espacement ---------- */
html.a11y-l-aere body { line-height: 1.75; word-spacing: .06em; }
html.a11y-l-aere :is(p, li, td, th, label, .ms-help, .page-sub) { line-height: 1.75; }
html.a11y-l-tres body { line-height: 2; letter-spacing: .04em; word-spacing: .16em; }
html.a11y-l-tres :is(p, li, td, th, label, .ms-help, .page-sub) { line-height: 2; }

/* ---------- Animations réduites : réglage « Toujours réduites » ou demande de l'appareil ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .waves-ripple { display: none !important; }
}
html.a11y-calme *, html.a11y-calme *::before, html.a11y-calme *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important; scroll-behavior: auto !important; }
html.a11y-calme .waves-ripple { display: none !important; }

/* ---------- Clavier : la case active se voit toujours (pour tout le monde) ---------- */
:focus-visible { outline: 3px solid var(--focus, #A9530F) !important; outline-offset: 2px !important; }
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible { box-shadow: 0 0 0 5px rgba(238, 150, 75, .35) !important; }
.fc-event:focus-visible, .fc-event:focus { outline: 3px solid #1E1C24 !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px #fff !important; z-index: 10; }
html.a11y-sombre .fc-event:focus-visible, html.a11y-sombre .fc-event:focus { outline-color: #fff !important; box-shadow: 0 0 0 6px #000 !important; }
.skip-link:focus { z-index: 2000; }

/* ---------- Téléphone et tablette : boutons et liens assez grands pour le doigt (44 px) ---------- */
@media (pointer: coarse) {
  .btn, .btn-flat, .btn-small, button, .chip, .role-chip, .activity-chip, .fc-button,
  input[type=submit], select, .sidenav li > a { min-height: 44px; }
  .btn-floating, .icon-btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  [type=checkbox] + span:not(.lever), [type=radio] + span { min-height: 32px; line-height: 32px; }
}

/* ---------- Planning : symboles en plus de la couleur ---------- */
.ev-type { font-size: 1.05em !important; vertical-align: -.18em; margin-right: 2px; line-height: 1; }
.pres-label { position: absolute; left: 3px; bottom: 1px; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink); pointer-events: none; white-space: nowrap; overflow: hidden; max-width: calc(100% - 4px); }
.activity-chip .ev-type { font-size: 1rem !important; }
html.a11y-sans-symboles .ev-type, html.a11y-sans-symboles .pres-label { display: none !important; }

/* ---------- Page Affichage et accessibilité ---------- */
.af-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 900px) { .af-grid { grid-template-columns: 1fr; } }
.af-card { border: 0; margin: 0 0 14px; min-width: 0; }
.af-legend { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; padding: 0; float: left; width: 100%; margin-bottom: 2px; }
.af-legend i { color: var(--brand-text); }
.af-legend + * { clear: both; }
.af-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.af-choice input { position: absolute; opacity: 0; pointer-events: none; }
.af-choice > span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px; cursor: pointer; color: var(--ink); background: var(--surface); }
.af-choice > span .material-icons { font-size: 20px; }
.af-choice input:checked + span { background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); font-weight: 600; }
.af-choice input:focus-visible + span { outline: 3px solid var(--focus, #A9530F); outline-offset: 2px; }
.af-aa { font-weight: 700; line-height: 1; }
.af-aa-100 { font-size: 14px; } .af-aa-115 { font-size: 17px; } .af-aa-130 { font-size: 20px; } .af-aa-150 { font-size: 24px; }
.af-font { font-weight: 700; }
.af-font-normale { font-family: 'Open Sans', sans-serif; }
.af-font-lisible { font-family: 'Atkinson Hyperlegible', sans-serif; }
.af-font-dys { font-family: 'OpenDyslexic', sans-serif; }
.af-preview p { max-width: 70ch; }
.af-demo-events { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.af-ev { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: .9rem; font-weight: 600; }
.af-pres { position: relative; display: inline-block; width: 110px; height: 30px; border-radius: 6px; padding: 0; font-size: 0; }
.af-pres::after { content: 'ISC'; position: absolute; left: 6px; bottom: 3px; font-size: .72rem; font-weight: 700; color: var(--ink); opacity: .75; }
html.a11y-sans-symboles .af-pres::after { display: none; }
.af-bar { justify-content: flex-end; }
.af-state { margin-right: auto; color: var(--ink-soft); }

/* ---------- Mode sombre ---------- */
html.a11y-sombre {
  color-scheme: dark;
  --brand: #F0A262;
  --brand-soft: #3A2C20;
  --brand-text: #F4B47A;
  --ink: #ECE9E4;
  --ink-soft: #B5B0BB;
  --ink-on-brand: #1E1C24;
  --teal-text: #4FD8B5;
  --rose-text: #FF7D9A;
  --bg: #17161C;
  --surface: #24232B;
  --line: #3A3842;
  --focus: #F4B47A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
}
html.a11y-sombre, html.a11y-sombre body { background: var(--bg); color: var(--ink); }
:where(html.a11y-sombre) :where(h1, h2, h3, h4, h5, h6, label, legend, strong, th, td, p, li, .card, .card-title) { color: inherit; }
:where(html.a11y-sombre) :where(h1, h2, h3, h4, h5, h6) { color: var(--ink); }
html.a11y-sombre :is(.card, .card-panel, .collection, .collection-item, .modal, .modal-footer, .dropdown-content, .datepicker-modal,
  .datepicker-table, .datepicker-calendar-container, .datepicker-footer, .timepicker-modal, .ui-dialog, .ui-widget-content, table.dataTable,
  .sidenav, nav, .topbar, .navbar-fixed nav, .co-bar, .ms-card, .tabs, .ui-datepicker) { background-color: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
html.a11y-sombre .ui-widget-header, html.a11y-sombre .ui-dialog-titlebar { background: #2E2D36 !important; color: var(--ink) !important; border-color: var(--line) !important; }
html.a11y-sombre :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=range]) { background-color: #1C1B22 !important; color: var(--ink) !important; border-color: #4A4853 !important; }
html.a11y-sombre ::placeholder { color: #8E8996 !important; }
:where(html.a11y-sombre) a { color: var(--brand-text); }
html.a11y-sombre .sidenav li > a, html.a11y-sombre .sidenav .nav-icon, html.a11y-sombre .topbar a:not(.topbar-cta), html.a11y-sombre .topbar a:not(.topbar-cta) i { color: var(--ink) !important; }
html.a11y-sombre .topbar-cta, html.a11y-sombre .topbar-cta * { color: var(--ink-on-brand) !important; }
html.a11y-sombre .sidenav li > a:hover { background: #2E2D36 !important; }
html.a11y-sombre .sidenav li.active > a, html.a11y-sombre .sidenav a.active, html.a11y-sombre .sidenav [aria-current] { background: var(--brand-soft) !important; color: var(--brand-text) !important; }
html.a11y-sombre .btn:not(.btn-light):not(.btn-flat), html.a11y-sombre .topbar-cta { color: var(--ink-on-brand) !important; }
html.a11y-sombre .btn.btn-light { color: var(--ink) !important; }
:where(html.a11y-sombre) .btn-flat { color: var(--ink); }
html.a11y-sombre :is(.role-chip, .activity-chip, .chip, .fc-button, .co-palette, .ms-spec > span) { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
html.a11y-sombre :is(.role-chip.is-on, .fc-state-active, .fc-button.fc-state-active) { background: var(--brand) !important; color: var(--ink-on-brand) !important; }
html.a11y-sombre .topbar-user { background: transparent !important; border-color: var(--line) !important; color: var(--ink) !important; }
html.a11y-sombre img[src*="logo"] { filter: brightness(1.6) saturate(.9); }
html.a11y-sombre hr, html.a11y-sombre .divider { background: var(--line); border-color: var(--line); }
html.a11y-sombre .co-saved { background: #173A31; color: #7FE6C8; }
/* tableaux */
html.a11y-sombre table, html.a11y-sombre tr, html.a11y-sombre td, html.a11y-sombre th { border-color: var(--line) !important; }
html.a11y-sombre table.striped > tbody > tr:nth-child(odd), html.a11y-sombre table.dataTable tbody tr:nth-child(odd) { background-color: #2A2931 !important; }
html.a11y-sombre table.dataTable tbody tr { background-color: var(--surface) !important; }
html.a11y-sombre tr:hover { background-color: #302F38 !important; }
/* planning (FullCalendar) */
html.a11y-sombre .fc-unthemed :is(td, th, .fc-content, .fc-divider, .fc-list-heading td, .fc-popover, .fc-row, thead, tbody) { border-color: #3A3842 !important; }
html.a11y-sombre .fc-unthemed :is(.fc-widget-header, .fc-divider, .fc-list-heading td, .fc-popover .fc-header) { background: #2A2931 !important; color: var(--ink) !important; }
html.a11y-sombre .fc-unthemed td.fc-today { background: #3A2C20 !important; }
html.a11y-sombre .fc-nonbusiness { background: #000 !important; opacity: .35; }
html.a11y-sombre .fc-cell-text, html.a11y-sombre .fc-axis, html.a11y-sombre .fc-day-header, html.a11y-sombre .fc-cell-content { color: var(--ink) !important; }
html.a11y-sombre .pres-label { color: #fff; }
html.a11y-sombre #event-details, html.a11y-sombre .tooltip, html.a11y-sombre .material-tooltip { background: #33323B !important; color: var(--ink) !important; }
/* Affichage et accessibilité : pas de rond Materialize sur les choix (le choix entier est mis en valeur) */
.af-choice [type=radio]:not(:checked) + span, .af-choice [type=radio]:checked + span { padding: 6px 16px; height: auto; line-height: 1.3; font-size: 1rem; }
.af-choice [type=radio] + span::before, .af-choice [type=radio] + span::after { display: none !important; }
.af-choice input:checked + span::after { content: 'check'; display: inline-block !important; position: static; font-family: 'Material Icons'; font-size: 18px; color: var(--brand-text);
  width: auto; height: auto; border: 0; background: none; transform: none; margin: 0; border-radius: 0; }
.af-aa, .af-font { margin-right: 2px; }

/* ---------- Corrections du contrôle RGAA (contrastes, liens) — pour tout le monde ---------- */
/* le thème Materialize d'origine écrit les paragraphes en gris #888 (contraste 3,3:1, insuffisant) */
p { color: inherit; }
.page-sub { color: var(--ink-soft); }
/* un lien dans une phrase se reconnaît sans la couleur : souligné */
:is(p, .page-sub, .ms-help, .ms-hint, .co-pal-desc) a:not(.btn):not(.btn-flat):not([class*=chip]) { text-decoration: underline; text-underline-offset: 2px; }
/* planning : zones qui défilent atteignables au clavier */
.fc-scroller[tabindex]:focus-visible { outline-offset: -3px !important; }

/* mode sombre : les encadrés à fond clair du thème deviennent des fonds sombres légèrement éclaircis */
html.a11y-sombre table.striped > tbody > tr:nth-child(odd),
html.a11y-sombre table.dataTable.stripe tbody tr.odd,
html.a11y-sombre .badge-alert,
html.a11y-sombre .yf-state,
html.a11y-sombre .yf-state[data-state^="realis"],
html.a11y-sombre .yf-bar,
html.a11y-sombre .hv-badge.hv-add,
html.a11y-sombre .hv-badge.hv-del,
html.a11y-sombre .hv-after,
html.a11y-sombre .dir-cat-urgences,
html.a11y-sombre .dir-cat-equipe,
html.a11y-sombre .hm-list li a,
html.a11y-sombre .hm-list li.is-now a,
html.a11y-sombre .rpt-tag.rpt-conf,
html.a11y-sombre .mb-flash,
html.a11y-sombre .ms-error-box,
html.a11y-sombre .rpt-alert,
html.a11y-sombre .ex-health,
html.a11y-sombre .ex-tag,
html.a11y-sombre .ex-tag-new,
html.a11y-sombre .ex-rdv .yf-state[data-state^="absen"],
html.a11y-sombre .ex-rdv .yf-state[data-state^="manqu"],
html.a11y-sombre .dir-saved,
html.a11y-sombre .mb-flash.is-error,
html.a11y-sombre .pw-ok,
html.a11y-sombre .rg-forget[open],
html.a11y-sombre .cx-dim,
html.a11y-sombre .cx-scopes,
html.a11y-sombre .cx-preset,
html.a11y-sombre .cx-find,
html.a11y-sombre .cx-bar-track,
html.a11y-sombre .co-saved,
html.a11y-sombre .co-seg { background-color: rgba(255, 255, 255, .07) !important; }
html.a11y-sombre .hm-list li.is-now a, html.a11y-sombre .co-saved, html.a11y-sombre .pw-ok, html.a11y-sombre .dir-saved { background-color: rgba(2, 195, 154, .16) !important; }
html.a11y-sombre :is(.rpt-alert, .badge-alert) { background-color: rgba(224, 138, 0, .18) !important; }
html.a11y-sombre :is(.ms-error-box, .mb-flash.is-error, .rg-forget[open], .series-warning) { background-color: rgba(234, 44, 89, .18) !important; color: var(--ink) !important; }
html.a11y-sombre .hm-list li a:hover, html.a11y-sombre .hm-list li a:focus { background-color: var(--brand-soft) !important; }
html.a11y-sombre .btn.disabled, html.a11y-sombre .btn:disabled { background-color: #34333C !important; color: #8E8996 !important; }
html.a11y-sombre .switch label .lever { background-color: #55535E; }
html.a11y-sombre .hm-what em { color: #10241F; }
html.a11y-sombre .co-seg .is-on, html.a11y-sombre [data-mood].is-on, html.a11y-sombre [data-swatch-set].is-on { color: var(--bg) !important; }
html.a11y-sombre .planning-count { color: var(--ink-soft) !important; }
html.a11y-sombre .btn.btn-flat { color: var(--ink-on-brand) !important; }

/* ---------- Contraste élevé (comme les thèmes contrastés de Windows) ----------
   html.a11y-hc + a11y-hc-aqua / desert / crepus / nuit. Comme Windows, on remplace TOUTES les couleurs
   par quelques couleurs tranchées : fond, texte, liens, boutons, sélection, désactivé.
   :not(#a11y-hc) donne à ces règles la priorité d'un identifiant : elles passent devant celles du thème. */
html.a11y-hc-aqua   { --hc-bg: #202020; --hc-fg: #FFFFFF; --hc-link: #75E9FC; --hc-btn: #FFFFFF; --hc-sel-bg: #8EE3F0; --hc-sel-fg: #263B50; --hc-dis: #A6A6A6; --hc-head: #75E9FC; }
html.a11y-hc-desert { --hc-bg: #FFFAEF; --hc-fg: #3D3D3D; --hc-link: #1C5E75; --hc-btn: #202020; --hc-sel-bg: #903909; --hc-sel-fg: #FFF5E3; --hc-dis: #676767; --hc-head: #1C5E75; }
html.a11y-hc-crepus { --hc-bg: #2D3236; --hc-fg: #FFFFFF; --hc-link: #70EBDE; --hc-btn: #FFFFFF; --hc-sel-bg: #A6CDFF; --hc-sel-fg: #212D3B; --hc-dis: #A6A6A6; --hc-head: #70EBDE; }
html.a11y-hc-nuit   { --hc-bg: #000000; --hc-fg: #FFFFFF; --hc-link: #8080FF; --hc-btn: #FFEE32; --hc-sel-bg: #D6B4FD; --hc-sel-fg: #2B2B2B; --hc-dis: #3FF23F; --hc-head: #FFEE32; }
html.a11y-hc { background: var(--hc-bg) !important; color-scheme: light dark; }
html.a11y-hc:not(#a11y-hc) :is(*, *::before, *::after) {
  background-color: var(--hc-bg) !important; background-image: none !important; color: var(--hc-fg) !important;
  border-color: var(--hc-fg) !important; box-shadow: none !important; text-shadow: none !important; }
/* petits éléments dans le texte et les boutons : transparents (sinon ils coupent les contours) */
html.a11y-hc:not(#a11y-hc) :is(span, i, b, strong, em, small, a, label, abbr) { background-color: transparent !important; }
/* cadres : ce qui avait une ombre ou une couleur de fond garde un contour */
html.a11y-hc:not(#a11y-hc) :is(.card, .ms-card, .modal, .dropdown-content, .user-menu, .toast, .collapsible, table, .fc-event, .chip, .gs-box) { border: 1px solid var(--hc-fg) !important; }
html.a11y-hc:not(#a11y-hc) :is(.topbar, .sidenav, .bottom-bar) { border-color: var(--hc-fg) !important; border-style: solid !important; border-width: 0 0 1px 0 !important; }
html.a11y-hc:not(#a11y-hc) .sidenav { border-width: 0 1px 0 0 !important; }
html.a11y-hc:not(#a11y-hc) :is(h1, h2, h3, h4, h5, h6, legend, .page-title, .sp-kicker) { color: var(--hc-head) !important; }
/* liens */
html.a11y-hc:not(#a11y-hc) a:not(.btn):not(.btn-flat):not(.btn-small):not(.btn-floating) :is(*),
html.a11y-hc:not(#a11y-hc) a:not(.btn):not(.btn-flat):not(.btn-small):not(.btn-floating) { color: var(--hc-link) !important; }
html.a11y-hc:not(#a11y-hc) :is(p, small, .ms-help, .page-sub) a:not(.btn):not(.btn-flat) { text-decoration: underline !important; }
html.a11y-hc:not(#a11y-hc) :is(.sidenav, .topbar, .bottom-bar, td, .btn, .btn-flat, .btn-small) a, html.a11y-hc:not(#a11y-hc) a:is(.btn, .btn-flat, .btn-small, .topbar-cta) { text-decoration: none !important; }
/* boutons : texte « bouton » et contour net */
html.a11y-hc:not(#a11y-hc) :is(.btn, .btn-flat, .btn-small, .btn-floating, button, input[type=submit], input[type=button], .fc-button, .of-pill, .af-choice > span, .topbar-cta, .bb-plus),
html.a11y-hc:not(#a11y-hc) :is(.btn, .btn-flat, .btn-small, .btn-floating, button, .fc-button, .topbar-cta) :is(*) { color: var(--hc-btn) !important; }
html.a11y-hc:not(#a11y-hc) :is(.btn, .btn-small, .btn-floating, input[type=submit], input[type=button], .fc-button, .topbar-cta, .af-choice > span) { border: 2px solid var(--hc-btn) !important; }
/* sélection, élément actif, case cochée, page en cours du menu */
html.a11y-hc:not(#a11y-hc):not(#a11y-hc-sel) :is(.active:not(label), .is-active, [aria-pressed=true], [aria-current=page], [aria-selected=true], .fc-state-active, .af-choice input:checked + span, .of-toggle input:checked + .of-pill, .msg-pill),
html.a11y-hc:not(#a11y-hc):not(#a11y-hc-sel) :is(.active:not(label), .is-active, [aria-pressed=true], [aria-current=page], [aria-selected=true], .fc-state-active, .af-choice input:checked + span, .of-toggle input:checked + .of-pill, .msg-pill) :is(*), html.a11y-hc:not(#a11y-hc):not(#a11y-hc-sel) .sidenav .active a {
  background-color: var(--hc-sel-bg) !important; color: var(--hc-sel-fg) !important; border-color: var(--hc-sel-bg) !important; }
html.a11y-hc:not(#a11y-hc) [type=radio]:checked + span::after { background-color: var(--hc-sel-bg) !important; border-color: var(--hc-sel-bg) !important; }
html.a11y-hc:not(#a11y-hc) [type=checkbox]:checked + span:not(.lever)::before { border-color: transparent var(--hc-sel-bg) var(--hc-sel-bg) transparent !important; border-top-color: transparent !important; border-left-color: transparent !important; }
html.a11y-hc:not(#a11y-hc) .switch label .lever { border: 1px solid var(--hc-fg) !important; }
html.a11y-hc:not(#a11y-hc) .switch label .lever::after { background-color: var(--hc-fg) !important; }
html.a11y-hc:not(#a11y-hc):not(#a11y-hc-sel) .switch label input[type=checkbox]:checked + .lever::after { background-color: var(--hc-sel-bg) !important; }
/* désactivé et estompé */
html.a11y-hc:not(#a11y-hc) :is([disabled], .disabled, .is-off, .is-off *, .co-tag, ::placeholder) { color: var(--hc-dis) !important; border-color: var(--hc-dis) !important; }
html.a11y-hc:not(#a11y-hc) :is(input, select, textarea) { border: 1px solid var(--hc-fg) !important; }
/* clavier */
html.a11y-hc:not(#a11y-hc) :focus-visible { outline: 3px solid var(--hc-sel-bg) !important; outline-offset: 2px !important; }
/* planning : les rendez-vous perdent leur couleur (comme sous Windows) ; garder « Symboles dans le planning » pour les distinguer */
html.a11y-hc:not(#a11y-hc) .fc-event { border: 2px solid var(--hc-fg) !important; }
html.a11y-hc:not(#a11y-hc) .fc-today { outline: 2px solid var(--hc-sel-bg) !important; outline-offset: -2px; }
html.a11y-hc:not(#a11y-hc) :is(.fc-now-indicator, .fc-now-indicator-line) { border-color: var(--hc-sel-bg) !important; }
html.a11y-hc:not(#a11y-hc) :is(img, svg, canvas, video) { background-color: transparent !important; }
html.a11y-hc:not(#a11y-hc) .topbar-brand img, html.a11y-hc:not(#a11y-hc) .sidenav-logo img { background-color: #FFFFFF !important; border-radius: 6px; padding: 2px 4px; }

/* aperçu des 4 thèmes dans la page « Affichage et accessibilité » (toujours dans leurs propres couleurs) */
.af-hc-sw { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 7px; border-radius: 6px; font-weight: 700; font-size: 15px; border: 1px solid #000; }
.af-hc-sw i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw.af-hc-sw-aqua   { background: #202020 !important; color: #FFFFFF !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw.af-hc-sw-desert { background: #FFFAEF !important; color: #3D3D3D !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw.af-hc-sw-crepus { background: #2D3236 !important; color: #FFFFFF !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw.af-hc-sw-nuit   { background: #000000 !important; color: #FFFFFF !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-aqua i:nth-of-type(1) { background: #75E9FC !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-aqua i:nth-of-type(2) { background: #8EE3F0 !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-aqua i:nth-of-type(3) { background: #A6A6A6 !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-desert i:nth-of-type(1) { background: #1C5E75 !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-desert i:nth-of-type(2) { background: #903909 !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-desert i:nth-of-type(3) { background: #676767 !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-crepus i:nth-of-type(1) { background: #70EBDE !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-crepus i:nth-of-type(2) { background: #A6CDFF !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-crepus i:nth-of-type(3) { background: #A6A6A6 !important; }
html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-nuit i:nth-of-type(1) { background: #8080FF !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-nuit i:nth-of-type(2) { background: #D6B4FD !important; } html:not(#a11y-hc):not(#a11y-hc-sw) .af-hc-sw-nuit i:nth-of-type(3) { background: #FFEE32 !important; }
html.a11y-hc ::selection { background-color: var(--hc-sel-bg) !important; color: var(--hc-sel-fg) !important; }
