/* ==========================================================================
   Polices, remise à zéro et typographie — miroir de AppTextStyles & AppInkText
   ========================================================================== */

@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/lilita-one-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/shantell-sans-700-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/shantell-sans-800-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/rubik-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/rubik-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/rubik-700-latin.woff2") format("woff2");
}

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

* {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background-color: var(--night);
  color: var(--text);
  overflow-x: clip;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--night);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

/* Les composants posent leur propre `display` : sans ceci, `hidden` n'y fait rien */
[hidden] {
  display: none !important;
}

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

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: var(--stroke-comic) solid var(--lightning-body);
  outline-offset: 3px;
}

::selection {
  background: rgb(76 155 255 / 0.4);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Échelle typographique (AppTextStyles + AppGameTextStyles + AppInkText)
   -------------------------------------------------------------------------- */

.ink-text {
  --ink-shadow: var(--cta-edge);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.04;
  color: var(--text);
  paint-order: stroke fill;
  -webkit-text-stroke: 6px var(--night);
  text-shadow: 0 4px 0 var(--ink-shadow);
}

.ink-text--fire {
  --ink-shadow: var(--fire-body);
}

.ink-text--water {
  --ink-shadow: var(--water-body);
}

.ink-text--earth {
  --ink-shadow: var(--earth-core);
}

.ink-text--lightning {
  --ink-shadow: var(--lightning-body);
  color: var(--lightning-core);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Conteneur & sections
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section--alt {
  background-color: var(--surface);
  border-block: var(--stroke-comic) solid var(--divider);
}

.section-head {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
}

.section-head__eyebrow {
  margin-bottom: var(--space-md);
}

.section-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--text);
  paint-order: stroke fill;
  -webkit-text-stroke: 6px var(--night);
  text-shadow: 0 4px 0 var(--cta-edge);
  margin-bottom: var(--space-md);
}

.section-head__sub {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Lien d'évitement & utilitaires
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--caption);
  color: var(--on-cta);
  font-weight: 700;
  border: var(--stroke-comic) solid var(--night);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-caption);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-standard);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Révélation au défilement */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-slow) var(--ease-decelerate),
    transform var(--dur-slow) var(--ease-decelerate);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
