/* Campus Startups — aligné sur la charte du site (Red Hat Display, marine #052c54, bleu #58acde). */

.cst-container,
.cst-directory,
.cst-related,
.cst-form {
	--cst-navy: #052c54;
	--cst-blue: #58acde;
	--cst-sky: #7abde5;
	--cst-muted: #7c89a0;
	--cst-line: #e2e8f0;
	--cst-soft: #f4f8fb;
	--cst-radius: 14px;
	font-family: inherit;
	color: var(--cst-navy);
	box-sizing: border-box;
}
.cst-container *,
.cst-directory *,
.cst-related *,
.cst-form * { box-sizing: border-box; }

.cst-container { max-width: 1200px; margin: 0 auto; padding: 32px 24px 72px; }
/* L'en-tête TagDiv est en surimpression (overlay) : on réserve sa hauteur. */
.cst-archive,
.cst-single { padding-top: 110px; }

/* ── Boutons, badges ─────────────────────────────────────────────── */
.cst-button {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 22px; border-radius: 999px; border: 1px solid var(--cst-navy);
	background: var(--cst-navy); color: #fff !important; font-weight: 600; font-size: 14px;
	text-decoration: none; cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.cst-button:hover { background: var(--cst-blue); border-color: var(--cst-blue); }
.cst-button--ghost { background: transparent; color: var(--cst-navy) !important; border-color: var(--cst-line); }
.cst-button--ghost:hover { background: transparent; border-color: var(--cst-blue); color: var(--cst-blue) !important; }

.cst-badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	background: color-mix(in srgb, var(--cst-accent, #58acde) 14%, white);
	color: var(--cst-navy); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.cst-chip {
	display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--cst-line);
	font-size: 12px; color: var(--cst-muted);
}
.cst-chip--where::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--cst-accent, #58acde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cst-accent, #58acde) 25%, transparent); vertical-align: 1px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ── Annuaire : en-tête ──────────────────────────────────────────── */
.cst-hero { max-width: 820px; margin: 8px 0 32px; }
.cst-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cst-blue); }
.cst-hero-title { margin: 0 0 16px; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; font-weight: 800; color: var(--cst-navy); }
.cst-hero-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--cst-muted); }
.cst-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; padding: 0; }
.cst-stats div { padding: 14px 0 0; border-top: 2px solid var(--cst-navy); }
.cst-stats dt { font-size: 13px; color: var(--cst-muted); margin: 6px 0 0; order: 2; }
.cst-stats dd { margin: 0; font-size: 34px; font-weight: 800; line-height: 1; color: var(--cst-navy); }
.cst-stats div { display: flex; flex-direction: column-reverse; }

/* ── Plan neuronal ───────────────────────────────────────────────── */
.cst-plan-wrap { position: relative; margin: 0 0 32px; }
.cst-plan { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 20px 50px -24px rgba(5, 44, 84, .55); }
.cst-plan-hint { margin: 10px 2px 0; font-size: 13px; color: var(--cst-muted); }

