/* ============================================
   CHAPITRE 11 — L'héritage
   Styles spécifiques à ce chapitre
   ============================================ */

/* --- Démonstrations héritage --- */
.demo-heritage-1,
.demo-heritage-2,
.demo-heritage-3,
.demo-heritage-4,
.demo-heritage-5,
.demo-heritage-6,
.demo-heritage-7 {
  background-color: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  padding: 1.25rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* --- Démonstration 1 : héritage couleur --- */
.demo-heritage-1 .parent-rouge {
  color: #dc2626;
  font-size: 18px;
  line-height: 1.6;
}

.demo-heritage-1 .parent-rouge span {
  display: block;
  margin-top: 0.5rem;
}

.demo-heritage-1 .parent-rouge > div {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fef2f2;
  border-radius: 4px;
}

/* --- Démonstration 2 : non héritage margin --- */
.demo-heritage-2 .parent-margin {
  padding: 15px;
  background: #e2e8f0;
  border-radius: 6px;
}

.demo-heritage-2 .enfant {
  border-radius: 4px;
  margin-top: 8px;
}

/* --- Démonstration 3 : inherit --- */
.demo-heritage-3 .container-couleur {
  color: #7c3aed;
  font-family: 'Georgia', serif;
  font-size: 18px;
  padding: 12px;
  background: #f5f3ff;
  border-radius: 6px;
}

.demo-heritage-3 .link-purple {
  margin-top: 8px;
  padding: 8px;
  background: #ede9fe;
  border-radius: 4px;
}

.demo-heritage-3 .link-purple a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

/* --- Démonstration 4 : initial --- */
.demo-heritage-4 .parent-style {
  color: #dc2626;
  font-size: 24px;
  font-weight: bold;
  line-height: 2;
  padding: 12px;
  background: #fef2f2;
  border-radius: 6px;
}

.demo-heritage-4 .enfant-reset {
  padding: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin-top: 8px;
}

/* --- Démonstration 5 : unset --- */
.demo-heritage-5 .parent-unset {
  color: #16a34a;
  padding: 20px;
  background: #e2e8f0;
  border-radius: 6px;
  font-weight: 600;
}

.demo-heritage-5 .parent-unset p {
  margin-bottom: 8px;
}

.demo-heritage-5 .enfant-unset {
  border: 1px dashed #94a3b8;
  padding: 10px;
  border-radius: 4px;
  margin-top: 8px;
}

.demo-heritage-5 .enfant-unset p {
  margin-bottom: 0;
}

/* --- Démonstration 6 : navigation héritée --- */
.demo-heritage-6 nav {
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  color: #e2e8f0;
}

.demo-heritage-6 nav a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 8px 16px;
  border-radius: 4px;
}

.demo-heritage-6 nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Démonstration 7 : all unset --- */
.demo-heritage-7 p:first-child {
  margin-bottom: 12px;
}

.demo-heritage-7 .composant-isole {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.demo-heritage-7 .composant-isole p {
  margin-bottom: 0;
  font-size: 14px;
  color: #666;
}
