/*
 * Ryad Al Maârifa — la feuille commune des maquettes.
 *
 * Source : la feuille unique que partagent toutes les maquettes approuvées
 * (`design/mockups/build_cycles.py` CSS, `build_rest.py` EXTRA / PATH_CSS /
 * AR_CSS, `mock/template.html`), telle que publiée dans les artefacts
 * (L'école, L'école primaire, Vie de l'école, Admissions — relus le
 * 12 octobre 2026). Chargée après `theme.css`, avant les feuilles de page
 * (`home.css`, `resultats.css`, `actualites.css`, `cycles.css`).
 *
 * Ce qui est ici : les jetons des maquettes, le rythme des sections, les
 * conteneurs, les surfaces et les composants communs à plusieurs pages
 * (`.rail`, `.phead`, `.facts`, `.sec`, `.voice`, `.next`, `.prat`, `.seg`,
 * `.chapters`, `.chaps`, `.pr`, `.env`, `.path`, `.elist`, `.form`,
 * `table.t`, `.dl`, `.plain`, `.laur`, `.cycles4`, emplacements média…).
 * Ce qui n'y est pas : les dispositifs propres à une page (accueil :
 * `.hero`, `.big`, `.parcours`, `.vgrid`, `.promo`, `.mag` ; résultats :
 * `.line`, `.rows`, `.wall`, `.pbig` ; actualités : `.mag`, `.arch`,
 * `.artband`, `.strip`, `.prose`, `.aussi` ; L'école : `.ecole-head`,
 * `.hist`, `.photos`, `.voices`). L'en-tête, la navigation et le pied de
 * page restent ceux de `theme.css`.
 *
 * Règles du jeu avec les feuilles de page : sélecteurs de la maquette, à
 * leur spécificité d'origine (une classe, ou une classe et un élément),
 * jamais `!important`. Une feuille de page chargée après celle-ci gagne
 * donc à spécificité égale. Les noms qui existent aussi dans l'ancien
 * thème (`.lede`, `.phead`, `.wide`, `.dl`…) et les remises à zéro des
 * éléments sont limités aux pages dessinées par `:where(.ram-maquette *)`,
 * qui n'ajoute aucune spécificité. La classe `ram-maquette` est posée sur
 * `<body>` par `functions.php` (gabarit « page-parcours » et accueil).
 *
 * Couleurs : les jetons de la maquette sont des alias des jetons du thème,
 * si bien que le mode sombre (préférence système et bouton Clair/Sombre)
 * suit sans bloc supplémentaire. `--navy` / `--navy2` sont des surfaces
 * (bandes) et restent bleu nuit en sombre, comme dans la maquette.
 * Propriétés logiques partout où la maquette écrivait left/right, pour que
 * les pages arabes se retournent seules ; les dégradés orientés ont leur
 * variante `[dir="rtl"]` en fin de feuille.
 */

/* ------------------------------------------------------------------
 * Jetons
 * ------------------------------------------------------------------ */

:root {
	--paper: var(--wp--preset--color--stone);
	--ivory: var(--wp--preset--color--stone-2);
	--line: var(--wp--preset--color--line);
	--ink: var(--wp--preset--color--ink);
	--ink2: var(--wp--preset--color--ink-2);
	--navy: var(--wp--preset--color--band);
	--navy2: var(--wp--preset--color--band-2);
	--bordeaux: var(--wp--preset--color--bordeaux);
	--onnavy: var(--wp--preset--color--on-navy);
	--onnavy2: var(--wp--preset--color--on-navy-2);
	--white: var(--wp--preset--color--card);
	/* Les quatre cycles, puis le bac : les couleurs du parcours. */
	--mat: #d99a3e;
	--pri: #5e9e88;
	--col: #4f86b6;
	--lyc: var(--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;
	/* Largeur : celle de theme.json (1240), pour `.content` comme `.wide`. */
	--content: var(--wp--style--global--content-size, 1240px);
	/* Familles. */
	--serif: var(--wp--preset--font-family--newsreader);
	--sans: var(--wp--preset--font-family--manrope);
	--kufi: var(--wp--preset--font-family--ibm-plex-sans-arabic);
	/* Le dégradé du parcours : maternelle → primaire → collège → lycée → bac → après. */
	--parcours-steps: 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%;
}

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

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

/* ------------------------------------------------------------------
 * Base des pages dessinées
 * ------------------------------------------------------------------ */

:where(.ram-maquette) :where(h1, h2, h3) {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.08;
	text-wrap: balance;
	margin: 0;
}

:where(.ram-maquette main) :where(img) {
	display: block;
	max-width: 100%;
}

:where(.ram-maquette main) :where(a) {
	color: inherit;
}

:where(.ram-maquette) .ar {
	line-height: 1.6;
}

/* Le contenu de la page est une suite de sections pleine largeur : pas
   d'écart de bloc entre elles, chaque section porte son propre rythme. */
:where(.ram-maquette main .wp-block-post-content) > * {
	margin-block: 0;
}

/* Conteneurs. Une `figure.wide` de l'ancienne galerie n'en est pas un.
   Une seule mesure de page (plan de finition du 20 octobre 2026, P1 #4) :
   `.wide` comme `.content` s'arrêtent à 1240, avec la gouttière du pied de
   page (`--ram-gutter`, theme.css). */
.content:where(:not(figure)) {
	max-width: var(--content);
	margin-inline: auto;
	padding-inline: var(--ram-gutter, 32px);
}

.wide:where(:not(figure)) {
	max-width: var(--content);
	margin-inline: auto;
	padding-inline: var(--ram-gutter, 32px);
}

/* Petits éléments communs. */
.eyebrow {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--c, var(--bordeaux));
}

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

