/* R-no Toolbox — thème unique, très sombre, façon terminal.
   Aucune police téléchargée : la pile monospace du système suffit, et la page
   ne dépend de rien d'extérieur. */

:root {
  --fond: #0a0c0d;
  --texte: #d6dde0;
  --discret: #4a5459;
  /* Texte secondaire lisible (descriptions) : --discret est réservé aux
     traits et aux repères, trop sombre pour du texte à lire. */
  --attenue: #7d898f;
  --accent: #3ddc84;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
          "Liberation Mono", "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 16px 0;
}

.avatar {
  display: block;
  width: min(240px, 50vw);
  height: auto;
  border-radius: 14px;
  /* Un filet à peine plus clair que le fond détache l'image sans cadre. */
  box-shadow: 0 0 0 1px #1c2226;
}

h1 {
  margin: 0;
  font-size: clamp(1.25rem, 4.5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.invite {
  color: var(--accent);
  margin-right: 0.35em;
}

/* Curseur en bloc, clignotement franc (steps) comme dans un vrai terminal. */
.curseur {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.15em;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: clignote 1.1s steps(1, end) infinite;
}

@keyframes clignote {
  50% { opacity: 0; }
}

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

/* --- Arborescence des outils --------------------------------------------
   Une famille par dossier repliable (<details>), ses outils en branches.
   Les traits de l'arbre sont dessinés en CSS (bordures), pas avec des
   caractères ├── : les lecteurs d'écran n'ont rien à épeler. */

.arbre {
  width: min(100%, 520px);
  font-size: 0.95rem;
}

.arbre ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arbre summary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 2px 0;
  cursor: pointer;
  list-style: none;
}

.arbre summary::-webkit-details-marker { display: none; }

/* Repère ouvert / fermé, décoratif : l'état est porté par <details>. */
.arbre summary::before {
  content: "▸";
  width: 1em;
  color: var(--discret);
}

.arbre details[open] > summary::before { content: "▾"; }

.arbre .dossier { color: var(--texte); }
.arbre summary:hover .dossier,
.arbre summary:focus-visible .dossier { color: var(--accent); }
.arbre summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.arbre .compte {
  color: var(--attenue);
  font-size: 0.8em;
}

/* Les branches : └ pour le dernier outil, ├ et │ pour les autres. */
.arbre details > ul {
  margin: 4px 0 6px 0.45em;
}

.arbre details li {
  position: relative;
  padding: 3px 0 3px 1.6em;
}

.arbre details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.1em;
  height: 0.95em;
  border-left: 1px solid var(--discret);
  border-bottom: 1px solid var(--discret);
}

.arbre details li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  bottom: 0;
  border-left: 1px solid var(--discret);
}

.arbre details li:last-child::after { display: none; }

.arbre a {
  color: var(--texte);
  text-decoration: none;
}

.arbre a:hover, .arbre a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.arbre .desc {
  margin-left: 0.8em;
  color: var(--attenue);
  font-size: 0.85em;
}

/* Sur un écran étroit, la description passe sous le nom de l'outil. */
@media (max-width: 480px) {
  .arbre .desc { display: block; margin-left: 0; }
}

footer {
  padding: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--discret);
}
