/* resource */
/* item */
.item.show #content{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.item.show .main-block, .item.show .secondary-block{
	display: flex;
	flex-direction: column;
	height: max-content;
	gap: 1rem 0;
}

.item.show .main-block > *, .item.show .secondary-block > *{
	padding: 1rem;
	background-color: white;
	box-shadow: 0 .25rem .5rem 0 rgb(0 0 0 / 20%);
	border-radius: 1rem;
}

.item.show .main-block > h2{
	margin: 0;
	text-align: center;
}

/* bloc de champs */
.properties.foldable h3{
	cursor: pointer;
}

.properties.foldable h3::after{
	content: "\f078";
	margin-left: .5rem;
	font-family: "Font Awesome 5 Free";
}

.properties.foldable.open h3::after{
	content: "\f077";
}

.properties.foldable .property{
	display: none;
}

.properties.foldable.open .property{
	display: flex;
}

.properties.open{
	border: none;
}

/* propriété */
.property{
	margin-bottom: .5rem;
	justify-content: flex-start;
}

.secondary-block .properties .property{
	flex-direction: column;
}

#content .secondary-block .properties .property h4, .secondary-block .properties .property .values{
	width: 100%;
}

.property:last-child{
	margin: 0;
}

#content .property h4{
	width: 20%;
	padding: 0;
	font-size: 1rem;
	line-height: 1.5rem;
	text-align: left;
}

.property .values{
	width: 80%;
	padding: 0;
}

.inline.property .values{
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
}

.inline.property .values .value:not(:last-child){
	padding: 0;
}

.inline.property .values .value:not(:last-child)::after{
	content: "\00a0;\00a0";
}

#content .property .values .value{
	margin: 0;
}

.property .values .value:not(:last-child){
	padding-bottom: .25rem;
	border: 0;
}

.property .value i{
	margin-left: .5rem;
}

.property .value.resource img{
	margin-right: 1rem;
}

.property .value.uri img, .property .value.valuesuggest img{
	height: 24px;
	margin-left: .5rem;
}

.property .value.uri.rebond, .property .value.valuesuggest.rebond{
	flex-direction: column;
	align-items: flex-start;
}

.property .value.uri:not(:last-child), .property .value.valuesuggest:not(:last-child){
	padding-bottom: .5rem;
}

.property .value.uri.rebond a:last-child, .property .value.valuesuggest.rebond a:last-child{
	font-size: .875rem;
	line-height: normal;
}

/* licences */
.property [class^="license"]{
	margin-right: 1rem;
}

.property .value .license-etalab{
	width: 100px;
	height: auto;
}

/* citation */
#item-citation .value i{
	cursor: pointer;
}

/* item - itemSets */
.property.itemSets{
	align-items: center;
}

/* item - medias */
/* visionneuse */
/* #itemfiles{
	display: none;
} */


.values:has(> .value.resource){
	width: 100%;
}

#content .values > .value.resource img{
	max-width: 5rem;
	max-height: 5rem;
	height: auto;	
}

.lg-container.lg-show:not(.lg-inline){
	position: relative;
	z-index: 2000;
}

.item.show .secondary-block .media{
	display: flex;
	flex-direction: column;
	gap: .5rem 0;
	padding: .5rem 0;
}

.item.show .secondary-block .media:not(:first-child){
	border-top: 1px solid #ccc;
	margin: 1rem 0;
}

.item.show .secondary-block .media > h3{
	margin: 0;
}

.item.show .secondary-block .media img{
	align-self: center;
	cursor: pointer;
}

.item.show .secondary-block .media .properties h3{
	margin: 0;
	font-size: 1rem;
}

#iframes .values{
	width: 100%;
}

#iframes iframe{
	width: 100%;
}

/* modules */
/* bulk export */
.browse .bulk-export{
	display: flex;
	align-items: center;
}

.bulk-export .exporters{
	margin: 0;
}

.show .bulk-export .exporters{
	width: 80%;
}

.browse .bulk-export .exporters{
	padding-left: 1rem;
}

/* next */
.previous-next-items{
	display: flex;
	justify-content: space-between;
}

.next-item:only-child{
	margin-left: auto;
}

/* solr */
#search-page > h2{
	text-align: center;
}

#search-page > .metadata{
	margin-bottom: 1rem;
}

.search-results-wrapper{
	display: grid;
	grid-template-columns: 1fr 3fr;
	gap: 1rem;
}

/* #advanced-search-form .field-meta{
	display: none;
} */

