/* =========================================================================
   SensioLabs AuditLog — shared stylesheet
   Only what EVERY page needs: reset, generic utilities, the container scale
   and shared a11y rules. Page-specific palettes and components live in the
   per-page files (home.css, docs.css). This file never defines colours.
   ========================================================================= */

/* ============================== Reset ============================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
a { text-decoration: none; }
button { font: inherit; }
img, svg { max-width: 100%; }
svg { vertical-align: middle; }

/* ============================ Containers =========================== */
/* Centered content column. Sizes are agnostic (‑lg, ‑xl) so any page can
   pick the width it needs. */
.container-lg,
.container-xl { width: 100%; margin-inline: auto; }
.container-lg { max-width: 1160px; padding-inline: 32px; }
.container-xl { max-width: 1340px; padding-inline: 24px; }

/* ============================= Utilities =========================== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.ms-auto { margin-left: auto; }
.p-0 { padding: 0; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-sticky { position: sticky; }
.top-0 { top: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.text-uppercase { text-transform: uppercase; }
.text-decoration-none { text-decoration: none; }
.text-end { text-align: right; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.font-monospace { font-family: 'JetBrains Mono', monospace; }
.rounded-circle { border-radius: 50%; }
.rounded-pill { border-radius: 50rem; }
.btn { cursor: pointer; }

/* ======================= Shared nav controls ===================== */
/* Theme toggle, used in both the home and docs navs. Styled
   from currentColor only, so they adopt each page's palette without this file
   defining any colours. Markup lives in templates/partials/. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Icon swap: the moon shows in light mode (click → dark), the sun in dark
   mode (click → light), matching the toggle's aria-label. */
.theme-ico-sun { display: none; }
.theme-ico-moon { display: block; }
[data-theme="dark"] .theme-ico-sun { display: block; }
[data-theme="dark"] .theme-ico-moon { display: none; }

/* Language switcher — EN/FR. currentColor-based so it adopts each page's
   palette (marketing + docs), like the controls above. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 9px;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1;
}
.lang-switch a {
  padding: 8px 10px;
  color: color-mix(in srgb, currentColor 62%, transparent);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.lang-switch a + a { border-left: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.lang-switch a:hover { background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; }
.lang-switch a.is-active { color: inherit; background: color-mix(in srgb, currentColor 12%, transparent); font-weight: 600; }

/* ============================ A11y (shared) ======================= */
/* Visible focus on every interactive element */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================ Brand logo ========================== */
/* Inline SVG from templates/partials/_brand_logo.html.twig (brand kit
   "N+CL" lockup). Light: black square, white sf, black "Symfony".
   Dark: white square, black sf, white "Symfony". "AuditLog" stays #4F46E5. */
/* Brand kit "VIOLET_NOIR": violet square, white "sf", "Symfony" in ink, "AuditLog" in violet (AUD-244) */
.brand-logo { display: block; width: auto; height: 30px; flex: none; --brand-ink: #000; --brand-accent: #4F46E5; }
[data-theme="dark"] .brand-logo { --brand-ink: #fff; }
.brand-logo__ink { fill: var(--brand-ink); }
.brand-logo__mark { fill: #fff; }
.brand-logo__accent { fill: var(--brand-accent); }
