/**
Theme Name: Artefact
Author: Artefact Design
Author URI: https://artefactdesign.fr/
Description: Designed for Artefact - Astra support and ACF
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: artefact
Template: astra
*/

/*Header*/
.li-logo .menu-text {
  display: none;
}

.header-widget-area[data-section="sidebar-widgets-header-widget-1"] {
  display: flex;
  justify-content: end;
  padding-right: 20px;
}

.header-widget-area .wp-block-gallery {
  justify-content: center;
  align-items: stretch;
}

.header-widget-area .wp-block-gallery figure {
  margin: auto !important;
}
/*Cursor*/
:root {
  --cursor-rgb: 0, 0, 0;
}
.custom-cursor {
  /*cursor: none;*/
  cursor: url("./img/artefact_shield.png"), auto;
}
#cursor {
  visibility: hidden;
  width: 20px;
  height: 20px;
  border: 10px solid rgba(var(--cursor-rgb), 0.8);
  border-radius: 50%;
  position: absolute;
  z-index: 9999;
  display: none;
}

#cursor::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 15px solid rgba(var(--cursor-rgb), 0.2);
  border-radius: 50%;
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 10;
}

/*Buttons*/
.ast-single-post .entry-content .wp-block-button .wp-block-button__link,
.ast-single-post .entry-content .wp-block-search .wp-block-search__button,
form[CLASS*="wp-block-search__"].wp-block-search
  .wp-block-search__inside-wrapper
  .wp-block-search__button,
body .entry-content .wp-block-file .wp-block-file__button,
.et-db
  #et-boc
  .et_pb_module
  .forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-button:last-child,
.forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-button:last-child {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.ast-single-post .entry-content .wp-block-button .wp-block-button__link:hover,
.ast-single-post .entry-content .wp-block-search .wp-block-search__button:hover,
body .entry-content .wp-block-file .wp-block-file__button:hover,
form[CLASS*="wp-block-search__"].wp-block-search
  .wp-block-search__inside-wrapper
  .wp-block-search__button:hover,
.et-db
  #et-boc
  .et_pb_module
  .forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-button:last-child:hover,
.forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-button:last-child:hover {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8) inset;
}

/* Forminator inputs*/
.forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-floating--input {
  padding-left: 0.5em;
}
.forminator-ui.forminator-custom-form[data-design="material"] .forminator-input,
.forminator-ui.forminator-custom-form[data-design="material"]
  .forminator-textarea {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8) inset !important;
  border-radius: 10px !important;
}
.forminator-design--material .forminator-button-submit {
  border-radius: 6px !important;
}

/********************** Blog *********************/
.post-thumb a {
  display: block;
  margin: auto;
  text-align: center;
}

.ast-blog-layout-4-grid .ast-article-post {
  box-shadow: none;
  max-width: 600px;
}

.ast-article-post .post-thumb-img-content img {
  max-height: none;
}

