/*
 * Ryad Al Maârifa — « Le Parcours » and the four cycle pages.
 *
 * The rules of the approved mockups (12 October 2026) for /pedagogie/ and
 * /cycles/{maternelle,primaire,college,lycee}/, whose markup is written by
 * `includes/pages/{pedagogie,maternelle,primaire,college,lycee}.php` with the
 * mockups' own class names. Loaded after `theme.css`.
 *
 * Every rule is scoped under `.cy-page`, the wrapper of those five bodies:
 * the mockups reuse names the theme already gives other meanings to
 * (`.phead` is the theme's page-title band), and a shared mockup sheet may
 * arrive alongside — this file then still wins on these five pages only.
 *
 * Colours are the theme's tokens, so the clair/sombre switch keeps working;
 * the four cycle colours are the mockups' own.
 */

/* ------------------------------------------------------------------
 * The page shell: `templates/page-parcours.html` (chosen by
 * `ryad_al_maarifa_parcours_template()`), no title band, no reading
 * column — these pages carry their own h1 and full-width bands.
 * ------------------------------------------------------------------ */

.main-parcours,
.main-parcours > .entry-content,
.main-parcours .cy-page {
	max-width: none;
	margin: 0;
	padding: 0;
}

.cy-page {
	--cy-paper: var(--wp--preset--color--stone);
	--cy-ivory: var(--wp--preset--color--stone-2);
	--cy-line: var(--wp--preset--color--line);
	--cy-ink: var(--wp--preset--color--ink);
	--cy-ink2: var(--wp--preset--color--ink-2);
	--cy-navy: var(--wp--preset--color--band);
	--cy-navy2: var(--wp--preset--color--band-2);
	--cy-bordeaux: var(--wp--preset--color--bordeaux);
	--cy-onnavy: var(--wp--preset--color--on-navy);
	--cy-onnavy2: var(--wp--preset--color--on-navy-2);
	--mat: #d99a3e;
	--pri: #5e9e88;
	--col: #4f86b6;
	--lyc: var(--cy-bordeaux);
	--bac: #e9b96e;
	/* Encres des cycles (Variante 1, décision du 20 octobre 2026) : la teinte
	   du cycle quand elle peint du TEXTE sur fond clair (pierre, carte), en
	   clair seulement. Aplats, pastilles, bandes et dégradés gardent --mat… ;
	   le sombre et les bandes nuit gardent l'originale (alias plus bas). */
	--mat-ink: #9a5f0e;
	--pri-ink: #2f6b57;
	--col-ink: #2d5f8a;
	--lyc-ink: var(--lyc);
	--bac-ink: #8a6118;
	--cy-serif: var(--wp--preset--font-family--newsreader);
	--cy-arabic: var(--wp--preset--font-family--ibm-plex-sans-arabic);
	--c: var(--cy-bordeaux);

	color: var(--cy-ink);
	font-size: 17.5px;
	line-height: 1.6;
}

/* Encres des cycles en sombre : l'originale (fond nuit). */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .cy-page {
		--mat-ink: var(--mat);
		--pri-ink: var(--pri);
		--col-ink: var(--col);
		--lyc-ink: var(--lyc);
		--bac-ink: var(--bac);
	}
}

:root[data-theme="dark"] .cy-page {
	--mat-ink: var(--mat);
	--pri-ink: var(--pri);
	--col-ink: var(--col);
	--lyc-ink: var(--lyc);
	--bac-ink: var(--bac);
}

.cy-page.cy-mat { --c: var(--mat); --ci: var(--mat-ink); }
.cy-page.cy-pri { --c: var(--pri); --ci: var(--pri-ink); }
.cy-page.cy-col { --c: var(--col); --ci: var(--col-ink); }
.cy-page.cy-lyc { --c: var(--lyc); --ci: var(--lyc-ink); }

.cy-page .c-mat { --c: var(--mat); --ci: var(--mat-ink); }
.cy-page .c-pri { --c: var(--pri); --ci: var(--pri-ink); }
.cy-page .c-col { --c: var(--col); --ci: var(--col-ink); }
.cy-page .c-lyc { --c: var(--lyc); --ci: var(--lyc-ink); }
.cy-page .c-bac { --c: var(--bac); --ci: var(--bac-ink); }
.cy-page .c-after { --c: var(--cy-onnavy2); --ci: initial; }
.cy-page .chaps .c-after { --c: var(--cy-line); --ci: initial; }

/* The group's own flow spacing is replaced by the mockup's rhythm. */
.cy-page.cy-page > * {
	margin-block: 0;
}

.cy-page *,
.cy-page *::before,
.cy-page *::after {
	box-sizing: border-box;
}

