@charset "UTF-8";

/**
 * grids.css 1.7.0
 * Author: hybrid.
 * Type: core
 *
 * Grid layout system — CSS Grid based, responsive, with AJAX support.
 * Type-specific grids (table, search, products, events, posts...) live in the project (styles-*.css).
 *
 * STRUCTURE
 * .grid > .items > .item > .item-content
 *                        > .images / .thumbnails
 *                        > .infos
 *
 * MODIFIERS
 * .grid.list        — single column, horizontal layout
 * .grid.fit         — no gap between items
 * .grid.swiperable  — switchable to swiper (layout in swipers.css, margins here)
 * .grid.fluid       — masonry-style fluid layout
 *
 * ITEM SIZES
 * .item.large  — 2:1 thumbnail ratio
 * .item.small  — 1:1 thumbnail ratio
 * .item.sticky — full-width row (grid-column: 1 / -1)
 *
 * ITEM STATES
 * .item.empty     — no content
 * .item.disabled  — unavailable
 *
 * GRID SIZES (items per row)
 * .has-items-N              — numeric target (core/group)
 * .has-items-min/-short     — named presets (core/gallery)
 * See CSS-GUIDELINES.md § Nomenclature (size and quantity classes)
 *
 * ITEMS SIZING (set on the grid concerned, eg. .grid.posts)
 * count   --items-per-row (or .has-items-N)                  exactly N columns
 * width   --item-width on .items (eg. 15rem)                 as many columns as fit
 * both    --items-per-row + --grid-item-min-width            at most N columns, each at least that wide
 * Thresholds between counts (container queries) live in the project (styles-grids.css).
 *
 * Tokens
 * --grid-gap-x / --grid-gap-y   gap between items (responsive)
 * --grid-swiperable-gutter        half gap, margin of .item-content in .grid.swiperable
 * --items-per-row                 columns count (set on .items from the grid's own width)
 * --items-target                 defined in alignment.css (has-items-N), used above the container threshold
 * --item-width                    computed from --items-per-row / --grid-gap-x
 * --grid-item-min-width           minimum item width (default: 0px = count only)
 * --item-border-radius            item corner radius
 * --item-background-color         item background (hover / list state)
 * --item-border-top               .grid.list separator — override per type in theme
 * --item-padding-x / --item-padding-y   item-content padding (.grid.list: 1em vertical)
 * --item-empty-opacity            .item.empty opacity
 * --item-disabled-opacity         .item.disabled opacity
 * --grid-font-size                font-size context for .grid
 * --grid-fluid-height             row height for .grid.fluid
 * --results-gap-x / --results-gap-y   gap of .results
 * --results-items-gap             gap between .results-item
 * --results-item-content-gap      gap inside .results-item-content
 * --results-title-size            .results-title font-size
 * --results-title-font-weight     .results-title font-weight
 * --results-title-sticky-top      sticky offset of .results-title (default: --header-height)
 * --results-unavailable-color     .results.unavailable .results-title color
 * --results-description-font-size .results-description font-size
 * --gridfilter-active-decoration / -thickness / -offset   active / pressed state, not carried by colour alone
 * --gridfilter-disabled-opacity / -decoration   disabled state, not carried by colour alone
 * --gridfilter-busy-cursor                       cursor on [aria-busy="true"]
 * --grid-status-spacing                          margin-top of the element after .grid-status (in the flow)
 * --grid-status-first-spacing                    same, when .grid-status is the first child
 *
 * Note
 * Core = mobile base only (1 column, small gap, 10rem fluid height). Thresholds (@container grid)
 * and desktop gap / fluid height live in the project styles.css.
 * Tokens set by a modifier (.grid.list, .grid.fit, .results.min, #overlays) are declared
 * next to the modifier rules, not in CONFIG.
 * Filter controls: classes and attributes set by grid-manager.js (.gridfilter-enhanced on the
 * [data-grid-target] containers, .grid-status live region, aria-pressed / aria-disabled / aria-busy).
 * Results stay basic: the project adds its own sticky offsets (contextual bar...) by
 * overriding --results-title-sticky-top.
 *
 * Dependencies
 * alignment.css                         --items-target
 * --h2-font-size, --font-weight-medium  defined in fonts.css
 * --text-color, --grey-color            defined in colors.css
 * --stroke-width, --disabled-opacity    defined in reset.css
 * --ease, --duration-fast, --duration-normal  defined in animations.css
 * --content-spacing                     defined in spacing.css
 * --header-height                     defined in layout.css
 * --collapsible-spacing-top           defined in collapsible.css (optional, fallback 0px)
 */