.cst-plan .cst-grid-line { stroke: rgba(122, 189, 229, .06); stroke-width: 1; }
.cst-plan .cst-streets path { fill: none; stroke: rgba(122, 189, 229, .16); stroke-width: 1; stroke-dasharray: 2 6; }
.cst-plan .cst-streets text { fill: rgba(191, 227, 246, .45); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cst-plan .cst-streets .cst-lake { fill: rgba(122, 189, 229, .7); text-transform: none; letter-spacing: .02em; font-size: 13px; }
.cst-plan .cst-compass path { fill: rgba(191, 227, 246, .6); }
.cst-plan .cst-compass text { font-size: 11px; }

.cst-plan .cst-footprint { fill: rgba(88, 172, 222, .035); stroke: rgba(122, 189, 229, .32); stroke-width: 1; transition: fill .25s ease, stroke .25s ease; }
.cst-plan .cst-glass { fill: none; stroke: rgba(191, 227, 246, .22); stroke-width: 1; stroke-dasharray: 5 5; }

.cst-plan .cst-axon { fill: none; stroke: rgba(122, 189, 229, .55); stroke-width: 2.2; stroke-linecap: round; }
.cst-plan .cst-axon.is-far { stroke-width: 1.2; stroke-dasharray: 1 7; stroke: rgba(122, 189, 229, .5); }
.cst-plan .cst-pulse { fill: none; stroke: #bfe3f6; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 10 400; stroke-dashoffset: 410; opacity: .9; animation: cst-pulse 4.2s linear infinite; }
@keyframes cst-pulse { to { stroke-dashoffset: 0; } }

.cst-plan .cst-dendrites path { fill: none; stroke: rgba(122, 189, 229, .32); stroke-width: 1.1; stroke-linecap: round; transition: stroke .25s ease; }
.cst-plan .cst-synapse-links path { fill: none; stroke: rgba(191, 227, 246, .6); stroke-width: 1.4; transition: opacity .25s ease; }

.cst-plan .cst-soma { cursor: pointer; outline: none; }
.cst-plan--mini .cst-soma { cursor: default; }
.cst-plan .cst-soma-halo { fill: rgba(88, 172, 222, .1); stroke: rgba(122, 189, 229, .3); stroke-width: 1; transition: all .25s ease; }
.cst-plan .cst-soma-core { stroke: rgba(255, 255, 255, .5); stroke-width: 1; }
.cst-plan .cst-soma-code { fill: #031d38; font-size: 11px; font-weight: 800; letter-spacing: .02em; pointer-events: none; }
.cst-plan .cst-soma.has-startups .cst-soma-halo { fill: rgba(88, 172, 222, .18); stroke: rgba(191, 227, 246, .55); }
.cst-plan .cst-soma:hover .cst-soma-halo,
.cst-plan .cst-soma:focus-visible .cst-soma-halo,
.cst-plan .cst-soma.is-active .cst-soma-halo,
.cst-plan .cst-soma.is-highlight .cst-soma-halo { fill: rgba(191, 227, 246, .3); stroke: #fff; stroke-width: 2; }

.cst-plan .cst-synapse { cursor: pointer; outline: none; }
.cst-plan .cst-synapse-glow { opacity: .85; transition: opacity .25s ease; }
.cst-plan .cst-synapse-core { fill: #fff; transition: r .2s ease; }
.cst-plan .cst-synapse:hover .cst-synapse-core,
.cst-plan .cst-synapse:focus-visible .cst-synapse-core { r: 6; }
.cst-plan .cst-synapse.is-highlight .cst-synapse-glow { animation: cst-beat 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes cst-beat { 50% { opacity: .4; transform: scale(1.5); } }

/* Mise en retrait de ce qui ne correspond pas aux filtres / au survol */
.cst-plan .is-dim { opacity: .12; }
.cst-plan.has-highlight .cst-soma:not(.is-highlight) .cst-soma-halo { opacity: .6; }
.cst-plan--mini { border-radius: 12px; box-shadow: none; }
.cst-plan--mini .cst-synapse:not(.is-highlight) { opacity: .35; }

.cst-tooltip {
	position: absolute; z-index: 5; max-width: 260px; padding: 10px 14px; border-radius: 10px;
	background: #fff; color: var(--cst-navy); box-shadow: 0 12px 30px -10px rgba(3, 29, 56, .5);
	font-size: 13px; line-height: 1.4; pointer-events: none; transform: translate(-50%, calc(-100% - 14px));
}
.cst-tooltip strong { display: block; font-size: 15px; }
.cst-tooltip span { display: block; color: var(--cst-muted); }
.cst-tooltip em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--cst-blue); }

/* ── Filtres ─────────────────────────────────────────────────────── */
.cst-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.cst-search { position: relative; flex: 1 1 280px; color: var(--cst-muted); }
.cst-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.cst-search input,
.cst-filter select {
	width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--cst-line); border-radius: 999px;
	font: inherit; font-size: 14px; color: var(--cst-navy); background: #fff; outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.cst-search input { padding-left: 44px; }
/* Le thème force box-sizing: content-box sur input[type=search]. */
.cst-search input,
.cst-filter select { box-sizing: border-box !important; max-width: 100%; margin: 0; }
.cst-filter { flex: 0 1 190px; }
.cst-filter select { appearance: none; padding-right: 36px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23052c54' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center; }
.cst-filter select.is-set { border-color: var(--cst-navy); font-weight: 600; }
.cst-search input:focus,
.cst-filter select:focus { border-color: var(--cst-blue); box-shadow: 0 0 0 3px rgba(88, 172, 222, .18); }
.cst-reset { border: 0; background: none; color: var(--cst-blue); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px; }
.cst-count { margin: 0 0 20px; font-size: 14px; color: var(--cst-muted); }

/* ── Cartes ──────────────────────────────────────────────────────── */
.cst-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cst-card { position: relative; }
.cst-card[hidden] { display: none; }
.cst-card-link {
	display: flex; flex-direction: column; height: 100%; padding: 22px; border: 1px solid var(--cst-line); border-radius: var(--cst-radius);
	background: #fff; color: inherit; text-decoration: none; overflow: hidden; position: relative;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cst-card-link::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--cst-accent, #58acde); }
.cst-card-link:hover,
.cst-card.is-hover .cst-card-link { border-color: color-mix(in srgb, var(--cst-accent) 45%, white); box-shadow: 0 16px 34px -20px rgba(5, 44, 84, .45); transform: translateY(-2px); }
.cst-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cst-card-logo { width: 56px; height: 56px; flex: 0 0 56px; }
.cst-card-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.cst-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.cst-where { font-size: 12px; color: var(--cst-muted); }
.cst-card-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--cst-navy); transition: color .2s ease; }
.cst-card-link:hover .cst-card-title { color: var(--cst-blue); }
.cst-card-tagline { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--cst-muted); }
.cst-card-extra { margin: -8px 0 16px; font-size: 13px; font-weight: 700; color: var(--cst-blue); }
.cst-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--cst-line); font-size: 12px; color: var(--cst-muted); }
.cst-dots { display: inline-flex; gap: 5px; }
.cst-dot { width: 10px; height: 10px; border-radius: 50%; }

.cst-monogram {
	display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; border-radius: 12px;
	background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--cst-accent) 55%, white), var(--cst-accent) 60%, color-mix(in srgb, var(--cst-accent) 60%, #031d38));
	color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .04em;
}

