/* Site public : fond dégradé rouge de la feuille de style d'origine. */
body { background: radial-gradient(circle, #8c0000, #300000); }

/* ---------------------------------------------------------------------------
   Fond animé (public/life.js)
   Ces règles étaient injectées par le script d'origine dans une balise <style>.
   La politique de sécurité du site interdit les styles en ligne : elles sont ici.
   --------------------------------------------------------------------------- */
#life-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}
#life-toggle {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  z-index: 5;
  user-select: none;
  transition: opacity 0.2s, background 0.2s;
  opacity: 0.5;
  font-family: Arial, sans-serif;
}
#life-toggle:hover { opacity: 1; background: rgba(0, 0, 0, 0.4); }
#life-panel {
  position: fixed;
  bottom: 48px;
  right: 14px;
  width: 190px;
  z-index: 5;
  background: rgba(30, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: Arial, sans-serif;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  backdrop-filter: blur(4px);
  display: none;
}
#life-panel.open { display: block; }
#life-panel label { display: block; margin: 8px 0 0; }
#life-panel label:first-child { margin-top: 0; }
#life-panel .row { display: flex; justify-content: space-between; align-items: baseline; }
#life-panel .val { opacity: 0.6; font-size: 11px; }
#life-panel input[type="range"] { width: 100%; margin-top: 3px; accent-color: #e04a3a; }
#life-panel .reset {
  margin-top: 12px;
  width: 100%;
  padding: 4px 0;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  cursor: pointer;
}
#life-panel .reset:hover { background: rgba(255, 255, 255, 0.15); }

/* --- Test live : terminal simulé --- */
.statement { white-space: pre-line; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
ul.checks { list-style: none; padding-left: 0; }
ul.checks li { padding: 3px 0; }
ul.checks .mark { display: inline-block; width: 1.4em; font-weight: bold; color: var(--muted); }
ul.checks li.ok { color: var(--good); }
ul.checks li.ok .mark { color: var(--good); }
.term {
  background: #111;
  color: #e6e6e6;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
  font-family: "DejaVu Sans Mono", "Liberation Mono", Consolas, Menlo, monospace;
  font-size: 15px;
  cursor: text;
}
.term .screen {
  background: transparent;
  color: inherit;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  font-size: inherit;
}
.term-line { display: flex; align-items: baseline; margin: 0; }
.term-line .prompt { white-space: pre; color: #7fd37f; }
.term-line input[type="text"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: inherit;
  border: 0;
  outline: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  caret-color: #e6e6e6;
}
.term-line button { margin-left: 8px; }
.term .solved { color: #7fd37f; cursor: default; background: transparent; border: 0; border-top: 1px solid #333; border-radius: 0; padding: 8px 0 0; margin-top: 8px; }
.term .solved p { margin: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.actions form { margin: 4px 0; }

/* --- Accueil : deux gros boutons carrés, Quizz et Shell --- */
.modes { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; margin: 26px 0 10px; }
a.mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 190px;
  height: 190px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s, background 0.12s;
}
a.mode:hover, a.mode:focus-visible { background: var(--accent-dark); transform: translateY(-3px); }
.mode-icon { font-family: "DejaVu Sans Mono", "Liberation Mono", Consolas, Menlo, monospace; font-size: 46px; line-height: 1; opacity: 0.9; }

/* --- Réglages d'une partie (Quizz, Shell) : contenu centré --- */
.setup { text-align: center; }
.setup fieldset.toggles { justify-content: center; }
.setup fieldset legend { margin: 0 auto; padding: 0 6px; }

/* --- Pendant une partie : état à gauche, menu « Options » à droite --- */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.game-head .status { margin: 0; }
.game-menu summary { padding: 4px 30px 4px 12px; }
.game-menu .dropdown { min-width: 230px; }

/* Bouton « Indice » : discret, dans le coin haut droit du terminal ou de la question. */
.panel { position: relative; }
.term { position: relative; }
.hint-corner { position: absolute; top: 8px; right: 8px; margin: 0; z-index: 2; }
button.hint {
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 2px 10px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
button.hint:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.panel .hint-corner + pre.terminal, .term .hint-corner + .screen { padding-right: 80px; }
.term .solved ul.unlocked { list-style: none; padding: 0; margin: 6px 0; }
.term .solved ul.unlocked li { color: #ffd76a; }
.term .solved form { margin: 8px 0 2px; }
