/* ==========================================================================
   EXOES - Base styles (fonts, reset, typography, buttons, helpers)
   File: /site/assets/css/base.css
   Shared by every page. Colours and sizes come from variables.css.
   Assisté par IA
   ========================================================================== */

/* ---------- Self-hosted font: Exo (SIL Open Font License) ----------
   One variable font file covers every weight from 100 to 900. */
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/exo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/exo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--size-body);
  font-weight: var(--weight-regular);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-white);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- Typography (sizes from the original global kit) ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem;
  font-family: var(--font-main);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  color: inherit;
}
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
h4 { font-size: var(--size-h4); }
h6 { font-size: var(--size-h6); }

p {
  margin: 0 0 0.9rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

strong {
  font-weight: var(--weight-bold);
}

/* ---------- Layout helper ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 10px;
}

.section-title {
  text-align: center;
}

/* ---------- Buttons (pill shape, as on the original site) ---------- */
.btn {
  display: inline-block;
  padding: var(--button-padding);
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: var(--size-small);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
.btn:hover {
  text-decoration: none;
}

/* Navy outline on white background */
.btn--outline {
  border: var(--button-border);
  background-color: var(--color-white);
  color: var(--color-ink);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--color-ink);
  color: var(--color-white);
}

/* White outline on dark background (slideshow) */
.btn--light {
  border: 1px solid var(--color-white);
  color: var(--color-white);
  font-size: var(--size-body);
}
.btn--light:hover,
.btn--light:focus-visible {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Plain white button (flip cards) */
.btn--white {
  border: 2px solid var(--color-white);
  background-color: var(--color-white);
  color: var(--color-ink);
}
.btn--white:hover,
.btn--white:focus-visible {
  background-color: transparent;
  color: var(--color-white);
}

/* ---------- Accessibility helpers ---------- */

/* Hidden on screen but read by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* "Skip to content" link, visible only when focused with the keyboard */
.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--color-white);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
}
.skip-link:focus {
  top: 10px;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--color-bright);
  outline-offset: 2px;
}

/* Respect the "reduce motion" system setting */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Mobile (up to 767px) ---------- */
@media (max-width: 767px) {
  h2 {
    font-size: var(--size-h2-mobile);
  }
}
