@media (max-width: 1200px) {

  /* Cache le menu desktop */
  .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  /* Affiche le bouton burger */
  .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }

  /* Quand le menu est ouvert, on affiche la navigation */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column;
    gap: 15px;
  }
}

.img-contain img {
	object-fit: contain !important;
}

.img-max-height-33-vh img {
	max-height: 33vh;
	width: auto;
}

.gallery-300 > * {
	max-width: 300px !important;
	max-height: 300px !important;
}

.gallery-slider {
	overflow: scroll;
	flex-wrap: nowrap;
	max-width: 100vw;
}

.gallery-slider.gallery-300 > * {
	min-width: 300px;
	min-height: 300px;
}

.is-content-justification-space-around {
	display: flex;
	justify-content: space-around;
}

.has-text-align-justify {
	text-align: justify;
}

.wp-block-query-pagination-numbers {
	display: flex;
	gap: 10px;
}

.page-numbers.current {
	background-color: currentColor;
}

.page-numbers {
	border-radius: 50%;
	width: 1.5rem;
	height: 1.5rem;
	user-select: none;
	outline: none;
	border: 3px solid currentColor;
	content-visibility: hidden;
}

strong {
	font-weight: 700;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body,
html {
	height: 100%;
}

main {
	margin: 0;
}

footer {
	margin: 0;
}

p:not(.wp-block-post-excerpt__excerpt):not(
		.wp-block-post-excerpt__more-text
	):not(.has-text-align-left):not(.has-text-align-center):not(
		.has-text-align-right
	) {
	text-align: justify;
}

a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
	text-decoration: none;
	color: inherit;
}

.no-text-wrap {
	text-wrap: nowrap;
}

.min-width-500 {
	min-width: 500px;
}

@media screen and (max-width: 500px) {
	.min-width-500 {
		min-width: auto;
	}
}

.min-width-28 {
	min-width: 28px;
}

.apply-gradient {
	background: var(--wp--preset--color--gradient-bg);
}

@media screen and (min-width: 1700px) {
	.has-fit-text {
		font-size: 34px !important;
	}
}

.marquee {
	position: relative;
	width: 100%;
	overflow-x: hidden;
}

.track {
	white-space: nowrap;
	will-change: transform;
	animation: marquee 16s linear infinite;
	margin: 0px !important;
}

@keyframes marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-200%);
	}
}

header:has(> .is-position-sticky) {
	position: sticky;
	top: calc(0px + var(--wp-admin--admin-bar--height, 0px));
	z-index: 100;
}

/* .wp-block-column {
  min-width: fit-content;
} */

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation
	.wp-block-navigation-submenu
	.wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation
	.wp-block-navigation-item
	.wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation
	.wp-block-navigation-item
	ul.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

.custom-flex {
	display: flex !important;
	flex-wrap: wrap;
}

#activity-result {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	gap: 10px;
	flex: 1 0 250px;
	margin-top: 1rem;
	height: fit-content;
	z-index: 1;
}

@media screen and (max-width: 700px) {
	#activity-result {
		justify-content: center;
	}
}

.activity-card {
	position: relative;
	background-color: white;
	border-radius: 15px;
	border: 1px solid black;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: space-between;
	flex: 1 0 300px;
	max-width: 300px;
	transition:
		transform 0.25s ease,
		color 0.25s ease,
		background-color 0.25s ease,
		border-color 0.25s ease;
	height: fit-content;
}

.activity-card-img-container {
	height: 15rem;
	min-width: 100%;
	overflow: hidden;
}

.activity-card-img-container img {
	min-width: 100%;
	min-height: 100%;
}

.activity-card h3,
.leaflet-popup-content h3 {
	width: 100%;
	text-align: center;
	margin: 0;
	padding: 1rem 0;
	color: white;
	font-weight: bold;
}

.activity-card-tags {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	gap: 5px;
	margin: 5px;
}

