/*
 * Clarté « vivant » : composants de la refonte du 11/10/2026 (site/audit-ux/plan-refonte.md).
 * Chargé après clarte.css, dont il reprend les jetons. Seules transform et opacity s'animent ;
 * avec prefers-reduced-motion: reduce, rien ne bouge et tout est affiché d'emblée.
 */

:root { --coche-jaune: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* ---------- Ligne de confiance (héros de l'accueil, en-tête des pages métiers) ---------- */
.heros-confiance, .entete-page .confiance {
	position: relative; display: block; min-height: 32px; padding: 4px 0 0 44px;
	font-size: var(--texte-petit); line-height: 1.45; max-width: var(--mesure);
}
.heros-confiance { color: #FFFFFF; }
.heros-confiance strong, .entete-page .confiance strong { font-weight: 600; }
.heros-confiance::before, .entete-page .confiance::before {
	content: ""; position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
	background: var(--jaune) var(--coche-jaune) center / 18px no-repeat;
}

/* ---------- Exemple : remonté sous le héros ---------- */
.exemple-section { padding-top: calc(var(--section) / 2); }
.exemple-section .changements-actions .wp-block-button__link { background: var(--jaune); color: var(--encre); }

/* Onglets (mobile seulement) */
.exemple-onglets { display: none; }
@media (max-width: 56.1875em) {
	.js .exemple-onglets {
		display: flex; gap: 4px; padding: 4px; margin-bottom: 16px;
		background: rgba(21, 23, 26, 0.1); border-radius: var(--pilule);
	}
	.exemple-onglet {
		flex: 1 1 0; min-height: 52px; padding: 6px 12px; border: 0; border-radius: var(--pilule);
		background: transparent; color: var(--encre); cursor: pointer;
		font: 500 var(--texte-mini) / 1.2 var(--police); text-align: center;
		touch-action: manipulation;
	}
	.exemple-onglet[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
	.exemple-grille > .carte[hidden] { display: none !important; }
}

/* « Mettre au propre » */
.bouton-propre {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 48px; padding: 8px 18px; margin-top: 4px !important;
	border: 0; border-radius: var(--pilule); cursor: pointer;
	background: var(--encre); color: #FFFFFF;
	font: 500 var(--texte-mini) / 1.2 var(--police);
	touch-action: manipulation; transition: background-color 200ms ease;
}
.bouton-propre::before {
	content: ""; width: 18px; height: 18px; flex: none; background-color: currentColor;
	-webkit-mask: var(--coche-jaune) center / contain no-repeat; mask: var(--coche-jaune) center / contain no-repeat;
}
.bouton-propre:hover { background: #2E3136; }
.dictee.est-propre .bouton-propre, .bouton-propre.est-presse { background: var(--surface); color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--encre); }
.dictee code, .dictee .hesitation { transition: opacity 250ms var(--courbe); }
.dictee.en-nettoyage code, .dictee.en-nettoyage .hesitation { opacity: 0; }
.dictee .hesitation { color: var(--encre-2); }
.dictee .signe { font-weight: 600; animation: vivant-apparaitre 350ms var(--courbe) both; }
@keyframes vivant-apparaitre { from { opacity: 0; } to { opacity: 1; } }

/* Passage signalé : bouton qui met son commentaire en évidence */
.passage-douteux[role="button"] { cursor: pointer; }
.passage-douteux[role="button"]:hover { box-shadow: inset 0 -2px 0 #E2B400, 0 0 0 2px var(--encre); }
.commentaire::after {
	content: ""; position: absolute; inset: -5px; border-radius: 18px; pointer-events: none;
	box-shadow: 0 0 0 3px var(--encre); opacity: 0; transition: opacity 250ms var(--courbe);
}
.commentaire.est-actif::after { opacity: 1; }

/* ---------- Engagements : bandeau court ---------- */
.engagements-section.section { padding-block: 56px var(--section); }
.engagements-courts {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-bloc);
}
.engagement-court {
	display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; row-gap: 6px; align-content: start;
	padding: 32px 32px 34px;
}
.engagement-court + .engagement-court { border-left: 1px solid var(--trait); }
.engagement-court > * { grid-column: 2; margin: 0 !important; }
.engagement-court::before {
	content: ""; grid-column: 1; grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%;
	background: var(--fond) var(--icone-fond, none) center / 24px no-repeat;
}
.engagement-court.ic-cadenas { --icone-fond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3M12 14.5v2'/%3E%3C/svg%3E"); }
.engagement-court.ic-horloge { --icone-fond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); }
.engagement-court.ic-commentaire { --icone-fond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5a2 2 0 0 1-2 2H9l-5 4v-14a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 12.5h5'/%3E%3C/svg%3E"); }
.engagement-court h3 { font-size: 1.25rem; line-height: 1.3; }
.engagement-court > p { color: var(--encre-2); font-size: var(--texte-petit); line-height: 1.55; }
.engagements-section .lien-fleche { margin-top: 16px !important; }
@media (max-width: 63.9375em) {
	.engagements-courts { grid-template-columns: minmax(0, 1fr); }
	.engagement-court { padding: 24px; }
	.engagement-court + .engagement-court { border-left: 0; border-top: 1px solid var(--trait); }
}

/* ---------- Carrousel des métiers ---------- */
.metiers-section.section { padding-top: 0; }
.carrousel { position: relative; }
.carrousel-piste {
	display: grid; grid-auto-flow: column; gap: 20px;
	grid-auto-columns: calc((100% - 40px) / 3.15);
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-padding-inline: 0;
	padding: 6px 4px 10px; margin-inline: -4px;
}
.js .carrousel-piste { scrollbar-width: none; }
.js .carrousel-piste::-webkit-scrollbar { display: none; }
.carrousel-carte { position: relative; display: grid; gap: 10px; align-content: start; scroll-snap-align: start; margin: 0 !important; }
.carrousel-carte > * { margin: 0 !important; }
.carrousel-photo { border-radius: var(--rayon-photo); overflow: hidden; background: var(--trait); }
.carrousel-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 500ms var(--courbe); }
.carrousel-carte h3 { font-size: 1.375rem; line-height: 1.3; margin-top: 8px !important; }
.carrousel-carte h3 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--encre); text-decoration: none; }
.carrousel-carte h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon-photo); }
.carrousel-carte h3::after {
	content: ""; display: inline-block; width: 20px; height: 20px; margin-left: 8px; vertical-align: -3px;
	background-color: currentColor; transition: transform 200ms var(--courbe);
	-webkit-mask: var(--ic-fleche) center / contain no-repeat; mask: var(--ic-fleche) center / contain no-repeat;
}
.carrousel-carte > p { color: var(--encre-2); line-height: 1.55; }
.carrousel-carte:hover .carrousel-photo img { transform: scale(1.03); }
.carrousel-carte:hover h3 a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.carrousel-carte:hover h3::after { transform: translateX(3px); }
.carrousel-carte h3 a:focus-visible { outline: none; }
.carrousel-carte:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--rayon-photo); }

