/*
Theme Name: PFE — Hello Child
Author: Partenariat Français pour l’Eau
Template: hello-elementor
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: pfe
License: GPL-2.0-or-later
*/

:root{

    /*Logos*/
    --logo-collectivites-territoriales : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Collectivites.svg");
    --logo-etat : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Etat.svg");
    --logo-acteurs-economiques : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Acteur-eco.svg");
    --logo-ong-associations-et-fondations : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-ONG-Assos.svg");
    --logo-organisations-scientifique : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Organisations.svg");
    --logo-personne-physique : url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Personnes-physiques.svg");

}
/***********************************************************/ 
/********************* GÉNÉRALITÉS ************************/ 
/*********************************************************/ 
body{
    
    &:has(#wpadminbar) header{
        margin-top: 32px!important;
    }
}

.etw-hero--thematique, .etw-hero{
    padding-top: 150px!important;
    margin-top: 80px!important;
}

a{
    color:inherit;
}




/*Dégradé de couleur pour chaque element*/
.etw-grid--college > .etw-card--college:nth-child(1) {
  h3{color: #11AFE6};
}
.etw-grid--college > .etw-card--college:nth-child(2) {
  h3{color: #009BD6};
}
.etw-grid--college > .etw-card--college:nth-child(3) {
  h3{color: #0087C4};
}
.etw-grid--college > .etw-card--college:nth-child(4) {
  h3{color: #2075AF};
}
.etw-grid--college > .etw-card--college:nth-child(5) {
  h3{color: #15629E};
}
.etw-grid--college > .etw-card--college:nth-child(6) {
  h3{color: #054785};
}


/***********************************************************/ 
/********************* HEADER ************************/ 
/*********************************************************/ 

header{
    position:fixed;
    top:0;
    width:100%;
    z-index: 10;
    z-index: 10;
   
    filter: drop-shadow(0 8px 8px rgb(0 0 0 / 12%));
    
   .menu-wave {
        position: absolute!important;
        top: 0;
        left: calc(50% - 140px);
        transform: translatex(-50%);
        width:  clamp(600px, 100%, 1200px)!important;
        height:  calc(100% + 50px)!important;
        display: block;
        pointer-events: none;
        
        &:before, &:after{
            content: "";
            background-color: white ;
            position:absolute;
            width: 50vw;
            top: 0;
    
        }
        &:before{
           right: -48vw;
           height: 130px;
        }
        &:after{
           left: -48vw;
           height: 85px;
        }
        
    }
}
@media(max-width: 1024px){
    .menu-wave {
        width: calc(100vw + 100px)!important;
        left: -150px!important;
        transform: translatex(0)!important;
        min-width: 1024px!important;

        &:before{
        
           height: 80px!important;
        }
    }
}
@media(max-width: 767px){
    .menu-wave {
        
        left: -150px!important;
    
    }
}

.etw-menu .menu-item a {
    &:after{
        height: 15px;
        width: 100%;
        max-width: 90px;
        background-size: 100%;
        background-image : url("/wp-content/uploads/2026/10/small-wave.png")!important;

        background-position: bottom left 10px!important;
        background-repeat : no-repeat;
        background-color: transparent!important;
      
    }
    
    &:hover::after{
        opacity: 0.4;
    }
}
.etw-button--members{
    position:relative;
    
    &::before{
        content : "";
        position:absolute;
        display:inline-block;
        left: -50px;
        top: 0;
        background-image : url("/wp-content/uploads/2026/10/people.svg");
        height: 40px;
        width : 40px;
        background-repeat:no-repeat;
        
    }
}



/**********************************************************/ 
/********************** MEMBRES ***************************/ 
/**********************************************************/ 

/*Cache le bloc avec les membre si aucun filtre n'est selectionné*/
.etw-section--member-grid:not(:has(.lgaf-choice__input:checked)){
    .etw-member-grid__container{
        display:none;
    }
}
/*Cache le message du filtre*/
.etw-filters--custom-tab .lgaf-form__actions{
    display:none;
}

/*Style des filtres et résultat*/
.etw-filters--custom-tab .lgaf-choices{
    display: flex;
    justify-content: space-between;

}

.etw-filters--custom-tab .lgaf-filter{
    width:100%;
}

.etw-filters--custom-tab .lgaf-choice{
    --background-image: url("/wp-content/uploads/2026/09/PFE-PICTO-MEMBRE-Acteur-eco.svg");
    
    max-width:150px;
    border-radius: 15px 15px 0 0;
    z-index:1;
    font-size: clamp(14px, 1vw, 16px);
    padding-bottom:20px;
    
    &:has(.lgaf-choice__input:checked){
        background-color:white;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
        
        label{
            color: inherit;
        }
        
        /*Pour masquer l'ombre*/
        &::after{
            content: "";
            position:absolute;
            height:10px;
            width: 100%;
            bottom : -10px;
            left:0;
            background-color: white;
        }
    }
    &:not(:has(.lgaf-choice__input:checked)):hover .lgaf-choice__label{
        background-color: white;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
        border-radius: 15px;
        padding-bottom:10px;

        
        label{
            color: inherit;
        }
    }
    
    /*Ajout du logo*/
    label{
        text-align:center;
        display:flex;
        flex-direction: column;
        gap:var(--size-3);
        background-color: transparent !important;
    }
    label:before{
        content: "";
        display:block;
        height: 100px;
        width: 100%;
        background-image: var(--background-image);
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
}

@media(max-width:1140px){
    .etw-filters--custom-tab .lgaf-choices{
        display: grid;
        justify-items: center;
        grid-template-columns: 1fr 1fr 1fr;
    }
    .etw-filters--custom-tab .lgaf-choice{
        border-radius : 15px;
        &:after{
            display:none;
        }
    }
    .etw-member-grid__container{
        border-radius : 15px;
    }
}
@media(max-width:767px){
    .etw-filters--custom-tab .lgaf-choices{
        display: grid;
        justify-items: center;
        grid-template-columns: 1fr 1fr ;
    }
}

.lgaf-choice:has(input[value="acteurs-economiques"]) label{
    --background-image: var(--logo-acteurs-economiques);
    color: #2075AF;
}
.lgaf-choice:has(input[value="collectivites-territoriales-parlementaires"]) label{
    --background-image: var(--logo-collectivites-territoriales);
    color: #3286BF;
}
.lgaf-choice:has(input[value="etat-etablissements-publics"]) label{
    --background-image: var(--logo-etat);
    color : #4EADE1;
}
.lgaf-choice:has(input[value="ong-associations-fondations"]) label{
    --background-image: var(--logo-ong-associations-et-fondations);
    color: #3C9AD1;
}
.lgaf-choice:has(input[value="organisations-scientifiques-recherche-formation"]) label{
    --background-image: var(--logo-organisations-scientifique);
    color:#15629E;
}
.lgaf-choice:has(input[value="personnes-physiques"]) label{
    --background-image: var(--logo-personne-physique);
    color : #054785;
}

/**********************************************************/ 
/********************** FILTRES ***************************/ 
/**********************************************************/ 

.etw-filters--ressources .lgaf-filter{
    select, input{
        border: none;
        background-color: var(--grey);
        appearance: none;
        -webkit-appearance: none;
    
        width: 100%;
        min-width: 250px!important;
        min-height: 50px;
        padding: 10px 10px 10px 10px;
    
   
        border-radius: 6px;
    
        font-family: "Lexend", sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: var(--dark-blue);
        
        &:focus-visible {
            outline: 2px solid #00b0eb;
            outline-offset: 2px;
        }
    }
    select{
        /* Flèche bleue entourée d’un cercle */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%2300B0EB' stroke-width='1'/%3E%3Cpath d='m9 13 7 7 7-7' fill='none' stroke='%2300B0EB' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 32px 32px;
        cursor: pointer;
        
    }
    input::placeholder{
        color: var(--dark-blue);
    }
}
/**********************************************************/ 
/************** SPECIFICITÉS TAXONOMIE ********************/ 
/**********************************************************/ 

.type_ressource-webinaire .etw-card__tag{
    --picto : url("/wp-content/uploads/2026/09/PFE-Mini-picto-Webinaire.svg");
}
.type_ressource-seminaire .etw-card__tag{
    --picto : url("/wp-content/uploads/2026/09/PFE-Mini-picto-Seminaire.svg");
}
.type_ressource-publication .etw-card__tag{
    --picto : url("/wp-content/uploads/2026/09/PFE-Mini-picto-Publication.svg");
}


/**********************************************************/ 
/************** COMPTEUR ELEMENTOR ********************/ 
/**********************************************************/ 

.etw-counter .elementor-counter-number-wrapper{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap:5px!important;
 
    
    .elementor-counter-number-prefix{
        font-size: 15px;
        font-family: "Lexend", "open-sans";
        text-transform: uppercase;
        font-weight: 400;
    }
    .elementor-counter-number,.elementor-counter-number-suffix{
        font-size: 40px;
        font-family: "Aleo", "open-sans";
        text-align:center;
        font-weight: 600;
        max-width: 10ch;
    }
}

/**********************************************************/ 
/************** DECO GOUTTE COMPTEUR  ********************/ 
/**********************************************************/ 
.etw-counter-list{
    counter-reset: drop-counter;
}

.etw-deco--drop-before{
    --before-width : 40px;
    counter-increment: drop-counter;
    
    position:relative;
    padding-left: calc(var(--before-width) + var(--size-3));
    
    strong{
        color:var(--green);
    }
   
  &::before{
    content : counter(drop-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--before-width);
    height:70px;
    position:absolute;
    top: 0;
    left: 0;
    font-size: var(--size-5);
    color:white;
    background-image : url("/wp-content/uploads/2026/09/goutte.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center top ;
  }
}
.etw-deco--drop-before--2{
    --background-luminosity : 1;
    --before-width : 40px;
  
    counter-increment: drop-counter;
    position: relative;

    strong {
        color: var(--green);
    }
   
    &::before,
    &::after {
        position: absolute;
        top: -20px;
        left: -20px;
        width: var(--before-width);
        height: 70px;
    }
  
    /* Goutte colorée */
    &::before {
        content: "";
        background-color: var(--e-global-color-primary);
  
        -webkit-mask: url("/wp-content/uploads/2026/09/goutte.svg")
            no-repeat center top / contain;
  
        mask: url("/wp-content/uploads/2026/09/goutte.svg")
            no-repeat center top / contain;

        filter: brightness(var(--background-luminosity));
    }
  
    /* Numéro du compteur */
    &::after {
        content: counter(drop-counter);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--size-5);
        color: white;
    }
}



/* Variation de luminosité des gouttes */

.etw-counter-list .elementor-loop-container {

    > .e-loop-item:nth-of-type(1) .etw-deco--drop-before--2 {
        --background-luminosity: 1;
    }

    > .e-loop-item:nth-of-type(2) .etw-deco--drop-before--2 {
        --background-luminosity: 0.85;
    }

    > .e-loop-item:nth-of-type(3) .etw-deco--drop-before--2 {
        --background-luminosity: 0.7;
    }

    > .e-loop-item:nth-of-type(4) .etw-deco--drop-before--2 {
        --background-luminosity: 0.55;
    }

    > .e-loop-item:nth-of-type(5) .etw-deco--drop-before--2 {
        --background-luminosity: 0.4;
    }

    > .e-loop-item:nth-of-type(6) .etw-deco--drop-before--2 {
        --background-luminosity: 0.25;
    }
}



/**********************************************************/ 
/********************** ETIQUETTES ************************/ 
/**********************************************************/ 
.swiper, .etw-post-grid{
    .etw-card__tag a:not(:first-child),
    .elementor .etw-card__tag a:not(:first-child){
        display:none;
    }

    .etw-card__tag,
    .elementor .etw-card__tag {
        visibility: hidden;
    }

    .etw-card__tag a:first-child, .etw-card__tag:before,
    .elementor .etw-card__tag a:first-child, .elementor .etw-card__tag:before{
        display: block;
        visibility: visible;
        
    }
}

.etw-grid--representant .elementor-loop-container > .e-loop-item:first-of-type .etw-card--representant,
.etw-deco--curve{
    position: relative;
    
    &:after{
        content : url("/wp-content/themes/pfe-hello-child/assets/img/Courbe.svg");
        position:absolute;
        display:block;
        top: 100%;
        left: 0;
        width: clamp(600px, 50vw, 900px);
        opacity: 0.5;
    }
}
.etw-deco--curve-reverse{
    &:after{
        transform: rotate(180deg);
    }
}