.uagb-post-grid.uagb-post__columns-3 article {
  min-height: 300px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*Post carousel Bloc images*/
.uagb-post__image-position-background .uagb-post__image img {
  position: absolute;
  width: 100%;
  height: 100%;
  min-width: 100%;
  max-width: none;
  left: auto;
  top: auto;
  transform: none;
  min-height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.uagb-post__image-position-background article:hover .uagb-post__image img {
  transition: all ease 0.6s;
  transform: scale(1.1) rotate(-1deg);
  filter: none;
}
.uagb-post__image-position-background article .uagb-post__image:before {
  transition: all ease 0.3s;
  opacity: 0;
  height: 0;
}

.uagb-post__image-position-background article:hover .uagb-post__image:before {
  opacity: 0.85;
  height: 100%;
}

/* Graysacle effect*/
.ast-article-post .post-thumb-img-content img,
.wp-block-latest-posts__featured-image img {
  filter: grayscale(1);
  transition: all ease 0.6s;
}

.ast-article-post .post-thumb-img-content img:hover,
.wp-block-latest-posts__featured-image img:hover {
  filter: none;
}

/*Post carousel Bloc text*/
.uagb-post__image-position-background .uagb-post__text {
  visibility: hidden;
  opacity: 0;
  transition: all ease 0.6s;
}

.uagb-post__image-position-background article:hover .uagb-post__text {
  visibility: visible;
  opacity: 1;
}

/************ Single post ****************/
header.entry-header .post-thumb img,
.ast-single-post-featured-section.post-thumb img {
  object-fit: contain;
  max-height: 500px;
  margin: auto;
  display: block;
}

header.entry-header .post-thumb img:hover,
.ast-single-post-featured-section.post-thumb img:hover {
  filter: grayscale(1);
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  text-transform: none;
}

.single.single-realisations .post-navigation{
  max-width: 1060px;
  margin: auto;
  border-top:none;
}

/************ Posts archive ********/
.ast-post-filter-single {
  position: relative;
}

.ast-post-filter-single::after {
  content: "...";
  font-size: 30px;
  letter-spacing: 1px;
  font-weight: 900;
  display: block;
  text-align: center;
  width: 100%;
  position: absolute;
  left: 0;
  bottom: -0.3em;
  opacity: 0;
}

.ast-post-filter-single:hover::after {
  opacity: 1;
}

.real_archive-desc {
  color: var(--ast-global-color-0);
  text-transform: uppercase;
}

/******************* Widgets ****************/
.wp-block-latest-posts__post-title {
  text-transform: uppercase;
}

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
  border: none;
}

.wp-block-gallery.partners {
  max-width: 262px;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-left: auto;
}

.wp-block-gallery.partners figure.wp-block-image:not(#individual-image) {
  width: 33.33%;
}

.secondary li.cat-item::before {
  content: ">>";
  padding-right: 10px;
}

/* Single realisation gallery */

.single-realisations
  .wp-block-gallery.has-nested-images:not(.is-cropped)
  figure.wp-block-image:not(#individual-image) {
  margin-bottom: 0;
}

.single-realisations .wp-block-gallery.has-nested-images figure {
  overflow: hidden;
}

.single-realisations .wp-block-gallery.has-nested-images img, .single-realisations .spectra-image-gallery picture img {
  filter: grayscale(1);
  transition: transform 0.7s ease;
}

.single-realisations .wp-block-gallery.has-nested-images img:hover, .single-realisations .spectra-image-gallery picture img:hover{
  transform: scale(1.1) rotate(5deg);
  filter: none;
}

/****************** Footer ****************/
.site-footer
  .site-above-footer-wrap[data-section="section-above-footer-builder"]
  .ast-builder-grid-row {
  padding: 0;
}

.site-footer .wp-block-search__inside-wrapper .wp-block-search__input {
  background: rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

.site-footer
  form[CLASS*="wp-block-search__"].wp-block-search
  .wp-block-search__inside-wrapper
  .wp-block-search__button {
  background-color: transparent;
}

.site-footer span.social-item-label {
  font-weight: 600;
}

.site-footer
  form[CLASS*="wp-block-search__"].wp-block-search
  .wp-block-search__inside-wrapper
  .wp-block-search__button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.site-footer input[type="search"]:focus {
  color: #fff;
}

/********************************================= REALISATIONS ====================****************************/
.real_archive-desc {
  text-align: center;
  margin-top: -5em;
}

.real-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media screen and (min-width: 564px) {
  .real-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (min-width: 928px) {
  .real-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.real-row .real {
  position: relative;
  padding: 0;
  margin: 0;
  min-height: 400px;
  background-color: rgba(0, 0, 0, 0);
  overflow: hidden;
}

.real-row .real img {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.real-row .real:hover img {
  transition: all ease 0.6s;
  transform: scale(1.1) rotate(-1deg);
}

.real-row .real figcaption {
  position: absolute;
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  opacity: O;
  visibility: hidden;
  top: 100%;
  transition: all ease 0.5s;
}

.real-row .real:hover figcaption {
  opacity: 1;
  visibility: visible;
  top: 0;
}


.real figcaption p {
  color: black;
  font-weight: 900;
  position: relative;
}


.real figcaption p::before {
  content: "...";
  display: block;
  font-size: 32px;
  color: var(--ast-global-color-0);
}   
/*Filter anything*/
body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-section:not(.wpc-filter-terms-count-0) ul.wpc-filters-labels{
 justify-content: center;
}

body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label{
  border:none!important;
}
body.post-type-archive-realisations .wpc-filters-main-wrap input.wpc-label-input+label:hover span.wpc-filter-label-wrapper, 
body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item input:checked+label a,
body.post-type-archive-realisations .wpc-filters-main-wrap input.wpc-label-input:checked+label span.wpc-filter-label-wrapper,
body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item input+label:hover a{
  color: #000!important;
  background-color: transparent!important;
}

body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item input+label:hover a::after, 
body.post-type-archive-realisations .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item input:checked+label a::after{
  content: "...";
  font-size: 30px;
  letter-spacing: 1px;
  font-weight: 900;
  display: block;
  text-align: center;
  width: 100%;
  position: absolute;
  left: -0.1em;
  bottom: -0.3em;
}

/******* single-realisations */
.single-realisations.ast-separate-container
  .ast-article-single:not(.ast-related-post) {
  background-color: transparent;
}

.real_infos table td:first-child {
  font-weight: bold;
  font-size: 12px;
  padding-top: 6px;
}

.real_infos table td {
  vertical-align: top;
}

.single-realisations .ast-post-social-sharing {
  display: none;
  visibility: hidden;
}
/********************************================= OTHER CONTENTS ====================***************/
.services-container > div {
  position: relative;
	z-index: 1;
}

.services-container > div::after {
  position: absolute;
  content: "";
  width: 60%;
  height: 20%;
  display: block;
  background-image: url(./img/01.webp);
  background-repeat: no-repeat;
  background-position: -10px 0;
  background-size: contain;
  top: 80%;
  left: 0;
  z-index: -1;
}

.services-container > div:nth-of-type(2):after {
  background-image: url(./img/02.webp);
}

.services-container > div:nth-of-type(3):after {
  background-image: url(./img/03.webp);
}

.services-container > div:nth-of-type(4):after {
  background-image: url(./img/04.webp);
}

/********************************================= ANIMATIONS ====================****************************/
/* =================== ANIMATION : iNFINITE TEXT LOOP */
.has-infinite-text-loop {
  overflow: hidden !important;
}

.has-infinite-text-loop .inner,
.has-infinite-text-loop .uagb-container-inner-blocks-wrap {
  display: flex;
  flex-direction: row !important;
  white-space: nowrap;
  position: relative;
  align-items: center !important;
  animation-duration: 10s;
  animation: scroll 20s linear infinite;
  --width: 30em;
}

.has-infinite-text-loop .inner > *,
.has-infinite-text-loop .uagb-container-inner-blocks-wrap > * {
  min-width: var(
    --width
  ); /*Chaque enfant prend toute la largeur de la fenêtre */
  padding-left: 1ch;
  order: 0;
  flex-shrink: 0; /* Empêche la réduction de la taille des enfants */
  display: inline-block !important;
  font-size: 6em;
  font-weight: 900;
  height: 100%;
  margin: 0 !important;
}

@keyframes scroll {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

/* =================== Animation : Text appear */
.has-text-animation {
  position: relative;
}

.has-text-animation.has-text-align-center {
  padding-right: 10ch;
}

.has-text-animation .animated {
  position: absolute;
  opacity: 0;
  padding-left: 1ch;
  animation: textCycle 8s infinite; /* boucle infinie de 8 secondes */
}

.has-text-animation span.animated:nth-of-type(2) {
  animation-delay: 2s; /* Apparition immédiate */
}

.has-text-animation span.animated:nth-of-type(3) {
  animation-delay: 4s; /* Apparition après 2s */
}

.has-text-animation span.animated:nth-of-type(4) {
  animation-delay: 6s; /* Apparition après 4s */
}

@keyframes textCycle {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  45% {
    opacity: 0;
    transform: translateY(0);
  }
  60% {
    opacity: 0;
    transform: translateY(100%);
  }
  100% {
    opacity: 0;
    transform: translateY(100%);
  }
}

/* =================== ANIMATION : has-moving-bg */
/* Moving bg */
.has-moving-background {
  background-position: 50% 50%;
  background-size: 150% !important;
  transition: background-position 0.1s ease-out;
}
/*glassy bg effect*/
.blurry {
  backdrop-filter: blur(10px);
}

/**** =================== shortcode infinite bagckground image */

.animated-background {
  width: 100%;
  height: 100%; /* dynamique */
  overflow: hidden;
}

.inner {
  background-image: url("https://cdn.pixabay.com/photo/2016/02/22/16/57/sports-1216016_640.jpg"); /* dynamique */
  background-size: auto;
  background-repeat: repeat-x;
  width: 100%;
  height: 100%;
  filter: grayscale(1);
  transition: filter 0.7s ease;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.left .inner,
.right .inner {
  width: 300%;
  animation-duration: 60s;
}

.top .inner,
.bottom .inner {
  background-repeat: repeat-y;
  height: 300%;
  animation-duration: 50s;
}

.animated-background .inner:hover {
  filter: none;
}

.top .inner {
  animation-name: scrollBackgroundToTop; /* dynamique */
}

.bottom .inner {
  animation-name: scrollBackgroundToBottom;
}

.left .inner {
  animation-name: scrollBackgroundToLeft;
}

.right .inner {
  animation-name: scrollBackgroundToRight;
}

@keyframes scrollBackgroundToTop {
  0% {
    background-position: 0 -100%;
  }
  100% {
    background-position: 0 200%;
  }
}

@keyframes scrollBackgroundToBottom {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 -200%;
  }
}

@keyframes scrollBackgroundToRight {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes scrollBackgroundToLeft {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* =================== scroll text */
.scroll-text {
  overflow: hidden;
  white-space: nowrap;
}

.scroll-text-content {
  display: inline-block;
  padding-right: 100%; /* Pour s'assurer qu'il y ait assez d'espace pour le défilement */
  animation: scroll-left 20s ease-out infinite;
}

.scroll-text-content.right {
  animation: scroll-right 20s ease-out infinite;
}

/* Animation pour défiler vers la droite */
@keyframes scroll-right {
  0% {
    transform: translateX(-20%);
  }
  100% {
    transform: translateX(30%);
  }
}

/* Animation pour défiler vers la gauche */
@keyframes scroll-left {
  0% {
    transform: translateX(20%);
  }
  100% {
    transform: translateX(-30%);
  }
}