/* ================================================================================================== */
/* ============================================= CONFIG ============================================= */
/* ================================================================================================== */


/* ============================== GRIDS ============================== */

:root, .grid {
	--grid-font-size: 1em;
	--grid-gap-x: .5em;
	--grid-gap-y: .5em;
	--grid-swiperable-gutter: calc(var(--grid-gap-x) * .5);
}


/* ============================== ITEM ============================== */

:root, .grid {
	--item-text-color: var(--text-color);
	--item-background-color: none;
	--item-border-radius: 0;
	--item-empty-opacity: var(--disabled-opacity);
	--item-disabled-opacity: var(--disabled-opacity);
}


/* ============================== ITEM CONTENT ============================== */

:root,
.grid {
	--item-direction: column;
	--item-gap: 1em;
	--item-padding-x: 0px;
	--item-padding-y: 0px;
}


/* ============================== ITEM MIN WIDTH ============================== */

/**
 * Three ways to size a grid, all scoped to the grid they are set on (eg. .grid.posts):
 * - count:  --items-per-row (or .has-items-N) = exactly N columns
 * - width:  --item-width on .items (eg. 15rem) = as many columns as fit
 * - both:   --items-per-row + --grid-item-min-width = at most N columns, each at least that wide
 * The track is capped at 100% of the container, so a too-wide minimum never overflows.
 */

:root,
.grid { --grid-item-min-width: 0px; }


/* ============================== FLUID ============================== */

:root { --grid-fluid-height: 10rem; }


/* ============================== RESULTS ============================== */

:root {
	--results-gap-x: 0px;
	--results-gap-y: calc(var(--content-spacing) * 1.5);
	--results-items-gap: calc(var(--content-spacing) * 2);
	--results-item-content-gap: .5em;

	--results-title-sticky-top: var(--header-height);
	--results-title-size: var(--h2-font-size, 1.5em);
	--results-title-font-weight: var(--font-weight-medium);
	--results-unavailable-color: var(--grey-color);
	--results-description-font-size: 1em;
}


/* ============================== GRID FILTERS ============================== */

:root {
	--gridfilter-active-decoration: underline;
	--gridfilter-active-thickness: 2px;
	--gridfilter-active-offset: 2px;
	--gridfilter-disabled-opacity: var(--disabled-opacity);
	--gridfilter-disabled-decoration: line-through;
	--gridfilter-busy-cursor: progress;
}


/* ============================== GRID STATUS ============================== */

/* Also declared on the element after .grid-status: var() must resolve in its own context */

:root,
:where(.grid-status) + * {
	--grid-status-spacing: var(--content-spacing);
	/* spacing a collapsible gives its first child, 0px outside a collapsible */
	--grid-status-first-spacing: var(--collapsible-spacing-top, 0px);
}


/* ============================== SIZES ============================== */

/* --item-width is declared wherever --items-per-row is set: a var() resolves on the element that declares it */

:root,
.grid,
[class*='has-items-'] { --items-per-row: 1; }

/* declared on .items: the container queries (styles.css) set --items-per-row here */
:root,
.grid,
[class*='has-items-'],
.grid .items { --item-width: calc(100% / var(--items-per-row) - var(--grid-gap-x) * 2); }



/* ====================================================================================================== */
/* ============================================= ANIMATIONS ============================================= */
/* ====================================================================================================== */


/* =============== DEFAULT =============== */

.results-item,
.grid .item {
	transition:
		opacity var(--duration-normal) var(--ease),
		transform var(--duration-normal) var(--ease);
}
.results-title,
.grid .item.off {
	transition:
		opacity var(--duration-fast) var(--ease),
		transform var(--duration-fast) var(--ease);
}
.grid .infos,
.grid .infos > *:not(.button) {
	transition:
		opacity var(--duration-fast) var(--ease),
		transform var(--duration-fast) var(--ease);
}

