/* ================================
   ARTICLE SCOPE — CLEAN CODE CH6
   Scope: .clean-code-ch6
================================ */

.clean-code-ch6 {
  --primary-color: #efb93d;
  --secondary-color: #777;
  --dark-color: #333;
  --light-color: #f9f9f9;

  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
}

/* Container */
.clean-code-ch6.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Titles */
.clean-code-ch6 h1 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  line-height: 1.3;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 15px;
}

.clean-code-ch6 h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.clean-code-ch6 h2::before {
  content: "";
  width: 8px;
  height: 25px;
  background-color: var(--primary-color);
  margin-right: 12px;
}

.clean-code-ch6 h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

/* Text */
.clean-code-ch6 p {
  font-size: 1.05rem;
  margin-bottom: 15px;
  text-align: justify;
}

.clean-code-ch6 ul,
.clean-code-ch6 ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.clean-code-ch6 li {
  margin-bottom: 10px;
}

/* Code inline */
.clean-code-ch6 code {
  background-color: var(--light-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #d63384;
}

/* Code blocks */
.clean-code-ch6 pre {
  background-color: var(--light-color);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: monospace;
}

/* Highlight box */
.clean-code-ch6 .highlight-box {
  background-color: rgba(239, 185, 61, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  margin: 25px 0;
  border-radius: 0 5px 5px 0;
}

/* Implementation example */
.clean-code-ch6 .implementation-example {
  background-color: var(--light-color);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

/* Summary */
.clean-code-ch6 .summary-box {
  background-color: var(--light-color);
  padding: 25px;
  border-radius: 8px;
  margin: 40px 0 20px;
}

/* ================================
   SVG — FIX WORDPRESS BUGS
================================ */

.clean-code-ch6 .svg-container {
  width: 100%;
  max-width: 500px;
  margin: 30px auto;
  overflow: visible;
}

.clean-code-ch6 svg {
  width: 100%;
  height: auto;
  min-height: 250px; /* évite collapse WP */
  display: block;
}

/* Text inside SVG */
.clean-code-ch6 svg text {
  fill: #333;
  font-family: "Montserrat", Arial, sans-serif;
}

/* ================================
   Responsive
================================ */

@media (max-width: 768px) {
  .clean-code-ch6 h1 {
    font-size: 1.8rem;
  }
  .clean-code-ch6 h2 {
    font-size: 1.5rem;
  }
  .clean-code-ch6 h3 {
    font-size: 1.2rem;
  }

  .clean-code-ch6 .svg-container {
    max-width: 100%;
  }
}