.lat {
	font-family: var(--sans);
}

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

.cta {
	display: inline-block;
	background: var(--wp--preset--color--accent-bg);
	color: #fff;
	text-decoration: none;
	padding: 11px 20px;
	border-radius: 3px;
	font-weight: 600;
	white-space: nowrap;
}

.cta:hover {
	background: var(--wp--preset--color--accent-bg-2);
	color: #fff;
}

.cta.ghost {
	background: none;
	color: var(--bordeaux);
	border: 1px solid currentColor;
}

button.cta {
	border: 0;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ------------------------------------------------------------------
 * Emplacements média
 * ------------------------------------------------------------------ */

.media43,
.media169 {
	overflow: hidden;
	border-radius: 2px;
	background: var(--ivory);
}

.media43 {
	aspect-ratio: 4 / 3;
}

.media169 {
	aspect-ratio: 16 / 9;
}

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

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

.film img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.7;
}

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

.vfilm img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.72;
}

/*
 * A filled video slot (theme `inc/media-slots.php`): the film fills its frame
 * and plays only when asked. The horizontal frame (`.film`) shows a vertical
 * film whole, centred on a near-black frame; the vertical frames crop it to their ratio.
 */
.film video,
.vfilm video,
.voice .v video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.film video {
	object-fit: contain;
	background: #0d0f13;
}

.film.has-video {
	background: #0d0f13;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	display: grid;
	place-items: center;
}

.play svg {
	width: 20px;
	height: 20px;
	fill: #132a4f;
	margin-inline-start: 3px;
}

/* ------------------------------------------------------------------
 * Le rail du parcours (haut des pages cycle)
 * ------------------------------------------------------------------ */

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

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

.rail .wide::before {
	content: "";
	position: absolute;
	inset-inline: var(--ram-gutter, 32px);
	top: 50%;
	height: 2px;
	background: linear-gradient(90deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
	z-index: 0;
}

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

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

.rail a.on {
	color: #fff;
}

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

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

	.rail a {
		flex: 1 1 33%;
	}

	.rail .wide::before {
		display: none;
	}
}

/* ------------------------------------------------------------------
 * En-têtes de page : `.phead` (cycle, avec chiffres), `.phead2` (les autres)
 * ------------------------------------------------------------------ */

/* L'ancien thème appelle aussi `.phead` le bandeau de titre de page.html :
   sur une page dessinée, ce bandeau n'existe pas et ses valeurs sont
   remplacées ici. */
.phead:where(.ram-maquette *) {
	background: none;
	padding-block: 64px 40px;
}

.phead:where(.ram-maquette *).wide {
	max-width: var(--content);
	padding-inline: var(--ram-gutter, 32px);
}

.phead .grid {
	display: grid;
	grid-template-columns: 6fr 6fr;
	gap: 48px;
	align-items: end;
}

.phead:where(.ram-maquette *) h1 {
	font-family: var(--serif);
	font-size: clamp(40px, 5.2vw, 72px);
	margin-block-start: 10px;
}

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

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

.phead .media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.facts b {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 30px;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	display: block;
	color: var(--ci, var(--c, var(--bordeaux)));
}

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

.phead2 {
	padding-block: 64px 40px;
}

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

.phead2 h1 {
	font-size: clamp(38px, 5vw, 68px);
}

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

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

