/*V:\clic\clic_core.css*/
/* =========================================================
   Mini UI — SC@LPA (élève)
   Base visuelle légère, autonome, stable
========================================================= */

/* ===================== GLOBAL ===================== */

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f8f9fa;
  margin: 0;
  color: #212529;
}

/* ===================== LAYOUT ===================== */

.container {
  max-width: 900px;
  margin: auto;
  padding: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,.08);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.exercise {
  margin-bottom: 2rem;
}

/* ===================== TITRES & TEXTE ===================== */

h2 {
  margin-bottom: .3rem;
}

.small {
  font-size: .9rem;
  color: #666;
  padding-bottom: 1rem;
}

/* ===================== HERO ===================== */

.hero {
  background: linear-gradient(120deg, #0d6efd, #0b5ed7);
  color: white;
  padding: 2.2rem 0 2.5rem;
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0;
  font-size: 1.9rem;
}

.hero .lead {
  margin-top: .6rem;
  font-size: 1.05rem;
  opacity: .95;
}

/* ===================== BLOCS MÉTIERS ===================== */

.instruction {
  background: #e7f1ff;
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}

.alert {
  background: #d1e7dd;
  border-radius: .75rem;
  padding: .75rem 1rem;
}

.mode {
  margin-top: .5rem;
  font-size: .9rem;
  color: #555;
}

/* ===================== CONTROLES ===================== */

.controls {
  margin-bottom: 1.5rem;
}

.actions {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ===================== BOUTONS ===================== */

button {
  padding: .45rem .9rem;
  border-radius: .6rem;
  border: 1px solid #0d6efd;
  background: #0d6efd;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: opacity .15s ease;
}

button#restartBtn {
  background: #fff;
  color: #0d6efd;
}

button:hover {
  opacity: .9;
}

/* ===================== BADGES ===================== */

.badge {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: .6rem;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
}

/* ===================== ZONES ===================== */

#resultZone {
  margin-top: 1rem;
}

.footer {
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
  padding: .8rem 0;
  font-size: .85rem;
  color: #666;
}

/* =========================================================
   CLIC — CSS Élève
   Interface de résolution de l'exercice
========================================================= */

/* ===================== TEXTE & TOKENS ===================== */

#tokens {
  white-space: pre-wrap;
  margin-top: .8rem;
  line-height: 1.6;
}

#tokens span {
  cursor: pointer;
  padding: 2px 5px 4px;
  margin: 1px 0;
  display: inline-block;
  border-radius: 8px;
  user-select: none;
}

#tokens span.locked {
  cursor: default;
  opacity: .95;
}

#tokens span.partial {
  outline: 2px dashed rgba(0,0,0,.35);
}

#tokens span.selected {
  background: #fff3cd;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15) inset;
}

/* ===================== BARRE DE COMPÉTENCES ===================== */

#competenceBar {
  margin-bottom: .6rem;
}

#competenceBar button.active {
  background: chocolate !important;
  color: #000 !important;
  border-color: #0d6efd !important;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.15),
    0 0 0 2px rgba(13,110,253,.45);
  transform: translateY(-1px);
}

/* ===================== PASTILLE COMPTEUR ===================== */

.comp-count {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .45rem;
  border-radius: 999px;

  background: rgba(0,0,0,.25);
  color: #fff;

  font-size: .75rem;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

#competenceBar button.active .comp-count {
  background: rgba(0,0,0,.35);
}

/* ===================== AÉRATION PÉDAGOGIQUE ===================== */

.controls     { margin-bottom: 1rem; }
#progressInfo { margin-bottom: .6rem; }
.actions      { margin-top: 1rem; }
