/* FIILINK ROSEAU SRL – styles complémentaires à Tailwind */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

section[id],
main[id] {
  scroll-margin-top: 5rem;
}

:focus-visible {
  outline: 3px solid #D9822B;
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #14202E;
  color: #ffffff;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

html.modal-open {
  overflow: hidden;
}

/* Fenêtres légales */
.legal-dialog {
  width: min(100% - 2rem, 48rem);
  max-height: 85vh;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: #14202E;
  background: #ffffff;
  box-shadow: 0 25px 60px -15px rgba(20, 32, 46, 0.45);
  overflow: hidden;
}

.legal-dialog[open] {
  display: flex;
  flex-direction: column;
}

.legal-dialog::backdrop {
  background: rgba(20, 32, 46, 0.72);
}

.legal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1F3A5F;
}

.legal-body h3:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body ul,
.legal-body dl {
  margin-bottom: 0.75rem;
  line-height: 1.65;
  color: #334155;
}

.legal-body ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-body li + li {
  margin-top: 0.25rem;
}

.legal-body a {
  color: #1F3A5F;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover {
  color: #A35E17;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
