:root {
  --paper: #fafaf8;
  --ink: #111;
  --muted: #555;
  --accent: #c8201a;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f0e;
    --ink: #f0efeb;
    --muted: #8d8c88;
    --accent: #ff4a3d;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* Toute la page tient dans un seul écran : le nom au centre, rien d'autre. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.page {
  width: 100%;
  text-align: center;
}

h1 {
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Chaque lettre semble découpée dans un journal différent : son papier, sa police,
   sa casse et un léger angle. Les couleurs gardent au moins 4,5:1 de contraste. */
.ransom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.06em;
  font-size: clamp(3rem, 14vw, 5.5rem);
  letter-spacing: 0;
  cursor: default;
}

.ransom span {
  display: inline-block;
  padding: 0.06em 0.14em 0.1em;
  box-shadow: 0.04em 0.05em 0 rgb(0 0 0 / 0.25);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  transition: transform 120ms ease-out;
}

.ransom [data-s="0"] { background: #111; color: #fff; font-family: Impact, "Arial Narrow", sans-serif; font-weight: 400; --r: -4deg; }
.ransom [data-s="1"] { background: #c8201a; color: #fff; font-family: Georgia, "Times New Roman", serif; font-style: italic; --r: 3deg; }
.ransom [data-s="2"] { background: #f4d03f; color: #111; font-family: "Courier New", Courier, monospace; --r: -2deg; --y: 0.05em; }
.ransom [data-s="3"] { background: #ebe4d0; color: #111; font-family: "Times New Roman", Times, serif; --r: 5deg; }
.ransom [data-s="4"] { background: #1f3a93; color: #fff; font-family: "Arial Black", "Helvetica Neue", sans-serif; font-weight: 900; --r: -6deg; --y: -0.04em; }
.ransom [data-s="5"] { background: #f7b8c8; color: #111; font-family: "Trebuchet MS", Verdana, sans-serif; --r: 2deg; }
.ransom [data-s="6"] { background: #2e6b3a; color: #fff; font-family: Verdana, Geneva, sans-serif; --r: -3deg; --y: 0.04em; }
.ransom [data-s="7"] { background: #fff; color: #111; font-family: Didot, "Bodoni MT", Georgia, serif; outline: 1px solid #111; --r: 4deg; }

@media (forced-colors: active) {
  .ransom span { border: 1px solid CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  .ransom span { transition: none; }
}

.social ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(0.75rem, 3vw, 1.5rem);
  margin-top: clamp(1rem, 3vw, 1.75rem);
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.social a::after {
  content: "\00a0↗" / "";
}

/* Le bouton de langue reste dans un coin, hors du centre. */
.lang {
  position: fixed;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  min-height: 44px;
  padding: 0 0.75rem;
  background: none;
  border: 1px solid var(--muted);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .lang:hover { border-color: var(--ink); }
  .social a:hover { color: var(--accent); }
}
