/*
Theme Name: Gutzilla
Theme URI: web-ia.com
Author: Boris Billy
Author URI: web-ia.com
Description: WEB IA starter theme
Tags: blog, portfolio, entertainment, grid-layout, one-column, two-columns, three-columns, four-columns, block-patterns, block-styles, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, full-width-template, rtl-language-support, style-variations, template-editing, theme-options, translation-ready, wide-blocks
Tested up to: 6.6
Requires PHP: 7.3
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gutzilla

Gutzilla WordPress Theme, (C) 2024 Boris Billy.
Gutzilla is distributed under the terms of the GNU GPL.
*/

/* CSS Reset
---------------------------------------------------------------------------- */

:root {
	--plyr-color-main: var(--wp--preset--color--primary);
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	scroll-behavior: smooth;
	box-sizing: border-box;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

b,
strong {
	font-weight: var(--wp--custom--font-weight--semi-bold);
}

ol,
ul {
	padding: 0;
}

ol:where(:not([class*="wp-block"])),
ol:where(.wp-block-list),
ul:where(:not([class*="wp-block"])),
ul:where(.wp-block-list) {
	padding-inline-start: var(--wp--preset--spacing--medium);
}

body#tinymce.wp-editor ol:where(:not([class*="wp-block"])),
body#tinymce.wp-editor ol:where(.wp-block-list),
body#tinymce.wp-editor ul:where(:not([class*="wp-block"])),
body#tinymce.wp-editor ul:where(.wp-block-list) {
	padding-left: 1em !important;
	padding-inline-start: 1.5em !important;
}

div[class*="wp-block-"] figcaption {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--x-small);
	margin-bottom: 0;
	margin-top: 20px;
	text-align: center;
}

img,
figure {
	max-width: 100%;
	height: auto;
}

/* 
:root :where(.is-layout-constrained)>*,
:root :where(.editor-styles-wrapper) :where(.is-layout-constrained)>* {
	margin-block-start: 0;
} */

.acf-block-component {
	padding: 0 !important;
}

/* Standardize form styling
--------------------------------------------- */

input,
button,
textarea,
select {
	font: inherit;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	-webkit-appearance: none;
}

input:not([type="submit"]),
select,
textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	color: var(--wp--preset--color--main);
	border-radius: 5px;
	border: solid 1px var(--wp--preset--color--main-accent);
	padding: .5em 1em;
	font-size: var(--wp--preset--font-size--small);
}

input:focus-visible,
textarea:focus-visible {
	outline-color: var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

label {
	width: 100%;
	display: block;
}

::placeholder {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}

/* Helper styles that can't be done via theme.json
---------------------------------------------------------------------------- */

a.more-link {
	display: block;
}

/* Inline code */
*:not(.wp-block-code)>code {
	background-color: var(--wp--preset--color--tertiary);
	font-weight: var(--wp--custom--font-weight--medium);
	;
	padding: 3px 5px;
	position: relative;
	border-radius: 3px;
}

/* Adjust terms at bottom of posts */
.single .wp-block-group .wp-block-post-terms,
.blog .wp-block-group .wp-block-post-terms {
	margin-bottom: -8px !important;
}

/* Remove margin on term description on archive pages */
.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Remove last separator on post list */
.remove-border-and-padding .wp-block-post-template li:last-child .wp-block-separator {
	display: none;
}

/* Hide post meta div if no tags assigned */
.single .wp-block-group:has(> .post-meta:empty) {
	display: none;
}

.wp-block-group:empty:has(+ .comment-respond) {
	display: none;
}

.row-logos>figure {
	flex-shrink: 1 !important;
}

@media (max-width: 781px) {
	.gutzilla-hide-on-mobile {
		display: none;
	}
}


/* 1 - Header */
body {
	&.has-top-bar {
		position: relative;

		#header_bar,
		main.site-content {
			transition: all 300ms ease-in-out;
		}
	}
}

.js-close {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
	margin: 0 auto;
	width: 100px;
	border: none;
	background-color: rgba(255, 255, 255, 0.25);
	border-radius: 0 0 6px 6px;
	color: #fff;
	transition: all 300ms ease-in-out;
	font-size: var(--wp--preset--font-size--small);

	&:hover {
		cursor: pointer;
		background-color: rgba(255, 255, 255, 0.35);
	}

	&.active {
		opacity: .4;

		&:hover {
			opacity: 1;
		}
	}
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 5;

	#top_bar {
		.is-style-level3 {

			a {
				font-size: var(--wp--preset--font-size--x-small);
				color: inherit;
			}
		}
	}

	.header__navigation {
		.wp-block-navigation__container {
			margin: 0 auto;

			.current-menu-item {
				>a {
					color: var(--wp--preset--color--primary);
					text-decoration: none;
				}
			}
		}
	}
}

