/*
 * Ryad Al Maârifa — base layer.
 * Logical properties only, so the sheet works unchanged in RTL.
 */

/*
 * Dark scheme — the palette approved with the mockups
 * (`design/mockups/mock/template.html`), mapped onto the theme's tokens.
 *
 * Two entries, same values: the reader's system preference, unless the
 * toggle in the header asked for light (`data-theme="light"`), and the
 * toggle's explicit dark (`data-theme="dark"`). Both selectors outrank the
 * `:root` block WordPress prints from theme.json, whatever the order.
 *
 * Text tokens (`ink`, `navy`, `bordeaux`) turn light: headings become ivory,
 * accents pink-bordeaux (#da828e since 20 October 2026, one step lighter than
 * the mockup's #d9808c: a small label on a `card` surface then reaches 4.5:1).Surface tokens (`band`, `band-2`, `accent-bg`,
 * `accent-bg-2`) stay deep navy and deep bordeaux, with white text on them.
 * `white` stays white — it is the text colour of the bands and buttons; the
 * white *surfaces* (cards, menus, tables, fields) use `card` instead.
 * Dark mode (14 October 2026): the page ground is the school navy, the
 * colour of the footer, not a black-grey; bands sit one step deeper.
 * A text token is never used as a background (lesson from the mockup: the
 * dark variant turned a navy band pale when it was).
 */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--wp--preset--color--stone: #132a4f;
		--wp--preset--color--stone-2: #0e1f3a;
		--wp--preset--color--card: #1a3358;
		--wp--preset--color--ink: #ece8df;
		--wp--preset--color--ink-2: #b7c3d9;
		--wp--preset--color--navy: #ece8df;
		--wp--preset--color--navy-2: #ece8df;
		--wp--preset--color--bordeaux: #da828e;
		--wp--preset--color--bordeaux-2: #e59aa4;
		--wp--preset--color--line: #2b4472;
		--wp--preset--color--line-2: #3b568a;
		--wp--preset--color--band: #0e1f3a;
		--wp--preset--color--band-2: #0a1628;
		--wp--preset--color--accent-mark: #da828e;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--stone: #132a4f;
	--wp--preset--color--stone-2: #0e1f3a;
	--wp--preset--color--card: #1a3358;
	--wp--preset--color--ink: #ece8df;
	--wp--preset--color--ink-2: #b7c3d9;
	--wp--preset--color--navy: #ece8df;
	--wp--preset--color--navy-2: #ece8df;
	--wp--preset--color--bordeaux: #da828e;
	--wp--preset--color--bordeaux-2: #e59aa4;
	--wp--preset--color--line: #2b4472;
	--wp--preset--color--line-2: #3b568a;
	--wp--preset--color--band: #0e1f3a;
	--wp--preset--color--band-2: #0a1628;
	--wp--preset--color--accent-mark: #da828e;
}

* {
	box-sizing: border-box;
}

/*
 * Typefaces (Youssef, 20 October 2026 — option B of
 * design/typo/comparaison-polices.html; docs/POLICES.md):
 *   Newsreader 500/600 (italic 600) — editorial display only: major and
 *     principle headings, institutional quotes, promotion statements;
 *   Manrope 400–700 — body, navigation and buttons (600), labels, dates,
 *     age ranges, and every figure (700), « 03 → 18 » included;
 *   IBM Plex Sans Arabic 400/500/600 — all Arabic.
 * The three aliases below keep resultats.css, which still names the former
 * faces, on the new ones without editing it. Remove them once that sheet
 * names newsreader / manrope / ibm-plex-sans-arabic itself.
 */
:root {
	--wp--preset--font-family--dm-serif-display: var(--wp--preset--font-family--newsreader);
	--wp--preset--font-family--dm-sans: var(--wp--preset--font-family--manrope);
	--wp--preset--font-family--noto-kufi-arabic: var(--wp--preset--font-family--ibm-plex-sans-arabic);
}

body {
	font-optical-sizing: auto;
}

/* Skip link: clipped to nothing until focused, then pinned to the
 * top-inline-start corner. Clipped rather than pushed 9999px off-screen: an
 * offset on the inline-start side is a scrollable overflow in right-to-left
 * pages (horizontal scroll on every Arabic page). */
.skip-link {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0;
	z-index: 100000;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	padding-block: 0.6em;
	padding-inline: 1em;
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: var(--wp--preset--font-size--small);
	text-align: start;
	text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
	width: auto;
	height: auto;
	overflow: visible;
	clip-path: none;
}

/*
 * Browser surfaces (plan de finition du 20 octobre 2026, P2 #12): the
 * focus ring, the text selection and the scrollbars carry the palette.
 *
 * `--ram-focus` is the ring's colour for the surface it sits on: bordeaux
 * on the stone page (pink-bordeaux in the dark scheme, where the page is
 * navy), the light ink of the navy bands on those bands. The selection
 * follows the same split: deep bordeaux under ivory text on the page, ivory
 * under navy text on a band.
 */
:root {
	--ram-focus: var(--wp--preset--color--bordeaux);
	scrollbar-color: var(--wp--preset--color--line-2) var(--wp--preset--color--stone);
}

footer.wp-block-template-part,
.admit,
.motto,
.ram-home.parcours,
.ram-home.promo,
.voice,
.film,
.vfilm {
	--ram-focus: var(--wp--preset--color--on-navy);
	scrollbar-color: var(--wp--preset--color--on-navy-2) var(--wp--preset--color--band);
}

:focus-visible {
	outline: 2px solid var(--ram-focus);
	outline-offset: 2px;
}

::selection {
	background: var(--wp--preset--color--accent-bg);
	color: var(--wp--preset--color--on-accent);
}

footer.wp-block-template-part ::selection,
.admit ::selection,
.motto ::selection,
.ram-home.parcours ::selection,
.ram-home.promo ::selection,
.voice ::selection {
	background: var(--wp--preset--color--on-navy);
	color: var(--wp--preset--color--band-2);
}

/* An Arabic name inside a French or English sentence (`<bdi lang="ar">`)
   is isolated by the element and never broken across two lines (plan de
   finition du 20 octobre 2026, P1 #7). */
bdi[lang="ar"] {
	white-space: nowrap;
}

/* A telephone number is one word: broken at the end of a line, « +212 » sat
   alone on one line and the rest on the next — in an Arabic paragraph, on
   opposite sides of the column (passe du 20 octobre 2026, #14). */
a[href^="tel:"] {
	white-space: nowrap;
}

/* A news story without a photograph keeps its square with the school's
   crest (`patterns/news-list.php`, the home's « La vie de l'école »). The
   crest is the transparent SVG on the `card` surface: near-white in the
   light scheme as before, navy in the dark one instead of a white tile.
   `.st a` outranks the news page's own `.news-page .st .ph` ground. */
.st a.ph.ph-crest {
	background: var(--wp--preset--color--card);
}

/* Arabic passages. */
.ar {
	font-family: var(--wp--preset--font-family--ibm-plex-sans-arabic);
	direction: rtl;
	text-align: start;
}

/* French passages inside an Arabic page: the mirror of `.ar`. The Arabic
   pages carry the French name where the French pages carry the Arabic one.
   Only the direction is set here — the face is the page's own, or the preset
   class the block carries. */
.fr {
	direction: ltr;
	text-align: start;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		scroll-behavior: auto;
	}
}

/* Media slot codes (« Emplacement ACC-07 · … ») are production markers for
   the school: they stay in the markup, `hidden`, and no component rule that
   sets `display` may bring them back (final polish brief, 13 October 2026). */
.slot[hidden],
.code[hidden] {
	display: none !important;
}

/* « Version intégrale » under a played cut (`ram_slot_video_full_link()`):
   the card's words ignore the pointer so the player's controls stay free;
   the link takes it back. */
.vfull {
	display: block;
	margin-block-start: 6px;
	font-size: 13px;
}

.vfull a {
	pointer-events: auto;
	color: inherit;
	text-decoration: underline;
}

/* ------------------------------------------------------------------
 * Header — sticky bar: the crest, primary navigation, language
 * switcher, admissions call to action.
 * ------------------------------------------------------------------ */

/* One page measure (plan de finition du 20 octobre 2026, P1 #4): the
   content shell of theme.json (1240) and this gutter, for the footer, the
   home sections and the designed pages alike. */
:root {
	--ram-gutter: 32px;
}

@media (max-width: 639px) {
	:root {
		--ram-gutter: 20px;
	}
}

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

