/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* --- GLOBAL & UTILITIES --- */
/* REFACTORING: Centralisation de l'effet "verre" pour éviter la duplication.
   Applique cette classe directement sur les éléments concernés dans Elementor. */
.glass-effect {
  --blur-intensity: 0.3vw;
  --brightness-level: 100%;
  --invert: 0%;

  backdrop-filter: blur(var(--blur-intensity)) brightness(var(--brightness-level)) invert(var(--invert));
  -webkit-backdrop-filter: blur(var(--blur-intensity)) brightness(var(--brightness-level));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1),
              inset 1px 1px 1px rgba(255, 255, 255, 1),
              inset -1px -1px 1px rgba(0, 0, 0, 0.15);
  /* CORRECTION: La propriété background-color était cassée.
     Une valeur par défaut a été ajoutée. Adapte-la si besoin. */
  background-color: rgba(0, 0, 0, 0.25);
}

/* --- HEADER --- */
body > header {
  /* NOTE: Le !important a été retiré. Si ça casse, c'est que tu as un conflit de spécificité à régler ailleurs. */
  position: fixed;
  width: 100%;
  /* NOTE: Z-index ramené à une valeur plus raisonnable. */
  z-index: 999;
}
#header {
  height: 3vw;
}
#logo {
  width: 12vw;
  margin-left: 2vw;
}
#logo img, #logo a {
  width: 100%;
}

/* --- HEADER ON SCROLL --- */
.scroll #header,
.scroll #logo {
  margin-top: 0 !important; /* Gardé car probablement lié à du JS. A surveiller. */
}
.scroll #logo {
  margin-bottom: -3vw;
  width: 10vw;
}
.scroll .hidescroll {
  display: none !important; /* Idem, probablement lié au JS. */
}

/* --- FORMULAIRE DE CONTACT (WPForms) --- */
#contact * {
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}
#contact div.wpforms-container-full .wpforms-field.wpforms-field-radio ul {
  justify-content: center;
}
#contact div.wpforms-container-full .wpforms-field.wpforms-field-radio ul li input + label {
  font-weight: 500;
  font-size: 1.2vw;
  line-height: 0.8;
}

/* OPTIMISATION: Sélecteur simplifié pour cibler tous les champs de texte, select et textarea. */
#contact div.wpforms-container-full .wpforms-field-container input:not([type=radio]):not([type=checkbox]):not([type=submit]),
#contact div.wpforms-container-full .wpforms-field-container select,
#contact div.wpforms-container-full .wpforms-field-container textarea {
  text-align: center !important; /* Le !important est souvent nécessaire pour surcharger WPForms. */
}
.wpforms-container .wpforms-field {
  padding: 0.5vw !important;
}

/* --- BOUTON SUBMIT FORMULAIRE --- */
#contact .wpforms-submit-container {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out;
  display: flex;
  justify-content: center;
}
#contact .wpforms-submit-container.visible {
  opacity: 1;
  visibility: visible;
}
#contact button {
  border-radius: 0;
  width: 80%;
  font-size: 1.2vw;
  height: 0;
  margin: 0 !important;
  padding: 0;
}
#contact .visible button {
  height: auto;
  padding: 0.5vw 0 0.7vw;
}
.hideform {
  display: none;
}
.home .hideform {
  display: flex !important; /* Tu dois avoir une raison pour ce !important... */
  justify-content: center;
}
#openForm {
  cursor: pointer;
}

/* --- ELEMENTS DE STYLE (Titres, Filtres, CTA) --- */
/* REFACTORING: Centralisation du style du pseudo-élément :before pour les formes décoratives */
.titreSmall,
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true],
.ctaUnItemListe,
#navFormations .menu-item {
  position: relative;
}
.titreSmall:before,
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true]:before,
.ctaUnItemListe:before,
#navFormations .menu-item:before {
  content: "";
  height: 1vw;
  width: 1vw;
  display: block;
  position: absolute;
  left: 0.2vw;
  transform: rotate(30deg);
  z-index: 1;
}

.titreSmall h2,
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true] span {
  background-color: var(--e-global-color-primary);
  color: #fff !important;
  font-size: 0.9vw !important;
  padding: 0.3vw 0.3vw 0.5vw 0.8vw;
  z-index: 3;
  position: relative;
}
.titreSmall:before {
  top: 1.05vw;
  background-color: #0D2B31;
}
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true]:before {
  top: auto;
  bottom: -0.3vw;
}
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true] span {
  font-size: 1.3vw !important;
  padding: 0.5vw 2vw 0.8vw 2vw !important;
}