@media (width <=781px) {
	.site-header {
		.header__navigation {
			justify-content: flex-end;

			.wp-block-buttons {
				justify-content: flex-start;
			}
		}

		.header-buttons {
			display: none;
		}
	}
}

.wp-pagenavi {
	text-align: center;
	margin: 0 0 1em 0;

	.pages {
		display: none;
	}

	span,
	a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: .4em .8em;
		margin: .5em;
		font-size: var(--wp--preset--font-size--x-small);
		text-decoration: none;
		border: solid 1px var(--wp--preset--color--main-accent);
		color: var(--wp--preset--color--secondary);
		background: transparent;
		transition: all 300ms ease-in-out;
		border-radius: 50%;
		width: 40px;
		height: 40px;
	}

	.current {
		background: var(--wp--preset--color--main);
		border-color: var(--wp--preset--color--main);
		color: var(--wp--preset--color--white);
	}

	a:hover {
		background: var(--wp--preset--color--main-accent);
		border-color: var(--wp--preset--color--main-accent);
		color: #fff !important;
		text-decoration: none;
	}
}

/* Card defaut */

.card-default {
	border: none;
	overflow: hidden;
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	background-color: #fff;

	.card-header {
		text-align: center;
		padding: 0;

		img {
			max-height: 250px;
			width: 100%;
			object-fit: cover;
			aspect-ratio: 4/3;
			margin: 0 auto;
		}
	}

	.card-body {
		padding: 0;
		flex: 1 1 auto;
	}

	.card-footer {
		padding: 0;
	}
}

/* Card actu */

.card-actu {
	border: solid 1px var(--wp--preset--color--main-accent);
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;

	.card-header {
		text-align: center;
		padding: 0;

		img {
			max-height: 250px;
			width: 100%;
			margin: 0 auto;
			text-align: center;
			object-fit: cover;
		}
	}

	.card-body {
		padding: 0 1.5em 1em;
		flex: 1 1 auto;

		.card-actu__texte {
			-webkit-line-clamp: 3;
			-webkit-box-orient: vertical;
			display: -webkit-box;
			overflow: hidden;
		}
	}

	.card-footer {
		background-color: var(--wp--preset--color--main-accent);
		padding: 1em 1.5em;
	}
}

/* card icon */
.card-icon {
	display: flex;
	flex-direction: column;
	background-color: transparent;
	padding: 0;
	min-width: inherit;
	border: none;

	@media(width < 781px) {

		.card-header {
			flex: 100px 0 0;
			margin-right: 0;
		}
	}

	.card-header {
		.card-header__icon {
			width: 140px;
			height: 140px;
			margin: 0 auto;
			padding: 0;
			display: flex;
			align-items: center;
			justify-content: center;

			img {
				width: auto;
				height: auto;
			}
		}
	}

	.card-body {
		text-align: center;
		padding: 0;
		font-size: 1.125rem;
		margin-top: 10px;
		/* @media(max-width: 781px) {
			text-align: left;
		} */

		.card-icon__titre {
			font-weight: 700;
			font-size: 1.125rem;
			color: var(--wp--preset--color--primary);
			margin: 0 0 5px;
		}

		.card-icon__texte {
			margin: 0;
			line-height: var(--wp--custom--line-height--snug);

			@media(width < 768px) {
				font-size: 1.125rem;
			}
		}
	}

}

/* card maillage */
.card-maillage {
	position: relative;
	aspect-ratio: 1/1;
	width: 280px;
	height: 280px;
	background-color: var(--wp--preset--color--secondary);
	overflow: hidden;
	border: none;
	padding: 0;

	@media(width < 991px) {
		width: 100%;
		height: auto;
	}

	.card-body {
		position: absolute;
		z-index: 1;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: rgba(255, 172, 102, 0.6);

		a {
			color: #fff;
			align-items: center;
			font-family: var(--wp--preset--font-family--secondary);
			font-size: 1.3125rem;
			font-weight: 400;
			padding: 0;

			span {
				align-items: center;

				&:before {
					display: none;
				}
			}
		}
	}

	.card-bg {
		position: absolute;
		z-index: 0;
		height: 100%;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;

		img {
			height: 100%;
			object-fit: cover;
			transition: all 300ms ease-in-out;

			@media(width < 991px) {
				aspect-ratio: 1/1;
			}
		}
	}

	&:hover {
		.card-bg {
			img {
				scale: 1.05;
			}
		}

	}
}

