/* =========================================================
   Mot du Secrétaire Général
   Image historique utilisée comme fond complet
   ========================================================= */

.sgn-secretary-message {
	--sgn-secretary-background: none;

	position: relative;
	overflow: hidden;

	min-height: 620px;
	margin: 0 !important;

	background-color: #030303;
	background-image: var(--sgn-secretary-background);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;

	color: #fff;

	font-family:
		var(--wp--preset--font-family--cooper-hewitt),
		"Cooper Hewitt",
		Arial,
		sans-serif;
}

/*
 * L'image originale possède déjà sa composition sombre.
 * Ce voile est donc volontairement léger :
 * il sert uniquement à garantir la lisibilité du texte.
 */
.sgn-secretary-message__overlay {
	position: absolute;
	z-index: 1;
	inset: 0;

	background:
		linear-gradient(
			90deg,
			rgba(0, 0, 0, .88) 0%,
			rgba(0, 0, 0, .72) 31%,
			rgba(0, 0, 0, .25) 52%,
			rgba(0, 0, 0, 0) 70%
		);

	pointer-events: none;
}

.sgn-secretary-message__inner {
	position: relative;
	z-index: 2;

	display: flex;
	align-items: center;

	min-height: 620px;
}

.sgn-secretary-message__content {
	width: 52%;
	max-width: 700px;

	padding: 74px 0 72px;
}

.sgn-secretary-message__title {
	max-width: 480px;

	margin: 0 0 38px;

	color: #fff;

	font-size: 43px;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -.02em;
}

.sgn-secretary-message__text {
	max-width: 680px;

	color: rgba(255, 255, 255, .82);

	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
}

.sgn-secretary-message__text p {
	margin: 0 0 22px;
}

.sgn-secretary-message__text p:last-child {
	margin-bottom: 0;
}

.sgn-secretary-message__footer {
	display: flex;
	align-items: flex-start;
	gap: 34px;

	margin-top: 34px;
}

.sgn-secretary-message__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 50px;
	padding: 12px 25px;

	background: #3379bd;
	color: #fff;

	font-size: 13px;
	font-weight: 600;

	text-decoration: none;

	transition:
		background-color 180ms ease,
		transform 180ms ease;
}

.sgn-secretary-message__button:hover,
.sgn-secretary-message__button:focus-visible {
	background: #174899;
	color: #fff;
	transform: translateY(-1px);
}

.sgn-secretary-message__identity {
	min-width: 245px;
	padding-top: 2px;
}

.sgn-secretary-message__name {
	margin: 0 0 5px;

	color: #fff;

	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;

	letter-spacing: .03em;
	text-transform: uppercase;
}

.sgn-secretary-message__role {
	max-width: 310px;

	margin: 0;

	color: rgba(255, 255, 255, .68);

	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}

.sgn-secretary-message__signature {
	width: 145px;
	max-height: 65px;

	margin-top: 10px;
}

.sgn-secretary-message__signature img {
	display: block;

	width: 100%;
	height: auto;
	max-height: 65px;

	object-fit: contain;
	object-position: left center;
}

/* =========================================================
   Tablette
   ========================================================= */

@media (max-width: 1000px) {

	.sgn-secretary-message {
		min-height: 580px;
		background-position: 60% center;
	}

	.sgn-secretary-message__inner {
		min-height: 580px;
	}

	.sgn-secretary-message__content {
		width: 62%;
		padding: 65px 0;
	}

	.sgn-secretary-message__overlay {
		background:
			linear-gradient(
				90deg,
				rgba(0, 0, 0, .92) 0%,
				rgba(0, 0, 0, .76) 42%,
				rgba(0, 0, 0, .30) 68%,
				rgba(0, 0, 0, 0) 100%
			);
	}

	.sgn-secretary-message__title {
		font-size: 38px;
	}
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 680px) {

	.sgn-secretary-message {
		min-height: auto;

		background-position: 68% center;
		background-size: cover;
	}

	.sgn-secretary-message__overlay {
		background:
			linear-gradient(
				90deg,
				rgba(0, 0, 0, .94) 0%,
				rgba(0, 0, 0, .84) 58%,
				rgba(0, 0, 0, .55) 100%
			);
	}

	.sgn-secretary-message__inner {
		min-height: 580px;
	}

	.sgn-secretary-message__content {
		width: 100%;
		max-width: 100%;

		padding: 58px 0;
	}

	.sgn-secretary-message__title {
		max-width: 360px;
		margin-bottom: 28px;

		font-size: 33px;
	}

	.sgn-secretary-message__text {
		max-width: 100%;
		font-size: 14px;
	}

	.sgn-secretary-message__footer {
		flex-direction: column;
		gap: 24px;
	}
}

