/* Base autonome du site public ONIR CMS — aucune dépendance framework. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --font-sans: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-pill: 9999px;
  --fs-body: 1.05rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100%;
  margin: 0;
  background: #f4f1e5;
  color: #063d2e;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  text-wrap: balance;
}

::selection {
  background: #004a38;
  color: #ffffff;
}

:focus-visible {
  outline: 3px solid #f08000;
  outline-offset: 3px;
}

.brand {
  display: flex;
  align-items: center;
  flex: none;
  color: inherit;
  text-decoration: none;
}

.brand-logo img {
  display: block;
  width: auto;
  height: 2.4rem;
}

.brand .logo-dark {
  display: none;
}

:root[data-theme="dark"] .brand .logo-dark {
  display: block;
}

:root[data-theme="dark"] .brand .logo-light {
  display: none;
}

.site-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--site-line);
  border-radius: var(--r-pill);
  background: var(--site-surface);
  color: var(--site-muted);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.site-theme-toggle:hover {
  color: var(--site-ink);
  border-color: var(--site-green);
}

.site-theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

.site-theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .site-theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .site-theme-toggle .icon-moon {
  display: none;
}

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

  .site-theme-toggle {
    transition: none;
  }
}
