/*
 * Theme Name: Thème du site institutionnel
 * Description: Thème du site utc.fr
 * Author: Hugo Heuzebroc, UTC
 * Version: 1.1.0
 
*/
html {
	--utc-slider-height: 430px;
	scroll-behavior: smooth;
	
	/* couleurs des boutons download : elles ne sont pas dans le theme.json car leur usage n'est pas laissé à l'utilisateur */
	--utc-color-download-pdf: #b30b00;
	--utc-color-download-excel: #007A37;
	--utc-color-download-word: #083970;
}
a {
	transition: color 0.2s, background 0.2s;
}

/* divers */
.wp-block-list li {
	margin-bottom: 5px;
}
.is-style-utc-noshrink-thumb .wp-block-post-featured-image  {
	flex-shrink: 0;
}
.wp-block-uagb-modal {
	width: fit-content;
}
.is-style-utc-text-shadow {
	text-shadow: 1px 1px 1px black;
}
.is-style-utc-text-shadow2 {
	text-shadow: 1px 1px 1px black;
}

/* galeries d'images*/
.is-style-utc-hover-zoom .wp-block-image {
	transition: 0.2s;
}
.is-style-utc-hover-zoom .wp-block-image:hover {
	transform: scale(1.2);
	z-index: 5;
}
.wp-block-gallery.is-style-utc-hover-zoom.has-nested-images figure.wp-block-image:has(figcaption):before {
	content: none;
}
.wp-block-gallery.is-style-utc-hover-zoom.has-nested-images figure.wp-block-image figcaption {
	background: var(--wp--preset--color--utc-secondary-most);
	pointer-events: none;
	font-size: var(--wp--preset--font-size--utc-l);
	padding: 10px 20px;
	font-weight: bold;
	text-align: left;
	transition: 0.2s;
}
.wp-block-gallery.is-style-utc-hover-zoom.has-nested-images figure.wp-block-image:hover figcaption {
	color: var(--wp--preset--color--utc-accent);
}
.wp-block-gallery.is-style-utc-hover-zoom .wp-block-image img {
	max-height: 260px;
}

/* recherche */
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
	padding: 0;
}
.wp-block-search__button-inside {
	background: white;
}

/* les sliders */
.glide {
	position: relative;
}
.glide__arrow {
	position: absolute;
	top: 50%;
	cursor: pointer;
	background: none;
	color: white;
	font-weight: bold;
	box-shadow: 0 0 3px #0009;
	border: none;
	padding: 0;
	margin-top: -2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--utc-main-half);
	transition: 0.2s;
}
.glide__arrow:hover {
	background: var(--wp--preset--color--utc-accent);
}
.glide__arrow--left {
	left: 10px;
}
.glide__arrow--right {
	right: 10px;
}
.glide__arrow .dashicons {
	font-size: 2.5rem;
	height: 1em;
	width: 1em;
}
.utc-slider .wp-block-cover {
	min-height: var(--utc-slider-height);
}

/* admin slider */
.utc-slider-admin {
	display: none;
	position: absolute;
	top: 5px;
	gap: 8px;
	padding-left: 5px;
}
.glide__slide:hover .utc-slider-admin {
	display: flex;
}
.utc-slider-admin a {
	text-decoration: none;
	background: #fffe;
	color: var(--wp--preset--color--utc-main);
	border: 1px solid var(--wp--preset--color--utc-main);
	padding: 5px 10px;
	font-size: 0.8rem;
}
.utc-slider-admin a:hover {
	background: var(--wp--preset--color--utc-accent);
}

/* slider vidéos */
.utc-video-slider iframe {
	border: none;
	width: 100%;
	height: 200px;
	text-align: center;
}
.utc-video-slider a {
	text-decoration: none;
}
.utc-video-slider p {
	padding-left: 10px;
	text-align: center;
}
.utc-video-slider .glide__arrow {
	top: 120px;
}
.utc-arrows-outside .glide__arrow--left {
	left: -70px;
}
.utc-arrows-outside .glide__arrow--right {
	right: -70px;
}

/* responsive des sliders */
@media (max-width: 1020px) {
	.glide__arrow {
		position: static;
	}
	.glide__arrows {
		position: absolute;
		bottom: 20px;
		width: 100%;
		display: flex;
		justify-content: center;
		gap: 10px;
	}
	.utc-arrows-outside .glide__arrows {
		position: static;
	}
}

/* boutons */
.is-style-bouton-jaune > a:hover {
	background-color: var(--wp--preset--color--utc-alternate-2);
	color: var(--wp--preset--color--utc-secondary);
}
.is-style-outline > a:hover {
	color: var(--wp--preset--color--utc-accent);
	background: transparent;
}

