/*
Theme Name: CELP One Page
Theme URI: https://celp.eu
Author: Toulouse Université Club
Description: One page de pré-lancement du Centre Européen de Littératie Physique (ouverture 2028). Charte provisoire réglable dans Apparence › Personnaliser : variante (Clair, Immersif, Énergie), couleur d'accent, police, date d'ouverture et contenus. Les inscriptions à la communauté et les projets de recherche sont enregistrés dans l'administration.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: celp
*/

/* ---------------------------------------------------------------------------
 * Tokens. --a (accent) and --ff (font) are injected inline from the Customizer.
 * ------------------------------------------------------------------------- */
:root {
	--a: #0f7a8a;
	--ff: 'Hanken Grotesk';
	--bg: #fafaf8;
	--ink: #0e1c36;
	--mut: #4a5568;
	--soft: #eef3fa;
	--hb: #fafaf8;   /* hero / header background */
	--hi: #0e1c36;   /* hero / header ink */
	--hm: #4a5568;   /* hero / header muted */
	--hl: var(--a);  /* header accent link */
	--band: #eef3fa; /* "Le projet" band */
	--bi: #0e1c36;
	--bm: #4a5568;
	--cl: #dfe3ea;   /* card / input lines */
	--a2: var(--a);  /* pillar rules */
	--navy: #0e1c36;
	--navy-2: #0b1730;
	--on-navy: #c9d2e3;
	--error: #ffb4a8;
	--gutter: clamp(20px, 4vw, 48px);
}

.celp-v-immersif {
	--hb: var(--a);
	--hi: #ffffff;
	--hm: rgba(255, 255, 255, .85);
	--hl: #ffffff;
	--band: #ffffff;
}

.celp-v-energie {
	--bg: #f4f2ee;
	--hb: #f4f2ee;
	--band: var(--a);
	--bi: #ffffff;
	--bm: rgba(255, 255, 255, .9);
	--a2: #ffffff;
}

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	min-height: 100%;
	font-family: var(--ff), system-ui, sans-serif;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }

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

.celp-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.celp-eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--a);
}

.celp-btn {
	display: inline-block;
	padding: 14px 24px;
	border-radius: 999px;
	border: 0;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	background: var(--a);
	color: #fff;
}
.celp-btn--bold { font-weight: 700; }
.celp-btn--outline {
	font-weight: 700;
	border: 1.5px solid var(--ink);
	background: transparent;
	color: var(--ink);
}
.celp-btn--ghost {
	font-weight: 600;
	padding: 13px 20px;
	background: transparent;
	color: var(--mut);
}
.celp-btn--white { background: #fff; color: var(--navy); font-weight: 700; }

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------- */
.celp-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--hb);
	color: var(--hi);
}
.admin-bar .celp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .celp-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .celp-header { top: 0; } }

.celp-header__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	padding-top: 18px;
	padding-bottom: 18px;
}
.celp-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
}
.celp-brand:hover { text-decoration: none; }
.celp-brand__badge {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--a);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 12px;
	flex: none;
}
.celp-v-immersif .celp-brand__badge { background: rgba(255, 255, 255, .18); }
.celp-brand__name { font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.celp-brand .custom-logo { max-height: 40px; width: auto; }

.celp-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
}
.celp-nav__join { color: var(--hl); font-weight: 700; }
.celp-lang { position: relative; font-weight: 600; }
.celp-lang summary { cursor: pointer; list-style: none; }
.celp-lang summary::-webkit-details-marker { display: none; }
.celp-lang ul {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--cl);
	border-radius: 12px;
	min-width: 80px;
	box-shadow: 0 8px 24px rgba(14, 28, 54, .12);
}
.celp-lang li a { display: block; padding: 6px 16px; }

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------- */
.celp-hero { background: var(--hb); color: var(--hi); }
.celp-hero h1 { margin: 0; font-weight: 800; text-wrap: balance; }

/* Clair */
.celp-hero--clair {
	padding-top: clamp(48px, 7vw, 96px);
	padding-bottom: clamp(64px, 8vw, 112px);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}
