/*
Theme Name: cenego
Author: Julien Reuzeau
Author URI: https://julienreuzeau.fr
Theme URI: 
Tags: full-site-editing, block-patterns
Text Domain: cenego
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 100.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
html {
	scroll-behavior: smooth;
}

body{
	width:100vw;
	overflow-x:hidden;
}

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}


/* TYPOGRAPHIE */
:root :where(.wp-block-heading) {
	margin-bottom:.75em !important;
}

h1 strong, h2 strong, h3 strong{
	color : var(--wp--preset--color--primary) !important;
}


/* IMAGES */
.single-post img, .wp-block-image.full-width, .wp-block-image.full-width img{
	width:100%;
	height:auto;
	border-radius:.5rem;
}
.wp-block-post-featured-image img{
	width:100%;
	height:auto;
	border-radius:.5rem;
	aspect-ratio:1/1;
}


/* HEADER */
header{
	position:absolute !important;
	z-index:200;
	width:calc( 100vw - var(--wp--preset--spacing--50) - var(--wp--preset--spacing--50) );
	top:var(--wp--preset--spacing--50);
	left:var(--wp--preset--spacing--50);
}
/* niveau 1 */
header .wp-block-navigation ul li{
	padding:1.5rem 1rem;
}	
header .wp-block-navigation ul li a{
	text-decoration:none !important;
}
header .wp-block-navigation .wp-block-navigation-item{
	background-color:none !important;
}
/* niveau 2 */
.wp-block-navigation .has-child .wp-block-navigation__submenu-container{
	min-width:18rem;
	border-radius:1rem;
	visibility:visible;
}
.wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg{
	stroke:var(--wp--preset--color--primary) !important;
}
.wp-block-navigation .wp-block-navigation-item__label strong{
	color:var(--wp--preset--color--primary) !important;
}
header .wp-block-navigation ul li ul li{
	padding:.5rem;
	border-radius:1rem;
}


/* niveau 3 */
header .wp-block-navigation ul li ul li ul{
	background:#000;
	visibility:visible;
	padding:1rem 0;
}
header .wp-block-navigation ul li ul li ul li{
	padding:0;
}

header .wp-block-polylang-language-switcher{
	display:flex;
	list-style:none;
	margin:0;
	padding:0;
	gap:.5rem;
}
	header .wp-block-polylang-language-switcher li a{
		padding:.25rem;
	}





/* BUTTONS */
.wp-element-button, .wp-block-button__link, select.wp-block-button{
	border-color:var(--wp--preset--color--primary);
	background:var(--wp--preset--color--primary);
	border-width: 2px !important;
	border-radius: 5rem !important;
	padding-top: var(--wp--preset--spacing--30);
    padding-right: var(--wp--preset--spacing--30);
    padding-bottom: var(--wp--preset--spacing--30);
    padding-left: var(--wp--preset--spacing--30);
	font-weight: 700 !important;
	text-align:center !important;
	line-height:100% !important;
	font-size: var(--wp--preset--font-size--small);
	    font-family: var(--wp--preset--font-family--montserrat);
}
.button-alt .wp-element-button, .button-alt .wp-block-button__link,
select.button-alt{
	border-color:var(--wp--preset--color--primary) !important;
	background:var(--wp--preset--color--base) !important;
	color:var(--wp--preset--color--primary) !important;
	font-size: var(--wp--preset--font-size--small);
	    font-family: var(--wp--preset--font-family--montserrat);
}
select.button-alt{

  background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDEyIDEyIj4KICA8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjkuOC4zLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogMi4xLjEgQnVpbGQgMykgIC0tPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuc3QwIHsKICAgICAgICBmaWxsOiAjZWY3YTI4OwogICAgICB9CiAgICA8L3N0eWxlPgogIDwvZGVmcz4KICA8ZyBpZD0iQ2FscXVlXzEiIGZvY3VzYWJsZT0iZmFsc2UiPgogICAgPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI2IDguNyAxLjIgNC40IDEuOCAzLjYgNiA3LjMgMTAuMiAzLjYgMTAuOCA0LjQgNiA4LjciLz4KICA8L2c+Cjwvc3ZnPg==") !important;

	background-position: 95% center !important;
	background-repeat: no-repeat !important;
	background-size: 1.5rem auto !important;
	appearance: none !important;
	user-select: none !important;
	width:100% !important;
}
/* CATEGORY SELECT */
.wc-block-product-categories.is-list{
	display:flex;
	width:100%;
}
	.wc-block-product-categories.is-list ul{
		display:flex;
		justify-content: space-between;
		width:100%;
		padding:0;
		margin:0;
		list-style:none;
	}
	.wc-block-product-categories.is-list ul li{
		display: flex;
		width:100%;
		padding:0;
		margin:0;
	}
	.wc-block-product-categories.is-list ul li a{
		display: flex;
		align-items: center;
    	justify-content: center;
		width:100%;
		padding:1rem;
		font-weight:bold;
		margin:0;
		text-align:center;
		color:var(--wp--preset--color--contrast);
		text-decoration:none;
		border-bottom:2px solid var(--wp--preset--color--custom-grey);
	}
		.wc-block-product-categories.is-list ul li a:hover{
			color:var(--wp--preset--color--primary);
			border-bottom:2px solid var(--wp--preset--color--primary);
		}

