/* Outil parents – styles limités au bloc .opc-outil */

.opc-scene {
	--opc-encre: #14213d;
	--opc-gris: #3f4a5f;
	--opc-filet: #d5d9e0;
	--opc-fond: #f4f5f7;
	--opc-lien: #1d4ed8;
	--opc-accent: #1d4ed8;
	--opc-accent-pale: #e3ecff;
	--opc-chaud: #f5a524;
	--opc-urgent: #b91c1c;

	box-sizing: border-box;
	padding: 64px 24px 72px;
	/* Taille fixée ici : sinon l'outil hérite de la grande taille de texte du thème. */
	font-size: 1rem;
	line-height: 1.5;
	color: #fff;
	background: var(--opc-encre);
}

/*
 * Quand la bande colorée est le premier (ou le dernier) élément du contenu de la page,
 * on retire les marges que le modèle du thème ajoute autour du contenu,
 * pour que la bande touche le haut (ou le bas) de la page.
 */
main:has(.wp-block-post-content > .opc-scene:not(.opc-scene--sans-fond):first-child),
.wp-block-group:has(.wp-block-post-content > .opc-scene:not(.opc-scene--sans-fond):first-child),
.wp-block-post-content:has(> .opc-scene:not(.opc-scene--sans-fond):first-child) {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

main:has(.wp-block-post-content > .opc-scene:not(.opc-scene--sans-fond):last-child),
.wp-block-group:has(.wp-block-post-content > .opc-scene:not(.opc-scene--sans-fond):last-child),
.wp-block-post-content:has(> .opc-scene:not(.opc-scene--sans-fond):last-child) {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.wp-block-post-content > .opc-scene:first-child {
	margin-top: 0 !important;
}

.wp-block-post-content > .opc-scene:last-child {
	margin-bottom: 0 !important;
}

.opc-scene--sans-fond {
	padding: 0;
	color: var(--opc-encre);
	background: none;
}

.opc-scene__interieur {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
}

.opc-scene h2,
.opc-scene h3,
.opc-scene p {
	margin: 0;
}

.opc-outil {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 40px;
	color: var(--opc-encre);
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.opc-scene--sans-fond .opc-outil {
	border: 1px solid var(--opc-filet);
	box-shadow: none;
}

.opc-outil *,
.opc-outil *::before,
.opc-outil *::after {
	box-sizing: border-box;
}

.opc-outil h2,
.opc-outil h3,
.opc-outil p {
	margin: 0;
}

.opc-outil h2,
.opc-outil h3 {
	font-weight: 600;
	line-height: 1.25;
}

.opc-intro {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 780px;
}

.opc-scene .opc-intro__titre {
	font-size: clamp(1.7rem, 3.4vw, 2.5rem);
	font-weight: 600;
	line-height: 1.15;
	color: inherit;
}

.opc-intro__titre::after {
	content: "";
	display: block;
	width: 64px;
	height: 5px;
	margin-top: 18px;
	background: var(--opc-chaud);
}

.opc-intro__texte {
	font-size: 1.1rem;
	color: #d6dbe6;
}

.opc-scene--sans-fond .opc-intro__texte {
	color: var(--opc-gris);
}

.opc-question {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.opc-question__titre {
	font-size: 1.05rem;
	color: var(--opc-accent);
}

.opc-grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 8px;
}

.opc-rangee {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.opc-choix {
	min-height: 48px;
	padding: 10px 16px;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	color: var(--opc-encre);
	background: #fff;
	border: 1px solid #8a93a3;
	border-radius: 4px;
	cursor: pointer;
}

.opc-choix:hover {
	border-color: var(--opc-accent);
	background: var(--opc-accent-pale);
}

.opc-choix:focus-visible {
	outline: 3px solid var(--opc-lien);
	outline-offset: 2px;
}

.opc-choix[aria-pressed="true"] {
	color: #fff;
	background: var(--opc-accent);
	border-color: var(--opc-accent);
}

.opc-resultat {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 28px;
	background: var(--opc-accent-pale);
	border-radius: 6px;
}

.opc-resultat--attente {
	padding: 28px 0 0;
	background: none;
	border-top: 1px solid var(--opc-filet);
	border-radius: 0;
	gap: 16px;
}

.opc-outil .opc-attente__titre {
	font-size: 1.05rem;
}

.opc-attente {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
}

.opc-attente__carte {
	display: flex;
	gap: 14px;
	padding: 18px;
	background: var(--opc-accent-pale);
	border-radius: 4px;
}

.opc-attente__urgence {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--opc-urgent);
}

.opc-resultat__entete {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.opc-priorite {
	align-self: flex-start;
	padding: 4px 10px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--opc-accent);
	border-radius: 3px;
}

.opc-priorite--urgent {
	background: var(--opc-urgent);
}

.opc-resultat__titre {
	font-size: 1.5rem;
	line-height: 1.25;
}

.opc-resultat__contexte {
	font-size: 0.875rem;
	color: var(--opc-gris);
}

.opc-precisions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.opc-precisions__item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 14px 16px;
	background: #fff;
	border-left: 4px solid var(--opc-accent);
	border-radius: 4px;
}

.opc-precisions__etiquette {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--opc-accent);
}

.opc-precisions__texte {
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--opc-encre);
}

.opc-colonnes {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}

.opc-colonnes__principale {
	flex: 999 1 420px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.opc-colonnes__secondaire {
	flex: 1 1 280px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.opc-outil .opc-sous-titre {
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.opc-outil .opc-etapes {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.opc-outil .opc-etapes,
.opc-outil .opc-joindre__liste,
.opc-outil .opc-lire__liste {
	margin: 0;
	padding: 0;
	list-style: none;
}

.opc-etape {
	display: flex;
	gap: 16px;
	padding: 16px 18px;
	background: #fff;
	border-radius: 4px;
}

.opc-etape__numero {
	flex: none;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--opc-encre);
	background: var(--opc-chaud);
	border-radius: 3px;
}

.opc-etape__corps {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.opc-etape__titre {
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.opc-etape__detail {
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--opc-gris);
}

.opc-joindre {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	color: #fff;
	background: var(--opc-encre);
	border-radius: 4px;
}

.opc-outil .opc-joindre a {
	color: #fff;
}

.opc-joindre .opc-joindre__role {
	color: #d6dbe6;
}

.opc-joindre__liste {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.opc-joindre__liste li + li {
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.opc-joindre__nom {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.opc-joindre__role {
	display: block;
	font-size: 0.875rem;
	color: var(--opc-gris);
}

.opc-lire {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.opc-lire__liste a {
	display: block;
	padding: 9px 0;
	font-size: 0.95rem;
}

.opc-outil a {
	color: var(--opc-lien);
}

.opc-mention {
	margin: 0;
	font-size: 0.8rem;
	color: var(--opc-gris);
}

@media (max-width: 600px) {
	.opc-scene {
		padding: 36px 14px 44px;
	}

	.opc-outil {
		padding: 20px;
		gap: 24px;
	}

	.opc-resultat {
		padding: 18px;
	}
}
