/* Polices auto-hébergées (OFL, licences dans fonts/), aucun appel externe. */
@font-face {
  font-family: "Inter";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/inter-300.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root {
  --fond: #f7f7f5;
  --texte: #1c1f24;
  --discret: #6b7280;
  --accent: #2f6fb2;
  --points: rgba(28, 31, 36, 0.13);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #121418;
    --texte: #e6e8eb;
    --discret: #8b929c;
    --accent: #6ea8e0;
    --points: rgba(230, 232, 235, 0.09);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Fond : grille de points pâle, façon plan, qui s'estompe vers les bords. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--points) 1px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
}

main { text-align: center; }
.domaine {
  color: var(--discret);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}
h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0.6rem 0 1.4rem;
}
hr {
  width: 48px;
  height: 2px;
  border: 0;
  background: var(--accent);
  margin: 0 auto 1.4rem;
}
.axes, .technos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.axes {
  gap: 0.4rem 1.6rem;
  color: var(--discret);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
/* Technologies : petites étiquettes mono, séparées par un point dessiné. */
.technos {
  margin-top: 2.2rem;
  gap: 0.4rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--discret);
  opacity: 0.85;
}
.technos li { display: flex; align-items: center; }
.technos li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 0.9rem;
}

/* Page 404 */
.retour a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
}
.retour a:hover, .retour a:focus-visible { border-bottom-color: var(--accent); }

/* Titre : apparition (fondu, montée, resserrement des lettres) puis reflet
   lumineux qui balaie le texte toutes les 3 s. CSS pur (la CSP interdit tout JS). */
h1 {
  background: linear-gradient(100deg,
    var(--texte) 0%, var(--texte) 40%,
    var(--accent) 50%,
    var(--texte) 60%, var(--texte) 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    apparition 1.4s cubic-bezier(.2, .7, .2, 1) both,
    reflet 3s ease-in-out 1.6s infinite;
}
hr { animation: trait 1s cubic-bezier(.2, .7, .2, 1) .6s both; }
.domaine, .axes, .technos, .retour { animation: fondu 1.2s ease .3s both; }
.axes { animation-delay: .9s; }
.technos, .retour { animation-delay: 1.2s; }

@keyframes apparition {
  from { opacity: 0; transform: translateY(12px); letter-spacing: .18em; }
  to   { opacity: 1; transform: none; letter-spacing: .02em; }
}
@keyframes reflet {
  0%   { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}
@keyframes trait {
  from { width: 0; opacity: 0; }
  to   { width: 48px; opacity: 1; }
}
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  h1, hr, .domaine, .axes, .technos, .retour { animation: none; }
}
