body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #2c3e50;
  line-height: 1.6;
}

h1 {
  font-size: 2rem;
  color: #34495e;
  margin: 20px auto;
  padding: 0 25px;
  max-width: 1200px;
}

.articles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 25px 40px 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.article {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.img-article-little-banner {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-title {
  text-decoration: none;
  color: #34495e;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 15px 25px 5px 25px;
  transition: color 0.3s;
  height: 3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-title:hover {
  color: #1abc9c;
}

.article-description {
  padding: 5px 25px 15px 25px;
  flex: 1;
  font-size: 0.9rem;
  color: #555;
}

.article::after {
  content: "Article";
  position: absolute;
  top: 15px;
  right: 15px;
  background: #1abc9c;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz::after {
  content: "Quiz";
  background: #2980b9; /* bleu vif */
  color: #fff; /* pour être sûr que le texte reste lisible */
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }

  .articles-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .article {
    margin-bottom: 20px;
  }
}

.main-header {
  display: flex;
  justify-content: space-between;
  height: 54px;
  padding: 8px 20px 0 20px;
  flex-wrap: wrap;
  position: fixed;
  top: 0;
  background-color: #2c3e50;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #ecf0f1;
}

.menu-toggle,
.menu-close-btn {
  background: none;
  color: inherit;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  margin-right: 20px;
  padding-right: 10px;
}

.menu-toggle {
  display: none;
}

.main-nav {
  display: flex;
  list-style: none;
  margin-right: 20px;
  padding-right: 10px;
  align-items: center;
  height: 20px;
}

.main-nav li {
  margin-left: 25px;
}

.main-nav a,
.second-nav a {
  text-decoration: none;
  font-size: 19px;
  color: #ecf0f1;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-right: 20px;
}

.logo {
  font-size: 30px;
  font-weight: 600;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ecf0f1;
}

.logo-link svg {
  margin-right: 5px;
}

#logo-link {
  text-decoration: none;
  color: #ecf0f1;
  font-weight: 600;
}

#logo-link:active {
  text-decoration: none;
  color: #ecf0f1;
}

#logo-link:hover {
  text-decoration: none;
  color: #ecf0f1;
}

.menu {
  display: none;
  position: fixed;
  width: 100%;
  top: 0;
}

.second-nav {
  list-style: none;
  padding: 10px 20px;
  background-color: #2c3e50;
  z-index: 3;
}

.second-nav li {
  margin-bottom: 10px;
}

.menu.active {
  display: block;
  margin-top: 50px;
}

.menu-close-btn-container {
  justify-content: flex-end;
  display: flex;
  width: 100%;
}