/* La barre d'en-tête suit la mesure de contenu (1240), comme toutes les
   sections depuis la finition du 20 octobre : ses bords tombent sur ceux
   du texte des bandes en dessous, et non plus 36 px du bord de l'écran. */
header .wrap.bar {
	max-width: var(--wp--style--global--content-size, 1240px);
}

header.wp-block-template-part {
	position: sticky;
	inset-block-start: 0;
	z-index: 20;
	background: var(--wp--preset--color--stone);
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.bar {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 78px;
}

/* Core's flow layout adds margin-block-start to children; the bar is a flex row. */
.bar > * {
	margin-block: 0;
}

/* Brand: the crest alone (décision du 20 octobre 2026). Its ribbon already
   carries the name in Latin and Arabic; the name is in the link as visually
   hidden text (`patterns/brand.php`). The crest's height is a token per
   breakpoint — 56 px sur bureau, 64 px sous 980 px : sur téléphone et
   tablette l'écusson est le seul porteur du nom, le ruban doit rester
   lisible ; la barre s'élève de quelques pixels pour l'accueillir. */
:root {
	--ram-crest: 56px;
}

@media (max-width: 979px) {
	:root {
		--ram-crest: 64px;
	}
}

.brand {
	display: flex;
	align-items: center;
	flex: none;
	margin-inline-end: auto;
	text-decoration: none;
}

.brand img {
	display: block;
	width: var(--ram-crest);
	height: var(--ram-crest);
}

/* Hidden from sight, kept for screen readers and search engines. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/*
 * Primary navigation, and the quieter « Vie pratique » entry beside it.
 *
 * Both are plain lists written by `patterns/nav-primary.php` and
 * `patterns/nav-vie-pratique.php` rather than core navigation blocks: the
 * « Le Parcours » disclosure is a `<details>` / `<summary>` pair, which opens
 * from the keyboard with no script. Everything below is therefore ordinary
 * CSS on ordinary elements.
 */
.main-list,
.sub-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-list {
	display: flex;
	align-items: center;
	gap: 24px;
}

.main-list > li {
	margin: 0;
}

.main-link,
.util-link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-block: 6px;
	border-block-end: 2px solid transparent;
	font-family: var(--wp--preset--font-family--manrope);
	font-weight: 600;
	text-decoration: none;
}

.main-link {
	font-size: 16px;
	color: var(--wp--preset--color--ink);
}

/* The utility layer is a step smaller than the five primary entries, in
   the same ink: a second colour read as the current page (plan de finition
   du 20 octobre 2026, P2 #11); the current page is the bordeaux underline. */
.util-link {
	font-size: 15px;
	color: var(--wp--preset--color--ink);
}

a.main-link:hover,
a.main-link[aria-current],
summary.main-link:hover,
summary.util-link:hover,
.sub[open] > summary {
	color: var(--wp--preset--color--bordeaux);
	border-block-end-color: var(--wp--preset--color--bordeaux);
}

/* The disclosure. The default triangle is replaced by one that follows the text direction. */
.sub {
	position: relative;
}

.sub > summary {
	cursor: pointer;
	list-style: none;
}

.sub > summary::-webkit-details-marker {
	display: none;
}

.sub > summary::after {
	content: "";
	width: 0;
	height: 0;
	margin-inline-start: 7px;
	border-inline: 4px solid transparent;
	border-block-start: 5px solid currentColor;
}

.sub[open] > summary::after {
	transform: rotate(180deg);
}

.sub > summary:focus-visible {
	outline: 2px solid var(--ram-focus);
	outline-offset: 2px;
}

.sub-list {
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: 0;
	z-index: 20;
	display: grid;
	min-width: 240px;
	padding-block: 8px;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
}

.sub-list li {
	margin: 0;
}

.sub-list a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 16px;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 15.5px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.sub-list a:hover,
.sub-list a[aria-current] {
	color: var(--wp--preset--color--bordeaux);
	background: var(--wp--preset--color--stone);
}

/* Narrow screens: the lists sit in the menu panel (see « Menu des écrans
   étroits » below), and an open disclosure pushes the next entry down
   instead of floating over it. */
@media (max-width: 979px) {
	.sub-list {
		position: static;
		min-width: 0;
		padding-block: 0;
		padding-inline-start: 14px;
		border: 0;
		border-inline-start: 2px solid var(--wp--preset--color--line);
		background: none;
	}
}

/* The bar's faces set wider than Source Sans and Caslon did:
   on a wide screen the labels stay on one line, the gaps
   narrowing below 1440px so the bar keeps its room; below 1280px the
   labels may break onto two lines, as before. */
@media (min-width: 1280px) {
	.main-link,
	.util-link {
		white-space: nowrap;
	}
}

@media (min-width: 980px) and (max-width: 1439px) {
	.bar {
		gap: 16px;
	}

	.main-list {
		gap: 18px;
	}
}

@media (min-width: 980px) and (max-width: 1279px) {
	.bar {
		gap: 12px;
	}

	.main-list {
		gap: 12px;
	}

	.main-link {
		font-size: 15px;
	}
}

/* ------------------------------------------------------------------
 * Menu des écrans étroits (plan de finition du 20 octobre 2026, P0 1-2).
 *
 * Sous 980 px, la barre collante ne garde que la marque, « Inscriptions »
 * et le bouton « Menu » (`patterns/nav-toggle.php`) ; la navigation, « Vie
 * pratique » et les langues passent dans le panneau `#ram-menu`, ouvert
 * sous la barre par `assets/js/nav.js`. Le repli ne vaut que sous la classe
 * `ram-js` (posée dans `<head>`) : sans JavaScript, le panneau est rendu
 * ouvert, en rangée pleine largeur sous la marque, et la barre défile avec
 * la page. Au-delà de 980 px, le panneau s'efface (`display: contents`) et
 * ses trois enfants redeviennent des éléments de la barre, comme avant.
 * ------------------------------------------------------------------ */
.nav-panel {
	display: contents;
}

/* Le groupe est en disposition « flow » : pas de marge entre ses enfants. */
.nav-panel > * {
	margin-block: 0;
}

.nav-toggle {
	display: none;
}

@media (max-width: 979px) {
	.bar {
		flex-wrap: wrap;
		gap: 12px;
		/* 64 px d'écusson + 8 px de part et d'autre. */
		min-height: 80px;
	}

	.bar > .header-cta {
		order: 1;
	}

	.bar > .nav-toggle {
		order: 2;
	}

	/* Sans JavaScript : le panneau, ouvert, en rangée sous la marque. */
	.nav-panel {
		display: block;
		order: 3;
		flex: 1 1 100%;
		padding-block-end: 20px;
	}

	:root:not(.ram-js) header.wp-block-template-part {
		position: relative;
	}

	:root:not(.ram-js) .bar {
		padding-block-start: 12px;
	}

	.nav-panel .main-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.nav-panel .main-item,
	.nav-panel nav.util {
		border-block-end: 1px solid var(--wp--preset--color--line);
	}

	.nav-panel .main-link,
	.nav-panel .util-link {
		justify-content: space-between;
		min-height: 52px;
		border-block-end: 0;
		white-space: nowrap;
	}

	.nav-panel .main-link {
		font-size: 18px;
	}

	.nav-panel .util-link {
		font-size: 16px;
	}

	.nav-panel .sub-list {
		margin-block-end: 12px;
	}

	.nav-panel .lang-wrap {
		margin-block-start: 24px;
	}

	/* Avec JavaScript : le bouton, et le panneau replié sous la barre. */
	.ram-js .nav-toggle {
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		gap: 8px;
		min-width: 44px;
		min-height: 44px;
		padding-block: 0;
		padding-inline: 12px;
		border: 1px solid var(--wp--preset--color--line-2);
		border-radius: 3px;
		background: none;
		font-family: var(--wp--preset--font-family--manrope);
		font-size: 15px;
		font-weight: 600;
		color: var(--wp--preset--color--ink);
		cursor: pointer;
	}

	.nav-toggle:focus-visible {
		outline: 2px solid var(--wp--preset--color--bordeaux);
		outline-offset: 2px;
	}

	.nav-toggle svg {
		display: block;
		flex: 0 0 auto;
	}

	.nav-toggle .nt-close,
	.nav-toggle[aria-expanded="true"] .nt-open {
		display: none;
	}

	.nav-toggle[aria-expanded="true"] .nt-close {
		display: inline;
	}

	.ram-js .nav-panel {
		position: fixed;
		inset-block: var(--nav-top, 73px) 0;
		inset-inline: 0;
		z-index: 19;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-block: 8px 40px;
		padding-inline: 32px;
		background: var(--wp--preset--color--stone);
		visibility: hidden;
		opacity: 0;
	}

	.ram-js .nav-panel.is-open {
		visibility: visible;
		opacity: 1;
	}

	/* La page ne défile plus sous le panneau ouvert. */
	.nav-open,
	.nav-open body {
		overflow: hidden;
	}

	/* Le bouton WhatsApp flottant ne recouvre pas le panneau ouvert. */
	.nav-open .wa-float {
		display: none;
	}
}