.celp-hero__text { display: flex; flex-direction: column; gap: 22px; }
.celp-hero--clair h1 {
	font-size: clamp(38px, 5vw, 64px);
	line-height: 1.03;
	letter-spacing: -.025em;
}
.celp-hero__count { font-size: 18px; color: var(--hm); }
.celp-hero__count b { color: var(--a); }
.celp-hero__text .celp-btn { align-self: flex-start; }
.celp-hero__media {
	aspect-ratio: 4 / 3.4;
	border-radius: 24px;
	overflow: hidden;
	background: var(--soft);
}
.celp-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.celp-hero__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	font-size: 14px;
	color: var(--mut);
	background:
		radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--a) 22%, transparent), transparent 60%),
		radial-gradient(circle at 75% 80%, color-mix(in srgb, var(--a) 14%, transparent), transparent 55%),
		var(--soft);
}

/* Immersif */
.celp-hero--immersif {
	padding-top: clamp(64px, 9vw, 128px);
	padding-bottom: clamp(64px, 9vw, 128px);
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.celp-hero--immersif .celp-eyebrow { color: inherit; opacity: .85; }
.celp-hero--immersif h1 {
	font-size: clamp(44px, 6.4vw, 92px);
	line-height: .98;
	letter-spacing: -.03em;
	max-width: 1050px;
}
.celp-hero__row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.celp-hero--immersif .celp-hero__count { font-size: 16px; font-weight: 600; color: inherit; }
.celp-hero--immersif .celp-hero__count b { color: inherit; font-weight: 600; }

/* Énergie */
.celp-hero--energie {
	padding-top: clamp(48px, 7vw, 96px);
	padding-bottom: clamp(48px, 7vw, 96px);
	display: flex;
	flex-direction: column;
	gap: 32px;
}
.celp-hero--energie h1 {
	font-size: clamp(46px, 7.4vw, 108px);
	line-height: .94;
	letter-spacing: -.04em;
	text-transform: uppercase;
}
.celp-hero--energie h1 span { color: var(--a); }
.celp-hero__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	border-top: 2px solid var(--ink);
	padding-top: 22px;
}
.celp-hero--energie .celp-hero__count { font-weight: 600; color: inherit; }
.celp-hero--energie .celp-hero__count b { font-weight: 600; }

/* ---------------------------------------------------------------------------
 * Le projet
 * ------------------------------------------------------------------------- */
.celp-projet { background: var(--band); color: var(--bi); }
.celp-projet__inner {
	padding-top: clamp(64px, 8vw, 112px);
	padding-bottom: clamp(64px, 8vw, 112px);
	display: flex;
	flex-direction: column;
	gap: clamp(40px, 5vw, 64px);
}
.celp-projet__intro {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	gap: clamp(24px, 5vw, 72px);
}
.celp-h2 {
	margin: 0;
	font-size: clamp(30px, 3.6vw, 48px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -.02em;
}
.celp-projet__intro p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--bm); }
.celp-piliers {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: clamp(20px, 3vw, 40px);
}
.celp-pilier {
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-top: 2px solid var(--a2);
	padding-top: 18px;
}
.celp-pilier__n { font-size: 14px; font-weight: 700; opacity: .7; }
.celp-pilier__t { font-size: 22px; font-weight: 800; }
.celp-pilier__d { font-size: 15px; line-height: 1.45; color: var(--bm); }

/* ---------------------------------------------------------------------------
 * Recherche
 * ------------------------------------------------------------------------- */
