  :root {
    --bg: #0c0920;
    --ink: #f6f2ff;
    --blob-a: #5b3df5;
    --blob-b: #ff4fa3;
    --blob-c: #ffb38a;
    --blob-opacity: .55;
    color-scheme: dark;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  @font-face {
  font-family: "brico";
  src: url("font/fontbg.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #f4f0ff;
      --ink: #1a1240;
      --blob-opacity: .5;
      color-scheme: light;
    }
  }
  :root[data-theme="light"] { --bg: #f4f0ff; --ink: #1a1240; --blob-opacity: .5; color-scheme: light; }
  :root[data-theme="dark"]  { --bg: #0c0920; --ink: #f6f2ff; color-scheme: dark; }

  *, *::before, *::after { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'brico';
    overflow: hidden;
    display: grid;
    place-items: center;
    position: relative;
  }

  /* Lumière de fond : trois masses colorées qui dérivent lentement */
  .glow { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
  .glow i {
    position: absolute;
    width: 55vmax; height: 55vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: var(--blob-opacity);
    will-change: transform;
  }
  .glow i:nth-child(1) { background: var(--blob-a); left: -15vmax; top: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
  .glow i:nth-child(2) { background: var(--blob-b); right: -18vmax; bottom: -20vmax; animation: drift2 31s ease-in-out infinite alternate; }
  .glow i:nth-child(3) { background: var(--blob-c); width: 30vmax; height: 30vmax; left: 38%; top: 55%; opacity: calc(var(--blob-opacity) * .6); animation: drift3 22s ease-in-out infinite alternate; }
  @keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
  @keyframes drift2 { to { transform: translate(-16vmax, -12vmax) scale(.9); } }
  @keyframes drift3 { to { transform: translate(-22vmax, -18vmax) scale(1.3); } }

  /* Grain pour casser l'aspect numérique */
  .grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: .16; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  }

  h1 {
    position: relative; z-index: 2;
    margin: 0;
    padding: 0 5vw;
    text-align: center;
    font-weight: 400;
    font-size: clamp(2.9rem, 15.5vw, 13rem);
    line-height: .92;
    letter-spacing: -.035em;
    font-variation-settings: "wdth" 88, "opsz" 96;
    user-select: none;
    touch-action: none;
  }
  h1 .line { display: block; white-space: nowrap; }
  h1 .ch {
    display: inline-block;
    font-weight: 300;
    transition: none;
    opacity: 0;
    transform: translateY(.35em);
    animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: calc(var(--i) * 55ms + 150ms);
  }
  @keyframes rise { to { opacity: 1; transform: none; } }

  @media (prefers-reduced-motion: reduce) {
    .glow i { animation: none; }
    h1 .ch { animation: none; opacity: 1; transform: none; font-weight: 600; }
  }