/* Accessibilité Face-IT — socle commun. Jetons attendus : --ink --bg --surface --muted --accent */
html { scroll-behavior: smooth; }
html[data-a11y-size="110"] { font-size: 110%; }
html[data-a11y-size="125"] { font-size: 125%; }
html[data-a11y-size="150"] { font-size: 150%; }

html.a11y-contrast { --bg:#ffffff; --surface:#ffffff; --ink:#000000; --muted:#1a1a1a; --accent:#0033cc; }
html.a11y-contrast.dark-context { --bg:#000000; --surface:#050505; --ink:#ffffff; --muted:#eeeeee; --accent:#ffe500; }

html.a11y-space p, html.a11y-space li, html.a11y-space dd, html.a11y-space figcaption,
html.a11y-space td, html.a11y-space th, html.a11y-space label { letter-spacing:.035em; word-spacing:.16em; }
html.a11y-lh p, html.a11y-lh li, html.a11y-lh dd, html.a11y-lh figcaption, html.a11y-lh td { line-height:1.95; }
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
  animation-duration:.001ms !important; animation-iteration-count:1 !important;
  transition-duration:.001ms !important; scroll-behavior:auto !important;
}
html.a11y-links main a[href], html.a11y-links footer a[href] { text-decoration:underline !important; text-underline-offset:3px; }
html[data-a11y-font="dys"] body, html[data-a11y-font="dys"] h1, html[data-a11y-font="dys"] h2, html[data-a11y-font="dys"] h3 {
  font-family:Verdana, Tahoma, sans-serif !important; letter-spacing:.01em;
}
html.a11y-cursor, html.a11y-cursor * {
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='52' height='52' viewBox='0 0 52 52'><path d='M8 4 L8 40 L18 31 L25 46 L32 43 L25 28 L39 28 Z' fill='white' stroke='black' stroke-width='3'/></svg>") 8 4, auto !important;
}

.a11y-trigger {
  position:fixed; right:1.25rem; bottom:1.25rem; z-index:90;
  display:inline-flex; align-items:center; gap:.55rem;
  min-height:44px; padding:.6rem 1rem; border-radius:999px;
  background:var(--a11y-btn-bg,#111); color:var(--a11y-btn-fg,#fff);
  border:2px solid var(--a11y-btn-bg,#111); font:600 .82rem/1 var(--a11y-font,system-ui);
  letter-spacing:.04em; cursor:pointer; box-shadow:0 6px 24px rgba(0,0,0,.28);
}
.a11y-trigger:hover { transform:translateY(-2px); }
.a11y-trigger svg { width:20px; height:20px; flex:0 0 auto; }
.a11y-trigger:focus-visible, .a11y-panel :focus-visible { outline:3px solid var(--a11y-focus,#ffd400); outline-offset:2px; }

.a11y-panel {
  position:fixed; right:1.25rem; bottom:5rem; z-index:91; width:min(23rem, calc(100vw - 2.5rem));
  max-height:min(78vh,40rem); overflow:auto; background:var(--a11y-panel-bg,#fff);
  color:var(--a11y-panel-fg,#111); border:2px solid currentColor; border-radius:4px;
  box-shadow:0 24px 60px rgba(0,0,0,.35); padding:1rem 1.1rem 1.3rem; font-family:var(--a11y-font,system-ui);
}
.a11y-panel[hidden] { display:none; }
.a11y-head { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-bottom:.9rem; }
.a11y-head h2 { font-size:.95rem; letter-spacing:.02em; margin:0; }
.a11y-close { border:2px solid currentColor; background:transparent; color:inherit; width:36px; height:36px; border-radius:2px; font-size:1.1rem; line-height:1; cursor:pointer; }
.a11y-group { margin-bottom:.9rem; }
.a11y-group > span, .a11y-label { display:block; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; opacity:.62; margin-bottom:.35rem; }
.a11y-seg { display:flex; gap:.3rem; }
.a11y-seg button, .a11y-switch, .a11y-reset {
  font:inherit; font-size:.8rem; cursor:pointer; color:inherit; background:transparent;
  border:1px solid currentColor; border-radius:2px; padding:.5rem .55rem; min-height:40px;
}
.a11y-seg button { flex:1; }
.a11y-seg button[aria-pressed="true"], .a11y-switch[aria-pressed="true"] { background:currentColor; }
.a11y-seg button[aria-pressed="true"] span, .a11y-switch[aria-pressed="true"] span { color:var(--a11y-panel-bg,#fff); }
.a11y-toggle-grid { display:grid; grid-template-columns:1fr 1fr; gap:.3rem; }
.a11y-switch { text-align:left; }
.a11y-status { font-size:.72rem; opacity:.75; margin:.8rem 0 0; min-height:1.2em; }
.a11y-reset { width:100%; margin-top:.5rem; }
@media (max-width:640px) {
  .a11y-trigger { right:.75rem; bottom:.75rem; padding:.6rem; }
  .a11y-trigger .a11y-trigger-txt { display:none; }
  .a11y-panel { right:.75rem; left:.75rem; width:auto; bottom:4.5rem; }
}