@media (max-width: 979px) and (prefers-reduced-motion: no-preference) {
	.ram-js .nav-panel {
		transition: opacity 0.18s ease, visibility 0s linear 0.18s;
	}

	.ram-js .nav-panel.is-open {
		transition: opacity 0.18s ease;
	}
}

/* Téléphones : la marque et « Inscriptions » rétrécissent, le bouton ne
   montre plus que son icône (son nom reste « Menu » pour un lecteur d'écran). */
@media (max-width: 639px) {
	.bar {
		gap: 8px;
		min-height: 80px;
	}

	/* `.bar` en tête : la règle de base du bouton vient plus bas. */
	.bar .header-cta .wp-block-button__link {
		min-height: 42px;
		padding-inline: 12px;
		font-size: 14.5px;
	}

	.ram-js .nav-toggle {
		padding-inline: 10px;
	}

	.nav-toggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.ram-js .nav-panel {
		inset-block-start: var(--nav-top, 65px);
		padding-inline: 20px;
	}
}

/*
 * Language switcher. A language that can be reached is an anchor, one that is
 * not yet published is a button marked `aria-disabled`; the two have to look
 * like one segmented control, so the anchor restates the button's box.
 */
.lang {
	display: flex;
	flex: 0 0 auto;
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 3px;
	overflow: hidden;
}

.lang button,
.lang a {
	min-width: 44px;
	min-height: 44px;
	padding-block: 8px;
	padding-inline: 12px;
	border: 0;
	background: none;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--ink-2);
	cursor: pointer;
}

/* The anchor is not a button box by default; give it the same one. */
.lang a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-decoration: none;
}

.lang > * + * {
	border-inline-start: 1px solid var(--wp--preset--color--line-2);
}

.lang button[aria-current],
.lang a[aria-current] {
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--on-navy);
}

/*
 * An unavailable language is marked `aria-disabled`, not `disabled`: it
 * stays focusable and keeps announcing itself. No dimming, so the muted
 * state still clears 4.5:1 (ink-2 on stone = 5.6:1).
 */
.lang button[aria-disabled="true"] {
	cursor: default;
}

.lang-wrap {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

/* Core's flow layout adds margin-block-start to children; this is a column. */
.lang-wrap > * {
	margin-block: 0;
}

.lang .ar {
	font-size: 16px;
	line-height: 1;
}

/*
 * Auto / clair / sombre toggle: one square button at the end of the footer's
 * bottom line (moved out of the header by the final polish brief, 13 October
 * 2026). The icon shown is the current state — half disc (Auto), sun
 * (Clair), moon (Sombre). The `hidden` attribute is left in charge until the
 * script reveals the button.
 */
.theme-toggle:not([hidden]) {
	display: inline-flex;
}

.theme-toggle {
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--line-on-navy);
	border-radius: 3px;
	background: none;
	color: var(--wp--preset--color--on-navy-2);
	cursor: pointer;
}

.theme-toggle:hover {
	color: var(--wp--preset--color--white);
}

.theme-toggle:focus-visible {
	outline: 2px solid var(--ram-focus);
	outline-offset: 2px;
}

.theme-toggle svg {
	display: none;
}

:root:not([data-theme]) .theme-toggle .tt-auto,
:root[data-theme="light"] .theme-toggle .tt-light,
:root[data-theme="dark"] .theme-toggle .tt-dark {
	display: block;
}

/* Admissions call to action. */
.header-cta {
	flex: 0 0 auto;
}

.header-cta .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding-block: 0;
	padding-inline: 22px;
	border: 1.5px solid transparent;
	border-radius: 3px;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.header-cta .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-bg-2);
}

/* ------------------------------------------------------------------
 * Footer — four compact columns (Ryad Al Maârifa, Familles, Vie de
 * l'école, contact) over one bottom line: copyright, legal pages and the
 * theme toggle (final polish brief, 13 October 2026). Short on purpose: it
 * closes the page in well under one screen.
 * ------------------------------------------------------------------ */

footer.wp-block-template-part {
	margin-block-start: 72px;
	padding-block: 40px 18px;
	background: var(--wp--preset--color--band-2);
	color: var(--wp--preset--color--on-navy-2);
	font-family: var(--wp--preset--font-family--manrope);
}

/* A page that closes on its tinted « Vie pratique » band (`.prat`) meets the
   footer directly: the 72px of page ground between the two read as a stray
   stripe, plainest in the dark scheme (passe du 20 octobre 2026, #14). */
main:has(> .entry-content > :last-child > .prat:last-child) + footer.wp-block-template-part {
	margin-block-start: 0;
}

footer.wp-block-template-part a {
	color: inherit;
	text-decoration: none;
}

footer.wp-block-template-part a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fg {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr);
	gap: 28px 40px;
}

/* Core's flow layout adds margin-block-start to children; the columns are grid cells. */
.fg > *,
.copy > * {
	margin-block: 0;
}

.fg .fh {
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--white);
}

.fg ul,
.legal-links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fg ul {
	display: grid;
	font-size: 15px;
}

.fg ul a,
.co .v a,
.legal-links a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.co > div {
	margin-block-end: 6px;
}

.co .l {
	font-size: 12.5px;
	line-height: 1.3;
}

.co .v {
	font-size: 15px;
	line-height: 1.4;
	color: var(--wp--preset--color--on-navy);
}

.copy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 24px;
	margin-block-start: 28px;
	padding-block-start: 12px;
	border-block-start: 1px solid var(--wp--preset--color--line-on-navy);
	font-size: 14px;
}

.legal-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.copy .theme-toggle {
	margin-inline-start: auto;
}

/* « Cookies » (only with a Meta pixel configured, `inc/consent.php`): a
 * button that reads as one of the legal links, just before the theme toggle,
 * which then gives up its auto margin to it. */
.consent-open {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.consent-open[hidden] {
	display: none;
}

.consent-open:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.consent-open:focus-visible {
	outline: 2px solid var(--ram-focus);
	outline-offset: 2px;
}

.copy .consent-open:not([hidden]) {
	margin-inline-start: auto;
}

.copy .consent-open:not([hidden]) + .theme-toggle {
	margin-inline-start: 0;
}

/* Phones: the legal links take their own row, so « Cookies » and the toggle
 * wrap together and stay side by side at the end of the next one. */
@media (max-width: 639px) {
	.copy:has(.consent-open:not([hidden])) .legal-links {
		flex-basis: 100%;
	}
}

/*
 * Consent banner (launch checklist items 19–20; `inc/consent.php`,
 * `assets/js/consent.js`). Non-modal, fixed at the bottom of the viewport,
 * as wide as the content at most, 16px from the edges. While it is open the
 * script sets `ram-consent-open` on <html> and its height in
 * `--ram-consent-space`: the footer grows by that much, so at the end of the
 * page the banner rests below the footer's last line and never covers the
 * theme toggle. No animation: it simply appears.
 */
.ram-consent {
	position: fixed;
	inset-inline: 16px;
	inset-block-end: 16px;
	z-index: 900;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	max-width: var(--wp--style--global--content-size, 1240px);
	margin-inline: auto;
	padding: 16px 20px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 3px;
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 8px 28px rgb(10 22 40 / 22%);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 15px;
	line-height: 1.5;
}

.ram-consent[hidden] {
	display: none;
}

.ram-consent-text {
	flex: 1 1 28em;
	margin: 0;
}

.ram-consent-text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ram-consent-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* The site's two buttons: outline (secondary) and accent (primary). */
.ram-consent-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-block: 0;
	padding-inline: 20px;
	border: 1.5px solid transparent;
	border-radius: 3px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.ram-consent-decline {
	border-color: var(--wp--preset--color--navy);
	background: transparent;
	color: var(--wp--preset--color--navy);
}

.ram-consent-decline:hover {
	background: var(--wp--preset--color--band);
	border-color: var(--wp--preset--color--band);
	color: var(--wp--preset--color--on-navy);
}

.ram-consent-accept {
	background: var(--wp--preset--color--accent-bg);
	color: var(--wp--preset--color--white);
}

.ram-consent-accept:hover {
	background: var(--wp--preset--color--accent-bg-2);
}

.ram-consent-btn:focus-visible,
.ram-consent-text a:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}