/* fichiers à télécharger */
.wp-block-file:not([data-wp-interactive]) a:before {
	content: "\f190";
	font-family: dashicons;
	font-size: 2rem;
}
.wp-block-file:not([data-wp-interactive]) a {
	width: fit-content;
	display: flex;
    align-items: center;
    gap: 10px;
    background: var(--utc-color-download-pdf);
	color: #fff;
	padding: 5px var(--wp--preset--spacing--utc-s) 5px var(--wp--preset--spacing--utc-xs);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--utc-m);
}
.wp-block-file:not([data-wp-interactive]) a:hover {
	background: var(--wp--preset--color--utc-accent);
}

.wp-block-file.is-style-utc-generic a {
	background: var(--wp--preset--color--utc-accent);
	color: #000;
}
.wp-block-file.is-style-utc-generic a:hover {
	background: var(--wp--preset--color--utc-main);
	color: #fff;
}
.wp-block-file.is-style-utc-generic a:before {
	content: "\f316";
}

.wp-block-file.is-style-utc-tocome {
	cursor: not-allowed;
}
.wp-block-file.is-style-utc-tocome a {
	background: var(--wp--preset--color--utc-border);
	color: #000;
	pointer-events: none;
}
.wp-block-file.is-style-utc-tocome a:before {
	content: "\f18c";
}

.wp-block-file.is-style-utc-excel a {
	background: var(--utc-color-download-excel);
}
.wp-block-file.is-style-utc-excel a:before {
	content: "\f495";
}

.wp-block-file.is-style-utc-word a {
	background: var(--utc-color-download-word);
}
.wp-block-file.is-style-utc-word a:before {
	content: "\f497";
}


/* listes de termes */
ul.wp-block-categories-list {
	display: flex;
	list-style: none;
	gap: 5px;
	padding-left: 0;
}
ul.wp-block-categories-list a {
	text-decoration: none;
	color: var(--wp--preset--color--utc-main);
	border: 2px solid var(--wp--preset--color--utc-main);
	padding: 5px 10px;
	transition: 0.2s;
}
ul.wp-block-categories-list a:hover {
	background: var(--wp--preset--color--utc-main);
	color: var(--wp--preset--color--utc-accent);
}

/* images */
.is-style-utc-border figcaption {
	text-align: center;
	background: var(--wp--preset--color--utc-text);
	color: white;
	margin-top: 0;
	padding: 8px;
}

/* table des matières */
.utc-toc-container.utc-sticky {
	padding-left: 20px;
	min-width: calc((100vw - var(--wp--style--global--content-size)) / 2 - 40px);
	z-index: 2;
}
.utc-sticky .utc-toc {
	position: sticky;
	top: 40px;
	margin-bottom: 10px;
	max-height: 83vh;
	overflow: auto;
}
.utc-toc {
	border: 1px solid var(--wp--preset--color--utc-border);
	padding: 15px 20px;
	box-shadow: var(--wp--preset--shadow--utc-normal);
	max-width: 15rem;
	min-width: 10rem;
	background: white;
}
.utc-toc-title {
	margin: 0;
	text-align: center;
	text-transform: uppercase;
}
.utc-toc-container.utc-horizontal {
	margin-top: 0;
}
.utc-horizontal .utc-toc {
	max-width: unset;
	width: fit-content;
}
.utc-horizontal .utc-toc-inner {
	column-width: 12rem;
	column-count: 3;
}
.utc-horizontal a.level-2:first-child {
	margin-top: 0;
}
.utc-horizontal .utc-toc-title {
	margin-bottom: 10px;
	text-align: left;
}

.utc-toc a {
	display: block;
	margin-bottom: 4px;
	text-decoration: none;
	color: var(--wp--preset--color--utc-main);
}
.utc-toc a:hover {
	color: var(--wp--preset--color--utc-accent);
}
a.level-2 {
	font-weight: bold;
	margin-top: 10px;
}
a.level-3 {
	margin-left: 8px;
}
a.level-4 {
	margin-left: 16px;
}
a.level-5 {
	margin-left: 24px;
}
a.level-6 {
	margin-left: 32px;
}

@media (max-width: 992px) {
	.utc-toc-container.utc-sticky {
		display: none;
	}
	.utc-horizontal .utc-toc {
		width: unset;
	}
}
@media (min-width: 992px) {
	.utc-toc-container.utc-responsive {
		display: none;
	}
}

/* barre latérale */
.is-style-utc-sidebar,
.is-style-utc-sidebar-gray {
	float: right;
	z-index: 1;
	max-width: 25rem;
	min-width: 20rem;
	margin-top: -130px;
}
:root :where(.is-layout-flow) > :first-child.is-style-utc-sidebar,
:root :where(.is-layout-flow) > :first-child.is-style-utc-sidebar-gray {
	margin-top: -130px;
}
.editor-visual-editor .is-style-utc-sidebar,
.editor-visual-editor .is-style-utc-sidebar-gray {
	float: none;
	margin-top: 0;
}
.editor-visual-editor .is-style-utc-sidebar:before,
.editor-visual-editor .is-style-utc-sidebar-gray:before {
	position: absolute;
	content: "BARRE LATERALE";
	right: 10px;
	top: -8px;
	font-weight: bold;
	font-size: 0.8rem;
}
:root .editor-visual-editor :where(.is-layout-flow) > :first-child.is-style-utc-sidebar,
:root .editor-visual-editor :where(.is-layout-flow) > :first-child.is-style-utc-sidebar-gray {
	margin-top: 0;
}

