/* Campus Étudiant — candidature en 2 étapes */
.cec {
	--cec-teal: #00acc2;
	--cec-teal-dark: #00879a;
	--cec-teal-soft: #e6f7f9;
	--cec-ink: #0b3c49;
	--cec-text: #3e3e3e;
	--cec-muted: #74868c;
	--cec-line: #dfe8ea;
	--cec-yellow: #f6c445;
	--cec-red: #d93c3c;
	--cec-green: #12a06a;
	max-width: 820px;
	margin: 10px auto 40px;
	font-family: "Roboto", Helvetica, Arial, sans-serif;
	color: var(--cec-text);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}
.cec *, .cec *::before, .cec *::after { box-sizing: border-box; }
.cec [hidden] { display: none !important; }
.cec h2, .cec h3, .cec h4 { font-family: "Poppins", Helvetica, Arial, sans-serif; color: var(--cec-ink); margin: 0; letter-spacing: 0; }

/* Page : on aère le titre existant */
.cec-page .entry-content h1 { margin-bottom: 8px; }

/* ---------- Étapes ---------- */
.cec-steps {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	counter-reset: none;
}
.cec-steps .cec-step { margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; color: var(--cec-muted); font-weight: 500; }
.cec-steps .cec-step + .cec-step::before {
	content: "";
	width: 56px;
	height: 2px;
	background: var(--cec-line);
	margin-right: 2px;
	border-radius: 2px;
}
.cec-step__num {
	width: 34px; height: 34px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid var(--cec-line); background: #fff;
	font-family: "Poppins", sans-serif; font-weight: 600; font-size: 15px;
	transition: all .2s;
}
.cec-step.is-current { color: var(--cec-ink); }
.cec-step.is-current .cec-step__num { border-color: var(--cec-teal); background: var(--cec-teal); color: #fff; box-shadow: 0 0 0 5px var(--cec-teal-soft); }
.cec-step.is-done .cec-step__num { border-color: var(--cec-green); background: var(--cec-green); color: #fff; font-size: 0; }
.cec-step.is-done .cec-step__num::after { content: "✓"; font-size: 16px; }
.cec-step.is-done + .cec-step::before { background: var(--cec-green); }

/* ---------- Carte ---------- */
.cec-card {
	background: #fff;
	border: 1px solid var(--cec-line);
	border-top: 4px solid var(--cec-teal);
	border-radius: 14px;
	box-shadow: 0 12px 34px rgba(11, 60, 73, .08);
	padding: 32px 36px;
}
.cec-card__head { margin-bottom: 22px; }
.cec-card__head h2 { font-size: 24px; line-height: 1.25; margin-bottom: 4px; }
.cec-card__head p { margin: 0; color: var(--cec-muted); }

/* ---------- Champs ---------- */
.cec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-bottom: 8px; }
.cec-field { margin: 0; min-width: 0; }
.cec-field--full { grid-column: 1 / -1; }
.cec label, .cec legend { font-weight: 500; color: var(--cec-ink); }
.cec .cec-field > label { display: block; margin: 0 0 6px; font-size: 14px; }
.cec input[type=text], .cec input[type=email], .cec input[type=tel] {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1.5px solid var(--cec-line);
	border-radius: 10px;
	background: #fbfdfd;
	color: var(--cec-text);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.cec input::placeholder { color: #a9b6ba; }
.cec input[type=text]:focus, .cec input[type=email]:focus, .cec input[type=tel]:focus {
	outline: none; border-color: var(--cec-teal); background: #fff; box-shadow: 0 0 0 4px var(--cec-teal-soft);
}
.cec .is-invalid input[type=text], .cec .is-invalid input[type=email], .cec .is-invalid input[type=tel] { border-color: var(--cec-red); background: #fff8f8; }

/* ---------- Pastilles (radio / cases) ---------- */
.cec fieldset.cec-choices { border: 0; padding: 0; margin: 22px 0 0; }
.cec-choices legend { padding: 0; margin: 0 0 10px; font-size: 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; width: 100%; }
.cec legend small, .cec h3 small { font-weight: 400; color: var(--cec-muted); font-size: 13px; font-family: "Roboto", sans-serif; }
.cec legend small b, .cec h3 small b { color: var(--cec-teal-dark); }
.cec-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cec .cec-pill { position: relative; margin: 0; cursor: pointer; font-weight: 400; }
.cec-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cec-pill span {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 42px; padding: 8px 16px;
	border: 1.5px solid var(--cec-line); border-radius: 999px;
	background: #fff; color: var(--cec-text); font-size: 14.5px;
	transition: all .15s; user-select: none;
}
.cec-pill:hover span { border-color: var(--cec-teal); }
.cec-pill input:focus-visible + span { box-shadow: 0 0 0 4px var(--cec-teal-soft); border-color: var(--cec-teal); }
.cec-pill input:checked + span { background: var(--cec-teal); border-color: var(--cec-teal); color: #fff; font-weight: 500; }
.cec-pill input[type=checkbox]:checked + span::before { content: "✓"; font-size: 13px; }
.cec-pill.is-disabled { cursor: not-allowed; }
.cec-pill.is-disabled span { opacity: .45; }
.cec-pill.is-disabled:hover span { border-color: var(--cec-line); }
.cec-choices.is-invalid .cec-pill span { border-color: #f0b4b4; }
.cec-choices.is-invalid legend { color: var(--cec-red); }

/* ---------- Consentement ---------- */
.cec .cec-consent { display: flex; gap: 10px; align-items: flex-start; margin: 26px 0 0; font-weight: 400; font-size: 13.5px; color: var(--cec-muted); cursor: pointer; }
.cec-consent input { margin: 3px 0 0; width: 17px; height: 17px; flex: none; accent-color: var(--cec-teal); }
.cec-consent.is-invalid { color: var(--cec-red); }

.cec-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Boutons ---------- */
.cec-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.cec .cec-btn {
	appearance: none; border: 0; cursor: pointer;
	height: 50px; padding: 0 28px; border-radius: 10px;
	font-family: "Poppins", sans-serif; font-size: 15px; font-weight: 600; letter-spacing: 0;
	text-transform: none; line-height: 50px;
	transition: background .15s, transform .1s, box-shadow .15s;
}
.cec .cec-btn--primary { background: var(--cec-teal); color: #fff; box-shadow: 0 6px 16px rgba(0, 172, 194, .28); }
.cec .cec-btn--primary:hover { background: var(--cec-teal-dark); }
.cec .cec-btn--primary:active { transform: translateY(1px); }
.cec .cec-btn--ghost { background: transparent; color: var(--cec-muted); }
.cec .cec-btn--ghost:hover { color: var(--cec-ink); background: #f1f5f6; }
.cec .cec-btn:disabled { opacity: .65; cursor: progress; box-shadow: none; }
.cec .cec-link { appearance: none; background: none; border: 0; padding: 0; margin: 12px 0 0; color: var(--cec-teal-dark); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.cec-error { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: #fff1f1; color: #b42727; font-size: 14px; border: 1px solid #f6cfcf; }

/* ---------- Étape 2 ---------- */
.cec-success {
	display: flex; gap: 16px; align-items: flex-start;
	padding: 18px 20px; margin: -8px 0 28px;
	background: #ecf9f3; border: 1px solid #c4ebd8; border-radius: 12px;
}
.cec-success h2 { font-size: 18px; margin-bottom: 2px; color: #0b5e3e; }
.cec-success p { margin: 0; color: #2f6b52; font-size: 14px; }
.cec-success__icon {
	flex: none; width: 40px; height: 40px; border-radius: 50%;
	background: var(--cec-green); color: #fff; font-size: 20px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
}
.cec-success.is-fresh .cec-success__icon { animation: cec-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cec-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.cec-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--cec-line); }
.cec-card__head + .cec-block { margin-top: 0; padding-top: 0; border-top: 0; }
.cec-block h3 { font-size: 17px; margin-bottom: 4px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cec-hint { margin: 0 0 14px; color: var(--cec-muted); font-size: 13.5px; }

.cec-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cec-drop { min-width: 0; }
.cec .cec-drop__zone {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-height: 128px; padding: 16px 12px; margin: 0;
	border: 2px dashed #c6d9dd; border-radius: 12px; background: #f7fbfc;
	text-align: center; cursor: pointer; transition: all .15s; font-weight: 400;
}
.cec-drop__zone:hover, .cec-drop__zone.is-over { border-color: var(--cec-teal); background: var(--cec-teal-soft); }
.cec-drop__zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cec-drop__icon { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--cec-teal); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; box-shadow: 0 2px 8px rgba(11, 60, 73, .1); margin-bottom: 6px; }
.cec-drop__label { font-family: "Poppins", sans-serif; font-weight: 600; color: var(--cec-ink); font-size: 14.5px; }
.cec-drop__sub { font-size: 12.5px; color: var(--cec-muted); }

.cec .cec-files { list-style: none; margin: 8px 0 0; padding: 0; }
.cec .cec-files li {
	position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px;
	margin: 6px 0 0; padding: 8px 32px 8px 10px; border-radius: 8px; background: #f3f7f8; font-size: 13px; overflow: hidden;
}
.cec-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cec-ink); }
.cec-file__meta { color: var(--cec-muted); font-size: 12px; white-space: nowrap; }
.cec-file__bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: #dde8ea; margin-top: 6px; display: none; }
.cec-file__bar i { display: block; height: 100%; width: 0; background: var(--cec-teal); border-radius: 3px; transition: width .2s; }
.cec-files li.is-loading .cec-file__bar { display: block; }
.cec-files li.is-ok { background: #ecf9f3; }
.cec-files li.is-ok .cec-file__meta::before { content: "✓ "; color: var(--cec-green); font-weight: 700; }
.cec-files li.is-error { background: #fff1f1; }
.cec-files li.is-error .cec-file__meta { color: #b42727; }
.cec .cec-file__rm { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--cec-muted); font-size: 17px; line-height: 22px; cursor: pointer; }
.cec .cec-file__rm:hover { background: #fff; color: var(--cec-red); }

.cec-country + .cec-country { margin-top: 18px; }
.cec-country h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--cec-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cec-country h4 span { font-family: "Roboto", sans-serif; font-size: 11px; background: #eef3f4; border-radius: 10px; padding: 1px 8px; letter-spacing: 0; }
.cec-school-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cec .cec-school {
	position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0;
	padding: 11px 14px 11px 44px; border: 1.5px solid var(--cec-line); border-radius: 10px; background: #fff;
	cursor: pointer; font-weight: 400; transition: all .15s;
}
.cec-school input { position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; margin: 0; accent-color: var(--cec-teal); }
.cec-school:hover { border-color: var(--cec-teal); }
.cec-school.is-checked { border-color: var(--cec-teal); background: var(--cec-teal-soft); }
.cec-school.is-disabled { opacity: .5; cursor: not-allowed; }
.cec-school.is-disabled:hover { border-color: var(--cec-line); }
.cec-school__name { color: var(--cec-ink); font-weight: 500; font-size: 14.5px; line-height: 1.35; }
.cec-school__tags { color: var(--cec-muted); font-size: 12px; }

/* ---------- Fin ---------- */
.cec-done { text-align: center; padding: 48px 36px; }
.cec-done .cec-success__icon { width: 64px; height: 64px; font-size: 30px; margin-bottom: 16px; animation: cec-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.cec-done h2 { font-size: 24px; margin-bottom: 8px; }
.cec-done p { max-width: 520px; margin: 0 auto; color: var(--cec-muted); }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
	.cec { margin-top: 0; }
	.cec-card { padding: 24px 18px; border-radius: 12px; }
	.cec-grid { grid-template-columns: 1fr; gap: 14px; }
	.cec-docs { grid-template-columns: 1fr; }
	.cec .cec-drop__zone { min-height: 0; flex-direction: row; gap: 10px; justify-content: flex-start; text-align: left; padding: 14px; }
	.cec-drop__icon { margin: 0; flex: none; }
	.cec-drop__sub { display: none; }
	.cec-school-grid { grid-template-columns: 1fr; }
	.cec-steps .cec-step + .cec-step::before { width: 22px; }
	.cec-step__txt { font-size: 13.5px; }
	.cec-actions { flex-direction: column-reverse; align-items: stretch; }
	.cec .cec-btn { width: 100%; }
	.cec-card__head h2 { font-size: 21px; }
}

/* ---------- Ajouts v2 : filière « Autre », pays repliables, reCAPTCHA ---------- */
.cec-autre { margin-top: 12px; max-width: 420px; }
.cec-autre[hidden] { display: none; }
.cec-legal { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--cec-muted); text-align: right; }
.cec-legal a { color: inherit; text-decoration: underline; }
body.cec-page .grecaptcha-badge { visibility: hidden !important; }
.cec-country > summary { list-style: none; cursor: pointer; }
.cec-country > summary::-webkit-details-marker { display: none; }
.cec-country > summary h4 { margin-bottom: 8px; }
.cec-country > summary h4::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.cec-country[open] > summary h4::after { transform: rotate(-135deg); }
.cec-country:not([open]) > summary h4 { margin-bottom: 0; }
.cec-country__sel { font-family: "Roboto", sans-serif; font-size: 11px; font-weight: 600; color: var(--cec-teal); letter-spacing: 0; text-transform: none; }
@media (max-width: 700px) {
	.cec-legal { text-align: center; }
	.cec-country > summary { padding: 12px 14px; border: 1.5px solid var(--cec-line); border-radius: 10px; background: #f7fafb; }
	.cec-country > summary h4 { margin: 0; }
	.cec-country[open] > summary { margin-bottom: 8px; }
	.cec-country + .cec-country { margin-top: 10px; }
}

/* École souhaitée (facultative, présélectionnée depuis une fiche école) */
.cec-field--ecole { margin: 22px 0 0; }
.cec .cec-field--ecole select, .cec .cec-field--select select {
	width: 100%; height: 48px; margin: 0; padding: 0 40px 0 14px; border: 1.5px solid var(--cec-line); border-radius: 10px;
	background: #fbfdfd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%230b2530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
	color: var(--cec-text); font: inherit; font-size: 15px; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.cec .cec-field--ecole select:focus, .cec .cec-field--select select:focus { outline: none; border-color: var(--cec-teal); background-color: #fff; box-shadow: 0 0 0 4px var(--cec-teal-soft); }
.cec-optional { font-weight: 500; font-size: .85em; color: #74868f; margin-left: 6px; }
.cec .cec-field--ecole.is-preset select { border-color: var(--cec-teal); background-color: var(--cec-teal-soft); font-weight: 600; }
.cec-field--ecole .cec-hint { margin: 8px 0 0; }