/* ACCORDEON */
details>summary {
  list-style: none;
	 display: flex;
  justify-content: space-between;
border-bottom: var(--wp--preset--color--custom-grey);
}
	details>summary::marker {
	  display: none;
	}
	details>summary::after {
	  content: ' →';
		font-size:var(--wp--preset--font-size--large);
	}
	details[open] summary:after {
	  content: " ↓";
	}


/* FICHE PRODUIT */
.sidebar{
	position: sticky;
	top: 11rem;
}
	.sidebar .modalite-tabs .value{
		list-style-type:none;
		display:flex;
		flex-direction: row;
		justify-content: space-around;
		padding:1px;
		background:var(--wp--preset--color--custom-grey);
		color:var(--wp--preset--color--custom-grey);
		border-radius:5rem;
		gap:0;
	}
	.sidebar .modalite-tabs .value .value-item{
		padding:.5rem;
		margin:0;
		width:100%;
		display:flex;
		    justify-content: center;
		box-sizing:border-box;
		color:var(--wp--preset--color--contrast);
		text-align:center;
		font-size:var(--wp--preset--font-size--medium);
		text-transform:uppercase;
		text-decoration:none;
		border-radius:5rem;
		padding:1rem;
	}
		.sidebar .modalite-tabs .value .value-item:hover, .sidebar .modalite-tabs .value .value-item.active{
			background:var(--wp--preset--color--base);
			color:var(--wp--preset--color--primary);
		}
	.sidebar .modalite-content{
		display:none;
	}
	.sidebar .modalite-content.active{
		display:flex;
	}


/* CARD PRODUCT */
.card-product{
	position:relative;
	overflow:hidden;
}
.card-product .image{
	position:relative;
	overflow:hidden;
}
.card-product figure img, .card-product .wc-block-components-product-image img{
	transition:all ease-in-out 500ms;
	transform:scale(1);
	overflow:hidden;
}
.card-product .caption .caption-infos{
	min-height:13rem; 
}
.card-product .caption .wp-block-post-excerpt__more-link{
	display:none;
}
.card-product .caption .wp-element-button{
	background : var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base);
	border-radius:2rem;
	text-decoration:none;
	font-weight:bold;
	padding:.5rem 1rem;
	margin-top:1rem;
	display:block;
	width:auto;
	text-align:center;
	height:3rem;
}
.card-product .is-meta-field{
	position:absolute;
	z-index:99;
	left:0;
	top:0;
	display:flex;
	width:100%;
	aspect-ratio:1 / 1;
	align-items: center;
    justify-content: center;
	background:rgba(0,0,0,.5);
	transition:all ease-in-out 250ms;
	opacity:1;
}
	


/* CARD ARTICLE */
.card-article{
	position:relative;
	overflow:hidden;
}
.card-article figure{
	z-index:2;
	position:relative;
	overflow:hidden;
}
.card-article figure img{
	transition:all ease-in-out 500ms;
	transform:scale(1);
}


