/* ════════════════════════════════════════════════════════════════
   Comité Exécutif des Membres (CEM) — /fr/gt/cem/ only.

   Every selector sits under .gt-page-cem — the class the page
   template passes to inc/partials/teamup-header.php as
   $teamup_main_class, landing on <main>. Nothing here can apply to
   any other page, and the file is only enqueued on this one
   (inc/gt-cem.php).

   The page reuses the GT section's own components wherever they
   already exist (.gt-wrap, .gt-eyebrow, h1/h2/h3, .gt-lede,
   .gt-sec, .gt-facts, .gt-person-media/.gt-pb/.gt-r/.gt-n/.gt-d/
   .gt-e, .gt-cta-band, .gt-btn) — see assets/css/gt.css. Only what
   that set doesn't cover lives here: the cellule block, the
   non-link member card (gt.css styles a.gt-person only), the
   circular initials fallback and the perks grid.

   Colours: the three cellule accents are the site's own tokens
   (--accent-deep for Académique) plus two deeper siblings of the
   existing pastel avatar tones (--avatar-4 slate, --avatar-2 sage),
   so each cellule reads as its own without leaving the palette.
   Accent values are never used for text — contrast on white is too
   low — only for dots, rules and tile/badge fills behind var(--fg).
   ════════════════════════════════════════════════════════════════ */

.gt-page-cem {
	--cem-accent: var(--accent-deep);
	--cem-soft: var(--accent-soft);
	--cem-tile: var(--avatar-6);
}

/* Per-cellule palettes. Set on the cellule <article>, inherited by
   everything inside it (badge fill, initials tile, measured rule). */
.gt-page-cem .cem-c-academique {
	--cem-accent: #E5A816;
	--cem-soft: #FFF4CC;
	--cem-tile: #E5D5A8;
}
.gt-page-cem .cem-c-communication {
	--cem-accent: #5D7593;
	--cem-soft: #E8EEF5;
	--cem-tile: #C8D2DD;
}
.gt-page-cem .cem-c-communaute {
	--cem-accent: #6B8A63;
	--cem-soft: #E9F0E7;
	--cem-tile: #D4DCD0;
}

/* ─── hero ─── */
/* The closing signature is a single short line, but gt.css caps every
   h2 at 20ch — which broke "« Tous ensemble. Connectés. »" across two
   lines. It gets the full column and wraps only on a narrow phone. */
.gt-page-cem .cem-close h2 {
	max-width: none;
	text-wrap: balance;
}

.gt-page-cem .cem-tagline {
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 600;
	letter-spacing: -0.022em;
	line-height: 1.25;
	margin: 26px 0 0;
	max-width: 24ch;
}
.gt-page-cem .cem-hero .gt-hero-sub {
	margin-top: 18px;
}
/* ─── logo placeholders (used until the PNGs are in the library) ─── */
.gt-page-cem .cem-logo-ph {
	aspect-ratio: 1 / 1;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	background: var(--bg-warm);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	padding: 12px;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--fg-subtle);
	line-height: 1.4;
}
.gt-page-cem .cem-logo-ph b {
	color: var(--fg-muted);
	font-weight: 500;
	word-break: break-word;
}

/* ─── cellules ─── */
.gt-page-cem .cem-cellule {
	padding: 48px 0 8px;
	border-top: 1px solid var(--border);
}
.gt-page-cem .cem-cellule:first-of-type {
	border-top: none;
	padding-top: 8px;
}
.gt-page-cem .cem-cellule-head {
	display: grid;
	grid-template-columns: 104px 1fr;
	gap: 28px;
	align-items: start;
}
.gt-page-cem .cem-cellule-mark {
	width: 104px;
}
.gt-page-cem .cem-cellule-mark img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}
.gt-page-cem .cem-cellule h3 {
	font-size: clamp(21px, 2.4vw, 26px);
	letter-spacing: -0.022em;
	display: flex;
	align-items: center;
	gap: 10px;
}
.gt-page-cem .cem-cellule h3::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--cem-accent);
	flex-shrink: 0;
}
.gt-page-cem .cem-mission {
	font-size: 16.5px;
	color: var(--fg-muted);
	line-height: 1.6;
	margin: 12px 0 0;
	max-width: 62ch;
}
/* ─── objectives (numbered, two columns) ─── */
.gt-page-cem .cem-block-label {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	margin: 36px 0 4px;
}
.gt-page-cem .cem-objectives {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: cem-obj;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 40px;
}
.gt-page-cem .cem-objectives li {
	counter-increment: cem-obj;
	display: grid;
	grid-template-columns: 26px 1fr;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--border-soft);
	font-size: 15px;
	line-height: 1.55;
	color: var(--fg-muted);
}
.gt-page-cem .cem-objectives li::before {
	content: counter(cem-obj, decimal-leading-zero);
	font-family: var(--mono);
	font-size: 11px;
	color: var(--fg-subtle);
	padding-top: 4px;
	font-variant-numeric: tabular-nums;
}

