/**
 * Grouvel Accessibility Styles
 * Styles pour l'accessibilite (skip links, focus, sr-only)
 */

:root {
  --focus-ring-color: rgba(0, 122, 255, 0.85);
  --focus-ring-offset: 3px;
}

/* === Skip Link === */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1em 2em;
  background: #2b2d42;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--focus-ring-color);
  outline-offset: 2px;
}

/* Skip link pour theme sombre (jeux) */
.theme-games .skip-link,
[data-theme="games"] .skip-link {
  background: #00ffcc;
  color: #000;
}

/* === Screen reader only === */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(
  a,
  button,
  .button,
  .btn,
  .nav-btn,
  .tab-btn,
  .filter-toggle,
  .ctl,
  [role="button"],
  [data-keyboard-focus]
):focus-visible {
  outline: 3px solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

:where(a.x-nav):focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.55);
}

.pad button:focus-visible,
.mobile-controls button:focus-visible {
  outline: 3px solid rgba(0, 229, 255, 0.8);
  outline-offset: 3px;
}
