/**
 * configurator.css — Mise en forme du configurateur "bokken sur mesure".
 * Palette Atelier Hamon : teal #006D77, ice #EDF6F9, terra #E29578.
 */

.cs-configurator {
	background: #EDF6F9;
	border: 1px solid #83C5BE;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
}

.cs-field {
	margin-bottom: 14px;
}

.cs-entete { box-sizing: border-box; width: 100%; max-width: 1256px; margin: 0 auto 20px; padding: 0 10px; }
.cs-entete .elementor-widget-hamon-titre-produit { transform: none !important; width: 100% !important; margin: 0 0 16px !important; text-align: center; }
.cs-entete .hwe-product-title { width: 100% !important; text-align: center; }
.cs-entete .cs-offre-tarif { margin: 0; }

.cs-offre-tarif {
	margin: 0 0 20px;
	border-radius: 10px;
	overflow: hidden;
	background: #006D77;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 109, 119, .28);
}

.cs-offre-haut {
	padding: 8px 14px;
	background: #E29578;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
}

.cs-offre-corps {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 18px 12px;
}

.cs-offre-compteur {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	box-sizing: border-box;
	padding: 0;
	text-align: center;
	border-radius: 50%;
	background: #fff;
	color: #006D77;
	animation: cs-offre-pouls 2.4s ease-in-out infinite;
}

.cs-offre-compteur > span {
	line-height: 1 !important;
	padding-top: 0;
	padding-bottom: 0;
}

.cs-offre-pque {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	padding-left: .05em;
	line-height: 1;
	margin: 0 0 2px;
	display: block;
	width: 100%;
	text-align: center;
}

.cs-offre-nombre {
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
	display: block;
	width: 100%;
	text-align: center;
	margin: 0;
}

.cs-offre-unite {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding-left: .06em;
	display: block;
	width: 100%;
	text-align: center;
	line-height: 1;
	margin: 4px 0 0;
}

.cs-offre-unite.cs-offre-unite--en {
	font-size: 9.5px;
	letter-spacing: .02em;
	padding-left: .02em;
	white-space: nowrap;
}

.cs-offre-prix {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 2px;
	min-width: 0;
}

.cs-offre-etiquette {
	font-size: 13px;
	opacity: .92;
}

.cs-offre-montant {
	font-size: 42px;
	font-weight: 800;
	line-height: 1.05;
	color: #fff;
}

.cs-offre-apres {
	font-size: 14px;
	color: #EDF6F9;
}

.cs-offre-bas {
	text-align: center;
	padding: 0 18px 14px;
	font-size: 14px;
	font-weight: 600;
	color: #EDF6F9;
}

@keyframes cs-offre-pouls {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
	.cs-offre-compteur { animation: none; }
}

@media (max-width: 480px) {
	.cs-offre-corps { gap: 12px; padding: 14px 12px 10px; }
	.cs-offre-compteur { width: 68px; height: 68px; }
	.cs-offre-nombre { font-size: 28px; }
	.cs-offre-montant { font-size: 34px; }
}

.cs-field label {
	display: block;
	font-weight: 600;
	color: #006D77;
	margin-bottom: 4px;
}

.cs-field select {
	width: 100%;
	max-width: 400px;
	padding: 8px 10px;
	border: 1px solid #83C5BE;
	border-radius: 4px;
	background: #fff;
	font-size: 15px;
}

.cs-field select:disabled {
	background: #F3F3F3;
	color: #999;
	cursor: not-allowed;
	border-color: #ddd;
}

.cs-price-display {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 2px solid #E29578;
	font-size: 20px;
}

.cs-price-label {
	color: #7B4F2E;
	margin-right: 8px;
}

.cs-price-value {
	font-weight: 700;
	color: #006D77;
}

.cs-stock-error {
	margin-top: 10px;
}

.cs-add-to-cart-button {
	display: block;
	width: 100%;
	max-width: 400px;
	margin-top: 18px;
	padding: 12px 20px;
	background: #006D77;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.cs-add-to-cart-button:hover:not(:disabled) {
	background: #00565e;
}

