/**
 * MIT License
 * (c) 2025 SPARKA
 * Styles pour le panel d'accessibilité avancée
 */

#acces-sparka-adv-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  background: #333;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Overlay panel */
#acces-sparka-adv-panel {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; 
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: none; /* togglé via JS */
}

#acces-sparka-adv-panel[aria-hidden="false"] {
  display: block;
}

.asp-panel-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fafafa;
  color: #333;
  width: 300px;
  max-width: 90%;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 10px #000;
  outline: none; /* on la gère via JS si besoin */
}

#asp-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.asp-option {
  margin: 1rem 0;
}

.asp-option label {
  margin-right: 0.5rem;
}

/* ========== Modifications d’accessibilité ========== */

/* 1) Zoom global => body.asp-zoom-XXX 
   2) Night theme => body.asp-night
   3) Daltonian => body.asp-daltonian-protanopie etc. */

/* Zooms */
body.asp-zoom-100 { font-size: 100%; }
body.asp-zoom-110 { font-size: 110%; }
body.asp-zoom-120 { font-size: 120%; }
body.asp-zoom-130 { font-size: 130%; }
body.asp-zoom-140 { font-size: 140%; }
body.asp-zoom-150 { font-size: 150%; }

/* Night theme */
body.asp-night {
  background: #000 !important;
  color: #fff !important;
}
body.asp-night a {
  color: #ffa500 !important;
}

/* Daltonisme */
body.asp-daltonian-protanopie {
  filter: url(#protanopia);
  /* fallback: filter: grayscale(40%); etc. */
}
body.asp-daltonian-deuteranopie {
  filter: url(#deuteranopia);
}
body.asp-daltonian-tritanopie {
  filter: url(#tritanopia);
}

/* 
  Remarque : pour appliquer un style plus avancé, on peut 
  recourir à un <svg> filter pour simuler protanopie, etc.
  Mais ici on se contente de classes. 
*/

/* Focus visible + navigation clavier */
* :focus {
  outline: 2px solid #3fc !important;
  outline-offset: 2px;
}