/* TODO: check whether medias.css already handles .thumbnail */
.grid a.item-content .thumbnail {
	transition: all var(--duration-fast);
}


/* =============== REDUCED MOTION =============== */

@media (prefers-reduced-motion: reduce) {
	.results-item,
	.grid .item,
	.results-title,
	.grid .item.off,
	.grid .infos,
	.grid .infos > *:not(.button),
	.grid a.item-content .thumbnail { transition: none; }
}



/* ================================================================================================= */
/* ============================================= GRIDS ============================================= */
/* ================================================================================================= */


/* ============================== GRID ============================== */

.grid {
	position: relative;
	width: 100%;
	font-size: var(--grid-font-size);
	container-type: inline-size;
	container-name: grid;
}


/* ============================== ITEMS ============================== */

.grid .items {
	position: relative;
	display: grid;
	grid-auto-flow: dense;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--item-width), var(--grid-item-min-width))), 1fr));
	gap: var(--grid-gap-y) var(--grid-gap-x);
	width: 100%;
}


/* ============================== ITEM ============================== */

.grid .item {
	position: relative;
	display: flex;
	height: 100%;
	width: 100%;
	border-radius: var(--item-border-radius);
}


/* ============================== ITEM CONTENT ============================== */

.grid .item-content {
	position: relative;
	z-index: 10;
	display: flex;
	flex-direction: var(--item-direction);
	gap: var(--item-gap);
	height: 100%;
	width: 100%;
	margin: 0;
	padding-inline: var(--item-padding-x);
	padding-block: var(--item-padding-y);
}
.grid .item-content > * { margin: 0; }
.grid a.item-content::after { display: none; }


/* ============================== HOVER ============================== */

@media (hover: hover) {
	.grid a.item-content:hover {
		color: var(--item-text-color);
		background: var(--item-background-color);
	}
}
@media (hover: none) {
	.grid a.item-content.hover {
		color: var(--item-text-color);
		background: var(--item-background-color);
	}
}


/* ============================== LIST ============================== */

.grid.list {
	--grid-gap-x: .25em;
	--grid-gap-y: .25em;
	--item-padding-x: 0px;
	--item-padding-y: 1em;
	--item-border-top: solid var(--stroke-width);
}
.grid.list .items {
	grid-template-columns: 1fr;
	gap: 0;
}
.grid.list .item { background: none; }
.grid.list .item-content {
	flex-direction: row;
	flex-wrap: wrap;
}


/* ============================== FIT ============================== */

/* after LIST: .fit wins over the list gap (same specificity, source order decides) */

.grid.fit {
	--grid-gap-x: 0px;
	--grid-gap-y: 0px;
}


/* ============================== SWIPERABLE ============================== */

/* margins for .grid.swiperable — layout/behavior lives in swipers.css.
   .swiper-slide margin:0 already covered generically in swipers.css > CORE > SWIPER-SLIDE. */

.grid.swiperable .item { margin: 0; }
.grid.swiperable .item-content { margin: 0 var(--grid-swiperable-gutter); }


/* ============================== STATUS ============================== */

.grid .item.empty { opacity: var(--item-empty-opacity); }
.grid .item.disabled { opacity: var(--item-disabled-opacity); }


/* ============================== STICKY ============================== */

.grid:not(.list) .item.sticky {
	grid-column: 1 / -1;
	grid-row: auto;
}


/* ============================== LOADING ============================== */

/* no :where() — the loading state must win over STATUS (same specificity, source order decides) */

.grid-container.is-loading::before,
.grid.is-loading::before {
	position: fixed;
	z-index: 100;
	top: 50%;
	left: 50%;
	transform: translate3d(-50%, -50%, 0);
	visibility: hidden;
}

.grid-container.is-loading .results-title,
.grid-container.is-loading .item,
.grid.is-loading .results-title,
.grid.is-loading .item { opacity: 0; }



/* ================================================================================================= */
/* ========================================= GRID FILTERS ========================================== */
/* ================================================================================================= */


/* ============================== STATE ============================== */

/* .gridfilter-enhanced is set by grid-manager.js on the filter containers.
   Focus ring: none here, the filter controls follow reset.css (anchors, .links buttons) and forms.css (fields).
   Active / pressed: underline, not colour only */
