/*
	La Capitainerie (lot 20) on the Hublot design system: tokens, typography and hull come from
	Adviser.IA.SqlChat.Ui (hublot.css, loaded first). No Bootstrap here: the classes below are the
	board's own (Docs/Saas/planche-interactive/hublot.css), the same as the portal's sheet, so its
	screens carry over as they are. Dark mode hangs on <html data-theme="dark">, never on a
	prefers-color-scheme query.
*/

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font: 400 16px/1.5 var(--font-text);
	-webkit-text-size-adjust: 100%;
}

h1, h2, h3, p {
	margin: 0;
}

h1 {
	font-size: 36px;
	font-weight: 700;
	line-height: 1.15;
}

h1:focus {
	outline: none;
}

h2 {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
}

h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

a {
	color: var(--primary);
}

button {
	font: inherit;
}

.muted {
	color: var(--ink2);
}

.small {
	font-size: 15px;
}

.nums {
	font-variant-numeric: tabular-nums;
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.row-between {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
}

.row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	min-width: 0;
}

.prose {
	max-width: 66ch;
}

/* Side by side, one under the other on a narrow screen (the list and the sheet of a client). */
.cols {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
}

.cols > * {
	min-width: 0;
}

.tone-ok {
	color: var(--ok);
}

.tone-warn {
	color: var(--warn);
}

.tone-danger {
	color: var(--danger);
}

/* Read by a screen reader, never seen. */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 4px 18px;
	border: 1px solid transparent;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.btn:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.btn-primary {
	background: var(--cta);
	color: var(--on-cta);
	font-weight: 700;
}

.btn-primary:hover {
	background: var(--cta-hover);
}

.btn-second {
	background: var(--surface);
	color: var(--ink);
	border-color: var(--line-strong);
}

.btn-second:hover {
	background: var(--raised);
}

.btn-hull {
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--hull-tick);
	background: transparent;
	color: var(--hull-ink);
	cursor: pointer;
}

.btn-hull:hover {
	background: var(--hull-2);
}

.btn-hull:focus-visible {
	outline: 2px solid var(--hull-copper);
	outline-offset: 2px;
}

.btn-link {
	padding-inline: 8px;
	background: transparent;
	color: var(--primary);
	text-decoration: underline;
}

.btn[disabled] {
	background: transparent;
	color: var(--ink3);
	border: 1px dashed var(--line-strong);
	font-weight: 400;
	cursor: not-allowed;
}

.btn-link[disabled] {
	border-color: transparent;
	text-decoration: none;
}

