Le rond qui attend : le symbole du logo devient l'indicateur de chargement

Pendant une attente, le rond se divise en trois points qui respirent,
puis se referme avec un léger rebond quand c'est prêt.

- App : écran de démarrage (BootLoader, visible seulement au-delà de 400 ms,
  au moins 900 ms pour ne pas clignoter), remplace « Chargement de l'arbre
  généalogique... ».
- App : les boutons en attente (Création…, Envoi…, Un instant…) montrent
  trois points à la place du libellé, largeur figée, texte gardé pour les
  lecteurs d'écran (PzBusy).
- Landing : chargement de la démo intégrée.
- Réduire les animations : points sur place, fondu seul.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Opus 5.5 committed 2026-09-25 12:12:58 +02:00
1 parent 629bde5dbc
commit afe4a6a6d1
25 files changed
+252 -34

No files matched your search

-11
View File
@@ -19,17 +19,6 @@
place-items: center;
}
.loading-card {
background: rgba(255, 255, 255, 0.75);
border: 1px solid #ebe6df;
border-radius: 14px;
padding: 18px 22px;
color: #2a2622;
font-size: 14px;
letter-spacing: 0.01em;
backdrop-filter: blur(8px);
}
.account-dashboard-card {
width: min(720px, 100%);
max-height: calc(100vh - 40px);
+3 -3
View File
@@ -60,6 +60,7 @@ import {
} from './utils/analytics'
import './App.css'
import './styles/pz.css'
import { setBooting } from './bootSignal.js'
function yearToIsoDate(value) {
if (value === null || value === undefined || value === '') {
@@ -429,6 +430,7 @@ function writeInvitePasswordsToStorage(treeId, passwords) {
function App() {
const auth = useAuth()
const tree = useTreeAccess()
useEffect(() => { setBooting(tree.bootState === 'loading') }, [tree.bootState])
// Arbre partagé d'où l'on vient quand on ouvre l'écran compte : on y revient après connexion/création
const pendingSharedTreeRef = useRef(null)
const refreshTreeAndKeepSelection = useCallback(async (personId, options = {}) => {
@@ -2296,9 +2298,7 @@ function App() {
if (tree.bootState === 'loading') {
return (
<div className="app app-loading">
<div className="loading-card">Chargement de l'arbre généalogique...</div>
</div>
<div className="app app-loading" />
)
}
+20
View File
@@ -0,0 +1,20 @@
import { useSyncExternalStore } from 'react'
// App signale ici si l'arbre charge encore ; BootLoader, monté à côté d'App, l'écoute.
let booting = true
const listeners = new Set()
export function setBooting(value) {
if (value === booting) return
booting = value
listeners.forEach((listener) => listener())
}
function subscribe(listener) {
listeners.add(listener)
return () => listeners.delete(listener)
}
export function useBooting() {
return useSyncExternalStore(subscribe, () => booting)
}
+2 -1
View File
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react'
import logoUrl from '../assets/parenthese-logo.svg?url'
import './AccountScreens.css'
import PzBusy from './PzBusy.jsx'
const AccessGate = ({
initialTreeId,
@@ -105,7 +106,7 @@ const AccessGate = ({
{!treeNotFound && (
<button type="submit" className="pz-btn pz-btn--primary pz-btn--block" disabled={loading}>
{loading ? 'Ouverture…' : "Ouvrir l'arbre"}
<PzBusy busy={loading} busyLabel="Ouverture de l'arbre">Ouvrir l'arbre</PzBusy>
</button>
)}
+3 -2
View File
@@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from 'react'
import { ChevronRight, KeyRound, LogOut, Plus, Sparkles, X } from 'lucide-react'
import logoUrl from '../assets/parenthese-logo.svg?url'
import './AccountScreens.css'
import PzBusy from './PzBusy.jsx'
const AccountDashboard = ({
authenticated,
@@ -157,7 +158,7 @@ const AccountDashboard = ({
{errorMessage && <div className="account-error pz-error" role="alert">{errorMessage}</div>}
<button type="submit" className="pz-btn pz-btn--primary pz-btn--block" disabled={!canSubmitAuth}>
{loading ? 'Un instant…' : isRegister ? 'Créer mon compte' : 'Se connecter'}
<PzBusy busy={loading} busyLabel={isRegister ? 'Création du compte' : 'Connexion'}>{isRegister ? 'Créer mon compte' : 'Se connecter'}</PzBusy>
</button>
{isRegister && (
@@ -319,7 +320,7 @@ const AccountDashboard = ({
Annuler
</button>
<button type="submit" className="pz-btn pz-btn--danger" disabled={deleting || !deletePassword}>
{deleting ? 'Suppression…' : 'Supprimer définitivement'}
<PzBusy busy={deleting} busyLabel="Suppression en cours">Supprimer définitivement</PzBusy>
</button>
</div>
</form>
+2 -1
View File
@@ -1,6 +1,7 @@
import { useState, useEffect, useRef } from 'react'
import { UserPlus, X, Search, ChevronDown } from 'lucide-react'
import './AddPersonPanel.css'
import PzBusy from './PzBusy.jsx'
/**
* Panneau slide-in gauche pour ajouter une personne
@@ -299,7 +300,7 @@ function AddPersonPanel({ visible, persons = [], loading = false, error = '', on
</button>
<button type="submit" className="pz-btn pz-btn--primary" disabled={!isValid || loading}>
<UserPlus size={16} strokeWidth={2} />
{loading ? 'Ajout…' : 'Ajouter cette personne'}
<PzBusy busy={loading} busyLabel="Ajout en cours">Ajouter cette personne</PzBusy>
</button>
</div>
</form>
+4 -3
View File
@@ -10,6 +10,7 @@ import {
updateTree,
updateTreeSettings,
} from '../api/treeApi'
import PzBusy from './PzBusy.jsx'
function normalizeSlug(value) {
return String(value || '')
@@ -311,7 +312,7 @@ const AdminPanel = ({
<div className="ts-actions">
<button type="submit" className="pz-btn pz-btn--primary" disabled={saving}>
{saving ? 'Enregistrement…' : 'Enregistrer'}
<PzBusy busy={saving} busyLabel="Enregistrement en cours">Enregistrer</PzBusy>
</button>
</div>
@@ -368,7 +369,7 @@ const AdminPanel = ({
Choisir un fichier
</button>
<button type="button" className="pz-btn pz-btn--primary pz-btn--sm" onClick={handleImportGedcom} disabled={saving || !gedcomFile}>
{importingGedcom ? 'Import…' : 'Importer'}
<PzBusy busy={importingGedcom} busyLabel="Import en cours">Importer</PzBusy>
</button>
</div>
</div>
@@ -443,7 +444,7 @@ const AdminPanel = ({
Annuler
</button>
<button type="button" className="pz-btn pz-btn--danger danger-action" onClick={handleDeleteTree} disabled={saving}>
{saving ? 'Suppression…' : 'Supprimer définitivement'}
<PzBusy busy={saving} busyLabel="Suppression en cours">Supprimer définitivement</PzBusy>
</button>
</div>
</div>
+49
View File
@@ -0,0 +1,49 @@
import { useEffect, useRef, useState } from 'react'
import { useBooting } from '../bootSignal.js'
import PzMark from './PzMark.jsx'
// N'apparaît que si l'attente dépasse SHOW_AFTER, reste au moins MIN_VISIBLE pour ne pas
// clignoter, puis les points se rejoignent et l'écran s'efface sur ce qui est prêt dessous.
const SHOW_AFTER = 400
const MIN_VISIBLE = 900
const MERGE = 420
const FADE = 200
export default function BootLoader() {
const booting = useBooting()
const [phase, setPhase] = useState('hidden') // hidden | rest | loading | merging | out
const shownAt = useRef(0)
useEffect(() => {
const timers = []
const later = (fn, ms) => timers.push(setTimeout(fn, ms))
if (booting) {
later(() => {
shownAt.current = performance.now()
setPhase('rest')
// une image au repos d'abord, pour que la division en trois points se voie
requestAnimationFrame(() => requestAnimationFrame(() => setPhase('loading')))
}, SHOW_AFTER)
} else if (shownAt.current) {
const wait = Math.max(0, MIN_VISIBLE - (performance.now() - shownAt.current))
later(() => setPhase('merging'), wait)
later(() => setPhase('out'), wait + MERGE)
later(() => {
setPhase('hidden')
shownAt.current = 0
}, wait + MERGE + FADE)
}
return () => timers.forEach(clearTimeout)
}, [booting])
if (phase === 'hidden') return null
const markState = phase === 'out' ? 'merging' : phase
return (
<div className={`pz-boot${phase === 'out' ? ' is-out' : ''}`} role="status">
<PzMark state={markState} />
<span className="pz-sr">{booting ? "Ouverture de l'arbre" : 'Arbre prêt'}</span>
</div>
)
}
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react'
import { Check, ChevronDown, Copy, RefreshCw, X } from 'lucide-react'
import './SettingsPanels.css'
import PzBusy from './PzBusy.jsx'
// ─── helpers ────────────────────────────────────────────────────────────────
@@ -294,7 +295,7 @@ const ContributionPanel = ({
{editingVisitorPassword ? (
<form className="contrib-pass-edit-inline" onSubmit={handleSaveVisitorPassword}>
<input className="contrib-pass-edit-input" type="password" value={newVisitorPassword} placeholder="Nouveau MDP (8+ car.)" autoFocus onChange={(e) => setNewVisitorPassword(e.target.value)} />
<button type="submit" className="contrib-pill-btn contrib-pill-btn--save" disabled={inviteSaving}>{inviteSaving ? '...' : 'Enregistrer'}</button>
<button type="submit" className="contrib-pill-btn contrib-pill-btn--save" disabled={inviteSaving}><PzBusy busy={inviteSaving} busyLabel="Enregistrement en cours">Enregistrer</PzBusy></button>
<button type="button" className="contrib-pill-btn contrib-pill-btn--ghost" onClick={() => { setEditingVisitorPassword(false); setNewVisitorPassword(''); setInviteLocalError('') }}>Annuler</button>
</form>
) : (
@@ -310,7 +311,7 @@ const ContributionPanel = ({
{editingContributorPassword ? (
<form className="contrib-pass-edit-inline" onSubmit={handleSaveContributorPassword}>
<input className="contrib-pass-edit-input" type="password" value={newContributorPassword} placeholder="Nouveau MDP (8+ car.)" autoFocus onChange={(e) => setNewContributorPassword(e.target.value)} />
<button type="submit" className="contrib-pill-btn contrib-pill-btn--save" disabled={inviteSaving}>{inviteSaving ? '...' : 'Enregistrer'}</button>
<button type="submit" className="contrib-pill-btn contrib-pill-btn--save" disabled={inviteSaving}><PzBusy busy={inviteSaving} busyLabel="Enregistrement en cours">Enregistrer</PzBusy></button>
<button type="button" className="contrib-pill-btn contrib-pill-btn--ghost" onClick={() => { setEditingContributorPassword(false); setNewContributorPassword(''); setInviteLocalError('') }}>Annuler</button>
</form>
) : (
@@ -519,7 +520,7 @@ const ContributionPanel = ({
onClick={() => applyDecisions(session.id, session.changes)}
disabled={isReviewing}
>
{isReviewing ? 'Un instant…' : `Appliquer mes choix${summary.pending > 0 ? `, ${summary.pending} sans réponse ser${summary.pending > 1 ? 'ont refusées' : 'a refusée'}` : ''}`}
<PzBusy busy={isReviewing} busyLabel="Application en cours">{`Appliquer mes choix${summary.pending > 0 ? `, ${summary.pending} sans réponse ser${summary.pending > 1 ? 'ont refusées' : 'a refusée'}` : ''}`}</PzBusy>
</button>
<div className="contrib-session-quick">
{confirmApproveAll === session.id ? (
@@ -549,7 +550,7 @@ const ContributionPanel = ({
onClick={() => setConfirmApproveAll(session.id)}
disabled={isReviewing}
>
{isReviewing ? 'Un instant…' : 'Tout accepter'}
<PzBusy busy={isReviewing} busyLabel="Application en cours">Tout accepter</PzBusy>
</button>
)}
<button type="button" className="contrib-quick-btn" onClick={() => onReviewSession(session.id, { decision: 'rejected' })} disabled={isReviewing}>Tout refuser</button>
@@ -1,6 +1,7 @@
import { useState, useEffect } from 'react'
import { Send, X } from 'lucide-react'
import './ContributionSessionModal.css'
import PzBusy from './PzBusy.jsx'
function formatAction(action) {
if (action === 'create') return 'Ajout'
@@ -116,7 +117,7 @@ function ContributionSessionModal({ visible, changes = [], recap = {}, loading =
</button>
<button type="submit" className="pz-btn pz-btn--primary" disabled={loading}>
<Send size={16} strokeWidth={2} />
{loading ? 'Envoi…' : 'Envoyer mes contributions'}
<PzBusy busy={loading} busyLabel="Envoi en cours">Envoyer mes contributions</PzBusy>
</button>
</div>
</form>
@@ -1,5 +1,6 @@
import { useState, useMemo } from 'react'
import './CreateMyTreeButton.css'
import PzBusy from './PzBusy.jsx'
function normalizeSlug(input) {
return input
@@ -78,7 +79,7 @@ const CreateMyTreeButton = ({ onCreateTree, loading }) => {
)}
{error && <div className="cmt-error">{error}</div>}
<button type="submit" className="cmt-btn-create" disabled={!canSubmit}>
{loading ? 'Création…' : 'Créer l\'arbre'}
<PzBusy busy={loading} busyLabel="Création de l'arbre">Créer l'arbre</PzBusy>
</button>
</form>
</div>
@@ -1,4 +1,5 @@
import { useMemo, useState } from 'react'
import PzBusy from './PzBusy.jsx'
const EMPTY_FORM = {
selfFirstName: '',
@@ -139,7 +140,7 @@ const InitialTreeWizard = ({ loading, errorMessage, onSubmit, onSkip }) => {
{errorMessage && <div className="wizard-error">{errorMessage}</div>}
<button type="submit" disabled={!canSubmit}>
{loading ? 'Création en cours...' : 'Créer les 3 personnes'}
<PzBusy busy={loading} busyLabel="Création en cours">Créer les 3 personnes</PzBusy>
</button>
<button type="button" className="ghost" onClick={onSkip} disabled={loading}>
+2 -1
View File
@@ -1,6 +1,7 @@
import { useState, useEffect, useRef } from 'react'
import { UserPlus, X } from 'lucide-react'
import './InlinePersonForm.css'
import PzBusy from './PzBusy.jsx'
/**
* Mini-formulaire inline pour créer une personne après drop
@@ -202,7 +203,7 @@ function InlinePersonForm({
className="inline-person-form-button submit"
disabled={!isValid || loading}
>
{loading ? 'Création...' : 'Créer'}
<PzBusy busy={loading} busyLabel="Création en cours">Créer</PzBusy>
</button>
</div>
</form>
@@ -3,6 +3,7 @@ import { ArrowDown, ArrowUp, FileText, Image, MapPin, Mic, Plus, Quote, Route, T
import { getAcceptForMediaType } from '../utils/mediaUpload'
import GeoMediaThumbnail from './GeoMediaThumbnail'
import './MediaManagerPanel.css'
import PzBusy from './PzBusy.jsx'
const MEDIA_TYPES = [
{ value: 'photo', label: 'Photo', Icon: Image },
@@ -230,7 +231,7 @@ const MediaManagerPanel = ({
<div className="pz-modal-actions">
<button type="submit" className="pz-btn pz-btn--primary" disabled={!canUpload}>
<Plus size={16} aria-hidden="true" />
{loading ? 'Envoi…' : 'Ajouter ce souvenir'}
<PzBusy busy={loading} busyLabel="Envoi du souvenir">Ajouter ce souvenir</PzBusy>
</button>
</div>
</form>
+2 -1
View File
@@ -3,6 +3,7 @@ import { Save, Trash2, Plus, X, Search, Check, Play } from 'lucide-react'
import { getParents, getChildren, getPersonUnions, getPersonMedias, filiations, persons, unions } from '../data/mockData'
import GeoMediaThumbnail from './GeoMediaThumbnail'
import './PersonCard.css'
import PzBusy from './PzBusy.jsx'
const TYPE_LABELS = {
photo: 'Photo',
@@ -655,7 +656,7 @@ const PersonCard = ({
disabled={(!hasChanges && !saveSuccess) || saving}
onClick={handleSave}
>
{saveSuccess ? (<><Check size={16} strokeWidth={2.5} />Enregistré</>) : (<><Save size={16} strokeWidth={2} />{saving ? 'Enregistrement…' : 'Enregistrer'}</>)}
{saveSuccess ? (<><Check size={16} strokeWidth={2.5} />Enregistré</>) : (<PzBusy busy={saving} busyLabel="Enregistrement en cours"><Save size={16} strokeWidth={2} />Enregistrer</PzBusy>)}
</button>
</>
)}
+14
View File
@@ -0,0 +1,14 @@
/**
* Libellé de bouton qui attend le serveur : le texte s'efface, trois points
* respirent à sa place. Le texte reste dans la mise en page, le bouton garde sa largeur.
* busyLabel est lu par les lecteurs d'écran pendant l'attente.
*/
export default function PzBusy({ busy, busyLabel = 'En cours', children }) {
return (
<span className={`pz-busy${busy ? ' is-busy' : ''}`}>
<span className="pz-busy-lbl" aria-hidden={busy || undefined}>{children}</span>
<span className="pz-dots" aria-hidden="true"><i /><i /><i /></span>
{busy && <span className="pz-sr">{busyLabel}</span>}
</span>
)
}
+29
View File
@@ -0,0 +1,29 @@
import { PAREN_LEFT, PAREN_RIGHT } from '../pzMarkPaths.js'
/**
* Symbole du logo, le rond entre parenthèses.
* state : 'rest' (le rond), 'loading' (trois points qui respirent),
* 'merging' (les points se rejoignent, léger rebond). Styles dans styles/pz.css.
*/
export default function PzMark({ state = 'rest', className = '' }) {
return (
<svg
className={`pz-mark is-${state}${className ? ` ${className}` : ''}`}
viewBox="-951.9 -1596.5 1903.7 1704.9"
aria-hidden="true"
focusable="false"
>
<g className="pz-mark-par" transform="scale(1,-1)">
<path d={PAREN_LEFT} />
<path d={PAREN_RIGHT} />
</g>
{[0, 1, 2].map((i) => (
<g key={i} className={`pz-mark-p pz-mark-p${i}`}>
<g className="pz-mark-s">
<circle className="pz-mark-c" cx="0" cy="-744" r="424.3" />
</g>
</g>
))}
</svg>
)
}
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useState } from 'react'
import { ImagePlus } from 'lucide-react'
import './TreeCreationWizard.css'
import PzBusy from './PzBusy.jsx'
const INITIAL_STATE = {
treeName: '',
@@ -186,7 +187,7 @@ function TreeCreationWizard({
Retour
</button>
<button type="submit" className="pz-btn pz-btn--primary" disabled={!canCreate}>
{loading ? 'Création en cours…' : 'Créer mon arbre'}
<PzBusy busy={loading} busyLabel="Création de l'arbre">Créer mon arbre</PzBusy>
</button>
</div>
</form>
+2
View File
@@ -4,6 +4,7 @@ import faviconUrl from './assets/Parenthese logo.svg?url'
import './index.css'
import App from './App.jsx'
import ErrorBoundary from './components/ErrorBoundary.jsx'
import BootLoader from './components/BootLoader.jsx'
import { initAppAnalytics } from './utils/analytics.js'
const setFavicon = (href) => {
@@ -28,6 +29,7 @@ createRoot(document.getElementById('root')).render(
<StrictMode>
<ErrorBoundary>
<App />
<BootLoader />
</ErrorBoundary>
</StrictMode>,
)
+3
View File
@@ -0,0 +1,3 @@
// Tracés des parenthèses du logo (parenthese-symbole.svg, validé le 24/09/2026), repère retourné en y.
export const PAREN_LEFT = "M-373.06825730486446 -21.7549454949945 -404.3987845573672 -69.67222246941051Q-415.45661770530944 -84.41600000000005 -426.51445085325156 -84.41600000000005Q-433.88633961854634 -84.41600000000005 -443.10120057516474 -78.88708342602897Q-590.5389758810602 -1.4822513904338734 -699.2743351691581 129.36877419354835Q-808.009694457256 260.21979977753057 -867.9062906752761 420.5583804226919Q-927.8028868932961 580.8969610678532 -927.8028868932961 743.0785139043383Q-927.8028868932961 905.2600667408232 -868.8277767709379 1065.5986473859843Q-809.8526666485798 1225.9372280311457 -701.1173073604818 1358.6312258064515Q-592.3819480723839 1491.3252235817574 -444.94417276648846 1568.7300556173527Q-437.5722840011937 1572.416 -430.2003952358989 1572.416Q-417.29958989663305 1572.416 -408.08472894001466 1557.6722224694104L-373.06825730486446 1507.9119733036707Q-367.5393407308934 1500.540084538376 -367.5393407308934 1491.3252235817574Q-367.5393407308934 1480.2673904338153 -380.44014607015924 1469.2095572858732Q-441.25822838384113 1421.2922803114573 -496.5473941235519 1341.1229899888767Q-551.8365598632627 1260.953699666296 -596.0678924550314 1161.4332013348167Q-640.2992250468 1061.9127030033371 -666.1008357253318 954.0988298109011Q-691.9024464038635 846.284956618465 -691.9024464038635 743.0785139043383Q-691.9024464038635 638.0290989988877 -666.1008357253318 530.2152258064516Q-640.2992250468 422.40135261401554 -596.0678924550314 322.8808542825361Q-551.8365598632627 223.3603559510567 -496.5473941235519 143.19106562847605Q-441.25822838384113 63.0217753058954 -380.44014607015924 15.104498331479377Q-367.5393407308934 4.046665183537215 -367.5393407308934 -7.011167964404933Q-367.5393407308934 -12.540084538376021 -373.06825730486446 -21.7549454949945Z"
export const PAREN_RIGHT = "M373.06825730486446 -21.7549454949945Q367.5393407308934 -12.540084538376021 367.5393407308934 -7.011167964404933Q367.5393407308934 4.046665183537215 380.44014607015924 15.104498331479377Q441.25822838384113 63.0217753058954 496.5473941235519 143.19106562847605Q551.8365598632627 223.3603559510567 596.0678924550314 322.8808542825361Q640.2992250468 422.40135261401554 666.1008357253318 530.2152258064516Q691.9024464038635 638.0290989988877 691.9024464038635 743.0785139043383Q691.9024464038635 846.284956618465 666.1008357253318 954.0988298109011Q640.2992250468 1061.9127030033371 596.0678924550314 1161.4332013348167Q551.8365598632627 1260.953699666296 496.5473941235519 1341.1229899888767Q441.25822838384113 1421.2922803114573 380.44014607015924 1469.2095572858732Q367.5393407308934 1480.2673904338153 367.5393407308934 1491.3252235817574Q367.5393407308934 1500.540084538376 373.06825730486446 1507.9119733036707L408.08472894001466 1557.6722224694104Q417.2995898966331 1572.416 430.20039523589895 1572.416Q437.57228400119374 1572.416 444.9441727664885 1568.7300556173527Q594.2249202637076 1491.3252235817574 702.0387934561437 1358.6312258064515Q809.8526666485798 1225.9372280311457 868.8277767709379 1065.5986473859843Q927.8028868932961 905.2600667408232 927.8028868932961 743.0785139043383Q927.8028868932961 580.8969610678532 867.9062906752761 420.5583804226919Q808.009694457256 260.21979977753057 699.2743351691581 129.36877419354835Q590.5389758810603 -1.4822513904338734 443.10120057516485 -78.88708342602897Q435.72931180987007 -84.41600000000005 426.51445085325156 -84.41600000000005Q415.45661770530944 -84.41600000000005 404.39878455736726 -69.67222246941051Z"
+46
View File
@@ -29,6 +29,7 @@
--pz-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
--pz-ease: cubic-bezier(.23, 1, .32, 1);
--pz-ease-drawer: cubic-bezier(.32, .72, 0, 1);
--pz-ease-pop: cubic-bezier(.34, 1.4, .64, 1);
--pz-r-s: 10px;
--pz-r-m: 14px;
--pz-r-l: 22px;
@@ -178,7 +179,52 @@
.pz-menu-sep { height: 1px; margin: 4px 6px; background: var(--pz-line); }
.pz-menu-label { padding: 8px 12px 4px; font: 500 11.5px var(--pz-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pz-faint); }
/* ── Le rond qui attend (motion validée le 25/09/2026) ────────── */
/* Le rond se divise en trois points qui respirent, puis se referme avec un léger rebond. */
.pz-mark { display: block; overflow: visible; }
.pz-mark-par path { fill: var(--pz-ink); stroke: var(--pz-ink); stroke-width: 48.1; stroke-linejoin: round; }
.pz-mark-c { fill: var(--pz-a500); transform-box: fill-box; transform-origin: center; }
.pz-mark-p { transition: transform 420ms var(--pz-ease); }
.pz-mark-s { transform-box: fill-box; transform-origin: center; transition: transform 420ms var(--pz-ease); }
.pz-mark.is-loading .pz-mark-p0 { transform: translateX(-300px); }
.pz-mark.is-loading .pz-mark-p2 { transform: translateX(300px); }
.pz-mark.is-loading .pz-mark-s { transform: scale(.27); }
.pz-mark.is-loading .pz-mark-c { animation: pz-souffle 1200ms ease-in-out 420ms infinite; }
.pz-mark.is-loading .pz-mark-p1 .pz-mark-c { animation-delay: 580ms; }
.pz-mark.is-loading .pz-mark-p2 .pz-mark-c { animation-delay: 740ms; }
.pz-mark.is-merging .pz-mark-p, .pz-mark.is-merging .pz-mark-s { transition-duration: 560ms; transition-timing-function: var(--pz-ease-pop); }
@keyframes pz-souffle { 0%, 100% { opacity: 1; transform: none; } 50% { opacity: .32; transform: scale(.78); } }
.pz-boot {
position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center;
background: var(--pz-bg); transition: opacity 200ms ease;
}
.pz-boot .pz-mark { width: 64px; height: auto; transition: transform 200ms var(--pz-ease); }
.pz-boot.is-out { opacity: 0; pointer-events: none; }
.pz-boot.is-out .pz-mark { transform: scale(.96); }
/* Bouton en attente : le libellé reste en place (largeur figée), les points prennent sa place */
.pz-busy { display: inline-grid; place-items: center; }
.pz-busy > * { grid-area: 1 / 1; }
.pz-busy-lbl { display: inline-flex; align-items: center; gap: 8px; transition: opacity 160ms ease, filter 160ms ease, transform 160ms var(--pz-ease); }
.pz-dots { display: inline-flex; gap: 5px; opacity: 0; transition: opacity 160ms ease; }
.pz-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pz-busy.is-busy .pz-busy-lbl { opacity: 0; filter: blur(2px); transform: scale(.98); }
.pz-busy.is-busy .pz-dots { opacity: 1; }
.pz-busy.is-busy .pz-dots i { animation: pz-souffle 1200ms ease-in-out infinite; }
.pz-busy.is-busy .pz-dots i:nth-child(2) { animation-delay: 160ms; }
.pz-busy.is-busy .pz-dots i:nth-child(3) { animation-delay: 320ms; }
/* un bouton qui attend n'est pas un bouton grisé */
button:disabled:has(.pz-busy.is-busy) { opacity: 1; cursor: progress; }
.pz-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
.pz-overlay, .pz-modal, .pz-menu { animation: pz-fade 160ms ease both !important; }
.pz-btn:active:not(:disabled) { transform: none; }
/* les points apparaissent sur place et clignotent en fondu, sans déplacement */
.pz-mark-p, .pz-mark-s, .pz-boot .pz-mark { transition-duration: 1ms !important; }
.pz-mark.is-loading .pz-mark-c, .pz-busy.is-busy .pz-dots i { animation-name: pz-fade-pulse !important; }
.pz-busy.is-busy .pz-busy-lbl { filter: none; transform: none; }
}
@keyframes pz-fade-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
+5 -1
View File
@@ -1,6 +1,7 @@
import { useEffect, useRef, useState } from 'react'
import { analytics } from './analytics.js'
import { getEntranceProgress, seededFloat } from './heroGraphMath.js'
import PzMark from './PzMark.jsx'
// ─── Design atoms ─────────────────────────────────────────────────────────────
@@ -837,7 +838,10 @@ function InlineDemo() {
: { minHeight: '52vh', height: '56vw', maxHeight: '720px' }}
>
{!loaded && (
<div className="demo-wait">{shouldLoad ? 'Chargement de la démo…' : 'Démo interactive'}</div>
<div className="demo-wait" role="status">
<PzMark state={shouldLoad ? 'loading' : 'rest'} />
<span className={shouldLoad ? 'sr-only' : undefined}>{shouldLoad ? 'Chargement de la démo' : 'Démo interactive'}</span>
</div>
)}
<iframe
+29
View File
@@ -0,0 +1,29 @@
import { PAREN_LEFT, PAREN_RIGHT } from './pzMarkPaths.js'
/**
* Symbole du logo, le rond entre parenthèses.
* state : 'rest' (le rond), 'loading' (trois points qui respirent),
* 'merging' (les points se rejoignent, léger rebond). Styles dans index.css.
*/
export default function PzMark({ state = 'rest', className = '' }) {
return (
<svg
className={`pz-mark is-${state}${className ? ` ${className}` : ''}`}
viewBox="-951.9 -1596.5 1903.7 1704.9"
aria-hidden="true"
focusable="false"
>
<g className="pz-mark-par" transform="scale(1,-1)">
<path d={PAREN_LEFT} />
<path d={PAREN_RIGHT} />
</g>
{[0, 1, 2].map((i) => (
<g key={i} className={`pz-mark-p pz-mark-p${i}`}>
<g className="pz-mark-s">
<circle className="pz-mark-c" cx="0" cy="-744" r="424.3" />
</g>
</g>
))}
</svg>
)
}
+19 -1
View File
@@ -133,7 +133,22 @@ em.s { font-style: italic; font-weight: 300; }
/* démo */
.sec-demo { background: var(--a50); }
.demo-frame { position: relative; max-width: 1120px; width: 100%; margin-inline: auto; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--trait-l); background: var(--papier); box-shadow: var(--ombre); }
.demo-wait { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--papier); font: 500 14px var(--sans); color: var(--doux); }
.demo-wait { position: absolute; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--papier); font: 500 14px var(--sans); color: var(--doux); }
.demo-wait .pz-mark { width: 56px; height: auto; }
/* le rond qui attend : il se divise en trois points qui respirent (motion validée le 25/09/2026) */
.pz-mark { display: block; overflow: visible; }
.pz-mark-par path { fill: var(--encre); stroke: var(--encre); stroke-width: 48.1; stroke-linejoin: round; }
.pz-mark-c { fill: var(--a500); transform-box: fill-box; transform-origin: center; }
.pz-mark-p { transition: transform 420ms var(--ease-out); }
.pz-mark-s { transform-box: fill-box; transform-origin: center; transition: transform 420ms var(--ease-out); }
.pz-mark.is-loading .pz-mark-p0 { transform: translateX(-300px); }
.pz-mark.is-loading .pz-mark-p2 { transform: translateX(300px); }
.pz-mark.is-loading .pz-mark-s { transform: scale(.27); }
.pz-mark.is-loading .pz-mark-c { animation: pz-souffle 1200ms ease-in-out 420ms infinite; }
.pz-mark.is-loading .pz-mark-p1 .pz-mark-c { animation-delay: 580ms; }
.pz-mark.is-loading .pz-mark-p2 .pz-mark-c { animation-delay: 740ms; }
@keyframes pz-souffle { 0%, 100% { opacity: 1; transform: none; } 50% { opacity: .32; transform: scale(.78); } }
.demo-enter { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; cursor: pointer; background: linear-gradient(180deg, rgba(251,250,247,0) 0%, rgba(42,38,34,.14) 100%); }
/* pour qui */
@@ -176,7 +191,10 @@ em.s { font-style: italic; font-weight: 300; }
html { scroll-behavior: auto; }
.rise { animation: none; }
[data-reveal] { opacity: 1; transform: none; transition: none; }
.pz-mark-p, .pz-mark-s { transition-duration: 1ms; }
.pz-mark.is-loading .pz-mark-c { animation-name: pz-fade-pulse; }
}
@keyframes pz-fade-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
+3
View File
@@ -0,0 +1,3 @@
// Tracés des parenthèses du logo (parenthese-symbole.svg, validé le 24/09/2026), repère retourné en y.
export const PAREN_LEFT = "M-373.06825730486446 -21.7549454949945 -404.3987845573672 -69.67222246941051Q-415.45661770530944 -84.41600000000005 -426.51445085325156 -84.41600000000005Q-433.88633961854634 -84.41600000000005 -443.10120057516474 -78.88708342602897Q-590.5389758810602 -1.4822513904338734 -699.2743351691581 129.36877419354835Q-808.009694457256 260.21979977753057 -867.9062906752761 420.5583804226919Q-927.8028868932961 580.8969610678532 -927.8028868932961 743.0785139043383Q-927.8028868932961 905.2600667408232 -868.8277767709379 1065.5986473859843Q-809.8526666485798 1225.9372280311457 -701.1173073604818 1358.6312258064515Q-592.3819480723839 1491.3252235817574 -444.94417276648846 1568.7300556173527Q-437.5722840011937 1572.416 -430.2003952358989 1572.416Q-417.29958989663305 1572.416 -408.08472894001466 1557.6722224694104L-373.06825730486446 1507.9119733036707Q-367.5393407308934 1500.540084538376 -367.5393407308934 1491.3252235817574Q-367.5393407308934 1480.2673904338153 -380.44014607015924 1469.2095572858732Q-441.25822838384113 1421.2922803114573 -496.5473941235519 1341.1229899888767Q-551.8365598632627 1260.953699666296 -596.0678924550314 1161.4332013348167Q-640.2992250468 1061.9127030033371 -666.1008357253318 954.0988298109011Q-691.9024464038635 846.284956618465 -691.9024464038635 743.0785139043383Q-691.9024464038635 638.0290989988877 -666.1008357253318 530.2152258064516Q-640.2992250468 422.40135261401554 -596.0678924550314 322.8808542825361Q-551.8365598632627 223.3603559510567 -496.5473941235519 143.19106562847605Q-441.25822838384113 63.0217753058954 -380.44014607015924 15.104498331479377Q-367.5393407308934 4.046665183537215 -367.5393407308934 -7.011167964404933Q-367.5393407308934 -12.540084538376021 -373.06825730486446 -21.7549454949945Z"
export const PAREN_RIGHT = "M373.06825730486446 -21.7549454949945Q367.5393407308934 -12.540084538376021 367.5393407308934 -7.011167964404933Q367.5393407308934 4.046665183537215 380.44014607015924 15.104498331479377Q441.25822838384113 63.0217753058954 496.5473941235519 143.19106562847605Q551.8365598632627 223.3603559510567 596.0678924550314 322.8808542825361Q640.2992250468 422.40135261401554 666.1008357253318 530.2152258064516Q691.9024464038635 638.0290989988877 691.9024464038635 743.0785139043383Q691.9024464038635 846.284956618465 666.1008357253318 954.0988298109011Q640.2992250468 1061.9127030033371 596.0678924550314 1161.4332013348167Q551.8365598632627 1260.953699666296 496.5473941235519 1341.1229899888767Q441.25822838384113 1421.2922803114573 380.44014607015924 1469.2095572858732Q367.5393407308934 1480.2673904338153 367.5393407308934 1491.3252235817574Q367.5393407308934 1500.540084538376 373.06825730486446 1507.9119733036707L408.08472894001466 1557.6722224694104Q417.2995898966331 1572.416 430.20039523589895 1572.416Q437.57228400119374 1572.416 444.9441727664885 1568.7300556173527Q594.2249202637076 1491.3252235817574 702.0387934561437 1358.6312258064515Q809.8526666485798 1225.9372280311457 868.8277767709379 1065.5986473859843Q927.8028868932961 905.2600667408232 927.8028868932961 743.0785139043383Q927.8028868932961 580.8969610678532 867.9062906752761 420.5583804226919Q808.009694457256 260.21979977753057 699.2743351691581 129.36877419354835Q590.5389758810603 -1.4822513904338734 443.10120057516485 -78.88708342602897Q435.72931180987007 -84.41600000000005 426.51445085325156 -84.41600000000005Q415.45661770530944 -84.41600000000005 404.39878455736726 -69.67222246941051Z"