/*
Theme Name: Somef
Theme URI: https://somef.tn
Description: Child Theme
Author: Mohamed Habib Mesbah
Author URI: https://www.linkedin.com/in/mohamed-habib-mesbah/
Template: Divi
Version: Updated for Divi 5
*/

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 100000;
    height: 100%;
    width: 100%;
    overflow: hidden !important;
} 

.preloader .sprite {
    width: 127px;
    height: 48px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -24px 0 0 -64px;
    background-image : url(../../uploads/logo-somef-h.png);
    background-size: contain;
}

* {
	margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    outline: none;
    word-wrap: break-word;
	font-smooth: auto;
}

::placeholder {
	opacity: 1;
	color: #999;
}

input:focus::placeholder {
  opacity:0;
}

.et_fixed_nav #main-header, span.logo_helper {max-height: 80px}
header#main-header.et-fixed-header, #main-header {
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
}

/*** TOGGLE SWITCH ***/
.toggle-label {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  padding: 0 30px;
  gap: 8px;
	width: 286px;
	background-color: #f7f7f7;
	height: 80px;
}

.toggle-label span {
  color: #D33343; /* Rouge pour Particuliers par défaut */
}

.toggle-label .professionnels {
  color: #2F3C45;
}

.switch {
  position: relative;
  display: inline-block;
  width: 33px;
  height: 19px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  transition: .4s;
  border-radius: 10px;
  border: 2px solid #D33343;
}

.slider:before {
  position: absolute;
  content: "";
  height: 9px;
  width: 9px;
  left: 1px;
  bottom: 1px;
  border: solid 2px #D33343;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider:before {
  transform: translateX(14px);
}

input:checked ~ .professionnels {
  color: #D33343 !important;
}

input:checked ~ .particuliers {
  color: #2F3C45 !important;
}

.wish-list-icon {margin-right: 2em !important;}
.wish-list-icon a {padding: 28px 0 !important;}

/*** WOO FILTERS ***/

.woof_container_inner h4 {
	color: #D33343 !important;
	font-weight: 400 !important;
	border-bottom: solid 1px #ddd;
}
.woof_childs_list_opener {
	float: right;
	margin-top: 10px !important;
}
.woof_childs_list_opener span.woof_is_opened {
	background: url(../../uploads/caret-up.svg);
}
.woof_text_search_container {
	margin-bottom: 23px;	
}
.woof_container .woof_container_inner input[type="search"] {
	font-size: 15px;
	padding: 1.2em 1em;
	border-radius: 10px;
}
.chosen-container-single .chosen-single {
	padding: 1em !important;
	height: 50px !important;
	line-height: 50px !important;
	border-radius: 10px;
}
.chosen-container-single .chosen-single div b {
	background: url(../../uploads/caret-down.svg) no-repeat left center !important;
}
.woof_checkbox_count {
	font-size: 12px;
	color: #666;
}
.woof_checkbox_label_selected {
	color: #D33343;
}
.cfvsw_variations_form {
	padding: 0 1em 1em;
}
.woocommerce div.product form.cart .variations label {
	font-weight: 400;
	color: #666;
}
.single_add_to_cart_button {
	display: none !important;
}
.cfvsw-selected-swatch {
	border-color: #D33343 !important;
	background-color: #D33343 !important;
	color: #fff !important;
}

/*** RELATED PRODUCTS ***/

.related.products h2 {
	color: #D33343;
	text-align: center;
	margin-bottom: 1.5em;
	position: relative;
}

.related.products>h2:before {
	content:"";
	position: absolute;
	left:calc(50% - 180px);
	top: 12px;
	width: 50px;
	height: 2px;
	background-color:#D33343; 
}
.related.products>h2:after {
	content:"";
	position: absolute;
	left: calc(50% + 130px);
	top: 12px;
	width: 50px;
	height: 2px;
	background-color:#D33343; 
}

.flickity-button {
	background-color: #D33343;
	color: white;
	transition: all .4s ease-out;
}
.flickity-button:hover {
	background-color: #2f3c45;
}
.flickity-prev-next-button.previous {left:20px;}
.flickity-prev-next-button.next {right:20px;}

/*** WHISHLIST ***/

