/* ============================================
   COMPÉTENCES ACCORDION — Archiprogramme
   ============================================ */

.elementor-widget-shortcode:has(.ap-competences),
.elementor-widget-container:has(.ap-competences) {
  overflow: visible !important;
  width: 100% !important;
}

.ap-competences {
  display: flex;
  flex-direction: column;
  width: 650px;
  margin: 0 auto;
}

.ap-competences__group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(14px, 1.8vw, 22px) 0;
}

.ap-competences__group:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Titre principal */
.ap-competences .ap-competences__group .ap-competences__title {
  font-family: 'Epilogue', sans-serif !important;
  font-size: clamp(24px, 2.4vw, 34px) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: block;
  line-height: 1.2 !important;
  transition: color 0.25s ease, -webkit-text-fill-color 0.25s ease, transform 0.25s ease, font-weight 0.1s ease;
  transform-origin: left center;
}

.ap-competences .ap-competences__group .ap-competences__title:hover {
  transform: scale(1.05);
}


/* Sous-items : cachés par défaut */
.ap-competences .ap-competences__subs {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 10% 0 0 !important;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.ap-competences .ap-competences__group:hover .ap-competences__subs {
  max-height: 300px;
  opacity: 1;
  overflow: visible;
}

.ap-competences .ap-competences__subs li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ap-competences .ap-competences__subs li::before,
.ap-competences .ap-competences__subs li::marker {
  display: none !important;
  content: none !important;
}

.ap-competences .ap-competences__subs li:first-child a {
  margin-top: 10px !important;
}

.ap-competences .ap-competences__subs a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  display: block;
  padding: 5px 0 !important;
  margin: 0 0 0 44px !important;
  transition: color 0.2s ease, font-weight 0.1s ease, transform 0.2s ease;
  transform-origin: left center;
}

.ap-competences .ap-competences__subs a:hover {
  --apc-sub: #0D0D0D;
  font-weight: 700 !important;
  transform: scale(1.05);
}

/* Mobile : tout affiché */
@media (max-width: 768px) {
  .ap-competences {
    max-width: 100%;
  }

  .ap-competences__group {
    padding: 16px 0;
  }

  .ap-competences .ap-competences__subs {
    max-height: none !important;
    opacity: 1 !important;
  }

  .ap-competences .ap-competences__subs a {
    padding: 4px 0 4px 16px !important;
  }

  .ap-competences .ap-competences__subs li:first-child a {
    margin-top: 8px !important;
  }
}
