/**
 * Travaux Calculateurs — base calculator styles (plugin). Every colour, radius and font reads a --tc-* custom
 * property with a neutral fallback, so each site themes the calculator from its own tokens (contract in
 * docs/calculateurs/plugin.md). Mon Travoo maps them in themes/montravoo/assets/css/calculators-theme.css.
 *
 * Layout: one card; header strip (optional --tc-head-pattern) with a --tc-cta base line; numbered steps stacked
 * vertically; pill toggles for 2–4 short choices; repeatable rows as mini-cards; « Calculer » (CTA colour) and
 * « Réinitialiser » (outline); result panel on --tc-surface with an --tc-accent bar, key figure first, secondary
 * results with round pictograms, « Détail du calcul », copy and print. Mobile first: one column under 560 px of
 * card width, two above; 44 px minimum tap targets; reduced motion respected.
 */

.tc-calc {
	container-type: inline-size;
	position: relative;
	margin: 0 0 2.5rem;
	background: var(--tc-bg, #fff);
	border: 1px solid var(--tc-line, #c9dce6);
	border-radius: var(--tc-radius, 16px);
	box-shadow: var(--tc-shadow, 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08));
	overflow: hidden;
	color: var(--tc-primary, #1f3a4d);
	font-family: var(--tc-font-text, inherit);
	font-size: 1rem;
	line-height: 1.5;
}
.tc-calc *,
.tc-calc *::before,
.tc-calc *::after { box-sizing: border-box; }
.tc-calc [hidden] { display: none !important; }

/* ---- Header strip: navy, running-bond bricks drawn by the joints (cerulean), amber base line ---- */
.tc-calc__head {
	position: relative;
	padding: 18px 18px 22px;
	background-color: var(--tc-primary, #1f3a4d);
	background-image: var(--tc-head-pattern, none);
	background-size: var(--tc-head-pattern-size, auto);
	background-position: right top;
	color: var(--tc-bg, #fff);
}
.tc-calc__head::before {
	/* fade the bricks behind the text so the title stays crisp */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tc-primary, #1f3a4d) 0%, color-mix(in srgb, var(--tc-primary, #1f3a4d) 92%, transparent) 45%, color-mix(in srgb, var(--tc-primary, #1f3a4d) 35%, transparent) 100%);
}
.tc-calc__head::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 5px;
	background: var(--tc-cta, #f2b705);
}
.tc-calc__head > * { position: relative; }
.tc-calc .tc-calc__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--tc-primary-soft, #cfe6f2);
	font-size: .875rem;
	font-weight: 600;
}
.tc-calc__badge svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.tc-calc .tc-calc__title {
	margin: 6px 0 4px;
	padding: 0;
	border: 0;
	color: var(--tc-bg, #fff);
	font-family: var(--tc-font-head, inherit);
	font-size: clamp(1.35rem, 5cqi, 1.75rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-wrap: balance;
}
.tc-calc .tc-calc__title::before,
.tc-calc .tc-calc__title::after { display: none; }
.tc-calc .tc-calc__sub {
	margin: 0;
	max-width: 62ch;
	color: #D4EAF5;
	font-size: .975rem;
	line-height: 1.45;
}

/* Notice above the form (definition field `notice`, e.g. electrical safety) */
.tc-calc .tc-calc__notice {
	margin: 16px 16px 0;
	padding: 12px 14px 12px 44px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--tc-cta, #f2b705) 18%, var(--tc-bg, #fff));
	border: 1px solid color-mix(in srgb, var(--tc-cta, #f2b705) 60%, transparent);
	color: var(--tc-primary, #1f3a4d);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.45;
	position: relative;
}
.tc-calc .tc-calc__notice::before {
	content: "!";
	position: absolute;
	left: 14px;
	top: 12px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--tc-primary, #1f3a4d);
	color: var(--tc-cta, #f2b705);
	font-weight: 800;
}
@container (min-width: 560px) {
	.tc-calc .tc-calc__notice { margin: 20px 28px 0; }
}

/* ---- Steps ---- */
.tc-calc__form { margin: 0; }
.tc-calc__inputs { padding: 6px 16px 0; }
.tc-step {
	padding: 18px 0 20px;
	border-bottom: 1px dashed var(--tc-line, #c9dce6);
}
.tc-step:last-of-type { border-bottom: 0; padding-bottom: 6px; }
.tc-calc .tc-step__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	color: var(--tc-primary, #1f3a4d);
	font-family: var(--tc-font-head, inherit);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.25;
}
.tc-calc .tc-step__title::before,
.tc-calc .tc-step__title::after { display: none; }
.tc-step__num {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--tc-primary, #1f3a4d);
	color: var(--tc-cta, #f2b705);
	font-size: .95rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.tc-calc__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

/* ---- Fields ---- */
.tc-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.tc-field > label,
.tc-field > legend,
.tc-rows__legend {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: var(--tc-primary, #1f3a4d);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.3;
}
.tc-field__opt { color: var(--tc-muted, #4f5d66); font-weight: 400; font-size: .85rem; }
.tc-field__control {
	position: relative;
	display: flex;
	align-items: stretch;
	min-height: 48px;
	border: 1.5px solid var(--tc-field-border, #8faebf);
	border-radius: var(--tc-radius-control, 10px);
	background: var(--tc-bg, #fff);
	transition: border-color .15s, box-shadow .15s;
}
.tc-field__control:hover { border-color: var(--tc-link, #0f6e8f); }
.tc-field__control:focus-within {
	border-color: var(--tc-link, #0f6e8f);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc-link, #0f6e8f) 28%, transparent);
}
.tc-calc .tc-field__control input,
.tc-calc .tc-field__control select {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: auto;
	min-height: 45px;
	margin: 0;
	padding: 10px 12px;
	border: 0;
	border-radius: var(--tc-radius-control, 10px);
	background: transparent;
	color: var(--tc-primary, #1f3a4d);
	font: inherit;
	font-size: 1.0625rem; /* ≥ 16 px: no zoom on iOS */
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
	box-shadow: none;
	outline: none;
}
.tc-calc .tc-field__control input::placeholder { color: #7D919C; opacity: 1; }
.tc-calc .tc-field__control select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23023047' stroke-width='2' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
	text-overflow: ellipsis;
}
.tc-field__unit {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0 12px;
	color: var(--tc-muted, #4f5d66);
	font-size: .95rem;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
}
.tc-field__help {
	margin: 6px 0 0;
	color: var(--tc-muted, #4f5d66);
	font-size: .875rem;
	line-height: 1.45;
}
.tc-field__error {
	display: flex;
	gap: 6px;
	margin: 6px 0 0;
	color: var(--tc-error, #a3261a);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.35;
}
.tc-field__error::before { content: "!"; display: inline-grid; place-items: center; flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--tc-error, #a3261a); color: var(--tc-bg, #fff); font-size: .75rem; }
.tc-field__control:has([aria-invalid="true"]) { border-color: #C0392B; background: #FFF8F7; }

/* ---- Pills (segmented control for 2–4 short choices) ---- */
.tc-pills {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
	gap: 6px;
	padding: 4px;
	border: 1.5px solid var(--tc-field-border, #8faebf);
	border-radius: 12px;
	background: var(--tc-surface-alt, #f6f9fb);
}
.tc-pill { position: relative; display: block; margin: 0; cursor: pointer; }
.tc-pill input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
.tc-pill span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 9px;
	color: var(--tc-primary, #1f3a4d);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.2;
	text-align: center;
	transition: background-color .15s, color .15s;
}
.tc-pill:hover span { background: var(--tc-surface, #edf5f9); }
.tc-pill input:checked + span {
	background: var(--tc-primary, #1f3a4d);
	color: var(--tc-bg, #fff);
	box-shadow: 0 1px 2px color-mix(in srgb, var(--tc-primary, #1f3a4d) 25%, transparent);
}
.tc-pill input:focus-visible + span { outline: 3px solid var(--tc-link, #0f6e8f); outline-offset: 2px; }
.tc-pill input:disabled + span { opacity: .5; cursor: default; }

/* ---- Repeatable rows (« Ajouter une zone »): compact mini-cards ---- */
.tc-rows { min-width: 0; margin: 0; padding: 0; border: 0; }
.tc-rows > .tc-field__help { margin: -2px 0 10px; }
.tc-calc .tc-rows__list {
	display: grid;
	gap: 10px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}
.tc-calc .tc-row {
	position: relative;
	margin: 0;
	padding: 10px 12px 14px;
	border: 1px solid var(--tc-line, #c9dce6);
	border-radius: 12px;
	background: var(--tc-surface-alt, #f6f9fb);
}
.tc-row::marker { content: ""; }
.tc-row__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 40px;
	margin: 0 0 6px;
}
.tc-row__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tc-primary, #1f3a4d);
	font-family: var(--tc-font-head, inherit);
	font-weight: 700;
	font-size: .975rem;
}
.tc-row__title::before {
	content: "";
	width: 14px;
	height: 8px;
	border-radius: 2px;
	background: var(--tc-secondary, #3a9cc0);
	box-shadow: 7px 6px 0 -1px var(--tc-primary-soft, #cfe6f2);
}
.tc-row__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	min-width: 44px;
	margin: -4px -6px -4px 0;
	padding: 0 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--tc-error, #a3261a);
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
}
.tc-row__remove::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tc-row__remove:hover { background: #FBEAE8; }
.tc-row__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}
.tc-rows__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 10px 18px;
	border: 1.5px dashed var(--tc-link, #0f6e8f);
	border-radius: 12px;
	background: var(--tc-bg, #fff);
	color: var(--tc-link, #0f6e8f);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.tc-rows__add span { font-size: 1.35rem; line-height: 1; }
.tc-rows__add:hover { background: var(--tc-surface, #edf5f9); border-style: solid; }

/* ---- Errors and actions ---- */
.tc-calc__errors {
	margin: 4px 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #F0B9B2;
	background: #FDF0EE;
	color: #7A1C12;
	font-size: .95rem;
}
.tc-calc__errors:focus { outline: 3px solid var(--tc-link, #0f6e8f); outline-offset: 2px; }
.tc-calc .tc-calc__errors ul { margin: 0; padding-left: 1.1em; }
.tc-calc__actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 18px 0 20px;
}
.tc-calc__btn {
	min-height: 52px;
	padding: 12px 26px;
	border-radius: 12px;
	font: inherit;
	font-family: var(--tc-font-head, inherit);
	font-size: 1.075rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s, box-shadow .15s, transform .15s;
}
.tc-calc__btn--go {
	border: 0;
	background: var(--tc-cta, #f2b705);
	color: var(--tc-primary, #1f3a4d);
	box-shadow: 0 2px 0 color-mix(in srgb, var(--tc-cta, #f2b705) 70%, #000);
}
.tc-calc__btn--go:hover { background: color-mix(in srgb, var(--tc-cta, #f2b705) 85%, #fff); }
.tc-calc__btn--go:active { transform: translateY(1px); box-shadow: 0 1px 0 color-mix(in srgb, var(--tc-cta, #f2b705) 70%, #000); }
.tc-calc__btn--reset {
	border: 2px solid var(--tc-primary, #1f3a4d);
	background: var(--tc-bg, #fff);
	color: var(--tc-primary, #1f3a4d);
}
.tc-calc__btn--reset:hover { background: var(--tc-surface, #edf5f9); }
.tc-calc button:focus-visible,
.tc-calc summary:focus-visible,
.tc-calc select:focus-visible {
	outline: 3px solid var(--tc-link, #0f6e8f);
	outline-offset: 2px;
}
.tc-calc .tc-field__control input:focus-visible,
.tc-calc .tc-field__control select:focus-visible { outline: none; }

/* ---- Result panel ---- */
.tc-calc__results {
	position: relative;
	margin: 0;
	padding: 18px 16px 18px 24px;
	border-top: 1px solid var(--tc-line, #c9dce6);
	background: var(--tc-surface, #edf5f9);
	scroll-margin-top: 16px;
}
.tc-calc__results::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 6px;
	background: var(--tc-accent, #e8730c);
}
.tc-calc__results:focus { outline: none; }
.tc-calc__results .tc-step__title { margin-bottom: 10px; }
.tc-calc .tc-calc__empty { margin: 0 0 4px; color: var(--tc-muted, #4f5d66); }
.tc-calc__key {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 4px 0 14px;
}
.tc-calc__results:not(.is-done) .tc-calc__key,
.tc-calc__results:not(.is-done) .tc-calc__list { display: none; }
.tc-calc__key-label { color: var(--tc-primary, #1f3a4d); font-weight: 600; }
.tc-calc__key-value {
	color: var(--tc-primary, #1f3a4d);
	font-family: var(--tc-font-head, inherit);
	font-size: clamp(2.1rem, 10cqi, 3rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.015em;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}
.tc-calc__key-value::after {
	content: "";
	display: block;
	width: 48px;
	height: 4px;
	margin-top: 10px;
	border-radius: 2px;
	background: var(--tc-accent, #e8730c);
}
.tc-calc .tc-calc__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 4px 14px;
	border-radius: 12px;
	background: var(--tc-bg, #fff);
	box-shadow: 0 1px 2px color-mix(in srgb, var(--tc-primary, #1f3a4d) 6%, transparent);
}
.tc-calc__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	padding: 10px 0;
	border-top: 1px solid #E1EEF5;
}
.tc-calc__item:first-child { border-top: 0; }
.tc-calc .tc-calc__item dt {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--tc-primary, #1f3a4d);
	font-size: .95rem;
	line-height: 1.3;
}
.tc-calc .tc-calc__item dd {
	margin: 0 0 0 auto;
	color: var(--tc-primary, #1f3a4d);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: right;
	overflow-wrap: anywhere;
}
.tc-calc__item.is-wide dd { flex-basis: 100%; margin-left: 40px; text-align: left; font-weight: 600; }
/* Sticker pictograms: white die-cut edge + soft shadow, like the logo's construction icons */
.tc-calc__icon {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	padding: 5px;
	border-radius: 50%;
	background: var(--tc-cta, #f2b705);
	color: var(--tc-primary, #1f3a4d);
	box-shadow: 0 0 0 2.5px var(--tc-bg, #fff), 0 2px 6px color-mix(in srgb, var(--tc-primary, #1f3a4d) 22%, transparent);
}

/* Détail du calcul */
.tc-calc__detail {
	margin: 14px 0 0;
	border: 1px solid var(--tc-line, #c9dce6);
	border-radius: 12px;
	background: var(--tc-bg, #fff);
}
.tc-calc__detail summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 14px;
	color: var(--tc-link, #0f6e8f);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.tc-calc__detail summary::-webkit-details-marker { display: none; }
.tc-calc__detail summary::before {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s;
}
.tc-calc__detail[open] summary::before { transform: rotate(45deg); }
.tc-calc .tc-calc__detail-list {
	margin: 0;
	padding: 0 14px 14px 30px;
	list-style: none;
	color: var(--tc-primary, #1f3a4d);
	font-size: .925rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.55;
}
.tc-calc .tc-calc__detail-list li { margin: 4px 0; overflow-wrap: anywhere; }

.tc-calc .tc-calc__note {
	margin: 14px 0 0;
	color: var(--tc-muted, #4f5d66);
	font-size: .875rem;
	line-height: 1.5;
}
.tc-calc__note strong { color: var(--tc-primary, #1f3a4d); }
.tc-calc__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}
.tc-calc__tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 1 1 160px;
	min-height: 44px;
	padding: 8px 14px;
	border: 1.5px solid var(--tc-field-border, #8faebf);
	border-radius: 10px;
	background: var(--tc-bg, #fff);
	color: var(--tc-primary, #1f3a4d);
	font: inherit;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
}
.tc-calc__tool:hover { border-color: var(--tc-link, #0f6e8f); background: var(--tc-surface-alt, #f6f9fb); }
.tc-calc__tool.is-copied { border-color: #2E7D4F; color: #1F5E39; }

/* Stale result (inputs changed after « Calculer »), reveal on new result */
.tc-calc__results.is-stale .tc-calc__key-value,
.tc-calc__results.is-stale dd { opacity: .4; }
.tc-calc__results.is-stale .tc-calc__results-title-note,
.tc-calc__results.is-stale .tc-step__title::after {
	content: "modifié : cliquez sur Calculer";
	display: inline;
	margin-left: 4px;
	color: var(--tc-accent-text, #a8510a);
	font-family: var(--tc-font-text, inherit);
	font-size: .875rem;
	font-weight: 600;
}
@keyframes tc-calc-reveal {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
.tc-calc__results.is-revealed .tc-calc__key,
.tc-calc__results.is-revealed .tc-calc__list {
	animation: tc-calc-reveal .35s ease-out both;
}
.tc-calc__results.is-revealed .tc-calc__list { animation-delay: .08s; }

/* ---- Wider cards: tablets and desktop ---- */
@container (min-width: 560px) {
	.tc-calc__head { padding: 22px 28px 26px; }
	.tc-calc__inputs { padding: 8px 28px 0; }
	.tc-calc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
	.tc-row__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-field--wide { grid-column: 1 / -1; }
	.tc-calc__actions { display: flex; flex-wrap: wrap; }
	.tc-calc__btn--go { min-width: 200px; }
	.tc-calc__btn--reset { min-width: 160px; }
	.tc-rows__add { width: auto; }
	.tc-calc__results { padding: 22px 28px 24px 36px; }
	.tc-calc__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; padding: 4px 18px; }
	.tc-calc__item:nth-child(2) { border-top: 0; }
	.tc-calc__item.is-wide { grid-column: 1 / -1; }
	.tc-calc__tools { justify-content: flex-start; }
	.tc-calc__tool { flex: 0 0 auto; }
}
@container (min-width: 720px) {
	.tc-row__grid:has(> :nth-child(3):not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.tc-calc *,
	.tc-calc__results.is-revealed .tc-calc__key,
	.tc-calc__results.is-revealed .tc-calc__list { transition: none !important; animation: none !important; }
}

/* Print: the « Imprimer » button prints this calculator only */
@media print {
	body.tc-print-calc * { visibility: hidden; }
	body.tc-print-calc .tc-calc.is-printing,
	body.tc-print-calc .tc-calc.is-printing * { visibility: visible; }
	body.tc-print-calc .tc-calc.is-printing { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
	.tc-calc__actions, .tc-rows__add, .tc-row__remove, .tc-calc__tools { display: none !important; }
	.tc-calc__detail { display: block; }
	.tc-calc__detail-list { display: block; }
	.tc-calc__head { background: none !important; color: #000; }
	.tc-calc__head::before, .tc-calc__head::after { display: none; }
	.tc-calc .tc-calc__title, .tc-calc .tc-calc__sub, .tc-calc .tc-calc__badge { color: #000; }
}

/* ---- Live mode (data-tc-live): calm hint instead of errors, « Voir le résultat » chip on one-column layouts ---- */
.tc-calc .tc-calc__empty.is-hint { color: var(--tc-primary, #1f3a4d); }
.tc-calc[data-tc-live] .tc-field__error { color: var(--tc-accent-text, #a8510a); }
.tc-calc[data-tc-live] .tc-field__error::before { background: var(--tc-accent-text, #a8510a); }
.tc-calc[data-tc-live] .tc-field__control:has([aria-invalid="true"]) { border-color: var(--tc-accent-text, #a8510a); background: var(--tc-bg, #fff); }
.tc-calc__jump {
	position: sticky;
	bottom: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0 0 12px auto;
	padding: 8px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--tc-primary, #1f3a4d);
	color: var(--tc-bg, #fff);
	font: inherit;
	font-weight: 700;
	box-shadow: 0 6px 18px color-mix(in srgb, var(--tc-primary, #1f3a4d) 30%, transparent);
	cursor: pointer;
}
@media print { .tc-calc__jump { display: none !important; } }
