/* maximekwk.fr — page d'attente.
   Aucune police à télécharger, aucun script : tout ce qui bouge est en CSS. */

:root {
  color-scheme: light dark;

  --bg: #f3f1eb;
  --fg: #151412;
  --muted: #5d5a54;
  --rule: #dcd8ce;
  --btn-bg: #151412;
  --btn-fg: #f3f1eb;
  --btn-hover: #000;
  --signal: #b06f00;

  /* Le panneau est un objet sombre, dans les deux thèmes. */
  --board: #131210;
  --board-edge: #23211d;
  --off: #23201b;
  --l1: #3b2b12;
  --l2: #5f4313;
  --on: #ffb000;
  --hot: #ffe3a3;
  --glow: rgb(255 176 0 / .45);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0a;
    --fg: #f1efe9;
    --muted: #9b978f;
    --rule: #22201d;
    --btn-bg: #f1efe9;
    --btn-fg: #0b0b0a;
    --btn-hover: #fff;
    --signal: #ffb000;
    --board: #141311;
    --board-edge: #2a2723;
  }
}

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

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

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--on); color: #151412; }

main, footer { width: 100%; max-width: 40rem; margin-inline: auto; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 11vh, 128px) clamp(40px, 7vh, 80px);
}

/* --- Panneau lumineux ------------------------------------------------ */

.board {
  padding: clamp(10px, 2.8vw, 22px);
  border: 1px solid var(--board-edge);
  border-radius: 14px;
  background: var(--board);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 28px 50px -30px rgb(0 0 0 / .6);
  contain: layout paint;
}

@media (prefers-color-scheme: dark) {
  .board { box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 0 90px -30px rgb(255 176 0 / .22); }
}

.dots {
  display: grid;
  grid-template-columns: repeat(42, 1fr);
  grid-template-rows: repeat(10, auto);
  grid-auto-flow: column;
  gap: clamp(1.5px, .55vw, 4px);
}

.dots i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--off);
}

.dots .a { --to: var(--l1); background: var(--l1); }
.dots .b { --to: var(--l2); background: var(--l2); }
.dots .x { background: var(--on); box-shadow: 0 0 6px var(--glow); }

/* Le mot s'écrit en vague, colonne après colonne, tient quelques
   secondes, s'efface et recommence : un chargement qui ne finit jamais.
   Sans animation (réglage « réduire les mouvements »), il reste allumé. */
.dots .a, .dots .b, .dots .x {
  animation: lit 11s ease-out infinite backwards;
  animation-delay: calc(var(--k, 0) * 55ms + var(--r, 0) * 28ms);
}
.dots .x { animation-name: lit-x; }

/* --r : ligne du point (0-9). --k : colonne (0-41), 10 points par colonne. */
.dots i:nth-child(10n+2){--r:1} .dots i:nth-child(10n+3){--r:2} .dots i:nth-child(10n+4){--r:3}
.dots i:nth-child(10n+5){--r:4} .dots i:nth-child(10n+6){--r:5} .dots i:nth-child(10n+7){--r:6}
.dots i:nth-child(10n+8){--r:7} .dots i:nth-child(10n+9){--r:8} .dots i:nth-child(10n+10){--r:9}

.dots i:nth-child(n+11){--k:1}   .dots i:nth-child(n+21){--k:2}   .dots i:nth-child(n+31){--k:3}
.dots i:nth-child(n+41){--k:4}   .dots i:nth-child(n+51){--k:5}   .dots i:nth-child(n+61){--k:6}
.dots i:nth-child(n+71){--k:7}   .dots i:nth-child(n+81){--k:8}   .dots i:nth-child(n+91){--k:9}
.dots i:nth-child(n+101){--k:10} .dots i:nth-child(n+111){--k:11} .dots i:nth-child(n+121){--k:12}
.dots i:nth-child(n+131){--k:13} .dots i:nth-child(n+141){--k:14} .dots i:nth-child(n+151){--k:15}
.dots i:nth-child(n+161){--k:16} .dots i:nth-child(n+171){--k:17} .dots i:nth-child(n+181){--k:18}
.dots i:nth-child(n+191){--k:19} .dots i:nth-child(n+201){--k:20} .dots i:nth-child(n+211){--k:21}
.dots i:nth-child(n+221){--k:22} .dots i:nth-child(n+231){--k:23} .dots i:nth-child(n+241){--k:24}
.dots i:nth-child(n+251){--k:25} .dots i:nth-child(n+261){--k:26} .dots i:nth-child(n+271){--k:27}
.dots i:nth-child(n+281){--k:28} .dots i:nth-child(n+291){--k:29} .dots i:nth-child(n+301){--k:30}
.dots i:nth-child(n+311){--k:31} .dots i:nth-child(n+321){--k:32} .dots i:nth-child(n+331){--k:33}
.dots i:nth-child(n+341){--k:34} .dots i:nth-child(n+351){--k:35} .dots i:nth-child(n+361){--k:36}
.dots i:nth-child(n+371){--k:37} .dots i:nth-child(n+381){--k:38} .dots i:nth-child(n+391){--k:39}
.dots i:nth-child(n+401){--k:40} .dots i:nth-child(n+411){--k:41}

@keyframes lit {
  0%        { background-color: var(--off); }
  2.5%      { background-color: var(--hot); }
  7%, 80%   { background-color: var(--to); }
  88%, 100% { background-color: var(--off); }
}

@keyframes lit-x {
  0%        { background-color: var(--off); box-shadow: 0 0 0 transparent; }
  2.5%      { background-color: var(--hot); box-shadow: 0 0 12px var(--glow); }
  7%, 80%   { background-color: var(--on);  box-shadow: 0 0 6px var(--glow); }
  88%, 100% { background-color: var(--off); box-shadow: 0 0 0 transparent; }
}

/* --- Texte ------------------------------------------------------------ */

.status {
  display: flex;
  align-items: center;
  gap: .7em;
  margin-top: 1.9rem;
  color: var(--muted);
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pulse {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 20%, transparent);
  animation: pulse 1.6s ease-in-out infinite;
}

.ellipsis::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  letter-spacing: 0;
  animation: ellipsis 1.8s steps(4, jump-none) infinite;
}

@keyframes pulse { 50% { opacity: .3; } }
@keyframes ellipsis { to { width: 3ch; } }

h1 {
  margin-top: .85rem;
  font-size: clamp(2.05rem, 1.25rem + 3.5vw, 3.55rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.032em;
  text-wrap: balance;
}

.lead {
  max-width: 33rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1.02rem, .96rem + .3vw, 1.15rem);
  text-wrap: balance;
}

/* --- Lien GitHub ------------------------------------------------------ */

.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.1rem;
  padding: .8rem 1.1rem .8rem 1rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease;
}

.cta:hover { background: var(--btn-hover); }
.cta:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.cta svg { flex: none; width: 1.1em; height: 1.1em; }
.cta .handle { font: 500 .8125rem/1 var(--mono); opacity: .62; }
.cta .arrow { transition: transform .2s ease; }
.cta:hover .arrow { transform: translateX(3px); }

@media (max-width: 359px) {
  .cta .handle { display: none; }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: .75rem/1.4 var(--mono);
}

@media (prefers-reduced-motion: reduce) {
  .dots i, .pulse, .ellipsis::after { animation: none; }
  .ellipsis::after { width: auto; }
  .cta, .cta .arrow { transition: none; }
}