:where(.gridfilter-enhanced) :where([aria-pressed='true'], .active) {
	text-decoration: var(--gridfilter-active-decoration);
	text-decoration-thickness: var(--gridfilter-active-thickness);
	text-underline-offset: var(--gridfilter-active-offset);
}

/* Disabled: opacity + strike-through, the control stays focusable */
:where(.gridfilter-enhanced) :where([aria-disabled='true'], .disabled) {
	opacity: var(--gridfilter-disabled-opacity);
	text-decoration: var(--gridfilter-disabled-decoration);
}

:where([data-grid-origin][aria-busy='true']) { cursor: var(--gridfilter-busy-cursor); }


/* ============================== STATUS ============================== */

/* Live region announcing the results count: hidden visually, read by assistive technologies */
:where(.grid-status) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}


/* ============================== STATUS SPACING ============================== */

/* .grid-status is out of the flow: the element after it takes the margin the status would have
   received (spacing.css / collapsible.css give it to the status, not to the grid) */

:where(* + .grid-status) + * { margin-top: var(--grid-status-spacing); }
:where(.grid-status:first-child) + * { margin-top: var(--grid-status-first-spacing); }


/* ============================== NO JS ============================== */

/* The submit button only serves the form without JS */
:where(.gridfilter-enhanced) :where(.grid-submit-nojs) { display: none; }



/* ================================================================================================= */
/* ============================================= FLUID ============================================= */
/* ================================================================================================= */

/**
 * Google Images style / JS
 * figure: aspect-ratio inline via style="aspect-ratio: 22/13;"
 * .grid-initialized — after JS init
 */

/* ============================== DEFAULT ============================== */

.grid.fluid .items {
	display: flex;
	flex-wrap: wrap;
}
.grid.fluid .item {
	flex: 1 0 auto;
	width: auto;
}


/* ============================== IMG ============================== */

.grid.fluid figure { height: 100%; }
.grid.fluid:not(.grid-initialized) figure:not(.cropped) img { width: auto; }
.grid.fluid figure figcaption { width: 0; min-width: 100%; }
.grid.fluid picture,
.grid.fluid:not(.grid-initialized) figure:not(.cropped) img { height: var(--grid-fluid-height); }


/* ============================== INIT ============================== */

.grid.fluid.grid-initialized :where(.item, .item-content, figure, picture) { height: auto; }
.grid.fluid.grid-initialized .item { flex-grow: 0; }
/* !important: beats the inline aspect-ratio set on the figure / picture before init */
.grid.fluid.grid-initialized figure:not(.cropped) picture { aspect-ratio: auto !important; }



/* =================================================================================================== */
/* ============================================= RESULTS ============================================= */
/* =================================================================================================== */


/* ============================== DEFAULT ============================== */

.results {
	display: flex;
	flex-direction: column;
	gap: var(--results-gap-y) var(--results-gap-x);
	width: 100%;
}


/* ============================== MODIFIERS ============================== */

.results.min {
	--results-gap-y: var(--content-spacing);
	--results-gap-x: var(--content-spacing);
}

#overlays { --results-title-sticky-top: 0; }


/* ============================== RESULTS ITEMS ============================== */

.results > .results-items {
	display: flex;
	flex-direction: column;
	gap: var(--results-items-gap);
}


/* ============================== RESULTS ITEM ============================== */

.results-item {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}


/* ============================== RESULTS ITEM CONTENT ============================== */

.results-item-content {
	display: flex;
	flex-direction: column;
	gap: var(--results-item-content-gap);
	margin: 0;
}


/* ============================== RESULTS-TITLE ============================== */

.results-title {
	display: flex;
	align-items: baseline;
	font-size: var(--results-title-size);
	font-weight: var(--results-title-font-weight);
}
.results-title > * { margin: 0; }

body.is-loading .results-title { opacity: 0; }
.results.unavailable .results-title { color: var(--results-unavailable-color); }

.results-title.sticky {
	position: sticky;
	z-index: 100;
	top: var(--results-title-sticky-top);
}


/* ============================== RESULTS-DESCRIPTION ============================== */

.results-description { font-size: var(--results-description-font-size); }


/* ============================== AS SWIPER ============================== */

.results.swiper-container .swiper-slide { opacity: 0; }
.results.swiper-container .swiper-slide-active { opacity: 1; }