.ctaUnItemListe a {
  z-index: 2;
  position: relative;
  margin-top: 1vw;
}
.ctaUnItemListe:before {
  background-color: #6B0000;
  top: auto;
  bottom: -0.3vw;
}
.ctaUnItemListe:hover a { background-color: var(--e-global-color-primary); }
.ctaUnItemListe:hover:before { background-color: #0D2B31; }

/* --- NAVIGATION FORMATIONS --- */
#navFormations .menu-item {
  margin-bottom: 1vw;
  margin-left: -1vw;
}
#navFormations .menu-item a {
  background-color: var(--e-global-color-primary);
  color: #fff;
  text-transform: uppercase;
  padding: 0.8vw 3vw 1vw 3vw;
  z-index: 2;
  width: max-content;
  font-size: 0.9vw;
}
#navFormations .menu-item:before {
  background-color: #0D2B31;
  top: auto;
  bottom: -0.3vw;
}
#navFormations .current-menu-item a,
#navFormations .menu-item a:hover {
  background-color: var(--e-global-color-accent);
  color: #fff;
  font-size: 1.2vw;
}
#navFormations .current-menu-item:before,
#navFormations .menu-item:hover:before {
  background-color: #6B0000;
}

/* --- LOOP ITEMS --- */
.e-loop-item {
  scale: 1;
  transition: all 0.3s;
}
.e-loop-item:hover {
  scale: 1.02;
}

/* --- ÉVALUATIONS --- */
.evaluations { display: none; }

/* OPTIMISATION: Cible toutes les classes commençant par "tag-note" */
[class*="tag-note"] .evaluations { display: flex; }

.evaluations .stars > div {
  display: none;
  margin-left: auto;
}
.evaluations .notes > div {
  justify-content: flex-end;
  align-items: end;
  flex-wrap: wrap;
  display: flex;
  margin-left: auto;
}

/* OPTIMISATION: Utilisation d'une boucle serait idéale (en SASS), mais en CSS pur,
   cette section reste verbeuse. C'est déjà plus lisible. */
.e-loop-item.tag-note0 .evaluations .stars > div:nth-child(1) { display: flex; }
.e-loop-item.tag-note1 .evaluations .stars > div:nth-child(2) { display: flex; }
.e-loop-item.tag-note2 .evaluations .stars > div:nth-child(3) { display: flex; }
.e-loop-item.tag-note3 .evaluations .stars > div:nth-child(4) { display: flex; }
.e-loop-item.tag-note4 .evaluations .stars > div:nth-child(5) { display: flex; }
.e-loop-item.tag-note5 .evaluations .stars > div:nth-child(6) { display: flex; }
.e-loop-item.tag-note6 .evaluations .stars > div:nth-child(7) { display: flex; }
.e-loop-item.tag-note7 .evaluations .stars > div:nth-child(8) { display: flex; }
.e-loop-item.tag-note8 .evaluations .stars > div:nth-child(9) { display: flex; }
.e-loop-item.tag-note9 .evaluations .stars > div:nth-child(10) { display: flex; }
.e-loop-item.tag-note10 .evaluations .stars > div:nth-child(11) { display: flex; }

.tag-note0 #infosUneFormation .evaluations .stars > div:nth-child(1) { display: flex; }
.tag-note1 #infosUneFormation .evaluations .stars > div:nth-child(2) { display: flex; }
.tag-note2 #infosUneFormation .evaluations .stars > div:nth-child(3) { display: flex; }
.tag-note3 #infosUneFormation .evaluations .stars > div:nth-child(4) { display: flex; }
.tag-note4 #infosUneFormation .evaluations .stars > div:nth-child(5) { display: flex; }
.tag-note5 #infosUneFormation .evaluations .stars > div:nth-child(6) { display: flex; }
.tag-note6 #infosUneFormation .evaluations .stars > div:nth-child(7) { display: flex; }
.tag-note7 #infosUneFormation .evaluations .stars > div:nth-child(8) { display: flex; }
.tag-note8 #infosUneFormation .evaluations .stars > div:nth-child(9) { display: flex; }
.tag-note9 #infosUneFormation .evaluations .stars > div:nth-child(10) { display: flex; }
.tag-note10 #infosUneFormation .evaluations .stars > div:nth-child(11) { display: flex; }

.evaluations .elementor-widget.elementor-widget-icon-list .elementor-icon-list-icon svg { margin: 0; }

/* --- PAGE SINGLE FORMATION --- */
.descriptionUneFormation p { margin: 0.5vw 0; }
.uneFormation .ctaimgListe a {
  background-color: transparent;
  height: 100% !important;
  position: absolute;
  display: block;
}
.uneFormation .ctaimgListe {
  height: 100% !important;
  position: absolute;
  width: 100%;
}