/* card big card */
.card-secondaire {
	border: none;
	padding: 0;
	min-width: none;
	max-width: none;
	min-height: 483px;
	height: 100%;
	background-color: var(--wp--preset--color--secondary);
	background-position: center;
	background-repeat: no-repeat;
	transition: all 300ms ease-in-out;
	position: relative;
	overflow: hidden;

	@media(width < 767px) {
		min-height: 242px;
		background-size: cover;
	}

	.card-secondaire__wrap {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;
		background: linear-gradient(360deg, #1E2034 0%, rgba(30, 32, 52, 0) 54.66%);
		padding: 50px 50px 46px;
		height: 100%;
		position: relative;
		z-index: 1;

		@media(width < 767px) {
			padding: 20px 20px 30px;
			background: linear-gradient(360deg, #1E2034 0%, rgba(30, 32, 52, 0) 68%);
		}

		.card-body {
			color: #fff;
			text-align: center;
			flex: auto 0 0;
		}
	}

	.card-secondaire__titre {
		color: #fff;
		font-size: 1.6875rem;
		margin: 0;
		font-weight: var(--wp--custom--font-weight--light);

		a {
			color: #fff;
			text-decoration: none;

			&:hover {
				text-decoration: none;
			}
		}
	}

	.card-secondaire__texte {
		margin: 0;
		line-height: var(--wp--custom--line-height--snug);

		@media(width < 767px) {
			display: none;
		}
	}

	.card-footer {
		padding: 14px 0 0;
		z-index: 1;
	}

	.card-secondaire__image {
		position: absolute;
		top: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;

		img {
			height: 100%;
			width: 100%;
			object-fit: cover;
			transition: all 300ms ease-in-out;

		}
	}

	&:hover {
		.card-secondaire__image {
			img {
				transform: scale(1.05);
			}
		}
	}
}

/* card trombinoscope */
.card-trombinoscope {
	border-radius: 5px;
	overflow: hidden;
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	border: 2px solid var(--wp--preset--color--primary);

	.card-header {
		text-align: center;
		padding: 1.25rem 1.25rem 0;

		img {
			height: 300px;
			aspect-ratio: 1/1;
			width: auto;
			margin: 0 auto;
			text-align: center;
			border-radius: 3px;
			object-fit: cover;
		}
	}

	.card-body {
		display: flex;
		flex-direction: row;
		padding: 1.5625rem 1.25rem 1.25rem;

		.card-trombinoscope__infos {
			flex: 1 1 auto;
		}

		.card-trombinoscope__links {
			flex: 0 0 auto;
			display: flex;
			align-items: center;

			a {
				font-size: 1.5rem;
				transition: all 300ms ease-in-out;

				&:hover {
					color: var(--wp--preset--color--primary);
				}
			}
		}

		.card-trombinoscope__nom {
			font-size: 1.25rem;
			margin: 0;
		}

		.card-trombinoscope__poste {
			font-weight: var(--wp--custom--font-weight--light);
			font-size: 1.125rem;
		}
	}

	.card-footer {
		display: flex;
		flex: 1 1 auto;
		padding: 0;
	}
}

/* Menu liste */
.menu__list {
	list-style: none;
	padding: 0;
	margin: 0;

	li {
		margin: 5px 0;

		a {
			text-decoration: none;

			&:hover {
				text-decoration: underline;
				color: var(--wp--preset--color--base);
			}
		}
	}
}

/* Utilities */

.btn-link {
	font-weight: bold;
	text-decoration: underline;
}

.wp-block-button__link {
	width: auto;
}

.stretched-link {
	&:after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		top: 0;
	}

}

.text-center {
	text-align: center;
}

.buttons {
	display: flex;
	gap: 30px;
}

.more-content {
	position: relative;

	p:empty {
		display: none;
	}

	/* &:not(.open) {
		&::after {
			content: "";
			position: absolute;
			bottom: 0;
			left: 0;
			right: 0;
			height: 100px;
			background: rgb(255, 255, 255);
			background: linear-gradient(0deg,
					rgba(255, 255, 255, 1) 0%,
					rgba(255, 255, 255, 0) 100%);
		}
	} */
}

.link.open {
	display: none;
}

.read-more-content {
	overflow: hidden;
	height: 0;
	transition: height 200ms ease-in-out;



	&.open {
		height: 100%;
		transition: height 200ms ease-in-out;
	}
}

/**************/

.modal {
	.close {
		position: absolute;
		top: 15px;
		right: 15px;
	}

	.modal-header {
		padding: 40px 50px 0 50px;
		border: none;

		@media(width < 765px) {
			padding: 15px;
		}

		.modal-title {
			position: relative;
			font-weight: 800;
			font-size: var(--wp--preset--font-size--large);
			font-family: var(--wp--preset--font-family--primary);
			color: var(--wp--preset--color--primary);
		}
	}

	.modal-body {
		padding: 15px 50px 40px 50px;

		@media(width < 765px) {
			padding: 15px;
		}
	}
}