/* Ferefen - Fiches produits : mise en forme premium des descriptions
 *
 * Portee : Divi 5 rend la description dans .et_pb_tab_content (module Onglets)
 * et dans .et_pb_wc_description (module Description). Les anciens selecteurs
 * WooCommerce sont conserves en secours.
 *
 * Reglages rapides : les variables --ff-h2, --ff-h3 et --ff-titre ci-dessous.
 */

.et_pb_wc_tabs .et_pb_tab_content,
.et_pb_wc_description .et_pb_module_inner,
.woocommerce-Tabs-panel--description {
	--ff-h2: clamp(1.25rem, 1.08rem + 0.72vw, 1.5rem);
	--ff-h3: clamp(1.0625rem, 1rem + 0.28vw, 1.1875rem);
	--ff-titre: #1E3888;
	--ff-corps: #3F4A5A;
}

/* ==================================================================
   1. Titres de section
   ================================================================== */
.et_pb_wc_tabs .et_pb_tab_content h2,
.et_pb_wc_description .et_pb_module_inner h2,
.woocommerce-Tabs-panel--description h2 {
	margin: 2.4em 0 0.7em;
	padding-bottom: 0;
	color: var(--ff-titre);
	font-size: var(--ff-h2);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

/* Filet orange au-dessus de chaque section : repere visuel discret */
.et_pb_wc_tabs .et_pb_tab_content h2::before,
.et_pb_wc_description .et_pb_module_inner h2::before,
.woocommerce-Tabs-panel--description h2::before {
	content: "";
	display: block;
	width: 28px;
	height: 3px;
	margin-bottom: 14px;
	border-radius: 2px;
	background: var(--ff-btn-bg, #FF6600);
}

.et_pb_wc_tabs .et_pb_tab_content > h2:first-child,
.et_pb_wc_description .et_pb_module_inner > h2:first-child,
.woocommerce-Tabs-panel--description > h2:first-child {
	margin-top: 0;
}

/* Sous-titres */
.et_pb_wc_tabs .et_pb_tab_content h3,
.et_pb_wc_description .et_pb_module_inner h3,
.woocommerce-Tabs-panel--description h3 {
	margin: 1.9em 0 0.5em;
	padding-bottom: 0;
	color: var(--ff-titre);
	font-size: var(--ff-h3);
	font-weight: 700;
	line-height: 1.35;
}

.et_pb_wc_tabs .et_pb_tab_content h4,
.et_pb_wc_tabs .et_pb_tab_content h5,
.et_pb_wc_tabs .et_pb_tab_content h6,
.woocommerce-Tabs-panel--description h4,
.woocommerce-Tabs-panel--description h5,
.woocommerce-Tabs-panel--description h6 {
	margin: 1.6em 0 0.4em;
	padding-bottom: 0;
	color: var(--ff-titre);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
}

/* ==================================================================
   2. Corps de texte
   ================================================================== */
.et_pb_wc_tabs .et_pb_tab_content p,
.et_pb_wc_description .et_pb_module_inner p,
.woocommerce-Tabs-panel--description p {
	margin: 0 0 1.1em;
	color: var(--ff-corps);
	line-height: 1.7;
}

.et_pb_wc_tabs .et_pb_tab_content p:last-child,
.woocommerce-Tabs-panel--description p:last-child {
	margin-bottom: 0;
}

.et_pb_wc_tabs .et_pb_tab_content strong,
.woocommerce-Tabs-panel--description strong {
	color: #2B3648;
	font-weight: 700;
}

/* Un titre colle a l'element qui le suit immediatement */
.et_pb_wc_tabs .et_pb_tab_content h2 + table.ff-specs,
.et_pb_wc_tabs .et_pb_tab_content h2 + ul,
.et_pb_wc_tabs .et_pb_tab_content h3 + ul,
.woocommerce-Tabs-panel--description h2 + table.ff-specs,
.woocommerce-Tabs-panel--description h2 + ul {
	margin-top: 0;
}

/* ==================================================================
   3. Listes a puces
   ================================================================== */
.et_pb_wc_tabs .et_pb_tab_content ul,
.et_pb_wc_description .et_pb_module_inner ul,
.woocommerce-Tabs-panel--description ul {
	margin: 0 0 1.4em;
	padding-left: 0;
	list-style: none;
}

.et_pb_wc_tabs .et_pb_tab_content ul li,
.et_pb_wc_description .et_pb_module_inner ul li,
.woocommerce-Tabs-panel--description ul li {
	position: relative;
	margin-bottom: 0.6em;
	padding-left: 1.4em;
	line-height: 1.6;
	color: var(--ff-corps);
	list-style: none;
}

.et_pb_wc_tabs .et_pb_tab_content ul li::before,
.et_pb_wc_description .et_pb_module_inner ul li::before,
.woocommerce-Tabs-panel--description ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ff-btn-bg, #FF6600);
}

/* ==================================================================
   4. Onglets Description / Avis
   ================================================================== */
.et_pb_wc_tabs .et_pb_tabs_controls li a {
	font-weight: 600;
}

.et_pb_wc_tabs .et_pb_tab_content {
	padding-top: 4px;
}

/* ==================================================================
   5. Mobile
   ================================================================== */
@media (max-width: 600px) {
	.et_pb_wc_tabs .et_pb_tab_content h2,
	.woocommerce-Tabs-panel--description h2 {
		margin-top: 2em;
	}

	.et_pb_wc_tabs .et_pb_tab_content h2::before,
	.woocommerce-Tabs-panel--description h2::before {
		width: 24px;
		margin-bottom: 11px;
	}
}

/* Aucun avis client : on masque la note en etoiles vide.
 * Le mu-plugin ff-produit.php ajoute la classe ff-sans-avis sur ces fiches ;
 * des qu'un avis existe, les etoiles reapparaissent toutes seules. */
body.ff-sans-avis .woocommerce-product-rating,
body.ff-sans-avis .et_pb_wc_rating,
body.ff-sans-avis .et_pb_module.et_pb_wc_rating {
	display: none !important;
}

/* --- Bloc de reassurance sous la galerie produit --- */
ul.ff-reassure {
	list-style: none !important;
	margin: 0 !important;
	padding: 18px 20px !important;
	border: 1px solid #E9ECF2;
	border-radius: 12px;
	background: #F9FAFB;
}

ul.ff-reassure li {
	position: relative;
	margin: 0 0 14px !important;
	padding: 0 0 0 20px !important;
	line-height: 1.5;
	list-style: none !important;
}

ul.ff-reassure li:last-child {
	margin-bottom: 0 !important;
}

ul.ff-reassure li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .5em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #FF6600;
}