/* ─── member cards ───
   gt.css styles a.gt-person (the Équipe grid links to profiles);
   CEM cards are not links, so the card shell is redeclared here
   while the inner blocks (.gt-person-media, .gt-pb, .gt-r, .gt-n,
   .gt-d, .gt-e) reuse gt.css's rules unchanged. */
.gt-page-cem .cem-people {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 22px;
}
.gt-page-cem .cem-person {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.gt-page-cem .cem-person .gt-person-media {
	background: var(--bg-warm);
}
.gt-page-cem .cem-person .gt-pb {
	padding: 22px;
}
.gt-page-cem .cem-person .gt-r::before {
	background: var(--cem-accent);
}
.gt-page-cem .cem-person .gt-r {
	margin-bottom: 12px;
}
.gt-page-cem .cem-lead .gt-r {
	/* .gt-r is display:flex in gt.css, so the pill needs an explicit
	   shrink-to-fit width — align-self does nothing inside .gt-pb. */
	width: fit-content;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--cem-soft);
	color: var(--fg);
}
.gt-page-cem .cem-person .gt-e {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--border-soft);
	display: flex;
	align-items: center;
	gap: 7px;
}
.gt-page-cem .cem-person .gt-e::before {
	content: "";
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--border-strong);
	flex-shrink: 0;
}

/* circular initials fallback, in the cellule's own tone */
.gt-page-cem .cem-initials {
	width: 42%;
	max-width: 132px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var(--cem-tile);
	display: grid;
	place-items: center;
	font-family: var(--mono);
	font-weight: 500;
	font-size: clamp(20px, 3.4vw, 30px);
	letter-spacing: 0.03em;
	color: var(--fg);
	box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.05);
}

/* ─── responsive ─── */
@media (max-width: 980px) {
	.gt-page-cem .cem-people {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 900px) {
	.gt-page-cem .cem-objectives {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 700px) {
	.gt-page-cem .cem-cellule-head {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.gt-page-cem .cem-cellule-mark,
	.gt-page-cem .cem-cellule-head .cem-logo-ph {
		width: 84px;
	}
}
@media (max-width: 640px) {
	.gt-page-cem .cem-people {
		grid-template-columns: 1fr;
	}
	/* The initials tile is a circle inside the card, not the grid —
	   these two were briefly merged into one selector, which handed
	   the whole card grid a width of 38% on phones. */
	.gt-page-cem .cem-initials {
		width: 38%;
	}
}

/* ════════════════════════════════════════════════════════════════
   MEMBER PROFILE — /fr/gt/cem/{slug}/ and /gt/cem/{slug}/

   Not a CV layout. The order is who → what they can do → what they
   have done → where they have been, and the weight follows: the
   skills are the widest thing on the page, the work is a card grid,
   and the dates are a quiet two-column rail at the end.

   Each page inherits its member's cellule palette (--cem-accent /
   --cem-soft), set by .cem-c-* on the article.
   ════════════════════════════════════════════════════════════════ */

.gt-page-cem-profile .cem-profile-back {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--fg-subtle);
	margin: 0 0 40px;
}
.gt-page-cem-profile .cem-profile-back a { color: var(--fg-muted); }
.gt-page-cem-profile .cem-profile-back a:hover { color: var(--fg); }
.gt-page-cem-profile .cem-back-foot { margin: 48px 0 0; }

/* ─── 1. identity band ─── */
.gt-page-cem-profile .cem-hero-band {
	padding: 56px 0 0;
	background: linear-gradient(180deg, var(--cem-soft) 0%, var(--bg) 78%);
}
.gt-page-cem-profile .cem-id {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 48px;
	align-items: center;
}
.gt-page-cem-profile .cem-id-photo {
	aspect-ratio: 1 / 1;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--bg-warm);
	box-shadow: 0 24px 48px -32px rgba(10, 10, 10, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}
.gt-page-cem-profile .cem-id-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.gt-page-cem-profile .cem-id-text .gt-r {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fg);
	background: var(--bg);
	border: 1px solid var(--border);
	padding: 7px 14px;
	border-radius: 999px;
}
.gt-page-cem-profile .cem-id-text .gt-r::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cem-accent);
	flex-shrink: 0;
}
.gt-page-cem-profile .cem-id-text h1 {
	font-size: clamp(32px, 4.4vw, 54px);
	letter-spacing: -0.035em;
	line-height: 1.04;
	margin: 18px 0 0;
	max-width: 18ch;
}
.gt-page-cem-profile .cem-id-headline {
	font-size: 18px;
	font-weight: 500;
	color: var(--fg);
	margin: 14px 0 0;
}
.gt-page-cem-profile .cem-id-summary {
	font-size: 16.5px;
	line-height: 1.65;
	color: var(--fg-muted);
	margin: 16px 0 0;
	max-width: 60ch;
}
.gt-page-cem-profile .cem-id-links { margin: 26px 0 0; }

