/* ================================================================
   HOME — overrides layout GP
   ================================================================ */

/* Évite le scroll horizontal dû à width:100vw incluant la largeur de la scrollbar */
.ra-home {
	overflow-x: hidden;
}

/* Annule le padding que GP ajoute via grid-container sur #page et one-container sur .site-content */
.ra-home #page.grid-container {
	padding-left: 0;
	padding-right: 0;
}

.ra-home .site-content {
	display: block;
	padding: 0;
}

/* ================================================================
   HOME — hero bannière
   ================================================================ */

.ra-hero {
	position: relative;
	min-height: calc(100vh - var(--ra-header-h));
	display: flex;
	align-items: center;
	overflow: hidden;
	background-color: var(--ra-ardoise); /* fallback si photo absente */
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.ra-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	z-index: 0;
}

/* Dégradé sombre gauche → transparent droite pour lisibilité du texte */
.ra-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(26, 26, 26, 0.88) 0%,
		rgba(26, 26, 26, 0.72) 35%,
		rgba(26, 26, 26, 0.25) 65%,
		transparent 100%
	);
	z-index: 1;
}

.ra-hero__content {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 2rem;
	gap: 2rem;
}

.ra-hero__text {
	flex: 0 1 55%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.ra-hero__titre {
	font-family: var(--ra-font-titres);
	color: var(--ra-blanc);
	font-size: clamp(1.75rem, 3.5vw, 3rem);
	line-height: 1.1;
	margin: 0;
}

.ra-hero__sous-titre {
	color: var(--ra-blanc-85);
	font-size: 1.1rem;
	margin: 0;
}

.ra-hero__description {
	color: var(--ra-blanc-75);
	font-size: 0.9375rem;
	line-height: 1.6;
	margin-top: -0.5rem;
}


.ra-hero__ecusson {
	position: absolute;
	right: 4vw;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
}

.ra-hero__ecusson img {
	max-height: clamp(180px, 22vw, 300px);
	width: auto;
	filter:
		drop-shadow(0 0 18px rgba(255, 255, 255, 0.35))
		drop-shadow(0 4px 28px rgba(0, 0, 0, 0.65));
}

/* ================================================================
   HOME — bandeau statistiques (motif filet)
   ================================================================ */

.ra-stats {
	position: relative;
	background-color: var(--ra-ardoise);
	overflow: hidden;
	margin-top: 0;
	margin-bottom: 0;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* Bande blanche 6 px en haut — touche la section au-dessus */
.ra-stats::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: var(--ra-blanc);
	z-index: 2;
	pointer-events: none;
}

/* Maille carrés — SVG en data URI, commence sous la bande blanche */
.ra-stats::after {
	content: '';
	position: absolute;
	top: 6px;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Crect x='0.5' y='0.5' width='9' height='9' fill='none' stroke='%23B8B6AE' stroke-width='0.9'/%3E%3C/svg%3E");
	background-repeat: repeat;
	background-position: 0 0;
	opacity: 0.45;
	z-index: 1;
	pointer-events: none;
}

/* Poteaux noirs aux deux extrémités */
.ra-stats__post {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 18px;
	background: var(--ra-noir);
	border-radius: 0;
	z-index: 3;
}

.ra-stats__post--left  { left: 0; }
.ra-stats__post--right { right: 0; }

.ra-stats__inner {
	position: relative;
	z-index: 4;
	display: flex;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: calc(1.25rem + 6px) 2rem 1.25rem;
}

.ra-stat {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	text-align: center;
}

.ra-stat__number {
	font-family: var(--ra-font-chiffres);
	font-size: clamp(2.25rem, 4vw, 3.25rem);
	font-weight: 700;
	color: var(--ra-jaune);
	line-height: 1;
}

.ra-stat__label {
	font-family: var(--ra-font-titres);
	font-size: 0.8rem;
	color: var(--ra-blanc);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ================================================================
   HOME — sections génériques (prochains événements, actualités,
   partenaires)
   ================================================================ */

.ra-section {
	padding: 3.5rem 0;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.ra-section--partenaires-logos {
	background-color: var(--ra-ardoise);
}

.ra-section--partenaires-logos .ra-section__titre {
	color: var(--ra-blanc);
}

.ra-section--partenaires-logos .ra-empty {
	color: var(--ra-blanc);
}

.ra-section__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
}

.ra-section__titre {
	font-family: var(--ra-font-titres);
	color: var(--ra-noir);
	margin: 0 0 2rem 0;
}

/* ================================================================
   HOME — widget prochains événements
   ================================================================ */

.ra-section--evenements {
	padding-bottom: 0;
}

.cal-widget__list {
	display: flex;
	flex-direction: column;
}

/* ── Ligne (une par type d'événement) ────────────────────────── */

.cal-widget__row {
	display: flex;
	border: 1px solid var(--ra-border);
	min-height: 130px;
	background: var(--ra-blanc);
}

/* ── Bloc date (gauche) ──────────────────────────────────────── */

.cal-widget__datebox {
	width: 150px;
	min-width: 150px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--ra-border);
}

.cal-widget__type-strip {
	padding: 0.4rem 0.5rem;
	font-family: var(--ra-font-titres);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	text-align: center;
	line-height: 1.2;
	color: var(--ra-blanc);
}

a.cal-widget__row {
	text-decoration: none;
	color: inherit;
}

a.cal-widget__row:hover .cal-widget__title {
	color: var(--ra-rouge);
}

.cal-widget__row--competition .cal-widget__type-strip { background: var(--ra-rouge); }
.cal-widget__row--evenement   .cal-widget__type-strip { background: var(--ra-jaune); color: var(--ra-noir); }

.cal-widget__date-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 0.5rem;
	gap: 0.1rem;
	background: var(--ra-ardoise);
}