.cs-add-to-cart-button:disabled,
.cs-add-to-cart-button.cs-disabled {
	background: #aaa;
	cursor: not-allowed;
	opacity: 0.7;
}

.cs-no-stock-warning {
	background: #FFDDD2;
	border-left: 4px solid #E29578;
	padding: 12px 16px;
	border-radius: 4px;
}

button.cs-disabled,
.single_add_to_cart_button.cs-disabled {
	opacity: 0.5;
	cursor: not-allowed !important;
}

/* Correctif demandé : centrer l'image de la galerie produit dans sa colonne,
   horizontalement ET verticalement (elle était collée en haut à gauche).
   Diagnostic confirmé en conditions réelles : Elementor imbrique le widget
   galerie (.elementor-widget-wpr-product-media) dans une colonne flex en
   `flex-direction: column` qui s'étire à la même hauteur que la colonne du
   configurateur — d'où le vide visuel sous une image plus courte, et le
   collage à gauche puisque rien ne centrait l'axe transversal.
   Sélecteur CSS :has() (bien supporté aujourd'hui) pour cibler dynamiquement
   "la colonne qui contient le widget galerie", sans dépendre des ID générés
   par Elementor (instables si la page est modifiée).
*/
.e-con-inner:has(.elementor-widget-wpr-product-media) > .elementor-element:has(.elementor-widget-wpr-product-media) {
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
}

.woocommerce-product-gallery {
	text-align: center;
}

/* Texte "Particularité" sous l'essence choisie */
.cs-essence-description { margin: 6px 0 0; max-width: 24em; font-size: 13px; line-height: 1.45; text-align: left; text-wrap: pretty; }
.cs-essence-description .cs-essence-desc-line { display: block; margin-top: 2px; opacity: .85; }

