/* ==========================================================================
   Page d'accueil (v1.9.0) — sections en blocs WordPress standard (modifiables
   dans l'éditeur), mises en forme ici par leurs classes CSS :
   .cesma-hero, .cesma-section (.cesma-activites, .cesma-infos, .cesma-social),
   .cesma-news (bloc « Boucle de requête ») ; cartes et boutons : css/components.css.
   Couleurs de liens en !important : style.css impose `a { color … !important }`.
   ========================================================================== */

/* Accueil : plus de grande boîte blanche, colonne élargie, sections en cartes. */
body.home #primary.content-area {
	float: none;
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}
body.home article.hentry {
	background: transparent !important; /* le parent impose un fond blanc à la boîte */
	box-shadow: none !important;
	padding: 0 !important;
}
body.home article.hentry .post-edit { display: inline-block; margin-top: 12px; }

/* --- Bienvenue --- */
.cesma-hero {
	position: relative;
	overflow: hidden;
	margin: 0 0 28px;
	padding: 48px 260px 44px 48px;
	border-radius: 18px;
	background:
		url(../images/pingouins/cesma.png) no-repeat right 56px bottom 0 / auto 64%,
		linear-gradient(135deg, #0B3556 0%, #10659C 100%);
	color: #FFFFFF;
	box-shadow: 0 12px 30px rgba(11, 53, 86, .28);
}
.cesma-hero > * { max-width: 760px; }
.cesma-hero .cesma-hero__title {
	margin: 0 0 14px !important;
	font-family: 'Poppins', Arial, sans-serif !important;
	font-weight: 700 !important;
	font-size: clamp(28px, 3.4vw, 44px) !important;
	line-height: 1.12 !important;
	color: #FFFFFF !important;
}
.cesma-hero .cesma-hero__lead {
	margin: 0 0 24px;
	font-size: 18px;
	line-height: 1.55;
	color: #D6EAF5;
}
.cesma-hero .cesma-hero__buttons { gap: 12px; }
.cesma-hero .cesma-hero__note {
	margin: 16px 0 0;
	font-size: 14px;
	color: #D6EAF5;
}
.cesma-hero .cesma-hero__note::before { content: '🐧 '; }

/* --- Sections (cartes blanches) --- */
.cesma-section {
	margin: 0 0 28px;
	padding: 34px 36px 30px;
	border-radius: 18px;
	background: #FFFFFF;
	box-shadow: 0 8px 24px rgba(11, 53, 86, .14);
}
.cesma-section .cesma-section__title {
	position: relative;
	margin: 0 0 26px !important;
	padding-bottom: 12px;
	font-family: 'Poppins', Arial, sans-serif !important;
	font-weight: 700 !important;
	font-size: clamp(24px, 2.4vw, 30px) !important;
	color: #0B3556 !important;
}
.cesma-section .cesma-section__title::after {
	content: '';
	position: absolute;
	left: 0; bottom: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--cesma-yellow, #FFB400);
}

/* --- Infos à la Une : bloc « Boucle de requête » --- */
.cesma-news .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}
.cesma-news .wp-block-post-template > li {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	padding: 0 0 18px !important; /* le parent pose 30px de marge intérieure aux <li> */
	border-radius: 16px;
	overflow: hidden;
	background: #FFFFFF;
	border: 1px solid #D6EAF5;
	transition: transform .2s ease, box-shadow .2s ease;
}
.cesma-news .wp-block-post-template > li:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(11, 53, 86, .16); }
.cesma-news .wp-block-post-featured-image { margin: 0 0 14px; }
.cesma-news .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	box-shadow: none !important;
}
.cesma-news .wp-block-post-date,
.cesma-news .wp-block-post-title,
.cesma-news .wp-block-post-excerpt { margin-left: 18px !important; margin-right: 18px !important; }
.cesma-news .wp-block-post-date {
	font-size: 13px;
	font-weight: 600;
	color: #17808B;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.cesma-news .wp-block-post-title {
	margin-top: 6px !important;
	margin-bottom: 8px !important;
	font-family: 'Poppins', Arial, sans-serif !important;
	font-size: 19px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}
.cesma-news .wp-block-post-title a { color: #0B3556 !important; text-decoration: none !important; }
.cesma-news .wp-block-post-title a:hover { color: #10659C !important; text-decoration: underline !important; }
.cesma-news .wp-block-post-excerpt { flex: 1 1 auto; display: flex; flex-direction: column; }
.cesma-news .wp-block-post-excerpt__excerpt { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; color: #1F2D33; }
.cesma-news .wp-block-post-excerpt__more-text { margin: auto 0 0; }
.cesma-news .wp-block-post-excerpt__more-link {
	font-family: 'Poppins', Arial, sans-serif;
	font-weight: 600;
	font-size: 14.5px;
	color: #17808B !important;
	text-decoration: none !important;
}
.cesma-news .wp-block-post-excerpt__more-link::after { content: ' →'; }
.cesma-infos .cesma-infos__all { margin: 22px 0 0; text-align: right; }
.cesma-infos .cesma-infos__all a {
	font-family: 'Poppins', Arial, sans-serif;
	font-weight: 600;
	color: #10659C !important;
	text-decoration: none !important;
}
.cesma-infos .cesma-infos__all a:hover { text-decoration: underline !important; }

/* --- Suivez le CESMA --- */
.cesma-social .cesma-social__links { margin: 0 0 20px; font-size: 16px; }
.cesma-social .cesma-social__links a { font-weight: 600; }

/* ==========================================================================
   Tablette / smartphone
   ========================================================================== */
@media screen and (max-width: 1024px) {
	.cesma-news .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cesma-hero { padding-right: 200px; }
}
@media screen and (max-width: 768px) {
	.cesma-hero {
		padding: 30px 22px 150px;
		background-position: right 16px bottom 0, 0 0;
		background-size: auto 130px, auto;
	}
	.cesma-hero .cesma-hero__lead { font-size: 16px; }
	.cesma-section { padding: 24px 18px 20px; border-radius: 14px; }
	/* Infos à la Une : cartes empilées, on défile verticalement */
	.cesma-news .wp-block-post-template { grid-template-columns: 1fr; gap: 16px; }
	.cesma-infos .cesma-infos__all { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.cesma-card, .cesma-news .wp-block-post-template > li { transition: none; }
	.cesma-card:hover, .cesma-news .wp-block-post-template > li:hover { transform: none; }
}