.row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* A line of a table that opens what it names (the client's sheet). */
.row-btn {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.row-btn:hover {
	text-decoration: underline;
}

.row-btn:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

/* ---------- forms ---------- */

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.field > label,
.legend {
	font-weight: 600;
}

.input {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}

.input:focus-visible,
input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

textarea.input {
	display: block;
	resize: vertical;
}

/* ---------- an answer to a reseller's question (lot 20e), as the portal's card ---------- */

/* The board's segmented choice: one pressed among a few. */
.seg {
	display: inline-flex;
	flex-wrap: wrap;
	border: 1px solid var(--line-strong);
}

.seg button {
	min-height: 42px;
	padding: 0 14px;
	border: 0;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
}

.seg button:hover:not([aria-pressed="true"]) {
	background: var(--raised);
}

.seg button[aria-pressed="true"] {
	background: var(--primary);
	color: var(--on-primary);
	font-weight: 600;
}

.seg button:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: -2px;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	min-height: 44px;
	padding: 4px 12px;
	border: 1px solid var(--line-strong);
	background: transparent;
	color: var(--ink2);
	text-align: left;
	cursor: pointer;
}

.chip:hover:not([disabled]) {
	border-color: var(--primary);
	color: var(--ink);
}

.chip[disabled] {
	cursor: not-allowed;
	color: var(--ink3);
}

.chip:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.turn {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.turn-q {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.steps {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.steps li {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ink3);
}

.steps li[data-on="true"] {
	color: var(--ink);
	font-weight: 600;
}

.steps li[data-done="true"] {
	color: var(--ok);
}

pre.sql {
	margin: 8px 0 0;
	padding: 12px;
	background: var(--raised);
	color: var(--ink);
	font: 14px/1.5 var(--font-mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--primary);
}

.check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	cursor: pointer;
}

.check-top {
	align-items: flex-start;
	padding-block: 10px;
}

.check-top input {
	margin-top: 2px;
}

/* An invitation link to copy: long, never cut, selected whole. */
.link-box {
	display: block;
	min-height: 0;
	font-family: var(--font-mono);
	font-size: 14px;
	overflow-wrap: anywhere;
	user-select: all;
}

/* A Cabine's pairing code (lot 20d), shown once: large, spaced, selected whole. */
.pairing-code {
	font-family: var(--font-title);
	font-size: 32px;
	line-height: 1.15;
	letter-spacing: .04em;
	user-select: all;
}

/* A refusal shown beside what it refuses (a step of the wizard, a part of the configurator). */
.error {
	color: var(--danger);
	font-weight: 600;
	font-size: 15px;
}

/* The steps of the wizard « Nouveau client » (lot 20d), as the board's. */
.stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.stepper li {
	flex: 1 1 130px;
	min-width: 0;
}

.stepper button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 56px;
	padding: 8px 12px;
	border: 0;
	border-top: 3px solid var(--line-strong);
	background: transparent;
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.stepper button:hover {
	background: var(--raised);
}

.stepper button:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.stepper button[disabled] {
	color: var(--ink3);
	cursor: not-allowed;
}

.stepper li[data-done="true"] button {
	border-top-color: var(--copper-deco);
}

.stepper li[data-on="true"] button {
	border-top-color: var(--copper-deco);
	background: var(--surface);
	font-weight: 700;
}

.stepper .num {
	font-family: var(--font-title);
	font-size: 22px;
	line-height: 1;
}

/* A list to pick from (the tables of a base in the configurator), as the board's. */
.pick-list {
	border: 1px solid var(--line);
	background: var(--surface);
}

.pick-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 12px;
	border-bottom: 1px solid var(--line);
}

.pick-row:last-child {
	border-bottom: 0;
}

.pick-row[data-on="true"] {
	background: var(--info-soft);
}

.pick-row button {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.pick-row button:hover {
	text-decoration: underline;
}

.pick-row button:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.pick-row[data-on="true"] button {
	font-weight: 700;
}

/* A YAML fragment edited by hand (premium): monospaced, long. */
.yaml-box {
	min-height: 220px;
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1.45;
}

/* ---------- tabs ---------- */

.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 2px solid var(--line-strong);
}

.tabs button {
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	cursor: pointer;
}

.tabs button[aria-pressed="true"] {
	background: var(--raised);
	font-weight: 700;
}

.tabs button:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

/* ---------- panels, notices, cards ---------- */

.panel {
	background: var(--line);
	padding: 1px;
	clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}

.panel-in {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	background: var(--surface);
	clip-path: polygon(15.6px 0, calc(100% - 15.6px) 0, 100% 15.6px, 100% calc(100% - 15.6px), calc(100% - 15.6px) 100%, 15.6px 100%, 0 calc(100% - 15.6px), 0 15.6px);
}

.notice {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-top: 2px solid transparent;
	color: var(--ink);
}

.notice > div {
	flex: 1 1 280px;
	min-width: 0;
}

.notice-info {
	background: var(--info-soft);
	border-top-color: var(--info);
}

.notice-warn {
	background: var(--warn-soft);
	border-top-color: var(--warn);
}

.notice-ok {
	background: var(--ok-soft);
	border-top-color: var(--ok);
}

.notice-danger {
	background: var(--danger-soft);
	border-top-color: var(--danger);
}

/* The parts of a client's sheet, as the board's panel: key facts in two columns, lists of items. Global, not
   scoped: the tabs of lot 20c are child components of the sheet. */
.sheet-facts {
	display: grid;
	grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
	gap: 8px 16px;
	margin: 0;
}

.sheet-facts dt {
	font-weight: 600;
}

.sheet-facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.sheet-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sheet-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	background: var(--surface);
}