/* ACCORDION */
.accordion .accordion-item{
	border-bottom:2px solid var(--wp--preset--color--contrast);
}
	.accordion .accordion-item .accordion-head{
		padding:1.5rem .5rem .5rem .5rem;	
		cursor:pointer;
	}
	.accordion .accordion-item .accordion-head p{
		font-size:2em;
		transform:rotate(0deg);
		transition:ease-in-out 250ms;
	}
		.accordion .accordion-item.active .accordion-head p{
			transform:rotate(90deg);
		}
	.accordion .accordion-item .accordion-body{
		display:none;
		padding:0 .5rem .5rem .5rem;
		border-bottom
	}
	.accordion .accordion-item.active .accordion-body{
		display:flex;
	}

/* homepage */
.home .main{
	position:relative;
	z-index:100;
}
.home .hero-caption{
	top: 40vh;
    padding-left:var(--wp--preset--spacing--80);
    width: 100vw;
	text-shadow:0 1rem 1.5rem rgba(0,0,0,1); 
}
	.home .hero-caption h1, .home .hero-caption p{
		opacity:0;
		transform:translateX(-10vw);
		transition:all ease-out 500ms;
		
	}
	.home .hero-caption.show .hero-caption-title1{
		transition-delay:500ms;
	}
	.home .hero-caption.show .hero-caption-title2{
		transition-delay:1000ms;
	}
	.home .hero-caption.show .hero-caption-title3{
		transition-delay:1500ms;
	}
	.home .hero-caption.show h1, .home .hero-caption.show p{
		opacity:1;
		transform:translateX(0);
	}


/* Formulaires Elementor */
.elementor-field-group{
	display: flex;
	min-height: 1px;
	position: relative;
	flex-direction: column;
	align-items: flex-start;
	align-content: flex-start;
	margin:0 !important;
	padding:0 !important;
}
	.elementor-field-group .elementor-field-label{
		position: relative;
		left: 0;
		top: 0;
		padding:0;
		margin:0 0 .5rem 0;
		color:var(--e-global-color-text) !important;
	}
	.elementor-field-group .elementor-field{
		padding:.7rem;
		color:var(--e-global-color-text) !important;
		
	}
.elementor-heading-title{
	margin-bottom:0 !important;
}
.elementor-13902 .elementor-element.elementor-element-ae40d14 span.elementor-field-option label:before, .elementor-13902 .elementor-element.elementor-element-3e9bf552 span.elementor-field-option label:before{
	content:none !important;
}