.celp-recherche { background: var(--bg); }
.celp-recherche__inner { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.celp-card {
	border: 1.5px solid var(--cl);
	border-radius: 24px;
	padding: clamp(24px, 4vw, 44px);
	display: flex;
	flex-direction: column;
	gap: 24px;
	background: #fff;
	color: var(--ink);
}
.celp-card__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}
.celp-card__title { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.celp-card__title h2 {
	margin: 0;
	font-size: clamp(24px, 2.6vw, 32px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -.015em;
}
.celp-research-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-top: 1px solid var(--cl);
	padding-top: 24px;
}
.celp-research-form[hidden] { display: none; }
.no-js .celp-research-form[hidden] { display: flex; }
.no-js [data-celp-research-open], .no-js [data-celp-research-cancel] { display: none; }

.celp-grid { display: grid; gap: 12px; }
.celp-grid--240 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.celp-grid--200 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.celp-field {
	width: 100%;
	font-size: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid #d4dae4;
	background: var(--bg);
	color: var(--ink);
}
textarea.celp-field { resize: vertical; min-height: 120px; }
.celp-field::placeholder { color: #6b7686; }
.celp-field.is-invalid { border-color: #c2412d; }

.celp-research-form__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.celp-file {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	color: var(--a);
}
.celp-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.celp-file:focus-within { outline: 2px solid var(--a); outline-offset: 3px; border-radius: 6px; }
.celp-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.celp-form-error { font-size: 14px; color: #c2412d; }
.celp-form-error:empty { display: none; }
.celp-notice {
	border-top: 1px solid var(--cl);
	padding-top: 20px;
	font-size: 17px;
}

/* ---------------------------------------------------------------------------
 * Contact / communauté
 * ------------------------------------------------------------------------- */
.celp-contact { background: var(--navy); color: #fff; }
.celp-contact__inner {
	padding-top: clamp(64px, 8vw, 112px);
	padding-bottom: clamp(64px, 8vw, 112px);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
	gap: clamp(32px, 5vw, 72px);
	align-items: end;
}
.celp-contact__text { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.celp-contact__text .celp-eyebrow { color: #9fc0f0; }
.celp-contact__lead { font-size: 17px; line-height: 1.5; color: var(--on-navy); max-width: 440px; }
.celp-contact__mail { font-size: 16px; color: var(--on-navy); margin-top: 8px; }

.celp-join, .celp-join__form { display: flex; flex-direction: column; gap: 18px; }
.celp-join .celp-field {
	padding: 15px 16px;
	border: 1px solid rgba(255, 255, 255, .3);
	background: rgba(255, 255, 255, .06);
	color: #fff;
}
.celp-join .celp-field::placeholder { color: rgba(255, 255, 255, .6); }
.celp-join .celp-field.is-invalid { border-color: var(--error); }

.celp-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.celp-fieldset legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.celp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.celp-chip { position: relative; }
.celp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.celp-chip span {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 15px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .35);
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.celp-chip input[type="radio"]:checked + span { background: #fff; color: var(--navy); }
.celp-chip input[type="checkbox"]:checked + span { background: var(--a); }
.celp-chip input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.celp-consent {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.45;
	color: var(--on-navy);
	cursor: pointer;
	position: relative;
}
.celp-consent input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 1px 0 0; cursor: pointer; }
.celp-consent__box {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border-radius: 5px;
	border: 1.5px solid rgba(255, 255, 255, .5);
	background: transparent;
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 800;
}
.celp-consent input:checked + .celp-consent__box { background: #fff; border-color: #fff; }
.celp-consent input:checked + .celp-consent__box::before { content: '✓'; }
.celp-consent input:focus-visible + .celp-consent__box { outline: 2px solid #fff; outline-offset: 2px; }

.celp-join__submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.celp-join__submit .celp-btn { font-size: 16px; padding: 15px 30px; }
.celp-join .celp-form-error { color: var(--error); }

.celp-join-done {
	padding: 32px;
	border-radius: 18px;
	background: rgba(255, 255, 255, .08);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.celp-join-done[hidden] { display: none; }
.celp-join-done b { font-size: 24px; }
.celp-join-done span { font-size: 16px; color: var(--on-navy); }

.celp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.is-busy { opacity: .6; pointer-events: none; }

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.celp-footer { background: var(--navy-2); color: var(--on-navy); font-size: 14px; }
.celp-footer__inner {
	padding-top: 24px;
	padding-bottom: 24px;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

/* ---------------------------------------------------------------------------
 * Generic pages (mentions légales, politique de confidentialité…)
 * ------------------------------------------------------------------------- */
.celp-page { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(64px, 8vw, 112px); max-width: 820px; }
.celp-page h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 0 0 32px; }
.celp-page .entry-content { font-size: 17px; line-height: 1.65; }
.celp-page .entry-content a { color: var(--a); text-decoration: underline; }
