@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-ext-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-ext-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-ext-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: var(--line-h);
  letter-spacing: 0;
}

body {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
textarea,
select {
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

button:disabled {
  color: var(--text-dim);
  cursor: default;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover,
button:not(:disabled):hover {
  color: var(--text);
  background: var(--bg-raised);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

input,
textarea,
select {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  caret-color: var(--accent);
}

input:focus,
textarea:focus,
select:focus {
  border-bottom-color: var(--accent);
}

textarea {
  resize: vertical;
}

select option {
  color: var(--text);
  background: var(--bg);
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

[hidden] {
  display: none !important;
}

.dim {
  color: var(--text-dim);
}

.error {
  color: var(--danger);
}

.boot {
  margin: 2lh 2ch;
  color: var(--text-dim);
}

.cursor-field {
  position: relative;
  min-width: 0;
}

.cursor-field::after {
  content: "";
  display: none;
  position: absolute;
  width: 1ch;
  height: 1em;
  background: var(--accent);
  pointer-events: none;
  animation: cursor-blink 1.4s step-end infinite;
}

.cursor-field:focus-within.empty::after {
  display: block;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-field::after {
    animation: none;
  }
}

/* Champs de saisie : au focus, un soulignement vert épais au lieu d'un cadre (comme le champ du chat). */
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--accent);
}