/* --- DIVERS --- */
.home #footerSite { padding-right: 30vw !important; }
.grecaptcha-badge { display: none !important; }
.titre {
  height: 6vw;
  display: flex;
  justify-content: center;
  align-items: center;
}
.titre * { display: flex; }
.titre h1, .titre h2, .titre h3 { line-height: 1 !important; }
.decocontact {
  z-index: -1 !important;
  position: absolute;
}
#sliderHome .elementor-slides .swiper-slide-inner .elementor-slide-heading { font-size: 2.5vw !important; }
#sliderHome .elementor-slides .swiper-slide-inner .elementor-slide-description {
  font-size: 1.1vw;
  line-height: 1.1;
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
  width: 1.4vw;
  height: 2.5vw;
  border: 0.08vw solid #fff;
  border-radius: 5vw;
  position: fixed;
  cursor: pointer;
  bottom: 1vw;
  z-index: 1000; /* NOTE: Valeur raisonnable */
  mix-blend-mode: difference;
  background-color: transparent !important;
}
.scroll-indicator::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0px;
  width: 0.2vw;
  height: 0.2vw;
  background: #fff;
  border-radius: 5vw;
  margin-left: -0.12vw;
  animation: scroll-animation 0.8s infinite ease-in-out;
}
@keyframes scroll-animation {
  0% { opacity: 0; top: 0.3vw; }
  30% { opacity: 1; }
  100% { opacity: 0; top: 2vw; }
}
.scroll-indicator.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

/* --- POPUP / MODAL --- */
.elementor-popup-modal .dialog-widget-content {
  /* NOTE: L'effet de verre est maintenant géré par la classe .glass-effect
     Il suffit de l'ajouter au widget popup dans Elementor.
     Cependant, on garde ici des surcharges si besoin. */
  border-radius: 1vw !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
}
.elementor-popup-modal.dialog-type-lightbox {
  backdrop-filter: blur(10px) !important;
  z-index: 9999;
}
.cta a:hover{background-color: #fff !important; cursor: pointer;}
.cta a:focus{color: #fff !important}
.titre h2{font-size: 1.4vw !important}
.elementor-loop-container:not(.elementor-posts-masonry){display: flex; flex-wrap: wrap; gap: 1.5vw}
.e-loop-item{width: 30%}
body:not(.category-3) .e-loop-item{width: 20%}

.imgLoop,.imgLoop a{position: absolute; left: 0; top: 0; width: 100%; height: 100%}
.imgLoop img{width: 100%; /* L'image prend 100% de la largeur de son parent */
  height: 100%; /* Et 100% de la hauteur */
  object-fit: cover; /* C'est la propriété magique ! ✨ */
  object-position: center; /* On la centre pour qu'elle s'adapte au mieux */  }
.cta.rouge a{text-transform: uppercase; line-height: 1; padding: 0.5vw 2vw 0.7vw 2vw}
.cta.rouge a:hover{color: var( --e-global-color-accent ) !important}
.e-loop-item .cta a:hover{color: var( --e-global-color-accent ) !important; border: solid 0.01vw;}
.listeFormationsBase .elementor-grid{justify-content: center;}
#formContactmodale .wpforms-field-container{display: flex; flex-direction: column; justify-content: center;}
#wpforms-1343-field_8-container,.wpforms-submit-container{display: flex; justify-content: center;}
#news .e-loop-item{width: 100% !important}
#news .elementor-widget-theme-post-featured-image a {
  display: block;
  position: relative;
  overflow: hidden; /* Cache les parties de l'image qui dépassent */
  border-radius: 8px; /* Optionnel : pour des coins arrondis */

  /* La magie du carré parfait et responsive ! */
  aspect-ratio: 1 / 1; 
}

/*
 * Maintenant, on cible l'image elle-même pour la faire remplir le carré.
*/
#news .elementor-widget-theme-post-featured-image a img {
  /* L'image prend 100% de la place de son parent (le lien 'a') */
  width: 100%;
  height: 100%;
  
  /* L'image couvre la zone sans se déformer. Elle est centrée et rognée si besoin. */
  object-fit: cover;
  object-position: center center; /* Assure un centrage parfait */
  
  /* Petit bonus pour une animation au survol */
  transition: transform 0.4s ease-out;
}

/*
 * Petit bonus 2 : un léger effet de zoom au survol de la souris.
*/
#news .elementor-widget-theme-post-featured-image a:hover img {
  transform: scale(1.05);
}
#news .e-loop-item{}
.cdp-copy-alert-success{display: none !important;}