.container {
  max-width: 1100px;
  margin: 75px auto 10px auto;
  padding: 0 15px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.img-article-top-banner {
  width: 90%;
  height: 50vh;
  object-fit: cover;
  margin: 20px auto;
  display: flex;
  border-radius: 12px;
}

article header h1 {
  font-weight: 700;
  color: #10032c;
  text-align: center;
}

.publication-date {
  color: #666;
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  text-align: right;
}

.introduction p {
  color: #34495e;
  padding: 10px 15px;
}

.content h2,
.sources h2,
.tags h2 {
  font-size: 1.5rem;
  margin: 35px 15px 10px;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 5px;
}

.content h3,
.sources h3,
.content h4 {
  margin: 20px 15px 10px;
}

.content p,
.content ul,
.sources a {
  margin: 10px 15px 10px;
}

ul {
  list-style: none !important;
  margin-left: 15px !important;
  padding: 0 !important;
}

.content ul {
  list-style: disc;
  padding-left: 40px;
}

.content li {
  margin-bottom: 5px;
}

pre {
  background: #f1f8ff;
  color: #2c3e50;
  padding: 20px;
  margin: 20px 15px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3498db;
}

code {
  background: none;
  font-family: "Courier New", Courier, monospace;
  font-size: inherit;
  padding: 0 2px;
  border-radius: 3px;
  display: inline;
}

.code-explain {
  color: #c14d00;
  background: rgb(241, 248, 255);
}

.custom-list {
  margin-bottom: 12px;
}

.custom-list::before {
  content: "→";
  margin-right: 0.5em;
  color: #3498db;
  list-style-position: inside;
}

.question {
  border: 5px solid #eefbfb;
  padding: 10px;
  margin-bottom: 25px;
  border-radius: 16px;
}
.question h3 {
  margin-top: 5px;
}

.featured-resource {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin: 30px 15px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  align-items: center;
  justify-content: space-between;
}

.featured-resource p {
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 7;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}

.resource-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.resource-image {
  width: 130px;
  height: auto;
  border-radius: 8px;
}

.resource-description {
  max-width: calc(100% - 140px);
  color: #34495e;
  line-height: 1.5;
}

.call-to-action {
  background-color: #d9ecff;
  padding: 25px 20px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 25px;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.call-to-action h2 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.4;
}

.call-to-action p {
  font-size: 16px;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .call-to-action {
    padding: 30px 15px;
  }

  .call-to-action h2 {
    font-size: 24px;
  }

  .call-to-action p {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .featured-resource {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .resource-container {
    flex-direction: column;
    gap: 10px;
  }

  .resource-image {
    width: 100%;
    max-width: 200px;
    height: auto;
  }

  .resource-description {
    max-width: 100%;
  }

  .cta-button {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .featured-resource {
    margin: 15px;
  }

  .cta-button {
    padding: 12px;
    font-size: 14px;
  }
}

.cta-button {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  color: #fff;
  background-color: #5e17eb;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  transition: background-color 0.3s ease-in-out;
}

.cta-button:hover {
  background-color: #3d0eb8;
}

.sources a,
.read-more {
  color: #337ab7;
  text-decoration: none;
}

.sources a:hover,
a:hover {
  text-decoration: none;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #eaf4fb;
  color: #374151;
  text-decoration: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  border: 2px solid transparent;
  margin-left: 25px;
}

.before-tag {
  margin-right: 0.25rem;
  color: #6b7280;
  font-weight: 600;
}

.tag-link:hover {
  background: #eaf4fb;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.tag-link:active {
  transform: translateY(0);
}

.tag-link:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

blockquote {
  border-left: 4px solid #1abc9c;
  background-color: #e6f7f1;
  margin: 20px 15px;
  padding: 1.2em 1.5em;
  font-style: italic;
  color: #2c3e50;
  font-size: 1.1em;
  font-family: "Georgia", serif;
  border-radius: 6px;
  box-shadow: 0 1.5px 5px rgba(26, 188, 156, 0.15);
  position: relative;
}

blockquote p {
  margin: 0 0 0.6em 0;
}

blockquote footer {
  font-style: normal;
  color: #16a085;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.95em;
}

.footer {
  color: #ffffff;
  background-color: #2c3e50;
  padding: 20px 0;
  margin-top: 40px;
}

.footer-container {
  max-width: 900px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer p {
  margin: 5px 0;
  font-size: 14px;
}

.footer-nav {
  margin-top: 10px;
}

.footer-nav a {
  color: #d35400;
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .main-nav li {
    margin-left: 0;
  }

  .img-article-banner {
    margin: 60px auto 5px auto;
  }

  .img-article-top-banner {
    width: 100%;
    height: 20vh;
  }
}

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }

  .nav-container {
    display: none;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    margin-top: 1rem;
  }

  .footer-nav a {
    display: block;
    margin: 5px 0;
  }
  .language-javascript,
  .language-html,
  .language-css,
  .language-bash {
    font-family: monospace, Courier, "Courier New";
  }

  .code-explain {
    word-break: break-all;
  }
}

.fiverr-affiliate-banner {
  display: flex;
  justify-content: space-around;
  margin: 20px auto 10px auto;
}

@media (max-width: 980px) {
  .fiverr-affiliate-banner {
    display: none;
  }
}