@media (max-width: 900px) {
	.phead .grid,
	.phead2 .grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
 * Sections de texte : titre à gauche (4/12), texte à droite (8/12)
 * ------------------------------------------------------------------ */

.sec {
	padding-block-start: 64px;
}

.sec .grid {
	display: grid;
	grid-template-columns: 4fr 8fr;
	gap: 48px;
}

.sec h2 {
	font-size: clamp(28px, 3vw, 38px);
}

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

.sec p {
	max-width: 66ch;
	margin: 0 0 14px;
}

.sec ul {
	margin: 0 0 14px;
	padding-inline-start: 20px;
	max-width: 66ch;
}

.sec li {
	margin-block-end: 6px;
}

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

@media (max-width: 900px) {
	.sec .grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

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

.list6 li {
	border-block-start: 1px solid var(--line);
	padding-block-start: 10px;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 18px;
}

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

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

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

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

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

/* ------------------------------------------------------------------
 * Voix (bande nuit, vidéo verticale)
 * ------------------------------------------------------------------ */

.voice {
	margin-block-start: 72px;
	background: var(--navy2);
	color: var(--onnavy);
	padding-block: 64px;
}

.voice .grid {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: 48px;
	align-items: center;
}

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

.voice .v img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.6;
}

.voice .play {
	top: 18px;
	left: auto;
	inset-inline-start: 18px;
	transform: none;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.92);
}

.voice .play svg {
	width: 16px;
	height: 16px;
	margin-inline-start: 2px;
}

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

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

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

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

@media (max-width: 900px) {
	.voice .grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
 * Pied de page de contenu : liens vers les autres cycles, vie pratique
 * ------------------------------------------------------------------ */

.next {
	padding-block-start: 64px;
}

.next .grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}

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

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

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

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

.prat {
	margin-block-start: 64px;
	background: var(--ivory);
	padding-block: 40px;
}

.prat .grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.prat b {
	display: block;
	font-size: 15px;
	margin-block-end: 4px;
}

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

