/* Sitewide accessibility and resilient mobile behavior */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 12px 16px;
  background: #fff;
  color: #0b2239;
  border: 3px solid #d8a84e;
  border-radius: 4px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  transform: translateY(-160%);
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #c27a00;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}

:where(input, select, textarea):focus-visible {
  border-color: #8c5900;
}

[id] {
  scroll-margin-top: 100px;
}

main:focus {
  outline: none;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

@media (max-width: 620px) {
  a,
  button,
  summary,
  select,
  input[type="checkbox"],
  input[type="radio"] {
    touch-action: manipulation;
  }

  .nav-links.open a,
  .menu,
  .button,
  .text-button,
  .section-return-links a,
  .footer-links a,
  .page-nav a,
  .page-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-links.open {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .choice span {
    min-height: 52px;
  }

  .consultation-form,
  .energy-form-launch,
  .value-service,
  .digital-service,
  .page-hero,
  .prose {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .button:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid Highlight;
    box-shadow: none;
  }

  .skip-link,
  .button,
  .choice span {
    border: 2px solid ButtonText;
  }
}

/* Responsive display rules must respect HTML's hidden state. */
[hidden] { display: none !important; }
