/*
 * Page Carrières (page-template/career.php). Chargé seulement sur cette page.
 *
 * Même rendu que gozem-revamp-theme (mesures relevées sur gozem.co/tg/fr/carrieres/).
 * Sommaire : 1. Commun  2. Barre de liens  3. Hero  4. Chiffres  5. Pourquoi nous rejoindre
 *            6. Métiers  7. Offres  8. Programmes  9. Témoignages  10. Impact  11. FAQ  12. Mobile
 */

/* =========================================================
   1. Commun aux sections
   ========================================================= */

/* Cette page gère ses propres espacements, section par section. */
.site-main {
	padding-block: 0;
}

.career-section {
	padding-block: 96px;
}

/* Espacements : uniquement des marges hautes, pour qu'elles s'additionnent sans fusionner. */
.career-section__title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem); /* 48px sur grand écran. */
	font-weight: 700;
}

.career-section__subtitle {
	margin: 16px 0 0;
	color: var(--wp--preset--color--text);
	font-size: 1.25rem;
	font-weight: 600;
}

.career-section__text {
	max-width: 868px;
	margin: 26px 0 0;
	color: var(--wp--preset--color--text);
	font-size: 1.25rem;
	line-height: 1.5;
	text-align: justify;
}

.career-section__title--center,
.career-section__subtitle--center {
	text-align: center;
}

.career-section__text--center {
	margin-inline: auto;
}

/* Espace entre l'en-tête d'une section et son contenu (mesuré sur l'ancien thème). */
.stat-grid,
.career-why__slider {
	margin-top: 64px;
}

.faq-group:first-of-type {
	margin-top: 72px;
}

.department-list,
.job-list {
	margin-top: 74px;
}

.story-grid {
	margin-top: 88px;
}

/* Offres et témoignages : sous-titre plus éloigné du titre. */
.career-jobs .career-section__subtitle,
.career-stories__intro {
	margin-top: 32px;
	line-height: 1.2;
}

.career-jobs .career-section__text {
	margin-top: 28px;
}

/* Flèches rondes des carrousels. */
.slider-controls {
	display: flex;
	align-items: center;
	gap: 24px;
}

.slider-controls--end {
	justify-content: flex-end;
	gap: 16px;
}

.slider-arrow {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	background: transparent;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.slider-arrow:disabled {
	cursor: default;
	opacity: 0.4;
}

/* Barres indiquant la diapositive affichée. */
.slider-dots {
	display: flex;
	flex: 1;
	min-width: 0;
	justify-content: center;
	gap: 16px;
}

/* 79px de large, mais les barres rétrécissent sur un petit écran. */
.slider-dots button {
	flex: 0 1 79px;
	min-width: 16px;
	height: 8px;
	padding: 0;
	cursor: pointer;
	background: currentColor;
	border: 0;
	border-radius: 10px;
	opacity: 0.25;
}

.slider-dots button.is-active {
	opacity: 1;
}

/* Boutons « pilule ». */
.button-white,
.button-outline-white,
.button-green {
	display: inline-block;
	padding: 12px 32px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	border-radius: 999px;
}

.button-white {
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--white);
}

.button-outline-white {
	color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--white);
}

.button-green {
	padding-inline: 48px;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
}

/* =========================================================
   2. Barre de liens vers les sections (sous l'en-tête)
   ========================================================= */

.career-subnav {
	position: sticky;
	top: 85px;
	z-index: 40;
	background: var(--wp--preset--color--white);
	border-top: 1px solid #e8e8e8;
}

.admin-bar .career-subnav {
	top: 117px;
}

.career-subnav ul {
	display: flex;
	gap: 24px;
	margin-block: 0;
	padding-block: 8px;
	overflow-x: auto;
	list-style: none;
}

.career-subnav a {
	display: block;
	padding: 8px 8px 8px 0;
	color: var(--wp--preset--color--text);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
}

.career-subnav a:hover,
.career-subnav a.is-current {
	color: var(--wp--preset--color--primary-dark);
}

/* Les ancres s'arrêtent sous l'en-tête et la barre, pas derrière. */
.career-section,
.career-impact {
	scroll-margin-top: 140px;
}