@media (max-width: 800px) {
	.next .grid {
		grid-template-columns: 1fr;
	}

	.prat .grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ------------------------------------------------------------------
 * Sélecteur d'étape (accueil, « Votre enfant a… »)
 * ------------------------------------------------------------------ */

.seg {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	background: var(--white);
}

.seg button,
.seg a {
	background: none;
	border: 0;
	border-inline-end: 1px solid var(--line);
	padding: 16px 18px;
	text-align: start;
	font: inherit;
	cursor: pointer;
	color: var(--ink);
	text-decoration: none;
}

.seg button:last-of-type,
.seg a:last-of-type {
	border-inline-end: 0;
}

.seg b {
	display: block;
	font-family: var(--sans);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -0.01em;
}

.seg small {
	color: var(--ink2);
	font-size: 14px;
}

.seg .on,
.seg [aria-pressed="true"] {
	background: var(--ivory);
	box-shadow: inset 0 -3px 0 var(--c, var(--bordeaux));
}

.seg button:focus-visible,
.seg a:focus-visible {
	outline: 2px solid var(--bordeaux);
	outline-offset: -2px;
}

.seg .hint {
	grid-column: 1 / -1;
	padding: 12px 18px;
	font-size: 14px;
	color: var(--ink2);
	border-block-start: 1px solid var(--line);
	background: var(--paper);
}

@media (max-width: 700px) {
	.seg {
		grid-template-columns: 1fr 1fr;
	}

	.seg button,
	.seg a {
		border-block-end: 1px solid var(--line);
	}
}

/* ------------------------------------------------------------------
 * Les six chapitres du parcours
 * `.chapters` : sur la bande nuit (accueil) ; `.chaps` : sur fond clair
 * (Le Parcours). La bande elle-même (`.parcours`) est propre à l'accueil.
 * ------------------------------------------------------------------ */

.chapters,
.chaps {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	position: relative;
}

.chaps {
	margin-block-start: 16px;
}

.chapters::before,
.chaps::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 34px;
	height: 2px;
	background: linear-gradient(90deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
}

.chaps::before {
	background: linear-gradient(90deg, var(--parcours-steps), var(--line) 83.3% 100%);
}

.chapters .ch,
.chaps .ch {
	padding-inline: 0 18px;
	position: relative;
}

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

.chaps .ch::before {
	background: var(--paper);
}

.chapters .age,
.chaps .age {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -0.01em;
	color: var(--c);
	display: block;
	margin-block-end: 26px;
}

/* `.chaps` est sur fond clair : l'encre du cycle (`.chapters`, nuit, garde --c). */
.chaps .age {
	color: var(--ci, var(--c));
}

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

.chapters h3 {
	color: #fff;
}

.chapters p,
.chaps p {
	font-size: 15px;
	margin: 0 0 10px;
}

.chapters p {
	color: var(--onnavy2);
}

.chaps p {
	color: var(--ink2);
}

.chapters a,
.chaps a {
	font-size: 14px;
	font-weight: 600;
}

.chapters a {
	color: #fff;
}

.chaps a {
	color: var(--bordeaux);
}

/* L'étape choisie dans le sélecteur. */
.chapters .ch.on {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 4px;
	padding-inline-start: 12px;
	margin-inline-start: -12px;
}

@media (max-width: 900px) {
	.chapters,
	.chaps {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.chapters::before,
	.chaps::before {
		width: 2px;
		height: auto;
		top: 0;
		bottom: 0;
		inset-inline: 6px auto;
		background: linear-gradient(180deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
	}

	.chaps::before {
		background: linear-gradient(180deg, var(--parcours-steps), var(--line) 83.3% 100%);
	}

	.chapters .ch,
	.chaps .ch {
		padding-inline-start: 30px;
	}

	.chapters .ch::before,
	.chaps .ch::before {
		inset-inline-start: 0;
		top: 6px;
	}

	.chapters .age,
	.chaps .age {
		margin-block-end: 6px;
	}
}

/* ------------------------------------------------------------------
 * Les quatre valeurs (`.pr`, une composition par valeur)
 * ------------------------------------------------------------------ */

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

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

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

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

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

.pr.flip .media {
	order: -1;
}

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

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

.pr .en {
	font-size: 15px;
	color: var(--ink2);
	font-style: italic;
}

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

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

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

.pr .ev b {
	font-weight: 600;
}

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

.pr .media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 900px) {
	.pr {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.pr.flip .media {
		order: 0;
	}
}

/* ------------------------------------------------------------------
 * Le lieu (`.env`, bande ivoire avec citation et liste)
 * ------------------------------------------------------------------ */

.env {
	margin-block-start: 72px;
	background: var(--ivory);
	padding-block: 72px;
}

.env blockquote {
	margin: 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(28px, 3.6vw, 52px);
	line-height: 1.08;
	max-width: 22ch;
}

.env blockquote em {
	font-style: italic;
	/* « tout un environnement » is the point of the sentence: one line. */
	white-space: nowrap;
	color: var(--bordeaux);
}

.env .sub {
	color: var(--ink2);
	margin: 18px 0 40px;
	max-width: 60ch;
}

.envlist {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 48px;
}

.envlist div {
	border-block-start: 1px solid var(--line);
	padding-block-start: 14px;
}

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

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

.envphoto {
	margin-block-start: 56px;
	aspect-ratio: 21 / 9;
	overflow: hidden;
	border-radius: 2px;
}

.envphoto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 900px) {
	.envlist {
		grid-template-columns: 1fr;
	}
}

/* Les années distinguées (mention, major) : L'école, Le Parcours. */
.laur {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin-block-start: 8px;
}

.laur div {
	border-block-start: 2px solid var(--bordeaux);
	padding-block-start: 10px;
}

.laur b {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 26px;
	font-variant-numeric: tabular-nums;
	display: block;
}

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

/* Les quatre cycles en liens : L'école, Le Parcours. */
.cycles4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin-block-start: 8px;
}

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

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

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

@media (max-width: 900px) {
	.laur {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	.cycles4 {
		grid-template-columns: 1fr 1fr;
	}
}

/* ------------------------------------------------------------------
 * Les étapes d'une admission (`.path`) : accueil, Admissions
 * ------------------------------------------------------------------ */

.path {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	position: relative;
}

.path::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 11px;
	height: 2px;
	background: var(--line);
}

.path div {
	position: relative;
	padding-block-start: 32px;
	padding-inline: 0 18px;
}

.path div::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 5px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--paper);
	border: 3px solid var(--bordeaux);
}

.path b {
	font-family: var(--serif);
	font-weight: 500;
	font-size: 22px;
	display: block;
	margin-block-end: 6px;
}

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

@media (max-width: 900px) {
	.path {
		grid-template-columns: 1fr 1fr;
	}
}

/* ------------------------------------------------------------------
 * Listes éditoriales, tableaux, coordonnées, pages de texte simple
 * ------------------------------------------------------------------ */

.elist {
	border-block-start: 2px solid var(--ink);
	margin-block-start: 24px;
}

.elist a,
.elist .row {
	display: grid;
	grid-template-columns: minmax(180px, 3fr) 6fr auto;
	gap: 28px;
	align-items: baseline;
	border-block-end: 1px solid var(--line);
	padding-block: 18px;
	text-decoration: none;
	text-align: start;
}