.carrousel-commandes { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 20px !important; }
.carrousel-etat { margin: 0 !important; min-width: 7.5em; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.carrousel-bouton {
	display: inline-flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--surface); color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--encre);
	transition: background-color 200ms ease, color 200ms ease; touch-action: manipulation;
}
.carrousel-bouton::before {
	content: ""; width: 22px; height: 22px; background-color: currentColor;
	-webkit-mask: var(--ic-fleche) center / contain no-repeat; mask: var(--ic-fleche) center / contain no-repeat;
}
.carrousel-prec::before { transform: scaleX(-1); }
.carrousel-bouton:hover:not(:disabled) { background: var(--encre); color: #FFFFFF; }
.carrousel-bouton:disabled { opacity: 0.35; cursor: default; }
.metiers-section .devis { margin-top: 40px !important; max-width: 40rem; }

@media (min-width: 47.5em) and (max-width: 63.9375em) { .carrousel-piste { grid-auto-columns: calc((100% - 20px) / 2.15); } }
@media (max-width: 47.4375em) {
	.carrousel-piste { grid-auto-columns: 84%; gap: 16px; }
	.carrousel-commandes { justify-content: space-between; }
}

/* ---------- Frise des étapes ---------- */
.frise-grille {
	display: grid; grid-template-columns: 7fr 5fr; gap: 0 56px;
	grid-template-areas: "tete photo" "frise frise"; align-items: end;
}
.frise-grille > .frise-tete { grid-area: tete; margin-bottom: 0 !important; }
.frise-photo { grid-area: photo; margin: 0 !important; }
.frise-photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--rayon-photo); }
.frise-grille > .frise { grid-area: frise; margin-top: 64px !important; }
.frise-section .entete-section { margin-bottom: 48px !important; }

