/* ============================================================
   Espace de droits — Extensions accessibilité
   Compléments au CSS source (laissé strictement intact).
   ============================================================ */

/* ---- Skip-link ---- */
/* Caché hors focus, devient visible à la tabulation. */
.skip-link {
  position: absolute;
  top: -200px;
  left: 8px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
  color: var(--white);
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ---- Focus visible global ---- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.btn:focus-visible {
  outline-color: var(--green-deep);
  outline-offset: 3px;
}

/* ---- Print utilities ---- */
/* .print-hidden : caché à l'impression (boutons, nav, footer interactifs). */
@media print {
  .print-hidden { display: none !important; }
}
/* .print-only : visible uniquement à l'impression (notes, URLs, footer terrain). */
.print-only { display: none !important; }
@media print {
  .print-only { display: block !important; }
}

/* ---- Cible de focus du main quand on suit le skip-link ---- */
main[tabindex="-1"]:focus {
  outline: none;
}

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

/* ============================================================
   MOBILE HAMBURGER — drawer state
   Le hamburger n'est visible que sous 960px (cf. site.css).
   Quand l'utilisateur clique, le JS ajoute .is-nav-open au header
   pour faire descendre le menu en accordéon sous la barre.
   ============================================================ */
@media (max-width: 960px) {
  .site-header.is-nav-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 20px 16px;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 12px 24px rgba(20, 26, 18, 0.06);
    z-index: 60;
  }
  .site-header.is-nav-open .site-nav .site-nav__link {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: var(--r-md);
  }
  .site-header.is-nav-open .site-nav .site-nav__link--active::after {
    /* Souligné jaune décalé en mode mobile drawer */
    left: 14px;
    right: auto;
    width: 24px;
    bottom: 6px;
  }
  /* Hamburger devient une croix quand le menu est ouvert */
  .site-header.is-nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .site-header.is-nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.is-nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  .nav-toggle span {
    transition: transform .2s ease, opacity .15s ease;
  }
  @media (prefers-reduced-motion: reduce) {
    .nav-toggle span { transition: none; }
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
