/**
 * Renovexo — calculators. Maps the travaux-calculateurs plugin tokens (--tc-*) to the brand, then adds the
 * Renovexo details: solid blue header with a yellow base line, graphite borders with the « press » shadow, minium
 * « Calculer », result figure in Unbounded on a pale yellow plate. Also the calculator tiles (homepage sheet and
 * /calculateurs/ hub) and the hub index.
 */

/* ---- Plugin token mapping --------------------------------------------------------------------------------- */

.tc-calc {
	--tc-bg: #FFFFFF;
	--tc-primary: var(--rv-ink);
	--tc-primary-soft: var(--rv-calque);
	--tc-secondary: var(--rv-blue);
	--tc-accent: var(--rv-yellow);
	--tc-accent-text: var(--rv-ink);
	--tc-cta: var(--rv-minium);
	--tc-link: var(--rv-blue);
	--tc-muted: var(--rv-muted);
	--tc-line: var(--rv-ink);
	--tc-field-border: var(--rv-ink);
	--tc-surface: var(--rv-plaster);
	--tc-surface-alt: var(--rv-calque);
	--tc-error: var(--rv-minium-text);
	--tc-radius: 18px;
	--tc-radius-control: 10px;
	--tc-shadow: 0 6px 0 var(--rv-ink);
	--tc-font-head: var(--rv-font-head);
	--tc-font-text: var(--rv-font-body);
	--tc-head-pattern: none;
	border-width: 2px;
	font-size: 1.02rem;
}

