/* Base: font face, reset, accessibility helpers, breakpoint visibility. */

@font-face {
  /* Unbounded — distribution officielle Google Fonts (OFL-1.1), sous-ensemble latin, variable 200–900. */
  font-family: "Unbounded";
  src: url("../assets/fonts/unbounded-latin-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--c-cream);
}

body {
  margin: 0;
  background: var(--c-cream);
  color: var(--c-dark);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
}

ul[role="list"] {
  list-style: none;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: none;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* The page is the query container for the Figma-pixel scale (--u / --m). */
.page {
  container-type: inline-size;
  overflow-x: clip;
  max-width: 1920px;
  min-height: 100vh;
  margin-inline: auto;
}

/* Tablette (507–1023 px) : la composition mobile 390 est agrandie jusqu'à 1,3× puis centrée. */
@media (max-width: 1023.98px) {
  .site-header,
  main,
  .site-footer {
    max-width: calc(390 * var(--m));
    margin-inline: auto;
  }
}

html.menu-open {
  overflow: hidden;
}

/* Visible only at the matching layout (desktop maquette ≥ 1024 px, mobile maquette below). */
@media (min-width: 1024px) {
  .only-mobile {
    display: none !important;
  }
}

@media (max-width: 1023.98px) {
  .only-desktop {
    display: none !important;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 40px;
  background: var(--c-dark);
  color: var(--c-cream);
  font-family: var(--font-display);
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Keyboard focus (not specified in Figma — choix technique, Indigo ≥ 3:1 sur Crème). */
:focus-visible {
  outline: 3px solid var(--c-indigo);
  outline-offset: 4px;
}

@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;
    scroll-behavior: auto !important;
  }
}
