/* Formulaire de contact CPJ — utilise les couleurs du thème CPJ (avec valeurs de secours). */
.cpj-contact {
	--c-bleu: var(--bleu, #1F3566);
	--c-nuit: var(--bleu-nuit, #142347);
	--c-carmin: var(--carmin, #A3302B);
	--c-or: var(--or, #D2A03A);
	--c-or-clair: var(--or-clair, #F3E3BC);
	--c-papier: var(--papier, #F5F6FA);
	--c-encre: var(--encre, #18213A);
	--c-gris: var(--gris, #586180);
	--c-trait: var(--trait, #DCE0EB);
	--c-titres: var(--f-titres, Montserrat, "Segoe UI", sans-serif);
	max-width: 1200px; margin-inline: auto;
}
.cpj-contact *, .cpj-contact *::before, .cpj-contact *::after { box-sizing: border-box; }
.cpj-contact-grille { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) { .cpj-contact-grille { grid-template-columns: minmax(0, 1fr); } }

/* Carte principale */
.cpj-contact-form, .cpj-contact-succes {
	background: #fff; border: 1px solid var(--c-trait); border-radius: 24px;
	padding: clamp(22px, 4vw, 44px); box-shadow: 0 30px 60px -40px rgba(20, 35, 71, 0.45);
}
.cpj-contact-form { display: grid; gap: clamp(28px, 4vw, 40px); }
.cpj-bloc { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 18px; }
.cpj-etape {
	display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 4px;
	font-family: var(--c-titres); font-weight: 800; font-size: 1.15rem; color: var(--c-bleu);
}
.cpj-etape-num {
	width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
	background: var(--c-or); color: var(--c-nuit); font-size: 0.85rem;
}

/* Choix du profil */
.cpj-profils-liste { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cpj-profils-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Téléphone : une seule ligne qui défile au doigt */
@media (max-width: 600px) {
	.cpj-profils-liste {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px;
		overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
		margin-inline: calc(-1 * clamp(22px, 4vw, 44px)); padding: 6px clamp(22px, 4vw, 44px) 14px;
		scroll-padding-inline: clamp(22px, 4vw, 44px);
	}
	.cpj-profils-liste::-webkit-scrollbar { display: none; }
	.cpj-profil { scroll-snap-align: start; }
}
.cpj-profil {
	position: relative; cursor: pointer; display: grid; gap: 6px; align-content: start;
	padding: 18px 16px; border: 2px solid var(--c-trait); border-radius: 18px; background: #fff;
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, background-color 0.25s, box-shadow 0.3s;
}
.cpj-profil:hover { transform: translateY(-3px); border-color: var(--c-or); box-shadow: 0 18px 30px -24px rgba(20, 35, 71, 0.6); }
.cpj-profil input { position: absolute; opacity: 0; pointer-events: none; }
.cpj-profil img { width: 44px; height: 44px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cpj-profil-titre { font-family: var(--c-titres); font-weight: 700; font-size: 0.98rem; color: var(--c-bleu); }
.cpj-profil-texte { font-size: 0.82rem; line-height: 1.4; color: var(--c-gris); }
.cpj-profil-coche {
	position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
	border: 2px solid var(--c-trait); background: #fff; transition: all 0.25s;
}
.cpj-profil:has(input:checked) {
	background: var(--c-bleu); border-color: var(--c-bleu); transform: translateY(-3px);
	box-shadow: 0 22px 36px -24px rgba(20, 35, 71, 0.8);
}
.cpj-profil:has(input:checked) .cpj-profil-titre { color: #fff; }
.cpj-profil:has(input:checked) .cpj-profil-texte { color: #C9D1E6; }
.cpj-profil:has(input:checked) img { transform: rotate(-8deg) scale(1.08); }
.cpj-profil:has(input:checked) .cpj-profil-coche {
	border-color: var(--c-or); background: var(--c-or) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142347' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.cpj-profil:has(input:focus-visible) { outline: 3px solid var(--c-or); outline-offset: 3px; }

/* Champs */
.cpj-grille-champs { display: grid; gap: 16px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cpj-grille-champs[hidden] { display: none; }
@media (max-width: 600px) { .cpj-grille-champs { grid-template-columns: minmax(0, 1fr); } }
.cpj-champ { display: grid; gap: 6px; min-width: 0; }
.cpj-champ label { font-family: var(--c-titres); font-weight: 600; font-size: 0.82rem; color: var(--c-encre); }
.cpj-requis { color: var(--c-carmin); display: none; }
.cpj-facultatif { font-family: inherit; font-weight: 400; color: var(--c-gris); font-size: 0.78rem; }
.cpj-champ.est-requis .cpj-requis { display: inline; }
.cpj-champ.est-requis .cpj-facultatif { display: none; }
.cpj-champ input, .cpj-champ select, .cpj-champ textarea {
	width: 100%; font: inherit; font-size: 0.95rem; color: var(--c-encre);
	padding: 12px 14px; border: 1.5px solid var(--c-trait); border-radius: 12px; background: var(--c-papier);
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.cpj-champ select {
	appearance: none; padding-right: 40px; cursor: pointer;
	background: var(--c-papier) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3566' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}
.cpj-champ textarea { resize: vertical; min-height: 120px; }
.cpj-champ input:hover, .cpj-champ select:hover, .cpj-champ textarea:hover { border-color: #C3C9DA; }
.cpj-champ input:focus, .cpj-champ select:focus, .cpj-champ textarea:focus {
	outline: none; border-color: var(--c-bleu); background-color: #fff; box-shadow: 0 0 0 4px rgba(31, 53, 102, 0.12);
}
.cpj-champ-large { grid-column: 1 / -1; }
.cpj-erreur { margin: 0; min-height: 0; font-size: 0.8rem; color: var(--c-carmin); font-weight: 600; }
.cpj-erreur:empty { display: none; }
.cpj-champ.est-invalide input, .cpj-champ.est-invalide select, .cpj-champ.est-invalide textarea {
	border-color: var(--c-carmin); background-color: #FDF3F2; animation: cpj-secousse 0.35s;
}
@keyframes cpj-secousse { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Piège à robots */
.cpj-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Envoi */
.cpj-envoi { display: grid; gap: 14px; padding-top: 8px; border-top: 1px solid var(--c-trait); }
.cpj-consentement { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; color: var(--c-gris); cursor: pointer; padding-top: 18px; }
.cpj-consentement input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-bleu); flex: none; }
.cpj-consentement.est-invalide { color: var(--c-carmin); }
.cpj-alerte { padding: 14px 16px; border-radius: 12px; background: #FDF3F2; border: 1px solid #F1C9C5; color: #7E241F; font-size: 0.9rem; }
.cpj-bouton-envoyer {
	justify-self: start; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
	padding: 15px 28px; border: 0; border-radius: 999px; background: var(--c-carmin); color: #fff;
	font-family: var(--c-titres); font-weight: 700; font-size: 0.95rem;
	transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.cpj-bouton-envoyer:hover { transform: translateY(-2px); background: #87251F; box-shadow: 0 14px 26px -14px rgba(163, 48, 43, 0.8); }
.cpj-bouton-envoyer:focus-visible { outline: 3px solid var(--c-or); outline-offset: 3px; }
.cpj-bouton-envoyer:disabled { opacity: 0.75; cursor: wait; transform: none; }
.cpj-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: cpj-tourne 0.8s linear infinite; }
.cpj-bouton-envoyer.est-en-cours .cpj-spinner { display: inline-block; }
@keyframes cpj-tourne { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .cpj-bouton-envoyer { justify-self: stretch; justify-content: center; } }

/* Confirmation */
.cpj-contact-succes { display: grid; justify-items: center; text-align: center; gap: 14px; padding-block: clamp(40px, 7vw, 72px); outline: none; }
.cpj-contact-succes[hidden] { display: none; }
.cpj-succes-icone { width: 96px; height: 96px; }
.cpj-succes-icone circle { fill: var(--c-or-clair); stroke: var(--c-or); stroke-width: 3; stroke-dasharray: 230; stroke-dashoffset: 230; animation: cpj-trace 0.7s ease-out forwards; }
.cpj-succes-icone path { fill: none; stroke: var(--c-carmin); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: cpj-trace 0.45s 0.55s ease-out forwards; }
@keyframes cpj-trace { to { stroke-dashoffset: 0; } }
.cpj-succes-titre { margin: 0; font-family: var(--c-titres); font-weight: 800; font-size: 1.6rem; color: var(--c-bleu); }
.cpj-succes-texte { margin: 0; max-width: 46ch; color: var(--c-gris); }
.cpj-bouton-autre {
	margin-top: 8px; cursor: pointer; padding: 12px 22px; border-radius: 999px; background: transparent;
	border: 2px solid var(--c-bleu); color: var(--c-bleu); font-family: var(--c-titres); font-weight: 700; font-size: 0.9rem;
}
.cpj-bouton-autre:hover { background: var(--c-bleu); color: #fff; }

/* Colonne latérale */
.cpj-contact-infos { display: grid; gap: 18px; position: sticky; top: 100px; }
@media (max-width: 960px) { .cpj-contact-infos { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.cpj-info-carte { padding: 24px; border-radius: 20px; background: var(--c-papier); border: 1px solid var(--c-trait); display: grid; gap: 12px; }
.cpj-info-carte h3 { margin: 0; font-family: var(--c-titres); font-weight: 800; font-size: 1rem; color: var(--c-bleu); }
.cpj-info-carte p { margin: 0; font-size: 0.9rem; color: var(--c-gris); }
.cpj-info-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 0.92rem; }
.cpj-info-liste li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.cpj-info-liste .icon { flex: none; color: var(--c-carmin); margin-top: 2px; }
.cpj-info-liste a { color: var(--c-encre); text-decoration: none; font-weight: 600; overflow-wrap: break-word; min-width: 0; }
.cpj-info-liste a:hover { color: var(--c-carmin); }
.cpj-info-bouton {
	justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
	padding: 10px 16px; border-radius: 999px; background: var(--c-bleu); color: #fff; text-decoration: none;
	font-family: var(--c-titres); font-weight: 700; font-size: 0.82rem; transition: background-color 0.2s, transform 0.2s;
}
.cpj-info-bouton:hover { background: var(--c-nuit); color: #fff; transform: translateY(-2px); }
.cpj-info-reseaux { background: var(--c-nuit); border-color: var(--c-nuit); }
.cpj-info-reseaux h3 { color: #fff; }
.cpj-info-reseaux p { color: #B9C3DD; }
.cpj-info-reseaux .socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.cpj-info-reseaux .socials a {
	width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; transition: background-color 0.25s, color 0.25s, transform 0.25s;
}
.cpj-info-reseaux .socials a:hover { background: var(--c-or); border-color: var(--c-or); color: var(--c-nuit); transform: translateY(-3px); }
.cpj-info-note { background: var(--c-or-clair); border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
	.cpj-contact * { animation: none !important; transition: none !important; }
	.cpj-succes-icone circle, .cpj-succes-icone path { stroke-dashoffset: 0; }
}

/* Candidature Talents en Action */
.cpj-candidature-cloture { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--c-or-clair); color: var(--c-nuit); }
.cpj-candidature-aide { margin: 0; color: var(--c-gris); font-size: 0.9rem; }
.cpj-candidature-fermee .cpj-contact-succes { box-shadow: none; }
.cpj-candidature-fermee .cpj-succes-icone path { stroke-dasharray: none; stroke-dashoffset: 0; stroke: var(--c-carmin); }
.cpj-candidature-fermee .cpj-bouton-envoyer { text-decoration: none; justify-self: center; }