/* Marges latérales du conteneur Elementor (data-id 5e4244f) sur mobile (v4.10.0) */
@media (max-width: 767px) {
	.elementor-element-5e4244f,
	[data-id="5e4244f"] {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	/* Elementor fixe width: 75% sur ce conteneur : on le remet pleine largeur (v4.10.1) */
	.elementor .elementor-element-5e4244f {
		width: 100% !important;
	}
}

/* v4.10.2 : intro des profils, champ commentaire pleine largeur */
.cs-field label { text-align: left; }
.cs-field textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 400px;
	padding: 8px 10px;
	border: 1px solid #83C5BE;
	border-radius: 4px;
	background: #fff;
	font-size: 15px;
}
@media (max-width: 767px) {
	.elementor .elementor-element-5e4244f {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* v4.10.4 : photo d'essence = 50 % de la hauteur du cadre ; desktop étroit pleine largeur */
@media (min-width: 768px) {
	.hamon-gallery.cs-photo-big .hamon-gallery__viewport,
	.hamon-gallery.cs-photo-big .hamon-gallery__track,
	.hamon-gallery.cs-photo-big .hamon-gallery__slide {
		height: var(--cs-photo-h) !important;
	}
}
@media (min-width: 768px) and (max-width: 1200px) {
	[data-id="d52542f"] > .e-con-inner {
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.elementor .elementor-element-5e4244f {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

.cs-essence-select-hidden { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.cs-essence-field { position: relative; }

/* Étapes numérotées, titre du widget masqué, alignement à gauche */
.cs-widget-title { display: none !important; }
.cs-configurator, .cs-configurator .cs-field, .cs-configurator .cs-field label { text-align: left; }
.cs-step { display: inline; font-size: inherit; font-weight: 700; letter-spacing: 0; text-transform: none; color: #C2593A; margin: 0; }
.cs-essence-guide { margin: 4px 0 8px 12px; font-size: 14px; color: #6b5a50; text-align: left; }

/* Choix de l'essence : trois onglets (profils) sur toute la largeur, l'onglet actif est plus grand */
.cs-essence-tabs-wrap { margin-left: 12px; }
.cs-essence-tabs { display: flex; align-items: flex-end; gap: 6px; margin: 0 0 -1px; position: relative; z-index: 1; }
.cs-configurator button.cs-essence-tab, .cs-configurator button.cs-essence-tile { -webkit-tap-highlight-color: transparent; box-shadow: none; text-shadow: none; }
.cs-essence-tab { flex: 1 1 0; min-width: 0; margin: 0; padding: 8px 8px; min-height: 38px; border: 1px solid var(--c); border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--c); font-size: 12.5px; font-weight: 500; line-height: 1.2; cursor: pointer; opacity: .8; text-align: center; overflow-wrap: anywhere; outline: 0; }
.cs-configurator .cs-essence-tab:hover, .cs-configurator .cs-essence-tab:focus, .cs-configurator .cs-essence-tab:active { background: transparent !important; color: var(--c) !important; box-shadow: none !important; outline: 0 !important; }
.cs-configurator .cs-essence-tab.is-active, .cs-configurator .cs-essence-tab.is-active:hover, .cs-configurator .cs-essence-tab.is-active:focus, .cs-configurator .cs-essence-tab.is-active:active { background: var(--t) !important; opacity: 1; font-weight: 600; font-size: 14px; min-height: 44px; padding: 11px 8px; border-width: 1px 1px 0; }
.cs-configurator .cs-essence-tab:focus-visible { outline: 2px solid var(--c) !important; outline-offset: 2px; }
.cs-essence-panel { display: none; padding: 12px; border: 1px solid var(--c); border-radius: 0 8px 8px 8px; background: #fff; }
.cs-essence-panel.is-active { display: block; }
.cs-essence-group-text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #4a3a30; text-align: left; }
.cs-essence-empty { margin: 0; padding: 4px 0; font-size: 13px; color: #6b5a50; text-align: left; }
.cs-essence-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cs-essence-tile { display: flex; align-items: center; gap: 8px; box-sizing: border-box; padding: 6px 8px; min-height: 46px; background: #fff; border: 1px solid #83C5BE; border-radius: 6px; color: #32170C; font-size: 13px; line-height: 1.25; text-align: left; cursor: pointer; }
.cs-configurator .cs-essence-tile:hover, .cs-configurator .cs-essence-tile:focus, .cs-configurator .cs-essence-tile:active { border-color: #006D77 !important; background: #fff !important; color: #32170C !important; box-shadow: none !important; outline: 0 !important; }
.cs-configurator .cs-essence-tile.is-selected, .cs-configurator .cs-essence-tile.is-selected:hover, .cs-configurator .cs-essence-tile.is-selected:focus, .cs-configurator .cs-essence-tile.is-selected:active { border: 2px solid #006D77 !important; padding: 5px 7px; background: #f4fbfb !important; }
.cs-configurator .cs-essence-tile:focus-visible { outline: 2px solid #006D77 !important; outline-offset: 2px; }
.cs-essence-thumb { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 5px; object-fit: cover; background: #e6e2dc; display: block; }
.cs-essence-tile-text { display: block; min-width: 0; }
.cs-essence-tile-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.cs-essence-tile-price { display: block; font-size: 13px; color: #7B4F2E; }

/* Bloc "Essence choisie" : gris tant que rien n'est choisi, puis fond pastel de l'onglet */
.cs-essence-chosen { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 12px 0 0 12px; padding: 14px 18px; border-radius: 10px; background: #eceff0; color: #5b4637; font-size: 14px; text-align: left; }
.cs-essence-chosen.is-on { background: var(--t); color: var(--c); border: 1px solid var(--c); }
.cs-ch-l { display: flex; flex-direction: column; gap: 2px; }
.cs-ch-k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.cs-ch-n { font-size: 26px; font-weight: 700; line-height: 1.15; }
.cs-ch-p { font-size: 13px; opacity: .9; }
.cs-ch-r { font-size: 34px; font-weight: 700; line-height: 1; }