.ram-consent-open footer.wp-block-template-part {
	padding-block-end: calc(18px + 16px + var(--ram-consent-space, 0px));
}

@media (max-width: 639px) {
	.ram-consent {
		padding: 14px 16px;
	}

	.ram-consent-actions {
		flex: 1 1 100%;
	}

	.ram-consent-btn {
		flex: 1 1 0;
	}
}

@media print {
	.ram-consent {
		display: none;
	}
}

/*
 * WhatsApp button (marketing piste 1; `inc/contact-links.php`). Fixed in the
 * bottom corner of the inline end: bottom-right, bottom-left in Arabic. The
 * green is WhatsApp's, darkened so the white glyph keeps a 4:1 contrast; it
 * is not a theme token and does not change with the scheme.
 *
 * It never covers the consent banner or the theme toggle: while the banner is
 * open it rides above it (`--ram-consent-space`, set by `consent.js`), and
 * where the footer's bottom line reaches the corner (below 1400px) the footer
 * grows by the button's height, so at the end of the page the toggle rests
 * above it.
 *
 * Plan de finition du 20 octobre 2026 (P1 #4, P2 #13): a shadow with a
 * contact edge and a soft lift, instead of one faint halo; and from 980 to
 * 1399px, where the page gutter is narrower than the button, the button is
 * smaller and closer to the corner: it stays in the gutter from about
 * 1300px, and below that overlaps the text column by a few pixels only
 * while the page scrolls under it.
 */
.wa-float {
	position: fixed;
	inset-inline-end: 20px;
	inset-block-end: 20px;
	z-index: 890;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a8d4c;
	color: #fff;
	box-shadow: 0 1px 2px rgb(10 22 40 / 30%), 0 8px 22px rgb(10 22 40 / 30%);
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wa-float:hover {
	background: #157540;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgb(10 22 40 / 28%), 0 12px 28px rgb(10 22 40 / 32%);
}

.wa-float:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
}

.ram-consent-open .wa-float {
	inset-block-end: calc(16px + var(--ram-consent-space, 0px) + 12px);
}

@media (max-width: 1399px) {
	:root:has(#wa-float) footer.wp-block-template-part {
		padding-block-end: calc(18px + 20px + 56px);
	}

	:root.ram-consent-open:has(#wa-float) footer.wp-block-template-part {
		padding-block-end: calc(18px + 16px + var(--ram-consent-space, 0px) + 12px + 56px);
	}
}

@media (min-width: 980px) and (max-width: 1399px) {
	.wa-float {
		inset-inline-end: 12px;
		inset-block-end: 16px;
		width: 48px;
		height: 48px;
	}

	.wa-float svg {
		width: 24px;
		height: 24px;
	}
}

@media (max-width: 639px) {
	.wa-float {
		inset-inline-end: 16px;
		inset-block-end: 16px;
		width: 52px;
		height: 52px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wa-float {
		transition: none;
	}

	.wa-float:hover {
		transform: none;
	}
}

@media print {
	.wa-float {
		display: none;
	}
}

/*
 * The school elsewhere (marketing piste 3; `ram_school_links()`): Facebook,
 * Instagram, the Google Maps listing and directions. In the footer's contact
 * column, and on the contact page.
 */
.school-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fg .co .school-links {
	display: flex;
	margin-block-start: 10px;
	font-size: 14.5px;
}

.school-links a {
	display: inline-flex;
	gap: 7px;
	align-items: center;
	min-height: 32px;
}

.school-links svg {
	flex: 0 0 auto;
}

@media (pointer: coarse) {
	.school-links a {
		min-height: 44px;
	}
}

@media (max-width: 979px) {
	.fg .co .school-links {
		grid-column: 1 / -1;
	}
}

/* Touch screens keep the 44px targets the footer had. */
@media (pointer: coarse) {
	.fg ul a,
	.co .v a,
	.legal-links a,
	.consent-open {
		min-height: 44px;
	}
}

@media (max-width: 979px) {
	.fg {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.fg .co {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 24px;
	}

	.fg .co .fh {
		grid-column: 1 / -1;
	}
}

@media (max-width: 639px) {
	.fg {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px 20px;
	}

	.fg .co {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
 * Homepage — shared section scaffolding.
 *
 * Every homepage pattern carries `.rm-section` on its outermost block and
 * owns its own vertical rhythm, so core's flow-layout block gap is cleared
 * and the mockup's paddings are restated below. Core's `:first-child` and
 * `:last-child` layout rules carry two classes of specificity, so the class
 * is repeated in each selector to outrank them. Scoping on the pattern's own
 * class rather than on `main#main` is what lets a homepage pattern be
 * inserted into an ordinary page and keep its spacing.
 * ------------------------------------------------------------------ */

/*
 * The home page's sections are the body of the page itself now, so they are
 * rendered inside the post-content wrapper rather than straight into <main>.
 * Core gives that wrapper `display: flow-root`, which traps the bottom margin
 * the last section's own last block would otherwise let escape — 18px of it,
 * enough to push the whole footer down. `block` restores the box the sections
 * were laid out in when the template drew them.
 */
.home .wp-block-post-content {
	display: block;
}

.rm-section.rm-section,
.rm-section.rm-section .hero-figure,
.rm-section.rm-section .admit-act,
.rm-section.rm-section .ladder,
.rm-section.rm-section .places,
.rm-section.rm-section .serv,
.rm-section.rm-section .news {
	margin-block: 0;
}

/* The motto band is the one section that carries its own margin. */
.motto.rm-section.rm-section {
	margin-block-start: 80px;
}

.rm-section.rm-section .s-head {
	margin-block-end: 34px;
}

.s {
	padding-block: 76px 0;
}

.s-head {
	max-width: 62ch;
}

.s-head > * {
	margin-block: 0;
}

.s-head h2 {
	font-size: var(--wp--preset--font-size--h-2);
}

.s-head p {
	margin-block-start: 12px;
	font-size: 18px;
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Homepage — hero: the name in Arabic, the title, the promise, two calls
 * to action, and the façade photograph.
 * ------------------------------------------------------------------ */

.hero {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: 56px;
	align-items: center;
	padding-block: 64px 56px;
}

.hero-copy > * {
	margin-block: 0;
}

.hero .name-ar,
.hero .name-fr {
	margin-block-end: 6px;
	font-size: 44px;
	line-height: 1;
	color: var(--wp--preset--color--bordeaux);
}

.hero h1 {
	letter-spacing: -0.01em;
}

.hero .est {
	margin-block-start: 12px;
	font-style: italic;
	font-size: 19px;
	color: var(--wp--preset--color--ink-2);
}

.hero .lede {
	max-width: 44ch;
	margin-block-start: 22px;
	line-height: 1.55;
	color: var(--wp--preset--color--ink-2);
}

.hero .acts {
	gap: 14px;
	margin-block-start: 30px;
}

.hero-figure {
	margin: 0;
}

.hero-figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 3px;
}

.hero-figure figcaption {
	margin-block-start: 10px;
	font-size: 14px;
	color: var(--wp--preset--color--ink-2);
}

/* Homepage buttons: primary on the accent surface, outline in navy. */
.acts .wp-block-button__link,
.admit-act .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding-block: 0;
	padding-inline: 22px;
	border: 1.5px solid transparent;
	border-radius: 3px;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.admit-act .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-bg-2);
}

.acts .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1.5px solid var(--wp--preset--color--navy);
	color: var(--wp--preset--color--navy);
}

.acts .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--on-navy);
}

/* The second button of an `.admit-act` row (the online form on the English
 * home, « Notify me by email » on the test dates): outline, navy on the page,
 * light on the admissions band. */
.admit-act .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: currentColor;
	color: var(--wp--preset--color--navy);
}

.admit .admit-act .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--on-navy);
}

.admit-act .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-bg-2);
	border-color: var(--wp--preset--color--accent-bg-2);
	color: var(--wp--preset--color--white);
}

/* ------------------------------------------------------------------
 * Homepage — fiche: the establishment's plain facts, ruled top and bottom.
 * ------------------------------------------------------------------ */

.fiche {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 0;
	border-block: 1px solid var(--wp--preset--color--line-2);
}

.fiche > div {
	padding-block: 22px;
	padding-inline: 0 24px;
	border-inline-end: 1px solid var(--wp--preset--color--line);
}

.fiche > div + div {
	padding-inline-start: 24px;
}

.fiche > div:last-child {
	border-inline-end: 0;
}

