/* Toutibox Formula Configurator */

.tfc-configurator {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 1.5rem;
	margin: 1.5rem 0;
	box-sizing: border-box;
}

.tfc-configurator__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: #222;
}

.tfc-field {
	margin-bottom: 1rem;
}

.tfc-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 500;
	color: #333;
}

.tfc-field input,
.tfc-field select,
.tfc-field textarea {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1rem;
	box-sizing: border-box;
}

.tfc-field textarea { min-height: 80px; resize: vertical; }

.tfc-field small {
	display: block;
	margin-top: 0.35rem;
	color: #666;
	font-size: 0.85rem;
}

.tfc-configurator__price {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
	font-size: 1.1rem;
}

.tfc-configurator__price strong {
	font-size: 1.5rem;
	font-weight: 700;
	color: #111;
	margin-left: 0.35rem;
}

form.cart .quantity.tfc-hidden-qty { display: none !important; }

@media (max-width: 600px) {
	.tfc-configurator { padding: 1rem; }
	.tfc-configurator__price strong { font-size: 1.35rem; }
}


.tfc-price-card .tfc-price-line--unit {
	margin-top:.35rem;
	padding-top:.65rem;
	border-bottom:0;
	border-top:1px solid rgba(255,255,255,.16);
}
.tfc-price-card .tfc-price-line--unit span {
	color:rgba(255,255,255,.78);
}
.tfc-price-card .tfc-price-line--unit strong {
	font-size:1.15rem;
	color:#fff;
}

.tfc-field--upload {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.tfc-file-preview {
	margin-top: 0.75rem;
}

.tfc-file-preview__image {
	display: block;
	max-width: 180px;
	max-height: 180px;
	border: 1px solid #ddd;
	border-radius: 8px;
	object-fit: contain;
	background: #fff;
	padding: 6px;
}

.tfc-file-preview__name {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: #333;
	word-break: break-word;
}

.tfc-file-preview__badge {
	display: inline-block;
	padding: 0.55rem 0.75rem;
	border: 1px dashed #bbb;
	border-radius: 8px;
	background: #fafafa;
	font-size: 0.95rem;
	color: #333;
}


.tfc-options-section {
	margin: 1.25rem 0;
	padding: 1rem;
	border: 1px solid #eee;
	border-radius: 10px;
	background: #fafafa;
}

.tfc-options-section h4 {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #222;
}

.tfc-lisere-custom input[type="color"] {
	width: 70px;
	height: 42px;
	padding: 3px;
}


.tfc-price-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0.25rem 0;
}

.tfc-price-line--ttc {
	font-size: 0.95rem;
	color: #555;
}

.tfc-price-line--ttc strong {
	font-size: 1.1rem;
	color: #555;
}

.tfc-price-placeholder {
	display: inline-block;
	font-size: 0.95rem;
	color: #555;
	font-weight: 600;
}

.tfc-cart-price-ht {
	font-weight: 700;
}

.tfc-cart-price-ttc {
	font-size: 0.9rem;
	opacity: 0.85;
}

.tfc-cart-price-ht small,
.tfc-cart-price-ttc small {
	font-size: 0.75em;
	font-weight: 600;
	opacity: 0.8;
}

/* Panier / checkout : affichage clair HT / TTC */
.tfc-cart-price-ht,
.tfc-cart-price-ttc {
	display: block;
	line-height: 1.35;
	white-space: nowrap;
}
.tfc-cart-price-ht {
	opacity: .85;
	font-size: .95em;
}
.tfc-cart-price-ttc {
	font-size: 1em;
}
.tfc-cart-price-ht small,
.tfc-cart-price-ttc small {
	font-size: .72em;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
}
.woocommerce-cart .product-name .variation,
.woocommerce-checkout-review-order-table .variation {
	margin-top: .5rem;
	font-size: .92em;
	line-height: 1.35;
}


/* Fallback : masque la ligne TVA native WooCommerce si elle apparaît à 0 €. */
.cart_totals tr.tax-rate,
.woocommerce-checkout-review-order-table tr.tax-rate {
	display: none !important;
}