.activity-card-tag {
	border-radius: 5px;
	background: var(--wp--preset--color--gradient-bg);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	padding: 3px 6px;
	font-weight: 700;
}

.activity-card:hover {
	color: initial;
	box-shadow:
		rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
		rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
	transform: scale(1.0225);
}

a.leaflet-popup-close-button {
	font-size: large;
	font-weight: bold;
}

/* Search bar */

.search-field {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	border-radius: 5px;
}

.search-bar--hero .search-field {
	box-shadow: 8px 8px #e57eff;
	font-size: 2rem;
	font-style: italic;
	flex-direction: row-reverse;
}

.search-submit-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-field input {
	margin: 0 auto;
	width: 100%;
	max-width: 100%;
	height: 45px;
	padding: 0 20px;
	font-size: 1rem;
	border: 1px solid var(--wp--preset--color--bright-bg);
	outline: none;
	border-radius: 0 5px 5px 0;
}

#search-form p {
	margin: 0px;
}

.search-bar--hero .search-field input {
	border-radius: 5px 0px 0px 5px;
}

.search-field input:focus {
	border: 1px solid var(--wp--preset--color--purple-bg);
	transition: 0.35s ease;
	color: var(--wp--preset--color--purple-bg);
}

.search-field input:focus::-webkit-input-placeholder,
.search-field input:focus::-moz-placeholder,
.search-field input:focus::-ms-placeholder {
	transition: opacity 0.45s ease;
	opacity: 0;
}

.search-bar--hero {
	width: 100%;
}

.search-bar {
	align-content: center;
}

.search-bar--hero input {
	height: 4rem;
	font-size: 1.5rem;
	font-style: italic;
}

.search-field-append {
	display: flex;
	background-color: white;
	justify-content: center;
	color: black;
	flex-direction: column;
	padding: 0 15px;
	border-radius: 5px 0 0 5px;
}

.search-bar--hero .search-field-append {
	border-radius: 0px 5px 5px 0px;
}

.search-bar--hero .search-field-search-icon {
	width: 2.5rem;
}

.search-field-search-icon {
	width: 1.8rem;
}

/* ROTATED TITLE */

.rotated-title.absolute {
	position: absolute;
	display: flex;
	width: 100%;
	z-index: 2;
}

.rotated-title.cropped.invert > * {
	transform: rotate(-6deg) translateY(-1.5em);
}

.rotated-title.invert > * {
	transform: rotate(-6deg);
}

.rotated-title > * {
	transform: rotate(6deg);
	max-width: 300px;
	text-align: center;
}

.rotated-title.cropped {
	overflow: hidden;
}

.rotated-title.cropped > * {
	transform: rotate(6deg) translateY(-1.5em);
}

/*  LANGUAGE SWITCHER */

.wpm-language-switcher.wpm-switcher-list,
.wpm-language-switcher.wpm-switcher-dropdown {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	margin-top: 5px;
}

.wpm-language-switcher.wpm-switcher-list > li > * > img,
.wpm-language-switcher.wpm-switcher-dropdown img {
	height: 30px;
	width: 50px;
	border-radius: 3px;
	border: 1px solid grey;
}

.wpm-language-switcher.wpm-switcher-dropdown img[src*='us.png'] {
	content: url(../images/usa-flag.webp);
}

.wpm-language-switcher.wpm-switcher-dropdown img[src*='uk.png'] {
	content: url(../images/uk-flag.webp);
}

.wpm-language-switcher.wpm-switcher-dropdown img[src*='es.png'] {
	content: url(../images/spain-flag.webp);
}

.wpm-language-switcher.wpm-switcher-dropdown img[src*='fr.png'] {
	content: url(../images/france-flag.webp);
}

/* SEPARATOR HEADER */

header hr.wp-block-separator {
	border: 0px;
}

@media screen and (max-width: 600px) {
	header .wp-block-buttons {
		display: none !important;
	}
}

@media screen and (max-width: 1200px) {
	hr.wp-block-separator {
		display: none !important;
	}
}

/* POST CARD */