/* =========================================================
   Calage final sur le bloc historique SGN
   ========================================================= */

@media (min-width: 1001px) {

	.sgn-secretary-message__content {
		width: 54%;
		max-width: 790px;
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.sgn-secretary-message__title {
		max-width: 460px;
		margin-bottom: 50px;
		font-size: 36px;
		line-height: 1.08;
	}

	.sgn-secretary-message__text {
		max-width: 790px;
		font-size: 14px;
		line-height: 1.65;
	}

	.sgn-secretary-message__text p {
		margin-bottom: 28px;
	}

	.sgn-secretary-message__footer {
		gap: 48px;
		margin-top: 34px;
	}

	.sgn-secretary-message__button {
		min-width: 250px;
		min-height: 64px;
		padding: 14px 24px;
		font-size: 14px;
	}

	.sgn-secretary-message__identity {
		min-width: 330px;
		padding-top: 3px;
	}

	.sgn-secretary-message__name {
		font-size: 12px;
	}

	.sgn-secretary-message__role {
		font-size: 13px;
	}

	.sgn-secretary-message__signature {
		width: 160px;
		margin-top: 7px;
	}
}

@media (min-width: 1001px) {
	.sgn-secretary-message__button {
		width: fit-content;
		min-width: 0;
		min-height: 50px;
		height: 50px;
		padding: 0 22px;
		font-size: 14px;
		line-height: 1;
	}
}

/* =========================================================
   Priorité institutionnelle
   ========================================================= */

.sgn-secretary-message__priority-toggle {
	position: absolute;
	z-index: 5;
	top: 63%;
	right: 18%;

	width: 72px;
	height: 72px;

	display: grid;
	place-items: center;

	padding: 0;
	border: 8px solid rgba(255, 255, 255, .10);
	border-radius: 50%;

	background: #3b82c4;
	color: #fff;

	font-family: inherit;
	font-size: 42px;
	font-weight: 300;
	line-height: 1;

	cursor: pointer;

	transition:
		background-color 180ms ease,
		transform 180ms ease;
}

.sgn-secretary-message__priority-toggle:hover,
.sgn-secretary-message__priority-toggle:focus-visible {
	background: #3375b5;
}

.sgn-secretary-message__priority-toggle[aria-expanded="true"] {
	transform: rotate(45deg);
}

.sgn-secretary-message__priority-panel {
	position: absolute;
	z-index: 4;

	top: 0;
	right: 18%;

	width: min(430px, 32vw);
	min-height: 350px;

	padding: 28px 38px 46px;

	background: #3f82c3;
	color: #fff;

	box-sizing: border-box;
}

.sgn-secretary-message__priority-panel[hidden] {
	display: none;
}

.sgn-secretary-message__priority-panel::after {
	content: "";

	position: absolute;
	right: 38px;
	bottom: -48px;

	width: 0;
	height: 0;

	border-top: 48px solid #3f82c3;
	border-left: 48px solid transparent;
}

.sgn-secretary-message__priority-title {
	margin: 0 0 10px;

	color: rgba(255, 255, 255, .9);

	font-size: 17px;
	font-weight: 400;
	line-height: 1.3;
}

.sgn-secretary-message__priority-text {
	margin: 0;

	color: #fff;

	font-size: 29px;
	font-weight: 500;
	line-height: 1.43;
}

@media (max-width: 1000px) {

	.sgn-secretary-message__priority-toggle {
		top: 58%;
		right: 10%;
	}

	.sgn-secretary-message__priority-panel {
		right: 8%;
		width: min(400px, 48vw);
	}

	.sgn-secretary-message__priority-text {
		font-size: 25px;
	}
}

@media (max-width: 680px) {

	.sgn-secretary-message__priority-toggle {
		position: relative;
		top: auto;
		right: auto;

		width: 54px;
		height: 54px;

		margin: 0 0 32px auto;

		border-width: 5px;
		font-size: 32px;
	}

	.sgn-secretary-message__priority-panel {
		position: relative;
		top: auto;
		right: auto;

		width: 100%;
		min-height: 0;

		margin-bottom: 32px;
		padding: 26px;
	}

	.sgn-secretary-message__priority-panel::after {
		display: none;
	}

	.sgn-secretary-message__priority-text {
		font-size: 22px;
	}
}

/* =========================================================
   Priorité institutionnelle — animation et citations
   ========================================================= */

/*
 * Le panneau reste à sa position actuelle.
 * Seulement son apparition est animée.
 */
.sgn-secretary-message__priority-panel {
	display: block !important;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transform: translateY(-14px);

	transition:
		opacity 220ms ease,
		transform 260ms cubic-bezier(.2, .75, .3, 1),
		visibility 0s linear 260ms;
}

.sgn-secretary-message__priority-panel[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	transform: translateY(0);

	transition:
		opacity 220ms ease,
		transform 260ms cubic-bezier(.2, .75, .3, 1),
		visibility 0s;
}

/*
 * Citation blanche inspirée du cartouche historique.
 */
.sgn-secretary-message__priority-title {
	position: relative;
	z-index: 2;
	padding-top: 54px;
}

.sgn-secretary-message__priority-title::before {
	content: "“";

	position: absolute;
	top: -18px;
	left: 0;

	color: #fff;

	font-family: Georgia, serif;
	font-size: 88px;
	font-weight: 400;
	line-height: 1;

	opacity: .95;
}

/*
 * Grandes guillemets ton-sur-ton en arrière-plan,
 * comme sur l'ancien cartouche.
 */
.sgn-secretary-message__priority-title::after {
	content: "“";

	position: absolute;
	z-index: -1;
	top: -38px;
	left: 125px;

	color: rgba(20, 94, 164, .32);

	font-family: Georgia, serif;
	font-size: 245px;
	font-weight: 700;
	line-height: 1;

	pointer-events: none;
}

/*
 * Le + répond légèrement au survol sans animation excessive.
 */
.sgn-secretary-message__priority-toggle {
	transition:
		background-color 180ms ease,
		transform 200ms ease,
		box-shadow 180ms ease;
}

@media (hover: hover) and (pointer: fine) {

	.sgn-secretary-message__priority-toggle:hover {
		transform: scale(1.045);
		box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
	}

	.sgn-secretary-message__priority-toggle[aria-expanded="true"]:hover {
		transform: rotate(45deg) scale(1.045);
	}
}

@media (prefers-reduced-motion: reduce) {

	.sgn-secretary-message__priority-panel,
	.sgn-secretary-message__priority-toggle {
		transition: none;
	}
}

/* Harmonisation typographique du cartouche Priorité */
.sgn-secretary-message__priority-panel,
.sgn-secretary-message__priority-title,
.sgn-secretary-message__priority-text {
	font-family:
		var(--wp--preset--font-family--cooper-hewitt),
		"Cooper Hewitt",
		Arial,
		sans-serif;
}

.sgn-secretary-message__priority-title {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
}

.sgn-secretary-message__priority-text {
	font-size: 22px;
	font-weight: 500;
	line-height: 1.38;
}

@media (max-width: 1000px) {
	.sgn-secretary-message__priority-title {
		font-size: 13px;
	}

	.sgn-secretary-message__priority-text {
		font-size: 20px;
	}
}

@media (max-width: 680px) {
	.sgn-secretary-message__priority-text {
		font-size: 18px;
	}
}