#advanced-search-form .inputs{
	width: 100%;
}

#form-facets input[type="submit"]{
	margin: 0;
}

.apply-facets{
	display: flex;
	gap: .5rem;
}

.reset-facets{
	min-width: 36px;
	min-height: 36px;
	padding: 6px;
	border: 0;
	background-color: #dedede;
	text-align: center;
	line-height: 24px;
	color: #676767;
	cursor: pointer;
}

.reset-facets:hover{
	text-decoration: none;
}

.search-facet{
	margin-bottom: 1.5rem;
}

.search-facet h4{
	margin: 0;
	margin-bottom: .25rem;
	padding-bottom: .25rem;
	border-bottom: 1px solid var(--primary);
}

.search-facet-items{
	max-height: 240px;
	overflow-y: auto;
}

.filter-value::after{
	margin-left: 1rem;
}

.search-results:only-child{
	grid-column: 1/3;
}

.search-results > h3 span:not(:first-child)::before{
	content: " | ";
}

.search-results-header, .search-results-footer{
	padding: .5rem 0;
}

.search-results-header{
	border-bottom: 1px solid var(--primary);
}

/* liste */
.resource-list.list{
	margin: 0;
	border: 0;
}

.resource-list.list .resource{
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--primary);
}

.resource-list.list .resource .resource-metadata{
	flex-basis: calc(100% - 200px);
}

.resource-list .resource .resource-metadata > h4{
	font-size: 1.25rem;
	margin-bottom: .5rem;
}

.resource-list.list .resource .resource-metadata .property{
	margin-bottom: .25rem;
}

.resource-list.list .resource .resource-thumbnail{
	display: flex;
	align-items: center;
	justify-content: center;
	flex-basis: 200px;
}

/* grille */
.search-results .resource-list.grid{
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 2rem 1rem;
}

.search-results .resource-list.grid .resource-thumbnail{
	padding: 0;
}

.search-results .resource-list.grid .resource-metadata h4{
	text-align: justify;
	text-align-last: center;
}

.resource-list.grid .resource .resource-metadata .properties{
	display: none;
}

/* mirador fix */
.mirador-viewer{
	margin-bottom: 1rem;
}

.mirador-viewer h2{
	padding: 0;
	text-transform: none;
}

.mirador-viewer *{
	color: inherit;
}

.mirador-viewer h2:after{
	display: none;
}

/* model-viewer */ 

.model-frame{
	position: relative;
}

.model-frame button.fullscreen-button{
	position: absolute;
	top: 0;
	right: 0;
	padding: 0 2rem;
}

.model-frame.fullscreen{
	position: fixed;
	z-index: 3000;
	width: 100%;
	height: 100dvh;
	top: 0;
	left: 0;
	background-color: white;
}

.model-frame.fullscreen model-viewer{
	height: 100%;
}

model-viewer{
	height: 25rem;
	width: auto;
	max-width: 100%;
}

@media screen and (max-width: 1200px){
	.item.show #content{
		display: flex;
		flex-direction: column;
	}

	/* solr */
	.apply-facets{
		flex-direction: column;
	}

	.search-results .resource-list.grid{
		grid-template-columns: 1fr 1fr;
	}

	.resource-list.list .resource{
		flex-direction: column;
	}

	.resource-list.list .resource .resource-thumbnail{
		order: -1;
		flex-basis: auto;
		height: max-content;
	}
}

@media screen and (max-width: 800px){
	/* solr */
	.resource-list.list .resource .property{
		flex-direction: column;
	}

	.resource-list.list .resource .property > *{
		width: 100%;
	}

	.resource-list.list .resource .property .values{
		padding: 0;
	}
}

@media screen and (max-width: 640px){
	.property{
		flex-direction: column;
	}

	.properties .property h4, .properties .property .values{
		width: 100%;
	}

	/* item */
	.item.show #content{
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}

	/* solr */
	.search-results-wrapper{
		display: flex;
		flex-direction: column;
	}

	#advanced-search-form #form-search{
		width: 100%;
	}

	.search-results-header, .search-results-footer{
		gap: .5rem;
	}

	.browse .grid.resource-list{
		display: flex;
		flex-direction: column;
		gap: .5rem;
		margin: 0;
	}

	.browse .grid.resource-list .resource{
		margin: 0 auto;
	}

	.resource-list.list .resource{
		display: flex;
		flex-direction: column;
	}

	.search-results .resource-list.grid{
		grid-template-columns: 1fr 1fr;
	}
}