.fiche dt {
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--ink-2);
}

.fiche dd {
	margin: 4px 0 0;
	font-family: var(--wp--preset--font-family--manrope);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.25;
	color: var(--wp--preset--color--navy);
}

/* ------------------------------------------------------------------
 * Homepage — admissions band: the calm replacement for a pop-up.
 * ------------------------------------------------------------------ */

.rm-section.rm-section .admit {
	margin-block-start: 56px;
}

.admit {
	border-radius: 3px;
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--on-navy);
}

.admit-in {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 28px;
	align-items: center;
	padding-block: 30px;
	padding-inline: 36px;
}

.admit-copy > * {
	margin-block: 0;
}

.admit h2 {
	font-size: 26px;
}

.admit p {
	max-width: 60ch;
	margin-block-start: 8px;
}

/* ------------------------------------------------------------------
 * Homepage — cycles: one ruled line with four stops.
 * ------------------------------------------------------------------ */

.ladder {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	padding-block-start: 26px;
}

.ladder::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 8px;
	height: 1px;
	background: var(--wp--preset--color--line-2);
}

.stop {
	position: relative;
}

.stop::before {
	content: "";
	position: absolute;
	inset-block-start: -22px;
	inset-inline-start: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-mark);
}

.stop .age {
	font-family: var(--wp--preset--font-family--manrope);
	font-weight: 600;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

.stop h3 {
	margin: 6px 0 10px;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: 26px;
	line-height: 1.25;
	color: var(--wp--preset--color--navy);
}

.stop p {
	margin: 0;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

.stop a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block-start: 12px;
	border-block-end: 1.5px solid currentColor;
	font-weight: 600;
	color: var(--wp--preset--color--bordeaux);
	text-decoration: none;
}

/* ------------------------------------------------------------------
 * Homepage — the school in photographs; the captions are facts.
 * ------------------------------------------------------------------ */

.places {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 22px;
}

.place {
	margin: 0;
}

.place img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 3px;
}

.place figcaption {
	margin-block-start: 12px;
}

.place b {
	display: block;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: 20px;
	color: var(--wp--preset--color--navy);
}

.place span {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Homepage — motto: a full-width navy band.
 * ------------------------------------------------------------------ */

.motto {
	max-width: none;
	margin-block-start: 80px;
	padding-block: 72px;
	padding-inline: 32px;
	background: var(--wp--preset--color--band);
	color: var(--wp--preset--color--on-navy);
	text-align: center;
}

/* The base .ar rule aligns to start; inside the centred band, re-centre.
   `.motto-fr` is the same line on the Arabic home, the pair being mirrored. */
.motto-ar,
.motto-fr {
	margin-block-end: 16px;
	text-align: center;
	font-size: 30px;
	color: var(--wp--preset--color--on-navy-2);
}

.motto-quote {
	max-width: 22ch;
	margin: 0 auto;
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--h-2);
	line-height: 1.2;
	color: var(--wp--preset--color--white);
}

.motto-quote p {
	margin: 0;
}

.motto-cite {
	display: block;
	margin-block-start: 22px;
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--on-navy-2);
}

/* ------------------------------------------------------------------
 * Homepage — services: three differentiated cards, the first one leading.
 * ------------------------------------------------------------------ */

.s-services {
	padding-block-start: 72px;
}

.serv {
	display: grid;
	grid-template-columns: 1.35fr 1fr 1fr;
	gap: 22px;
}

.svc {
	padding: 28px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 3px;
	background: var(--wp--preset--color--card);
}

.svc.lead {
	border-color: var(--wp--preset--color--accent-bg);
	background: var(--wp--preset--color--accent-bg);
	color: var(--wp--preset--color--on-accent);
}

.svc h3 {
	margin: 0 0 10px;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--h-3);
	line-height: 1.25;
	color: var(--wp--preset--color--navy);
}

.svc.lead h3 {
	color: var(--wp--preset--color--white);
}

