/*
 * Fuseaux de la Double — ajustements qui ne se font pas via theme.json.
 * Chargé après style.min.css de Twenty Twenty-Two.
 */

/* --------------------------------------------------------------------------
   En-tête et navigation
   -------------------------------------------------------------------------- */

.wp-site-blocks > header {
	border-bottom: 1px solid var(--wp--preset--color--secondary);
	margin-bottom: var(--wp--custom--spacing--medium);
}

.wp-block-site-title a {
	text-decoration: none;
}

.wp-block-site-title a:hover,
.wp-block-site-title a:focus {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item a {
	text-decoration: none;
	color: var(--wp--preset--color--foreground);
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item.current-menu-item > a {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--secondary);
}

/* Sous-menus */
.wp-block-navigation .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 6px;
	box-shadow: 0 8px 24px -12px rgba(44, 37, 33, .35);
	padding: .35rem 0;
}

/* --------------------------------------------------------------------------
   Liens
   -------------------------------------------------------------------------- */

a {
	text-decoration-thickness: 1px;
	text-underline-offset: .25ch;
}

/* Le soulignement pointillé au survol du thème parent fait « brouillon ». */
a:hover,
a:focus {
	text-decoration-style: solid;
	text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Cartes d'articles (accueil et archives)
   -------------------------------------------------------------------------- */

.fuseaux-card {
	background-color: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.fuseaux-card:hover,
.fuseaux-card:focus-within {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 10px 28px -18px rgba(44, 37, 33, .55);
	transform: translateY(-2px);
}

/* Le bloc texte occupe la hauteur restante pour aligner les cartes entre elles. */
.fuseaux-card > .wp-block-group {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.fuseaux-card .wp-block-post-featured-image {
	margin: 0;
}

.fuseaux-card .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.fuseaux-card .wp-block-post-title {
	font-size: 1.35rem;
	line-height: 1.25;
	margin: 0;
}

.fuseaux-card .wp-block-post-title a {
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.fuseaux-card .wp-block-post-title a:hover,
.fuseaux-card .wp-block-post-title a:focus {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.fuseaux-card .wp-block-post-date a {
	color: inherit;
	text-decoration: none;
}

.fuseaux-card .wp-block-post-excerpt {
	margin-top: 0;
}

.fuseaux-card .wp-block-post-excerpt__excerpt {
	font-size: 1rem;
	margin-bottom: .75rem;
}

/* Le lien « Lire la suite » est poussé en bas pour aligner les cartes. */
.fuseaux-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	margin-bottom: 0;
}

.fuseaux-card .wp-block-post-excerpt__more-link {
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
}

.fuseaux-card .wp-block-post-excerpt__more-link:hover,
.fuseaux-card .wp-block-post-excerpt__more-link:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Colonne latérale de l'accueil
   -------------------------------------------------------------------------- */

/* Au-delà du point de bascule des colonnes de Gutenberg (782 px). */
@media (min-width: 782px) {
	.fuseaux-aside {
		align-self: flex-start;
		position: sticky;
		top: 1.5rem;
	}
}

.fuseaux-aside__title {
	border-bottom: 1px solid var(--wp--preset--color--secondary);
	margin-bottom: 1.1rem;
	padding-bottom: .5rem;
}

/* --------------------------------------------------------------------------
   Carrousel de photos
   -------------------------------------------------------------------------- */

.fuseaux-carousel {
	background-color: var(--wp--preset--color--tertiary);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 10px;
	overflow: hidden;
}

.fuseaux-carousel__track {
	display: flex;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	/* Firefox et navigateurs récents : pas de barre de défilement visible. */
	scrollbar-width: none;
}

.fuseaux-carousel__track::-webkit-scrollbar {
	display: none;
}

.fuseaux-carousel__track:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -2px;
}

.fuseaux-carousel__slide {
	flex: 0 0 100%;
	margin: 0;
	position: relative;
	scroll-snap-align: start;
}

.fuseaux-carousel__slide img {
	aspect-ratio: 4 / 3;
	border-radius: 0;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.fuseaux-carousel__caption {
	background: linear-gradient(to top, rgba(44, 37, 33, .78), rgba(44, 37, 33, 0));
	bottom: 0;
	color: #fff;
	font-size: .875rem;
	font-style: normal;
	left: 0;
	padding: 2rem .9rem .7rem;
	position: absolute;
	right: 0;
	text-align: left;
}

.fuseaux-carousel__controls {
	align-items: center;
	background-color: var(--wp--preset--color--background);
	border-top: 1px solid var(--wp--preset--color--secondary);
	display: flex;
	gap: .5rem;
	justify-content: space-between;
	padding: .4rem .5rem;
}

.fuseaux-carousel__btn {
	background: transparent;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 6px;
	color: var(--wp--preset--color--foreground);
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	padding: .25rem .7rem;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.fuseaux-carousel__btn:hover,
.fuseaux-carousel__btn:focus-visible {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

.fuseaux-carousel__count {
	color: var(--wp--preset--color--accent);
	font-size: .8125rem;
	letter-spacing: .04em;
	margin: 0;
}

/* Sans JavaScript, les boutons sont masqués : le défilement tactile suffit. */
.fuseaux-carousel:not(.is-enhanced) .fuseaux-carousel__btn {
	display: none;
}

.fuseaux-carousel:not(.is-enhanced) .fuseaux-carousel__controls {
	justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
	.fuseaux-carousel__track {
		scroll-behavior: auto;
	}
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.wp-block-query-pagination {
	border-top: 1px solid var(--wp--preset--color--secondary);
	padding-top: 1.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	text-decoration: none;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination a:focus {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-query-pagination-numbers .current {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Contenu
   -------------------------------------------------------------------------- */

.wp-block-post-content img,
.wp-block-post-featured-image img,
.wp-block-image img {
	border-radius: 8px;
	height: auto;
	max-width: 100%;
}

.wp-block-post-content figcaption,
.wp-block-image figcaption {
	color: var(--wp--preset--color--accent);
	font-size: .9375rem;
	font-style: italic;
}

.wp-block-post-content :where(table) {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-post-content :where(table) th,
.wp-block-post-content :where(table) td {
	border: 1px solid var(--wp--preset--color--secondary);
	padding: .5em .75em;
}

.wp-block-post-content :where(table) th {
	background-color: var(--wp--preset--color--tertiary);
	text-align: left;
}

:where(pre) {
	background-color: var(--wp--preset--color--tertiary);
	border-radius: 8px;
	overflow-x: auto;
	padding: 1rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Galeries NextGEN : cohérence avec le reste du site
   -------------------------------------------------------------------------- */

.ngg-galleryoverview img,
.ngg-gallery-thumbnail img {
	border-radius: 6px !important;
	height: auto;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.wp-site-blocks > footer {
	background-color: var(--wp--preset--color--tertiary);
	border-top: 1px solid var(--wp--preset--color--secondary);
	margin-top: var(--wp--custom--spacing--large);
}

.wp-site-blocks > footer a {
	text-decoration: none;
}

.wp-site-blocks > footer a:hover,
.wp-site-blocks > footer a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Accessibilité
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
