Files
nav-carte/components/entree/SchemaEchelles.vue
T
Jules NenyandClaude Opus 5.5 4cda84c581 feat(entree): les anneaux parlent, noms et sept mots en mouvement (B13b-M1)
Noms dans chaque anneau à toutes les tailles (26 unités, 11,4 px à 390 px).
Les sept mots d'echelles.ts : bandeaux de M (horaire) et XL (antihoraire)
le long du bord extérieur, un tour en 75 s ; S, un mot à la fois au centre,
2,5 s par mot. Calques HTML (transform et opacity sur le compositeur),
CSS seul, départ après l'apparition, arrêt sous prefers-reduced-motion et
par un bouton pause (WCAG 2.2.2). Bandeau M masqué derrière l'arc « ce
qui revient » à partir de 1024 px. aria-label : une phrase par anneau.
test-figures : 32 → 53 cas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYkaR9gSetC8qKAowoMKpM
2026-10-13 16:09:27 +02:00

771 lines
26 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
SchemaEchelles — B13-M2
Le schéma des trois échelles (deck v3.3, slide 16, `drawEchelles`), porté en SVG
déclaratif : rendu côté serveur, présent au premier affichage (CONCEPTION §7).
Géométrie : utils/figures.ts ; textes : utils/echelles.ts (source unique).
taille="grand" (état 0 de l'entrée) : la figure + les trois portes en liens HTML
(lettre, titre, accroche de la slide 16). Arcs « ce qui sort / ce qui revient »
gardés dans le SVG à partir de 1 024 px seulement (16 px environ) ; en dessous ils
seraient à 9 px. Ouvrir une porte = `push`.
B13b-M1 : chaque anneau porte sa lettre et son nom à toutes les tailles (nom à 26 unités,
11,4 px rendus à 390 px), et les sept mots de son échelle (ECHELLES[id].mots) :
M et XL en bandeau le long du bord extérieur, qui tourne (M horaire, XL antihoraire,
un tour en 75 s) ; S, un mot à la fois au centre, en fondu (2,5 s par mot). Les bandeaux
et les mots de S sont des calques HTML posés sur la figure (un <svg> par bandeau, un
<span> par mot) : `transform` et `opacity` y tournent sur le compositeur, sans repeindre
le SVG ni réveiller le fil principal. CSS seul ; arrêt sous `prefers-reduced-motion`
(bandeaux immobiles, premier mot de S) et par le bouton pause (WCAG 2.2.2).
taille="mini" (porte ouverte) : barre collante au téléphone (retour au schéma + S M XL),
colonne à partir de 1 024 px (retour, figure réduite, portes titrées). Passer d'une
porte à l'autre = `replace` (une seule entrée d'historique par visite).
Survol ou focus d'un anneau allume sa porte, et l'inverse. Les anneaux sont des
cibles de pointeur ; au clavier, ce sont les liens qui portent l'action (le SVG est
une image décrite en `grand`, décoratif en `mini`).
-->
<template>
<component
:is="taille === 'mini' ? 'nav' : 'div'"
class="schema"
:class="[`schema--${taille}`, { 'schema--apparition': joueApparition }]"
:aria-label="taille === 'mini' ? 'Portes S, M, XL' : undefined"
@mouseleave="survol = null"
>
<div v-if="$slots.avant" class="schema__avant"><slot name="avant" /></div>
<a
v-if="taille === 'mini'"
:href="hrefSchema"
class="schema__fermer"
@click.prevent="emit('fermer')"
>
<svg class="schema__fermer-icone" viewBox="0 0 40 40" aria-hidden="true" focusable="false">
<circle
v-for="(r, id) in ICONE"
:key="id"
cx="20"
cy="20"
:r="r"
:class="{ 'schema__fermer-actif': actif === id }"
/>
</svg>
<span class="schema__fermer-texte">Revenir au schéma</span>
</a>
<div class="schema__figure" :class="{ 'schema__figure--fige': fige }">
<svg
class="schema__dessin"
:viewBox="`0 0 ${SCHEMA_L} ${SCHEMA_H}`"
:role="taille === 'grand' ? 'img' : undefined"
:aria-label="taille === 'grand' ? description : undefined"
:aria-hidden="taille === 'mini' ? 'true' : undefined"
focusable="false"
>
<g
v-for="a in anneaux"
:key="a.id"
class="schema__anneau"
:class="[
`schema__anneau--${a.id}`,
{ 'schema__anneau--survol': survol === a.id, 'schema__anneau--actif': actif === a.id },
]"
:style="styleAnneau(a.rang)"
@mouseenter="survol = a.id"
@click="choisir(a.id)"
>
<path class="schema__zone" :d="a.zone" fill-rule="evenodd" />
<circle class="schema__trait" :cx="a.cx" :cy="a.cy" :r="a.r" />
</g>
<text
v-for="a in anneaux"
:key="`lettre-${a.id}`"
class="schema__lettre"
:x="a.cx"
:y="a.yLettre"
:font-size="a.tailleLettre"
text-anchor="middle"
:style="styleLettre(a.rang)"
>{{ a.id }}</text>
<template v-if="taille === 'grand'">
<text
v-for="a in anneaux"
:key="`nom-${a.id}`"
class="schema__nom"
:x="a.cx"
:y="a.yNom"
:font-size="CORPS.nom"
text-anchor="middle"
:style="styleLettre(a.rang)"
>{{ nomAnneau(a.id) }}</text>
<defs>
<path v-for="arc in arcs" :id="idArc(arc)" :key="idArc(arc)" :d="arc.d" />
</defs>
<text
v-for="arc in arcs"
:key="`flux-${idArc(arc)}`"
class="schema__flux"
font-size="22"
><textPath :href="`#${idArc(arc)}`" startOffset="50%" text-anchor="middle">{{ FLECHE[arc.sens] }} {{ ECHELLES_FLUX[arc.frontiere][arc.sens] }}</textPath></text>
<text class="schema__legende" :x="legende.x" :y="legende.ySort" :font-size="legende.taille" text-anchor="end">{{ FLECHE.sort }} {{ ECHELLES_FLUX_LEGENDE.sort }}</text>
<text class="schema__legende" :x="legende.x" :y="legende.yRevient" :font-size="legende.taille" text-anchor="end">{{ FLECHE.revient }} {{ ECHELLES_FLUX_LEGENDE.revient }}</text>
</template>
</svg>
<template v-if="taille === 'grand'">
<!-- Bandeaux M et XL : un calque par anneau, qui tourne autour du centre de la figure. -->
<div
v-for="b in bandeaux"
:key="`bandeau-${b.id}`"
class="schema__bandeau"
:class="[`schema__bandeau--${b.id}`, { 'schema__bandeau--masque': MASQUE_BANDEAU[b.id] }]"
:style="styleBandeau(b)"
aria-hidden="true"
>
<svg
class="schema__tour"
:class="`schema__tour--${b.sens}`"
:viewBox="`0 0 ${SCHEMA_L} ${SCHEMA_H}`"
:style="styleTour"
focusable="false"
>
<defs><path :id="idBandeau(b.id)" :d="b.d" /></defs>
<text class="schema__mots" :font-size="CORPS.mot" :textLength="b.longueur" lengthAdjust="spacing"><textPath :href="`#${idBandeau(b.id)}`">{{ textesBandeaux[b.id] }}</textPath></text>
</svg>
</div>
<!-- S : un mot à la fois, au centre du disque, sous le nom. -->
<div class="schema__mots-s" :style="styleMotsS" aria-hidden="true">
<span
v-for="(m, i) in ECHELLES.S.mots"
:key="m"
class="schema__mot-s"
:class="{ 'schema__mot-s--premier': i === 0 }"
:style="styleMotS(i)"
>{{ m }}</span>
</div>
<button
type="button"
class="schema__pause"
:aria-pressed="fige ? 'true' : 'false'"
@click="fige = !fige"
>
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path v-if="fige" d="M8 5.5v13l10.5-6.5z" />
<path v-else d="M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" />
</svg>
<span class="sr-only">Mettre les mots en pause</span>
</button>
</template>
</div>
<ul class="schema__portes">
<li v-for="id in ORDRE_ECHELLES" :key="id">
<NuxtLink
:to="lienPorte(id)"
:replace="taille === 'mini'"
class="schema__porte"
:class="{ 'schema__porte--survol': survol === id, 'schema__porte--actif': actif === id }"
:aria-current="actif === id ? 'true' : undefined"
:data-porte="id"
@mouseenter="survol = id"
@focus="survol = id"
@blur="survol = null"
>
<span class="schema__porte-lettre">{{ id }}</span>
<span class="schema__porte-texte">
<span class="schema__porte-titre">{{ ECHELLES[id].titre }}</span>
<span v-if="taille === 'grand'" class="schema__porte-accroche">{{ ECHELLES[id].accroche }}</span>
</span>
<span v-if="taille === 'grand'" class="schema__porte-fleche" aria-hidden="true">›</span>
</NuxtLink>
</li>
</ul>
<div v-if="$slots.apres" class="schema__apres"><slot name="apres" /></div>
</component>
</template>
<script setup lang="ts">
import { useId } from 'vue'
import {
ECHELLES, ORDRE_ECHELLES, ECHELLES_FLUX, ECHELLES_FLUX_LEGENDE, PARAM_PORTE,
type EchelleId,
} from '~/utils/echelles'
import {
SCHEMA_L, SCHEMA_H, anneauxEchelles, arcsFlux, legendeFlux, delaisApparition, finApparition,
CORPS, MOUVEMENT_MOTS, MASQUE_BANDEAU, bandeauxAnneaux, motsBandeau, texteBandeau,
cadreMotS, masqueSecteurBas,
type ArcFlux, type SensFlux, type BandeauAnneau,
} from '~/utils/figures'
const props = withDefaults(defineProps<{
taille: 'grand' | 'mini'
/** Porte ouverte (mini) : son anneau et son lien en safran. */
actif?: EchelleId | null
/**
* Première vue du schéma (grand) : les anneaux apparaissent du dehors vers le dedans
* (XL, M, S), puis les lettres, en 900 ms au plus, une fois (B13-M6). CSS seul ;
* sans effet sous `prefers-reduced-motion` ou si `html.entree-vue` est posé.
*/
apparition?: boolean
}>(), { actif: null, apparition: false })
const emit = defineEmits<{ fermer: [] }>()
const route = useRoute()
const router = useRouter()
const uid = useId()
const anneaux = anneauxEchelles()
const arcs = arcsFlux()
const legende = legendeFlux()
const bandeaux = bandeauxAnneaux()
/** Texte de chaque bandeau : les sept mots d'echelles.ts, repris pour remplir le tour. */
const textesBandeaux = Object.fromEntries(
bandeaux.map((b) => [b.id, texteBandeau(motsBandeau(ECHELLES[b.id].mots, b.longueur))]),
) as Record<BandeauAnneau['id'], string>
const rangDe = (id: EchelleId) => anneaux.find((a) => a.id === id)?.rang ?? 0
/** Mots arrêtés par le visiteur (bouton pause) : bandeaux immobiles, mot de S figé. */
const fige = ref(false)
const FLECHE: Record<SensFlux, string> = { sort: '↓', revient: '↑' }
/** Icône du retour au schéma (téléphone) : trois cercles, rayons dans l'ordre XL, M, S. */
const ICONE: Record<EchelleId, number> = { XL: 18, M: 12, S: 6 }
const survol = ref<EchelleId | null>(null)
/** Le nom écrit dans l'anneau, comme sur la slide 16 : le titre de l'échelle, initiale en minuscule. */
const nomAnneau = (id: EchelleId) => {
const t = ECHELLES[id].titre
return t.charAt(0).toLowerCase() + t.slice(1)
}
const idArc = (arc: ArcFlux) => `${uid}-arc-${arc.frontiere}-${arc.sens}`
/**
* Description de la figure, sur le modèle de l'aria-label du deck ; B13b : une phrase par
* anneau avec ses sept mots (séparés par des points-virgules, certains portent une virgule).
*/
const description = (() => {
const anneauxTxt = ORDRE_ECHELLES.map((id) => `${id}, ${nomAnneau(id)}`).join(' ; ')
const mots = ORDRE_ECHELLES.map((id) => `${id}, ${nomAnneau(id)} : ${ECHELLES[id].mots.join(' ; ')}.`).join(' ')
const flux = (f: 'S' | 'M', entre: string) =>
`Entre ${entre}, ${ECHELLES_FLUX_LEGENDE.sort} : ${ECHELLES_FLUX[f].sort} ; ${ECHELLES_FLUX_LEGENDE.revient} : ${ECHELLES_FLUX[f].revient}.`
return `Trois anneaux imbriqués, S au centre : ${anneauxTxt}. ${mots} ${flux('S', 'S et M')} ${flux('M', 'M et XL')}`
})()
const idBandeau = (id: EchelleId) => `${uid}-bandeau-${id}`
// Mouvement des mots (B13b-M1) : durées et délais tirés d'utils/figures.ts.
// Les bandeaux démarrent après l'apparition du schéma (finApparition, 900 ms).
const styleTour = { animationDuration: `${MOUVEMENT_MOTS.tour}ms`, animationDelay: `${finApparition()}ms` }
const styleBandeau = (b: BandeauAnneau) => {
const masque = MASQUE_BANDEAU[b.id]
return {
...(masque ? { '--masque': masqueSecteurBas(masque) } : {}),
...(joueApparition.value ? { animationDelay: `${delaisApparition(rangDe(b.id)).lettre}ms` } : {}),
}
}
const cadreS = cadreMotS()
const styleMotsS = computed(() => ({
left: `${(cadreS.x / SCHEMA_L) * 100}%`,
top: `${(cadreS.y / SCHEMA_H) * 100}%`,
width: `${(cadreS.l / SCHEMA_L) * 100}%`,
height: `${(cadreS.h / SCHEMA_H) * 100}%`,
...(joueApparition.value ? { animationDelay: `${delaisApparition(rangDe('S')).lettre}ms` } : {}),
}))
/**
* Mot i de S : une boucle de 7 × 2,5 s par mot, décalée de i × 2,5 s. Le premier mot part
* à 0 (visible dès l'arrivée, il s'efface à 2,1 s) ; les suivants, à rebours d'un tour,
* restent éteints jusqu'à leur tour : le premier changement vient après l'apparition.
*/
const styleMotS = (i: number) => {
const tour = ECHELLES.S.mots.length * MOUVEMENT_MOTS.cadence
return {
animationDuration: `${tour}ms`,
animationDelay: `${i === 0 ? 0 : i * MOUVEMENT_MOTS.cadence - tour}ms`,
}
}
function queryPorte(id: EchelleId | null) {
const q: Record<string, unknown> = { ...route.query }
if (id) q[PARAM_PORTE] = id
else delete q[PARAM_PORTE]
return q as Record<string, string>
}
const lienPorte = (id: EchelleId) => ({ path: route.path, query: queryPorte(id) })
/** Adresse du schéma : le retour reste un vrai lien (nouvel onglet, sans JavaScript). */
const hrefSchema = computed(() => router.resolve({ path: route.path, query: queryPorte(null) }).href)
function choisir(id: EchelleId) {
if (props.taille === 'mini' && props.actif === id) return
navigateTo(lienPorte(id), { replace: props.taille === 'mini' })
}
// Apparition (B13-M6) : délais par rang, du dehors vers le dedans (utils/figures.ts).
const joueApparition = computed(() => props.apparition && props.taille === 'grand')
const styleAnneau = (rang: number) =>
joueApparition.value ? { animationDelay: `${delaisApparition(rang).anneau}ms` } : undefined
const styleLettre = (rang: number) =>
joueApparition.value ? { animationDelay: `${delaisApparition(rang).lettre}ms` } : undefined
</script>
<style scoped>
/* ── Commun ────────────────────────────────────────────────────────────── */
.schema__figure {
position: relative;
/* les calques (bandeaux, mots de S) se règlent en unités de la figure */
container-type: inline-size;
}
.schema__dessin {
display: block;
width: 100%;
height: auto;
overflow: visible;
}
.schema__zone {
fill: color-mix(in srgb, var(--nav-primary-solid) 5%, transparent);
cursor: pointer;
transition: fill 200ms var(--ease-out);
}
.schema__anneau--M .schema__zone { fill: color-mix(in srgb, var(--nav-primary-solid) 8%, transparent); }
.schema__anneau--S .schema__zone { fill: color-mix(in srgb, var(--nav-primary-solid) 12%, transparent); }
.schema__trait {
fill: none;
stroke: color-mix(in srgb, var(--nav-primary-solid) 60%, transparent);
stroke-width: 2px;
vector-effect: non-scaling-stroke;
pointer-events: none;
transition: stroke 200ms var(--ease-out);
}
.schema__anneau--survol .schema__zone { fill: color-mix(in srgb, var(--accent) 20%, transparent); }
.schema__anneau--actif .schema__zone { fill: color-mix(in srgb, var(--accent) 32%, transparent); }
.schema__anneau--survol .schema__trait,
.schema__anneau--actif .schema__trait {
stroke: var(--accent);
stroke-width: 3px;
}
.schema__lettre,
.schema__nom,
.schema__flux,
.schema__legende {
pointer-events: none;
font-family: var(--font-body);
}
.schema__lettre {
fill: var(--text);
font-weight: var(--fw-bold);
}
.schema__nom,
.schema__flux,
.schema__legende {
fill: color-mix(in srgb, var(--text) 78%, transparent);
}
.schema__nom { font-weight: var(--fw-semibold); }
.schema__flux,
.schema__legende { display: none; }
/* ── Les mots (B13b-M1) ── */
.schema__bandeau {
position: absolute;
inset: 0;
/* le calque tourne : ses coins ne doivent pas élargir la page */
overflow: hidden;
pointer-events: none;
}
.schema__tour {
display: block;
width: 100%;
height: 100%;
overflow: visible;
}
.schema__mots {
font-family: var(--font-body);
font-size: 26px;
fill: color-mix(in srgb, var(--text) 78%, transparent);
}
.schema__mots-s {
position: absolute;
display: grid;
pointer-events: none;
}
.schema__mot-s {
grid-area: 1 / 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
text-wrap: balance;
/* 26 unités du viewBox (820 de large) : 11,4 px rendus à 390 px */
font-size: calc(100cqw * 26 / 820);
line-height: 1.2;
color: var(--text);
opacity: 0;
}
.schema__mot-s--premier { opacity: 1; }
.schema__pause {
position: absolute;
right: 0;
bottom: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border: 1px solid var(--border);
border-radius: var(--radius-full);
background: var(--surface);
color: color-mix(in srgb, var(--text) 78%, transparent);
cursor: pointer;
}
.schema__pause svg {
width: 18px;
height: 18px;
fill: currentColor;
}
.schema__pause:hover { color: var(--text); border-color: var(--accent); }
.schema__pause:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 2px;
}
.schema__flux { font-style: italic; }
.schema__legende { font-family: var(--font-mono); }
.schema__portes {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.schema__porte {
display: flex;
align-items: center;
gap: var(--space-sm);
min-height: 44px;
padding: var(--space-xs) var(--space-sm);
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--surface);
color: var(--text);
text-decoration: none;
transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.schema__porte:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 2px;
}
.schema__porte-lettre {
flex: 0 0 auto;
min-width: 2.25rem;
padding: 0.15rem 0.4rem;
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--nav-primary-solid) 10%, transparent);
color: var(--text);
font-weight: var(--fw-bold);
font-size: var(--fs-sm);
text-align: center;
letter-spacing: 0.04em;
transition: background-color 200ms var(--ease-out);
}
.schema__porte-texte {
display: flex;
flex-direction: column;
min-width: 0;
}
.schema__porte-titre {
font-weight: var(--fw-semibold);
font-size: var(--fs-base);
line-height: var(--lh-tight);
}
.schema__porte-accroche {
margin-top: 0.15rem;
font-size: var(--fs-sm);
line-height: 1.35;
color: color-mix(in srgb, var(--text) 78%, transparent);
}
.schema__porte-fleche {
margin-left: auto;
font-size: var(--fs-xl);
line-height: 1;
color: color-mix(in srgb, var(--text) 78%, transparent);
}
.schema__porte:hover,
.schema__porte--survol {
border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
.schema__porte:hover .schema__porte-lettre,
.schema__porte--survol .schema__porte-lettre,
.schema__porte--actif .schema__porte-lettre {
background: var(--accent);
color: var(--on-accent);
}
.schema__porte--actif {
border-color: var(--accent);
}
/* ── Grand : l'état 0 ──────────────────────────────────────────────────── */
.schema--grand {
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-areas: "avant" "figure" "portes" "apres";
gap: var(--space-sm);
width: 100%;
max-width: 30rem;
margin-inline: auto;
}
.schema--grand .schema__avant { grid-area: avant; }
.schema--grand .schema__figure {
grid-area: figure;
justify-self: center;
width: 100%;
max-width: 27.5rem;
}
.schema--grand .schema__portes { grid-area: portes; }
.schema--grand .schema__apres { grid-area: apres; }
@media (min-width: 1024px) {
.schema--grand {
max-width: 68rem;
grid-template-columns: minmax(0, 604px) minmax(0, 26rem);
grid-template-rows: 1fr auto 1fr;
grid-template-areas: "figure avant" "figure portes" "figure apres";
column-gap: var(--space-2xl);
row-gap: var(--space-md);
align-items: center;
justify-content: center;
}
.schema--grand .schema__avant { align-self: end; }
.schema--grand .schema__apres { align-self: start; }
.schema--grand .schema__figure { max-width: 604px; }
.schema--grand .schema__flux,
.schema--grand .schema__legende { display: inline; }
/* Corps du deck pour les noms (16 px environ à 1 440), mots un peu plus petits qu'au téléphone */
.schema--grand .schema__nom { font-size: 22px; }
.schema__mots { font-size: 23px; }
.schema__mot-s { font-size: calc(100cqw * 23 / 820); }
/* Les arcs sont à l'écran : le bandeau M passe derrière le secteur de « ce qui revient » */
.schema__bandeau--masque {
-webkit-mask-image: var(--masque);
mask-image: var(--masque);
}
}
/* ── Mini : la porte ouverte ───────────────────────────────────────────── */
.schema--mini {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.schema--mini .schema__figure { display: none; }
.schema--mini .schema__portes {
flex-direction: row;
gap: 4px;
}
.schema--mini .schema__porte {
justify-content: center;
min-width: 44px;
padding: 0 var(--space-xs);
}
.schema--mini .schema__porte-lettre {
min-width: 2rem;
}
/* Au téléphone, la lettre seule ; le titre reste lu par les lecteurs d'écran. */
.schema--mini .schema__porte-titre,
.schema__fermer-texte {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
.schema__fermer {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-xs);
min-width: 44px;
min-height: 44px;
border-radius: var(--radius-md);
color: var(--text);
font-size: var(--fs-sm);
font-weight: var(--fw-semibold);
text-decoration: none;
}
.schema__fermer:hover { background: var(--bg-alt); }
.schema__fermer:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 2px;
}
.schema__fermer-icone {
width: 32px;
height: 32px;
overflow: visible;
}
.schema__fermer-icone circle {
fill: color-mix(in srgb, var(--nav-primary-solid) 6%, transparent);
stroke: color-mix(in srgb, var(--nav-primary-solid) 60%, transparent);
stroke-width: 1.5px;
transition: fill 200ms var(--ease-out), stroke 200ms var(--ease-out);
}
.schema__fermer-icone .schema__fermer-actif {
fill: color-mix(in srgb, var(--accent) 35%, transparent);
stroke: var(--accent);
stroke-width: 2px;
}
@media (min-width: 1024px) {
.schema--mini {
flex-direction: column;
align-items: stretch;
gap: var(--space-md);
}
.schema--mini .schema__fermer {
justify-content: flex-start;
padding: 0 var(--space-xs);
}
.schema--mini .schema__fermer-icone { display: none; }
.schema--mini .schema__fermer-texte,
.schema--mini .schema__porte-titre {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
white-space: normal;
}
.schema--mini .schema__fermer-texte::before {
content: "← " / "";
}
.schema--mini .schema__figure {
display: block;
width: 100%;
max-width: 15rem;
align-self: center;
}
.schema--mini .schema__portes { flex-direction: column; }
.schema--mini .schema__porte {
justify-content: flex-start;
padding: var(--space-xs) var(--space-sm);
}
}
@media (prefers-reduced-motion: reduce) {
.schema__zone,
.schema__trait,
.schema__porte,
.schema__porte-lettre,
.schema__fermer-icone circle { transition: none; }
}
</style>
<!--
Apparition (B13-M6), hors du bloc scoped : les @keyframes gardent leur nom et
`html.entree-vue` (posé avant le premier rendu par la page si l'apparition a
déjà été vue) doit pouvoir l'éteindre. Délais en style en ligne (rang).
Reduced motion = état final au premier rendu : `animation: none`, pas une durée
raccourcie (le deck gardait les délais et cachait des éléments près d'une seconde).
-->
<style>
.schema--apparition .schema__anneau {
animation: aep-schema-anneau 450ms var(--ease-out) backwards;
transform-box: fill-box;
transform-origin: center;
}
.schema--apparition .schema__lettre,
.schema--apparition .schema__nom {
animation: aep-schema-texte 250ms var(--ease-out) backwards;
}
.schema--apparition .schema__flux,
.schema--apparition .schema__legende {
animation: aep-schema-texte 250ms var(--ease-out) 650ms backwards;
}
.schema--apparition .schema__bandeau,
.schema--apparition .schema__mots-s {
animation: aep-schema-texte 250ms var(--ease-out) backwards;
}
@keyframes aep-schema-anneau {
from { opacity: 0; transform: scale(0.9); }
to { opacity: 1; transform: none; }
}
/*
Les mots en mouvement (B13b-M1). Durées et délais en style en ligne (utils/figures.ts,
MOUVEMENT_MOTS) : un tour de bandeau en 75 s après l'apparition ; un mot de S toutes
les 2,5 s. Les pourcentages de `aep-mot-s` valent pour 7 mots : 2,1 s visible
(12 %), fondu de 400 ms jusqu'à 2,5 s (14,286 %), éteint, fondu d'entrée à 17,1 s (97,714 %).
*/
.schema__tour {
animation: aep-schema-tour-horaire 75s linear 900ms infinite;
}
.schema__tour--antihoraire { animation-name: aep-schema-tour-antihoraire; }
.schema__mot-s {
animation: aep-mot-s 17.5s linear infinite;
}
.schema__figure--fige .schema__tour,
.schema__figure--fige .schema__mot-s {
animation-play-state: paused;
}
@keyframes aep-schema-tour-horaire {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes aep-schema-tour-antihoraire {
from { transform: rotate(0deg); }
to { transform: rotate(-360deg); }
}
@keyframes aep-mot-s {
0%, 12% { opacity: 1; }
14.286%, 97.714% { opacity: 0; }
100% { opacity: 1; }
}
@keyframes aep-schema-texte {
from { opacity: 0; }
to { opacity: 1; }
}
html.entree-vue .schema--apparition .schema__anneau,
html.entree-vue .schema--apparition .schema__lettre,
html.entree-vue .schema--apparition .schema__nom,
html.entree-vue .schema--apparition .schema__flux,
html.entree-vue .schema--apparition .schema__legende,
html.entree-vue .schema--apparition .schema__bandeau,
html.entree-vue .schema--apparition .schema__mots-s {
animation: none;
}
@media (prefers-reduced-motion: reduce) {
.schema--apparition .schema__anneau,
.schema--apparition .schema__lettre,
.schema--apparition .schema__nom,
.schema--apparition .schema__flux,
.schema--apparition .schema__legende,
.schema--apparition .schema__bandeau,
.schema--apparition .schema__mots-s,
.schema__tour,
.schema__mot-s {
animation: none;
}
/* rien ne bouge : le bouton pause n'a plus d'objet */
.schema__pause { display: none; }
}
</style>