/**
 * Accessibilité — skip links + barre d’aide
 */

.bras-skip-links {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 400;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
}

.bras-skip-links__item {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: #121211;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.bras-skip-links__item:focus {
  position: static;
  left: auto;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Desktop : intégré dans la barre d’en-tête */
.bras-a11y {
  position: relative;
  z-index: 140;
  margin: 0;
}

.bras-a11y__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.55rem;
  border: 1px solid rgba(16, 16, 15, 0.08);
  border-radius: 999px;
  background: var(--bras-canvas, #f3f2ef);
  color: var(--bras-ink, #10100f);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: none;
}

.bras-a11y__toggle:hover {
  background: #ebe9e5;
}

.bras-a11y__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--bras-red, #8b2332);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.bras-a11y__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  bottom: auto;
  width: min(calc(100vw - 1.5rem), 20.5rem);
  padding: 1rem 1rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--bras-border, rgba(16, 16, 15, 0.1));
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.bras-a11y__panel[hidden] {
  display: none !important;
}

.bras-a11y__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.bras-a11y__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.bras-a11y__close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--bras-canvas, #f3f2ef);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.bras-a11y__lead {
  margin: 0 0 0.75rem;
  color: var(--bras-muted, #64605c);
  font-size: 0.86rem;
  line-height: 1.45;
}

.bras-a11y__actions {
  display: grid;
  gap: 0.45rem;
}

.bras-a11y__btn {
  min-height: 2.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--bras-border, rgba(16, 16, 15, 0.12));
  border-radius: 12px;
  background: var(--bras-canvas, #f3f2ef);
  color: var(--bras-ink, #10100f);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.bras-a11y__btn[aria-pressed="true"] {
  border-color: var(--bras-red, #8b2332);
  background: rgba(139, 35, 50, 0.08);
  color: var(--bras-red, #8b2332);
}

.bras-a11y__btn--ghost {
  background: #ffffff;
}

.bras-a11y__more {
  margin: 0.75rem 0 0;
  font-size: 0.84rem;
}

.bras-a11y__more a {
  color: var(--bras-red, #8b2332);
  font-weight: 700;
}

/* Modes appliqués sur html */
html.bras-a11y-contrast {
  filter: contrast(1.18);
}

html.bras-a11y-contrast body {
  background: #ffffff !important;
  color: #000000 !important;
}

html.bras-a11y-underline a {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

html.bras-a11y-font-lg {
  font-size: 112.5% !important;
}

html.bras-a11y-font-xl {
  font-size: 125% !important;
}

html.bras-a11y-font-xxl {
  font-size: 137.5% !important;
}

/* Mobile : reste dans la barre d’en-tête (icône compacte) */
@media (max-width: 900px) {
  .bras-a11y__panel {
    width: min(calc(100vw - 1.25rem), 20.5rem);
    right: 0;
  }
}

@media (max-width: 520px) {
  .bras-a11y__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .bras-a11y__toggle {
    min-height: 2.55rem;
    min-width: 2.55rem;
    padding: 0.35rem;
    justify-content: center;
  }
}