/* =========================================================
   3. Hero
   ========================================================= */

.career-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 868px;
	overflow: hidden;
	color: var(--wp--preset--color--white);
	background: #d3d3d3;
}

.career-hero__image,
.career-hero__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Voile sombre pour que le texte blanc reste lisible. */
.career-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0.3);
}

.career-hero__content,
.career-hero__stripes {
	position: relative;
	z-index: 2;
}

.career-hero__content {
	width: 100%;
	padding-top: 139px;
}

.career-hero__title {
	max-width: 720px;
	margin: 0 0 8px;
	color: var(--wp--preset--color--white);
	font-size: clamp(2.25rem, 5vw, 4rem); /* 64px sur grand écran. */
	font-weight: 800;
}

.career-hero__text {
	max-width: 720px;
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 1.5rem;
	font-weight: 500;
}

.career-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-top: 112px; /* 16px sous le texte + 96px, comme l'ancien thème. */
}

/* Bandes blanches décoratives en bas de la photo. */
.career-hero__stripes {
	height: 50px;
	margin-block: 64px;
	background: url(../images/career/hero_Wbarner.png) no-repeat left center / 100% 100%;
}

/* =========================================================
   4. Gozem en quelques chiffres
   ========================================================= */

.career-overview .career-section__title {
	font-weight: 800;
}

.stat-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 48px;
}

.stat-card {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 360px;
	max-width: 100%;
	padding: 28px 32px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
}

.stat-card__number {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-size: 4rem;
	font-weight: 900;
	line-height: 1.2;
}

.stat-card__text p {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 1.125rem;
	text-align: justify;
}

.stat-card__text strong {
	display: block;
	margin-bottom: 8px;
	font-size: 1.25rem;
}

/* =========================================================
   5. Pourquoi nous rejoindre ?
   ========================================================= */

.career-why {
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--primary-light) url(../images/career/join-us-bg.svg) no-repeat right top / 280px 264px;
}

.career-why__title {
	color: var(--wp--preset--color--primary-dark);
	font-weight: 800;
}

.career-why__slider {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 56px;
}

.career-why__images {
	position: relative;
	height: 460px;
}

.career-why__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	border-radius: 32px;
}

/* Une seule image et un seul texte visibles à la fois (quand le script est chargé). */
.is-ready .career-why__image {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s;
}

.is-ready .career-why__image.is-active {
	opacity: 1;
}

.career-why__details {
	display: grid;
	grid-template-rows: 1fr auto;
	align-items: center;
}

.is-ready .career-why__panel:not(.is-active),
.is-ready .career-impact__step:not(.is-active) {
	display: none;
}

.career-why__panel-title {
	margin: 0 0 16px;
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.5rem;
	font-weight: 700;
}

.career-why__panel p {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.5;
	text-align: justify;
}

.career-why .slider-arrow {
	color: var(--wp--preset--color--primary-dark);
}

/* =========================================================
   6. Nos métiers & départements
   ========================================================= */

/* Cartes alignées sur une ligne, qui défilent horizontalement. */
.department-list {
	display: flex;
	gap: 21px;
	margin-bottom: 80px;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.department-list::-webkit-scrollbar {
	display: none;
}

.department-card {
	position: relative;
	display: flex;
	flex: 0 0 278px;
	flex-direction: column;
	justify-content: flex-end;
	height: 382px;
	padding: 24px;
	overflow: hidden;
	border-radius: 16px;
	scroll-snap-align: start;
}

.department-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Dégradé sombre sous le texte blanc. */
.department-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(rgba(0, 0, 0, 0.3) 29.81%, rgba(0, 0, 0, 0.8) 90.38%);
}

.department-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.department-card__title {
	margin: 0;
	color: var(--wp--preset--color--white);
	font-size: 1.5rem;
	font-weight: 700;
}

.department-card__body p {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.875rem;
	font-weight: 500;
}

.department-card__link {
	color: var(--wp--preset--color--white);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.career-departments .slider-arrow {
	background: #efefef;
}

/* =========================================================
   7. Nos offres d'emploi
   ========================================================= */

.job-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 1003px;
	margin-inline: auto;
}