.cst-empty { padding: 40px; text-align: center; color: var(--cst-muted); }

.cst-cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: 48px; padding: 28px 32px; border-radius: 18px; background: var(--cst-soft); }
.cst-cta h2 { margin: 0 0 4px; font-size: 22px; color: var(--cst-navy); }
.cst-cta p { margin: 0; color: var(--cst-muted); }

/* ── Bloc "startups liées" (fiches scientifiques / recherches) ──── */
.cst-related { margin: 48px 0 0; }
.cst-related-title { margin: 0 0 20px; font-size: 30px; font-weight: 700; color: var(--cst-navy); line-height: 1.2; }

/* ── Fiche ───────────────────────────────────────────────────────── */
.cst-breadcrumb { font-size: 12px; color: var(--cst-muted); margin-bottom: 24px; }
.cst-breadcrumb a { color: var(--cst-muted); text-decoration: none; }
.cst-breadcrumb a:hover { color: var(--cst-blue); }

.cst-single-hero { display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: center; padding: 32px; border-radius: 20px; margin-bottom: 40px;
	background: linear-gradient(120deg, color-mix(in srgb, var(--cst-accent) 10%, white), #fff 65%); border: 1px solid var(--cst-line); }
.cst-single-logo { width: 140px; height: 140px; }
.cst-single-logo img { width: 140px; height: 140px; object-fit: contain; border-radius: 18px; background: #fff; }
.cst-single-logo .cst-monogram { font-size: 44px; border-radius: 24px; }
.cst-single-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cst-single-title { margin: 0 0 8px; font-size: clamp(32px, 4.5vw, 48px); line-height: 1.08; font-weight: 800; color: var(--cst-navy) !important; }
.cst-single-tagline { margin: 0 0 20px; font-size: 19px; line-height: 1.5; color: var(--cst-muted); }
.cst-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cst-single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.cst-section { margin: 0 0 44px; }
.cst-section h2 { margin: 0 0 16px; font-size: 26px; font-weight: 700; color: var(--cst-navy) !important; line-height: 1.2; }
.cst-intro { font-size: 18px; line-height: 1.7; color: #1d3a5a; }
.cst-intro p,
.cst-richtext p,
.cst-richtext li { font-size: inherit !important; line-height: inherit !important; color: inherit; }
.cst-demo-flag { margin: 0 0 16px; padding: 10px 16px; border-radius: 10px; background: #fff6e0; color: #7a5300; font-size: 13px; line-height: 1.5; }
.cst-container--platform { padding-top: 0; }
.cst-richtext { font-size: 16px; line-height: 1.75; color: #34495e; }
.cst-richtext ul { padding-left: 1.2em; }

.cst-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 0; }
.cst-figures div { padding: 20px; border-radius: var(--cst-radius); background: var(--cst-soft); }
.cst-figures dd { margin: 0 0 4px; font-size: 32px; font-weight: 800; color: var(--cst-accent); line-height: 1.1; }
.cst-figures dt { font-size: 14px; color: var(--cst-muted); line-height: 1.4; }

.cst-people, .cst-team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cst-person, .cst-team li { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--cst-line); border-radius: var(--cst-radius); text-decoration: none; color: inherit; transition: border-color .2s ease; }
.cst-person:hover { border-color: var(--cst-blue); }
.cst-person-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; overflow: hidden; background: var(--cst-soft); }
.cst-person-photo img { width: 100%; height: 100%; object-fit: cover; }
.cst-person-placeholder { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 50% 38%, #cfe5f3 0 22%, transparent 23%), radial-gradient(circle at 50% 105%, #cfe5f3 0 45%, transparent 46%), var(--cst-soft); }
.cst-person-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cst-person-text strong { font-size: 16px; color: var(--cst-navy); }
.cst-person-text a { color: var(--cst-navy); text-decoration: none; }
.cst-person-role { color: var(--cst-blue); font-weight: 600; }
.cst-person-note { color: var(--cst-muted); font-size: 13px; }

.cst-research { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cst-research-card { display: block; text-decoration: none; color: inherit; }
.cst-research-img { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--cst-soft); margin-bottom: 10px; }
.cst-research-img img { width: 100%; height: 100%; object-fit: cover; }
.cst-research-title { font-size: 17px; font-weight: 700; color: var(--cst-navy); line-height: 1.35; transition: color .2s ease; }
.cst-research-card:hover .cst-research-title { color: var(--cst-blue); }

.cst-pubs { margin: 0; padding-left: 1.1em; }
.cst-pubs li { margin-bottom: 10px; line-height: 1.5; }
.cst-pubs a { color: var(--cst-navy); font-weight: 600; text-decoration: none; }
.cst-pubs a:hover { color: var(--cst-blue); }
.cst-pubs em { color: var(--cst-muted); font-size: 14px; }

.cst-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid color-mix(in srgb, var(--cst-accent) 40%, white); }
.cst-timeline li { position: relative; display: flex; gap: 16px; padding: 0 0 18px 14px; font-size: 15px; line-height: 1.5; color: #34495e; }
.cst-timeline li::before { content: ""; position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--cst-accent); }
.cst-timeline-year { flex: 0 0 48px; font-weight: 800; color: var(--cst-navy); }

.cst-single-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.cst-side-box { padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 10px 34px -18px rgba(5, 44, 84, .35); }
.cst-side-box h2 { margin: 0 0 14px; font-size: 18px !important; font-weight: 700; color: var(--cst-navy) !important; }
.cst-side-plan .cst-plan { margin: 0 -6px 12px; width: calc(100% + 12px); }
.cst-side-where { margin: 0; font-size: 14px; color: var(--cst-muted); line-height: 1.5; }
.cst-side-where strong { color: var(--cst-navy); }
.cst-side-list { margin: 0; font-size: 14px; line-height: 1.6; color: var(--cst-navy); }
.cst-terms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cst-terms a { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--cst-term) !important; text-decoration: none; }
.cst-terms a::before { content: ""; flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--cst-term); }
.cst-terms a:hover { text-decoration: underline; }
.cst-back { margin: 24px 0 0; }
.cst-back a { color: var(--cst-blue); font-weight: 600; text-decoration: none; }

/* ── Formulaires ─────────────────────────────────────────────────── */
.cst-form { max-width: 900px; }
.cst-form .acf-fields > .acf-field { border-color: var(--cst-line); }
.cst-form .acf-label label { color: var(--cst-navy); font-weight: 700; }
.cst-form .acf-form-submit { margin-top: 20px; }
.cst-hp { position: absolute !important; left: -9999px; }
.cst-notice { padding: 16px 20px; border-radius: 12px; background: var(--cst-soft); color: var(--cst-navy); margin: 0 0 20px; }
.cst-notice--ok { background: #eaf6e4; }
.cst-space-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.cst-space-list a { font-weight: 700; color: var(--cst-navy); }
.cst-space-list a[aria-current] { color: var(--cst-blue); }
.cst-login input[type="text"], .cst-login input[type="password"] { width: 100%; max-width: 360px; height: 44px; border: 1px solid var(--cst-line); border-radius: 10px; padding: 0 12px; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.cst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cst-single-layout { grid-template-columns: 1fr; }
	.cst-single-side { position: static; }
}
@media (max-width: 720px) {
	.cst-archive,
	.cst-single { padding-top: 84px; }
	.cst-container { padding: 20px 16px 56px; }
	.cst-grid,
	.cst-people,
	.cst-team,
	.cst-research { grid-template-columns: 1fr; }
	.cst-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cst-single-hero { grid-template-columns: 1fr; padding: 22px; gap: 18px; }
	.cst-single-logo, .cst-single-logo img { width: 88px; height: 88px; }
	.cst-single-logo .cst-monogram { font-size: 28px; }
	.cst-filter { flex: 1 1 45%; }
	.cst-plan .cst-streets text { font-size: 18px; }
	.cst-cta { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.cst-plan .cst-pulse,
	.cst-plan .cst-synapse.is-highlight .cst-synapse-glow { animation: none; }
	.cst-plan .cst-pulse { display: none; }
}
