/* Page: Logiciel pour la distribution d'électricité (/distribution-electricite) */
/* Loaded after style_qe.css, reuses its #qe-v2 base layout */

#qe-v2 #banniere.banniere-dist {
  background:
    linear-gradient(rgba(6, 82, 138, 0.82), rgba(6, 82, 138, 0.82)),
    url('../images_common/banner-distribution-electricite.webp') no-repeat center;
  background-size: cover;
}

#qe-v2 #banniere.banniere-dist #qe-texte-intro h1 {
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -1.5px;
}

#qe-v2 #banniere.banniere-dist .v2-btn-primary.v2-btn-lg {
  letter-spacing: normal;
}

/* Section header: title + green divider + optional lead */
#qe-v2 .dist-section-head {
  text-align: center;
  margin: 0 auto 45px auto;
  max-width: 1100px;
}

#qe-v2 .dist-section-intro .dist-section-head {
  margin-top: 100px;
}

#qe-v2 .dist-section-head .v2-section-title {
  margin-bottom: 18px;
}

#qe-v2 .dist-divider {
  display: block;
  width: 80px;
  height: 3px;
  margin: 0 auto;
  border-radius: 2px;
  background-color: #8cc047;
}

#qe-v2 .dist-section-head .dist-section-lead {
  font-size: 18px;
  color: #555555;
  margin: 25px 0 0 0;
}

#qe-v2 .dist-text-block {
  margin-bottom: 40px;
  text-align: justify;
}

#qe-v2 .dist-text-block p {
  font-size: 18px;
}

#qe-v2 .dist-rounded-img {
  border-radius: 14px;
  object-fit: cover;
}

/* Card grids */
#qe-v2 .dist-grid {
  display: grid;
  gap: 24px;
}

#qe-v2 .dist-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

#qe-v2 .dist-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 3 columns, last row centered (flex instead of grid) */
#qe-v2 .dist-grid-3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#qe-v2 .dist-grid-3 > .dist-card {
  flex: 0 1 calc((100% - 48px) / 3);
}

/* Cards */
#qe-v2 .dist-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

#qe-v2 .dist-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #555555;
  margin: 0;
}

#qe-v2 .dist-card-bordered {
  border: 1px solid #e5e7eb;
}

#qe-v2 .dist-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.35;
  margin-bottom: 12px;
}

#qe-v2 .dist-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 8px;
  background-color: #e3f2fb;
  color: #0478b2;
}

#qe-v2 .dist-card-module {
  min-height: 250px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

#qe-v2 .dist-card-module .dist-card-title,
#qe-v2 .dist-card-case .dist-card-title {
  font-size: 22px;
  color: #0478b2;
}

#qe-v2 .dist-card-module p {
  font-size: 16px;
  margin-bottom: 22px;
}

#qe-v2 .dist-card-link {
  margin-top: auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #0478b2;
  text-decoration: underline;
  align-self: flex-start;
}

#qe-v2 .dist-card-link:hover {
  color: #035a86;
}

#qe-v2 .dist-card-case {
  padding: 18px 18px 30px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

#qe-v2 .dist-card-case .dist-card-title {
  margin-top: 22px;
}

#qe-v2 .dist-card-case p {
  font-size: 16px;
  text-align: justify;
}

#qe-v2 .dist-case-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

#qe-v2 .dist-arrow {
  margin-left: 8px;
}

#qe-v2 .v2-section-cta.center-align {
  margin-top: 45px;
}

/* FAQ accordion (native details/summary) */
#qe-v2 .dist-faq {
  max-width: 960px;
  margin: 0 auto;
}

#qe-v2 .dist-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 14px;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
}

#qe-v2 .dist-faq-item[open] {
  background-color: #f5f8fc;
}

#qe-v2 .dist-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  cursor: pointer;
  list-style: none;
}

#qe-v2 .dist-faq-question::-webkit-details-marker {
  display: none;
}

#qe-v2 .dist-faq-question::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: #2d3748;
}

#qe-v2 .dist-faq-item[open] .dist-faq-question {
  color: #0478b2;
}

#qe-v2 .dist-faq-item[open] .dist-faq-question::after {
  content: '\2212';
  color: #0478b2;
}

#qe-v2 .dist-faq-answer {
  padding: 0 22px 20px 22px;
}

#qe-v2 .dist-faq-answer p {
  font-size: 16px;
  color: #555555;
  margin: 0;
}

#footer-links-section.dist-footer-links {
  background-color: #f0f0f0;
}

@media (max-width: 1200px) {
  #qe-v2 .dist-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  #qe-v2 .dist-section-intro .dist-section-head {
    margin-top: 70px;
  }

  #qe-v2 .dist-grid-2 {
    grid-template-columns: 1fr;
  }

  #qe-v2 .dist-grid-3 > .dist-card {
    flex-basis: calc((100% - 24px) / 2);
  }

  #qe-v2 .dist-card-module {
    min-height: 0;
  }
}

@media (max-width: 576px) {
  #qe-v2 .dist-grid-4 {
    grid-template-columns: 1fr;
  }

  #qe-v2 .dist-grid-3 > .dist-card {
    flex-basis: 100%;
  }

  #qe-v2 .dist-faq-question {
    padding: 16px 18px;
    font-size: 15px;
  }
}