.cal-widget__weekday {
	font-family: var(--ra-font-titres);
	font-size: 0.625rem;
	letter-spacing: 0.06em;
	color: var(--ra-blanc-85);
	text-transform: uppercase;
}

.cal-widget__day {
	font-family: var(--ra-font-chiffres);
	font-size: clamp(2.5rem, 4vw, 3.25rem);
	font-weight: 700;
	line-height: 1;
	color: var(--ra-blanc);
}

.cal-widget__month {
	font-family: var(--ra-font-titres);
	font-size: 0.7rem;
	letter-spacing: 0.07em;
	color: var(--ra-blanc-85);
	text-transform: uppercase;
}

/* ── Zone contenu (droite) ───────────────────────────────────── */

.cal-widget__content {
	flex: 1;
	padding: 1.25rem 1.75rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.4rem;
}

.cal-widget__title {
	font-family: var(--ra-font-titres);
	font-size: clamp(1.125rem, 1.75vw, 1.375rem);
	color: var(--ra-noir);
	margin: 0;
	transition: color 0.15s;
	line-height: 1.25;
}

.cal-widget__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1rem;
	margin: 0;
}

.cal-widget__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	color: var(--ra-gris-pierre);
}

.cal-widget__meta-item .fas {
	color: var(--ra-rouge);
}

.cal-widget__meta-item span {
	padding-top: 2px;
}

.cal-widget__desc {
	font-size: 0.875rem;
	color: var(--ra-noir);
	line-height: 1.55;
	margin: 0;
}

/* ================================================================
   HOME — état vide (filigrane raquette)
   ================================================================ */

.ra-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	color: var(--ra-gris-pierre);
}

.ra-empty__icon {
	font-size: 4rem;
	opacity: 0.15;
}

.ra-empty__text {
	margin-top: 0.75rem;
	font-size: 0.9rem;
}

/* ================================================================
   HOME — tuiles partenaires
   ================================================================ */

.ra-partenaires-logos__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 5rem;
}

.ra-partenaire-logo__tile {
	background: var(--ra-blanc);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid var(--ra-border);
}

.ra-partenaire-logo__img {
	width: 100%;
	height: auto;
	object-fit: contain;
	display: block;
	transition: transform 0.3s ease;
}

.ra-partenaire-logo__tile:hover .ra-partenaire-logo__img,
.ra-partenaire-logo__tile:focus .ra-partenaire-logo__img {
	transform: scale(1.05);
}

.ra-partenaire-logo__placeholder {
	font-family: var(--ra-font-titres);
	font-size: 1.25rem;
	color: var(--ra-ardoise);
	text-align: center;
}

/* ================================================================
   HOME — responsive
   ================================================================ */

@media (max-width: 768px) {
	.ra-hero {
		min-height: 480px;
	}

	.ra-hero__content {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
		padding: 2rem 1.25rem;
	}

	.ra-hero__text {
		flex: none;
	}

	.ra-hero__ecusson {
		display: none; /* masqué sur mobile, la photo suffit */
	}

	.ra-hero__overlay {
		background: linear-gradient(
			to bottom,
			rgba(26, 26, 26, 0.75) 0%,
			rgba(26, 26, 26, 0.5) 100%
		);
	}

	.ra-stats__inner {
		gap: 1.5rem;
		padding: 1.75rem 2rem;
	}

	.ra-section {
		padding: 2.5rem 0;
	}

	.ra-section__inner {
		padding: 0 1.25rem;
	}

	.ra-partenaires-logos__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}

	.cal-widget__datebox {
		width: 120px;
		min-width: 120px;
	}
}

@media (max-width: 680px) {
	.cal-widget__row {
		flex-direction: column;
		min-height: 0;
	}

	.cal-widget__datebox {
		width: auto;
		min-width: 0;
		flex-direction: row;
		border-right: none;
		border-bottom: 1px solid var(--ra-border);
	}

	.cal-widget__type-strip {
		writing-mode: vertical-lr;
		padding: 0.75rem 0.4rem;
	}

	.cal-widget__date-body {
		flex-direction: column;
	}

	.cal-widget__content {
		padding: 1rem 1.25rem;
	}
}

@media (max-width: 480px) {
	.ra-stat__number {
		font-size: clamp(1.5rem, 7vw, 2.25rem);
	}
}
