/*
 * ZIEU — feuille de style de l'interface métier.
 *
 * Densité assumée : un poste de cabinet affiche beaucoup d'information sur
 * un écran, et l'œil doit trouver une valeur sans faire défiler.
 */

.zieu {
	--zieu-ink: #0f1b26;
	--zieu-ink-2: #3b4c5c;
	--zieu-muted: #6a7b8b;
	--zieu-line: #dde4ec;
	--zieu-line-2: #eaeff5;
	--zieu-bg: #f3f6fa;
	--zieu-card: #fff;
	--zieu-accent: #1a5f97;
	--zieu-accent-l: #eaf1f8;
	--zieu-deep: #0d2942;
	--zieu-deep-2: #17456b;
	--zieu-od: #b8452b;
	--zieu-os: #0d7a8a;
	--zieu-warn: #a8720c;
	--zieu-alert: #b8452b;
	--zieu-ok: #2e6f57;
	--zieu-radius: 9px;
	--zieu-serif: "Newsreader", "Iowan Old Style", Georgia, serif;

	color: var(--zieu-ink);
	max-width: 1560px;
}

/* -- Titres ------------------------------------------------------------ */

.zieu-h1 {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 22px;
	margin: 12px 0 18px;
	padding: 0;
}

.zieu-h1__sub {
	font-size: 13px;
	font-weight: 400;
	color: var(--zieu-muted);
}

.zieu h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--zieu-muted);
	margin: 0 0 12px;
}

.zieu h3 {
	font-size: 13px;
	margin: 18px 0 8px;
	color: var(--zieu-muted);
}

.zieu-link {
	font-size: 12px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	margin-left: auto;
}

/* -- Structure --------------------------------------------------------- */

.zieu-card {
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 16px 18px;
	margin-bottom: 16px;
}

.zieu-column > .zieu-card:last-child {
	margin-bottom: 0;
}

.zieu-grid {
	display: grid;
	gap: 16px;
	align-items: start;
}

.zieu-grid--dashboard { grid-template-columns: 1fr 1.4fr 1fr; }
.zieu-grid--patient { grid-template-columns: minmax(420px, 1fr) 1.2fr; }
.zieu-grid--consultation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zieu-grid--billing { grid-template-columns: 2fr 1fr; }
.zieu-grid--invoice { grid-template-columns: 2fr 1fr; }
.zieu-grid--settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.zieu-card--wide { grid-column: 1 / -1; }

@media (max-width: 1400px) {
	.zieu-grid--dashboard,
	.zieu-grid--patient,
	.zieu-grid--consultation,
	.zieu-grid--billing,
	.zieu-grid--invoice,
	.zieu-grid--settings {
		grid-template-columns: 1fr;
	}
}

/* -- Indicateurs ------------------------------------------------------- */

