merge: feat/aep-b13-entree — checkpoint AEP (intégration du 22/10)
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<section class="echelle-tete" :class="{ 'echelle-tete--compact': compact }" :aria-label="`Échelle ${e.id} : ${e.titre}`">
|
||||
<p class="echelle-tete__kicker">
|
||||
<component
|
||||
:is="titreNiveau ?? 'p'"
|
||||
:id="titreId"
|
||||
:tabindex="titreNiveau ? -1 : undefined"
|
||||
class="echelle-tete__kicker"
|
||||
>
|
||||
<span class="echelle-tete__badge" aria-hidden="true">{{ e.id }}</span>
|
||||
<span class="echelle-tete__titre">{{ e.titre }}<span v-if="e.sousTitre" class="echelle-tete__sous-titre">{{ ' ' + e.sousTitre }}</span></span>
|
||||
</p>
|
||||
</component>
|
||||
<ul class="echelle-tete__mots">
|
||||
<li v-for="m in e.mots" :key="m">{{ m }}</li>
|
||||
</ul>
|
||||
@@ -25,7 +30,14 @@ const props = withDefaults(defineProps<{
|
||||
compact?: boolean
|
||||
/** Affiche la ligne « on pose l'infrastructure, le collectif nourrit ». */
|
||||
contribuer?: boolean
|
||||
}>(), { compact: false, contribuer: true })
|
||||
/**
|
||||
* Titre en vrai titre de section (B13 : la porte ouverte de l'entrée), focalisable
|
||||
* par programme (tabindex -1) ; sans lui, un paragraphe, comme avant.
|
||||
*/
|
||||
titreNiveau?: 'h2' | 'h3'
|
||||
/** id du titre, pour `aria-labelledby` et le focus. */
|
||||
titreId?: string
|
||||
}>(), { compact: false, contribuer: true, titreNiveau: undefined, titreId: undefined })
|
||||
|
||||
defineEmits<{ navigate: [] }>()
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<!--
|
||||
BandeauEchelles — B13b-M3
|
||||
Les trois échelles en trois ronds reliés par un trait, comme un « 1 2 3 » (retour de Jules
|
||||
du 13/10) : S — M — XL, centrés ; l'active en safran plein (`--accent` / `--on-accent`),
|
||||
les autres en contour ; le nom de l'active en petit dessous (un seul texte, jamais trois).
|
||||
Le rond est le lien (≥ 44 px, lettre à 15 px) : plus de pastille dans un bouton.
|
||||
Ordre et textes : utils/echelles.ts (ORDRE_ECHELLES, ECHELLES[id].titre), rien de recopié.
|
||||
|
||||
Le composant ne connaît ni l'entrée ni la route : `lien(id)` dit où mène chaque rond,
|
||||
`replace` comment, `actif` lequel est allumé. Sur l'entrée : `?porte=` en `replace`.
|
||||
Pour B14 (remplacer la barre NavEchelles sur toutes les pages) : `lien` vise la porte
|
||||
de l'entrée, `actif` lit `echelleDeRoute(route)?.echelle`, `courant="page"`, `:nom="false"`
|
||||
si la barre n'a pas la hauteur du nom ; aucune réécriture du composant. Ce qu'il ne porte
|
||||
pas : les onglets de chaque groupe (NavEchelles en affiche sept) ; sur l'entrée, ils sont
|
||||
dans la rangée de boutons de la porte.
|
||||
-->
|
||||
<template>
|
||||
<nav class="pas" :aria-label="libelle">
|
||||
<ol class="pas__liste">
|
||||
<li v-for="id in ORDRE_ECHELLES" :key="id" class="pas__item">
|
||||
<NuxtLink
|
||||
:to="lien(id)"
|
||||
:replace="replace"
|
||||
class="pas__rond"
|
||||
:class="{ 'pas__rond--actif': actif === id }"
|
||||
:aria-current="actif === id ? courant : undefined"
|
||||
:data-porte="id"
|
||||
><span aria-hidden="true">{{ id }}</span><span class="sr-only">{{ id }} · {{ ECHELLES[id].titre }}</span></NuxtLink>
|
||||
</li>
|
||||
</ol>
|
||||
<p v-if="actif && nom" class="pas__nom" aria-hidden="true">{{ ECHELLES[actif].titre }}</p>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { RouteLocationRaw } from 'vue-router'
|
||||
import { ECHELLES, ORDRE_ECHELLES, type EchelleId } from '~/utils/echelles'
|
||||
|
||||
withDefaults(defineProps<{
|
||||
/** Échelle allumée (safran plein), ou aucune. */
|
||||
actif?: EchelleId | null
|
||||
/** Où mène chaque rond. */
|
||||
lien: (id: EchelleId) => RouteLocationRaw
|
||||
/** Navigation en `replace` (passage latéral de l'entrée). */
|
||||
replace?: boolean
|
||||
/** Valeur d'`aria-current` sur l'actif : `true` sur l'entrée, `page` dans une barre de site. */
|
||||
courant?: 'true' | 'page' | 'location'
|
||||
/** Nom de la navigation pour les lecteurs d'écran. */
|
||||
libelle?: string
|
||||
/** Le nom de l'échelle active, en petit sous les ronds. */
|
||||
nom?: boolean
|
||||
}>(), { actif: null, replace: false, courant: 'true', libelle: 'Échelles S, M, XL', nom: true })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pas {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.pas__liste {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.pas__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/* Le trait qui relie deux ronds */
|
||||
.pas__item + .pas__item::before {
|
||||
content: "";
|
||||
width: 16px;
|
||||
height: 2px;
|
||||
background: var(--border-strong);
|
||||
}
|
||||
|
||||
.pas__rond {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border: 2px solid var(--border-strong);
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
font-size: 15px;
|
||||
font-weight: var(--fw-bold);
|
||||
letter-spacing: 0.02em;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out);
|
||||
}
|
||||
.pas__rond:hover { border-color: var(--accent); }
|
||||
.pas__rond:focus-visible {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.pas__rond--actif {
|
||||
border-color: var(--accent);
|
||||
background: var(--accent);
|
||||
color: var(--on-accent);
|
||||
}
|
||||
|
||||
.pas__nom {
|
||||
margin: 0;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: var(--fw-semibold);
|
||||
line-height: 1.3;
|
||||
color: color-mix(in srgb, var(--text) 78%, transparent);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.pas__rond { transition: none; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,856 @@
|
||||
<!--
|
||||
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).
|
||||
B13b-M2 : le grand schéma reste à l'écran quand une porte s'ouvre (`reduit`), la page
|
||||
ne le remplace plus. Téléphone : la figure passe à 40 % de sa largeur (280 ms), le titre,
|
||||
les portes et la phrase se replient (hauteur 1fr → 0fr) ; bureau : la figure se réduit
|
||||
à 15rem en tête de colonne, sous « ← Revenir au schéma » (la page la fait glisser, FLIP).
|
||||
Réduite, la figure est décorative : ni noms ni mots (illisibles à cette taille), bandeaux
|
||||
arrêtés ; ses anneaux restent des cibles (passage latéral, `replace`).
|
||||
taille="mini" (porte ouverte, B13b-M3) : le bandeau, trois ronds S — M — XL reliés
|
||||
(BandeauEchelles), centrés, l'actif en safran ; au téléphone, « ← Schéma » à gauche
|
||||
(au bureau, le retour est en tête de colonne, porté par le grand schéma réduit).
|
||||
Collant au téléphone, sous la figure réduite au bureau. 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>
|
||||
<div
|
||||
class="schema"
|
||||
:class="[`schema--${taille}`, { 'schema--apparition': joueApparition, 'schema--reduit': taille === 'grand' && reduit }]"
|
||||
@mouseleave="survol = null"
|
||||
>
|
||||
<!-- Repliables (B13b-M2) : une grille d'une ligne qui passe de 1fr à 0fr. -->
|
||||
<div v-if="$slots.avant" class="schema__plie schema__avant"><div class="schema__plie-dedans"><slot name="avant" /></div></div>
|
||||
|
||||
<!-- Mini : le bandeau. Au téléphone, le retour au schéma à gauche, les trois ronds au centre. -->
|
||||
<template v-if="taille === 'mini'">
|
||||
<a
|
||||
:href="hrefSchema"
|
||||
class="schema__fermer"
|
||||
@click.prevent="emit('fermer')"
|
||||
><span aria-hidden="true">←</span><span class="sr-only">Revenir au </span>Schéma</a>
|
||||
<BandeauEchelles :actif="actif" :lien="lienPorte" replace class="schema__pas" />
|
||||
</template>
|
||||
|
||||
<!-- Bureau, porte ouverte : le retour en tête de colonne, au-dessus de la figure réduite. -->
|
||||
<a
|
||||
v-if="taille === 'grand' && reduit"
|
||||
:href="hrefSchema"
|
||||
class="schema__retour"
|
||||
@click.prevent="emit('fermer')"
|
||||
><span aria-hidden="true">←</span>Revenir au schéma</a>
|
||||
|
||||
<div v-if="taille === 'grand'" class="schema__plie schema__fig"><div class="schema__plie-dedans">
|
||||
<div class="schema__figure" :class="{ 'schema__figure--fige': fige }">
|
||||
<svg
|
||||
class="schema__dessin"
|
||||
:viewBox="`0 0 ${SCHEMA_L} ${SCHEMA_H}`"
|
||||
:role="reduit ? undefined : 'img'"
|
||||
:aria-label="reduit ? undefined : description"
|
||||
:aria-hidden="reduit ? '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"
|
||||
:class="`schema__lettre--${a.id}`"
|
||||
: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)"
|
||||
><span v-for="ligne in lignesMotS(m)" :key="ligne" class="schema__mot-ligne">{{ ligne }}</span></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>
|
||||
</div></div>
|
||||
|
||||
<!-- Grand : les trois portes, qui se replient dans le bandeau quand une porte s'ouvre. -->
|
||||
<Transition name="schema-plier">
|
||||
<div v-if="taille === 'grand' && !reduit" class="schema__plie schema__portes-plie"><div class="schema__plie-dedans">
|
||||
<ul class="schema__portes">
|
||||
<li v-for="id in ORDRE_ECHELLES" :key="id">
|
||||
<NuxtLink
|
||||
:to="lienPorte(id)"
|
||||
class="schema__porte"
|
||||
:class="{ 'schema__porte--survol': survol === id }"
|
||||
: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 class="schema__porte-accroche">{{ ECHELLES[id].accroche }}</span>
|
||||
</span>
|
||||
<span class="schema__porte-fleche" aria-hidden="true">›</span>
|
||||
</NuxtLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div></div>
|
||||
</Transition>
|
||||
|
||||
<div v-if="$slots.apres" class="schema__plie schema__apres"><div class="schema__plie-dedans"><slot name="apres" /></div></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useId } from 'vue'
|
||||
import BandeauEchelles from '~/components/entree/BandeauEchelles.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, lignesMotS, 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
|
||||
/**
|
||||
* Grand, porte ouverte (B13b-M2) : la figure reste, réduite, et ses anneaux passent
|
||||
* d'une porte à l'autre en `replace` ; le titre, les portes et la phrase se replient.
|
||||
*/
|
||||
reduit?: boolean
|
||||
}>(), { actif: null, apparition: false, reduit: 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 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) {
|
||||
// Porte déjà ouverte (mini, ou grand réduit) : un anneau fait passer à la voisine, en `replace`.
|
||||
const lateral = props.taille === 'mini' || props.reduit
|
||||
if (lateral && props.actif === id) return
|
||||
navigateTo(lienPorte(id), { replace: lateral })
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
/* Repliables (B13b-M2) : la hauteur passe de 1fr à 0fr, CSS seul. */
|
||||
.schema__plie {
|
||||
display: grid;
|
||||
grid-template-rows: 1fr;
|
||||
min-width: 0;
|
||||
}
|
||||
.schema__plie-dedans { min-height: 0; min-width: 0; }
|
||||
.schema__avant > .schema__plie-dedans,
|
||||
.schema__apres > .schema__plie-dedans { overflow: hidden; }
|
||||
.schema-plier-enter-active > .schema__plie-dedans,
|
||||
.schema-plier-leave-active > .schema__plie-dedans { overflow: hidden; }
|
||||
|
||||
/* Retour au schéma, en tête de colonne (bureau seulement ; au téléphone, il est dans le bandeau). */
|
||||
.schema__retour { display: none; }
|
||||
|
||||
.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;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
/* 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; }
|
||||
/* Coupure écrite par lignesMotS (utils/figures.ts) : une ligne ne se recoupe pas. */
|
||||
.schema__mot-ligne { white-space: nowrap; }
|
||||
.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 {
|
||||
background: var(--accent);
|
||||
color: var(--on-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__fig {
|
||||
grid-area: figure;
|
||||
justify-self: center;
|
||||
width: 100%;
|
||||
max-width: 27.5rem;
|
||||
}
|
||||
.schema--grand .schema__portes-plie { grid-area: portes; }
|
||||
.schema--grand .schema__apres { grid-area: apres; }
|
||||
|
||||
/* ── Grand réduit : la porte est ouverte, le schéma reste (B13b-M2) ───── */
|
||||
.schema--reduit .schema__avant,
|
||||
.schema--reduit .schema__apres {
|
||||
grid-template-rows: 0fr;
|
||||
opacity: 0;
|
||||
}
|
||||
/* Le titre reste lu (h1 de la page) ; la phrase sort de l'arbre une fois repliée. */
|
||||
.schema--reduit .schema__apres { visibility: hidden; }
|
||||
/* Réduite, la figure n'a plus que ses anneaux et ses lettres, plus grandes pour rester lisibles. */
|
||||
.schema--reduit .schema__nom,
|
||||
.schema--reduit .schema__flux,
|
||||
.schema--reduit .schema__legende,
|
||||
.schema--reduit .schema__bandeau,
|
||||
.schema--reduit .schema__mots-s,
|
||||
.schema--reduit .schema__pause {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
.schema--reduit .schema__lettre { font-size: 60px; }
|
||||
.schema--reduit .schema__lettre--S {
|
||||
transform: translateY(22px);
|
||||
}
|
||||
|
||||
@media (max-width: 1023.98px) {
|
||||
.schema--reduit .schema__fig { width: 40%; }
|
||||
.schema--grand.schema--reduit { row-gap: 0; }
|
||||
.schema--grand { transition: row-gap 280ms var(--ease-out); }
|
||||
.schema--grand .schema__fig { transition: width 280ms var(--ease-out); }
|
||||
.schema__lettre { transition: font-size 280ms var(--ease-out), transform 280ms var(--ease-out); }
|
||||
.schema__avant,
|
||||
.schema__apres {
|
||||
transition: grid-template-rows 280ms var(--ease-out), opacity 200ms var(--ease-out), visibility 0s linear 0s;
|
||||
}
|
||||
.schema--reduit .schema__apres { transition-delay: 0s, 0s, 280ms; }
|
||||
.schema__nom,
|
||||
.schema__bandeau,
|
||||
.schema__mots-s,
|
||||
.schema__pause {
|
||||
transition: opacity 150ms var(--ease-out), visibility 0s linear 0s;
|
||||
}
|
||||
.schema--reduit .schema__nom,
|
||||
.schema--reduit .schema__bandeau,
|
||||
.schema--reduit .schema__mots-s,
|
||||
.schema--reduit .schema__pause { transition-delay: 0s, 150ms; }
|
||||
.schema-plier-enter-active,
|
||||
.schema-plier-leave-active {
|
||||
transition: grid-template-rows 280ms var(--ease-out), opacity 200ms var(--ease-out);
|
||||
}
|
||||
.schema-plier-enter-from,
|
||||
.schema-plier-leave-to {
|
||||
grid-template-rows: 0fr;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@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__fig { max-width: 604px; }
|
||||
|
||||
/* Porte ouverte : une colonne, le retour, la figure réduite (la page la fait glisser). */
|
||||
.schema--grand.schema--reduit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: var(--space-md);
|
||||
max-width: none;
|
||||
}
|
||||
.schema--reduit .schema__fig {
|
||||
max-width: 15rem;
|
||||
align-self: center;
|
||||
}
|
||||
.schema--reduit .schema__avant {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.schema--reduit .schema__apres { display: none; }
|
||||
.schema__retour {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
align-self: flex-start;
|
||||
min-height: 44px;
|
||||
padding: 0 var(--space-xs);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: var(--fw-semibold);
|
||||
text-decoration: none;
|
||||
}
|
||||
.schema__retour:hover { background: var(--bg-alt); }
|
||||
.schema__retour:focus-visible {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
/* Retour au schéma : les portes reviennent en fondu, la figure glisse. */
|
||||
.schema-plier-enter-active { transition: opacity 200ms var(--ease-out); }
|
||||
.schema-plier-enter-from { opacity: 0; }
|
||||
.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 : le bandeau de la porte ouverte (B13b-M3) ───────────────────── */
|
||||
/* Téléphone : « ← Schéma » | trois ronds au centre exact | une colonne vide de même largeur. */
|
||||
.schema--mini {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
align-items: center;
|
||||
column-gap: var(--space-xs);
|
||||
padding: 4px 0;
|
||||
}
|
||||
.schema--mini .schema__pas { grid-column: 2; }
|
||||
|
||||
.schema__fermer {
|
||||
grid-column: 1;
|
||||
justify-self: start;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3em;
|
||||
min-height: 44px;
|
||||
padding: 0 var(--space-xs) 0 0;
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: var(--fw-semibold);
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
}
|
||||
.schema__fermer:hover { text-decoration: underline; text-underline-offset: 3px; }
|
||||
.schema__fermer:focus-visible {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
/* Bureau : les ronds centrés dans la colonne ; le retour est en tête de colonne (grand réduit). */
|
||||
.schema--mini {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
}
|
||||
.schema--mini .schema__fermer { display: none; }
|
||||
}
|
||||
|
||||
/*
|
||||
Mouvement réduit : état final, échange immédiat. `!important` : ces règles doivent l'emporter
|
||||
sur les transitions posées plus haut avec un sélecteur plus fort (téléphone, figure réduite) ;
|
||||
sans transition, la <Transition> de Vue retire aussi les portes sans attendre.
|
||||
*/
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.schema__zone,
|
||||
.schema__trait,
|
||||
.schema__porte,
|
||||
.schema__porte-lettre,
|
||||
.schema--grand,
|
||||
.schema__lettre,
|
||||
.schema__fig,
|
||||
.schema__avant,
|
||||
.schema__apres,
|
||||
.schema__nom,
|
||||
.schema__flux,
|
||||
.schema__legende,
|
||||
.schema__bandeau,
|
||||
.schema__mots-s,
|
||||
.schema__pause,
|
||||
.schema-plier-enter-active,
|
||||
.schema-plier-leave-active { transition: none !important; }
|
||||
}
|
||||
</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,
|
||||
.schema--reduit .schema__tour,
|
||||
.schema--reduit .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>
|
||||
@@ -0,0 +1,234 @@
|
||||
<!--
|
||||
SectionEchelle — B13-M4
|
||||
La porte ouverte d'une échelle, sous le mini-schéma de l'entrée (CONCEPTION §1, état 1).
|
||||
Dans l'ordre de lecture à l'écran (parti 1 : une intention, puis un geste) :
|
||||
titre (h2, cible du focus après ouverture ou passage latéral)
|
||||
intention = la phrase de l'échelle
|
||||
une seule rangée de boutons de même style (B13b-M5, `PORTES_ECHELLES[id]`) : le geste,
|
||||
puis les onglets d'une autre cible ; sur M, un bouton « Écosystème d'entraide et
|
||||
réseaux AEP » (la barre B10 garde ses deux onglets jusqu'à B4)
|
||||
anneau (AnneauEchelle, en safran) + les sept mots
|
||||
<slot /> : la matière de l'échelle (B15 pour XL, B16 pour M et S) ; tant qu'il est vide,
|
||||
« Cette échelle est en construction. » et « Proposer une ressource » (B13b-M6) :
|
||||
la condition porte sur le slot, la ligne disparaîtra d'elle-même
|
||||
puis les voisines (passage latéral, en `replace`)
|
||||
Liens sortants sans préchargement : l'entrée ne tire ni la carte (Leaflet), ni le chatbot,
|
||||
ni d3 tant que le visiteur n'a pas choisi (la barre B10 d'app.vue, elle, précharge dès 768 px).
|
||||
B13b-M4 : un clic simple sur un lien sortant émet `partir` (la page replie la section vers
|
||||
le haut, puis navigue) ; un clic modifié (Ctrl, Cmd, Maj, molette) garde la navigation
|
||||
du navigateur. Les `href` rendus ne changent pas : le lien marche sans JavaScript.
|
||||
Titre, phrase et mots viennent d'EchelleTete (contrat B10) ; la section ne fait que
|
||||
les replacer en grille et y glisser le geste et l'anneau. Aucun texte recopié :
|
||||
utils/echelles.ts fait foi.
|
||||
-->
|
||||
<template>
|
||||
<section class="porte" :class="`porte--${echelle}`" :aria-labelledby="titreId">
|
||||
<EchelleTete
|
||||
:echelle="echelle"
|
||||
:contribuer="false"
|
||||
titre-niveau="h2"
|
||||
:titre-id="titreId"
|
||||
class="porte__tete"
|
||||
>
|
||||
<nav class="porte__rangee" :aria-label="`Pages de l'échelle ${e.id}`">
|
||||
<ul class="porte__boutons">
|
||||
<li v-for="b in boutons" :key="b.to">
|
||||
<NuxtLink v-slot="{ href }" :to="b.to" custom no-prefetch>
|
||||
<a :href="href" class="porte__bouton" @click="partir($event, b.to)">{{ b.libelle }}<span aria-hidden="true">→</span></a>
|
||||
</NuxtLink>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<AnneauEchelle :echelle="echelle" actif class="porte__anneau" />
|
||||
</EchelleTete>
|
||||
|
||||
<div v-if="$slots.default" class="porte__matiere"><slot /></div>
|
||||
<p v-else class="porte__construction">
|
||||
<span>{{ PORTE_EN_CONSTRUCTION.texte }}</span>
|
||||
<NuxtLink v-slot="{ href }" :to="lienProposer(echelle)" custom no-prefetch>
|
||||
<a :href="href" class="porte__proposer" @click="partir($event, lienProposer(echelle))">{{ PORTE_EN_CONSTRUCTION.proposer }}<span aria-hidden="true">→</span></a>
|
||||
</NuxtLink>
|
||||
</p>
|
||||
|
||||
<nav v-if="v.precedente || v.suivante" class="porte__voisines" aria-label="Échelles voisines">
|
||||
<NuxtLink
|
||||
v-if="v.precedente"
|
||||
:to="lienPorte(v.precedente)"
|
||||
replace
|
||||
class="porte__voisine porte__voisine--precedente"
|
||||
><span aria-hidden="true">←</span>{{ v.precedente }} · {{ ECHELLES[v.precedente].titre }}</NuxtLink>
|
||||
<NuxtLink
|
||||
v-if="v.suivante"
|
||||
:to="lienPorte(v.suivante)"
|
||||
replace
|
||||
class="porte__voisine porte__voisine--suivante"
|
||||
>{{ v.suivante }} · {{ ECHELLES[v.suivante].titre }}<span aria-hidden="true">→</span></NuxtLink>
|
||||
</nav>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ECHELLES, PARAM_PORTE, PORTES_ECHELLES, PORTE_EN_CONSTRUCTION, lienProposer, voisines,
|
||||
type EchelleId,
|
||||
} from '~/utils/echelles'
|
||||
import AnneauEchelle from '~/components/figures/AnneauEchelle.vue'
|
||||
|
||||
const props = defineProps<{ echelle: EchelleId }>()
|
||||
const emit = defineEmits<{ partir: [to: string] }>()
|
||||
|
||||
/**
|
||||
* Lien sortant (B13b-M4) : clic simple → la page replie l'entrée puis navigue ;
|
||||
* clic modifié ou autre bouton → rien n'est intercepté, le navigateur fait son travail.
|
||||
*/
|
||||
function partir(ev: MouseEvent, to: string) {
|
||||
if (ev.defaultPrevented || ev.button !== 0 || ev.metaKey || ev.ctrlKey || ev.shiftKey || ev.altKey) return
|
||||
ev.preventDefault()
|
||||
emit('partir', to)
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
const e = computed(() => ECHELLES[props.echelle])
|
||||
/** La rangée de boutons de la porte (geste et onglets réunis, sans doublon). */
|
||||
const boutons = computed(() => PORTES_ECHELLES[props.echelle])
|
||||
const v = computed(() => voisines(props.echelle))
|
||||
/** id stable par échelle : la page y pose le focus après une ouverture ou un passage latéral. */
|
||||
const titreId = computed(() => `porte-titre-${props.echelle}`)
|
||||
|
||||
const lienPorte = (id: EchelleId) => ({ path: route.path, query: { ...route.query, [PARAM_PORTE]: id } })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.porte {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-lg);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* EchelleTete replacée en grille : titre, intention, rangée de boutons, puis l'anneau à côté des mots. */
|
||||
.porte .porte__tete {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
"titre titre"
|
||||
"phrase phrase"
|
||||
"geste geste"
|
||||
"anneau mots";
|
||||
column-gap: var(--space-md);
|
||||
row-gap: var(--space-sm);
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
}
|
||||
.porte__tete :deep(.echelle-tete__kicker) {
|
||||
grid-area: titre;
|
||||
scroll-margin-top: 4.5rem;
|
||||
}
|
||||
.porte__tete :deep(.echelle-tete__kicker:focus) { outline: none; }
|
||||
.porte__tete :deep(.echelle-tete__kicker:focus-visible) {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.porte__tete :deep(.echelle-tete__titre) { font-size: var(--fs-xl); }
|
||||
/* Texte atténué lisible (DESIGN-SYSTEM §Navigation : 78 %, pas --text-muted), ici seulement. */
|
||||
.porte__tete :deep(.echelle-tete__sous-titre) {
|
||||
color: color-mix(in srgb, var(--text) 78%, transparent);
|
||||
}
|
||||
.porte__tete :deep(.echelle-tete__phrase) {
|
||||
grid-area: phrase;
|
||||
font-size: var(--fs-base);
|
||||
font-style: normal;
|
||||
color: color-mix(in srgb, var(--text) 78%, transparent);
|
||||
}
|
||||
.porte__tete :deep(.echelle-tete__mots) { grid-area: mots; }
|
||||
|
||||
/* Une seule rangée, tous les boutons du style du geste (B13b-M5) ; retour à la ligne permis. */
|
||||
.porte__rangee { grid-area: geste; }
|
||||
.porte__boutons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-xs);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.porte__bouton {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
min-height: 44px;
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--accent);
|
||||
color: var(--on-accent);
|
||||
font-weight: var(--fw-semibold);
|
||||
line-height: var(--lh-tight);
|
||||
text-decoration: none;
|
||||
}
|
||||
.porte__bouton:hover { opacity: 0.88; }
|
||||
.porte__bouton:focus-visible,
|
||||
.porte__proposer:focus-visible,
|
||||
.porte__voisine:focus-visible {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* En construction (B13b-M6) : une ligne, puis un bouton secondaire (contour, pas safran). */
|
||||
.porte__construction {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-xs) var(--space-sm);
|
||||
margin: 0;
|
||||
font-size: var(--fs-sm);
|
||||
color: color-mix(in srgb, var(--text) 78%, transparent);
|
||||
}
|
||||
.porte__proposer {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
min-height: 44px;
|
||||
padding: var(--space-xs) var(--space-md);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
font-weight: var(--fw-semibold);
|
||||
text-decoration: none;
|
||||
}
|
||||
.porte__proposer:hover { border-color: var(--accent); }
|
||||
|
||||
.porte__anneau {
|
||||
grid-area: anneau;
|
||||
width: 4.5rem;
|
||||
}
|
||||
|
||||
.porte__voisines {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-xs);
|
||||
padding-top: var(--space-md);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.porte__voisine {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4em;
|
||||
min-height: 44px;
|
||||
padding: 0 var(--space-sm);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: var(--fw-semibold);
|
||||
text-decoration: none;
|
||||
}
|
||||
.porte__voisine:hover { border-color: var(--accent); }
|
||||
.porte__voisine--suivante { margin-left: auto; }
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.porte__anneau { width: 6rem; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<!--
|
||||
AnneauEchelle — B13-M3
|
||||
L'anneau seul d'une échelle (deck v3.3, slides 17-19, `drawRing`) : un cercle plein,
|
||||
un cercle intérieur en pointillés, la lettre. Le nom que le deck écrivait au bas de
|
||||
l'anneau tombe : à la taille d'une vignette il serait illisible, et le titre de
|
||||
l'échelle est juste à côté.
|
||||
Décoratif (aria-hidden) : le titre et les sept mots portent le sens.
|
||||
Bleu nuit à 60 % (parti 2), safran quand `actif`. Géométrie : utils/figures.ts.
|
||||
La taille se règle de l'extérieur (largeur CSS) ; le trait garde son épaisseur à toute taille.
|
||||
-->
|
||||
<template>
|
||||
<svg
|
||||
class="anneau-echelle"
|
||||
:class="{ 'anneau-echelle--actif': actif }"
|
||||
:viewBox="`0 0 ${ANNEAU_L} ${ANNEAU_L}`"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
>
|
||||
<circle class="anneau-echelle__plein" :cx="g.cx" :cy="g.cy" :r="g.r" />
|
||||
<circle class="anneau-echelle__pointilles" :cx="g.cx" :cy="g.cy" :r="g.rPointilles" />
|
||||
<text
|
||||
class="anneau-echelle__lettre"
|
||||
:x="g.cx"
|
||||
:y="g.yLettre"
|
||||
text-anchor="middle"
|
||||
:font-size="g.tailleLettre"
|
||||
>{{ echelle }}</text>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { EchelleId } from '~/utils/echelles'
|
||||
import { ANNEAU_L, anneauSeul } from '~/utils/figures'
|
||||
|
||||
withDefaults(defineProps<{
|
||||
echelle: EchelleId
|
||||
/** Échelle courante : anneau en safran. */
|
||||
actif?: boolean
|
||||
}>(), { actif: false })
|
||||
|
||||
const g = anneauSeul()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.anneau-echelle {
|
||||
display: block;
|
||||
width: 4.5rem;
|
||||
height: auto;
|
||||
aspect-ratio: 1;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.anneau-echelle__plein {
|
||||
fill: color-mix(in srgb, var(--nav-primary-solid) 8%, transparent);
|
||||
stroke: color-mix(in srgb, var(--nav-primary-solid) 60%, transparent);
|
||||
stroke-width: 2px;
|
||||
vector-effect: non-scaling-stroke;
|
||||
transition: fill 200ms var(--ease-out), stroke 200ms var(--ease-out);
|
||||
}
|
||||
|
||||
.anneau-echelle__pointilles {
|
||||
fill: none;
|
||||
stroke: color-mix(in srgb, var(--nav-primary-solid) 60%, transparent);
|
||||
stroke-width: 1.5px;
|
||||
stroke-dasharray: 3 4;
|
||||
vector-effect: non-scaling-stroke;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.anneau-echelle__lettre {
|
||||
fill: var(--text);
|
||||
font-family: var(--font-body);
|
||||
font-weight: var(--fw-bold);
|
||||
}
|
||||
|
||||
.anneau-echelle--actif .anneau-echelle__plein {
|
||||
fill: color-mix(in srgb, var(--accent) 22%, transparent);
|
||||
stroke: var(--accent);
|
||||
stroke-width: 3px;
|
||||
}
|
||||
|
||||
.anneau-echelle--actif .anneau-echelle__pointilles {
|
||||
stroke: var(--accent);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.anneau-echelle__plein { transition: none; }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user