.cy-page h1,
.cy-page h2,
.cy-page h3 {
	margin: 0;
	font-family: var(--cy-serif);
	font-weight: 500;
	line-height: 1.08;
	text-wrap: balance;
	color: inherit;
}

/* The Arabic names sit under their French titles, aligned with them. */
.cy-page .ar {
	font-family: var(--cy-arabic);
	font-weight: 500;
	line-height: 1.6;
	text-align: left;
}

.cy-page a {
	color: inherit;
}

.cy-page img {
	display: block;
	max-width: 100%;
}

.cy-page .content,
.cy-page .wide {
	max-width: var(--wp--style--global--content-size, 1240px);
	margin-inline: auto;
	padding-inline: var(--ram-gutter, 32px);
}

.cy-page .slot {
	margin-block-start: 8px;
	font-size: 12.5px;
	color: var(--cy-ink2);
}

/* ------------------------------------------------------------------
 * The rail — the path from 3 years old to « Après Ryad Al Maârifa ».
 * ------------------------------------------------------------------ */

.cy-page .rail {
	padding-block: 18px;
	background: var(--cy-navy);
	color: var(--cy-onnavy2);
}

.cy-page .rail .wide {
	position: relative;
	display: flex;
	align-items: center;
	font-size: 14px;
	font-weight: 600;
}

.cy-page .rail .wide::before {
	content: "";
	position: absolute;
	inset-inline: var(--ram-gutter, 32px);
	inset-block-start: 50%;
	z-index: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--mat) 0 16.6%, var(--pri) 16.6% 33.3%, var(--col) 33.3% 50%, var(--lyc) 50% 66.6%, var(--bac) 66.6% 83.3%, var(--cy-onnavy2) 83.3% 100%);
}

.cy-page .rail a {
	position: relative;
	z-index: 1;
	flex: 1;
	padding-block: 10px;
	padding-inline: 18px 0;
	color: var(--cy-onnavy2);
	text-decoration: none;
}

.cy-page .rail a::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 50%;
	width: 10px;
	height: 10px;
	border: 2px solid var(--c);
	border-radius: 50%;
	background: var(--cy-navy);
	transform: translateY(-50%);
}

/* The label sits on the navy, so the path runs between the labels and never
   through the letters (14 October 2026). */
.cy-page .rail a span {
	position: relative;
	padding-inline-end: 10px;
	background: var(--cy-navy);
}

.cy-page .rail a.on,
.cy-page .rail a:hover {
	color: #fff;
}

.cy-page .rail a.on::before {
	background: var(--c);
}

/* ------------------------------------------------------------------
 * Page heads — `.phead` on a cycle, `.phead2` on « Le Parcours ».
 * ------------------------------------------------------------------ */

.cy-page .phead,
.cy-page .phead2 {
	max-width: 1560px;
	padding-block: 64px 40px;
	background: none;
}


.cy-page .phead2 .grid {
	display: grid;
	grid-template-columns: 7fr 5fr;
	gap: 48px;
	align-items: end;
}

.cy-page .phead h1 {
	font-size: clamp(40px, 5.2vw, 72px);
	color: var(--cy-ink);
}

.cy-page .phead2 h1 {
	font-size: clamp(38px, 5vw, 68px);
	color: var(--cy-ink);
}

.cy-page .phead .ar,
.cy-page .phead2 .ar {
	margin-block-start: 8px;
	font-size: 26px;
	color: var(--cy-ink2);
}

.cy-page .lede {
	max-width: 44ch;
	margin: 20px 0 0;
	font-size: 21px;
	line-height: 1.5;
	color: var(--cy-ink);
}

.cy-page .phead2 .lede {
	max-width: 46ch;
}

.cy-page .lede-2 {
	max-width: 52ch;
	margin: 18px 0 0;
}

.cy-page .facts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin-block-start: 28px;
	padding-block-start: 18px;
	border-block-start: 1px solid var(--cy-line);
}

.cy-page .facts b {
	display: block;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ci, var(--c)); /* bande claire de tête : l'encre du cycle */
}

.cy-page .facts span {
	font-size: 14.5px;
	color: var(--cy-ink2);
}

.cy-page .media,
.cy-page .media43 {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 2px;
	background: var(--cy-ivory);
}

.cy-page .media img,
.cy-page .media43 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------------------------------------------------------------------
 * Body sections — a 4/8 grid: the title on the left, the text right.
 * ------------------------------------------------------------------ */



.cy-page .sec h2 {
	font-size: clamp(28px, 3vw, 38px);
	color: var(--cy-ink);
}

.cy-page .sec .ar-h {
	margin-block-start: 6px;
	font-size: 20px;
	color: var(--cy-ink2);
}




