/*
Theme Name: Réseau Saint-Laurent — Thème enfant
Description: Thème enfant FSE du site Réseau Saint-Laurent.
Author: Réseau Saint-Laurent
Template: fse-nonprofit-ngo
Version: 0.4.0
Text Domain: rsl-child
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * Bandeau photographique commun et sections de la page d'accueil.
 *
 * Le bandeau est limité à sa partie de modèle ; la carte et les actualités
 * restent limitées à la page d'accueil.
 */

/* La photo du bandeau garde un cadre stable et est recadrée sans déformation. */
.wp-site-blocks > .rsl-site-banner {
	margin-block: 0;
}

.rsl-site-banner .round-img-wrap .round-img {
	width: min( 100%, clamp( 320px, 30vw, 430px ) ) !important;
	height: auto !important;
	aspect-ratio: 2 / 3;
}

.rsl-site-banner .round-img-wrap .round-img::after {
	display: block;
	width: 100% !important;
	height: 100% !important;
	top: 8px;
	right: -8px;
	bottom: auto;
	z-index: 1;
}

.rsl-site-banner .round-img-wrap .round-img img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center;
}

.rsl-site-banner .slider-upper::before {
	z-index: 0;
	pointer-events: none;
}

.rsl-site-banner .slider-upper {
	z-index: 2;
}

.rsl-site-banner .slider-img {
	position: relative;
	z-index: 1;
}

.rsl-site-banner .round-img-wrap {
	z-index: 2;
}

/* Section Carte, directement sous le bandeau et de bord à bord. */
.home .rsl-map-section {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.home .rsl-map-embed {
	position: relative;
	overflow: hidden;
	width: 100vw;
	max-width: none !important;
	margin: 0 calc( 50% - 50vw ) !important;
	border: 0;
	border-radius: 0;
	background: var( --wp--preset--color--tertiary-bg-color );
	box-shadow: none;
}

.home .rsl-map-embed iframe {
	display: block;
	width: 100%;
	height: clamp( 520px, 55vw, 720px );
	margin: 0 !important;
	border: 0;
}

/* Section Actualités. */
.home .rsl-blog-section {
	padding-block: clamp( 3rem, 6vw, 5rem );
}

.home .rsl-blog-section .wp-block-post-excerpt__more-link {
	font-weight: 700;
	text-underline-offset: 0.2em;
}

.home .rsl-blog-section .wp-block-post-template {
	align-items: stretch;
}

.home .rsl-blog-card {
	height: 100%;
	overflow: hidden;
	border-radius: 30px;
	background: var( --wp--preset--color--background );
	box-shadow: 0 5px 25px rgba( 0, 0, 0, 0.08 );
}

.home .rsl-blog-card .wp-block-post-featured-image {
	margin: 0;
}

.home .rsl-blog-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.home .rsl-blog-card-content {
	padding: clamp( 1.25rem, 3vw, 2rem );
}

.home .rsl-blog-empty {
	padding: 2rem;
	border-radius: 20px;
	background: var( --wp--preset--color--background );
	text-align: center;
}

@media screen and ( max-width: 991px ) {
	.rsl-site-banner .round-img-wrap .round-img {
		width: min( 100%, 300px ) !important;
		aspect-ratio: 3 / 4;
	}
}

@media screen and ( max-width: 599px ) {
	.rsl-site-banner .slider-img img {
		height: 620px;
	}

	.rsl-site-banner .slider-upper::before {
		display: block;
		height: 650px;
	}

	.rsl-site-banner .round-img-wrap {
		top: 50%;
	}

	.rsl-site-banner .round-img-cols {
		gap: 1rem !important;
	}

	.rsl-site-banner .banner-text-box,
	.rsl-site-banner .banner-img-col {
		flex-basis: 100% !important;
	}

	.rsl-site-banner .banner-text-box .wp-block-spacer {
		height: 0 !important;
	}

	.rsl-site-banner .banner-img-col {
		display: block !important;
	}

	.rsl-site-banner .round-img-wrap .round-img {
		width: 160px !important;
		margin-inline: auto !important;
		aspect-ratio: 3 / 4;
	}

	.home .rsl-map-embed iframe {
		height: 520px;
	}
}
