.jt-tool,
.jt-doors {
	--jt-accent: #155eef;
	--jt-border: #cbd5e1;
	--jt-surface: #f8fafc;
	--jt-text: #172033;
	border: 1px solid var(--jt-border);
	border-radius: 1rem;
	color: var(--jt-text);
	margin-block: 1.5rem;
	padding: clamp(1rem, 3vw, 2rem);
}

.jt-tool *,
.jt-doors * {
	box-sizing: border-box;
}

.jt-tool__header h2,
.jt-doors h2 {
	margin-block-start: 0;
}

.jt-tool__purpose,
.jt-tool__outcome {
	margin-block: 0.55rem 0;
	line-height: 1.55;
}

.jt-tool__purpose strong,
.jt-tool__outcome strong {
	display: inline;
	color: var(--jt-vermilion, #c83b25);
	font-weight: 800;
	margin-inline-end: 0.25rem;
}

.jt-tool__outcome {
	color: #334155;
}

.jt-tool__privacy {
	color: #475569;
	margin-block-start: 1rem;
	margin-block-end: 0;
}

.jt-tool__status {
	font-weight: 700;
	min-height: 1.5em;
	margin-block-start: .5rem;
}

.jt-form,
.jt-star {
	display: grid;
	gap: 1rem;
}

.jt-fields {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	margin-block: 0;
}

.jt-fields label,
.jt-form > label,
.jt-analysis label {
	display: grid;
	font-weight: 700;
	gap: .35rem;
}

.jt-field--wide {
	grid-column: 1 / -1;
}

.jt-tool input,
.jt-tool select,
.jt-tool textarea,
.jt-tool button,
.jt-file-button {
	font: inherit;
}

.jt-tool input,
.jt-tool select,
.jt-tool textarea {
	border: 1px solid #94a3b8;
	border-radius: .4rem;
	padding: .65rem;
	width: 100%;
}

.jt-tool textarea {
	min-height: 7rem;
	resize: vertical;
}

.jt-tool button,
.jt-file-button {
	background: var(--jt-accent);
	border: 2px solid var(--jt-accent);
	border-radius: .4rem;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font-weight: 700;
	justify-self: start;
	margin-block: 0;
	padding: .55rem .85rem;
}

/* Boutons hors formulaire (checklist, etc.) : garder un air sous les champs */
.jt-tool > button,
.jt-checklist + button {
	margin-block-start: 1rem;
}

.jt-tool button:focus-visible,
.jt-tool input:focus-visible,
.jt-tool select:focus-visible,
.jt-tool textarea:focus-visible,
.jt-door:focus-visible,
.jt-file-button:focus-within {
	outline: 3px solid #f59e0b;
	outline-offset: 3px;
}

.jt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-block-start: 1rem;
}

.jt-file-button input {
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.jt-table-wrap {
	overflow-x: auto;
}

.jt-tool table {
	border-collapse: collapse;
	margin-block-start: 1rem;
	width: 100%;
}

.jt-tool th,
.jt-tool td {
	border-bottom: 1px solid var(--jt-border);
	padding: .65rem;
	text-align: left;
}

.jt-checklist,
.jt-official-links {
	list-style: none;
	padding: 0;
}

.jt-checklist label {
	align-items: flex-start;
	display: flex;
	gap: .65rem;
	padding: .55rem 0;
}

.jt-checklist input {
	margin-block-start: .2rem;
	width: auto;
}

.jt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	padding: 0;
}

.jt-tags li {
	background: #dbeafe;
	border-radius: 999px;
	padding: .3rem .7rem;
}

.jt-analysis {
	background: var(--jt-surface);
	border-radius: .6rem;
	margin-block-start: 1rem;
	padding: 1rem;
}

.jt-analysis [data-jt-evidence] {
	display: grid;
	gap: .8rem;
}

.jt-doors ol {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	list-style: none;
	padding: 0;
}

.jt-door {
	border: 1px solid var(--jt-border);
	border-radius: .75rem;
	color: inherit;
	display: grid;
	gap: .4rem;
	height: 100%;
	padding: 1rem;
	text-decoration: none;
}

.jt-door:hover {
	border-color: var(--jt-accent);
	box-shadow: 0 .25rem .75rem rgb(15 23 42 / 10%);
}

.jt-door__number {
	align-items: center;
	background: var(--jt-accent);
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	font-weight: 700;
	height: 2rem;
	justify-content: center;
	width: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
	.jt-door {
		transition: border-color .15s ease, box-shadow .15s ease;
	}
}