.cy-page .sec .side {
	max-width: 34ch;
	margin-block-start: 18px;
	padding-inline-start: 14px;
	border-inline-start: 2px solid var(--c);
	font-size: 15px;
	color: var(--cy-ink2);
}

.cy-page .sec a.more {
	font-weight: 600;
	color: var(--cy-bordeaux);
}

.cy-page .list6 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px 28px;
	margin: 8px 0 18px;
	padding: 0;
	list-style: none;
}

.cy-page .sec .list6 {
	max-width: none;
	margin: 8px 0 18px;
	padding: 0;
}

.cy-page .list6 li {
	margin: 0;
	padding-block-start: 10px;
	border-block-start: 1px solid var(--cy-line);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.cy-page .series {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
	margin-block-start: 8px;
}

.cy-page .series > div {
	padding-block-start: 12px;
	border-block-start: 2px solid var(--c);
}

.cy-page .series b {
	display: block;
	margin-block-end: 6px;
	font-family: var(--cy-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
}

.cy-page .series span {
	font-size: 15.5px;
	color: var(--cy-ink2);
}

/* ------------------------------------------------------------------
 * The voice — a navy band, the vertical video slot and its words.
 * ------------------------------------------------------------------ */

.cy-page.cy-page > .voice {
	margin-block-start: 72px;
}

.cy-page .voice {
	padding-block: 64px;
	background: var(--cy-navy2);
	color: var(--cy-onnavy);
}


.cy-page .voice .v {
	position: relative;
	max-width: 380px;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 2px;
	background: var(--cy-navy);
}


.cy-page .voice .play {
	position: absolute;
	inset-block-start: 18px;
	inset-inline-start: 18px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
}

.cy-page .voice .play::before {
	content: "";
	margin-inline-start: 3px;
	border-block: 8px solid transparent;
	border-inline-start: 13px solid #132a4f;
}

.cy-page .voice .slot {
	color: var(--cy-onnavy2);
}

.cy-page .voice h2 {
	font-size: clamp(26px, 3vw, 38px);
	color: #fff;
}

.cy-page .voice p {
	max-width: 48ch;
	color: var(--cy-onnavy2);
}

.cy-page .voice small {
	display: block;
	margin-block-end: 8px;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--cy-onnavy2);
}

/* Pupils' voices: a row of films under the cycle's voice, on the same band. */
.cy-page .voice-pupils {
	padding-block: 0 64px;
	background: var(--cy-navy2);
	color: var(--cy-onnavy);
}

/* With no cycle voice above it (the école primaire since 15 October 2026), the
   pupils' band opens like the voice band. */
.cy-page.cy-page > .sec + .voice-pupils {
	margin-block-start: 72px;
	padding-block-start: 64px;
}

.cy-page .voice-pupils small {
	display: block;
	margin-block-end: 14px;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--cy-onnavy2);
}

.cy-page .vp-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.cy-page .vp {
	margin: 0;
	width: min(260px, 100%);
}

.cy-page .vp .v {
	position: relative;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 2px;
	background: var(--cy-navy);
}

.cy-page .vp video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cy-page .vp figcaption {
	margin-block-start: 10px;
	font-size: 15px;
	color: #fff;
}

.cy-page .vp .slot {
	display: block;
	margin-block-start: 4px;
	color: var(--cy-onnavy2);
}

/* ------------------------------------------------------------------
 * The foot — the other cycles, admissions, and the practical strip.
 * ------------------------------------------------------------------ */



.cy-page .next .card {
	padding-block-start: 16px;
	border-block-start: 2px solid var(--cy-line);
}

.cy-page .next .card b {
	display: block;
	margin-block-end: 6px;
	font-family: var(--cy-serif);
	font-size: 24px;
	font-weight: 500;
}

.cy-page .next .card p {
	max-width: 46ch;
	margin: 0 0 10px;
	color: var(--cy-ink2);
}

.cy-page .next a {
	font-weight: 600;
	color: var(--cy-bordeaux);
}

.cy-page.cy-page > .prat {
	margin-block-start: 64px;
}

.cy-page .prat {
	padding-block: 40px;
	background: var(--cy-ivory);
}



.cy-page .prat span {
	font-size: 15px;
	color: var(--cy-ink2);
}

/* ------------------------------------------------------------------
 * « Le Parcours » — the six chapters, the four values, the four cycles.
 * ------------------------------------------------------------------ */

.cy-page .chapters-sec {
	padding-block-start: 56px;
}

.cy-page .chaps-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: end;
	gap: 24px;
}

.cy-page .chaps-head h2 {
	max-width: 24ch;
	font-size: clamp(28px, 3.2vw, 42px);
}