ul.ff-reassure strong {
	display: block;
	color: #1E3888;
	font-size: 15px;
	font-weight: 700;
}

ul.ff-reassure span {
	display: block;
	color: #4A5568;
	font-size: 14px;
}

/* --- Zone d'achat : quantite + Ajouter au panier + Acheter maintenant --- */
form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
}

form.cart .quantity {
	flex: 0 0 auto;
	margin: 0 !important;
}

form.cart .quantity input.qty {
	width: 76px !important;
	height: 100% !important;
	min-height: 54px !important;
	padding: 0 10px !important;
	border: 1px solid #D9DBE1 !important;
	border-radius: 10px !important;
	background: #FFFFFF !important;
	font-size: 16px !important;
	text-align: center;
	color: #1E293B !important;
}

form.cart button.single_add_to_cart_button {
	flex: 1 1 200px;
	min-height: 54px;
	background: var(--ff-btn-bg, #FF6600) !important;
	border: 1px solid var(--ff-btn-bg, #FF6600) !important;
	color: var(--ff-btn-color, #FFFFFF) !important;
	border-radius: 10px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: none !important;
	transition: background .2s ease;
}

form.cart button.single_add_to_cart_button:hover {
	background: var(--ff-btn-bg-hover, #E65C00) !important;
	border-color: var(--ff-btn-bg-hover, #E65C00) !important;
}

form.cart button.ff-buynow-btn {
	flex: 1 1 200px;
	min-height: 54px;
	padding: 14px 22px;
	background: #FFFFFF;
	border: 1px solid #1E3888;
	color: #1E3888;
	border-radius: 10px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

form.cart button.ff-buynow-btn:hover,
form.cart button.ff-buynow-btn:focus {
	background: #1E3888;
	color: #FFFFFF;
}

/* Le bouton WhatsApp occupe sa propre ligne, sous les deux autres */
form.cart .ff-wa-wrap {
	flex: 1 1 100%;
	margin: 2px 0 0;
}

form.cart .ff-wa-btn {
	width: 100%;
	justify-content: center;
	min-height: 54px;
	border-radius: 10px !important;
	font-size: 16px !important;
}

/* Lien favoris : sa propre ligne */
form.cart .tinv-wraper {
	flex: 1 1 100%;
}

@media (max-width: 600px) {
	form.cart .quantity,
	form.cart button.single_add_to_cart_button,
	form.cart button.ff-buynow-btn {
		flex: 1 1 100%;
	}

	form.cart .quantity input.qty {
		width: 100% !important;
	}
}

/* Tableau de caracteristiques */
table.ff-specs {
	width: 100%;
	margin: 0 0 1.6em;
	border: 1px solid #E9ECF2;
	border-radius: 10px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-size: 15px;
}

table.ff-specs th,
table.ff-specs td {
	padding: 13px 16px;
	border: 0;
	border-bottom: 1px solid #EEF1F6;
	text-align: left;
	vertical-align: top;
	line-height: 1.5;
}

table.ff-specs tr:last-child th,
table.ff-specs tr:last-child td {
	border-bottom: 0;
}

table.ff-specs th {
	width: 38%;
	background: #F7F9FC;
	color: #1E3888;
	font-weight: 600;
}

table.ff-specs td {
	color: #3F4A5A;
	background: #FFFFFF;
}

@media (max-width: 600px) {
	table.ff-specs,
	table.ff-specs tbody,
	table.ff-specs tr,
	table.ff-specs th,
	table.ff-specs td {
		display: block;
		width: auto;
	}

	table.ff-specs tr {
		border-bottom: 1px solid #EEF1F6;
	}

	table.ff-specs tr:last-child {
		border-bottom: 0;
	}

	table.ff-specs th {
		border-bottom: 0;
		padding-bottom: 2px;
		font-size: 13px;
		text-transform: none;
	}

	table.ff-specs td {
		border-bottom: 0;
		padding-top: 0;
		font-weight: 500;
	}
}