/* LinkedIn is a mark, not a sentence: one icon, sized like a control. */
.gt-page-cem-profile .cem-in {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-strong);
	color: var(--fg);
	background: var(--bg);
	transition: background 0.25s var(--ease), color 0.25s var(--ease),
		border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.gt-page-cem-profile a.cem-in:hover,
.gt-page-cem-profile a.cem-in:focus-visible {
	background: var(--cem-accent, var(--fg));
	border-color: var(--cem-accent, var(--fg));
	color: var(--bg);
	transform: translateY(-1px);
}
.gt-page-cem-profile .cem-in-glyph { display: block; }

/* No profile published yet — the same shape, visibly unfilled. */
.gt-page-cem-profile .cem-in-ph {
	border-style: dashed;
	border-color: var(--border);
	color: var(--fg-subtle);
	background: transparent;
}

/* four figures from the record, straddling the band's fold */
.gt-page-cem-profile .cem-facts {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin: 56px 0 0;
}
.gt-page-cem-profile .cem-fact {
	background: var(--bg);
	padding: 24px 22px;
}
.gt-page-cem-profile .cem-fact-v {
	/* These four slots now carry phrases ("Sciences de la vie et de la
	   Terre"), not two-word figures, so the type is set to wrap well. */
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.35;
	text-wrap: balance;
}
.gt-page-cem-profile .cem-fact-k {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	margin-top: 10px;
}

/* Section headings are plain labels, so they sit on their own — no
   eyebrow above them to leave room for. */
.gt-page-cem-profile .cem-sec-head { margin-bottom: 32px; }
.gt-page-cem-profile .cem-sec-head h2 {
	font-size: clamp(22px, 2.6vw, 30px);
	letter-spacing: -0.026em;
	margin: 0;
}

/* ─── 2. skills, the centrepiece ─── */
.gt-page-cem-profile .cem-craft-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px 56px;
}
.gt-page-cem-profile .cem-craft-group h3 {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	padding-bottom: 14px;
	border-bottom: 1px solid var(--border);
}
.gt-page-cem-profile .cem-chips {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.gt-page-cem-profile .cem-chips li {
	font-size: 15px;
	line-height: 1.2;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--cem-soft);
	color: var(--fg);
	border: 1px solid transparent;
}
.gt-page-cem-profile .cem-chips-plain li {
	background: transparent;
	border-color: var(--border);
	color: var(--fg-muted);
}

/* ─── 3. work ─── */
.gt-page-cem-profile .cem-work-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}
.gt-page-cem-profile .cem-work-card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px 26px 30px;
	position: relative;
}
.gt-page-cem-profile .cem-work-num {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.07em;
	color: var(--cem-accent);
	font-variant-numeric: tabular-nums;
}
.gt-page-cem-profile .cem-work-card h3 {
	font-size: 19px;
	letter-spacing: -0.018em;
	margin: 14px 0 0;
}
.gt-page-cem-profile .cem-work-card p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--fg-muted);
	margin: 10px 0 0;
}

/* ─── 4. background, deliberately quiet ─── */
.gt-page-cem-profile .cem-track-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 40px 48px;
}
.gt-page-cem-profile .cem-track-col h3 {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 4px;
}
.gt-page-cem-profile .cem-track-row {
	padding: 14px 0;
	border-bottom: 1px solid var(--border-soft);
	display: grid;
	gap: 2px;
}
.gt-page-cem-profile .cem-track-when {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	font-variant-numeric: tabular-nums;
}
.gt-page-cem-profile .cem-track-what {
	font-size: 15.5px;
	font-weight: 500;
	letter-spacing: -0.01em;
}
.gt-page-cem-profile .cem-track-org {
	font-size: 14px;
	color: var(--fg-muted);
}
.gt-page-cem-profile .cem-interests {
	margin: 44px 0 0;
	padding-top: 22px;
	border-top: 1px solid var(--border);
	font-size: 15px;
	color: var(--fg-muted);
}
.gt-page-cem-profile .cem-interests span {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fg-subtle);
	margin-right: 12px;
}

@media (max-width: 900px) {
	.gt-page-cem-profile .cem-id {
		grid-template-columns: 180px 1fr;
		gap: 32px;
	}
	.gt-page-cem-profile .cem-facts {
		grid-template-columns: repeat(2, 1fr);
	}
	.gt-page-cem-profile .cem-work-grid,
	.gt-page-cem-profile .cem-craft-grid,
	.gt-page-cem-profile .cem-track-grid {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 600px) {
	.gt-page-cem-profile .cem-id {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.gt-page-cem-profile .cem-id-media { max-width: 200px; }
	.gt-page-cem-profile .cem-facts { grid-template-columns: 1fr; }
}
