/*
Theme Name: CFA Métiers Energies
Description: Thème du site CFA Métiers de l'Energie
Version: 1.0
Author: Guillaume Sourisseau / Astorya
Author URI: https://www.astorya.fr
Template: hello-elementor
*/
@media (max-width: 1067px) {
  .menu-principal-desktop {
      display: none!important;
      }
    }
.header-container > .e-con-inner {
  transition: all 0.5s;
}
.header-container .elementor-widget-image img {
  transition: all 0.5s;
}
.header-container .elementor-widget-image .menu-principal-desktop {
  transition: all 0.5s;
    position: relative;
    top: 0;
  }
.header-container.scroll-down {
  border-radius: 0 0 30px 30px;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
.header-container.scroll-down > .e-con-inner {
  padding: 15px 0;
}
.header-container.scroll-down .elementor-widget-image img {
  max-width: 120px;
}
.header-container.scroll-down .menu-principal-desktop {
  display: none;
}
.elementor-nav-menu li.current-menu-parent > a {
  color: var(--e-global-color-text) !important;
}
.elementor-counter-number-suffix {
  font-size: 40px;
    font-weight: 800;
    display: flex;
    align-items: flex-end;
    padding: 0 0 5px;
  }
.swiper-wrapper {
  transition-timing-function: linear !important;
}
.pastille-container .elementor-post-info__terms-list {
  font-size: 0;
    display: flex!important;
    column-gap: 5px;
    row-gap: 10px;
    flex-wrap: wrap;
  }
.pastille-container .elementor-post-info__terms-list .elementor-post-info__terms-list-item {
  font-size: 14px;
    border: 1px solid var(--e-global-color-accent);
    color: black;
    padding: 6px 10px;
    border-radius: 3px;
  }
.pastille-container.white .elementor-post-info__terms-list-item {
  border: 1px solid #f2f2f2;
    color: #f2f2f2;
  }
.accordeon-custom .e-n-accordion-item-title-icon {
  border-radius: 50%;
    border: 1px solid #dadada;
    padding: 8px;
  }
.accordeon-custom .e-n-accordion-item-title-icon:hover {
  background: #FF7832;
    border: 1px solid #FF7832;
  }
.accordeon-custom .e-n-accordion-item-title-icon:hover svg path {
  fill: white;
}
.accordeon-custom .e-n-accordion-item[open] .e-n-accordion-item-title-icon {
  background: #FF7832 !important;
    border: 1px solid #FF7832 !important;
  }
.accordeon-custom .e-n-accordion-item[open] .e-n-accordion-item-title-icon svg path {
  fill: white;
}
.custom-filter-wrapper {
  display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
.custom-filter-wrapper button {
  color: var(--e-global-color-secondary);
    border-color: var(--e-global-color-secondary);
  }
.custom-filter-wrapper button.focus,
.custom-filter-wrapper button.active,
.custom-filter-wrapper button:hover {
  background: var(--e-global-color-secondary);
    color: white;
    border-color: var(--e-global-color-secondary);
  }
.custom-filter-wrapper button:last-child {
  margin: 0 30px 0 0;
}
@media (max-width: 1236px) {
  .custom-filter-wrapper {
      padding: 0 0 0 30px!important;
      }
    }
.maintitle,
.twolines,
.fourlines {
  display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
.maintitle {
  -webkit-line-clamp: 1;
}
.twolines {
  -webkit-line-clamp: 2;
}
.fourlines {
  -webkit-line-clamp: 4;
}
.etablissements-map > div > div {
  background-color: white!important;
    position: relative;
  }
.etablissements-map > div > div:after {
  content: '';
    height: 70%;
    width: 100%;
    border-radius: 30px;
    background: #0E4796;
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
  }
.carrousel-custom {
  overflow: visible !important;
    position: relative;
  }
.carrousel-custom.elementor-widget-loop-grid {
  padding-right: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
.carrousel-custom.elementor-widget-loop-grid .elementor-widget-container {
  overflow: visible !important;
}
@media (max-width: 1215px) {
  .carrousel-custom.elementor-widget-loop-grid .elementor-widget-container {
      padding-left: 0;
      }
    }
.carrousel-custom.elementor-widget-loop-grid .elementor-loop-container {
  display: flex !important;
    flex-wrap: nowrap !important;
    column-gap: 30px;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-left: calc((100vw - 1215px) / 2) !important;
  }
.carrousel-custom.elementor-widget-loop-grid .elementor-loop-container::-webkit-scrollbar {
  display: none;
}
.carrousel-custom.elementor-widget-loop-grid .elementor-loop-container.is-dragging {
  cursor: grabbing;
    user-select: none;
  }
@media (max-width: 1236px) {
  .carrousel-custom.elementor-widget-loop-grid .elementor-loop-container {
      padding-left: 30px!important;
      }
    }
.carrousel-custom.elementor-widget-loop-grid .e-loop-item {
  flex: 0 0 calc((100% - 60px) / 3.5) !important;
    max-width: calc((100% - 60px) / 3.5) !important;
    min-width: 300px;
    position: relative;
    padding-bottom: 50px;
  }
@media (max-width: 1168px) {
  .carrousel-custom.elementor-widget-loop-grid .e-loop-item {
      flex: 0 0 calc((100% - 60px) / 2.5) !important;
        max-width: calc((100% - 60px) / 2.5) !important;
        min-width: 280px;
      }
    .carrousel-custom.elementor-widget-loop-grid .e-loop-item.grid-end-spacer {
      width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
      }
    }
@media (max-width: 768px) {
  .carrousel-custom.elementor-widget-loop-grid .e-loop-item {
      flex: 0 0 calc((100% - 60px) / 1.1) !important;
        max-width: calc((100% - 60px) / 1.1) !important;
        min-width: 260px;
      }
    }
.carrousel-custom.elementor-widget-loop-grid .e-loop-item:before {
  content: '';
    height: 300px;
    position: absolute;
    background: #fff !important;
    width: 0%;
    right: 0;
    bottom: 0 !important;
    border-radius: 50px !important;
    z-index: -1;
    transition: all 0.5s;
  }
/*.carrousel-custom.elementor-widget-loop-grid .e-loop-item.is-first-visible .elementor-button.elementor-button-link {
  background: var(--e-global-color-secondary);
    color: white;
  }*/
  .carrousel-custom.elementor-widget-loop-grid .e-loop-item.is-first-visible .elementor-button.elementor-button-link svg path {
  fill: white;
}
.carrousel-custom.elementor-widget-loop-grid .e-loop-item.is-first-visible:before {
  width: 200%;
    background: #f2f2f2 !important;
  }
.carrousel-custom.elementor-widget-loop-grid .grid-end-spacer {
  flex: 0 0 auto !important;
    height: 1px !important;
    min-width: inherit;
  }
.grid-scroll-arrow {
  width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none!important;
    background: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 24px;
    font-weight: 800;
    color: var(--e-global-color-secondary);
  }
.grid-scroll-arrow:focus,
.grid-scroll-arrow:hover {
  background: none!important;
}
.grid-scroll-arrow.is-disabled {
  opacity: 0.35;
    cursor: default;
    box-shadow: none;
  }
@media (max-width: 768px) {
  .grid-scroll-arrow {
      display: none;
      }
    }
.grid-scroll-arrows {
  position: absolute;
    bottom: 20px;
    right: 30px;
    transform: translateY(0%);
    display: flex;
    gap: 10px;
  }
.faq-grille .e-loop-item {
  cursor: pointer;
    /* Transition fluide par grille */
    /* État actif / ouvert */
  }
.faq-grille .e-loop-item .elementor-widget-theme-post-title .elementor-heading-title {
  display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: color 0.3s ease, font-size 0.3s ease;
    color: #1A1923B5;
  }
.faq-grille .e-loop-item .elementor-widget-theme-post-title .elementor-heading-title:hover {
  color: var(--e-global-color-secondary) !important;
}
.faq-grille .e-loop-item .elementor-widget-theme-post-title .elementor-heading-title::after {
  content: '+';
    font-size: 22px;
    font-weight: 400;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 15px;
  }
.faq-grille .e-loop-item .elementor-widget-theme-post-content {
  display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    overflow: hidden;
  }
.faq-grille .e-loop-item .elementor-widget-theme-post-content > * {
  min-height: 0;
    overflow: hidden;
  }
.faq-grille .e-loop-item.is-open .elementor-widget-theme-post-title .elementor-heading-title {
  color: var(--e-global-color-secondary) !important;
    font-size: 26px !important;
    line-height: 28px !important;
  }
.faq-grille .e-loop-item.is-open .elementor-widget-theme-post-title .elementor-heading-title::after {
  transform: rotate(45deg);
}
.faq-grille .e-loop-item.is-open .elementor-widget-theme-post-content {
  grid-template-rows: 1fr;
    opacity: 1;
  }
@media (min-width: 1068px) and (max-width: 1350px) {
  .hero-carousel-home {
      width: 100%;
        --width: 100%;
        padding: 0 30px;
      }
    }
@media (max-width: 1067px) {
  /* Le 'div' augmente la spécificité pour écraser Elementor sans !important */
    div.hero-carousel-home {
      /* 1. On surcharge les variables de layout Elementor */
        --flex-direction: row;
        --flex-wrap: nowrap;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
        padding-left: 30px;
        padding-right: 30px;
        scroll-padding-inline: 30px;
      }
    div.hero-carousel-home::-webkit-scrollbar {
      display: none;
      }
    div.hero-carousel-home > .e-con {
      /* 2. On surcharge les variables de taille des cartes */
        --width: 80%;
        --flex-grow: 0;
        --flex-shrink: 0;
        flex: 0 0 80%;
        min-width: 80%;
        /* Bloque le width:100% injecté par Elementor */
        scroll-snap-align: start;
      }
    }
@media (max-width: 767px) {
  div.hero-carousel-home > .e-con {
      --width: 95%;
        flex: 0 0 95%;
        min-width: 95%;
      }
    }
.custom-bullet-list ul {
  list-style: none !important;
    padding-left: 0 !important;
    display: flex;
    flex-direction: column;
    row-gap: 5px;
  }
.custom-bullet-list ul li {
  position: relative;
    padding-left: 28px !important;
    line-height: 1.5;
    /* Droit */
    /* Très évasé */
  }
.custom-bullet-list ul li::before {
  content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 12px;
    height: calc(100% - 6px);
    background-color: #3b9b85;
    clip-path: polygon(0 0, 8px 0, 6px 100%, 0 100%);
  }
.custom-bullet-list ul li:nth-child(5n + 1)::before {
  clip-path: polygon(0 0, 9px 0, 6px 100%, 0 100%);
}
.custom-bullet-list ul li:nth-child(5n + 2)::before {
  clip-path: polygon(0 0, 8px 0, 7px 100%, 0 100%);
}
.custom-bullet-list ul li:nth-child(5n + 3)::before {
  clip-path: polygon(0 0, 8px 0, 10px 100%, 0 100%);
}
.custom-bullet-list ul li:nth-child(5n + 4)::before {
  clip-path: polygon(0 0, 10px 0, 8px 100%, 0 100%);
}
.custom-bullet-list ul li:nth-child(5n + 5)::before {
  clip-path: polygon(0 0, 8px 0, 12px 100%, 0 100%);
}
.custom-bullet-list ul li:nth-child(6n + 6)::before {
  clip-path: polygon(0 0, 10px 0, 9px 100%, 0 100%);
}
.custom-bullet-list.white li:before {
  background-color: white;
}
@media (min-width: 768px) {
  .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires .wp-block-paragraph {
      margin: 0;
      }
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:nth-child(2) .blue-left {
      border-radius: 0 30px 0 0;
      }
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:nth-child(2) .blue-left,
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:nth-child(2) .text-right {
      padding-top: 50px;
      }
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:last-child .blue-left {
      border-radius: 0 0 50px 0;
      }
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:last-child .blue-left,
    .boucle-partenaire .elementor-loop-container.elementor-grid > div.type-partenaires:last-child .text-right {
      padding-bottom: 50px;
      }
    }
.wpcf7-form {
  display: flex;
    flex-direction: column;
    row-gap: 20px;
  }
.wpcf7-form .form-row {
  display: flex;
    column-gap: 30px;
  }
.wpcf7-form .form-row > label {
  width: 50%;
}
@media (max-width: 768px) {
  .wpcf7-form .form-row {
      flex-direction: column;
        row-gap: 20px;
      }
    .wpcf7-form .form-row label {
      width: 100%;
      }
    }
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item label {
  flex-direction: row;
    column-gap: 15px;
  }
.wpcf7-form label {
  display: flex;
    flex-direction: column;
    row-gap: 10px;
  }
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select {
  border: 1px solid #666;
}
.wpcf7-form input[type=submit] {
  border: 2px solid #FF7832;
    color: white;
    background: #FF7832;
  }
.wpcf7-form input[type=submit]:hover {
  background: #FF7832;
    color: #FF7832;
    background: white;
  }
.taxonomie-filter-custom .e-filter > button {
  position: relative;
    overflow: visible!important;
    z-index: 9999;
    background-repeat: no-repeat;
    background-position: top 16px right 14px;
    background-size: 11px;
    background-image: url('/wp-content/themes/hello-elementor-child/assets/img/arrow_right_dark.svg');
  }
.taxonomie-filter-custom .e-filter > button:before {
  content: '';
    position: absolute;
    height: 1.5px !important;
    width: 100%;
    background: #eee;
    bottom: -1.5px;
    left: 0;
    z-index: -1;
  }
.taxonomie-filter-custom .e-filter > button:hover:before {
  background: none;
}
.taxonomie-filter-custom .e-filter .e-filter-item[aria-pressed="true"] {
  background-image: url('/wp-content/themes/hello-elementor-child/assets/img/arrow_right_light.svg');
}
.taxonomie-filter-custom .e-filter .e-filter-item[aria-pressed="true"]:before {
  display: none!important;
}
/* === CORRECTIF CARROUSEL (Remplacer tout le CSS précédent) === */
/* 1. Masquer les cartes inactives */
.references_carrousel .e-loop-item {
  opacity: 0 !important;
    visibility: hidden !important;
  }
/* 2. Afficher la carte active (compatible navigation avant / arrière / boucle) */
.references_carrousel .swiper-slide-active,
.references_carrousel .swiper-slide-duplicate-active,
.references_carrousel .e-loop-item.is-active {
  opacity: 1 !important;
    visibility: visible !important;
  }
/* 3. Forcer l'affichage de TOUS les enfants de la slide active (titres, textes, boutons) */
.references_carrousel .swiper-slide-active *,
.references_carrousel .swiper-slide-duplicate-active *,
.references_carrousel .e-loop-item.is-active * {
  opacity: 1 !important;
    visibility: visible !important;
  }
/* 4. Sur mobile : couper l'effet d'animation JS Elementor qui bloque au retour */
@media (max-width: 767px) {
  .references_carrousel .animated,
    .references_carrousel .elementor-invisible {
      animation: none !important;
      }
    }
@media (max-width: 768px) {
  .ce-filtres {
      right: inherit;
        left: 30px;
      }
    }
.etablissements-map .map-container {
   overflow: hidden;
 }
 .etablissements-map .map-container .elementor-widget-heading {
    transition: all 0.3s;
  }
 .etablissements-map .map-container:hover .elementor-widget-heading {
    top: -100px;
  }
 
/** FILTERS DROPDOWN **/

/* À AJOUTER à la fin de style.css du thème enfant — filtres déroulants des formations */

#dynamic-formations-filters,
.dynamic-formations-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  overflow: visible;
}

.filter-dd {
  position: relative;
}

/* Sélecteurs renforcés pour passer devant les styles de boutons de Hello Elementor / du kit Elementor */
.filter-dd button.filter-dd__btn,
.filter-dd button.filter-dd__btn:hover,
.filter-dd button.filter-dd__btn:focus {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 180px;
  padding: 15px 20px;
  border: 0;
  border-radius: 10px;
  background: #026AB3;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
}

.filter-dd__btn svg {
  flex: none;
  transition: transform .2s ease;
}

/* Flèche vers le haut quand le menu est ouvert (comme la maquette) */
.filter-dd.is-open .filter-dd__btn svg {
  transform: rotate(180deg);
}

.filter-dd__btn:focus-visible,
.filter-dd__opt:focus-visible {
  outline: 2px solid #ff7832;
  outline-offset: 2px;
}

.filter-dd__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  min-width: 100%;
  width: max-content;
  max-width: 320px;
  margin: 0;
  padding: 20px 0; 
  list-style: none;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.filter-dd__panel[hidden],
.filter-dd__panel li[hidden],
.grid-empty[hidden],
.filter-reset[hidden] {
  display: none;
}

.filter-dd button.filter-dd__opt,
.filter-dd button.filter-dd__opt:focus {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #222222;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.filter-dd button.filter-dd__opt:hover {
  background: rgba(0, 0, 0, .05);
  color: #026AB3;
}

/* Premier item = titre du filtre, en gras, remet le critère à zéro */
.filter-dd button.filter-dd__opt--all,
.filter-dd button.filter-dd__opt.is-selected {
  font-weight: 700;
}

.filter-dd.has-value .filter-dd__btn {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff7832;
}

.filter-dd .filter-dd__panel li {
  margin: 0;
  min-width: 200px;
  max-width: min(360px, 90vw);
}

.filter-dd button.filter-dd__opt {
  white-space: normal;      /* le texte passe à la ligne */
  overflow-wrap: anywhere;  /* coupe un mot trop long si besoin */
  text-align: left;
  line-height: 1.3;
  box-sizing: border-box;
}

.filter-reset {
  align-self: center;
  padding: 8px 4px;
  border: 0!important;
  background: none;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  outline: 2px solid #ff7832!important;
  color: #ff7832!important;
}
.filter-reset:hover {
  background: #ff7832!important;
  outline: 2px solid #ff7832!important;
  color: white!important;
}


.grid-empty {
  padding: 40px 0;
  text-align: center;
}

@media (max-width: 767px) {
  .filter-dd {
    flex: 1 1 100%;
  }
  .filter-dd__btn {
    width: 100%;
  }
  .filter-dd__panel {
    max-width: none;
    width: 100%;
  }
}