/** DESKTOP */
@media (min-width: 961px) {

	/* BUTTONS */
	.wp-element-button:hover, .wp-block-button__link:hover{
		border-color:var(--wp--preset--color--custom-primary-darken) !important;
		background:var(--wp--preset--color--custom-primary-darken) !important;
	}
	.button-alt .wp-element-button:hover, .button-alt .wp-block-button__link:hover{
		border-color:var(--wp--preset--color--primary) !important;
		background:var(--wp--preset--color--primary) !important;
		color:var(--wp--preset--color--base) !important;
	}

	/* CARDS */
	.card-product:hover .is-meta-field{
		opacity:0;
	}
	.card-product:hover figure img, .card-product:hover .wc-block-components-product-image img{
		transform:scale(1.1);
	}
	.card-product .caption .wp-element-button:hover{
		background : var(--wp--preset--color--custom-primary-darken) !important;
	}
	
	.card-article:hover figure img{
		transform:scale(1.1);
	}

	/* MENU */
	.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container{
		transform:translateY(0rem) scale(1);
		opacity:1;
		min-width:18rem;
		z-index:999;
	}
	
	.wp-block-navigation .has-child .wp-block-navigation__submenu-container{
		z-index:1;
		opacity:0;
		transform:translateY(1rem) scale(.8);
		transition: all 150ms ease-in-out !important;
	}
	
	.wp-block-navigation .wp-block-navigation-item__label:hover{
		color:var(--wp--preset--color--primary) !important;
	}
	
	
	/* ANIMATIONS SECTIONS ET TRANSITIONS */
	.section.animated{
		transition: all 1s;
		opacity: 0;
		transform: translateY(200px);
	}

	.section.animated.show{
		opacity: 1;
		transform: translateY(0);
	}

	.section.une{
		transform: translateY(200px);
		opacity: 0;
		animation-iteration-count: 1;
		animation-name:show_une;
		animation-duration: 1s;
		animation-delay: 2s;
		animation-fill-mode: forwards;
	}

	@keyframes show_une {
	  from {
		transform: translateY(200px);
		opacity: 0;
	  }
	  to {
		transform: translateY(0);
		opacity: 1;
	  }
	}
	
	h2.animated{
		transition: all 1s;
		opacity: 0;
		transform: translateY(200px);
	}

	h2.animated.show{
		opacity: 1;
		transform: translateY(0);
	}
	
	.home .wc-block-product .card-product.animated{
		 transition: all 1s;
		opacity: 0;
		transform: translateX(-200px);
	}
	.home .wc-block-product  .card-product.animated.show{
		 opacity: 1;
		transform: translateX(0);
	}
		.home .wc-block-product:nth-child(1) .card-product.animated{
			 transition-delay: 250ms;
		}
		.home .wc-block-product:nth-child(2) .card-product.animated{
			 transition-delay: 500ms;
		}
		.home .wc-block-product:nth-child(3) .card-product.animated{
			 transition-delay: 750ms;
		}
	
	
	.home .card-number.animated{
		 transition: all 1s;
		opacity: 0;
		transform: translateY(200px);
	}
	.home .card-number.animated.show{
		 opacity: 1;
		transform: translateY(0);
	}
		.home .card-number.animated:nth-child(1){
			 transition-delay: 100ms;
		}
		.home .card-number.animated:nth-child(2){
			 transition-delay: 200ms;
		}
		.home .card-number.animated:nth-child(3){
			 transition-delay: 300ms;
		}
		.home .card-number.animated:nth-child(4){
			 transition-delay: 400ms;
		}
	
	
	.home .products-list ul{
		display:flex !important;
		    gap: 1.25em;
	}
		.home .products-list ul li{
			width:calc( ( 100% - 2.5em ) / 3 ) !important;
		}
	
	li.wp-block-post .card-article.animated{
		transition: all 1s;
		opacity: 0;

	}
		li.wp-block-post:nth-child(odd) .card-article.animated{
			 transform: translateX(-200px);
		}
		li.wp-block-post:nth-child(even) .card-article.animated{
			 transform: translateX(200px);
		}
	li.wp-block-post .card-article.animated.show{
		 opacity: 1;
		transform: translateY(0);
	}
	
}


/** TABLETTES */
@media (max-width: 960px) {
	:root {
		--wp--preset--spacing--50: 1rem !important;
		--wp--preset--spacing--60: 1.5rem !important;
		--wp--preset--spacing--70: 2rem !important;
		--wp--preset--spacing--80: 2rem !important;
		--wp--preset--font-size--xx-large : 2rem !important;
		--wp--preset--font-size--x-large : 1.5rem !important;
		--wp--preset--font-size--large : 1.25rem !important;
		--wp--preset--font-size--medium : 1rem !important;
		--wp--preset--font-size--small : .8rem !important;
	}
	
  .site-header > .wp-block-group{
	  padding-top:var(--wp--preset--spacing--20) !important;
	  padding-bottom:var(--wp--preset--spacing--20) !important;
	}
	.wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
  }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container li{
	padding:.5rem 0;
	}
	
	.gutenslider-caption{
		top: 8rem;
		left: 5rem;
		width: 80vw;
	}
	
	.card-product .caption .caption-infos{
		min-height:auto;
	}
	
}
/* MOBILE */
@media (max-width: 600px) {

	:root :where(.is-layout-flow) > *{
		    margin-block-start: 0 !important;
	}
	
	body{
		width:100vw;
		overflow-x:hidden;
	}

	header > .wp-block-group{
		height:4rem;
	}

	
	.home .une{
		margin-top:3rem !important;
	}


	.site-header .wp-block-image img{
		width:100px !important;
	}

	header .wp-block-navigation ul li{
		padding:.5rem;
	}	

	.hero{
		padding-top:7rem !important;
	}
	
	.gutenslider-caption{
		top: 12rem;
		left: 3rem;
		width: 80vw;
	}
	
	
	.wc-block-product-template__responsive{
		display:flex;
		flex-direction: column;
	}
	
	.wc-block-product-categories.is-list ul {
    	flex-direction: column;
	}
	
}