.zieu-kpis {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.zieu-kpi {
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 12px 18px;
	min-width: 130px;
}

.zieu-kpi.is-active { border-color: var(--zieu-accent); }
.zieu-kpi.is-warn { border-color: var(--zieu-warn); }

.zieu-kpi__value {
	display: block;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.zieu-kpi__label {
	display: block;
	font-size: 11px;
	color: var(--zieu-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* -- Tableaux ---------------------------------------------------------- */

.zieu-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

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

.zieu-table thead th {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--zieu-muted);
	border-bottom-width: 2px;
}

.zieu-table--list tbody tr:hover { background: #fafbfc; }

.zieu-num { text-align: right; }
.zieu-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; }
.zieu-muted { color: var(--zieu-muted); font-size: 12px; }
.zieu-empty { color: var(--zieu-muted); font-style: italic; padding: 8px 0; }
.zieu-td--time { width: 56px; font-variant-numeric: tabular-nums; }
.zieu-td--status { width: 90px; }
.zieu-td--action { width: 100px; text-align: right; }

tr.is-overdue td { background: #fdf6f4; }
tr.is-alert td { background: #fdf3f2; }

/* -- Étiquettes -------------------------------------------------------- */

.zieu-tag {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 10px;
	background: #eef0f2;
	color: var(--zieu-muted);
	font-size: 11px;
	line-height: 1.7;
	white-space: nowrap;
}

.zieu-tag--paid, .zieu-tag--signed { background: #e6f2ec; color: var(--zieu-ok); }
.zieu-tag--draft { background: #f0f0f1; }
.zieu-tag--cancelled, .zieu-tag--dunned { background: #fbeae8; color: var(--zieu-alert); }
.zieu-tag--reminded { background: #fdf3e2; color: var(--zieu-warn); }
.zieu-tag--flag, .zieu-tag--dilate { background: #fdf3e2; color: var(--zieu-warn); }

.zieu-badge {
	background: var(--zieu-accent);
	color: #fff;
	border-radius: 10px;
	padding: 0 7px;
	font-size: 11px;
}

.zieu-eye {
	display: inline-block;
	min-width: 30px;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	background: #eef0f2;
}

.zieu-eye--OD { background: #f7e8e3; color: var(--zieu-od); }
.zieu-eye--OS { background: #e4edf2; color: var(--zieu-os); }
.zieu-eye--OU { background: #ecebf2; color: #5a4b8a; }

.zieu-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* -- Bannières --------------------------------------------------------- */

.zieu-banner {
	border-left: 3px solid var(--zieu-warn);
	background: #fdf9f0;
	padding: 8px 12px;
	margin-bottom: 10px;
	font-size: 13px;
	border-radius: 0 4px 4px 0;
}

.zieu-banner--allergy { border-left-color: var(--zieu-alert); background: #fdf4f3; }

/* -- Formulaires ------------------------------------------------------- */

.zieu-field { margin-bottom: 12px; flex: 1; min-width: 0; }
.zieu-field--narrow { flex: 0 0 130px; }

.zieu-field label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--zieu-muted);
	margin-bottom: 3px;
}

.zieu-field input[type="text"],
.zieu-field input[type="tel"],
.zieu-field input[type="email"],
.zieu-field input[type="date"],
.zieu-field input[type="time"],
.zieu-field input[type="number"],
.zieu-field input[type="password"],
.zieu-field input[type="datetime-local"],
.zieu-field select,
.zieu-field textarea {
	width: 100%;
	max-width: none;
}

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

.zieu-check {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-size: 13px !important;
	color: var(--zieu-ink) !important;
}

.zieu-hint { display: block; font-size: 11px; color: var(--zieu-muted); margin-top: 3px; }
.zieu-hint--warn { color: var(--zieu-alert); }

.zieu-inline-form {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--zieu-line);
}

.zieu-inline-form input[type="text"] { flex: 1; min-width: 140px; }

.zieu-search { display: flex; gap: 8px; margin-bottom: 16px; }
.zieu-search input[type="search"] { flex: 1; max-width: 640px; font-size: 15px; padding: 6px 10px; }

.zieu-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

.zieu-actionbar {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 10px 14px;
	margin-top: 16px;
	z-index: 5;
}

.zieu-spacer { flex: 1; }
.zieu-actionbar__state { font-size: 12px; color: var(--zieu-muted); }
.zieu-actionbar__state.is-ok { color: var(--zieu-ok); }
.zieu-actionbar__state.is-error { color: var(--zieu-alert); }

/* -- Salle d'attente et tâches ----------------------------------------- */

.zieu-queue, .zieu-tasks, .zieu-timeline, .zieu-problems { list-style: none; margin: 0; padding: 0; }

.zieu-queue__item {
	display: grid;
	grid-template-columns: 48px 1fr auto auto;
	gap: 10px;
	align-items: center;
	padding: 7px 0;
	border-bottom: 1px solid var(--zieu-line);
	font-size: 13px;
}

.zieu-queue__item.is-late .zieu-queue__wait { color: var(--zieu-alert); font-weight: 600; }
.zieu-queue__time { font-variant-numeric: tabular-nums; color: var(--zieu-muted); }
.zieu-queue__wait { font-variant-numeric: tabular-nums; }
.zieu-queue__status { font-size: 11px; color: var(--zieu-muted); }

.zieu-task {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font-size: 13px;
	border-bottom: 1px solid var(--zieu-line);
}

.zieu-task.is-done span { text-decoration: line-through; color: var(--zieu-muted); }
.zieu-task--high { border-left: 3px solid var(--zieu-alert); padding-left: 8px; }
.zieu-task label { display: flex; align-items: center; gap: 6px; flex: 1; }

.zieu-timeline li, .zieu-problems li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	border-bottom: 1px solid var(--zieu-line);
	font-size: 13px;
}

/* -- Agenda ------------------------------------------------------------ */

.zieu-toolbar {
	display: flex;
	gap: 16px;
	align-items: center;
	flex-wrap: wrap;
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 10px 14px;
	margin-bottom: 12px;
}

.zieu-toolbar__group { display: flex; gap: 6px; align-items: center; }
.zieu-toolbar__group--right { margin-left: auto; }
.zieu-toolbar__label { font-size: 11px; text-transform: uppercase; color: var(--zieu-muted); }

.zieu-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--zieu-muted); }
.zieu-legend__item { display: flex; align-items: center; gap: 4px; }
.zieu-legend__item i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.zieu-agenda {
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	overflow: auto;
	padding: 0 8px 8px;
}

.zieu-agenda__grid {
	display: grid;
	grid-template-columns: 52px repeat(var(--zieu-days), minmax(150px, 1fr));
	gap: 0;
}

.zieu-agenda__gutter { position: relative; margin-top: 34px; }

.zieu-agenda__hour {
	position: absolute;
	right: 8px;
	transform: translateY(-50%);
	font-size: 11px;
	color: var(--zieu-muted);
	font-variant-numeric: tabular-nums;
}

.zieu-agenda__col { border-left: 1px solid var(--zieu-line); }
.zieu-agenda__col.is-today { background: #fbfcfd; }

.zieu-agenda__colhead {
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 12px;
	color: var(--zieu-muted);
	border-bottom: 1px solid var(--zieu-line);
	position: sticky;
	top: 0;
	background: inherit;
	z-index: 2;
}

.zieu-agenda__col.is-today .zieu-agenda__colhead { color: var(--zieu-accent); font-weight: 600; }

.zieu-agenda__canvas { position: relative; }

.zieu-agenda__slot {
	position: absolute;
	left: 0;
	right: 0;
	border-bottom: 1px dotted #eceef0;
	cursor: cell;
}

.zieu-agenda__slot.is-hour { border-bottom: 1px solid var(--zieu-line); }
.zieu-agenda__slot:hover { background: rgba(47, 111, 143, .06); }

.zieu-event {
	position: absolute;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--zieu-line);
	border-left: 3px solid var(--zieu-accent);
	border-radius: 3px;
	padding: 2px 5px;
	font-size: 11.5px;
	line-height: 1.35;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.zieu-event:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, .12); z-index: 3; }
.zieu-event.is-dragging { opacity: .4; }
.zieu-event__time { color: var(--zieu-muted); font-variant-numeric: tabular-nums; }
.zieu-event__name { font-weight: 600; }
.zieu-event__flag { color: var(--zieu-warn); margin-left: 3px; }

.zieu-event--arrived, .zieu-event--waiting { background: #fdf9f0; }
.zieu-event--in_room { background: #eef5f0; }
.zieu-event--done { opacity: .6; }
.zieu-event--cancelled, .zieu-event--no_show { opacity: .45; text-decoration: line-through; }

.zieu-event__resize {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 5px;
	cursor: ns-resize;
}

/* -- Fenêtre modale ---------------------------------------------------- */

.zieu-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.zieu-modal[hidden] { display: none; }
.zieu-modal__backdrop { position: absolute; inset: 0; background: rgba(29, 35, 39, .45); }

.zieu-modal__box {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 22px 24px;
	width: min(620px, 92vw);
	max-height: 88vh;
	overflow: auto;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.zieu-modal__box h2 { margin-top: 0; }
.zieu-modal__actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; }
.zieu-modal__error { color: var(--zieu-alert); font-size: 13px; }

/* -- Autocomplétion ---------------------------------------------------- */

.zieu-autocomplete { position: relative; flex: 1; }
.zieu-autocomplete input[type="text"] { width: 100%; }

.zieu-autocomplete__list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--zieu-line);
	border-radius: 4px;
	max-height: 260px;
	overflow: auto;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.zieu-autocomplete__item { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.zieu-autocomplete__item:hover, .zieu-autocomplete__item.is-active { background: #eef4f7; }
.zieu-autocomplete__item span { display: block; font-size: 11px; color: var(--zieu-muted); }
.zieu-autocomplete__empty { padding: 8px 10px; color: var(--zieu-muted); font-style: italic; font-size: 13px; }

/* -- Consultation ------------------------------------------------------ */

.zieu-eyes { width: 100%; border-collapse: collapse; font-size: 12px; }
.zieu-eyes th, .zieu-eyes td { padding: 3px 4px; border-bottom: 1px solid #eceef0; }
.zieu-eyes thead th { font-size: 10px; text-transform: uppercase; color: var(--zieu-muted); }
.zieu-eyes__label { width: 54px; }
.zieu-eyes__group th { background: #f6f7f8; font-size: 11px; text-transform: uppercase; color: var(--zieu-muted); padding: 4px 6px; }

.zieu-eyes input[type="text"],
.zieu-eyes input[type="number"],
.zieu-eyes input[type="time"],
.zieu-eyes select {
	width: 100%;
	min-width: 54px;
	padding: 2px 4px;
	font-size: 12px;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.zieu-eyes input.is-invalid { border-color: var(--zieu-alert); background: #fdf4f3; }

.zieu-findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zieu-finding__head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.zieu-finding__head label { margin: 0; }
.zieu-finding__normal { font-size: 11px !important; text-transform: none !important; letter-spacing: 0 !important; margin-left: auto !important; display: flex !important; align-items: center; gap: 4px; }
.zieu-finding__eye { width: auto !important; font-size: 11px; padding: 0 4px; }
.zieu-finding textarea { width: 100%; font-size: 12px; }

@media (max-width: 900px) { .zieu-findings { grid-template-columns: 1fr; } }

.zieu-compare { width: 100%; border-collapse: collapse; font-size: 12px; }
.zieu-compare th, .zieu-compare td { padding: 4px 8px; border-bottom: 1px solid var(--zieu-line); text-align: center; }
.zieu-compare tbody th { text-align: left; color: var(--zieu-muted); font-weight: 500; }
.zieu-compare__eyes th { font-size: 10px; color: var(--zieu-muted); }

.zieu-repeater__row { display: flex; gap: 6px; margin-bottom: 6px; }
.zieu-repeater__row select { width: auto; }
.zieu-repeater__code { width: 90px; font-family: ui-monospace, monospace; }
.zieu-repeater__row input[type="text"]:not(.zieu-repeater__code) { flex: 1; }

/* -- Suivi graphique --------------------------------------------------- */

.zieu-spark { width: 100%; height: auto; }
.zieu-spark__axis { stroke: var(--zieu-line); stroke-width: 1; }
.zieu-spark__tick { font-size: 9px; fill: var(--zieu-muted); }
.zieu-spark__legend { font-size: 11px; color: var(--zieu-muted); margin: 2px 0 12px; }

/* -- Galerie et imagerie ----------------------------------------------- */

.zieu-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.zieu-gallery__item { margin: 0; }
.zieu-gallery__item img { width: 100%; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid var(--zieu-line); display: block; }

.zieu-gallery__doc {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 96px;
	border: 1px dashed var(--zieu-line);
	border-radius: 4px;
	color: var(--zieu-muted);
	font-size: 12px;
	text-decoration: none;
}

.zieu-gallery figcaption { font-size: 11px; margin-top: 3px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

.zieu-match-list { display: flex; flex-direction: column; gap: 10px; }

.zieu-match {
	display: grid;
	grid-template-columns: 110px 1fr 1.2fr;
	gap: 14px;
	align-items: center;
	padding: 10px;
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	transition: opacity .3s;
}

.zieu-match.is-linked { opacity: 0; }
.zieu-match__preview img { width: 100%; height: 74px; object-fit: cover; border-radius: 4px; }
.zieu-match__meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.zieu-match__form { display: flex; gap: 8px; align-items: center; }
.zieu-match__eye { width: auto; }

@media (max-width: 900px) { .zieu-match { grid-template-columns: 1fr; } }

/* -- Facturation ------------------------------------------------------- */

.zieu-lines input.zieu-qty { width: 60px; text-align: right; }
.zieu-lines tfoot th { border-top: 2px solid var(--zieu-line); font-size: 13px; }
.zieu-addline { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.zieu-addline select { max-width: 460px; flex: 1; }
.zieu-addline label { font-size: 11px; text-transform: uppercase; color: var(--zieu-muted); }

.zieu-bars { list-style: none; margin: 0; padding: 0; }
.zieu-bars li { display: grid; grid-template-columns: 60px 1fr 70px; gap: 8px; align-items: center; margin-bottom: 5px; font-size: 12px; }
.zieu-bars__track { background: #eef0f2; border-radius: 3px; height: 12px; overflow: hidden; }
.zieu-bars__fill { display: block; height: 100%; background: var(--zieu-accent); }
.zieu-bars__value { text-align: right; }

.zieu-pagination { display: flex; gap: 8px; margin-top: 14px; }

/* -- QR-facture -------------------------------------------------------- */

.zieu-qrbill {
	display: flex;
	width: 210mm;
	max-width: 100%;
	height: 105mm;
	border: 1px dashed #999;
	background: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: #000;
	overflow: hidden;
}

.zieu-qrbill__receipt {
	width: 62mm;
	padding: 5mm;
	border-right: 1px dashed #999;
	box-sizing: border-box;
	font-size: 8pt;
}

.zieu-qrbill__payment { flex: 1; padding: 5mm; display: flex; gap: 5mm; box-sizing: border-box; font-size: 10pt; }
.zieu-qrbill__left { width: 51mm; }
.zieu-qrbill__right { flex: 1; }
.zieu-qrbill__title { font-size: 11pt; font-weight: 700; margin: 0 0 3mm; }
.zieu-qrbill__receipt .zieu-qrbill__title { font-size: 11pt; }
.zieu-qrbill__h { font-weight: 700; font-size: 6pt; margin: 2mm 0 0; text-transform: none; }
.zieu-qrbill__payment .zieu-qrbill__h { font-size: 8pt; }
.zieu-qrbill__v { margin: 0; line-height: 1.2; }
.zieu-qrbill__qr { margin: 2mm 0; }
.zieu-qrbill__qr svg { display: block; }
.zieu-qrbill__amount { display: flex; gap: 4mm; margin-top: 3mm; }
.zieu-qrbill__accept { text-align: right; font-weight: 700; font-size: 6pt; margin-top: 4mm; }

@media print {
	.zieu-h1, .zieu-grid, .notice, #adminmenumain, #wpadminbar, #wpfooter, .zieu-actionbar { display: none !important; }
	.zieu-card--print { border: 0; padding: 0; margin: 0; }
	.zieu-card--print h2 { display: none; }
	.zieu-qrbill { border: 0; }
	#wpcontent, #wpbody-content { margin: 0 !important; padding: 0 !important; }
}

/* -- Notifications ----------------------------------------------------- */

.zieu-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100001; display: flex; flex-direction: column; gap: 8px; }

.zieu-toast {
	background: var(--zieu-ink);
	color: #fff;
	padding: 9px 14px;
	border-radius: 4px;
	font-size: 13px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	transition: opacity .3s, transform .3s;
}

.zieu-toast--error { background: var(--zieu-alert); }
.zieu-toast.is-out { opacity: 0; transform: translateY(6px); }

/* -- Horaires de consultation ------------------------------------------ */

.zieu-slot { align-items: center; gap: 8px; margin-bottom: 5px; }
.zieu-slot__day { flex: 0 0 92px; font-size: 12px; color: var(--zieu-muted, #646970); }
.zieu-slot input[type="time"] { width: 110px; }

/* -- Dossier chronologique : deux colonnes d'œil, le temps en vertical --- */

.zieu-card--record { padding-bottom: 8px; }
.zieu-record__hint { font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--zieu-muted); }

.zieu-tl { --zieu-spine: 96px; }

.zieu-tl__heads,
.zieu-tl__cols {
	display: grid;
	grid-template-columns: 1fr var(--zieu-spine) 1fr;
}

.zieu-tl__heads { position: sticky; top: 0; z-index: 4; background: var(--zieu-card); padding-bottom: 4px; }

.zieu-tl__head {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px 5px;
	border-bottom: 2px solid currentColor;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.zieu-tl__head[data-eye="OD"] { color: var(--zieu-od); }
.zieu-tl__head[data-eye="OS"] { color: var(--zieu-os); justify-content: flex-end; }
.zieu-tl__axis { display: flex; align-items: flex-end; justify-content: center; color: var(--zieu-muted); font-size: 12px; padding-bottom: 6px; }

/* L'inversion ne déplace rien : le balisage reste OD puis OG, seule la
   colonne d'affichage change. */
.zieu-tl[data-eye-order="OD"] .zieu-tl__head[data-eye="OD"],
.zieu-tl[data-eye-order="OD"] .zieu-tl__eye[data-eye="OD"] { order: 1; }
.zieu-tl[data-eye-order="OD"] .zieu-tl__head[data-eye="OS"],
.zieu-tl[data-eye-order="OD"] .zieu-tl__eye[data-eye="OS"] { order: 3; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__head[data-eye="OD"],
.zieu-tl[data-eye-order="OS"] .zieu-tl__eye[data-eye="OD"] { order: 3; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__head[data-eye="OS"],
.zieu-tl[data-eye-order="OS"] .zieu-tl__eye[data-eye="OS"] { order: 1; }
.zieu-tl__axis, .zieu-tl__spine { order: 2; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__head[data-eye="OD"] { justify-content: flex-end; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__head[data-eye="OS"] { justify-content: flex-start; }

.zieu-tl__block { position: relative; padding-bottom: 6px; }

.zieu-tl__date {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	padding: 14px 2px 4px;
	font-size: 12.5px;
	color: var(--zieu-muted);
}

.zieu-tl__date time strong { font-size: 14px; color: var(--zieu-ink); }
.zieu-tl__motif { color: var(--zieu-ink); font-weight: 500; }

.zieu-tl__cols { align-items: stretch; position: relative; }

.zieu-tl__cols::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 6px;
	left: calc(50% - .5px);
	width: 1px;
	background: var(--zieu-line);
}

.zieu-tl__eye {
	min-width: 0;
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-top: 2px solid transparent;
	border-radius: var(--zieu-radius);
	padding: 2px 0;
}

.zieu-tl__eye[data-eye="OD"] { border-top-color: var(--zieu-od); margin-right: 14px; }
.zieu-tl__eye[data-eye="OS"] { border-top-color: var(--zieu-os); margin-left: 14px; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__eye[data-eye="OD"] { margin-right: 0; margin-left: 14px; }
.zieu-tl[data-eye-order="OS"] .zieu-tl__eye[data-eye="OS"] { margin-left: 0; margin-right: 14px; }

.zieu-tl__row {
	display: grid;
	grid-template-columns: 82px 1fr;
	gap: 9px;
	padding: 5px 12px;
	border-bottom: 1px solid var(--zieu-line-soft, #eceef0);
	align-items: baseline;
}

.zieu-tl__row:last-child { border-bottom: none; }
.zieu-tl__key { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--zieu-muted); font-weight: 500; }
.zieu-tl__val { font-size: 13.5px; min-width: 0; }
.zieu-tl__none { padding: 12px; color: var(--zieu-muted); font-style: italic; font-size: 13px; margin: 0; }

.zieu-delta {
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 11px;
	padding: 0 5px;
	border-radius: 4px;
	background: #f0f2f4;
	border: 1px solid var(--zieu-line);
	color: var(--zieu-muted);
	white-space: nowrap;
}

.zieu-delta.is-warn { background: #fdf3e2; color: var(--zieu-warn); border-color: transparent; }
.zieu-delta.is-ok { background: #e9f3ee; color: var(--zieu-ok); border-color: transparent; }

.zieu-tl__media { display: flex; gap: 7px; flex-wrap: wrap; padding: 9px 12px 11px; }
.zieu-tl__exam { margin: 0; width: 104px; }
.zieu-tl__exam img { width: 104px; height: 62px; object-fit: cover; border-radius: 4px; border: 1px solid var(--zieu-line); display: block; }

.zieu-tl__exam-doc {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 62px;
	border: 1px dashed var(--zieu-line);
	border-radius: 4px;
	color: var(--zieu-muted);
	font-size: 11px;
	text-decoration: none;
}

.zieu-tl__exam figcaption { font-size: 10.5px; margin-top: 3px; color: var(--zieu-ink-2, #3d4c54); line-height: 1.3; }
.zieu-tl__exam figcaption .zieu-muted { display: block; }

.zieu-tl__shared {
	display: block;
	margin: 6px 0 0;
	padding: 9px 13px;
	background: var(--zieu-bg, #f6f7f7);
	border: 1px solid var(--zieu-line);
	border-left: 3px solid #5b5486;
	border-radius: var(--zieu-radius);
}

.zieu-tl__shared .zieu-tl__row { padding-left: 0; padding-right: 0; border-bottom-color: transparent; }
.zieu-tl__shared .zieu-tl__row:not(:last-child) { border-bottom-color: var(--zieu-line); }
.zieu-tl__dx { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; }
.zieu-tl__more { text-align: center; padding: 12px 0 6px; margin: 0; }

@media (max-width: 900px) {
	.zieu-tl__heads, .zieu-tl__cols { grid-template-columns: 1fr; }
	.zieu-tl__axis { display: none; }
	.zieu-tl__cols::before { display: none; }
	.zieu-tl__eye, .zieu-tl[data-eye-order="OS"] .zieu-tl__eye { margin: 0 0 8px !important; }
}

/* Le dossier occupe toute la largeur de la fiche : deux colonnes d'œil
   coincées dans une demi-page ne se lisent pas. */
.zieu-grid--patient > .zieu-card--record { grid-column: 1 / -1; }

/* -- Colonne d'apport et dépôt ----------------------------------------- */

.zieu-record { display: grid; grid-template-columns: minmax(0, 1fr) 244px; gap: 20px; align-items: start; }

.zieu-rail { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }

.zieu-rail__group {
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 10px 11px 11px;
}

.zieu-rail__title {
	display: flex; align-items: center; gap: 7px;
	margin: 0 0 6px; font-size: 10.5px; text-transform: uppercase;
	letter-spacing: .07em; color: var(--zieu-muted); font-weight: 600;
}

.zieu-rail__count {
	margin-left: auto; background: var(--zieu-accent); color: #fff;
	border-radius: 100px; padding: 0 7px; font-size: 11px; letter-spacing: 0;
}

.zieu-rail__hint { margin: 0 0 8px; font-size: 11.5px; line-height: 1.35; color: var(--zieu-muted); }
.zieu-rail__none { margin: 0; font-size: 12.5px; color: var(--zieu-muted); font-style: italic; }
.zieu-rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zieu-rail__list--chips { flex-direction: row; flex-wrap: wrap; gap: 6px; }

.zieu-item {
	display: flex; gap: 9px; align-items: center; padding: 6px;
	border: 1px solid var(--zieu-line); border-radius: 6px;
	background: var(--zieu-bg); cursor: grab;
	transition: border-color .15s, box-shadow .15s, opacity .2s;
}

.zieu-item:hover { border-color: var(--zieu-accent); }
.zieu-item:active { cursor: grabbing; }
.zieu-item.is-dragging { opacity: .4; }
.zieu-item.is-armed, .zieu-chip-add.is-armed {
	border-color: var(--zieu-accent);
	border-style: solid;
	box-shadow: 0 0 0 2px rgba(18, 96, 107, .25);
}

.zieu-item img { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--zieu-line); flex: none; display: block; }
.zieu-item__doc { width: 56px; height: 36px; display: grid; place-items: center; border: 1px dashed var(--zieu-line); border-radius: 4px; font-size: 10px; color: var(--zieu-muted); flex: none; }
.zieu-item__body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zieu-item__label { font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.zieu-item__meta { font-size: 10.5px; color: var(--zieu-muted); line-height: 1.25; }

.zieu-chip-add {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 4px 10px; border: 1px dashed var(--zieu-line); border-radius: 100px;
	background: var(--zieu-bg); font-size: 12.5px; color: var(--zieu-ink);
	cursor: grab; transition: border-color .15s, box-shadow .15s;
}

.zieu-chip-add::before { content: "+"; color: var(--zieu-muted); font-weight: 600; }
.zieu-chip-add:hover { border-color: var(--zieu-accent); border-style: solid; }

/* Cibles de dépôt */

.zieu-tl__drop { display: none; }

body.zieu-dropping .zieu-tl__eye { outline: 1px dashed rgba(18, 96, 107, .5); outline-offset: 3px; }
body.zieu-dropping .zieu-tl__eye .zieu-tl__drop {
	display: block; text-align: center; font-size: 11px; letter-spacing: .05em;
	text-transform: uppercase; color: var(--zieu-accent); padding: 4px 0 2px;
}

.zieu-tl__eye.is-target { outline: 2px solid var(--zieu-accent); outline-offset: 3px; background: #f4fafb; }

.zieu-tl__row.is-new, .zieu-tl__exam.is-new { animation: zieu-land .5s ease-out; }
@keyframes zieu-land { from { background: rgba(18, 96, 107, .16); } to { background: transparent; } }

.zieu-tl__input {
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 13px; width: 100%; max-width: 200px; padding: 2px 7px;
	border: 1px solid var(--zieu-accent); border-radius: 5px;
}

/* -- Fenêtres contextuelles -------------------------------------------- */

.zieu-pop {
	font: inherit; background: none; border: 0; padding: 0 2px; cursor: pointer;
	border-bottom: 1px dotted var(--zieu-muted); color: inherit;
}

.zieu-pop:hover { border-bottom-color: var(--zieu-accent); color: var(--zieu-accent); }

/* La fenêtre vit hors du conteneur qui porte les jetons de couleur :
   chaque valeur a donc son repli, sinon elle s'affiche transparente. */
.zieu-pop__box {
	position: absolute; z-index: 200; width: 306px;
	background: var(--zieu-card, #ffffff);
	color: var(--zieu-ink, #10171b);
	border: 1px solid var(--zieu-line, #dae2e6);
	border-radius: var(--zieu-radius, 7px);
	padding: 11px 13px 12px;
	font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
	box-shadow: 0 2px 6px rgba(16, 23, 27, .1), 0 18px 44px rgba(16, 23, 27, .18);
}

.zieu-pop__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--zieu-line, #dae2e6); }
.zieu-pop__title { font-size: 13.5px; font-weight: 600; }
.zieu-pop__close { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--zieu-muted, #6b7c85); font-size: 17px; line-height: 1; }
.zieu-pop__close:hover { color: var(--zieu-ink); }

.zieu-pop__list { margin: 0; }
.zieu-pop__list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 2px 0; }
.zieu-pop__list dt { color: var(--zieu-muted, #6b7c85); }
.zieu-pop__list dd { margin: 0; }

.zieu-pop__spark { display: block; width: 100%; height: 56px; margin-bottom: 6px; }
.zieu-pop__chart--OD { color: var(--zieu-od, #b4432c); }
.zieu-pop__chart--OS { color: var(--zieu-os, #1c6a86); }
.zieu-pop__area { fill: currentColor; opacity: .12; }
.zieu-pop__line { fill: none; stroke: currentColor; stroke-width: 1.8; }
.zieu-pop__box circle { fill: currentColor; }
.zieu-pop__chart { color: var(--zieu-accent, #12606b); }

.zieu-pop__foot { font-size: 11.5px; color: var(--zieu-muted, #6b7c85); margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--zieu-line, #dae2e6); }

@media (max-width: 1100px) {
	.zieu-record { grid-template-columns: 1fr; }
	.zieu-rail { position: static; flex-direction: row; flex-wrap: wrap; }
	.zieu-rail__group { flex: 1 1 280px; }
	.zieu-rail__list { flex-direction: row; flex-wrap: wrap; }
	.zieu-item { flex: 1 1 210px; }
}

.zieu-pop__box .zieu-eye--OD { background: #fbeeea; color: #b4432c; }
.zieu-pop__box .zieu-eye--OS { background: #e9f2f6; color: #1c6a86; }
.zieu-pop__box .zieu-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }


/* -- Bandeau d'identité ------------------------------------------------- */

.zieu-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 26px;
	padding: 26px 30px 24px;
	margin: 0 0 14px;
	border-radius: 12px;
	background:
		radial-gradient(120% 150% at 88% 0%, rgba(95, 168, 221, .22) 0%, rgba(95, 168, 221, 0) 55%),
		linear-gradient(140deg, var(--zieu-deep) 0%, #17456b 100%);
	color: #e6eef6;
	box-shadow: 0 1px 2px rgba(10, 30, 48, .16), 0 14px 34px rgba(10, 30, 48, .17);
}

.zieu-hero__name {
	font-family: var(--zieu-serif);
	font-size: 42px;
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -.015em;
	color: #fff;
	margin: 0 0 10px;
	padding: 0;
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}

.zieu-hero__no {
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 12.5px;
	letter-spacing: .04em;
	padding: 3px 9px;
	border-radius: 5px;
	background: rgba(255, 255, 255, .12);
	color: #cfe0ee;
}

.zieu-hero__line { margin: 0 0 14px; font-size: 15px; color: #b9cddf; }
.zieu-hero__line strong { color: #fff; font-weight: 600; }
.zieu-hero__dot { color: #6d8aa5; margin: 0 3px; }

.zieu-hero__flags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }

.zieu-flag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, .17);
	font-size: 13px;
	color: #d6e4f0;
}

.zieu-flag .zieu-mono { font-size: 11.5px; color: #9db6cc; }
.zieu-flag--warn { border-color: rgba(224, 138, 104, .5); background: rgba(224, 138, 104, .14); color: #f6d3c4; }

.zieu-hero__aside {
	border-left: 1px solid rgba(255, 255, 255, .15);
	padding-left: 24px;
	display: flex;
	flex-direction: column;
}

.zieu-hero__label {
	margin: 0 0 5px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: #7f9bb5;
}

.zieu-hero__strong { margin: 0; font-size: 19px; font-weight: 600; color: #fff; text-transform: capitalize; }
.zieu-hero__sub { margin: 3px 0 0; font-size: 13.5px; color: #b9cddf; }
.zieu-hero__sub--sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .13); }

.zieu-hero__acts { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.zieu-hero__cta {
	padding: 8px 16px;
	border-radius: 7px;
	background: #fff;
	color: var(--zieu-deep) !important;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.zieu-hero__cta:hover { background: #dcebf8; }
.zieu-hero__link { font-size: 13px; color: #a9c4dc !important; text-decoration: none; border-bottom: 1px solid rgba(169, 196, 220, .4); }
.zieu-hero__link:hover { color: #fff !important; }

/* -- Bandeau des valeurs ------------------------------------------------ */

.zieu-band {
	display: grid;
	grid-template-columns: 1fr 1fr minmax(200px, .62fr);
	gap: 12px;
	margin: 0 0 16px;
}

.zieu-band__card {
	background: var(--zieu-card);
	border: 1px solid var(--zieu-line);
	border-top: 3px solid var(--zieu-line);
	border-radius: var(--zieu-radius);
	padding: 13px 16px 15px;
}

.zieu-band__card--OD { border-top-color: var(--zieu-od); }
.zieu-band__card--OS { border-top-color: var(--zieu-os); }
.zieu-band__card--wide { border-top-color: var(--zieu-accent); }

.zieu-band__head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--zieu-muted);
}

.zieu-band__when { margin-left: auto; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 12px; }

.zieu-band__figures { display: flex; gap: 28px; align-items: flex-end; }
.zieu-band__figure { display: flex; flex-direction: column; gap: 2px; }
.zieu-band__key { font-size: 11.5px; color: var(--zieu-muted); }

.zieu-band__big { font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
.zieu-band__big small { font-size: 12.5px; font-weight: 400; color: var(--zieu-muted); margin-left: 4px; }
.zieu-band__big--none { color: var(--zieu-line); }

.zieu-band__delta { font-size: 12px; font-weight: 600; }
.zieu-band__delta--up { color: var(--zieu-alert); }
.zieu-band__delta--down { color: var(--zieu-ok); }

.zieu-band__ref {
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--zieu-line-2);
	font-size: 13.5px;
	color: var(--zieu-ink-2);
}

.zieu-band__list { display: flex; gap: 22px; margin: 0; }
.zieu-band__list dt { font-size: 11.5px; color: var(--zieu-muted); }
.zieu-band__list dd { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.1; }

/* Le dossier des deux yeux passe avant l'administratif. */
.zieu-grid--patient > .zieu-card--record { order: -1; }

@media (max-width: 1180px) {
	.zieu-hero { grid-template-columns: 1fr; gap: 18px; }
	.zieu-hero__aside { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); padding: 16px 0 0; }
	.zieu-hero__name { font-size: 33px; }
	.zieu-band { grid-template-columns: 1fr; }
}
