/* ===================== Modul de accesibilitate ===================== */

/* Link „Sari la conținut” — vizibil doar la focus (tastatură) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
}

/* Contur de focus vizibil peste tot (tastatură) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

/* ---------- Buton flotant + panou ---------- */
.a11y-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary, #0b4d3c);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1500;
}
.a11y-toggle:hover { background: var(--color-primary-dark, #073527); }

.a11y-panel {
  position: fixed;
  right: 16px;
  bottom: 78px;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #fff;
  color: #14251f;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  padding: 14px 16px 16px;
  z-index: 1500;
  opacity: 1; /* opac — nu se vede conținutul dedesubt */
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--color-primary-dark, #073527);
}
.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}
.a11y-row span { font-size: .88rem; }
.a11y-row .a11y-btns { display: flex; gap: 6px; }
.a11y-panel button.a11y-opt {
  background: #eef1ef;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: .82rem;
  cursor: pointer;
}
.a11y-panel button.a11y-opt[aria-pressed="true"] {
  background: var(--color-primary, #0b4d3c);
  color: #fff;
  border-color: var(--color-primary, #0b4d3c);
}
.a11y-reset {
  width: 100%;
  margin-top: 8px;
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 7px;
  cursor: pointer;
  font-size: .85rem;
}
.a11y-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
  color: #555;
}

/* ---------- Stări aplicate pe <html> ---------- */
html.a11y-font-lg { font-size: 112%; }
html.a11y-font-xl { font-size: 125%; }

html.a11y-underline a { text-decoration: underline; }

html.a11y-dyslexia body {
  font-family: Verdana, Arial, "Trebuchet MS", sans-serif;
  letter-spacing: .02em;
  word-spacing: .05em;
}

html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast .site-header,
html.a11y-contrast .site-footer { background: #000; border-color: #fff; }
html.a11y-contrast .submenu { background: #000; border-color: #fff; }
html.a11y-contrast .submenu a { color: #fff; }
html.a11y-contrast a { color: #ffe066; }
html.a11y-contrast .doc-table th,
html.a11y-contrast .doc-table td { border-color: #fff; background: #000; color: #fff; }
html.a11y-contrast .page-title { color: #fff; border-color: #ffe066; }
html.a11y-contrast .child-links li { background: #000; border-color: #fff; }
html.a11y-contrast .child-links a { color: #fff; }
html.a11y-contrast .a11y-panel { background: #000; color: #fff; border-color: #fff; }

html.a11y-grayscale body { filter: grayscale(100%); }

/* ---------- Ghid de citire ---------- */
/* Bandă orizontală care urmărește cursorul; restul paginii se întunecă
   ușor deasupra și dedesubt, ca ochiul să rămână pe rândul curent. */
.a11y-guide-band {
  position: fixed;
  left: 0;
  width: 100%;
  height: 44px;
  top: 40%;
  pointer-events: none;
  z-index: 1400;
  background: rgba(255, 224, 102, .16);
  border-top: 2px solid rgba(169, 122, 47, .75);
  border-bottom: 2px solid rgba(169, 122, 47, .75);
  box-shadow: 0 -100vh 0 100vh rgba(0, 0, 0, .45), 0 100vh 0 100vh rgba(0, 0, 0, .45);
}
.a11y-guide-band[hidden] { display: none; }

/* ---------- Vorbire în text ---------- */
.a11y-dictate {
  position: fixed;
  right: 16px;
  bottom: 78px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  color: #14251f;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  padding: 14px 16px 16px;
  z-index: 1600;
}
.a11y-dictate[hidden] { display: none; }
.a11y-dictate h2 { font-size: 1rem; margin: 0 0 8px; color: var(--color-primary-dark, #073527); }
.a11y-dictate-hint { font-size: .82rem; color: #666; margin: 0 0 10px; }
.a11y-dictate textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  font-family: inherit;
  font-size: .88rem;
  resize: vertical;
}
.a11y-dictate-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
#a11yDictateStart[aria-pressed="true"] {
  background: #b3261e;
  color: #fff;
  border-color: #b3261e;
}
