/* Trace-moi — complète css/style.css, memoire/memoire.css et jeux.css */

.details-niveaux {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .25rem;
  font-size: .85rem; color: var(--cream-doux);
  text-align: left;
}
.details-niveaux strong { color: var(--gold-light); font-weight: 600; }

.ecran-trace { gap: .7rem; min-height: 0; }
.ecran-trace .etat { text-align: center; }
.mode-envers {
  margin: -.3rem 0 0;
  padding: .2rem .8rem; border-radius: 999px;
  font-family: var(--display); font-size: .8rem; letter-spacing: .08em;
  color: #1a1c2c; background: linear-gradient(180deg, #ffc2cf, #ff6b8a); font-weight: 800;}

/* Couleurs de la suite (comme les pastilles de Simon) */
.pastilles {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem;
  min-height: 1.6rem;
}
.pastilles li {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .62rem; font-weight: 700; color: #0c0d1c;
  background: var(--c);
  opacity: .35;
  transition: transform .2s ease, opacity .2s ease;
}
.pastilles li.courant { opacity: 1; transform: scale(1.25); box-shadow: 0 0 14px var(--c); }
.pastilles li.fait { opacity: .9; }
.pastilles li.rate { outline: 2px solid #ff6b8a; outline-offset: 2px; }

/* Zone de dessin : carrée, toujours visible en entier */
.toile-cadre {
  position: relative;
  width: min(100%, calc(100svh - 23rem));
  min-width: min(100%, 17rem);
  aspect-ratio: 1;
}
#toile {
  display: block;
  width: 100%; height: 100%;
  border-radius: 18px;
  border: 2px solid rgba(255, 210, 63, .55);
  background:
    radial-gradient(circle at 50% 30%, rgba(123, 92, 255, .28), transparent 70%),
    #0c0d1c;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .6);
  /* pas de défilement ni de zoom quand on dessine au doigt */
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}
#toile.a-vous {
  cursor: crosshair;
  border-color: var(--gold-light);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .6), 0 0 26px rgba(255, 210, 63, .35);
}

/* Note affichée après chaque tracé */
.bulle {
  position: absolute; left: 50%; top: 1rem;
  margin: 0;
  transform: translate(-50%, -6px);
  padding: .3rem 1rem; border-radius: 999px;
  font-family: var(--display); font-size: clamp(1.1rem, 4vw, 1.6rem);
  background: rgba(12, 13, 28, .85);
  border: 1px solid currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; font-weight: 800;}
.bulle.visible { opacity: 1; transform: translate(-50%, 0); }
.bulle.top { color: var(--gold-light); }
.bulle.ok { color: #7ee2a8; }
.bulle.rate { color: #ff8fa6; }

.bouton-contour.petit { padding: .55rem 1.2rem; font-size: .8rem; }

@media (max-width: 34rem) {
  .toile-cadre { width: 100%; }
  .details-niveaux { font-size: .8rem; }
}