/* Header: solid blue (not the plugin's dark fade), yellow base line */
.tc-calc .tc-calc__head { background: radial-gradient(ellipse 60% 90% at 90% 0%, rgba(128, 146, 255, .35), transparent 70%), linear-gradient(160deg, #2433B4 0%, var(--rv-blue) 60%, #3A4CD4 100%); padding-bottom: 30px; }
.tc-calc .tc-calc__head::before { display: none; }
.tc-calc .tc-calc__head::after { height: 8px; background: var(--rv-yellow); border-top: 2px solid var(--rv-ink); }
.tc-calc .tc-calc__badge {
	padding: 4px 12px 4px 6px;
	border: 2px solid var(--rv-ink);
	border-radius: 999px;
	background: var(--rv-yellow);
	color: var(--rv-ink);
	font-weight: 700;
}
.rv-calc-badge__icon { display: inline-grid; place-items: center; }
.tc-calc .tc-calc__title { color: #FFFFFF; font-weight: 800; letter-spacing: -.02em; }
.tc-calc .tc-calc__sub { color: var(--rv-calque); }

/* Steps */
.tc-calc .tc-step__num {
	border: 2px solid var(--rv-ink);
	background: var(--rv-yellow);
	color: var(--rv-ink);
	font-family: var(--rv-font-head);
	font-weight: 800;
}
.tc-calc .tc-step__title { font-family: var(--rv-font-head); font-weight: 600; letter-spacing: -.01em; }

/* Fields */
.tc-calc .tc-field__control {
	border-width: 2px;
	font-family: var(--rv-font-body);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.tc-calc .tc-field__control:focus {
	outline: none;
	border-color: var(--rv-blue);
	box-shadow: 0 0 0 4px var(--rv-calque);
}
.tc-calc .tc-field__unit { font-weight: 700; color: var(--rv-muted); }
.tc-calc .tc-field__help { color: var(--rv-muted); }
.tc-calc .tc-pill { border-width: 2px; font-weight: 700; }
.tc-calc .tc-row { border-width: 2px; border-style: dashed; }

/* Buttons: Calculer (minium, press shadow) and Réinitialiser (outline) */
.tc-calc .tc-calc__btn {
	min-height: 52px;
	border: 2px solid var(--rv-ink);
	border-radius: 10px;
	font-family: var(--rv-font-head);
	font-weight: 600;
	box-shadow: 0 4px 0 var(--rv-ink);
	transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.tc-calc .tc-calc__btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--rv-ink); }
.tc-calc .tc-calc__btn--go { background: linear-gradient(180deg, #E64A1E 0%, var(--rv-minium) 100%); color: #FFFFFF; }
.tc-calc .tc-calc__btn--go:hover { background: var(--rv-minium-text); }
.tc-calc .tc-calc__btn--reset { background: #FFFFFF; color: var(--rv-ink); }
.tc-calc .tc-calc__btn--reset:hover { background: var(--rv-calque); }

/* Results */
.tc-calc .tc-calc__results { border-top: 2px solid var(--rv-ink); }
.tc-calc .tc-calc__results::before { background: var(--rv-yellow); }
.tc-calc .tc-calc__key {
	padding: 16px 18px;
	border: 2px solid var(--rv-ink);
	border-radius: 12px;
	background: var(--rv-yellow-soft);
}
.tc-calc .tc-calc__key-value {
	color: var(--rv-ink);
	font-family: var(--rv-font-head);
	font-weight: 800;
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}
.tc-calc .tc-calc__icon { background: var(--rv-blue); color: #FFFFFF; }
.tc-calc dd { font-variant-numeric: tabular-nums; }
.tc-calc .tc-calc__tool { border-width: 2px; border-color: var(--rv-ink); font-weight: 700; }

/* Devis callout under every result */
.rv-calc-devis-cta {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 20px;
	padding: 18px 20px;
	border: 2px solid var(--rv-ink);
	border-radius: 14px;
	background: var(--rv-minium-soft);
}
.rv-calc-devis-cta__text { display: grid; gap: 4px; }
.rv-calc-devis-cta__text strong { font-family: var(--rv-font-head); font-size: 1rem; font-weight: 600; }
.rv-calc-devis-cta__text span { color: #3A3F4B; font-size: .95rem; }
@media (min-width: 700px) {
	.rv-calc-devis-cta { flex-direction: row; align-items: center; justify-content: space-between; }
	.rv-calc-devis-cta .rv-btn { flex: none; }
}

/* Calculator page body: the hero already carries the title and intro, the card header keeps only its badge */
.rv-calc-tool-body { padding-block: clamp(32px, 5vw, 56px) 8px; }
.rv-calc-tool-body .tc-calc { max-width: 860px; margin-inline: auto; }
.rv-calc-tool-body .tc-calc__title,
.rv-calc-tool-body .tc-calc__sub { display: none; }
.rv-calc-tool-body .tc-calc .tc-calc__head { padding-top: 16px; padding-bottom: 26px; }

/* ---- Calculator tiles (homepage sheet + hub) -------------------------------------------------------------- */

.rv-calc-sheet { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .rv-calc-sheet { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rv-calc-sheet { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.rv-calc-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 22px 22px 0;
	overflow: hidden;
	border: var(--rv-border);
	border-radius: var(--rv-radius);
	background: var(--rv-white);
	color: var(--rv-ink);
	text-decoration: none;
	box-sizing: border-box;
	transition: transform .15s ease, box-shadow .15s ease;
}
.rv-calc-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--rv-yellow); color: var(--rv-ink); }
.rv-calc-sheet--light .rv-calc-tile:hover { box-shadow: var(--rv-press); }
.rv-calc-tile__unit {
	/* the unit of the result, set big and pale like a mark on a plan */
	position: absolute;
	right: 16px;
	top: 8px;
	color: var(--rv-calque);
	font-family: var(--rv-font-head);
	font-size: 2.6rem;
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1;
}
.rv-calc-tile__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-bottom: 18px;
	border: var(--rv-border);
	border-radius: 12px;
	background: var(--rv-yellow);
}
.rv-calc-tile__title { position: relative; font-family: var(--rv-font-head); font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.rv-calc-tile__desc { margin: 8px 0 20px; color: var(--rv-muted); font-size: .95rem; line-height: 1.5; }
.rv-calc-tile__go {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: auto -22px 0;
	padding: 12px 22px;
	border-top: var(--rv-border);
	background: var(--rv-plaster);
	color: var(--rv-minium-text);
	font-family: var(--rv-font-head);
	font-size: .88rem;
	font-weight: 600;
}

.rv-calc-tile:hover .rv-calc-tile__go { background: var(--rv-yellow-soft); }

/* ---- Hub ---------------------------------------------------------------------------------------------- */

.rv-calc-hub { padding-block: clamp(36px, 5vw, 64px) 8px; }
.rv-calc-hub__index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(36px, 5vw, 56px); }
.rv-calc-hub__index a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 8px 0 14px;
	border: var(--rv-border);
	border-radius: 999px;
	background: var(--rv-white);
	color: var(--rv-ink);
	font-weight: 700;
	font-size: .92rem;
	text-decoration: none;
}
.rv-calc-hub__index a span {
	display: inline-grid;
	place-items: center;
	min-width: 26px;
	height: 26px;
	border-radius: 999px;
	background: var(--rv-blue);
	color: var(--rv-white);
	font-size: .78rem;
}
.rv-calc-hub__index a:hover { background: var(--rv-yellow); }
.rv-calc-group { margin-bottom: clamp(40px, 6vw, 64px); scroll-margin-top: 24px; }
.rv-calc-group__title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 22px;
	font-size: clamp(1.2rem, 1.05rem + .6vw, 1.55rem);
	font-weight: 700;
}