/* Une ligne par offre : poste | service | lieu. */
.job-row {
	display: grid;
	grid-template-columns: 43% 24% 1fr;
	align-items: center;
	gap: 24px;
	padding: 24px;
	color: var(--wp--preset--color--text);
	font-size: 1.125rem;
	text-decoration: none;
	background: var(--wp--preset--color--white);
	border: 1px solid #e8e8e8;
	border-radius: 20px;
}

a.job-row:hover {
	border-color: var(--wp--preset--color--primary);
}

.job-row--head {
	padding-block: 0;
	color: #8a8a8a;
	font-weight: 600;
	background: none;
	border: 0;
}

.job-row__title {
	font-weight: 700;
}

.job-row__muted {
	color: #6c6c6c;
	font-weight: 600;
}

.job-row__place {
	display: flex;
	align-items: center;
	gap: 8px;
}

.career-jobs__cta {
	margin: 64px 0 0;
	text-align: center;
}

/* =========================================================
   8. Programmes jeunes diplômés (fond vert)
   ========================================================= */

/* Trois mises en page, comme l'ancien thème : mobile, tablette (744px) et ordinateur (1024px). */
.career-programs.career-section {
	padding-block: 40px;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary);
}

.career-programs__inner {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.career-programs__intro {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.career-programs__title {
	margin: 0 0 8px;
	color: var(--wp--preset--color--white);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}

.career-programs__text {
	margin: 0 0 10px;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-align: justify;
}

.program-grid {
	display: grid;
	gap: 12px;
}

.program-card {
	padding: 16px;
	background: var(--wp--preset--color--primary-dark);
	border: 1px solid transparent;
	border-radius: 24px;
}

.program-card__icon {
	display: block;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
}

.program-card__title {
	margin: 0 0 8px;
	color: var(--wp--preset--color--white);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
}

.program-card p {
	margin: 0 0 10px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: justify;
}

/* Sur mobile, le bouton prend toute la largeur, sous les cartes. */
.career-programs__cta .button-white {
	display: block;
	text-align: center;
}

@media (min-width: 744px) {
	.career-programs.career-section {
		padding-block: 48px;
	}

	.career-programs__inner {
		gap: 40px;
	}

	.career-programs__title {
		font-size: 2.375rem;
	}

	.career-programs__text {
		font-size: 1.125rem;
	}

	.program-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	/* La dernière carte prend toute la largeur quand elles sont en nombre impair. */
	.program-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.career-programs__cta {
		text-align: center;
	}

	.career-programs__cta .button-white {
		display: inline-block;
	}
}

/* Sur ordinateur : texte et bouton à gauche (480px), cartes à droite. */
@media (min-width: 1024px) {
	.career-programs.career-section {
		padding-block: 96px;
	}

	.career-programs__inner {
		display: grid;
		grid-template-columns: 480px minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		column-gap: 96px;
		row-gap: 0;
	}

	.career-programs__text {
		font-size: 1.25rem;
	}

	.program-grid {
		grid-row: 1 / span 2;
		grid-column: 2;
		align-content: start;
	}

	.career-programs__cta {
		margin-top: 64px;
		text-align: left;
	}

	.program-card {
		padding: 32px;
	}

	.program-card__icon {
		margin-bottom: 24px;
	}

	.program-card__title {
		font-size: 1.5rem;
	}

	.program-card p {
		font-size: 1.125rem;
	}
}

/* =========================================================
   9. Témoignages
   ========================================================= */

.career-stories {
	background: var(--wp--preset--color--surface-alt);
}

.career-stories__intro {
	max-width: 734px;
	margin-inline: auto;
	font-weight: 500;
}

.story-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 27px;
}

.story-card {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
}

.story-card__image {
	width: 100%;
	height: 288px;
	object-fit: cover;
	border-radius: 16px;
}

/* Guillemets verts à gauche du texte. */
.story-card__quote {
	margin: 0;
	padding-left: 48px;
	background: url(../images/career/quotes.svg) no-repeat left top / 32px 32px;
}

.story-card__quote p {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 1.125rem;
	text-align: justify;
}

.story-card__author {
	padding-left: 48px;
}

.story-card__author strong {
	display: block;
}

/* =========================================================
   10. Notre impact (RSE)
   ========================================================= */

.career-impact {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 1088px;
	padding-block: 96px;
	overflow: hidden;
	background: #d3d3d3;
}

.career-impact__images,
.career-impact__image {
	position: absolute;
	inset: 0;
}

.career-impact__image {
	opacity: 0;
	transition: opacity 0.6s;
}

.career-impact__image.is-active {
	opacity: 1;
}

.career-impact__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.career-impact .container {
	position: relative;
	width: 100%;
}

/* Cadre blanc semi-transparent sur la photo. */
.career-impact__box {
	display: flex;
	flex-direction: column;
	gap: 64px;
	width: min(620px, 100%);
	padding: 64px;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 24px;
}

.career-impact__title {
	margin: 0 0 8px;
	font-size: clamp(2rem, 3.5vw, 2.5rem); /* 40px sur grand écran. */
	font-weight: 700;
}

.career-impact__subtitle {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.2;
}

.career-impact__steps {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.career-impact__step {
	padding: 32px;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary);
	border-radius: 12px;
}

.career-impact__step-title {
	margin: 0 0 16px;
	color: var(--wp--preset--color--white);
	font-size: 1.5rem;
	font-weight: 700;
}

.career-impact__step p {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 500;
}

.career-impact .slider-controls--end {
	gap: 16px;
}

.slider-dots--small {
	justify-content: flex-start;
	gap: 6px;
	color: var(--wp--preset--color--primary);
}

.slider-dots--small button {
	flex-basis: 30px;
	height: 6px;
}

/* Sans script, toutes les actions RSE s'affichent les unes sous les autres. */
.career-impact:not(.is-ready) .slider-controls {
	display: none;
}

.career-why__slider:not(.is-ready) .slider-controls {
	display: none;
}

/* =========================================================
   11. Vos questions, nos réponses
   ========================================================= */

.faq-group {
	margin-top: 24px;
	padding: 32px;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 20px;
}

.faq-group > summary,
.faq-item > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	list-style: none;
	cursor: pointer;
}