.alg-wc-wl-social-ul {padding: 0 0 0 2em !important;}
.alg-wc-wl-social-li a {
	font-size: 20px;
	margin-right: 10px;
}
.alg-wc-wl-view-table {border: solid 1px #ddd}
.alg-wc-wl-view-table th {
	background-color: #D33343;
	padding: 0 .6em;
	color: white;
}
.alg-wc-wl-view-table tr {border-bottom: solid 1px #ddd}

.alg-wc-wl-view-table td.product-note textarea {
	width: 100%;
	min-height: 96px;
}

@media (min-width: 981px) {
	.et_fullwidth_nav #main-header .container {padding-left:0}
	.woocommerce ul.products.columns-3 li.product {
		width: calc((100% - 40px)/3) !important;
		margin-right: 20px !important;
		margin-bottom: 20px !important;
	}
	.woocommerce ul.products.columns-4 li.product {
		width: calc((100% - 60px)/4) !important;
		margin-right: 20px !important;
		margin-bottom: 20px !important;
	}
	.woocommerce ul.products li.product.last {
		margin-right: 0 !important;
	}
	.woocommerce ul.products li.product a {
		overflow: hidden;
	}
	.woocommerce ul.products li.product img {
		transform: translatey(0);
		transition: all .3s ease-out;
	}
	.woocommerce ul.products li.product:hover img {
		transform: translatey(-15px);
	}
}

/*** PLACES ***/
.map-nav-lists {
	display: grid;
	grid-template-columns: repeat(4, minmax(250px, 1fr));
	grid-gap: 10px;
}
.map-nav-item-wrapper {
	padding: 10px !important;
}
.map-nav-item.focus {
	border: solid 1px #ddd !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .15) !important;
}
.place_cat {
	color: white;
	background-color: #D33343;
	margin: 0 0 10px 0;
	padding: .3em .6em;
	width: fit-content;
	text-transform: uppercase;
	font-size: 1.2em;
}
.navlist-title {
	color: rgb(57, 57, 57);
	font-size: 16px;
	text-transform: uppercase;
	font-weight: 600;
}
.navlist-gouv {
	color: #999;
	font-size: 14px;
	margin-bottom: .6em;
}
.navlist-phone, .navlist-mail {
	background-color: #f5f5f5;
	font-size: 12px;
	color: rgb(57, 57, 57);
	padding: .3em .6em .3em 2em;
	width: fit-content;
}
.navlist-phone {
	margin-bottom: .6em;
}
.navlist-phone:before {
	font-family: ETmodules;
	content: "\e090";
	display: inline;
	line-height: 1;
	font-size: .9em;
	padding-right: .6em;
	margin-left: -1.5em;
	color: #D33343;
}
.navlist-mail:before {
	font-family: ETmodules;
	content: "\e076";
	display: inline;
	line-height: 1;
	font-size: .9em;
	padding-right: .6em;
	margin-left: -1.5em;
	color: #D33343;
}
.tooltip-content h4 {
	text-transform: uppercase;
	color: #D33343;
	margin-bottom: 0;
}
.tooltip-link {
	color: white !important;
	background-color: #D33343;
	padding: .3em .6em;
	width: fit-content;
	font-size: 1em;
}
.tooltip-content .navlist-mail {
	margin-bottom: 15px;
}
li.filter-checkbox {
	margin-bottom: 1em;
}
.filter-checkbox>label, .filter-select>label {
	font-size: 18px;
	line-height: 2em;
	color: #D33343; 
}
input.filter_term_checkbox {
	margin-right: .6em;
	transform: scale(1.2);
}
.filter-select {
	display: flex;
	flex-direction: column;
}
.filter-select select {
	padding: 1em !important;
    height: 50px !important;
    line-height: 50px !important;
    font-size: 1em;
}
.tui-pagination .tui-is-selected, .tui-pagination strong {
	background: #D33343 !important;
    border-color: #D33343 !important;
}

/*** FORMATION FORM ***/
.formation .form-section {
	border: solid 1px #ddd;
	box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
	padding: 30px;
	margin-bottom: 30px;
}
.formation h3 {
	color: #D33343;
	border-bottom: solid 1px #ddd;
	margin-bottom: 1em;
}
.formation label {
	color: #777;
	padding-left: 5px;
	margin-bottom: 5px;
}
.wpcf7-form input[type="submit"] {
	background-color: #D33343;
	color: white;
	padding: 1em 2em;
	border: none;
	font-size: 16px;
	font-weight: bold;
	margin: 1em auto;
	display: block;
	cursor: pointer;
}
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form select {
	height: 50px;
	line-height: 50px;
	border: solid 1px #ddd;
	width: 100%;
	margin-bottom: 10px;
	font-size: 16px;
	padding: 0 15px;
}
.wpcf7-intl_tel {
	min-width: 400px;
	margin-bottom: 10px !important;
}
.wpcf7-form input[type="checkbox"] {
	transform: scale(1.2);
}
.wpcf7-form .wpcf7-checkbox {
	display: flex;
	flex-direction: column;
}
.wpcf7-list-item {
	font-size: 1em;
	margin-bottom: .6em;
}
.wpcf7-list-item-label {
	color: rgb(57,57,57);
	padding-left: .4em;
}
@media (min-width: 981px) {
	.formation {
		display: grid;
		grid-template-columns: repeat(2, minmax(350px, 1fr));
		grid-gap: 30px;
	}
}

/*** CONTACT FORM ***/

.contact {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.form-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.form-section input,
.form-section textarea,
.form-section .intl-tel-input,
.form-section .intl-tel-input input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 25px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.form-section .intl-tel-input input {
    padding-left: 52px;
}

.form-section input:focus,
.form-section textarea:focus,
.form-section .intl-tel-input input:focus {
    border-color: #0056a3; /* bleu institutionnel SOMEF */
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,86,163,0.1);
}

.form-section textarea {
    min-height: 140px;
    resize: vertical;
}

input[type="submit"] {
    background-color: #0056a3;
    color: #ffffff;
    padding: 14px 35px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #003f7a;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .contact {
        padding: 25px;
    }
}