/* A saturated sweep is visible on pale bands; retain the approved light sweep on dark red. */
body[data-tone] {
 --title-sweep-soft:color-mix(in srgb,var(--solid) 50%,transparent);
 --title-sweep-peak:color-mix(in srgb,var(--solid) 95%,transparent);
}
body[data-tone="red"] {
 --title-sweep-soft:color-mix(in srgb,var(--highlight) 25%,transparent);
 --title-sweep-peak:color-mix(in srgb,var(--highlight) 40%,transparent);
}
/* Validated V3 animation: a single soft colour sweep over the existing title band. */
.colour-title { position:relative; isolation:isolate; }
.colour-title > .colour-title-text { position:relative; z-index:1; }
.colour-title::before { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:0; opacity:0; background:linear-gradient(100deg,transparent 15%,var(--title-sweep-soft) 38%,var(--title-sweep-peak) 50%,var(--title-sweep-soft) 62%,transparent 85%); background-size:230% 100%; }
.colour-title.colour-title-active::before { animation:title-colour-sweep 3s ease-in-out 1; }
@keyframes title-colour-sweep {
 0% { background-position:100% 0; opacity:0; }
 20% { opacity:1; }
 80% { opacity:1; }
 100% { background-position:0% 0; opacity:0; }
}
@media(prefers-reduced-motion:reduce) { .colour-title.colour-title-active::before { animation:none; } }

/* Profil's principal heading is the candidate's name, above Chiffres clés. */
@supports ((background-clip:text) or (-webkit-background-clip:text)) {
 #profil .hero h1.colour-name-active {
  background:linear-gradient(100deg,var(--ink) 15%,var(--ink) 35%,var(--highlight) 50%,var(--ink) 65%,var(--ink) 85%);
  background-size:230% 100%; background-clip:text; -webkit-background-clip:text;
  color:transparent; animation:title-name-sweep 3s ease-in-out 1;
 }
 @keyframes title-name-sweep { from {background-position:100% 0;} to {background-position:0% 0;} }
}
@media(prefers-reduced-motion:reduce) { #profil .hero h1.colour-name-active { animation:none; } }