@media screen and (max-width: 1023px) {

  p,a,span,h2,h3{font-size: 4vw !important}
  h1{font-size: 6vw}
  footer *{font-size: 4vw !important; line-height: 1;}
  #logo{width: 40vw; left: 50%; transform: translateX(-50%); margin-top: 10vw; position: absolute;}
  .scroll #logo{width: 30vw !important; margin-top: 4vw !important; margin-left: 0; top: 0vw}
  #iconsClients .elementor-icon-list-text{display: none;}
  #iconsClients li:nth-child(3){display: none;}
  #iconsClients {margin-right: 2vw}
  .elementor-absolute.titre.elementor-widget{position: relative !important; padding: 5vw !important; width: 100% !important; align-self: baseline;}
  .titre .titrePage h2{font-size: 5vw !important; padding-top:3vw; padding-bottom:3vw; box-shadow:none !important; }
  .titre h2.elementor-heading-title{font-size: 5vw !important; text-align: center !important; justify-content: center;}
  .unCompteur .elementor-counter-number-wrapper *{font-size: 10vw !important}
  .unCompteur{margin-bottom: 5vw !important}
  .titre{padding: 0; margin-right:0 !important}
  .titre .titrePage{box-shadow: none !important;}
  .elementor-element.titre{height: auto !important; position: relative !important; top:auto !important;margin: 0 !important; box-shadow: none !important; text-align: center; margin-bottom:10vw !important; margin-right: 0 !important }
  .elementor-element.titre h1{font-size: 5vw !important; line-height: 1.2 !important; }
  #menu-2-69d2432 a{margin: 1vw !important; padding: 0;}
  .deco{display: none;}
  #sliderHome .swiper-slide{ align-content:center; text-align:center !important; }
  #sliderHome .swiper-slide *{font-size: 4vw !important; max-width: 100%; text-align: center;}
  #sliderHome .swiper-slide-inner .swiper-slide-content{width: 100% !important; max-width: 100% !important;}
  #sliderHome .elementor-slides .swiper-slide-inner .swiper-slide-contents .elementor-slide-heading{font-size: 5vw !important;}
  #sliderHome .swiper .elementor-swiper-button svg,#sliderHome .swiper~.elementor-swiper-button svg,#sliderHome .swiper .elementor-swiper-button svg,#sliderHome .swiper~.elementor-swiper-button svg{height: 8vw !important; width: 8vw !important}
  #sliderHome .e-font-icon-svg.e-eicon-chevron-left{margin-left: -3vw}
  #sliderHome .e-font-icon-svg.e-eicon-chevron-right{margin-right: -3vw}
  .elementor-widget.elementor-widget-button{margin: 0 !important; margin-top: 5vw !important;}
  .elementor-widget.elementor-widget-button .elementor-button{padding: 5vw 0vw !important;}
  .elementor-widget.elementor-widget-button .elementor-button{width: 100%; display: block;}
  .elementor-widget-button{width: 100%}
  .titrePage{margin: 0 !important; justify-content: center; align-content: center;}
  .titrePage h2{text-align: center !important; width: 100%; align-self:center; justify-self:center; }
  .home #footerSite{padding: 20vw 0!important}
  #burger,#burger svg{width: 9vw}
  .noms h3{font-size: 10vw !important}
  .elementor-nav-menu--dropdown .elementor-item.elementor-item-active, .elementor-nav-menu--dropdown .elementor-item.highlighted, .elementor-nav-menu--dropdown .elementor-item:focus, .elementor-nav-menu--dropdown .elementor-item:hover, .elementor-sub-item.elementor-item-active, .elementor-sub-item.highlighted, .elementor-sub-item:focus, .elementor-sub-item:hover{background-color: transparent; color:#000 }
  .elementor-popup-modal .dialog-widget-content{background-color: #fff !important}
  .elementor-nav-menu__text-align-center .elementor-nav-menu--dropdown .elementor-nav-menu a{text-align: center;}
  #grilleFormations .e-loop-item,#listeFormationsBase .e-loop-item{width: 100% !important; margin-bottom: 5vw}
  #titreUneFormation{box-shadow: none;}
  .notes .pourcentage{justify-content: center; align-content: center; width: 100% !important}
  .notes .pourcentage h2{width: 100%}
  .listeMobile ul,.listeMobile li{list-style: none; padding: 0; font-size: 4vw}
  .titreSmall h2{font-size: 5vw !important; padding: 2vw; margin-top: 5vw; margin-bottom: 2vw}
  .titreSmall:before{display: none !important;}
  .titreSmall:before, .elementor-widget-taxonomy-filter .e-filter-item[aria-pressed=true]:before, .ctaUnItemListe:before, #navFormations .menu-item:before{display: none;}
}