.sheet-item-wide {
	flex-direction: column;
	align-items: stretch;
}

.sheet-tight {
	gap: 2px;
}

.sheet-mail {
	overflow-wrap: anywhere;
}

/* The month's meter of a client, as the board's: a bar in copper, its share next to it (the list
   and the sheet's consumption). */
.meter-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}

.meter {
	flex: 1 1 60px;
	min-width: 60px;
	height: 8px;
	background: var(--line);
}

.meter > div {
	height: 8px;
	background: var(--copper-deco);
}

.meter-row > span {
	white-space: nowrap;
	font-weight: 600;
}

/* What waits in a line of the hull's navigation (the alerts to handle), as the board's. */
.depth .count {
	margin-left: auto;
	padding-left: 8px;
	color: var(--hull-copper);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

input[type="radio"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--primary);
}

input[type="radio"]:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.card {
	padding: 20px;
	border: 1px solid var(--line);
	background: var(--surface);
}

/* ---------- key figures ---------- */

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line-strong);
	font-variant-numeric: tabular-nums;
}

.fact-n {
	font-family: var(--font-title);
	font-size: 32px;
	line-height: 1.15;
}

/* ---------- tables ---------- */

.tbl-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	background: var(--surface);
}

.tbl {
	width: 100%;
	border-collapse: collapse;
	font: inherit;
	color: inherit;
	font-variant-numeric: tabular-nums;
}

.tbl th,
.tbl td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: middle;
}

.tbl thead th {
	border-bottom: 2px solid var(--line-strong);
	white-space: nowrap;
}

.tbl tbody tr:last-child > * {
	border-bottom: 0;
}

.tbl .n {
	text-align: right;
	white-space: nowrap;
}

.tbl tr[data-on="true"] {
	background: var(--info-soft);
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 30px;
	padding: 2px 10px;
	font-weight: 600;
	white-space: nowrap;
}

.pill-ok {
	background: var(--ok-soft);
	color: var(--ok);
}

.pill-warn {
	background: var(--warn-soft);
	color: var(--warn);
}

.pill-danger {
	background: var(--danger-soft);
	color: var(--danger);
}

.pill-info {
	background: var(--info-soft);
	color: var(--info);
}

.pill-plain {
	background: var(--raised);
	color: var(--ink2);
}

/* ---------- outside the hull: the way to the sign-in, its failure ---------- */

.way {
	align-items: center;
	text-align: center;
}

.way-panel {
	width: min(560px, 100%);
}

/* ---------- Blazor's own ---------- */

#blazor-error-ui {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 1000;
	width: 100%;
	padding: 10px 20px 11px;
	background: var(--warn-soft);
	color: var(--ink);
	box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}

#blazor-error-ui .dismiss {
	position: absolute;
	top: 8px;
	right: 12px;
	cursor: pointer;
}

.loading-progress {
	position: relative;
	display: block;
	width: 8rem;
	height: 8rem;
	margin: 20vh auto 1rem auto;
}

.loading-progress circle {
	fill: none;
	stroke: var(--line);
	stroke-width: .6rem;
	transform-origin: 50% 50%;
	transform: rotate(-90deg);
}

.loading-progress circle:last-child {
	stroke: var(--ink2);
	stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
	transition: stroke-dasharray .05s ease-in-out;
}

.loading-progress-text {
	position: absolute;
	inset: calc(20vh + 3.25rem) 0 auto .2rem;
	text-align: center;
	font-weight: 600;
	color: var(--ink2);
}

.loading-progress-text:after {
	content: var(--blazor-load-percentage-text, "Chargement");
}
