
.modal-content:has(textarea) {
	height: 100% !important;
}

.modal-body {
	overflow: hidden;
	display: grid;
	grid-template-rows: 1fr auto auto;
}

#modal-form {
	overflow: auto;
	padding-right: 10px;
	display: flex;
	flex-direction: column;
	height: 100%;
}
#modal-form #progress-text {
	margin-top: 15px;
	text-align: center;
	font-weight: bold;
}
#form-actions {
	padding: 6px;
	background-color: black;
	color: white;
}


.upload-file-block {
	border-bottom: 1px solid #e0e0e0;
	padding-bottom: 10px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.upload-file-block:not(.with-prvw) { padding-left: 4px; }
@media (max-width: 599px), (orientation: portrait) {
}
@media (min-width: 600px) and (orientation: landscape) {
	.upload-file-block.with-prvw { display: grid; grid-template-columns: 150px 1fr;  align-items: stretch; gap: 10px; }
}

.upload-file-block.with-prvw > :nth-child(1) {
	width: 100%;
	height: auto;
	max-height: 100%;
	align-self: start;
	object-fit: contain;
}
.form-preview-clickable {
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}
.form-preview-clickable:hover {
	opacity: 0.9;
}
.form-preview-clickable .preview-overlay {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	box-shadow: 0 2px 4px rgba(0,0,0,0.3);
	transition: transform 0.2s, background 0.2s;
}
.form-preview-clickable:hover .preview-overlay {
	transform: scale(1.1);
	background: rgba(0, 0, 0, 0.85);
}
.form-preview-clickable .preview-overlay .symbol {
	font-size: 1.2rem;
}
.upload-file-block .fields-container {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: repeat(50, min-content) 1fr;
	align-items: center;
	column-gap: 4px;
	row-gap: 0;
	flex-grow: 1;
}
.upload-file-block .fields-container > * {
	margin-bottom: 10px;
}
/*.upload-file-block .fields-container > *:last-child,*/
.upload-file-block .fields-container > .group:has(textarea) {
	margin-bottom: 0;
}
.upload-file-block .fields-container > .group:has(textarea) {
	grid-row: 51;
	height: 100%;
}
.upload-file-block h4, .upload-file-block .group {
	grid-column: span 2;
}
.upload-file-block > h4 {
	margin: 5px 0px;
	color: #0060b6;
	font-size: 18px;
	vertical-align: middle;
}
.upload-file-block > h4 .error {
	text-align: center;
	margin: 5px 0px 10px;
}
.upload-file-block > label {
	margin: 5px 0px;
	align-self: baseline;
}
.upload-file-block .group > label {
	display: block;
	padding-bottom: 0px;
}
.upload-file-block label[required]:after {
	content: ' *';
	color: red;
}
.upload-file-block label.multi {
	align-self: start;
}
.upload-file-block :not(.group,.radio):not(label).multi {
	padding: 0px 16px;
	gap: 4px;
	min-width: min(90vw, 400px);
}
.upload-file-block .checkbox {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	align-items: center;
}
.upload-file-block .group.radio {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}
.upload-file-block .group.multi { margin-bottom: 10px; }
.upload-file-block .radio *, .upload-file-block .checkbox * { padding-top: 0px; padding-bottom: 0px; white-space: nowrap; }
.upload-file-block .checkbox * { padding-left: 0px; }
.upload-file-block .group:has(textarea) {
	display: flex !important;
	flex-direction: column;
	height: 100%;
}
.upload-file-block .group textarea { margin-left: 6px; width: calc(100% - 6px) !important; flex-grow: 1; }
.upload-file-block textarea { width: 50vw; min-height: 5lh; resize: vertical; }
.upload-file-block .radio[disabled] .btn-action {
    opacity: 0.6;
    filter: grayscale(80%);
    pointer-events: none !important; /* BLOQUE ABSOLUMENT TOUTE INTERACTION SOURIS/TACTILE */
    user-select: none; /* Empêche la sélection de texte */
}

/* COMPOSANT FOLKSONOMIE (TAGS) - Style d'interaction "Instagram" */
.tags-input-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.tags-input-container:focus-within {
	outline: none;
	box-shadow: 0 0 0 1px #e61e29;
}
.tag-pill {
	display: flex;
	align-items: center;
	background-color: var(--fg-color-blue);
	color: var(--fg-color-light);
	padding: 2px 8px;
	border-radius: 15px;
	font-size: 0.85rem;
	animation: fadeInTag 0.2s ease;
}
.tag-pill .tag-remove {
	cursor: pointer;
	font-size: 16px;
	padding-left: 4px;
	color: #ccc;
	transition: color 0.2s;
}
.tag-pill .tag-remove:hover { color: #e61e29; }
.tags-input-field {
	border: none !important;
	flex-grow: 1;
	min-width: 120px;
}
.tags-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--fg-color-light);
	border: 1px solid var(--bordure);
	border-top: none;
	max-height: 150px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: var(--ombre);
}
.suggestion-item {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--fg-color-white);
}
.suggestion-item:hover, .suggestion-item.active {
	background-color: #e3f2fd;
	color: #0056b3;
}
@keyframes fadeInTag {
	from { opacity: 0; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1); }
}