.is-style-utc-sidebar .utc-contact-header .utc-contact-title,
.is-style-utc-sidebar-gray .utc-contact-header .utc-contact-title {
	color: var(--wp--preset--color--utc-accent);
}
.is-style-utc-sidebar .utc-contact-block:before,
.is-style-utc-sidebar-gray .utc-contact-block:before {
	content: none;
}
.is-style-utc-sidebar-gray .utc-contact-block {
	border-left: none;
	border-right: none;
	border-top: none;
}

@media (max-width: 1230px) {
	.is-style-utc-sidebar, .is-style-utc-sidebar-gray {
		margin-top: 0;
		margin-right: 0;
	}
	:root :where(.is-layout-flow) > :first-child.is-style-utc-sidebar, 
	:root :where(.is-layout-flow) > :first-child.is-style-utc-sidebar-gray {
		margin-top: 0;
	}
}
@media (max-width: 992px) {
	.is-style-utc-sidebar,
	.is-style-utc-sidebar-gray {
		float: none;
		box-shadow: none;
		margin: 0;
		max-width: unset;
		padding-top: 0;
		padding-right: 0;
		padding-bottom: 0;
	}
}

/* blocs de contact */
.utc-contact-block {
	border: 1px solid var(--wp--preset--color--utc-accent);
	padding: 10px 15px 6px 5px;
	position: relative;
}
.utc-contact-block:before {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: var(--wp--preset--color--utc-accent);
	content: "";
	width: 30px;
	z-index: -1;
}
.utc-contact-header {
	margin-bottom: 10px;
}
.utc-contact-header .dashicons {
	margin-top: 4px;
}
.utc-contact-coord {
	margin-bottom: 5px;
}
.utc-contact-coord, .utc-contact-header {
	display: flex;
	gap: 15px;
}
.utc-contact-header p, .utc-contact-coord p {
	margin: 0;
}
.utc-contact-header .utc-contact-title {
	color: var(--wp--preset--color--utc-main);
	font-weight: bold;
	margin-bottom: 3px;
}
.utc-contact-coord {
	font-style: normal;
	align-items: center;
	font-size: 0.9em;
	padding-left: 3px;
}
.utc-contact-coord .dashicons {
	width: 15px;
	height: 15px;
	font-size: 15px;
}
.utc-contact-icon-wrapper {
	color: var(--wp--preset--color--utc-secondary);
}

/* dépliants */
.wp-block-details summary {
	font-size: 1.1rem;
	font-weight: bold;
	color: var(--wp--preset--color--utc-main);
	transition: 0.2s;
}
.wp-block-details summary:hover {
	color: var(--wp--preset--color--utc-accent);
}


/* menu flottant */
.is-style-utc-group-float {
	float: right;
}

/* menu */
.wp-block-navigation .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	gap: 5px;
}
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--utc-accent);
}
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	border: none;
	background-color: transparent;
	padding-top: 15px;
}
.wp-block-navigation .wp-block-navigation__submenu-container li {
	background-color: white;
	border-left: 1px solid var(--wp--preset--color--utc-border);
	border-right: 1px solid var(--wp--preset--color--utc-border);
}
.wp-block-navigation .wp-block-navigation__submenu-container li:first-child {
	border-top: 1px solid var(--wp--preset--color--utc-border);
}
.wp-block-navigation .wp-block-navigation__submenu-container li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--utc-border);
}
@media (max-width: 768px) {
	.is-style-utc-list-topbar .wp-block-navigation-item__label {
		display: none;
	}
}
@media (max-width: 576px) {
	.wp-block-navigation .wp-block-navigation__submenu-container li {
		border: none;
		margin-bottom: 10px;
	}
	.wp-block-navigation .wp-block-navigation__submenu-container li:first-child {
		border-top: none;
	}
	.wp-block-navigation .wp-block-navigation__submenu-container li:last-child {
		border-bottom: none;
	}
	.wp-block-navigation__responsive-dialog {
		padding: 25px;
	}
	.wp-block-navigation__responsive-container-close {
		top: 25px;
		right: 25px;
	}
}

/* blocs réhaussés */
@media (min-width: 1020px) {
	.is-style-negative-margin {
		margin-top: -40px !important;
	}
}

/* GRILLES DE DOC */
.utc-topics-grid i {
	font-size: 2.5rem;
}
.utc-topics-grid img {
	width: 2.8rem;
	height: 2.8rem;
}
.utc-topics-grid article:hover {
	background: var(--wp--preset--color--utc-lightbg);
}
.utc-topics-grid h3 {
	color: var(--wp--preset--color--utc-main);
	font-size: 1rem;
}
.utc-topics-grid h3 a:visited {
	color: var(--wp--preset--color--utc-visited);
}
.utc-topics-grid p {
	font-size: 0.9rem;
}