.post-card-container {
	max-width: 700px;
	flex: 1 0 600px;
	width: fit-content;
	display: grid;
	grid-template-columns: 25% 75%;
	border: 3px solid black;
	border-radius: 16px;
	overflow: hidden;
	gap: 10px;
}

.post-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card-content {
	padding: 0 1em 0.5em 1em;
}

/* Responsive pour petits écrans */
@media screen and (max-width: 650px) {
	.post-card-container {
		grid-template-columns: 1fr; /* une seule colonne */
	}

	.post-card-img {
		width: 100%;
		height: 150px;
		object-fit: cover;
	}

	.post-card-content {
		width: 100%;
		padding: 0.5em 1em;
	}
}

#post-result {
	display: grid;
	grid-template-columns: 1fr 1fr;
	justify-content: center;
	gap: 30px;
}

@media screen and (max-width: 1100px) {
	#post-result {
		grid-template-columns: 1fr;
	}
}

.post-card-content p {
	margin: 0.5rem 0;
	word-wrap: break-word;
}

.post-card-content .wp-block-heading {
	font-weight: 600;
}

.post-card-container:hover .wp-block-heading {
	text-decoration: underline;
}

.post-card-container:hover {
	color: initial;
}

/* PAGINATION */

.pagination {
	display: flex;
	gap: 1rem;
	padding: 20px;
}

.page-btn {
	background: white;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	font-size: var(--wp--preset--spacing--30);
	font-weight: 600;
	height: 3rem;
	width: 3rem;
}

.page-btn.active,
.page-btn:hover {
	background: var(--wp--preset--color--purple-bg);
	color: var(--wp--preset--color--base);
}

/* SUMMARY / DETAILS */

details > summary {
	list-style: none;
}
details > summary::-webkit-details-marker {
	display: none;
}

summary:focus {
	outline: none;
}

/* Flèche custom */
summary::after {
	content: '';
	display: block;
	height: 20px;
	width: 20px;
	background-size: 20px 20px;
	background-image: url(../images/right-arrow.svg);
	background-repeat: no-repeat;
	filter: invert(100%);
	transition: transform 0.3s ease;
}

summary {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

/* Rotation quand ouvert */
details[open] summary::after {
	transform: rotate(90deg);
}

details::details-content {
	opacity: 0;
	transition: opacity 1s;
}

details[open]::details-content {
	opacity: 1;
}

/* LATEST POSTS IN HOME PAGE - BLOG CARD */

.blog-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

@media screen and (max-width: 900px) {
	.blog-grid {
		grid-template-columns: repeat(1, 1fr);
	}

	.blog-grid li:nth-child(1) > div {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media screen and (min-width: 900px) {
	.blog-grid li:nth-child(2) .blog-card,
	.blog-grid li:nth-child(3) .blog-card {
		flex-direction: row;
		flex-wrap: nowrap;
	}

	.blog-grid li:nth-child(2) .blog-card :first-child,
	.blog-grid li:nth-child(3) .blog-card :first-child {
		min-width: 12vw;
	}
}

.blog-card {
	background: #fff;
	overflow: hidden;
}

.blog-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-grid li:nth-child(1) {
	grid-row: span 2;
}

.blog-grid li:nth-child(1) > div {
	grid-template-columns: 1fr;
	height: 100%;
}

.blog-card {
	min-width: 300px;
}

.blog-card figure {
	height: 100%;
	max-height: 300px;
}

.project-icon {
	max-width: 150px;
	max-height: 50px;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.post-card {
	position: relative;
	transition:
		transform 0.25s ease,
		color 0.25s ease,
		background-color 0.25s ease,
		border-color 0.25s ease;
}

.post-card:hover {
	transform: scale(1.0425);
}

.post-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-indent: -9999px;
	height: 100%;
	width: 100%;
}

/* FLEX CONFIG */

.apply-flex-300 {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
}

.apply-flex-300 > * {
	flex: 1 0 300px;
	max-width: 400px;
}