.elist b {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 20px;
}

.elist span {
	color: var(--ink2);
	font-size: 16px;
}

.elist em {
	font-style: normal;
	color: var(--bordeaux);
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
}

@media (max-width: 800px) {
	.elist a,
	.elist .row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

table.t {
	width: 100%;
	border-collapse: collapse;
	margin-block-start: 18px;
	font-size: 16px;
}

table.t th,
table.t td {
	text-align: start;
	padding: 12px 14px;
	border-block-end: 1px solid var(--line);
	vertical-align: top;
}

table.t thead th {
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink2);
	border-block-end: 2px solid var(--ink);
}

table.t tbody th {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 18px;
	white-space: nowrap;
}

table.t .ar {
	font-size: 15px;
	color: var(--ink2);
}

.tw {
	overflow-x: auto;
}

.cols2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	margin-block-start: 28px;
}

.mapbox {
	aspect-ratio: 16 / 9;
	background: var(--ivory);
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
	color: var(--ink2);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 20px;
	border-radius: 2px;
}

dl.dl {
	margin: 0;
}

dl.dl div {
	display: grid;
	grid-template-columns: minmax(150px, 2fr) 5fr;
	gap: 20px;
	border-block-end: 1px solid var(--line);
	padding-block: 13px;
}

dl.dl dt {
	color: var(--ink2);
	font-size: 15px;
	margin: 0;
}

dl.dl dd {
	margin: 0;
	font-size: 16.5px;
}

@media (max-width: 900px) {
	.cols2 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	dl.dl div {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}

.plain {
	max-width: 70ch;
	margin-inline: auto;
	padding-inline: var(--ram-gutter, 32px);
}

.plain h2 {
	font-size: clamp(24px, 2.6vw, 32px);
	margin: 44px 0 12px;
}

.plain p {
	margin: 0 0 16px;
}

.plain ul {
	padding-inline-start: 20px;
}

.plain li {
	margin-block-end: 6px;
}

/* ------------------------------------------------------------------
 * Formulaire (Raconter mon parcours)
 * ------------------------------------------------------------------ */

.banner {
	background: var(--wp--preset--color--accent-bg);
	color: #fff;
	padding-block: 12px;
	font-size: 15px;
	font-weight: 600;
}

.form {
	max-width: 760px;
}

.form fieldset {
	border: 0;
	border-block-start: 1px solid var(--line);
	padding: 22px 0 8px;
	margin: 0;
}

.form legend {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 20px;
	padding-block: 0;
	padding-inline: 0 10px;
}

.form label {
	display: block;
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 600;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="url"],
.form input[type="tel"],
.form textarea,
.form select {
	display: block;
	width: 100%;
	margin-block-start: 5px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-weight: 400;
}

.form textarea {
	min-height: 120px;
}

.form .two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
}

.form .cons label {
	font-weight: 400;
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 10px;
	align-items: start;
	font-size: 15.5px;
}

.form .hint {
	font-size: 14px;
	color: var(--ink2);
	font-weight: 400;
	margin-block-start: 3px;
}

@media (max-width: 700px) {
	.form .two {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
 * Arabe / RTL (maquette `accueil-ar`, AR_CSS)
 *
 * Les propriétés logiques ci-dessus retournent déjà les grilles, les
 * pastilles et les filets. Restent les dégradés orientés, les titres et
 * les chiffres latins.
 * ------------------------------------------------------------------ */

html[lang^="ar"] :where(.ram-maquette) :where(h1, h2, h3),
html[lang^="ar"] .elist b,
html[lang^="ar"] .facts b,
html[lang^="ar"] .envlist b {
	font-family: var(--kufi);
	font-weight: 600;
	line-height: 1.5;
}

html[lang^="ar"] .lat,
html[lang^="ar"] .age.lat {
	font-family: var(--sans);
}

[dir="rtl"] .rail .wide::before {
	background: linear-gradient(270deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
}

[dir="rtl"] .chapters::before {
	background: linear-gradient(270deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
}

[dir="rtl"] .chaps::before {
	background: linear-gradient(270deg, var(--parcours-steps), var(--line) 83.3% 100%);
}

[dir="rtl"] .todo {
	font-style: normal;
}

@media (max-width: 900px) {
	[dir="rtl"] .chapters::before {
		background: linear-gradient(180deg, var(--parcours-steps), var(--onnavy2) 83.3% 100%);
	}

	[dir="rtl"] .chaps::before {
		background: linear-gradient(180deg, var(--parcours-steps), var(--line) 83.3% 100%);
	}
}