.cy-page .chaps-head p {
	max-width: 40ch;
	margin: 0;
	color: var(--cy-ink2);
}

.cy-page .chaps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	margin-block-start: 16px;
}

.cy-page .chaps::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 34px;
	height: 2px;
	background: linear-gradient(90deg, var(--mat) 0 16.6%, var(--pri) 16.6% 33.3%, var(--col) 33.3% 50%, var(--lyc) 50% 66.6%, var(--bac) 66.6% 83.3%, var(--cy-line) 83.3% 100%);
}

.cy-page .chaps .ch {
	position: relative;
	padding-inline-end: 18px;
}

.cy-page .chaps .ch::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 28px;
	width: 14px;
	height: 14px;
	border: 3px solid var(--c);
	border-radius: 50%;
	background: var(--cy-paper);
}

.cy-page .chaps .age {
	display: block;
	margin-block-end: 26px;
	font-family: var(--wp--preset--font-family--manrope);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -0.01em;
	color: var(--ci, var(--c)); /* `.chaps` est sur fond clair */
}

.cy-page .chaps .c-after .age {
	color: var(--cy-ink2);
}

.cy-page .chaps h3 {
	margin: 6px 0 8px;
	font-size: 22px;
}

.cy-page .chaps p {
	margin: 0 0 10px;
	font-size: 15px;
	color: var(--cy-ink2);
}

.cy-page .chaps a {
	font-size: 14px;
	font-weight: 600;
	color: var(--cy-bordeaux);
}

.cy-page .vals {
	padding-block-start: 80px;
}

.cy-page .vals .intro {
	max-width: 64ch;
	margin-block-end: 24px;
}

.cy-page .vals .intro h2 {
	margin-block-end: 12px;
	font-size: clamp(30px, 3.4vw, 46px);
}

.cy-page .vals .intro p {
	margin: 0;
	color: var(--cy-ink2);
}

.cy-page .pr {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: center;
	padding-block: 56px;
	border-block-start: 1px solid var(--cy-line);
}

.cy-page .pr.flip > :last-child {
	order: -1;
}

.cy-page .pr h3 {
	margin: 0 0 6px;
	font-size: clamp(32px, 3.6vw, 52px);
}

.cy-page .pr .ar {
	font-size: 25px;
	color: var(--cy-ink2);
}

.cy-page .pr p {
	max-width: 54ch;
	margin: 18px 0 0;
}

.cy-page .pr .ev {
	display: grid;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.cy-page .pr .ev li {
	margin: 0;
	padding-inline-start: 16px;
	border-inline-start: 2px solid var(--cy-line);
}

.cy-page .cycles4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

.cy-page .cycles4 a {
	display: block;
	padding-block-start: 12px;
	border-block-start: 3px solid var(--c);
	text-decoration: none;
}

.cy-page .cycles4 b {
	display: block;
	font-family: var(--cy-serif);
	font-size: 23px;
	font-weight: 500;
}

.cy-page .cycles4 span {
	font-size: 15px;
	color: var(--cy-ink2);
}

/* ------------------------------------------------------------------
 * Narrow screens.
 * ------------------------------------------------------------------ */

@media (max-width: 900px) {
	.cy-page .rail .wide {
		flex-wrap: wrap;
	}

	.cy-page .rail a {
		flex: 1 1 33%;
	}

	.cy-page .rail .wide::before {
		display: none;
	}

	.cy-page .phead .grid,
	.cy-page .phead2 .grid,
	.cy-page .voice .grid,
	.cy-page .pr {
		grid-template-columns: 1fr;
	}


	.cy-page .pr {
		gap: 24px;
	}

	.cy-page .pr.flip > :last-child {
		order: 0;
	}

	.cy-page .chaps {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.cy-page .chaps::before {
		inset-block: 0;
		inset-inline-start: 6px;
		inset-inline-end: auto;
		width: 2px;
		height: auto;
		background: linear-gradient(180deg, var(--mat) 0 16.6%, var(--pri) 16.6% 33.3%, var(--col) 33.3% 50%, var(--lyc) 50% 66.6%, var(--bac) 66.6% 83.3%, var(--cy-line) 83.3% 100%);
	}

	.cy-page .chaps .ch {
		padding-inline-start: 30px;
	}

	.cy-page .chaps .ch::before {
		inset-block-start: 6px;
	}

	.cy-page .chaps .age {
		margin-block-end: 6px;
	}

	.cy-page .series {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	.cy-page .list6,
	.cy-page .series {
		grid-template-columns: 1fr;
	}

	.cy-page .cycles4 {
		grid-template-columns: 1fr 1fr;
	}

	.cy-page .facts {
		gap: 12px;
	}

	.cy-page .facts b {
		font-size: 26px;
	}
}