.faq-group > summary::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker {
	display: none;
}

.faq-group__title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
}

/* Rond avec une petite flèche : vers le bas fermé, vers le haut ouvert. */
.faq-group > summary::after {
	content: "";
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2'%3E%3Cpath d='M8 10l4 4 4-4'/%3E%3C/svg%3E") no-repeat center / 16px;
}

.faq-group[open] > summary::after {
	transform: rotate(180deg);
}

.faq-item {
	padding-block: 16px;
	border-bottom: 1px solid #e8e8e8;
}

.faq-item:last-child {
	border-bottom: 0;
}

.faq-item > summary {
	color: var(--wp--preset--color--text);
	font-size: 1.25rem;
	font-weight: 500;
}

/* « + » fermé, « − » ouvert, en vert. */
.faq-item > summary::after {
	content: "+";
	color: var(--wp--preset--color--primary);
	font-size: 1.5rem;
	font-weight: 400;
}

.faq-item[open] > summary::after {
	content: "−";
}

.faq-item__answer p {
	margin: 8px 0 0;
	color: #6c6c6c;
	font-size: 1.25rem;
	line-height: 1.5;
	text-align: justify;
}

/* =========================================================
   12. Tablette et téléphone
   ========================================================= */

@media (max-width: 991px) {
	.career-subnav {
		top: 70px;
	}

	.career-section {
		padding-block: 64px;
	}

	.career-hero {
		min-height: 0;
	}

	.career-hero__content {
		padding-top: 48px;
	}

	.career-hero__buttons {
		margin-top: 32px;
	}

	.career-hero__stripes {
		margin-block: 40px;
	}

	.career-hero__text {
		font-size: 1.125rem;
	}

	.career-why__slider {
		display: flex;
		flex-direction: column;
		gap: 40px;
	}

	.career-why__images {
		height: 320px;
	}

	.job-row {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.job-row--head {
		display: none;
	}

	.career-impact {
		min-height: 0;
	}

	.career-impact__box {
		gap: 32px;
		padding: 32px 24px;
	}

	.faq-group {
		padding: 24px;
	}

	.faq-group__title,
	.faq-item > summary {
		font-size: 1.125rem;
	}
}
