/* Longtemps Studies / Études index — shared by EN and FR pages.
   Parent: .studies-index   Card: .study-card   (see README.md for the class list)
   Spacing follows the homepage convention: 0.5em around the parent, 0.5em between cards. */

/* Cornerstone's own Div/Section rules load with the same specificity, so the structural
   declarations below use !important. Colours, type and imagery are never forced. */
.studies-index {
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 0.5em !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0.5em !important;
}

.study-card {
	position: relative !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
}

/* Full height: one screen minus the parent's top/bottom padding.
   vh is the fallback; svh (small viewport) keeps mobile browser chrome from clipping the card. */
.study-card--full {
	min-height: calc(100vh - 1em) !important;
	min-height: calc(100svh - 1em) !important;
}

/* Text card */
.study-card--text {
	padding: 0.5em !important;
}

/* Image card: the image fills the card; fit is chosen by --cover or --contain (default: cover) */
.study-card--image {
	padding: 0 !important;
}
.study-card__media {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.study-card--cover .study-card__media {
	object-fit: cover;
}
.study-card--contain .study-card__media {
	object-fit: contain;
}
.study-card--full.study-card--image .study-card__media {
	position: absolute;
	inset: 0;
}

/* Content alignment (vertical, then text) */
.study-card--top    { justify-content: flex-start; }
.study-card--middle { justify-content: center; }
.study-card--bottom { justify-content: flex-end; }
.study-card--left   { text-align: left; }
.study-card--center { text-align: center; }
.study-card--right  { text-align: right; }

/* Overlay content on an image card (text card content placed over the media) */
.study-card__content {
	position: relative;
	padding: 0.5em;
}

/* Linked cards only. Two supported patterns:
   1) the card itself is the link:  <a class="study-card study-card--link" href="…">
   2) a link inside the card:       <a class="study-card__link" href="…">Title</a>  (covers the whole card)
   Non-linked cards get no cursor, no hover state and no anchor. */
a.study-card--link,
.study-card__link {
	cursor: pointer;
}
.study-card__link {
	color: inherit;
	text-decoration: none;
}
.study-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}
a.study-card--link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}
.study-card__link:focus-visible {
	outline: none;
}
.study-card__link:focus-visible::after {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}
