/* ============================================
   NIVEAU 5 — Les Fonctions CSS
   Styles spécifiques à ce chapitre
   ============================================ */

/* --- Démos de fonctions --- */
.demo-calc {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.demo-calc .barre {
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0 1rem;
}

/* Démos couleurs */
.demo-couleurs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.demo-couleurs .echantillon {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: var(--ombre);
}

/* Démos gradients */
.demo-gradient {
  height: 80px;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Démos clamp / fluid */
.demo-fluid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.demo-fluid .texte-fluid {
  background: #eff6ff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border-left: 4px solid #2563eb;
  resize: horizontal;
  overflow: auto;
}

/* Démo var() */
.demo-var {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.demo-var .var-box {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Tableau de référence rapide */
.tableau-ref td:first-child {
  font-family: var(--police-code);
  font-weight: 600;
  color: var(--couleur-secondaire);
  white-space: nowrap;
}

.tableau-ref td:last-child {
  font-family: var(--police-code);
  font-size: 0.8rem;
  color: var(--couleur-texte-clair);
}

/* Grille d'exercices */
.exercice-combine {
  background: var(--couleur-blanc);
  border: 2px dashed var(--couleur-secondaire);
  border-radius: var(--rayon);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.exercice-combine .exo-titre {
  font-weight: 700;
  color: var(--couleur-secondaire);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
