:root {
	--pico-font-family: Inter, sans-serif;
	--pico-font-weight: 350;
}
@supports (font-variation-settings: normal) {
    :root {
        --pico-font-family: InterVariable, sans-serif;
    }
}

@media (width < 576px) {
    .hidemobile {
        display: none;
    }
}

header {
	@media (width >= 576px) {
		position: sticky;
	}
	top: 0;
	background: white;
	z-index: 100;
	background: color-mix(in srgb, var(--pico-card-background-color) 80%, transparent);
	backdrop-filter: blur(4px);
	box-shadow: var(--pico-card-box-shadow);
}
header nav {
	flex-direction: column;
}
header h1 {
	display: block;
	font-size: inherit;
	a {
		text-decoration: none;
	}
}
header ul {
	display: flex;
	justify-content: center;
	gap: var(--pico-spacing);
	@media (width < 576px) {
		flex-direction: column;
		gap: 0;
	}
}
.home > section {
	margin-top: 4rem;
}
body > main {
	padding: 0;
	margin-top: 4rem;
}
.home-page-hero {
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--pico-spacing);
	padding-top: 4rem;
	padding-bottom: 4rem;
}
.home .body {
    text-align: center;
}

.hero {
	text-align: center;

	nav {
		display: flex;
		flex-direction: column;
		gap: var(--pico-spacing);

		@media (width >= 576px) {
			flex-direction: row;
			justify-content: center;
		}
	}
}

footer {
	margin-top: 2rem;
	font-size: 0.8em;
	h2 {
		font-size: inherit;
		font-weight: 600;
	}
	gap: var(--pico-spacing);
	opacity: .8;
	display: grid;
	@media (width >= 576px) {
	    grid-template-columns: 1fr 1fr;
	}
}
.footer-contact {
	display: grid;
	grid-template-columns: 1fr;

	p {
		margin: 0;
	}
}
.footer-links {
	ul {
		padding: 0;
	}
	li {
		list-style: none;
		margin: 0;
	}
}

h1 {
	font-weight: 800;
	font-size: 3em;
	text-align: center;
}

img {
	border-radius: var(--pico-border-radius);
}

.richtext-image {
    display: block;
    margin: var(--pico-spacing);
    max-width: 50%;
}

.richtext-image.full-width {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.richtext-image.left {
    float: left;
    margin-left: 0;
}

.richtext-image.right {
    float: right;
    margin-right: 0;
}

article {
	position: relative;
	overflow: hidden;
	display: grid;
	padding: 0;
}
article a {
	padding: var(--pico-spacing);
	text-decoration: none;
}

.formations {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	column-gap: var(--pico-spacing);

	h2 {
		grid-column: 1 / -1;
	}
}
article.formation {
	min-height: 8rem;

	a {
		display: flex;
		flex-direction: column;
		background: color-mix(in srgb, var(--pico-card-background-color) 80%, transparent);
		z-index: 2;
		--pico-color: var(--pico-contrast);
	}
	img {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		filter: blur(4px);
	}
}
.titre-formation {
	margin-top: auto;
}

.actualites a {
    display: flex;
    gap: var(--pico-spacing);
    @media (width < 576px) {
        flex-direction: column;
    }
}
.date-actualite {
	color: var(--pico-muted-color);
	text-decoration: none;
}

#contact-map {
	border-radius: var(--pico-border-radius);
	overflow: hidden;
	width: 100%;
	height: 20rem;
}

.full {
	min-height: 50vh;
	background: var(--pico-primary-background);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 2rem;
	padding-bottom: 2rem;
	margin-top: 2rem;
	margin-bottom: 2rem;

	section, h2 {
		color: var(--pico-primary-inverse);
	}
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, 256px);
	gap: var(--pico-spacing);
	h2 {
		grid-column: 1 / -1;
	}
}

.folder {
    margin-bottom: 2rem;
}
.parent-folder {
    font-weight: 600;
}

.carousel {
    width: 100%;
    display: flex;
    gap: var(--pico-spacing);
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    anchor-name: --carousel;
    align-items: center;
    scroll-marker-group: after;

    &::scroll-button(*) {
        border: 0;
        font-size: 2rem;
        background: var(--pico-primary);
        border-radius: var(--pico-border-radius);
        color: var(--pico-primary-inverse);
        aspect-ratio: 1;
        cursor: pointer;
        position: absolute;
        position-anchor: --carousel;
        font-family: "remixicon" !important;
    }

    &::scroll-button(*):hover,
    &::scroll-button(*):focus {
      opacity: 1;
    }

    &::scroll-button(*):active {
        scale: 0.9;
    }

    &::scroll-button(*):disabled {
      cursor: unset;
      opacity: var(--pico-form-element-disabled-opacity);
    }

    &::scroll-button(left) {
      content: "\ea60" / "Previous";
      left: calc(anchor(left) + var(--pico-spacing));
      bottom: calc(anchor(bottom) + var(--pico-spacing))
    }

    &::scroll-button(right) {
      content: "\ea6c" / "Next";
      right: calc(anchor(right) + var(--pico-spacing));
      bottom: calc(anchor(bottom) + var(--pico-spacing))
    }

    li {
        list-style-type: none;
        flex: 0 0 100%;
        text-align: center;
        scroll-snap-align: center;

        img {
            max-height: 50vh;
            width: auto;
        }
    }
}