.frise {
	position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px;
}
.frise > .etape {
	position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px;
	background: none; border: 0; border-radius: 0; padding: 0;
}
.frise > .etape > * { margin: 0 !important; }
.frise > .etape > .pastille {
	width: 56px; height: 56px; min-width: 56px; padding: 0; border-radius: 50%; font-size: 1.25rem;
	box-shadow: 0 0 0 8px var(--fond);
	transition: opacity 400ms var(--courbe), transform 400ms var(--courbe);
	transition-delay: calc(var(--i, 0) * 180ms + 150ms);
}
.frise > .etape > h3 { margin-top: 12px !important; font-size: 1.3125rem; line-height: 1.3; }
.frise > .etape > p:not(.pastille) { color: var(--encre-2); }
.frise > .etape > p.frise-chiffre {
	width: fit-content; margin-top: 4px !important;
	font-size: clamp(2.5rem, 1.6vw + 2rem, 3.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums; color: var(--encre);
	background: linear-gradient(transparent 58%, var(--jaune) 58%, var(--jaune) 92%, transparent 92%);
	padding-inline: 0.06em;
}
.frise > .etape > p.frise-chiffre-note { font-weight: 500; color: var(--encre); }

/* Trait qui relie les pastilles ; il se remplit de jaune au défilement (mesuré par vivant.js) */
.js .frise::before, .js .frise::after {
	content: ""; position: absolute; z-index: 0; border-radius: 3px;
	left: var(--frise-x, 0px); top: var(--frise-y, 0px); width: var(--frise-l, 0px); height: 3px;
	background: var(--trait);
}
.js .frise::after { background: var(--jaune); transform: scaleX(0); transform-origin: left center; transition: transform 1100ms var(--trace) 100ms; }
.js .frise.verticale::before, .js .frise.verticale::after { width: 3px; height: var(--frise-l, 0px); }
.js .frise.verticale::after { transform: scaleY(0); transform-origin: center top; }
.js .frise.est-allumee::after { transform: none; }
.js .frise:not(.est-allumee) > .etape > .pastille { opacity: 0.3; transform: scale(0.82); }
.frise.sans-transition > .etape > .pastille, .frise.sans-transition::after { transition: none !important; }

@media (max-width: 63.9375em) {
	.frise-grille { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tete" "photo" "frise"; gap: 32px; }
	.frise-grille > .frise { margin-top: 16px !important; }
	.frise { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.frise > .etape { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 20px; row-gap: 8px; }
	.frise > .etape > * { grid-column: 2; }
	.frise > .etape > .pastille { grid-column: 1; grid-row: 1 / span 6; }
	.frise > .etape > h3 { margin-top: 12px !important; }
}

/* ---------- Duo : seconde photo du métier et ce que le client dicte et reçoit ---------- */
.duo { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.duo-photo { margin: 0 !important; position: sticky; top: 120px; border-radius: var(--rayon-photo); overflow: hidden; background: var(--trait); }
.duo-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.duo-texte { display: grid; gap: 56px; }
.duo-bloc { display: grid; gap: 18px; }
.duo-bloc > * { margin: 0 !important; }
.duo-bloc h2 { font-size: var(--h2); line-height: 1.15; letter-spacing: -0.01em; }
@media (max-width: 63.9375em) {
	.duo { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.duo-photo { position: static; }
	.duo-photo img { aspect-ratio: 3 / 2; }
}


/* ---------- Menu : rubrique de la page en cours ---------- */
.navigation .wp-block-navigation__container > .est-courant > .wp-block-navigation-item__content,
.navigation .wp-block-navigation__container > .est-courant > .wp-block-navigation-submenu__toggle {
	text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; text-underline-offset: 0.4em;
}
.navigation .wp-block-navigation__submenu-container .est-courant > .wp-block-navigation-item__content { font-weight: 600; }

/* ---------- En-tête des pages simples : photo à droite ---------- */
.entete-simple .entete-page-photo img { aspect-ratio: 4 / 3; }
.entete-droite { display: grid; gap: 20px; align-content: start; min-width: 0; }
.entete-droite > * { margin: 0 !important; }
.entete-droite .entete-page-photo img { aspect-ratio: 3 / 2; }
.conditions-essai { background: var(--surface); }

/* ---------- Mention sur les données : par couches ---------- */
.mention-complete { margin-top: 4px !important; }
.mention-complete > summary {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer;
	font-size: var(--texte-mini); font-weight: 500; color: var(--encre);
	text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.22em;
	list-style: none;
}
.mention-complete > summary::-webkit-details-marker { display: none; }
.mention-complete > summary::after {
	content: ""; width: 18px; height: 18px; background-color: currentColor; transition: transform 200ms var(--courbe);
	-webkit-mask: var(--ic-chevron) center / contain no-repeat; mask: var(--ic-chevron) center / contain no-repeat;
}
.mention-complete[open] > summary::after { transform: rotate(180deg); }
.mention-complete > p { font-size: var(--texte-mini); line-height: 1.55; color: var(--encre-2); max-width: var(--mesure); }

/* ---------- Frise verticale (Confidentialité : six étapes) ---------- */
.frise.frise-verticale { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 52rem; }
.frise.frise-verticale > .etape { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 24px; row-gap: 8px; }
.frise.frise-verticale > .etape > * { grid-column: 2; }
.frise.frise-verticale > .etape > .pastille { grid-column: 1; grid-row: 1 / span 6; }
.frise.frise-verticale > .etape > h3 { margin-top: 12px !important; }

@media (prefers-reduced-motion: reduce) {
	.dictee code, .dictee .hesitation, .commentaire::after, .carrousel-photo img, .carrousel-carte h3::after,
	.frise > .etape > .pastille, .js .frise::after, .mention-complete > summary::after { transition: none !important; }
	.dictee .signe { animation: none; }
	.carrousel-piste { scroll-behavior: auto; }
}
@media (forced-colors: active) {
	.carrousel-bouton::before, .bouton-propre::before, .carrousel-carte h3::after { background-color: CanvasText; }
	.frise .frise-chiffre { background: none; }
}