.svc p {
	margin: 0;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

.svc.lead p {
	color: var(--wp--preset--color--on-accent-2);
}

/* Each card's key line links to its own section on the services page. */
.svc .k {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block-start: 4px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.svc .k:hover {
	color: var(--wp--preset--color--bordeaux);
}

.svc.lead .k {
	color: var(--wp--preset--color--white);
}

.svc.lead .k:hover {
	color: var(--wp--preset--color--on-accent-2);
}

/* ------------------------------------------------------------------
 * Homepage — news: the three newest posts, as ruled entries. A query
 * loop now, so `.news` is the post template's own list and its entries
 * are the `<li>` items core emits; the Phase A `.art` articles are gone.
 * ------------------------------------------------------------------ */

.news {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news > li {
	padding-block-start: 16px;
	border-block-start: 1px solid var(--wp--preset--color--line-2);
}

/* The post template is emitted with WordPress's flow layout, which puts a
 * block gap above every entry but the first. In a grid that gap lands on the
 * second and third columns only, so the three rules no longer line up: the
 * grid's own `gap` is what spaces these entries. The class is repeated to
 * outrank the layout rule, as the three margin resets above it are. */
.rm-section.rm-section .news > li {
	margin-block-start: 0;
}

.news .wp-block-post-date {
	margin: 0;
	font-size: 14px;
	color: var(--wp--preset--color--ink-2);
}

.news h3 {
	margin: 8px 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.25;
	color: var(--wp--preset--color--ink);
}

.news h3 a {
	color: inherit;
	text-decoration: none;
}

.news h3 a:hover {
	color: var(--wp--preset--color--bordeaux);
}

.news p {
	margin: 0;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

/* The photograph sits above the date, in a band of one shape so entries of
 * different proportions still line up. Entries without one simply start at
 * their date. */
.news .art-figure {
	margin-block-end: 14px;
}

.news .art-figure img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	/* Anchored to the top: the school's news images are a mix of landscape
	 * photographs and portrait posters, and a poster carries its title at the
	 * top. Four by three is deep enough to keep a photograph's subject in
	 * frame while still showing a poster's heading. */
	object-position: center top;
}

/* ------------------------------------------------------------------
 * Homepage — narrow screens.
 * ------------------------------------------------------------------ */

@media (max-width: 979px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 34px;
		padding-block-start: 44px;
	}

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

	.fiche > div,
	.fiche > div + div {
		padding-inline: 0;
		border-inline-end: 0;
		border-block-end: 1px solid var(--wp--preset--color--line);
	}

	.admit-in {
		grid-template-columns: 1fr;
	}

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

	.places,
	.serv,
	.news {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 559px) {
	.fiche,
	.ladder {
		grid-template-columns: 1fr;
	}

	.hero .name-ar,
	.hero .name-fr {
		font-size: 36px;
	}
}

/* ------------------------------------------------------------------
 * Inner pages — page header band: a stone strip carrying the h1 and,
 * on single posts, the date. Full width, contents on the site grid.
 * ------------------------------------------------------------------ */

.phead {
	max-width: none;
	padding-block: 40px;
	padding-inline: var(--ram-gutter);
	background: var(--wp--preset--color--stone-2);
}

.phead-in {
	max-width: var(--wp--style--global--content-size, 1240px);
	margin-inline: auto;
}

.phead h1 {
	margin: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: var(--wp--preset--font-size--h-2);
	color: var(--wp--preset--color--navy);
}

.phead .wp-block-post-date {
	margin: 0 0 10px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* The reading column: the text measure is 70ch, aligned with the h1 above. */
.prose,
.loop-wrap {
	padding-block-start: 40px;
}

.prose > * {
	max-width: 70ch;
}

.prose-figure {
	margin-block-end: 28px;
}

.prose-figure img {
	display: block;
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------
 * Archive and search — the loop. Ruled entries, same reading as the
 * homepage news entries (.art); mirrored here rather than merged, so
 * the homepage section stays untouched.
 * ------------------------------------------------------------------ */

.loop {
	margin: 0;
	padding: 0;
	list-style: none;
}

.loop > li {
	padding-block: 20px;
	border-block-start: 1px solid var(--wp--preset--color--line-2);
}

.loop .wp-block-post-date {
	margin: 0;
	font-size: 14px;
	color: var(--wp--preset--color--ink-2);
}

.loop h2 {
	margin: 8px 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.25;
	color: var(--wp--preset--color--ink);
}

.loop h2 a {
	color: inherit;
	text-decoration: none;
}

.loop h2 a:hover {
	color: var(--wp--preset--color--bordeaux);
}

.loop p {
	max-width: 70ch;
	margin: 0;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

/* Pagination: two French labels, each a 44px tap target. */
.pager {
	margin-block-start: 34px;
	padding-block-start: 20px;
	border-block-start: 1px solid var(--wp--preset--color--line);
	gap: 16px;
}

.pager a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.pager a:hover {
	color: var(--wp--preset--color--bordeaux);
}

/* The search form, used on the search results page and on the 404. */
.sform {
	max-width: 520px;
	margin-block-end: 8px;
}

.sform .wp-block-search__input {
	min-height: 46px;
	padding-block: 0;
	padding-inline: 14px;
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 3px;
	background: var(--wp--preset--color--card);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	color: var(--wp--preset--color--ink);
}

.sform .wp-block-search__button {
	min-height: 46px;
	/* RTL exception: cancels core's physical margin-left so the logical gap is not doubled. */
	margin-left: 0;
	margin-inline-start: 10px;
	padding-block: 0;
	padding-inline: 22px;
	border: 0;
	border-radius: 3px;
	background: var(--wp--preset--color--accent-bg);
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 16px;
	font-weight: 600;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.sform .wp-block-search__button:hover {
	background: var(--wp--preset--color--accent-bg-2);
}

/* ------------------------------------------------------------------
 * 404 — the apology, the way home, and a search box.
 * ------------------------------------------------------------------ */

.e404 {
	padding-block-end: 20px;
}

.e404 > p {
	font-size: var(--wp--preset--font-size--lede);
	color: var(--wp--preset--color--ink-2);
}

.e404-act {
	margin-block: 26px;
}

.e404-act .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding-block: 0;
	padding-inline: 22px;
	border-radius: 3px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 559px) {
	.sform .wp-block-search__button {
		margin-inline-start: 8px;
		padding-inline: 16px;
	}
}

/* ------------------------------------------------------------------
 * Inner pages — the reading column: rhythm, lede, quotations.
 *
 * The post content block emits its own `.entry-content` wrapper, so the
 * `.prose > *` cap above lands on that wrapper rather than on the blocks
 * inside it. The cap is moved one level down here — same 70ch measure as
 * before, but now on the text itself, so the grids and the menu table can
 * release it for themselves.
 * ------------------------------------------------------------------ */

.prose > .entry-content {
	max-width: none;
}

.prose .entry-content > * {
	max-width: 70ch;
}

.prose .entry-content > h2 {
	margin-block: 48px 14px;
	font-size: 28px;
}

.prose .entry-content > h3 {
	margin-block: 30px 10px;
}

.prose .entry-content > p,
.prose .entry-content > ul,
.prose .entry-content > ol {
	margin-block: 0 16px;
}

.prose .entry-content > ul,
.prose .entry-content > ol {
	padding-inline-start: 22px;
}

/* The paragraph after a row of buttons had no space above it (its margin is
   zeroed just above): the button sat on the next line of text. */
.prose .entry-content > .wp-block-buttons {
	margin-block-end: 24px;
}

.prose .entry-content li {
	margin-block-end: 6px;
}

.prose .lede {
	margin-block-end: 26px;
	font-size: var(--wp--preset--font-size--lede);
	line-height: 1.5;
	color: var(--wp--preset--color--ink-2);
}

/*
 * The other half of a name that has two. « Le Parcours Ryad Al Maârifa » is
 * the page title; « مسار رياض المعرفة » is the same name, and sits directly
 * under it — in every language, since it is a name and not a translation.
 * `dir` is set on the element itself, so this works whichever way the page runs.
 */
.pg-alt {
	margin-block: -6px 18px;
	font-family: var(--wp--preset--font-family--ibm-plex-sans-arabic);
	font-weight: 500;
	font-size: 28px;
	line-height: 1.3;
	color: var(--wp--preset--color--bordeaux);
}

html[lang^="ar"] .pg-alt {
	font-family: var(--wp--preset--font-family--newsreader);
}

.pgquote {
	max-width: 34ch;
	margin-block: 8px 20px;
	margin-inline: 0;
	padding-inline-start: 22px;
	border-inline-start: 3px solid var(--wp--preset--color--accent-mark);
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-weight: 600;
	font-size: 24px;
	line-height: 1.3;
	color: var(--wp--preset--color--navy);
}

/* ------------------------------------------------------------------
 * Inner pages — sections carrying an anchor (#cantine, #transport,
 * #garde-surveillee). The header is sticky, so an anchored section keeps
 * clear of it when the browser jumps to it.
 * ------------------------------------------------------------------ */

.pgsec {
	scroll-margin-block-start: 104px;
}

/*
 * The section itself is released from the 70ch cap so the menu table has
 * room; its paragraphs keep the reading measure (see `.pgsec p` below).
 */
.prose .entry-content > .pgsec {
	max-width: none;
}

.pgsec + .pgsec {
	margin-block-start: 8px;
}

.pgsec > :first-child {
	margin-block-start: 48px;
}

.pgsec h2 {
	margin-block: 0 14px;
	font-size: 28px;
}

.pgsec h3 {
	margin-block: 30px 10px;
}

.pgsec p {
	margin-block: 0 16px;
	max-width: 70ch;
}

/* A section with one photograph beside its text. */
.pgsec-photo {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 32px;
	align-items: start;
}

.pgsec-figure {
	margin: 0;
}

.pgsec-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.pgsec-figure figcaption {
	margin-block-start: 10px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Inner pages — "term, then its precision" rows: results by year,
 * opening hours, legal identifiers.
 * ------------------------------------------------------------------ */

.defs {
	margin-block: 0 24px;
}

.defs > div {
	display: grid;
	grid-template-columns: 15rem 1fr;
	gap: 8px 24px;
	padding-block: 12px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.defs > div:last-child {
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.defs dt {
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

.defs dd {
	margin-inline-start: 0;
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Les cycles — four cards, one per cycle, each one a link.
 * ------------------------------------------------------------------ */

.prose .entry-content .cyc {
	max-width: none;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
	margin-block: 8px 32px;
}

.cyc-card {
	display: block;
	padding: 26px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 3px;
	background: var(--wp--preset--color--card);
	text-decoration: none;
	color: inherit;
}

.cyc-card:hover {
	border-color: var(--wp--preset--color--accent-mark);
}

.cyc-card .age {
	display: block;
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--bordeaux);
}

.cyc-card .t {
	display: block;
	margin-block-start: 8px;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--h-3);
	line-height: 1.25;
	color: var(--wp--preset--color--navy);
}

.cyc-card .d {
	display: block;
	margin-block-start: 10px;
	font-size: 16px;
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Photographs on inner pages — a plain responsive grid. No lightbox:
 * the images are the size they are shown at.
 * ------------------------------------------------------------------ */

.prose .entry-content .gal {
	max-width: none;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	margin-block: 8px 28px;
}

/* Three across, the wide view, then the last two halving the row: the
   gallery used to end on two pictures and an empty third (final polish
   brief, 13 October 2026). */
.gal figure {
	grid-column: span 2;
	margin: 0;
}

.gal .wide ~ figure {
	grid-column: span 3;
}

.gal .wide ~ figure img {
	aspect-ratio: 3 / 2;
}

.gal img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 3px;
}

/* The hall is a panorama; a full-width row spares it a brutal crop. */
.gal .wide {
	grid-column: 1 / -1;
}

.gal .wide img {
	aspect-ratio: 8 / 3;
}

.gal figcaption {
	margin-block-start: 10px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Contact — the same four labelled rows as the footer, on a light ground.
 * ------------------------------------------------------------------ */

.prose .entry-content .co-page {
	max-width: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 32px;
	margin-block: 0 8px;
}

.co-page > div {
	padding-block: 14px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.co-page .l {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

.co-page .v {
	font-size: 19px;
	color: var(--wp--preset--color--navy);
}

.co-page .v a {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.co-page .v a:hover {
	color: var(--wp--preset--color--bordeaux);
	text-decoration: underline;
}

/* ------------------------------------------------------------------
 * Cantine — the weekly menu. A plain core table the school fills in from
 * the page editor, so the styling has to survive whatever is typed into
 * the cells, including nothing at all.
 * ------------------------------------------------------------------ */

.menu-week {
	margin-block: 0 14px;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

.prose .entry-content .menu-semaine,
.pgsec .menu-semaine {
	/* Wider than the reading measure, because five columns need it; not the
	   full page, because a menu of four lines does not. */
	max-width: 60rem;
	margin-block: 0 8px;
	overflow-x: auto;
}

.menu-semaine table {
	width: 100%;
	min-width: 44rem;
	border-collapse: collapse;
	background: var(--wp--preset--color--card);
}

.menu-semaine th,
.menu-semaine td {
	padding-block: 14px;
	padding-inline: 16px;
	border: 1px solid var(--wp--preset--color--line);
	text-align: start;
	vertical-align: top;
	word-break: break-word;
}

.menu-semaine thead th {
	background: var(--wp--preset--color--stone-2);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy);
	/* Never split a heading mid-word: « Accompagnement » is one word. */
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

.menu-semaine tbody th {
	width: 7rem;
	background: var(--wp--preset--color--stone);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

.menu-semaine tbody td {
	color: var(--wp--preset--color--ink-2);
}

.menu-semaine figcaption {
	margin-block-start: 12px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* ------------------------------------------------------------------
 * Inner pages — narrow screens.
 * ------------------------------------------------------------------ */

@media (max-width: 979px) {
	.pgsec-photo {
		grid-template-columns: 1fr;
	}

	.prose .entry-content .gal {
		grid-template-columns: repeat(2, 1fr);
	}

	.gal figure,
	.gal .wide ~ figure {
		grid-column: auto;
	}

	.gal .wide {
		grid-column: 1 / -1;
	}

	.prose .entry-content .co-page {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 639px) {
	.prose .entry-content .cyc,
	.prose .entry-content .gal {
		grid-template-columns: 1fr;
	}

	.gal .wide {
		grid-column: auto;
	}

	.defs > div {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	/* The menu table keeps its own scroller rather than crushing the cells. */
	.menu-semaine th,
	.menu-semaine td {
		padding-block: 12px;
		padding-inline: 12px;
	}

	.menu-semaine tbody th {
		width: 6.5rem;
	}
}

/* ------------------------------------------------------------------
 * Admissions — a note under a call to action, and the two tables the
 * section publishes: the dates of the admission tests and the school
 * calendar. Both are read far more often on a telephone than on a desk,
 * so both keep their own horizontal scroller rather than crushing cells.
 * ------------------------------------------------------------------ */

.prose .entry-content > .note,
.note {
	margin-block: 8px 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* Downloads: the level is the link, the format and weight follow it. */
.prose .entry-content .dls,
.pgsec .dls {
	max-width: 52rem;
	margin-block: 0 8px;
	padding-inline-start: 0;
	list-style: none;
}

.dls li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	justify-content: space-between;
	min-height: 44px;
	padding-block: 12px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

.dls li:last-child {
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.dls .n {
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

a.n {
	text-decoration: none;
}

a.n:hover {
	color: var(--wp--preset--color--bordeaux);
	text-decoration: underline;
}

/* No uppercase transform here: the unit is written "Ko", and "KO" is not it. */
.dls .meta,
.dl-one .meta {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--ink-2);
	white-space: nowrap;
}

.dl-one {
	margin-block: 0 16px;
}

.dl-one a {
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.dl-one a:hover {
	color: var(--wp--preset--color--bordeaux);
	text-decoration: underline;
}

/* The transcription of the admission-test notice: a core table block, so it
   is edited from the page editor like the canteen menu. */
/* Both tables are wider than the 70ch reading measure, so each is given its
   own width in place of the cap. The scroller itself is set on the bare class,
   not only under `.prose`: it is what keeps a wide table inside a narrow
   screen instead of widening the whole page. */
.prose .entry-content > .cal-wrap {
	max-width: 56rem;
}

.prose .entry-content > .dates-tests {
	max-width: 52rem;
}

.dates-tests {
	margin-block: 0 8px;
	overflow-x: auto;
}

.dates-tests table {
	width: 100%;
	min-width: 30rem;
	border-collapse: collapse;
	background: var(--wp--preset--color--card);
}

.dates-tests th,
.dates-tests td {
	padding-block: 14px;
	padding-inline: 16px;
	border: 1px solid var(--wp--preset--color--line);
	text-align: start;
	vertical-align: top;
}

.dates-tests thead th {
	background: var(--wp--preset--color--stone-2);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy);
}

.dates-tests tbody th {
	width: 22rem;
	background: var(--wp--preset--color--stone);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

.dates-tests tbody td {
	color: var(--wp--preset--color--ink-2);
}

.dates-tests figcaption {
	margin-block-start: 12px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* The school calendar: French name over its Arabic name, then the dates.
   The scroller is the wrapper, not the table: a table told to scroll itself
   has to become a block, and stops laying its columns out. */
.cal-wrap {
	margin-block: 0 8px;
	overflow-x: auto;
}

.cal {
	width: 100%;
	min-width: 34rem;
	border-collapse: collapse;
}

.cal th,
.cal td {
	padding-block: 14px;
	padding-inline: 16px;
	border-block-end: 1px solid var(--wp--preset--color--line);
	text-align: start;
	vertical-align: top;
}

.cal thead th {
	border-block-end-width: 2px;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-2);
}

.cal tbody th {
	width: 20rem;
	font-weight: 400;
}

.cal tbody td:last-child {
	width: 5rem;
	white-space: nowrap;
	color: var(--wp--preset--color--ink-2);
}

.cal .n {
	display: block;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

/* The Arabic name sits under the French one; the base .ar rule gives it the
   Arabic face and the right-to-left direction. On the Arabic page the pair is
   mirrored, so `.cal .fr` is the same rule for the French secondary line. */
.cal .ar,
.cal .fr {
	display: block;
	margin-block-start: 2px;
	font-size: 17px;
	color: var(--wp--preset--color--ink-2);
}

.cal tbody td:first-of-type {
	color: var(--wp--preset--color--ink);
}

/* "date lunaire, à confirmer": a reservation, not a decoration. */
.tag {
	display: inline-block;
	margin-block-start: 6px;
	padding-block: 3px;
	padding-inline: 9px;
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 3px;
	background: var(--wp--preset--color--stone-2);
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--bordeaux);
	white-space: nowrap;
}

@media (max-width: 639px) {
	.dls li {
		justify-content: flex-start;
	}

	.cal th,
	.cal td,
	.dates-tests th,
	.dates-tests td {
		padding-block: 12px;
		padding-inline: 12px;
	}

	.cal tbody th,
	.cal tbody td:last-child,
	.dates-tests tbody th {
		width: auto;
	}
}

/* ------------------------------------------------------------------
 * Arabe / RTL — the Arabic pages.
 *
 * The layout is already mirrored by the logical properties the rest of
 * this sheet is written in; what is left is the writing itself. Polylang
 * puts `lang` and `dir` on the root element, so everything below hangs
 * off `html[lang^="ar"]` (the prefix match also catches a regional
 * variant such as `ar-MA`) or off `[dir="rtl"]` where the rule is about
 * direction rather than about Arabic.
 * ------------------------------------------------------------------ */

/*
 * One face for the whole page. IBM Plex Sans Arabic (20 October 2026,
 * replacing Noto Kufi Arabic) is the only family here that draws Arabic;
 * Newsreader and Manrope would fall back to whatever Arabic face the
 * machine happens to have, which is a different school on every visitor's
 * screen. The rule is deliberately blunt — buttons, navigation, table
 * cells and labels included — because a page that mixes two Arabic faces
 * reads as a mistake. Only the Arabic subset of Plex is shipped, so Latin
 * runs inside Arabic text (dates, "BAC", an e-mail address, « 03 ← 18 »)
 * fall through to Manrope, named second in the preset's stack (theme.json)
 * for that reason.
 */
/*
 * The `[lang]` is written three times on purpose. This sheet types its
 * Latin faces on two- and three-class selectors (`.fg .fh`, `.stop .age`,
 * `.wp-block-navigation.main .wp-block-navigation-item__content`), and a
 * single-attribute selector loses to every one of them. Raising the
 * weight here — rather than restating each of those two dozen selectors
 * under `html[lang^="ar"]` — is what keeps a rule added later to this
 * sheet from quietly re-introducing a Latin face on the Arabic pages.
 */
html[lang^="ar"][lang][lang] body,
html[lang^="ar"][lang][lang] body * {
	font-family: var(--wp--preset--font-family--ibm-plex-sans-arabic);
}

/*
 * The exception: the French secondary lines. On a French page the Arabic
 * name sits under the French one (`.ar`); on an Arabic page the pair is
 * mirrored (`.fr`), and that line is French — it keeps the Latin display
 * face rather than borrowing the Arabic one.
 */
html[lang^="ar"][lang][lang] .fr,
html[lang^="ar"][lang][lang] .fr * {
	font-family: var(--wp--preset--font-family--newsreader);
}

/* The hero lockup's French line is the display cut, as on the French home.
   It comes after `.fr` above because it carries both classes. */
html[lang^="ar"][lang][lang] .name-fr {
	font-family: var(--wp--preset--font-family--newsreader);
}

/*
 * IBM Plex Sans Arabic is narrower than Noto Kufi was and its x-height is
 * smaller: Arabic running text is set at 17.5px (the Latin body size)
 * with a line-height of 1.9, so it reads as a first language rather than
 * as a translation (20 October 2026; it was 16.5px / 1.85 under Kufi).
 */
html[lang^="ar"] body {
	font-size: 17.5px;
	line-height: 1.9;
}

/* Arabic weights: 400 body, 500 headings and supporting lines (the theme's
   headings are 500 already), 600 where the Latin side is bold. */
html[lang^="ar"][lang][lang] :is(b, strong) {
	font-weight: 600;
}

/* The lede keeps its own size; only its leading is opened up. */
html[lang^="ar"] .lede,
html[lang^="ar"] .hero .lede {
	line-height: 1.7;
}

/*
 * Headings: the Latin scale is kept, the leading is not. A line-height
 * of 1 was drawn for Latin display faces' short descenders; Arabic hangs below the
 * baseline and would collide line to line.
 */
html[lang^="ar"] h1,
html[lang^="ar"] h2,
html[lang^="ar"] h3,
html[lang^="ar"] h4 {
	line-height: 1.4;
}

html[lang^="ar"] .hero .name-ar,
html[lang^="ar"] .hero .name-fr {
	line-height: 1.35;
}

/*
 * No synthetic italic on Arabic. The four italic passages of the sheet
 * (the establishment line, the age of a cycle, the motto, a pulled
 * quotation) are set in Plex Arabic upright; a slanted Arabic is a browser's
 * invention, not a cut of the typeface.
 */
html[lang^="ar"] .hero .est,
html[lang^="ar"] .stop .age,
html[lang^="ar"] .motto-quote,
html[lang^="ar"] .pgquote {
	font-style: normal;
}

/*
 * The language switcher is a fixed sequence — FR · ع · EN — not a
 * sentence, so it reads the same way round in both directions. This is
 * `direction`, a text-direction property, not a physical box property:
 * the group's own box still follows the logical flow of the bar.
 */
[dir="rtl"] .lang {
	direction: ltr;
}

/* ------------------------------------------------------------------
 * Galerie défilante — the « Défilante » style of the core gallery
 * block, used by the news articles. A horizontal, swipeable strip:
 * one photograph at a time on a phone, a little over one on a wide
 * screen so the next one is visibly there to be reached.
 *
 * Scroll snapping only, no script: the strip is a scroll container,
 * each photograph a snap point. Swipe on a touch screen, trackpad or
 * shift-wheel on a desktop, and the arrow keys once the strip has
 * focus — which is why it is focusable and shows a focus ring. With
 * the style not applied the gallery stays core's ordinary grid, and
 * with CSS unavailable it is a plain column of photographs.
 * ------------------------------------------------------------------ */

.wp-block-gallery.is-style-defilante {
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0;
	padding-block-end: 8px;
	/* The reading column is 70ch; the strip is allowed the full wrap. */
	max-width: none;
	-ms-overflow-style: none;
	scrollbar-width: none;
	scroll-behavior: smooth;
}

/* Hidden where it can be hidden — the strip still scrolls by swipe,
 * trackpad and keyboard, and the photographs themselves show that it
 * continues past the edge. */
.wp-block-gallery.is-style-defilante::-webkit-scrollbar {
	display: none;
}

.wp-block-gallery.is-style-defilante:focus-visible {
	outline: 2px solid var(--ram-focus);
	outline-offset: 2px;
}

.wp-block-gallery.is-style-defilante > figure {
	flex: 0 0 min(100%, 40rem);
	margin: 0;
	scroll-snap-align: center;
}

.wp-block-gallery.is-style-defilante > figure > img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

/* A caption inside the strip reads as a line under its own photograph. */
.wp-block-gallery.is-style-defilante > figure > figcaption {
	margin-block-start: 8px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-2);
}

/* A moved viewport is a movement: when the reader has asked for none,
 * the strip jumps rather than glides. */
@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.is-style-defilante {
		scroll-behavior: auto;
	}
}

/* ------------------------------------------------------------------
 * « Voir la publication » — the discreet line at the foot of an
 * article pointing at the same news on the school's social account.
 * A line of text with a glyph, never a button: the article is what
 * matters on this page.
 * ------------------------------------------------------------------ */

.post-social {
	margin-block-start: 28px;
	padding-block-start: 16px;
	border-block-start: 1px solid var(--wp--preset--color--line-2);
	font-size: var(--wp--preset--font-size--small);
}

.post-social a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--wp--preset--color--ink-2);
	text-decoration: none;
}

.post-social a:hover,
.post-social a:focus-visible {
	color: var(--wp--preset--color--bordeaux);
	text-decoration: underline;
}

.post-social svg {
	inline-size: 18px;
	block-size: 18px;
	flex: 0 0 auto;
	fill: currentColor;
}

/* Facebook then Instagram: two lines, one rule above the pair. */
.post-social + .post-social {
	margin-block-start: 6px;
	padding-block-start: 0;
	border-block-start: 0;
}

/* ------------------------------------------------------------------
 * L'article d'actualité — mise en page propre à `single.html`.
 *
 * Les photographies d'une actualité arrivent de téléphones et d'appareils
 * différents : jamais le même format, jamais la même hauteur. La page les
 * ramène donc toutes à un même cadre paysage 3/2 recadré au centre, plutôt
 * que de laisser chaque photo imposer sa taille. Le secrétariat n'a rien à
 * préparer : il dépose ses photos, la page s'occupe du cadrage.
 *
 * La colonne de texte est centrée sous la photo de une, et légèrement plus
 * large et plus grande que sur les pages courantes : un article se lit d'une
 * traite, et la page ne doit pas paraître vide autour de lui.
 * ------------------------------------------------------------------ */

/* La photo de une occupe toute la largeur utile et se centre d'elle-même. */
.article > .prose-figure {
	max-width: none;
	margin-block-end: 36px;
}

.article > .prose-figure img {
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: center;
}

/* Le texte : centré sous la photo, mesure un peu plus généreuse. */
.article .entry-content > * {
	max-width: 72ch;
	margin-inline: auto;
}

.article .entry-content > p {
	font-size: 19px;
	line-height: 1.75;
	margin-block: 0 22px;
}

/* La galerie défilante, elle, garde toute la largeur de la page. */
.article .entry-content > .wp-block-gallery.is-style-defilante,
.article .entry-content > .wp-block-image {
	max-width: none;
	margin-block: 36px;
}

.article .entry-content > .wp-block-image img {
	inline-size: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

/* Deux vignettes de même taille dans la fenêtre, une troisième qui dépasse :
 * c'est ce débord qui dit que la bande continue. */
.article .entry-content > .wp-block-gallery.is-style-defilante > figure {
	flex: 0 0 min(100%, 34rem);
}

.article .entry-content > .post-social {
	max-width: 72ch;
	margin-inline: auto;
}

@media (max-width: 639px) {
	.article .entry-content > p {
		font-size: 17px;
	}
}

/* ------------------------------------------------------------------
 * « À lire aussi » — le pied d'un article.
 *
 * Une actualité se lit en une minute : arrivé en bas, le parent n'a nulle
 * part où aller. Trois autres actualités et le chemin vers la page qui les
 * réunit prolongent la visite, sans jamais reproposer l'article ouvert —
 * c'est le filtre `query_loop_block_query_vars` qui l'écarte.
 * ------------------------------------------------------------------ */

.suite {
	margin-block-start: 64px;
	padding-block: 44px 76px;
	border-block-start: 1px solid var(--wp--preset--color--line);
}

/* Plus discret que le titre de l'article : c'est une invitation à continuer,
 * pas un second sujet. */
.suite .s-head h2 {
	margin-block-end: 26px;
	font-size: 28px;
}

.suite-toutes {
	margin-block-start: 34px;
	font-size: var(--wp--preset--font-size--small);
}

.suite-toutes a {
	color: var(--wp--preset--color--bordeaux);
	text-decoration: none;
	border-block-end: 1px solid currentColor;
	padding-block-end: 2px;
}

.suite-toutes a:hover,
.suite-toutes a:focus-visible {
	color: var(--wp--preset--color--ink);
}

/* Le gabarit d'article n'est pas une page d'accueil : les marges que les
 * sections de l'accueil neutralisent avec `.rm-section` sont ici portées par
 * la grille elle-même. */
.suite .news > li {
	margin-block-start: 0;
}
