style(evenements): passe design, sobre mais moins sèche (B25, commit F)

Audit Impeccable mesuré (une seule famille de polices, h2 à 1,26 fois le texte,
deux bordures d'accent de 3 px, cartes identiques, aucune texture), puis la
grammaire du deck e-codev (frontend-slides) prise sans le copier :

- Fraunces pour les titres seulement (un woff2 auto-hébergé, latin, graisse 600,
  axe optique : 35 Ko, préchargé, font-display swap, repli Georgia) ; le texte
  reste en police système.
- Le fond : des courbes de niveau (14 lignes, en écho au plan de Sacha) derrière
  l'en-tête, estompées avant le texte (svg de 9,6 Ko, 3,9 Ko gzip) ; sauge sur
  la forêt, encre ailleurs.
- Ocre et sauge du deck (contrastes AA lus dans les jetons, clair et sombre) ;
  safran gardé pour la plantation et le bouton principal.
- Cartes sur papier chaud, pictos dans un cadre teinté, grilles sans trou ;
  retour en étiquette ocre, cible 44 px ; anneau de focus d'encre (le safran ne
  fait que 1,7:1 sur la crème).
- Lois tenues : la phrase-accroche et le déroulé perdent leur bordure de 3 px
  (Fraunces en sauge ; points safran reliés par un fil) ; les portes du carrefour
  perdent la flèche, gagnent un picto, se mettent côte à côte, plus une photo.
