/* Annotations de retouche — éditeur client et visionneuse admin */
html.pgm-annot-lock { overflow: hidden; }

.pgm-annot-open {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 6px 10px;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: .02em;
	color: #111;
	background: transparent;
	border: 1px solid #111;
	border-radius: 0;
	cursor: pointer;
	text-align: left;
}
.pgm-annot-open:hover, .pgm-annot-open:focus-visible { background: #111; color: #fff; }
.pgm-annot-open-count {
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: #111; color: #fff;
	font-size: 11px; line-height: 18px; text-align: center;
}
.pgm-annot-open:hover .pgm-annot-open-count { background: #fff; color: #111; }
.pgm-annot-open-count[hidden] { display: none; }

.pgm-annot-modal {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(8, 8, 8, .86);
	font-family: inherit;
}
.pgm-annot-shell {
	display: flex; flex-direction: column;
	width: min(1180px, 100%); height: min(860px, 100%);
	background: #151515; color: #f2eee6;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.pgm-annot-head {
	display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
	padding: 16px 22px 12px; border-bottom: 1px solid #2c2c2c;
}
.pgm-annot-title { margin: 0; font: 400 21px/1.2 Georgia, "Times New Roman", serif; color: #f2eee6; letter-spacing: .02em; }
.pgm-annot-hint { margin: 4px 0 0; font-size: 13px; color: #b9b3a6; }
.pgm-annot-x { background: none; border: 0; color: #f2eee6; font-size: 30px; line-height: 1; cursor: pointer; padding: 0 4px; }

.pgm-annot-body { flex: 1 1 auto; display: flex; min-height: 0; }
.pgm-annot-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pgm-annot-tools {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	padding: 10px 16px; border-bottom: 1px solid #2c2c2c;
}
.pgm-annot-tool {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px; font-size: 13px; color: #f2eee6;
	background: transparent; border: 1px solid #3a3a3a; border-radius: 0; cursor: pointer;
}
.pgm-annot-tool.is-active { background: #f2eee6; color: #111; border-color: #f2eee6; }
.pgm-annot-ico { font-size: 15px; line-height: 1; }
.pgm-annot-sep { width: 1px; height: 24px; background: #3a3a3a; margin: 0 6px; }
.pgm-annot-colors, .pgm-annot-sizes { display: inline-flex; gap: 6px; align-items: center; }
.pgm-annot-color {
	width: 24px; height: 24px; padding: 0; border-radius: 50%;
	background: var(--pgm-annot-c); border: 2px solid #151515; box-shadow: 0 0 0 1px #6a6a6a; cursor: pointer;
}
.pgm-annot-color.is-active { box-shadow: 0 0 0 2px #f2eee6; }
.pgm-annot-size { width: 30px; height: 30px; background: transparent; border: 1px solid #3a3a3a; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pgm-annot-size i { display: block; width: 18px; background: #f2eee6; border-radius: 2px; }
.pgm-annot-size[data-size="1"] i { height: 2px; }
.pgm-annot-size[data-size="2"] i { height: 4px; }
.pgm-annot-size[data-size="3"] i { height: 7px; }
.pgm-annot-size.is-active { border-color: #f2eee6; }

.pgm-annot-stagewrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: auto; background: #0e0e0e; }
.pgm-annot-stage { position: relative; display: inline-block; line-height: 0; }
.pgm-annot-img { display: block; max-width: 100%; max-height: calc(100vh - 330px); width: auto; height: auto; user-select: none; -webkit-user-drag: none; }
.pgm-annot-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pgm-annot-modal.is-erasing .pgm-annot-svg { cursor: cell; }
.pgm-annot-item.is-selected { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); }

.pgm-annot-side { flex: 0 0 320px; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid #2c2c2c; padding: 14px 16px; overflow: auto; }
.pgm-annot-notes-title { margin: 0 0 10px; font: 400 16px/1.2 Georgia, "Times New Roman", serif; letter-spacing: .03em; color: #f2eee6; }
.pgm-annot-notes-empty { margin: 0; font-size: 13px; color: #8f897c; }
.pgm-annot-note { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.pgm-annot-note-n { flex: none; width: 24px; height: 24px; border-radius: 50%; font: 700 12px/24px Arial, sans-serif; text-align: center; }
.pgm-annot-note-input {
	flex: 1 1 auto; min-width: 0; resize: vertical; padding: 7px 9px; font-size: 14px; line-height: 1.4; font-family: inherit;
	color: #f2eee6; background: #1d1d1d; border: 1px solid #3a3a3a; border-radius: 0;
}
.pgm-annot-note-input:focus { outline: none; border-color: #f2eee6; }
.pgm-annot-note-del { flex: none; background: none; border: 0; color: #b9b3a6; font-size: 22px; line-height: 1; cursor: pointer; }

.pgm-annot-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 22px; border-top: 1px solid #2c2c2c; }
.pgm-annot-status { margin-right: auto; font-size: 13px; color: #b9b3a6; }
.pgm-annot-btn { padding: 9px 16px; font-size: 13px; letter-spacing: .03em; color: #f2eee6; background: transparent; border: 1px solid #5a5a5a; border-radius: 0; cursor: pointer; }
.pgm-annot-btn:hover { border-color: #f2eee6; }
.pgm-annot-btn--primary { background: #f2eee6; color: #111; border-color: #f2eee6; }
.pgm-annot-btn[disabled] { opacity: .5; cursor: default; }

@media (max-width: 820px) {
	.pgm-annot-shell { height: 100%; width: 100%; }
	.pgm-annot-body { flex-direction: column; overflow: auto; }
	.pgm-annot-main { flex: none; }
	.pgm-annot-img { max-height: 52vh; }
	.pgm-annot-side { flex: none; border-left: 0; border-top: 1px solid #2c2c2c; overflow: visible; }
	.pgm-annot-tl { display: none; }
	.pgm-annot-head { padding: 12px 14px 8px; }
	.pgm-annot-foot { padding: 10px 14px; flex-wrap: wrap; }
}

/* Visionneuse admin (même habillage, fond clair non requis) */
.pgm-annot-admin-open { margin-left: 6px; }
.pgm-annot-admin-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #f2eee6; }
.pgm-annot-admin-note { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 9px; font-size: 14px; line-height: 1.45; color: #f2eee6; }
.pgm-annot-admin-note .pgm-annot-note-n { flex: none; }
.pgm-annot-admin-note small { display: block; color: #8f897c; }
.pgm-annot-admin-title { font: 400 15px/1.2 Georgia, serif; margin: 0 0 10px; }
.pgm-annot-svg--view { pointer-events: none; cursor: default; }

/* Photo annotée : seul « Autres » (chiffrage sur mesure) reste possible */
.pgm-retouch-level-choice.is-locked { opacity: .4; cursor: not-allowed; }
.pgm-retouch-level-choice.is-locked * { cursor: not-allowed; }
.pgm-retouch-annot-hint { margin: 0 0 8px; font-size: 12px; font-style: italic; line-height: 1.4; color: #555; }