/* Toutibox v2.1 — interface premium */
.tfc-configurator--premium {
	--tfc-black:#11100f;
	--tfc-copper:#b97b4a;
	--tfc-copper-dark:#8c5c35;
	--tfc-blush:#d9a18b;
	--tfc-cream:#fbfaf7;
	--tfc-line:#eadfd7;
	--tfc-text:#2a2522;
	--tfc-muted:#7a6f68;
	background: var(--tfc-cream);
	border: 1px solid var(--tfc-line);
	border-radius: 22px;
	padding: 0;
	overflow: hidden;
	box-shadow: 0 18px 45px rgba(17,16,15,.10);
	color: var(--tfc-text);
	font-family: inherit;
}
.tfc-configurator--premium * { box-sizing: border-box; }
.tfc-hero {
	background: radial-gradient(circle at 100% 0%, rgba(217,161,139,.34), transparent 34%), linear-gradient(135deg, #11100f, #2a1e18);
	color: #fff;
	padding: 1.35rem 1.45rem;
	display: grid;
	grid-template-columns: 1fr 120px;
	gap: 1rem;
	align-items: center;
}
.tfc-eyebrow {
	display:inline-flex;
	align-items:center;
	gap:.4rem;
	font-size:.72rem;
	letter-spacing:.14em;
	text-transform:uppercase;
	color:var(--tfc-blush);
	font-weight:800;
	margin-bottom:.35rem;
}
.tfc-configurator--premium .tfc-configurator__title {
	color:#fff;
	font-size:1.55rem;
	line-height:1.1;
	margin:0 .0 .35rem;
	letter-spacing:.01em;
}
.tfc-hero p {
	margin:0;
	color:rgba(255,255,255,.82);
	font-size:.95rem;
	line-height:1.45;
}
.tfc-hero__mascot {
	width:118px;
	height:118px;
	border-radius:999px;
	background:rgba(255,255,255,.08);
	display:flex;
	align-items:flex-end;
	justify-content:center;
	overflow:hidden;
	border:1px solid rgba(255,255,255,.12);
}
.tfc-hero__mascot img {
	width:115px;
	height:auto;
	transform: translateY(10px);
}
.tfc-section,
.tfc-price-card,
.tfc-mascot-help {
	margin:1rem 1.25rem;
	padding:1rem;
	background:#fff;
	border:1px solid var(--tfc-line);
	border-radius:18px;
	box-shadow: 0 6px 22px rgba(17,16,15,.04);
}
.tfc-section__header {
	display:flex;
	gap:.75rem;
	align-items:flex-start;
	margin-bottom:.9rem;
}
.tfc-section__icon {
	width:38px;
	height:38px;
	border-radius:12px;
	background:#f5ece6;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:1.15rem;
	flex:0 0 auto;
}
.tfc-section__header h4 {
	margin:0;
	font-size:1.03rem;
	color:var(--tfc-black);
	font-weight:800;
}
.tfc-section__header p {
	margin:.12rem 0 0;
	font-size:.86rem;
	color:var(--tfc-muted);
	line-height:1.35;
}
.tfc-grid {
	display:grid;
	gap:.85rem;
}
.tfc-grid--two {
	grid-template-columns: repeat(2, minmax(0,1fr));
}
.tfc-configurator--premium .tfc-field { margin-bottom:.85rem; }
.tfc-configurator--premium .tfc-field:last-child { margin-bottom:0; }
.tfc-configurator--premium .tfc-field label {
	font-size:.86rem;
	font-weight:800;
	color:var(--tfc-text);
	margin-bottom:.42rem;
}
.tfc-configurator--premium .tfc-field input:not([type="color"]),
.tfc-configurator--premium .tfc-field select,
.tfc-configurator--premium .tfc-field textarea {
	border:1px solid #ddcfc5;
	border-radius:13px;
	padding:.78rem .85rem;
	background:#fff;
	font-size:1rem;
	color:var(--tfc-text);
	transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tfc-configurator--premium .tfc-field input:focus,
.tfc-configurator--premium .tfc-field select:focus,
.tfc-configurator--premium .tfc-field textarea:focus {
	outline:none;
	border-color:var(--tfc-copper);
	box-shadow:0 0 0 3px rgba(185,123,74,.16);
}
.tfc-input-unit {
	display:flex;
	align-items:center;
	border:1px solid #ddcfc5;
	border-radius:13px;
	background:#fff;
	overflow:hidden;
}
.tfc-input-unit input {
	border:0 !important;
	box-shadow:none !important;
	border-radius:0 !important;
	min-width:0;
}
.tfc-input-unit span {
	padding:0 .85rem;
	font-weight:800;
	color:var(--tfc-copper-dark);
	border-left:1px solid #eee0d7;
}
.tfc-field--compact { max-width:220px; }
.tfc-price-card {
	background:linear-gradient(135deg, #15110e, #2d1f18);
	color:#fff;
	border:0;
	padding:1.1rem;
	position:relative;
	overflow:hidden;
}
.tfc-price-card:after {
	content:"";
	position:absolute;
	right:-35px;
	top:-35px;
	width:110px;
	height:110px;
	background:radial-gradient(circle, rgba(217,161,139,.35), transparent 62%);
}
.tfc-price-card__label {
	font-size:.78rem;
	text-transform:uppercase;
	letter-spacing:.14em;
	color:var(--tfc-blush);
	font-weight:900;
	margin-bottom:.7rem;
}
.tfc-price-card .tfc-price-line {
	display:flex;
	justify-content:space-between;
	align-items:center;
	padding:.45rem 0;
	border-bottom:1px solid rgba(255,255,255,.12);
	position:relative;
	z-index:1;
}
.tfc-price-card .tfc-price-line span {
	font-weight:700;
	color:rgba(255,255,255,.82);
}
.tfc-price-card .tfc-price-line strong {
	color:#fff;
	font-size:1.35rem;
	font-weight:900;
}
.tfc-price-card .tfc-price-line--ttc strong {
	font-size:1.8rem;
	color:var(--tfc-blush);
}
.tfc-price-card small {
	display:block;
	margin-top:.7rem;
	color:rgba(255,255,255,.72);
	position:relative;
	z-index:1;
}
.tfc-field--upload {
	padding-top:0;
	border-top:0;
	margin-top:0;
}
.tfc-upload-drop {
	display:flex !important;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:.25rem;
	min-height:132px;
	border:2px dashed #d7bba7;
	border-radius:18px;
	background:linear-gradient(180deg, #fff, #fff8f3);
	cursor:pointer;
	text-align:center;
	transition:transform .15s ease, border-color .15s ease, background .15s ease;
}
.tfc-upload-drop:hover {
	transform:translateY(-1px);
	border-color:var(--tfc-copper);
	background:#fff4ec;
}
.tfc-upload-drop__icon { font-size:1.8rem; }
.tfc-upload-drop strong { color:var(--tfc-black); font-size:1rem; }
.tfc-upload-drop small { color:var(--tfc-muted); margin:0; }
.tfc-field--upload input[type="file"] {
	position:absolute;
	width:1px;
	height:1px;
	padding:0;
	margin:-1px;
	overflow:hidden;
	clip:rect(0,0,0,0);
	white-space:nowrap;
	border:0;
}
.tfc-file-preview__image {
	max-width:210px;
	max-height:210px;
	border-radius:16px;
	border:1px solid var(--tfc-line);
	box-shadow:0 8px 24px rgba(17,16,15,.08);
}
.tfc-file-preview__name,
.tfc-file-preview__badge {
	margin-top:.65rem;
	border-radius:999px;
	background:#f7efe9;
	border:1px solid #eadbd0;
	padding:.55rem .8rem;
	display:inline-flex;
	font-weight:700;
	color:var(--tfc-text);
}
.tfc-mascot-help {
	display:grid;
	grid-template-columns:76px 1fr;
	gap:.8rem;
	align-items:center;
	background:#fff8f3;
	border-color:#ead3c3;
	margin-bottom:1.25rem;
}
.tfc-mascot-help img {
	width:76px;
	height:76px;
	object-fit:contain;
	object-position:top center;
}
.tfc-mascot-help strong {
	display:block;
	color:var(--tfc-black);
	font-weight:900;
	margin-bottom:.15rem;
}
.tfc-mascot-help p {
	margin:0;
	font-size:.88rem;
	line-height:1.38;
	color:var(--tfc-muted);
}
form.cart .single_add_to_cart_button {
	background: var(--tfc-copper) !important;
	border-radius:999px !important;
	padding: .85rem 1.65rem !important;
	font-weight:900 !important;
	letter-spacing:.04em !important;
	text-transform:uppercase !important;
	box-shadow:0 10px 26px rgba(185,123,74,.25) !important;
}
form.cart .single_add_to_cart_button:hover { background: var(--tfc-black) !important; }
@media (max-width: 760px) {
	.tfc-hero { grid-template-columns:1fr; }
	.tfc-hero__mascot { display:none; }
	.tfc-grid--two { grid-template-columns:1fr; }
	.tfc-section, .tfc-price-card, .tfc-mascot-help { margin-left:.85rem; margin-right:.85rem; }
	.tfc-mascot-help { grid-template-columns:58px 1fr; }
	.tfc-mascot-help img { width:58px; height:58px; }
}

/* Toutibox v2.1.1 — corrections visuelles demandées */
.tfc-configurator--premium {
	--tfc-black:#070707;
	--tfc-copper:#b27a45;
	--tfc-orange:#d95f16;
	--tfc-pink:#d9a18b;
	--tfc-cream:#fffaf6;
	--tfc-line:#ead8cb;
}

.tfc-configurator--premium h3,
.tfc-configurator--premium h4,
.tfc-configurator--premium label,
.tfc-configurator--premium strong {
	line-height:1.28 !important;
	overflow:visible !important;
}

.tfc-hero {
	position:relative;
	background:
		radial-gradient(circle at 90% 20%, rgba(255,255,255,.13), transparent 22%),
		linear-gradient(135deg, #030303 0%, #16100c 58%, #22150f 100%);
	border-bottom:0;
	padding:1.45rem 1.45rem 1.55rem;
	grid-template-columns:1fr 150px;
}
.tfc-hero:before,
.tfc-price-card:before {
	content:"";
	position:absolute;
	left:0;
	right:0;
	top:0;
	height:8px;
	background:repeating-linear-gradient(90deg,
		#00d5ff 0 10px,
		#305bff 10px 20px,
		#8c2cff 20px 30px,
		#ff2db2 30px 40px,
		#ff6b00 40px 50px,
		#ffd400 50px 60px,
		#20e060 60px 70px);
}
.tfc-eyebrow { color:#f0b99f; }
.tfc-hero__mascot {
	width:145px;
	height:145px;
	border-radius:999px;
	align-items:center;
	overflow:visible;
	background:rgba(255,255,255,.07);
	box-shadow:0 0 0 1px rgba(255,255,255,.16), 0 14px 34px rgba(0,0,0,.35);
}
.tfc-hero__mascot img {
	width:132px;
	max-height:132px;
	object-fit:contain;
	transform:none;
	display:block;
}

.tfc-section__icon {
	background:linear-gradient(135deg,#fff 0%,#fff 48%,#ffe0c7 49%,#ffe0c7 100%);
	box-shadow:inset 0 0 0 1px rgba(217,95,22,.14);
}
.tfc-section,
.tfc-mascot-help {
	border-color:#ead8cb;
}

.tfc-section--cut .tfc-grid--two,
.tfc-section--lisere .tfc-grid--two {
	grid-template-columns:1fr;
}
.tfc-configurator--premium .tfc-field select {
	width:100%;
	min-width:0;
	padding-right:2.7rem;
	font-size:.96rem;
	line-height:1.35;
	white-space:normal;
	text-overflow:clip;
}

.tfc-price-card {
	background:
		radial-gradient(circle at 100% 0%, rgba(255,45,178,.22), transparent 20%),
		radial-gradient(circle at 0% 100%, rgba(0,213,255,.16), transparent 26%),
		linear-gradient(135deg,#050505,#19110c 65%,#25140c);
}
.tfc-price-card .tfc-price-line--ttc strong,
.tfc-price-card__label { color:#f2b59d; }

.tfc-upload-drop {
	border-color:#e3b390;
	background:
		linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,250,246,.96)),
		repeating-linear-gradient(90deg,#00d5ff 0 8px,#305bff 8px 16px,#8c2cff 16px 24px,#ff2db2 24px 32px,#ff6b00 32px 40px,#ffd400 40px 48px,#20e060 48px 56px);
}

form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .button.single_add_to_cart_button {
	background:#d95f16 !important;
	background-image:none !important;
	color:#fff !important;
	border:none !important;
	border-radius:999px !important;
	padding:.95rem 2rem !important;
	font-weight:900 !important;
	letter-spacing:.06em !important;
	text-transform:uppercase !important;
	box-shadow:0 12px 28px rgba(217,95,22,.28) !important;
}
form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart .button.single_add_to_cart_button:hover {
	background:#070707 !important;
	color:#fff !important;
}

.tfc-mascot-help {
	background:linear-gradient(90deg,#fff8f3,#fff);
}

@media (max-width:760px) {
	.tfc-hero { grid-template-columns:1fr 110px; }
	.tfc-hero__mascot { display:flex; width:106px; height:106px; }
	.tfc-hero__mascot img { width:96px; max-height:96px; }
}

.tfc-file-preview__status {
	margin-top: 8px;
	font-size: 0.92rem;
	font-weight: 700;
	color: #8b6a55;
}
.tfc-file-preview__status.is-success { color: #1f7a43; }
.tfc-file-preview__status.is-error { color: #b42318; }
.single_add_to_cart_button.disabled { opacity: .55; cursor: not-allowed; }

/* Toutibox v4.0 — aperçu fichier + minimum automatique */
.tfc-min-qty-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 122, 26, 0.10);
  border: 1px solid rgba(255, 122, 26, 0.25);
  color: #2b2118;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.tfc-upload-preview {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 120px;
  color: inherit;
}

.tfc-upload-preview img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.tfc-upload-preview small {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #555;
}

.tfc-upload-preview--thumb img {
  width: 72px;
  height: 72px;
}

.tfc-upload-preview--meta {
  align-items: flex-start;
  margin: 4px 0;
}

.tfc-upload-preview--meta img {
  width: 90px;
  height: 90px;
}

.tfc-upload-preview--admin img {
  width: 96px;
  height: 96px;
}

.tfc-upload-preview__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.woocommerce-cart-form .tfc-upload-preview,
.woocommerce-checkout-review-order-table .tfc-upload-preview {
  margin: 4px 0;
}

@media (max-width: 767px) {
  .tfc-upload-preview img,
  .tfc-upload-preview__badge {
    width: 64px;
    height: 64px;
  }
}


/* v5.5 - placement propre + barre flottante Astra conservée
   Le bouton natif reste sous le configurateur.
   La barre flottante Astra reste visible, mais son clic est redirigé en JS vers le vrai formulaire produit. */
.single-product .tfc-configurator {
  clear: both;
  width: 100%;
  margin-top: 22px;
  margin-bottom: 24px;
}
.single-product form.cart .tfc-configurator {
  margin-top: 0;
}
.single-product form.cart .single_add_to_cart_button {
  margin-top: 18px;
}
.single-product .ast-sticky-add-to-cart .single_add_to_cart_button,
.single-product .ast-sticky-add-to-cart-wrapper .single_add_to_cart_button,
.single-product .ast-sticky-add-to-cart-action-wrap .single_add_to_cart_button,
.single-product .ast-sticky-add-to-cart .button,
.single-product .ast-sticky-add-to-cart-wrapper .button {
  cursor: pointer;
}

/* Prix Toutibox synchronisé dans la barre flottante Astra */
.tfc-sticky-price-follow{
	display:flex;
	align-items:center;
	gap:14px;
	padding:8px 14px;
	margin:0 12px;
	border-radius:999px;
	background:rgba(255,255,255,.96);
	box-shadow:0 6px 20px rgba(0,0,0,.12);
	color:#23180f;
	font-family:inherit;
	line-height:1.15;
	white-space:nowrap;
}
.tfc-sticky-price-follow__main{display:flex;flex-direction:column;gap:2px;}
.tfc-sticky-price-follow__main span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;opacity:.7;font-weight:700;}
.tfc-sticky-price-follow__main strong{font-size:18px;font-weight:800;color:#6b4a2f;}
.tfc-sticky-price-follow__details{display:flex;gap:10px;font-size:12px;opacity:.9;}
.tfc-sticky-price-follow__details strong{font-weight:800;color:#23180f;}
@media (max-width: 768px){
	.tfc-sticky-price-follow{width:100%;justify-content:space-between;margin:8px 0 10px;border-radius:18px;}
	.tfc-sticky-price-follow__details{flex-direction:column;gap:2px;text-align:right;}
}