- Un seul mouvement : les pastilles du compteur arrivent, coupé en mouvement réduit.
- alt de champ.jpg corrigé (il décrivait une autre image).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwRV4Gjq47A633kqxvCint
This commit is contained in:
Jules Neny
2026-10-22 09:11:23 +02:00
co-authored by Claude Opus 5.5
parent baf003075d
commit 91e6680584
11 changed files with 243 additions and 90 deletions
+10
View File
@@ -30,4 +30,14 @@ const texte = computed(() => texteCompteur(props.inscrits, props.capacite, props
}
.cpt__pastille--prise { background: var(--evt-nuit); border-color: var(--evt-nuit); }
.cpt__texte { font-weight: var(--fw-semibold); }
/* Le seul mouvement de la page, parce qu'il dit vrai : les places prises arrivent, une à une.
Rendu serveur déjà rempli ; l'animation ne fait que l'ajouter, et se coupe en mouvement réduit. */
@media (prefers-reduced-motion: no-preference) {
.cpt__pastille--prise { animation: cpt-arrive 0.45s var(--ease-out) backwards; }
.cpt__pastille--prise:nth-child(2) { animation-delay: 60ms; }
.cpt__pastille--prise:nth-child(3) { animation-delay: 120ms; }
.cpt__pastille--prise:nth-child(n + 4) { animation-delay: 180ms; }
}
@keyframes cpt-arrive { from { transform: scale(0.3); opacity: 0; } }
</style>
+1 -1
View File
@@ -50,7 +50,7 @@ const jours = Array.from({ length: 9 }, (_, i) => {
.frise svg { border-radius: 0; overflow: visible; }
.frise__toile { position: relative; }
.frise__jour { font-size: 19px; text-anchor: middle; fill: var(--evt-attenue); }
.frise__num { font-size: 25px; font-weight: 700; text-anchor: middle; fill: var(--text); }
.frise__num { font-family: var(--evt-titre); font-size: 26px; font-weight: 600; text-anchor: middle; fill: var(--text); }
.frise__arrivee { fill: color-mix(in srgb, var(--evt-nuit) 16%, var(--surface)); }
.frise__codev { fill: var(--evt-nuit); }
.frise__foret { fill: var(--accent); }
+150 -51
View File
@@ -1,5 +1,8 @@
<template>
<div class="evt">
<div class="evt" :class="ton ? `evt--${ton}` : null">
<!-- Le fond : des courbes de niveau, en écho aux lignes du plan de Sacha qui suivent le relief.
Seulement derrière l'en-tête, estompées avant le texte courant. -->
<div class="evt-fond" aria-hidden="true" />
<div class="evt__col">
<nav v-if="retour" class="evt-retour" aria-label="Retour">
<NuxtLink :to="retour.to">← {{ retour.label }}</NuxtLink>
@@ -12,55 +15,112 @@
</template>
<script setup lang="ts">
defineProps<{ retour?: { to: string; label: string } }>()
defineProps<{
retour?: { to: string; label: string }
/** 'foret' : la sauge remplace l'ocre (pictos, récap, courbes). */
ton?: 'foret'
}>()
// Une seule police ajoutée, pour les titres : précharger évite le saut de l'en-tête (font-display: swap).
useHead({
link: [{ rel: 'preload', href: '/medias/evenements/polices/fraunces-600-latin.woff2', as: 'font', type: 'font/woff2', crossorigin: '' }],
})
</script>
<!--
Gabarit des pages d'événement (lot Y) : colonne de lecture de 640 px, plus d'air que l'app.
Gabarit des pages d'événement (lot Y, passe design B25) : colonne de lecture de 640 px.
Styles non scopés, préfixe evt- : partagés par les pages et les composants evenements/.
Tokens du DS (tokens.css + theme/aep.css) ; safran (--accent) réservé à la plantation
et au bouton principal ; bleu nuit plein = --nav-primary-solid.
Tokens du DS (tokens.css + theme/aep.css) ; safran (--accent) réservé à la plantation et au
bouton principal ; bleu nuit plein = --nav-primary-solid. Du deck e-codev (frontend-slides) :
Fraunces pour les titres, l'ocre et la sauge.
-->
<style>
/* Fraunces (Undercase Type, SIL OFL 1.1), graisse 600, axe optique 9-144, sous-ensemble latin : 35 Ko */
@font-face {
font-family: 'Fraunces';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/medias/evenements/polices/fraunces-600-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.evt {
--evt-attenue: color-mix(in srgb, var(--text) 78%, transparent);
--evt-nuit: var(--nav-primary-solid);
--evt-sur-nuit: var(--nav-text-on-primary);
/* Deux teintes du deck e-codev (frontend-slides) : ocre = ce qui sort, sauge = ce qui revient, le vivant */
/* Deux teintes du deck e-codev : ocre = ce qui sort, les petits libellés ; sauge = ce qui revient, le vivant */
--evt-ocre: #9a5f12;
--evt-sauge: #3f6b4e;
--evt-teinte: var(--evt-ocre);
--evt-papier: color-mix(in srgb, var(--surface) 60%, var(--bg));
--evt-courbes: color-mix(in srgb, var(--text) 9%, transparent);
--evt-titre: 'Fraunces', Georgia, 'Times New Roman', serif;
position: relative;
isolation: isolate;
min-height: 100%;
background: var(--bg);
color: var(--text);
font-family: var(--font-body);
line-height: 1.6;
}
.evt--foret { --evt-teinte: var(--evt-sauge); --evt-courbes: color-mix(in srgb, var(--evt-sauge) 15%, transparent); }
.dark .evt { --evt-ocre: #e3a95c; --evt-sauge: #8fc09e; }
.evt-fond {
position: absolute;
inset: 0 0 auto;
height: 480px;
z-index: -1;
pointer-events: none;
background: var(--evt-courbes);
-webkit-mask: url('/medias/evenements/courbes-niveau.svg') top center / 1600px 480px repeat-x;
mask: url('/medias/evenements/courbes-niveau.svg') top center / 1600px 480px repeat-x;
}
/* Peint le fond par-dessus les courbes, de plus en plus : elles s'estompent avant le texte courant */
.evt-fond::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to bottom, transparent 30%, var(--bg) 92%);
}
.evt__col {
max-width: 640px;
margin: 0 auto;
padding: var(--space-lg) var(--space-md) var(--space-3xl);
padding: var(--space-md) var(--space-md) var(--space-3xl);
}
@media (min-width: 768px) {
.evt__col { padding: var(--space-2xl) var(--space-lg) var(--space-3xl); }
.evt__col { padding: var(--space-xl) var(--space-lg) var(--space-3xl); }
}
/* Le preflight Tailwind retire le soulignement : un lien des pages d'événement se voit lien */
.evt a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.evt a:hover { color: var(--link-hover); }
.evt :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
.evt a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
/* Anneau d'encre : le safran du DS ne fait que 1,7:1 sur la crème */
.evt :focus-visible { outline: 2.5px solid var(--text); outline-offset: 3px; border-radius: 3px; }
.evt-retour { margin-bottom: var(--space-lg); font-size: var(--fs-sm); }
.evt-retour a { color: var(--evt-attenue); text-decoration: none; }
.evt-retour { margin-bottom: var(--space-sm); }
.evt-retour a {
display: inline-flex;
align-items: center;
min-height: 44px;
font-size: 0.8rem;
font-weight: var(--fw-bold);
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--evt-ocre);
text-decoration: none;
}
.evt-retour a:hover { color: var(--text); text-decoration: underline; }
/* ── En-tête ── */
.evt-tete { margin-bottom: var(--space-xl); }
/* ── Titres : Fraunces, le reste en police système ── */
.evt-h1, .evt-h2, .evt-h3 { font-family: var(--evt-titre); font-weight: 600; font-optical-sizing: auto; }
.evt-tete { margin: var(--space-md) 0 var(--space-xl); }
.evt-h1 {
font-size: clamp(1.85rem, 6.5vw, 2.6rem);
line-height: 1.15;
letter-spacing: -0.015em;
font-weight: var(--fw-bold);
font-size: clamp(2rem, 7.4vw, 3.1rem);
line-height: 1.06;
letter-spacing: -0.02em;
margin: 0 0 var(--space-md);
text-wrap: balance;
}
@@ -82,26 +142,26 @@ defineProps<{ retour?: { to: string; label: string } }>()
/* ── Récap pratique en tête : dates, lieu, trajet, repas ── */
.evt-recap { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; gap: var(--space-xs); }
.evt-recap li { display: flex; align-items: flex-start; gap: var(--space-sm); line-height: 1.45; }
.evt-recap .evt-icone { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--evt-attenue); }
.evt-recap .evt-icone { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--evt-teinte); }
.evt-recap .evt-lieu-lien { padding: 2px 0; margin: -2px 0; }
.evt-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-sm) var(--space-md);
gap: var(--space-md) var(--space-lg);
margin-top: var(--space-lg);
}
/* ── Sections ── */
.evt-section { margin-top: var(--space-3xl); }
.evt-section { margin-top: clamp(3rem, 10vw, 4.5rem); }
.evt-h2 {
font-size: var(--fs-xl);
line-height: 1.25;
font-weight: var(--fw-bold);
font-size: clamp(1.55rem, 5.4vw, 2rem);
line-height: 1.15;
letter-spacing: -0.012em;
margin: 0 0 var(--space-md);
text-wrap: balance;
}
.evt-h3 { font-size: var(--fs-base); font-weight: var(--fw-bold); margin: 0 0 var(--space-xs); }
.evt-h3 { font-size: 1.15rem; line-height: 1.25; margin: 0 0 var(--space-xs); }
.evt p { margin: 0 0 var(--space-md); }
.evt-note { font-size: var(--fs-sm); color: var(--evt-attenue); }
.evt-citation-source { font-size: var(--fs-sm); color: var(--evt-attenue); margin-top: calc(-1 * var(--space-xs)); }
@@ -122,10 +182,12 @@ defineProps<{ retour?: { to: string; label: string } }>()
font-weight: var(--fw-bold);
text-decoration: none;
cursor: pointer;
box-shadow: 0 1px 0 rgb(26 34 56 / 0.18), 0 2px 6px rgb(26 34 56 / 0.08);
transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.evt a.evt-btn { color: var(--on-accent); text-decoration: none; }
.evt-btn:hover { filter: brightness(0.96); }
.evt-btn[disabled] { opacity: 0.6; cursor: progress; }
.evt-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 0 rgb(26 34 56 / 0.18), 0 6px 14px rgb(26 34 56 / 0.12); }
.evt-btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
/* Lien vers la forêt : safran (réservé à la plantation), en teinte pour ne pas doubler le bouton principal */
.evt a.evt-lien-foret {
@@ -145,39 +207,44 @@ defineProps<{ retour?: { to: string; label: string } }>()
.evt a.evt-lien-foret:hover { background: var(--accent); color: var(--on-accent); }
.evt-lien-foret .evt-icone { width: 20px; height: 20px; }
/* ── Cartes (pratique, venir) ── */
/* ── Cartes (pratique, venir) : papier chaud, picto dans un cadre teinté ── */
.evt-cartes { display: grid; gap: var(--space-sm); grid-template-columns: 1fr; }
@media (min-width: 560px) { .evt-cartes--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 560px) {
.evt-cartes--2 { grid-template-columns: 1fr 1fr; }
.evt-carte--large { grid-column: 1 / -1; }
}
.evt-carte {
padding: var(--space-md) var(--space-md) var(--space-sm);
padding: var(--space-md);
border-radius: var(--radius-lg);
background: var(--surface);
background: var(--evt-papier);
border: 1px solid var(--border);
}
.evt-carte p:last-child { margin-bottom: var(--space-xs); }
.evt-carte__tete { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.evt-carte p:last-child { margin-bottom: 0; }
.evt-carte__tete { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.evt-carte__tete .evt-h3 { margin: 0; }
.evt-picto {
flex: none;
display: grid;
place-items: center;
width: 40px;
height: 40px;
border-radius: var(--radius-md);
background: var(--bg-alt);
color: var(--text);
width: 44px;
height: 44px;
border-radius: 12px;
background: color-mix(in srgb, var(--evt-teinte) 13%, var(--surface));
color: var(--evt-teinte);
}
/* ── Figures ── */
/* ── Figures et photos (cadrées, légendées, comme dans le deck) ── */
.evt-figure { margin: var(--space-lg) 0; }
.evt-figure img, .evt-figure svg { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.evt-figure figcaption { margin-top: var(--space-xs); font-size: var(--fs-sm); color: var(--evt-attenue); }
.evt-photo img { border: 1px solid var(--border); }
.evt-photo figcaption { font-style: italic; }
.evt-pleine { margin-left: calc(-1 * var(--space-md)); margin-right: calc(-1 * var(--space-md)); }
.evt-pleine img { border-radius: 0; }
.evt-pleine img { border-radius: 0; border-left: 0; border-right: 0; }
.evt-pleine figcaption { padding: 0 var(--space-md); }
@media (min-width: 672px) {
.evt-pleine { margin-left: 0; margin-right: 0; }
.evt-pleine img { border-radius: var(--radius-md); }
.evt-pleine img { border-radius: var(--radius-md); border: 1px solid var(--border); }
.evt-pleine figcaption { padding: 0; }
}
@@ -185,7 +252,7 @@ defineProps<{ retour?: { to: string; label: string } }>()
.evt-details {
margin-top: var(--space-md);
border-radius: var(--radius-lg);
background: var(--surface);
background: var(--evt-papier);
border: 1px solid var(--border);
}
.evt-details > summary {
@@ -193,9 +260,11 @@ defineProps<{ retour?: { to: string; label: string } }>()
align-items: center;
justify-content: space-between;
gap: var(--space-sm);
min-height: 52px;
min-height: 56px;
padding: var(--space-sm) var(--space-md);
font-weight: var(--fw-bold);
font-family: var(--evt-titre);
font-weight: 600;
font-size: 1.12rem;
cursor: pointer;
list-style: none;
}
@@ -203,24 +272,50 @@ defineProps<{ retour?: { to: string; label: string } }>()
.evt-details > summary::after {
content: '+';
flex: none;
width: 28px;
height: 28px;
width: 30px;
height: 30px;
border-radius: var(--radius-full);
background: var(--bg-alt);
background: color-mix(in srgb, var(--evt-teinte) 13%, var(--surface));
color: var(--evt-teinte);
display: grid;
place-items: center;
font-size: 1.1rem;
font-family: var(--font-body);
font-size: 1.15rem;
line-height: 1;
}
.evt-details[open] > summary::after { content: '−'; }
.evt-details > summary:hover::after { background: color-mix(in srgb, var(--evt-teinte) 24%, var(--surface)); }
.evt-details__corps { padding: 0 var(--space-md) var(--space-md); }
/* ── Listes ── */
.evt-liste { margin: 0 0 var(--space-md); padding-left: 1.2em; }
.evt-liste li { margin-bottom: var(--space-xs); }
.evt-deroule { margin: 0; padding: 0; list-style: none; border-left: 3px solid var(--accent); }
.evt-deroule li { padding: 0 0 var(--space-md) var(--space-md); }
.evt-deroule strong { display: block; }
/* Le déroulé : des points safran reliés par un fil (plus de bordure épaisse) */
.evt-deroule { margin: 0; padding: 0; list-style: none; }
.evt-deroule li { position: relative; padding: 0 0 var(--space-lg) var(--space-xl); }
.evt-deroule li::before {
content: '';
position: absolute;
left: 3px;
top: 0.4em;
width: 13px;
height: 13px;
border-radius: var(--radius-full);
background: var(--accent);
box-shadow: 0 0 0 3px var(--bg);
}
.evt-deroule li::after {
content: '';
position: absolute;
left: 9px;
top: 1.5em;
bottom: 0.1em;
width: 1px;
background: var(--border-strong);
}
.evt-deroule li:last-child { padding-bottom: 0; }
.evt-deroule li:last-child::after { display: none; }
.evt-deroule strong { display: block; font-family: var(--evt-titre); font-weight: 600; font-size: 1.1rem; margin-bottom: 2px; }
/* ── Encadré ── */
.evt-encadre {
@@ -238,4 +333,8 @@ defineProps<{ retour?: { to: string; label: string } }>()
font-size: var(--fs-sm);
}
.evt-pied p { margin-bottom: var(--space-xs); }
@media (prefers-reduced-motion: reduce) {
.evt-btn, .evt-btn:hover { transition: none; transform: none; }
}
</style>
+2 -2
View File
@@ -104,7 +104,7 @@ const MOTS_M: [string, number][] = [
.sens__anneau--s { fill: color-mix(in srgb, var(--evt-sauge) 16%, var(--surface)); stroke: var(--evt-sauge); }
.sens__badge-fond { fill: var(--accent); }
.sens__badge-texte { font-size: 13px; font-weight: 700; text-anchor: middle; fill: var(--on-accent); letter-spacing: 0.04em; }
.sens__nom { font-size: 15px; font-weight: 600; text-anchor: middle; fill: var(--text); }
.sens__nom { font-family: var(--evt-titre); font-size: 16px; font-weight: 600; text-anchor: middle; fill: var(--text); }
.sens__flux { font-size: 14px; font-style: italic; font-weight: 600; text-anchor: middle; }
.sens__flux--sort { fill: var(--evt-ocre); color: var(--evt-ocre); }
.sens__flux--revient { fill: var(--evt-sauge); color: var(--evt-sauge); }
@@ -128,7 +128,7 @@ const MOTS_M: [string, number][] = [
.sens__echelles { margin: 0 0 var(--space-md); display: grid; gap: var(--space-sm); }
.sens__echelles dt { font-weight: var(--fw-bold); }
.sens__echelles dd { margin: 2px 0 0; color: var(--evt-attenue); }
.sens__boucle { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: 1.4; }
.sens__boucle { font-family: var(--evt-titre); font-weight: 600; font-size: 1.3rem; line-height: 1.3; text-wrap: balance; }
.sens__zoom { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--border); }
.sens__zoom .evt-h3 { display: flex; align-items: baseline; font-size: var(--fs-lg); line-height: 1.3; }
.sens__mots { list-style: none; margin: var(--space-sm) 0 var(--space-md); padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-md); }