feat: architecture multi-thèmes (6 designs) et nouveau logo SVG

This commit is contained in:
lrdlg committed 2026-11-26 15:45:51 +01:00
1 parent 685599e706
commit e180a97113
20 files changed
+3177 -118

No files matched your search

+19
View File
@@ -152,6 +152,25 @@
cursor: pointer;
}
/* ======================================================================
TRANSITIONS D'ÉTAT (≤ 250ms — « motion signals state »)
====================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
animation-duration: 220ms;
animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes logo-theme-pulse {
0% { transform: scale(1); }
45% { transform: scale(1.12) rotate(-4deg); }
100% { transform: scale(1) rotate(0deg); }
}
.site-header__logo[data-theme-pulse="true"] {
animation: logo-theme-pulse 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* ======================================================================
PRÉFÉRENCES SYSTÈME
Respecter les réglages d'accessibilité de l'utilisateur n'est pas
+132 -47
View File
@@ -31,15 +31,43 @@
margin: 12mm 13mm;
}
/* --------------------------------------------------------------------------
NEUTRALISATION MULTI-THÈMES & ANIMATIONS
Quel que soit data-theme à l'écran (classic, neo-brutalist ou futur thème),
l'impression force un rendu sobre, opaque et sans décoration superflue.
-------------------------------------------------------------------------- */
*,
*::before,
*::after {
opacity: 1 !important;
transform: none !important;
animation: none !important;
transition: none !important;
box-shadow: none !important;
text-shadow: none !important;
backdrop-filter: none !important;
-webkit-backdrop-filter: none !important;
border-radius: 0 !important;
}
[data-reveal] {
opacity: 1 !important;
visibility: visible !important;
transform: none !important;
}
/* --------------------------------------------------------------------------
MASQUAGE
Tout ce qui relève de la navigation, de l'interaction ou du récit.
Tout ce qui relève de la navigation, de l'interaction, des thèmes ou du récit.
-------------------------------------------------------------------------- */
.site-header,
.skip-link,
.nav-toggle,
.site-nav,
.to-top,
.theme-dock,
.theme-modal,
.reading-progress,
.actions,
.screen-only,
.site-footer,
@@ -56,71 +84,116 @@
BASE
Noir sur blanc : lisible sur toute imprimante, y compris monochrome.
-------------------------------------------------------------------------- */
html[data-theme],
body {
background: #fff;
color: #000;
color-scheme: light !important;
background: #fff !important;
background-image: none !important;
color: #000 !important;
font-family: "Inter", system-ui, -apple-system, sans-serif !important;
font-size: 9.1pt;
line-height: 1.42;
}
h1, h2, h3, h4, h5, h6 {
font-family: "JetBrains Mono", ui-monospace, monospace !important;
text-transform: none !important;
color: #000 !important;
}
.container {
max-inline-size: none;
padding-inline: 0;
}
main > .container { display: block; }
main > .container {
display: block !important;
padding-block: 0 !important;
}
/* --------------------------------------------------------------------------
EN-TÊTE
Nom, fonction et coordonnées compressés en un bandeau de trois lignes.
-------------------------------------------------------------------------- */
.masthead {
padding-block: 0 6pt;
margin-block-end: 8pt;
border-block-end: 1pt solid #000;
background: transparent !important;
border: 0 !important;
border-block-end: 1pt solid #000 !important;
padding: 0 0 6pt !important;
margin-block-end: 8pt !important;
overflow: visible !important;
}
.eyebrow { display: none; }
.masthead::before,
.masthead::after {
content: none !important;
display: none !important;
}
.eyebrow { display: none !important; }
.page-title {
font-size: 21pt;
letter-spacing: -0.5pt;
margin-block-end: 3pt;
font-size: 21pt !important;
letter-spacing: -0.5pt !important;
margin-block-end: 3pt !important;
}
.page-subtitle {
font-size: 10.5pt;
color: #333;
max-inline-size: none;
margin-block-end: 7pt;
font-family: "JetBrains Mono", ui-monospace, monospace !important;
font-weight: 400 !important;
font-size: 10.5pt !important;
color: #333 !important;
background: transparent !important;
border: 0 !important;
padding: 0 !important;
max-inline-size: none !important;
margin-block-end: 7pt !important;
}
/* Coordonnées sur une seule ligne */
.contact-list {
gap: 0 18pt;
font-size: 9pt;
color: #000;
gap: 0 18pt !important;
font-size: 9pt !important;
color: #000 !important;
}
.contact-list__icon { stroke: #000; }
.contact-list li {
background: transparent !important;
border: 0 !important;
padding: 0 !important;
}
.contact-list__icon { stroke: #000 !important; }
/* --------------------------------------------------------------------------
SECTIONS
-------------------------------------------------------------------------- */
.section {
padding-block: 7.5pt 0;
border-block-start: 0;
display: block !important;
background: transparent !important;
border: 0 !important;
padding: 7.5pt 0 0 !important;
margin: 0 !important;
}
.section-title {
font-size: 11pt;
margin-block-end: 5.5pt;
padding-block-end: 2.5pt;
border-block-end: 0.5pt solid #999;
display: block !important;
position: static !important;
background: transparent !important;
margin-inline: 0 !important;
padding: 0 0 2.5pt !important;
font-size: 11pt !important;
margin-block-end: 5.5pt !important;
border: 0 !important;
border-block-end: 0.5pt solid #999 !important;
break-after: avoid;
}
.section-title::before { content: none; }
.section-title::before,
.section-title::after {
content: none !important;
display: none !important;
}
/* --------------------------------------------------------------------------
POSTES
@@ -128,19 +201,25 @@ main > .container { display: block; }
coûtent 6 mm de marge gauche pour un gain de lisibilité nul.
-------------------------------------------------------------------------- */
.entry {
border-inline-start: 0;
padding-inline-start: 0;
padding-block-end: 7pt;
background: transparent !important;
border: 0 !important;
padding: 0 0 7pt !important;
margin: 0 !important;
break-inside: avoid;
}
.entry::before { content: none; }
.entry__date {
font-size: 8.6pt;
font-weight: 700;
color: #000;
margin-block-end: 0;
display: block !important;
background: transparent !important;
border: 0 !important;
padding: 0 !important;
font-family: "JetBrains Mono", ui-monospace, monospace !important;
font-size: 8.6pt !important;
font-weight: 700 !important;
color: #000 !important;
margin-block-end: 0 !important;
float: right; /* Date alignée à droite, à hauteur de l'intitulé */
}
@@ -209,23 +288,26 @@ main > .container { display: block; }
la place et n'apportent rien sur papier.
-------------------------------------------------------------------------- */
#competences .grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 7pt 16pt;
display: grid !important;
grid-template-columns: repeat(3, 1fr) !important;
gap: 7pt 16pt !important;
}
.card {
background: transparent;
border: 0;
box-shadow: none;
padding: 0;
transform: none;
grid-column: auto !important;
background: transparent !important;
border: 0 !important;
box-shadow: none !important;
padding: 0 !important;
transform: none !important;
break-inside: avoid;
}
.card__title {
font-size: 9.3pt;
margin-block-end: 3pt;
font-size: 9.3pt !important;
margin-block-end: 3pt !important;
padding-block-end: 0 !important;
border-block-end: 0 !important;
gap: 4pt;
/* Sur deux lignes (« Intelligence artificielle appliquée »), l'icône doit
rester alignée sur la première ligne et non se centrer entre les deux. */
@@ -253,13 +335,16 @@ main > .container { display: block; }
FORMATION
-------------------------------------------------------------------------- */
#formation .grid {
grid-template-columns: 1fr 1fr;
gap: 14pt;
display: grid !important;
grid-template-columns: 1fr 1fr !important;
gap: 14pt !important;
}
.education {
border-inline-start: 0;
padding-inline-start: 0;
grid-column: auto !important;
background: transparent !important;
border: 0 !important;
padding: 0 !important;
break-inside: avoid;
}
+388
View File
@@ -0,0 +1,388 @@
/* ==========================================================================
theme-switcher.css — Contrôleur flottant et modale d'exploration de thèmes
--------------------------------------------------------------------------
Volontairement isolé des variables du thème actif (valeurs propres en
--ts-*) pour garantir une lisibilité et un contraste WCAG AAA quel que
soit le webdesign appliqué à la page.
========================================================================== */
@layer utilities {
/* ------------------------------------------------------------------------
CONTRÔLEUR FLOTTANT (bas gauche)
------------------------------------------------------------------------ */
.theme-dock {
--ts-bg: #10201c;
--ts-bg-elevated: #1b312b;
--ts-border: rgb(255 255 255 / 20%);
--ts-ink: #f7f8f8;
--ts-ink-muted: #b7c7c2;
--ts-accent: #2fe59b;
--ts-accent-ink: #0a1915;
position: fixed;
inset-block-end: 1.25rem;
inset-inline-start: 1.25rem;
z-index: 180;
display: inline-flex;
align-items: center;
gap: 0.4rem;
max-inline-size: calc(100vw - 5.5rem);
padding: 0.35rem 0.45rem 0.35rem 0.75rem;
background-color: var(--ts-bg);
color: var(--ts-ink);
border: 1.5px solid var(--ts-border);
border-radius: 999px;
box-shadow: 0 10px 28px rgb(0 0 0 / 28%);
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.76rem;
line-height: 1.2;
}
.theme-dock__status {
display: inline-flex;
align-items: center;
gap: 0.45rem;
padding-inline-end: 0.35rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.theme-dock__dot {
inline-size: 0.55rem;
block-size: 0.55rem;
border-radius: 50%;
background-color: var(--ts-accent);
flex-shrink: 0;
}
.theme-dock__label {
color: var(--ts-ink-muted);
}
.theme-dock__name {
color: var(--ts-ink);
font-weight: 700;
}
.theme-dock__actions {
display: inline-flex;
align-items: center;
gap: 0.3rem;
flex-shrink: 0;
}
.theme-dock__btn {
display: inline-flex;
align-items: center;
gap: 0.35rem;
min-block-size: 2.1rem;
padding: 0.3rem 0.65rem;
border-radius: 999px;
border: 1px solid rgb(255 255 255 / 16%);
background-color: var(--ts-bg-elevated);
color: var(--ts-ink);
font-family: inherit;
font-size: 0.74rem;
font-weight: 600;
white-space: nowrap;
cursor: pointer;
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.theme-dock__btn:hover {
background-color: var(--ts-accent);
color: var(--ts-accent-ink);
border-color: var(--ts-accent);
}
.theme-dock__btn:focus-visible {
outline: 2px solid var(--ts-accent);
outline-offset: 2px;
}
.theme-dock__btn--primary {
background-color: var(--ts-accent);
color: var(--ts-accent-ink);
border-color: var(--ts-accent);
}
.theme-dock__btn--primary:hover {
background-color: #ffffff;
color: var(--ts-bg);
border-color: #ffffff;
}
.theme-dock__icon {
inline-size: 0.9rem;
block-size: 0.9rem;
stroke: currentcolor;
stroke-width: 2;
fill: none;
flex-shrink: 0;
}
/* ------------------------------------------------------------------------
MODALE D'EXPLORATION DES DESIGNS (<dialog>)
------------------------------------------------------------------------ */
.theme-modal {
--tm-bg: #ffffff;
--tm-surface: #f7f8f8;
--tm-border: #d5dddd;
--tm-ink: #10201c;
--tm-ink-soft: #43524e;
--tm-accent: #03996f;
--tm-accent-bright: #05bc8a;
inline-size: min(44rem, calc(100vw - 2rem));
max-block-size: calc(100svh - 3rem);
margin: auto;
padding: 0;
border: 1.5px solid var(--tm-ink);
border-radius: 12px;
background-color: var(--tm-bg);
color: var(--tm-ink);
box-shadow: 0 24px 64px rgb(0 0 0 / 32%);
font-family: "Inter", system-ui, sans-serif;
overflow: hidden;
}
.theme-modal::backdrop {
background: rgb(16 32 28 / 62%);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.theme-modal[open] {
display: flex;
flex-direction: column;
}
.theme-modal__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
padding: 1.25rem 1.5rem 1rem;
border-block-end: 1px solid var(--tm-border);
background-color: var(--tm-surface);
}
.theme-modal__title {
margin: 0;
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 1.05rem;
font-weight: 700;
color: var(--tm-ink);
}
.theme-modal__subtitle {
margin: 0.25rem 0 0;
font-size: 0.86rem;
color: var(--tm-ink-soft);
}
.theme-modal__close {
display: inline-grid;
place-items: center;
inline-size: 2.25rem;
block-size: 2.25rem;
border-radius: 8px;
border: 1px solid var(--tm-border);
background: var(--tm-bg);
color: var(--tm-ink);
flex-shrink: 0;
cursor: pointer;
transition: background-color 150ms ease, border-color 150ms ease;
}
.theme-modal__close:hover {
background-color: var(--tm-ink);
color: #ffffff;
border-color: var(--tm-ink);
}
.theme-modal__body {
padding: 1.25rem 1.5rem;
overflow-y: auto;
}
.theme-modal__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
gap: 1rem;
}
.theme-card {
display: flex;
flex-direction: column;
gap: 0.7rem;
padding: 1rem;
border-radius: 10px;
border: 1.5px solid var(--tm-border);
background-color: var(--tm-bg);
transition: border-color 150ms ease, box-shadow 150ms ease;
}
.theme-card[data-active="true"] {
border-color: var(--tm-accent);
box-shadow: 0 0 0 2px rgb(5 188 138 / 22%);
}
.theme-card__swatches {
display: flex;
gap: 0.35rem;
align-items: center;
}
.theme-card__swatch {
inline-size: 1.5rem;
block-size: 1.5rem;
border-radius: 6px;
border: 1px solid rgb(16 32 28 / 22%);
}
.theme-card__head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 0.5rem;
}
.theme-card__name {
margin: 0;
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.96rem;
font-weight: 700;
color: var(--tm-ink);
}
.theme-card__active {
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
padding: 0.15rem 0.45rem;
border-radius: 999px;
background-color: #eafaf4;
color: var(--tm-accent);
border: 1px solid rgb(5 188 138 / 35%);
}
.theme-card__subtitle {
margin: -0.45rem 0 0;
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.76rem;
color: var(--tm-accent);
}
.theme-card__desc {
margin: 0;
font-size: 0.86rem;
line-height: 1.55;
color: var(--tm-ink-soft);
flex: 1;
}
.theme-card__tags {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
list-style: none;
margin: 0;
padding: 0;
}
.theme-card__tags li {
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.68rem;
padding: 0.15rem 0.45rem;
border-radius: 4px;
background-color: var(--tm-surface);
border: 1px solid var(--tm-border);
color: var(--tm-ink-soft);
}
.theme-card__btn {
margin-block-start: 0.25rem;
min-block-size: 2.5rem;
padding: 0.45rem 0.9rem;
border-radius: 8px;
border: 1.5px solid var(--tm-ink);
background-color: var(--tm-ink);
color: #ffffff;
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.theme-card__btn:hover {
background-color: var(--tm-accent);
border-color: var(--tm-accent);
}
.theme-card[data-active="true"] .theme-card__btn {
background-color: var(--tm-surface);
color: var(--tm-ink);
border-color: var(--tm-border);
}
.theme-modal__footer {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.9rem 1.5rem;
border-block-start: 1px solid var(--tm-border);
background-color: var(--tm-surface);
font-size: 0.8rem;
color: var(--tm-ink-soft);
}
.theme-modal__surprise {
display: inline-flex;
align-items: center;
gap: 0.4rem;
min-block-size: 2.25rem;
padding: 0.35rem 0.85rem;
border-radius: 999px;
border: 1.5px solid var(--tm-ink);
background-color: #ffffff;
color: var(--tm-ink);
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
transition: background-color 150ms ease, color 150ms ease;
}
.theme-modal__surprise:hover {
background-color: var(--tm-ink);
color: #ffffff;
}
/* ------------------------------------------------------------------------
MOBILE
------------------------------------------------------------------------ */
@media (width <= 46rem) {
.theme-dock {
inset-block-end: 0.85rem;
inset-inline-start: 0.85rem;
padding: 0.3rem 0.35rem 0.3rem 0.6rem;
gap: 0.3rem;
}
.theme-dock__label {
display: none;
}
.theme-dock__btn {
padding: 0.3rem 0.55rem;
font-size: 0.72rem;
}
}
}
+254
View File
@@ -0,0 +1,254 @@
/* ==========================================================================
themes/bento-grid.css — Thème « Grille Bento » (Modulaire 2027)
--------------------------------------------------------------------------
Esthétique :
- Fond gris très clair neutre (#F4F5F7)
- Cartes blanches aux coins généreusement arrondis (22px), bordures
subtiles (1px solid rgb(0 0 0 / 6%))
- Grilles CSS modulaires asymétriques sur desktop (Profil, Projets,
Compétences, Formation) avec tuiles de largeur variée
- Retour propre sur une seule colonne sur mobile
- Accents vert émeraude repris du logo SVG
========================================================================== */
@layer themes {
[data-theme="bento-grid"] {
--color-bg: #f4f5f7;
--color-bg-translucent: rgb(244 245 247 / 86%);
--color-surface: #ffffff;
--color-surface-alt: #eef0f3;
--color-line: rgb(0 0 0 / 6%);
--color-line-strong: rgb(0 0 0 / 12%);
--color-ink: #10201c;
--color-ink-soft: #43504c;
--color-ink-faint: #5e6b67;
--color-accent: #05bc8a;
--color-accent-dark: #038762;
--color-accent-wash: #e8faf3;
--radius-sm: 10px;
--radius-md: 22px;
--shadow-sm: 0 1px 2px rgb(16 32 28 / 4%), 0 4px 14px rgb(16 32 28 / 3%);
--shadow-md: 0 8px 24px rgb(16 32 28 / 7%);
--transition-fast: 140ms ease;
--transition-base: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="bento-grid"] .site-header {
border-block-end: 1px solid rgb(0 0 0 / 6%);
}
[data-theme="bento-grid"] .site-header__logo .logo-bars {
color: var(--color-ink);
}
[data-theme="bento-grid"] .masthead {
background-color: var(--color-surface);
border: 1px solid var(--color-line);
border-radius: 24px;
padding: var(--space-2xl);
margin-block-start: var(--space-xl);
box-shadow: var(--shadow-sm);
}
[data-theme="bento-grid"] .section {
border-block-start: 0;
padding-block: var(--space-2xl) var(--space-lg);
}
/* ------------------------------------------------------------------------
TUILES BENTO (Enseignement, Coordination, Contact)
------------------------------------------------------------------------ */
[data-theme="bento-grid"] .entry {
background-color: var(--color-surface);
border: 1px solid var(--color-line);
border-radius: var(--radius-md);
padding: var(--space-lg);
margin-block-end: var(--space-md);
box-shadow: var(--shadow-sm);
}
[data-theme="bento-grid"] .entry:last-child {
margin-block-end: 0;
border-color: var(--color-line);
}
[data-theme="bento-grid"] .entry::before {
content: none;
}
[data-theme="bento-grid"] .course {
background-color: var(--color-bg);
border: 1px solid var(--color-line);
border-radius: 14px;
}
[data-theme="bento-grid"] .card,
[data-theme="bento-grid"] .project,
[data-theme="bento-grid"] .education,
[data-theme="bento-grid"] .contact-block {
background-color: var(--color-surface);
border: 1px solid var(--color-line);
border-radius: var(--radius-md);
padding: var(--space-lg);
box-shadow: var(--shadow-sm);
margin: 0;
transition:
border-color var(--transition-base),
box-shadow var(--transition-base),
transform var(--transition-base);
}
[data-theme="bento-grid"] .card:hover,
[data-theme="bento-grid"] .project:hover,
[data-theme="bento-grid"] .education:hover {
border-color: rgb(5 188 138 / 38%);
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}
[data-theme="bento-grid"] .button {
border-radius: 14px;
}
[data-theme="bento-grid"] .badge {
border-radius: 999px;
padding: 3px 10px;
}
[data-theme="bento-grid"] .project__stack li {
border-radius: 999px;
padding: 3px 9px;
}
/* ------------------------------------------------------------------------
GRILLES ASYMÉTRIQUES BENTO (Desktop)
------------------------------------------------------------------------ */
[data-theme="bento-grid"] .intro {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: var(--space-md);
padding-block: var(--space-xl) var(--space-lg);
}
[data-theme="bento-grid"] .intro__heading {
grid-column: 1 / -1;
max-inline-size: none;
margin-block-end: var(--space-xs);
}
[data-theme="bento-grid"] .intro__text {
background-color: var(--color-surface);
border: 1px solid var(--color-line);
border-radius: var(--radius-md);
padding: var(--space-lg);
margin: 0;
max-inline-size: none;
box-shadow: var(--shadow-sm);
}
[data-theme="bento-grid"] .intro__text:nth-of-type(1) { grid-column: span 3; }
[data-theme="bento-grid"] .intro__text:nth-of-type(2) { grid-column: span 3; }
[data-theme="bento-grid"] .intro__text:nth-of-type(3) { grid-column: span 2; }
[data-theme="bento-grid"] .intro__text:nth-of-type(4) {
grid-column: span 4;
background: linear-gradient(135deg, #ffffff 0%, #eafaf4 100%);
border-color: rgb(5 188 138 / 28%);
border-inline-start: 4px solid var(--color-accent);
}
/* Projets : 6 tuiles sur 3 rangées asymétriques (4+2, 2+4, 3+3) */
[data-theme="bento-grid"] #projets {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: var(--space-md);
}
[data-theme="bento-grid"] #projets .section-title {
grid-column: 1 / -1;
margin-block-end: var(--space-xs);
}
[data-theme="bento-grid"] #projets .project:nth-of-type(1) { grid-column: span 4; }
[data-theme="bento-grid"] #projets .project:nth-of-type(2) { grid-column: span 2; }
[data-theme="bento-grid"] #projets .project:nth-of-type(3) { grid-column: span 2; }
[data-theme="bento-grid"] #projets .project:nth-of-type(4) { grid-column: span 4; }
[data-theme="bento-grid"] #projets .project:nth-of-type(5) { grid-column: span 3; }
[data-theme="bento-grid"] #projets .project:nth-of-type(6) { grid-column: span 3; }
/* Compétences : 6 cartes asymétriques (4+2, 2+4, 4+2) */
[data-theme="bento-grid"] #competences .grid {
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: var(--space-md);
}
[data-theme="bento-grid"] #competences .card:nth-child(1) { grid-column: span 4; }
[data-theme="bento-grid"] #competences .card:nth-child(2) { grid-column: span 2; }
[data-theme="bento-grid"] #competences .card:nth-child(3) { grid-column: span 2; }
[data-theme="bento-grid"] #competences .card:nth-child(4) { grid-column: span 4; }
[data-theme="bento-grid"] #competences .card:nth-child(5) { grid-column: span 4; }
[data-theme="bento-grid"] #competences .card:nth-child(6) { grid-column: span 2; }
/* Formation : asymétrie 4 + 2 */
[data-theme="bento-grid"] #formation .grid {
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: var(--space-md);
}
[data-theme="bento-grid"] #formation .education:nth-child(1) { grid-column: span 4; }
[data-theme="bento-grid"] #formation .education:nth-child(2) { grid-column: span 2; }
/* ------------------------------------------------------------------------
MOBILE — retour propre en une seule colonne
------------------------------------------------------------------------ */
@media (width <= 46rem) {
[data-theme="bento-grid"] .masthead {
padding: var(--space-lg);
border-radius: 20px;
}
[data-theme="bento-grid"] .intro,
[data-theme="bento-grid"] #projets,
[data-theme="bento-grid"] #competences .grid,
[data-theme="bento-grid"] #formation .grid {
grid-template-columns: 1fr;
}
[data-theme="bento-grid"] .intro__text,
[data-theme="bento-grid"] #projets .project,
[data-theme="bento-grid"] #competences .card,
[data-theme="bento-grid"] #formation .education {
grid-column: 1 / -1 !important;
}
}
/* ------------------------------------------------------------------------
ANIMATION D'ÉTAT (≤ 260ms) & PREFERS-REDUCED-MOTION
------------------------------------------------------------------------ */
[data-js="true"][data-theme="bento-grid"] [data-reveal] {
opacity: 0;
transform: translateY(10px);
transition: opacity 240ms ease-out, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-js="true"][data-theme="bento-grid"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
[data-js="true"][data-theme="bento-grid"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
[data-theme="bento-grid"] .card:hover,
[data-theme="bento-grid"] .project:hover,
[data-theme="bento-grid"] .education:hover {
transform: none;
}
}
}
+131
View File
@@ -0,0 +1,131 @@
/* ==========================================================================
themes/classic.css — Thème « Classique » (Sobriété institutionnelle)
--------------------------------------------------------------------------
Affine l'identité originelle du site (fond blanc cassé, anthracite profond,
vert émeraude) et ajoute des micro-animations sobres :
- barre de progression de lecture
- apparition douce au défilement
- animation discrète du nouveau logo SVG au survol
- retour visuel franc sur la copie d'e-mail
========================================================================== */
@layer themes {
/* ------------------------------------------------------------------------
BARRE DE PROGRESSION DE LECTURE
------------------------------------------------------------------------ */
.reading-progress {
position: fixed;
inset-block-start: 0;
inset-inline: 0;
block-size: 3px;
z-index: calc(var(--z-sticky) + 5);
pointer-events: none;
background: transparent;
}
.reading-progress__bar {
display: block;
inline-size: 100%;
block-size: 100%;
background: linear-gradient(90deg, var(--color-accent-dark), var(--color-accent));
transform-origin: left center;
transform: scaleX(var(--scroll-progress, 0));
will-change: transform;
}
/* ------------------------------------------------------------------------
LOGO SVG — animation discrète au survol (stroke-dasharray)
------------------------------------------------------------------------ */
.site-header__logo .logo-bars {
color: var(--color-ink);
}
.site-header__logo .logo-bar {
transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
transform-origin: center;
}
.site-header__brand:hover .logo-bar-1 {
transform: translate(-1.5px, -1.5px);
}
.site-header__brand:hover .logo-bar-2 {
transform: translateY(-2px);
}
.site-header__brand:hover .logo-bar-3 {
transform: translate(1.5px, 1.5px);
}
/* ------------------------------------------------------------------------
APPARITION DOUCE AU DÉFILEMENT (uniquement si JS actif, ≤ 260ms)
------------------------------------------------------------------------ */
[data-js="true"][data-theme="classic"] [data-reveal] {
opacity: 0;
transform: translateY(10px);
transition:
opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-js="true"][data-theme="classic"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
/* ------------------------------------------------------------------------
RETOUR VISUEL SUR COPIE D'E-MAIL
------------------------------------------------------------------------ */
[data-copy][data-copied="true"] {
background-color: var(--color-accent-wash);
border-color: var(--color-accent);
color: var(--color-accent-dark);
}
/* ------------------------------------------------------------------------
AFFINAGE VISUEL CLASSIC
------------------------------------------------------------------------ */
[data-theme="classic"] .entry__role,
[data-theme="classic"] .project__title {
transition: color var(--transition-fast);
}
[data-theme="classic"] .project:hover .project__title {
color: var(--color-accent-dark);
}
[data-theme="classic"] .course {
transition:
border-color var(--transition-base),
transform var(--transition-base),
box-shadow var(--transition-base);
}
[data-theme="classic"] .course:hover {
border-color: var(--color-accent-border);
box-shadow: var(--shadow-sm);
transform: translateY(-1px);
}
/* ------------------------------------------------------------------------
RESPECT DE PREFERS-REDUCED-MOTION
------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
[data-js="true"][data-theme="classic"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
.reading-progress {
display: none;
}
.site-header__brand:hover .logo-bar-1,
.site-header__brand:hover .logo-bar-2,
.site-header__brand:hover .logo-bar-3 {
transform: none;
}
}
}
+366
View File
@@ -0,0 +1,366 @@
/* ==========================================================================
themes/editorial-type.css — Thème « Éditorial » (Typographie radicale)
--------------------------------------------------------------------------
Esthétique inspirée de l'édition suisse et du scan visuel en F :
- Fond papier ivoire chaud (#FAF8F5), encre sombre (#141413)
- Filets horizontaux fins (1px solid #141413), zéro ombre portée
- Police serif éditoriale contrastée (Instrument Serif) à très grande
échelle clamp() pour les titres, associée à Inter pour le corps
- Mise en page suisse en 2 colonnes sur desktop (catégorie/titre figé
à gauche, contenu détaillé à droite)
- Vert émeraude utilisé avec parcimonie uniquement sur les états actifs
et les appels à l'action
========================================================================== */
@layer themes {
[data-theme="editorial-type"] {
--color-bg: #faf8f5;
--color-bg-translucent: rgb(250 248 245 / 92%);
--color-surface: #faf8f5;
--color-surface-alt: #f2eee7;
--color-line: #141413;
--color-line-strong: #141413;
--color-ink: #141413;
--color-ink-soft: #353431;
--color-ink-faint: #57554f;
--color-ink-inverse: #faf8f5;
--color-accent: #03996f;
--color-accent-dark: #027f5c;
--color-accent-wash: transparent;
--color-accent-border: #141413;
--color-focus: #027f5c;
--font-editorial: "Instrument Serif", Georgia, "Times New Roman", serif;
--radius-sm: 0px;
--radius-md: 0px;
--shadow-sm: none;
--shadow-md: none;
--transition-fast: 140ms ease;
--transition-base: 200ms ease;
}
[data-theme="editorial-type"] .site-header {
background-color: var(--color-bg-translucent);
border-block-end: 1px solid #141413;
}
[data-theme="editorial-type"] .site-header__logo .logo-bars {
color: #141413;
}
[data-theme="editorial-type"] .site-nav__link {
font-family: var(--font-sans);
font-size: 0.84rem;
font-weight: 500;
color: var(--color-ink-faint);
}
[data-theme="editorial-type"] .site-nav__link[aria-current="true"] {
color: var(--color-accent-dark);
border-block-end-color: var(--color-accent-dark);
}
/* ------------------------------------------------------------------------
MASTHEAD ÉDITORIAL — grande échelle typographique
------------------------------------------------------------------------ */
[data-theme="editorial-type"] .masthead {
border-block-end: 1px solid #141413;
padding-block: var(--space-3xl) var(--space-2xl);
}
[data-theme="editorial-type"] .eyebrow {
font-family: var(--font-sans);
text-transform: uppercase;
letter-spacing: 0.14em;
font-size: 0.72rem;
font-weight: 600;
color: var(--color-ink-faint);
}
[data-theme="editorial-type"] .eyebrow::before {
content: none;
}
[data-theme="editorial-type"] .page-title {
font-family: var(--font-editorial);
font-weight: 400;
font-size: clamp(3rem, 2rem + 4.8vw, 5.25rem);
line-height: 0.98;
letter-spacing: -0.02em;
color: #141413;
margin-block-end: var(--space-md);
}
[data-theme="editorial-type"] .page-subtitle {
font-family: var(--font-sans);
font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
color: var(--color-ink-soft);
max-inline-size: 52ch;
}
[data-theme="editorial-type"] .contact-list {
font-family: var(--font-sans);
color: var(--color-ink-soft);
}
[data-theme="editorial-type"] .contact-list a {
color: #141413;
text-decoration: underline;
text-decoration-color: rgb(20 20 19 / 35%);
}
[data-theme="editorial-type"] .contact-list a:hover {
color: var(--color-accent-dark);
text-decoration-color: var(--color-accent-dark);
}
[data-theme="editorial-type"] .contact-list__icon {
stroke: #141413;
}
/* ------------------------------------------------------------------------
GRILLE SUISSE EN 2 COLONNES (Desktop)
Colonne gauche : titre / catégorie figé en sticky
Colonne droite : contenu détaillé
------------------------------------------------------------------------ */
[data-theme="editorial-type"] .intro,
[data-theme="editorial-type"] .section {
display: grid;
grid-template-columns: minmax(12.5rem, 16.5rem) minmax(0, 1fr);
column-gap: var(--space-2xl);
align-items: start;
border-block-start: 1px solid #141413;
padding-block: var(--space-2xl);
}
[data-theme="editorial-type"] .intro {
border-block-start: 0;
}
[data-theme="editorial-type"] .intro > *,
[data-theme="editorial-type"] .section > * {
grid-column: 2;
}
[data-theme="editorial-type"] .intro__heading,
[data-theme="editorial-type"] .section-title {
grid-column: 1;
grid-row: 1 / span 12;
position: sticky;
inset-block-start: calc(var(--header-height) + var(--space-lg));
font-family: var(--font-editorial);
font-weight: 400;
font-size: clamp(2rem, 1.5rem + 1.8vw, 2.85rem);
line-height: 1.05;
letter-spacing: -0.015em;
color: #141413;
margin: 0;
}
[data-theme="editorial-type"] .section-title::before {
content: none;
}
/* ------------------------------------------------------------------------
CONTENU ÉDITORIAL — zéro ombre, filets fins 1px
------------------------------------------------------------------------ */
[data-theme="editorial-type"] .intro__text--highlight {
border-inline-start: 2px solid #141413;
color: #141413;
}
[data-theme="editorial-type"] .entry {
border-inline-start: 0;
padding-inline-start: 0;
padding-block: 0 var(--space-lg);
margin-block-end: var(--space-lg);
border-block-end: 1px solid rgb(20 20 19 / 20%);
}
[data-theme="editorial-type"] .entry:last-child {
border-block-end: 0;
margin-block-end: 0;
padding-block-end: 0;
}
[data-theme="editorial-type"] .entry::before {
content: none;
}
[data-theme="editorial-type"] .entry__date {
font-family: var(--font-sans);
text-transform: uppercase;
letter-spacing: 0.08em;
font-size: 0.72rem;
font-weight: 600;
color: var(--color-ink-faint);
}
[data-theme="editorial-type"] .entry__role,
[data-theme="editorial-type"] .project__title,
[data-theme="editorial-type"] .card__title,
[data-theme="editorial-type"] .education__degree {
font-family: var(--font-editorial);
font-weight: 400;
font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.65rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: #141413;
}
[data-theme="editorial-type"] .course {
background: transparent;
border: 0;
border-block-start: 1px solid rgb(20 20 19 / 16%);
padding: var(--space-sm) 0;
margin: 0;
}
[data-theme="editorial-type"] .course__name {
font-family: var(--font-sans);
font-weight: 600;
color: #141413;
}
[data-theme="editorial-type"] .course__name::before {
content: none;
}
[data-theme="editorial-type"] .project {
background: transparent;
border: 0;
border-block-end: 1px solid rgb(20 20 19 / 20%);
padding: 0 0 var(--space-lg);
margin-block-end: var(--space-lg);
}
[data-theme="editorial-type"] .project:last-child {
border-block-end: 0;
margin-block-end: 0;
padding-block-end: 0;
}
[data-theme="editorial-type"] .badge {
font-family: var(--font-sans);
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-ink-faint);
background: transparent;
border: 1px solid rgb(20 20 19 / 28%);
}
[data-theme="editorial-type"] .project__stack li {
background: transparent;
border: 1px solid rgb(20 20 19 / 22%);
color: var(--color-ink-soft);
}
[data-theme="editorial-type"] .card {
background: transparent;
border: 0;
border-block-start: 1px solid #141413;
padding: var(--space-md) 0 0;
box-shadow: none;
}
[data-theme="editorial-type"] .card:hover {
transform: none;
box-shadow: none;
border-color: var(--color-accent-dark);
}
[data-theme="editorial-type"] .card__icon {
stroke: #141413;
}
[data-theme="editorial-type"] .marker-list li::before {
content: "—";
color: var(--color-ink-faint);
}
[data-theme="editorial-type"] .education {
border-inline-start: 0;
border-block-start: 1px solid #141413;
padding: var(--space-md) 0 0;
}
[data-theme="editorial-type"] .contact-block {
background: transparent;
border: 1px solid #141413;
padding: var(--space-xl);
}
/* Accent vert émeraude réservé aux appels à l'action */
[data-theme="editorial-type"] .button--primary {
background-color: var(--color-accent-dark);
color: #faf8f5;
}
[data-theme="editorial-type"] .button--primary:hover {
background-color: #141413;
color: #faf8f5;
}
[data-theme="editorial-type"] .button--secondary {
background-color: transparent;
border-color: #141413;
color: #141413;
}
[data-theme="editorial-type"] .button--secondary:hover {
border-color: var(--color-accent-dark);
color: var(--color-accent-dark);
}
[data-theme="editorial-type"] .to-top {
background-color: #faf8f5;
border-color: #141413;
color: #141413;
box-shadow: none;
}
[data-theme="editorial-type"] .site-footer {
border-block-start: 1px solid #141413;
}
/* ------------------------------------------------------------------------
MOBILE — retour propre en une seule colonne
------------------------------------------------------------------------ */
@media (width <= 46rem) {
[data-theme="editorial-type"] .intro,
[data-theme="editorial-type"] .section {
display: block;
}
[data-theme="editorial-type"] .intro__heading,
[data-theme="editorial-type"] .section-title {
position: static;
margin-block-end: var(--space-lg);
}
}
/* Révélation sobre ≤ 260ms */
[data-js="true"][data-theme="editorial-type"] [data-reveal] {
opacity: 0;
transform: translateY(8px);
transition: opacity 240ms ease-out, transform 240ms ease-out;
}
[data-js="true"][data-theme="editorial-type"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
[data-js="true"][data-theme="editorial-type"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
}
}
+198
View File
@@ -0,0 +1,198 @@
/* ==========================================================================
themes/liquid-glass.css — Thème « Liquid Glass » (Verre dépoli contrôlé)
--------------------------------------------------------------------------
Esthétique :
- Fond clair lumineux composé de halos doux (menthe pâle, bleu-vert très
clair, blanc cassé)
- Surfaces en verre dépoli (backdrop-filter: blur(16px) saturate(140%)),
fond blanc semi-opaque (0.72), bordure lumineuse (0.6) et ombre douce
- Repli propre @supports not (backdrop-filter: blur(1px))
- Contraste WCAG AA/AAA préservé sur tous les textes foncés
========================================================================== */
@layer themes {
[data-theme="liquid-glass"] {
--color-bg: #eef7f5;
--color-bg-translucent: rgb(255 255 255 / 68%);
--color-surface: rgb(255 255 255 / 72%);
--color-surface-alt: rgb(255 255 255 / 55%);
--color-line: rgb(16 32 28 / 10%);
--color-line-strong: rgb(16 32 28 / 18%);
--color-ink: #0f1f1b;
--color-ink-soft: #2e3e3a;
--color-ink-faint: #4a5b56;
--color-accent: #05bc8a;
--color-accent-dark: #027f5c;
--color-accent-wash: rgb(5 188 138 / 14%);
--lg-surface: rgb(255 255 255 / 72%);
--lg-border: 1px solid rgb(255 255 255 / 62%);
--lg-shadow:
0 8px 30px rgb(16 32 28 / 7%),
inset 0 1px 0 rgb(255 255 255 / 85%);
--radius-sm: 10px;
--radius-md: 18px;
--transition-fast: 150ms ease;
--transition-base: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* Halos lumineux doux dans les teintes du site */
[data-theme="liquid-glass"] body {
background-color: #f3f9f8;
background-image:
radial-gradient(46rem 34rem at 12% 8%, rgb(167 243 208 / 55%), transparent 68%),
radial-gradient(44rem 34rem at 88% 16%, rgb(186 230 253 / 52%), transparent 70%),
radial-gradient(50rem 36rem at 52% 62%, rgb(209 250 229 / 45%), transparent 72%),
radial-gradient(42rem 30rem at 18% 92%, rgb(224 242 254 / 50%), transparent 70%);
background-attachment: fixed;
}
[data-theme="liquid-glass"] .site-header {
background-color: var(--lg-surface);
backdrop-filter: blur(16px) saturate(140%);
-webkit-backdrop-filter: blur(16px) saturate(140%);
border-block-end: var(--lg-border);
box-shadow: 0 4px 20px rgb(16 32 28 / 5%);
}
[data-theme="liquid-glass"] .site-header__logo .logo-bars {
color: var(--color-ink);
}
/* Surfaces en verre dépoli */
[data-theme="liquid-glass"] .masthead,
[data-theme="liquid-glass"] .course,
[data-theme="liquid-glass"] .project,
[data-theme="liquid-glass"] .card,
[data-theme="liquid-glass"] .education,
[data-theme="liquid-glass"] .contact-block,
[data-theme="liquid-glass"] .intro__text--highlight {
background-color: var(--lg-surface);
backdrop-filter: blur(16px) saturate(140%);
-webkit-backdrop-filter: blur(16px) saturate(140%);
border: var(--lg-border);
border-radius: var(--radius-md);
box-shadow: var(--lg-shadow);
}
[data-theme="liquid-glass"] .masthead {
padding: var(--space-2xl);
margin-block-start: var(--space-xl);
}
[data-theme="liquid-glass"] .intro__text--highlight {
padding: var(--space-md) var(--space-lg);
border-inline-start: 3px solid var(--color-accent);
}
[data-theme="liquid-glass"] .section {
border-block-start: 1px solid rgb(16 32 28 / 8%);
}
[data-theme="liquid-glass"] .education {
padding: var(--space-lg);
}
[data-theme="liquid-glass"] .card:hover,
[data-theme="liquid-glass"] .project:hover,
[data-theme="liquid-glass"] .course:hover {
background-color: rgb(255 255 255 / 84%);
border-color: rgb(5 188 138 / 45%);
transform: translateY(-2px);
}
[data-theme="liquid-glass"] .button {
border-radius: 999px;
}
[data-theme="liquid-glass"] .button--secondary {
background-color: rgb(255 255 255 / 78%);
border-color: rgb(16 32 28 / 16%);
color: var(--color-ink);
}
[data-theme="liquid-glass"] .badge {
border-radius: 999px;
background-color: rgb(5 188 138 / 14%);
color: #027f5c;
}
[data-theme="liquid-glass"] .project__stack li {
background-color: rgb(255 255 255 / 80%);
border: 1px solid rgb(16 32 28 / 10%);
color: var(--color-ink-soft);
border-radius: 999px;
padding: 2px 9px;
}
[data-theme="liquid-glass"] .to-top {
background-color: rgb(255 255 255 / 78%);
backdrop-filter: blur(12px) saturate(140%);
-webkit-backdrop-filter: blur(12px) saturate(140%);
border: var(--lg-border);
box-shadow: var(--lg-shadow);
}
@media (width <= 46rem) {
[data-theme="liquid-glass"] .masthead {
padding: var(--space-lg);
}
[data-theme="liquid-glass"] .site-nav {
background-color: rgb(255 255 255 / 92%);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
}
}
/* ------------------------------------------------------------------------
REPLI PROPRE SI BACKDROP-FILTER NON SUPPORTÉ
------------------------------------------------------------------------ */
@supports not (backdrop-filter: blur(1px)) {
[data-theme="liquid-glass"] .site-header,
[data-theme="liquid-glass"] .masthead,
[data-theme="liquid-glass"] .course,
[data-theme="liquid-glass"] .project,
[data-theme="liquid-glass"] .card,
[data-theme="liquid-glass"] .education,
[data-theme="liquid-glass"] .contact-block,
[data-theme="liquid-glass"] .intro__text--highlight,
[data-theme="liquid-glass"] .to-top {
background-color: rgb(255 255 255 / 95%);
border-color: rgb(16 32 28 / 12%);
}
}
/* Révélation ≤ 260ms */
[data-js="true"][data-theme="liquid-glass"] [data-reveal] {
opacity: 0;
transform: translateY(10px);
transition: opacity 240ms ease-out, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-js="true"][data-theme="liquid-glass"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
[data-theme="liquid-glass"] body {
background-attachment: scroll;
}
[data-js="true"][data-theme="liquid-glass"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
[data-theme="liquid-glass"] .card:hover,
[data-theme="liquid-glass"] .project:hover,
[data-theme="liquid-glass"] .course:hover {
transform: none;
}
}
}
+690
View File
@@ -0,0 +1,690 @@
/* ==========================================================================
themes/neo-brutalist.css — Thème « Néo-Brutalisme » (Rétro-web 2027)
--------------------------------------------------------------------------
Esthétique :
- Grille modulaire marquée, bordures noires épaisses (2px–3px)
- Ombres portées franches sans flou (6px 6px 0 #111)
- Palette contrastée (jaune vif, violet électrique, vert acide, orange, bleu)
avec trame de points subtile sur le fond
- Sections présentées comme des fenêtres d'interface rétro (barre de titre
colorée + faux boutons décoratifs)
- Contraste typographique fort : polices display/pixel pour les titres et
la navigation, mais Inter très lisible sur fond blanc uni à l'intérieur
des fenêtres de texte (notamment Enseignement)
- Micro-interactions nerveuses au survol et au clic
========================================================================== */
@layer themes {
[data-theme="neo-brutalist"] {
/* ---- Tokens surchargés ---- */
--color-bg: #fffdf2;
--color-bg-translucent: #ffe500;
--color-surface: #ffffff;
--color-surface-alt: #fef08a;
--color-line: #111111;
--color-line-strong: #111111;
--color-ink: #111111;
--color-ink-soft: #1f2421;
--color-ink-faint: #3f4642;
--color-ink-inverse: #ffffff;
--color-accent: #8b5cf6;
--color-accent-dark: #5b21b6;
--color-accent-wash: #ede9fe;
--color-accent-border: #111111;
--color-accent-glow: #fef08a;
--color-focus: #5b21b6;
/* Couleurs d'accent rétro-web */
--nb-yellow: #ffe500;
--nb-purple: #c4b5fd;
--nb-purple-vivid: #7c3aed;
--nb-acid: #a3e635;
--nb-orange: #ff9f43;
--nb-blue: #93c5fd;
--nb-pink: #f9a8d4;
--nb-black: #111111;
--nb-shadow: 6px 6px 0 var(--nb-black);
--nb-shadow-sm: 4px 4px 0 var(--nb-black);
--nb-shadow-hover: 8px 8px 0 var(--nb-black);
--nb-border: 3px solid var(--nb-black);
--nb-border-sm: 2px solid var(--nb-black);
--font-display: "Space Grotesk", var(--font-sans);
--font-pixel: "Silkscreen", var(--font-mono);
--radius-sm: 0px;
--radius-md: 0px;
--shadow-sm: var(--nb-shadow-sm);
--shadow-md: var(--nb-shadow);
--transition-fast: 90ms steps(2, end);
--transition-base: 120ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
/* ------------------------------------------------------------------------
FOND DE PAGE — trame de points rétro subtile
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] body {
background-color: var(--color-bg);
background-image:
radial-gradient(rgb(17 17 17 / 14%) 1.25px, transparent 1.25px);
background-size: 20px 20px;
color: var(--nb-black);
}
/* ------------------------------------------------------------------------
BARRE DE PROGRESSION DE LECTURE
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .reading-progress {
block-size: 5px;
background: var(--nb-black);
}
[data-theme="neo-brutalist"] .reading-progress__bar {
background: linear-gradient(90deg, var(--nb-acid), var(--nb-yellow), var(--nb-orange));
}
/* ------------------------------------------------------------------------
EN-TÊTE & NAVIGATION
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .site-header {
background-color: var(--nb-yellow);
border-block-end: var(--nb-border);
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow: 0 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .site-header__brand {
font-family: var(--font-pixel);
font-size: 0.85rem;
letter-spacing: 0.01em;
color: var(--nb-black);
background: #ffffff;
border: var(--nb-border-sm);
padding: 0.25rem 0.6rem;
box-shadow: 3px 3px 0 var(--nb-black);
transition: transform var(--transition-base), box-shadow var(--transition-base);
}
[data-theme="neo-brutalist"] .site-header__brand:hover {
transform: translate(-2px, -2px);
box-shadow: 5px 5px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .site-header__logo .logo-bars {
color: var(--nb-black);
}
[data-theme="neo-brutalist"] .site-nav__list {
gap: 0.4rem;
}
[data-theme="neo-brutalist"] .site-nav__link {
font-family: var(--font-display);
font-weight: 700;
font-size: 0.82rem;
text-transform: uppercase;
letter-spacing: 0.03em;
color: var(--nb-black);
padding: 0.35rem 0.6rem;
border: 2px solid transparent;
border-block-end-width: 2px;
transition:
background-color var(--transition-fast),
transform var(--transition-base),
box-shadow var(--transition-base);
}
[data-theme="neo-brutalist"] .site-nav__link:hover {
background-color: #ffffff;
border-color: var(--nb-black);
transform: translate(-2px, -2px);
box-shadow: 3px 3px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .site-nav__link[aria-current="true"] {
background-color: var(--nb-black);
color: var(--nb-yellow);
border-color: var(--nb-black);
box-shadow: 3px 3px 0 var(--nb-acid);
}
[data-theme="neo-brutalist"] .nav-toggle {
font-family: var(--font-pixel);
font-size: 0.78rem;
background: #ffffff;
color: var(--nb-black);
border: var(--nb-border-sm);
box-shadow: 3px 3px 0 var(--nb-black);
padding-inline: 0.7rem;
}
/* ------------------------------------------------------------------------
MASTHEAD — fenêtre héros rétro
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] main > .container {
padding-block: var(--space-xl) var(--space-2xl);
display: grid;
gap: var(--space-xl);
}
[data-theme="neo-brutalist"] .masthead {
position: relative;
background: #ffffff;
border: var(--nb-border);
box-shadow: var(--nb-shadow);
padding: 3.4rem var(--space-xl) var(--space-xl);
overflow: hidden;
}
/* Barre de titre rétro du masthead */
[data-theme="neo-brutalist"] .masthead::before {
content: "CV://COURCELLE_MATTHIEU.EXE";
position: absolute;
inset-block-start: 0;
inset-inline: 0;
block-size: 2.35rem;
display: flex;
align-items: center;
padding-inline: var(--space-md) 5.5rem;
background: var(--nb-acid);
border-block-end: var(--nb-border);
font-family: var(--font-pixel);
font-size: 0.72rem;
color: var(--nb-black);
letter-spacing: 0.04em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Faux boutons de fenêtre décoratifs */
[data-theme="neo-brutalist"] .masthead::after {
content: "— □ ×";
position: absolute;
inset-block-start: 0.35rem;
inset-inline-end: 0.75rem;
font-family: var(--font-mono);
font-size: 0.85rem;
font-weight: 700;
color: var(--nb-black);
letter-spacing: 0.1em;
pointer-events: none;
}
[data-theme="neo-brutalist"] .eyebrow {
display: inline-block;
font-family: var(--font-pixel);
font-size: 0.72rem;
text-transform: uppercase;
color: var(--nb-black);
background: var(--nb-yellow);
border: var(--nb-border-sm);
padding: 0.25rem 0.6rem;
box-shadow: 3px 3px 0 var(--nb-black);
margin-block-end: var(--space-md);
}
[data-theme="neo-brutalist"] .eyebrow::before {
content: ">> ";
color: var(--nb-purple-vivid);
}
[data-theme="neo-brutalist"] .page-title {
font-family: var(--font-display);
font-weight: 700;
text-transform: uppercase;
letter-spacing: -0.04em;
color: var(--nb-black);
text-shadow: 3px 3px 0 var(--nb-yellow);
}
[data-theme="neo-brutalist"] .page-subtitle {
font-family: var(--font-display);
font-weight: 700;
color: var(--nb-black);
background: var(--nb-purple);
border: var(--nb-border-sm);
padding: 0.45rem 0.8rem;
max-inline-size: fit-content;
box-shadow: 4px 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .contact-list {
color: var(--nb-black);
gap: var(--space-xs) var(--space-sm);
}
[data-theme="neo-brutalist"] .contact-list li {
background: #fffdf2;
border: var(--nb-border-sm);
padding: 0.3rem 0.65rem;
font-family: var(--font-mono);
font-size: 0.8rem;
font-weight: 500;
box-shadow: 2px 2px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .contact-list a {
color: var(--nb-black);
font-weight: 700;
text-decoration-thickness: 2px;
}
[data-theme="neo-brutalist"] .contact-list__icon {
stroke: var(--nb-black);
stroke-width: 2.2;
}
/* ------------------------------------------------------------------------
BOUTONS — micro-interactions nerveuses
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .button {
font-family: var(--font-pixel);
font-size: 0.78rem;
text-transform: uppercase;
border: var(--nb-border);
box-shadow: var(--nb-shadow-sm);
transition:
transform var(--transition-base),
box-shadow var(--transition-base),
background-color var(--transition-fast);
}
[data-theme="neo-brutalist"] .button--primary {
background-color: var(--nb-purple-vivid);
color: #ffffff;
}
[data-theme="neo-brutalist"] .button--primary:hover {
background-color: var(--nb-black);
color: var(--nb-yellow);
transform: translate(-3px, -3px);
box-shadow: 7px 7px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .button--secondary {
background-color: var(--nb-yellow);
color: var(--nb-black);
}
[data-theme="neo-brutalist"] .button--secondary:hover {
background-color: var(--nb-acid);
color: var(--nb-black);
transform: translate(-3px, -3px);
box-shadow: 7px 7px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .button:active {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] [data-copy][data-copied="true"] {
background-color: var(--nb-acid);
color: var(--nb-black);
border-color: var(--nb-black);
}
/* ------------------------------------------------------------------------
FENÊTRES RÉTRO POUR LES 7 SECTIONS
Fond blanc uni garanti à l'intérieur pour une lisibilité irréprochable
du CV (notamment la section Enseignement).
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .intro,
[data-theme="neo-brutalist"] .section {
background-color: #ffffff;
border: var(--nb-border);
box-shadow: var(--nb-shadow);
padding: 0 var(--space-xl) var(--space-xl);
margin: 0;
}
/* Barre de titre rétro de chaque fenêtre de section */
[data-theme="neo-brutalist"] .intro__heading,
[data-theme="neo-brutalist"] .section-title {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-md);
margin-inline: calc(var(--space-xl) * -1);
margin-block-end: var(--space-xl);
padding: 0.75rem var(--space-xl);
background-color: var(--nb-yellow);
border-block-end: var(--nb-border);
font-family: var(--font-pixel);
font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.2rem);
line-height: 1.3;
letter-spacing: 0.02em;
text-transform: uppercase;
color: var(--nb-black);
max-inline-size: none;
}
[data-theme="neo-brutalist"] .section-title::before {
content: none;
}
/* Faux boutons de contrôle fenêtre à droite de chaque barre de titre */
[data-theme="neo-brutalist"] .intro__heading::after,
[data-theme="neo-brutalist"] .section-title::after {
content: "— □ ×";
flex-shrink: 0;
font-family: var(--font-mono);
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.12em;
padding: 0.15rem 0.45rem;
background: #ffffff;
border: var(--nb-border-sm);
box-shadow: 2px 2px 0 var(--nb-black);
}
/* Couleurs de barre de titre variées (toutes contrastées AAA/AA avec #111) */
[data-theme="neo-brutalist"] #profil .intro__heading { background-color: var(--nb-acid); }
[data-theme="neo-brutalist"] #enseignement .section-title { background-color: var(--nb-yellow); }
[data-theme="neo-brutalist"] #coordination .section-title { background-color: var(--nb-orange); }
[data-theme="neo-brutalist"] #projets .section-title { background-color: var(--nb-purple); }
[data-theme="neo-brutalist"] #competences .section-title { background-color: var(--nb-blue); }
[data-theme="neo-brutalist"] #formation .section-title { background-color: var(--nb-acid); }
[data-theme="neo-brutalist"] #contact .section-title { background-color: var(--nb-yellow); }
/* Texte intérieur : Inter, fond blanc pur, contraste maximal */
[data-theme="neo-brutalist"] .intro__text {
font-family: var(--font-sans);
color: var(--color-ink-soft);
line-height: 1.72;
}
[data-theme="neo-brutalist"] .intro__text--highlight {
background: #fffbeb;
border: var(--nb-border-sm);
border-inline-start: 6px solid var(--nb-purple-vivid);
padding: var(--space-md) var(--space-lg);
box-shadow: 4px 4px 0 var(--nb-black);
color: var(--nb-black);
}
/* ------------------------------------------------------------------------
PARCOURS & FICHES DE COURS (lisibilité prioritaire)
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .entry {
border-inline-start: 3px solid var(--nb-black);
padding-inline-start: var(--space-lg);
}
[data-theme="neo-brutalist"] .entry::before {
border-radius: 0;
inline-size: 14px;
block-size: 14px;
inset-inline-start: -8.5px;
background-color: var(--nb-yellow);
border: 2.5px solid var(--nb-black);
}
[data-theme="neo-brutalist"] .entry__date {
display: inline-block;
font-family: var(--font-pixel);
font-size: 0.7rem;
color: var(--nb-black);
background: var(--nb-acid);
border: var(--nb-border-sm);
padding: 0.15rem 0.5rem;
margin-block-end: var(--space-xs);
box-shadow: 2px 2px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .entry__role {
font-family: var(--font-display);
font-weight: 700;
color: var(--nb-black);
}
[data-theme="neo-brutalist"] .entry__org {
color: var(--color-ink-faint);
font-weight: 500;
}
[data-theme="neo-brutalist"] .entry__note {
font-family: var(--font-sans);
color: var(--color-ink-soft);
}
[data-theme="neo-brutalist"] .course {
background-color: #ffffff;
border: var(--nb-border-sm);
box-shadow: 4px 4px 0 var(--nb-black);
margin-block-end: var(--space-sm);
transition: transform var(--transition-base), box-shadow var(--transition-base);
}
[data-theme="neo-brutalist"] .course:hover {
transform: translate(-2px, -2px);
box-shadow: 6px 6px 0 var(--nb-black);
border-color: var(--nb-black);
}
[data-theme="neo-brutalist"] .course__name {
font-family: var(--font-display);
font-size: 0.95rem;
color: var(--nb-black);
}
[data-theme="neo-brutalist"] .course__name::before {
content: "■ ";
color: var(--nb-purple-vivid);
}
[data-theme="neo-brutalist"] .course__desc {
font-family: var(--font-sans);
color: var(--color-ink-soft);
}
/* ------------------------------------------------------------------------
PROJETS, CARTES COMPÉTENCES, FORMATION, CONTACT
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .project {
background-color: #ffffff;
border: var(--nb-border-sm);
box-shadow: var(--nb-shadow-sm);
margin-block-end: var(--space-md);
transition: transform var(--transition-base), box-shadow var(--transition-base);
}
[data-theme="neo-brutalist"] .project:hover {
transform: translate(-3px, -3px);
box-shadow: var(--nb-shadow-hover);
border-color: var(--nb-black);
}
[data-theme="neo-brutalist"] .project__title {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.08rem;
}
[data-theme="neo-brutalist"] .badge {
font-family: var(--font-mono);
font-weight: 700;
color: var(--nb-black);
background-color: var(--nb-yellow);
border: var(--nb-border-sm);
box-shadow: 2px 2px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .badge--muted {
background-color: var(--nb-orange);
color: var(--nb-black);
border-color: var(--nb-black);
}
[data-theme="neo-brutalist"] .project__stack li {
color: var(--nb-black);
background-color: #f3f4f6;
border: 1.5px solid var(--nb-black);
font-weight: 700;
padding: 2px 7px;
}
[data-theme="neo-brutalist"] .card {
background-color: #ffffff;
border: var(--nb-border-sm);
box-shadow: var(--nb-shadow-sm);
transition: transform var(--transition-base), box-shadow var(--transition-base);
}
[data-theme="neo-brutalist"] .card:hover {
border-color: var(--nb-black);
transform: translate(-3px, -3px);
box-shadow: var(--nb-shadow-hover);
}
[data-theme="neo-brutalist"] .card__title {
font-family: var(--font-display);
font-weight: 700;
padding-block-end: var(--space-xs);
border-block-end: 2px solid var(--nb-black);
}
[data-theme="neo-brutalist"] .card__icon {
stroke: var(--nb-black);
stroke-width: 2.2;
}
[data-theme="neo-brutalist"] .marker-list li::before {
content: "■";
color: var(--nb-purple-vivid);
}
[data-theme="neo-brutalist"] .education {
background: #fffdf2;
border: var(--nb-border-sm);
padding: var(--space-md);
box-shadow: 4px 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .education__degree {
font-family: var(--font-display);
font-weight: 700;
}
[data-theme="neo-brutalist"] .contact-block {
background: #fffdf2;
border: var(--nb-border-sm);
box-shadow: var(--nb-shadow-sm);
}
/* ------------------------------------------------------------------------
PIED DE PAGE & BOUTON RETOUR EN HAUT
------------------------------------------------------------------------ */
[data-theme="neo-brutalist"] .site-footer {
background-color: var(--nb-black);
color: #ffffff;
border-block-start: var(--nb-border);
}
[data-theme="neo-brutalist"] .site-footer__inner {
color: #ffffff;
}
[data-theme="neo-brutalist"] .site-footer a {
color: var(--nb-yellow);
font-weight: 700;
}
[data-theme="neo-brutalist"] .site-footer a:hover {
color: var(--nb-acid);
}
[data-theme="neo-brutalist"] .to-top {
border-radius: 0;
background-color: var(--nb-yellow);
color: var(--nb-black);
border: var(--nb-border);
box-shadow: 4px 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .to-top:hover {
background-color: var(--nb-acid);
color: var(--nb-black);
border-color: var(--nb-black);
transform: translate(-2px, -2px);
box-shadow: 6px 6px 0 var(--nb-black);
}
/* ------------------------------------------------------------------------
APPARITION AU DÉFILEMENT (franche et rapide)
------------------------------------------------------------------------ */
[data-js="true"][data-theme="neo-brutalist"] [data-reveal] {
opacity: 0;
transform: translateY(10px);
transition: opacity 220ms ease-out, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
[data-js="true"][data-theme="neo-brutalist"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
/* ------------------------------------------------------------------------
ADAPTATION MOBILE
------------------------------------------------------------------------ */
@media (width <= 46rem) {
[data-theme="neo-brutalist"] .site-nav {
background-color: var(--nb-yellow);
border-block-end: var(--nb-border);
box-shadow: 0 6px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .site-nav__link {
border-inline-start-width: 3px;
}
[data-theme="neo-brutalist"] .masthead {
padding: 3.1rem var(--space-md) var(--space-lg);
box-shadow: 4px 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .intro,
[data-theme="neo-brutalist"] .section {
padding: 0 var(--space-md) var(--space-lg);
box-shadow: 4px 4px 0 var(--nb-black);
}
[data-theme="neo-brutalist"] .intro__heading,
[data-theme="neo-brutalist"] .section-title {
margin-inline: calc(var(--space-md) * -1);
padding: 0.65rem var(--space-md);
font-size: 0.88rem;
}
[data-theme="neo-brutalist"] .intro__heading::after,
[data-theme="neo-brutalist"] .section-title::after {
font-size: 0.72rem;
padding: 0.1rem 0.35rem;
}
}
/* ------------------------------------------------------------------------
RESPECT DE PREFERS-REDUCED-MOTION
------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
[data-js="true"][data-theme="neo-brutalist"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
[data-theme="neo-brutalist"] .button:hover,
[data-theme="neo-brutalist"] .card:hover,
[data-theme="neo-brutalist"] .project:hover,
[data-theme="neo-brutalist"] .course:hover,
[data-theme="neo-brutalist"] .site-header__brand:hover {
transform: none;
}
}
}
+180
View File
@@ -0,0 +1,180 @@
/* ==========================================================================
themes/obsidian-dark.css — Thème « Obsidienne » (Intentional Dark Mode)
--------------------------------------------------------------------------
Palette architecturale sans noir pur (#000000) :
- Fond principal : #0D1110
- Surfaces élevées : #151B19
- Bordures fines : #242E2B
- Texte principal : #F0F4F2 (contraste ~17,5:1 AAA)
- Texte secondaire : #A3B2AC (contraste ~7,7:1 AAA sur #151B19)
- Accent lumineux : #2CE59B (contraste ~10,6:1 AAA sur #151B19)
========================================================================== */
@layer themes {
[data-theme="obsidian-dark"] {
color-scheme: dark;
--color-bg: #0d1110;
--color-bg-translucent: rgb(13 17 16 / 86%);
--color-surface: #151b19;
--color-surface-alt: #1c2421;
--color-line: #242e2b;
--color-line-strong: #32413c;
--color-ink: #f0f4f2;
--color-ink-soft: #c5d1cc;
--color-ink-faint: #a3b2ac;
--color-ink-inverse: #0d1110;
--color-accent: #2ce59b;
--color-accent-dark: #2ce59b;
--color-accent-wash: rgb(44 229 155 / 12%);
--color-accent-border: rgb(44 229 155 / 32%);
--color-accent-glow: rgb(44 229 155 / 10%);
--color-focus: #2ce59b;
--shadow-sm: 0 1px 2px rgb(0 0 0 / 28%);
--shadow-md: 0 8px 28px rgb(0 0 0 / 42%);
--transition-fast: 140ms ease;
--transition-base: 220ms ease;
}
/* Adaptation automatique des barres intérieures du logo SVG */
[data-theme="obsidian-dark"] .site-header__logo .logo-bars {
color: #f0f4f2;
}
[data-theme="obsidian-dark"] .reading-progress__bar {
background: linear-gradient(90deg, #05bc8a, #2ce59b);
}
[data-theme="obsidian-dark"] a:hover {
color: #6ef0bc;
}
[data-theme="obsidian-dark"] .button--primary {
background-color: #2ce59b;
color: #0d1110;
font-weight: 600;
}
[data-theme="obsidian-dark"] .button--primary:hover {
background-color: #f0f4f2;
color: #0d1110;
}
[data-theme="obsidian-dark"] .button--secondary {
background-color: #151b19;
border-color: #32413c;
color: #f0f4f2;
}
[data-theme="obsidian-dark"] .button--secondary:hover {
border-color: #2ce59b;
color: #2ce59b;
}
[data-theme="obsidian-dark"] [data-copy][data-copied="true"] {
background-color: rgb(44 229 155 / 16%);
border-color: #2ce59b;
color: #2ce59b;
}
[data-theme="obsidian-dark"] .intro__text--highlight {
background-color: #151b19;
border: 1px solid #242e2b;
border-inline-start: 3px solid #2ce59b;
padding: var(--space-md) var(--space-lg);
border-radius: var(--radius-md);
color: #f0f4f2;
}
[data-theme="obsidian-dark"] .entry::before {
background-color: #0d1110;
border-color: #2ce59b;
}
[data-theme="obsidian-dark"] .course,
[data-theme="obsidian-dark"] .project,
[data-theme="obsidian-dark"] .card,
[data-theme="obsidian-dark"] .contact-block {
background-color: #151b19;
border-color: #242e2b;
}
[data-theme="obsidian-dark"] .course:hover,
[data-theme="obsidian-dark"] .project:hover {
border-color: #32413c;
}
[data-theme="obsidian-dark"] .card:hover {
border-color: #2ce59b;
}
[data-theme="obsidian-dark"] .badge {
background-color: rgb(44 229 155 / 12%);
color: #2ce59b;
border-color: rgb(44 229 155 / 32%);
}
[data-theme="obsidian-dark"] .badge--muted {
background-color: #1c2421;
color: #a3b2ac;
border-color: #32413c;
}
[data-theme="obsidian-dark"] .project__stack li {
background-color: #1c2421;
color: #c5d1cc;
border: 1px solid #242e2b;
}
[data-theme="obsidian-dark"] .to-top {
background-color: #151b19;
border-color: #32413c;
color: #f0f4f2;
}
[data-theme="obsidian-dark"] .to-top:hover {
border-color: #2ce59b;
color: #2ce59b;
}
[data-theme="obsidian-dark"] .skip-link {
background-color: #2ce59b;
color: #0d1110;
}
[data-theme="obsidian-dark"] .skip-link:focus {
color: #0d1110;
}
@media (width <= 46rem) {
[data-theme="obsidian-dark"] .site-nav {
background-color: #151b19;
border-block-end-color: #242e2b;
}
}
/* Révélation sobre ≤ 260ms */
[data-js="true"][data-theme="obsidian-dark"] [data-reveal] {
opacity: 0;
transform: translateY(10px);
transition: opacity 240ms ease-out, transform 240ms ease-out;
}
[data-js="true"][data-theme="obsidian-dark"] [data-reveal][data-revealed="true"] {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
[data-js="true"][data-theme="obsidian-dark"] [data-reveal] {
opacity: 1;
transform: none;
transition: none;
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@
sélecteurs et quel que soit l'ordre des balises <link> dans le <head>.
Cela supprime la cause n°1 des conflits CSS : la course à la spécificité.
-------------------------------------------------------------------------- */
@layer tokens, base, layout, components, utilities;
@layer tokens, base, layout, components, themes, utilities;
@layer tokens {
:root {
+8 -5
View File
@@ -1,6 +1,9 @@
<!-- Variante monochrome : Safari applique sa propre couleur (mask-icon) -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<path d="M11 44 V21 L20.5 33.5 L30 21 V44M50.39 23.69 A11.5 11.5 0 1 0 50.39 41.31M11 52 H53"
fill="none" stroke="#000" stroke-width="5.5"
stroke-linecap="butt" stroke-linejoin="miter"/>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<path d="M 80 34 A 34 34 0 1 0 80 66"
fill="none" stroke="#000000" stroke-width="12" stroke-linecap="round"/>
<g fill="none" stroke="#000000" stroke-width="9" stroke-linecap="round">
<line x1="32.9" y1="51.7" x2="42.9" y2="34.3"/>
<line x1="41.5" y1="64.7" x2="58.5" y2="35.3"/>
<line x1="57.1" y1="65.7" x2="67.1" y2="48.3"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 428 B

+34 -23
View File
@@ -7,26 +7,24 @@
* PRINCIPE DIRECTEUR — amélioration progressive
* ---------------------------------------------
* Le site est intégralement lisible, navigable et imprimable sans
* JavaScript. Tout ce que ce fichier ajoute relève du confort :
* JavaScript. Tout ce que ce fichier ajoute relève du confort et de
* l'habillage dynamique :
*
* - navigation.js : replie le menu sur petit écran
* - scroll-spy.js : surligne la section en cours de lecture
* - back-to-top.js : raccourci de remontée
* - copy-email.js : copie de l'adresse en un clic
* - theme-manager.js : résolution et application du thème actif
* - theme-switcher.js : contrôleur flottant + modale d'exploration
* - motion.js : barre de progression + apparitions au scroll
* - navigation.js : replie le menu sur petit écran
* - scroll-spy.js : surligne la section en cours de lecture
* - back-to-top.js : raccourci de remontée
* - copy-email.js : copie de l'adresse en un clic
*
* Aucun contenu n'est injecté par script : le HTML servi est complet.
* C'est ce qui garantit l'indexation par les moteurs de recherche et la
* lecture par les agents conversationnels, dont beaucoup n'exécutent pas
* JavaScript.
*
* CHARGEMENT
* ----------
* Ce fichier est appelé avec type="module", donc :
* - différé par défaut (équivalent à defer), il ne bloque pas le rendu
* - exécuté en mode strict
* - portée isolée, aucune variable globale
* Aucun contenu éditorial n'est injecté par script : le HTML servi est
* complet, garantissant l'indexation et la lecture par les moteurs et IA.
*/
import { initThemeManager } from "./modules/theme-manager.js";
import { initThemeSwitcher } from "./modules/theme-switcher.js";
import { initMotion } from "./modules/motion.js";
import { initNavigation } from "./modules/navigation.js";
import { initScrollSpy } from "./modules/scroll-spy.js";
import { initBackToTop } from "./modules/back-to-top.js";
@@ -38,9 +36,19 @@ import { initCopyEmail } from "./modules/copy-email.js";
*/
function init() {
/* --- Signale que JS est actif : permet au CSS de n'appliquer certains
comportements (menu replié) que lorsqu'ils sont pilotables ------- */
comportements (menu replié, animations) que lorsqu'ils sont pilotables */
document.documentElement.dataset.js = "true";
const statusRegion = document.querySelector("[data-status]");
initThemeManager();
initThemeSwitcher({ status: statusRegion });
const motion = initMotion({
progressBar: document.querySelector("[data-reading-progress]"),
revealNodes: document.querySelectorAll("[data-reveal]"),
});
initNavigation({
toggle: document.querySelector("[data-nav-toggle]"),
nav: document.querySelector("[data-nav]"),
@@ -58,15 +66,18 @@ function init() {
initCopyEmail({
button: document.querySelector("[data-copy]"),
status: document.querySelector("[data-status]"),
status: statusRegion,
});
/* --- Bouton Imprimer / PDF ------------------------------------------ */
document.querySelectorAll("[data-print]").forEach((btn) => {
btn.addEventListener("click", () => {
motion.revealAll();
window.print();
});
});
}
/* -----------------------------------------------------------------------
Les modules sont différés, le DOM est donc normalement prêt. On teste
malgré tout readyState : cela rend le script robuste s'il est un jour
réutilisé dans un contexte de chargement différent.
----------------------------------------------------------------------- */
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init, { once: true });
} else {
+5 -3
View File
@@ -41,24 +41,26 @@ export function initCopyEmail({ button, status }) {
* @param {string} message
* @returns {void}
*/
const announce = (message) => {
const announce = (message, copied = false) => {
if (label) label.textContent = message;
if (status) status.textContent = message;
button.dataset.copied = String(copied);
clearTimeout(resetTimer);
resetTimer = setTimeout(() => {
if (label) label.textContent = originalLabel;
if (status) status.textContent = "";
button.dataset.copied = "false";
}, FEEDBACK_DURATION);
};
button.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(value);
announce("Adresse copiée");
announce("Adresse copiée", true);
} catch {
// Contexte non sécurisé, permission refusée ou API absente.
announce("Copie impossible");
announce("Copie impossible", false);
}
});
}
+84
View File
@@ -0,0 +1,84 @@
/**
* motion.js — Micro-animations sobres et barre de progression de lecture
* =============================================================================
* - Indicateur de progression de lecture fixé en haut de page
* - Révélation douce des sections au défilement via IntersectionObserver
* - Respect strict de prefers-reduced-motion: reduce
* - Révélation immédiate avant impression (beforeprint) pour garantir qu'aucun
* bloc ne reste invisible sur le PDF
*/
/**
* Force la visibilité de tous les éléments animés.
* @param {NodeListOf<HTMLElement>} elements
* @returns {void}
*/
export function revealAll(elements) {
elements.forEach((el) => {
el.dataset.revealed = "true";
});
}
/**
* Initialise la barre de progression de lecture et la révélation au scroll.
*
* @param {object} [options]
* @param {HTMLElement | null} [options.progressBar] - Conteneur de la barre.
* @param {NodeListOf<HTMLElement>} [options.revealNodes] - Éléments [data-reveal].
* @returns {{ revealAll: () => void }}
*/
export function initMotion({ progressBar, revealNodes } = {}) {
const nodes = revealNodes ?? document.querySelectorAll("[data-reveal]");
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
/* --- 1. Révélation au défilement ------------------------------------ */
if (reducedMotion || !("IntersectionObserver" in window)) {
revealAll(nodes);
} else if (nodes.length > 0) {
const observer = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.dataset.revealed = "true";
observer.unobserve(entry.target);
});
},
{
rootMargin: "0px 0px -8% 0px",
threshold: 0.05,
}
);
nodes.forEach((node) => observer.observe(node));
}
// Avant impression (y compris via Ctrl+P / Cmd+P), tout est révélé.
window.addEventListener("beforeprint", () => revealAll(nodes));
/* --- 2. Barre de progression de lecture ----------------------------- */
if (progressBar && !reducedMotion) {
let ticking = false;
const updateProgress = () => {
ticking = false;
const doc = document.documentElement;
const scrollable = doc.scrollHeight - window.innerHeight;
const ratio = scrollable > 0 ? Math.min(1, Math.max(0, window.scrollY / scrollable)) : 0;
progressBar.style.setProperty("--scroll-progress", ratio.toFixed(4));
};
const onScroll = () => {
if (ticking) return;
ticking = true;
window.requestAnimationFrame(updateProgress);
};
window.addEventListener("scroll", onScroll, { passive: true });
window.addEventListener("resize", onScroll, { passive: true });
updateProgress();
}
return {
revealAll: () => revealAll(nodes),
};
}
+233
View File
@@ -0,0 +1,233 @@
/**
* theme-manager.js — Gestionnaire du thème actif
* =============================================================================
* Applique le thème via document.documentElement.dataset.theme, charge les
* polices additionnelles propres au thème, persiste le choix dans localStorage,
* synchronise l'URL (?theme=<id>) et anime la transition d'état via
* document.startViewTransition() avec repli propre.
*
* Ordre de résolution au premier chargement :
* 1. Paramètre d'URL ?theme=<id> valide
* 2. Valeur sauvegardée dans localStorage
* 3. Tirage aléatoire parmi les thèmes enregistrés (+ sauvegarde)
*/
import {
THEMES,
DEFAULT_THEME_ID,
THEME_STORAGE_KEY,
THEME_QUERY_PARAM,
getThemeById,
isValidThemeId,
getRandomThemeId,
} from "../themes.js";
/** URL de polices déjà injectées dans le <head>. */
const loadedFontUrls = new Set();
/** Écouteurs notifiés à chaque changement de thème. */
const listeners = new Set();
let logoPulseTimer;
/**
* Lit localStorage de manière défensive (mode privé / stockage bloqué).
* @returns {string | null}
*/
function readStoredTheme() {
try {
return window.localStorage.getItem(THEME_STORAGE_KEY);
} catch {
return null;
}
}
/**
* Écrit dans localStorage de manière défensive.
* @param {string} themeId
* @returns {void}
*/
function storeTheme(themeId) {
try {
window.localStorage.setItem(THEME_STORAGE_KEY, themeId);
} catch {
// Stockage indisponible : on continue sans bloquer l'interface.
}
}
/**
* Charge à la demande les feuilles Google Fonts propres à un thème.
* @param {string[]} fontUrls
* @returns {void}
*/
function ensureThemeFonts(fontUrls = []) {
for (const href of fontUrls) {
if (!href || loadedFontUrls.has(href)) continue;
const existing = document.querySelector(`link[rel="stylesheet"][href="${href}"]`);
if (existing) {
loadedFontUrls.add(href);
continue;
}
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = href;
document.head.appendChild(link);
loadedFontUrls.add(href);
}
}
/**
* Met à jour <meta name="theme-color"> et <meta name="color-scheme">.
* @param {import("../themes.js").ThemeDefinition} theme
* @returns {void}
*/
function updateDocumentMeta(theme) {
const themeColorMeta = document.querySelector('meta[name="theme-color"]');
if (themeColorMeta && theme.metaThemeColor) {
themeColorMeta.setAttribute("content", theme.metaThemeColor);
}
const colorSchemeMeta = document.querySelector('meta[name="color-scheme"]');
if (colorSchemeMeta && theme.colorScheme) {
colorSchemeMeta.setAttribute("content", theme.colorScheme);
}
}
/**
* Met à jour le paramètre ?theme=<id> dans l'URL sans recharger ni empiler
* d'entrée d'historique.
* @param {string} themeId
* @returns {void}
*/
function syncUrlParam(themeId) {
try {
const url = new URL(window.location.href);
url.searchParams.set(THEME_QUERY_PARAM, themeId);
window.history.replaceState(null, "", url.toString());
} catch {
// Contexte file:// ou historique restreint.
}
}
/**
* Déclenche une micro-réaction d'état (< 260ms) sur le logo SVG lors d'un
* changement de thème, si les animations ne sont pas réduites.
* @returns {void}
*/
function triggerLogoReaction() {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
const logo = document.querySelector(".site-header__logo");
if (!logo) return;
logo.dataset.themePulse = "false";
// Force un reflow minimal pour relancer la micro-animation si clics rapides
void logo.getBoundingClientRect();
logo.dataset.themePulse = "true";
clearTimeout(logoPulseTimer);
logoPulseTimer = setTimeout(() => {
logo.dataset.themePulse = "false";
}, 260);
}
/**
* Détermine le thème initial selon la priorité définie.
* @returns {string}
*/
function resolveInitialThemeId() {
try {
const urlTheme = new URLSearchParams(window.location.search).get(THEME_QUERY_PARAM);
if (isValidThemeId(urlTheme)) return urlTheme;
} catch {
// Ignore
}
const preset = document.documentElement.dataset.theme;
if (isValidThemeId(preset)) return preset;
const stored = readStoredTheme();
if (isValidThemeId(stored)) return stored;
return getRandomThemeId();
}
/**
* Retourne l'identifiant du thème actif.
* @returns {string}
*/
export function getActiveThemeId() {
const current = document.documentElement.dataset.theme;
return isValidThemeId(current) ? current : DEFAULT_THEME_ID;
}
/**
* Applique un thème et notifie les abonnés.
*
* @param {string} themeId
* @param {object} [options]
* @param {boolean} [options.persist=true] - Enregistre dans localStorage.
* @param {boolean} [options.updateUrl=false] - Met à jour ?theme=<id> via replaceState.
* @param {boolean} [options.animate=false] - Utilise View Transitions + micro-réaction logo.
* @returns {import("../themes.js").ThemeDefinition}
*/
export function applyTheme(
themeId,
{ persist = true, updateUrl = false, animate = false } = {}
) {
const theme = getThemeById(themeId) ?? getThemeById(DEFAULT_THEME_ID) ?? THEMES[0];
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const commit = () => {
document.documentElement.dataset.theme = theme.id;
ensureThemeFonts(theme.fonts);
updateDocumentMeta(theme);
if (persist) storeTheme(theme.id);
if (updateUrl) syncUrlParam(theme.id);
listeners.forEach((callback) => callback(theme));
};
if (animate && !prefersReducedMotion && typeof document.startViewTransition === "function") {
document.startViewTransition(() => {
commit();
});
triggerLogoReaction();
} else {
commit();
if (animate) triggerLogoReaction();
}
return theme;
}
/**
* Tire au sort un thème différent de l'actuel, l'applique et met à jour l'URL.
* @returns {import("../themes.js").ThemeDefinition}
*/
export function pickSurpriseTheme() {
const nextId = getRandomThemeId(getActiveThemeId());
return applyTheme(nextId, { persist: true, updateUrl: true, animate: true });
}
/**
* S'abonne aux changements de thème.
* @param {(theme: import("../themes.js").ThemeDefinition) => void} callback
* @returns {() => void} Fonction de désabonnement.
*/
export function onThemeChange(callback) {
listeners.add(callback);
return () => listeners.delete(callback);
}
/**
* Initialise le gestionnaire de thèmes au chargement de la page.
* @returns {import("../themes.js").ThemeDefinition}
*/
export function initThemeManager() {
const initialId = resolveInitialThemeId();
return applyTheme(initialId, { persist: true, updateUrl: false, animate: false });
}
+213
View File
@@ -0,0 +1,213 @@
/**
* theme-switcher.js — Interface de contrôle et d'exploration des thèmes
* =============================================================================
* Génère et pilote :
* 1. Un dock flottant discret mais immédiatement repérable affichant le nom
* du thème actif + deux actions directes (« Surprise » et « Explorer »).
* 2. Une modale <dialog> accessible présentant tous les thèmes enregistrés
* dans themes.js (palette, description, tags, bascule instantanée).
*
* Injection en amélioration progressive : sans JavaScript, aucun contrôle
* inerte n'apparaît dans la page.
*/
import { THEMES, getThemeById } from "../themes.js";
import {
applyTheme,
getActiveThemeId,
onThemeChange,
pickSurpriseTheme,
} from "./theme-manager.js";
/**
* Crée la structure DOM du dock flottant et de la modale <dialog>.
* @returns {{ dock: HTMLElement, modal: HTMLDialogElement }}
*/
function buildSwitcherUI() {
const dock = document.createElement("aside");
dock.className = "theme-dock screen-only";
dock.setAttribute("aria-label", "Sélecteur de design");
dock.innerHTML = `
<span class="theme-dock__status">
<span class="theme-dock__dot" aria-hidden="true"></span>
<span class="theme-dock__label">Design :</span>
<span class="theme-dock__name" data-theme-current-name></span>
</span>
<div class="theme-dock__actions">
<button type="button" class="theme-dock__btn theme-dock__btn--primary" data-theme-surprise>
<svg class="theme-dock__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M16 3h5v5M4 20 21 3M21 16v5h-5M15 15l6 6M4 4l5 5"/>
</svg>
Surprise
</button>
<button type="button" class="theme-dock__btn" data-theme-explore aria-haspopup="dialog">
<svg class="theme-dock__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<rect x="3" y="3" width="7" height="7" rx="1"/>
<rect x="14" y="3" width="7" height="7" rx="1"/>
<rect x="3" y="14" width="7" height="7" rx="1"/>
<rect x="14" y="14" width="7" height="7" rx="1"/>
</svg>
Explorer
</button>
</div>
`;
const modal = document.createElement("dialog");
modal.className = "theme-modal screen-only";
modal.setAttribute("aria-labelledby", "theme-modal-title");
modal.innerHTML = `
<header class="theme-modal__header">
<div>
<h2 class="theme-modal__title" id="theme-modal-title">Explorer les designs</h2>
<p class="theme-modal__subtitle">
Même contenu, plusieurs directions artistiques. L'impression PDF reste toujours sobre.
</p>
</div>
<button type="button" class="theme-modal__close" data-theme-close aria-label="Fermer la fenêtre des designs">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true" focusable="false">
<path d="M18 6 6 18M6 6l12 12"/>
</svg>
</button>
</header>
<div class="theme-modal__body">
<div class="theme-modal__grid" data-theme-grid></div>
</div>
<footer class="theme-modal__footer">
<span>Le lien mis à jour dans la barre d'adresse permet de partager un design précis.</span>
<button type="button" class="theme-modal__surprise" data-theme-surprise>
Tirage aléatoire
</button>
</footer>
`;
const grid = modal.querySelector("[data-theme-grid]");
for (const theme of THEMES) {
const card = document.createElement("article");
card.className = "theme-card";
card.dataset.themeCard = theme.id;
const swatchesHtml = theme.palette
.map(
(color) =>
`<span class="theme-card__swatch" style="background-color:${color}" aria-hidden="true"></span>`
)
.join("");
const tagsHtml = theme.tags.map((tag) => `<li>${tag}</li>`).join("");
card.innerHTML = `
<div class="theme-card__swatches">${swatchesHtml}</div>
<div class="theme-card__head">
<h3 class="theme-card__name">${theme.name}</h3>
<span class="theme-card__active" hidden>Actif</span>
</div>
<p class="theme-card__subtitle">${theme.subtitle}</p>
<p class="theme-card__desc">${theme.description}</p>
<ul class="theme-card__tags" role="list">${tagsHtml}</ul>
<button type="button" class="theme-card__btn" data-theme-select="${theme.id}">
Appliquer ce design
</button>
`;
grid.appendChild(card);
}
document.body.append(dock, modal);
return { dock, modal };
}
/**
* Initialise le contrôleur de thèmes.
*
* @param {object} [options]
* @param {HTMLElement | null} [options.status] - Région aria-live pour annonces vocales.
* @returns {void}
*/
export function initThemeSwitcher({ status } = {}) {
const { dock, modal } = buildSwitcherUI();
const currentNameEl = dock.querySelector("[data-theme-current-name]");
const exploreBtn = dock.querySelector("[data-theme-explore]");
const closeBtn = modal.querySelector("[data-theme-close]");
const cards = modal.querySelectorAll("[data-theme-card]");
/**
* Synchronise l'interface avec le thème actif.
* @param {import("../themes.js").ThemeDefinition} theme
*/
const syncUI = (theme) => {
if (currentNameEl) currentNameEl.textContent = theme.name;
cards.forEach((card) => {
const isActive = card.dataset.themeCard === theme.id;
card.dataset.active = String(isActive);
const badge = card.querySelector(".theme-card__active");
const btn = card.querySelector("[data-theme-select]");
if (badge) badge.hidden = !isActive;
if (btn) {
btn.textContent = isActive ? "Design actif" : "Appliquer ce design";
btn.setAttribute("aria-pressed", String(isActive));
}
});
};
/**
* Annonce un changement de thème aux lecteurs d'écran.
* @param {string} message
*/
const announce = (message) => {
if (!status) return;
status.textContent = "";
requestAnimationFrame(() => {
status.textContent = message;
});
};
// Actions « Surprise » (dock + pied de modale)
const handleSurprise = () => {
const next = pickSurpriseTheme();
announce(`Design activé : ${next.name} (${next.subtitle}).`);
};
dock.querySelector("[data-theme-surprise]")?.addEventListener("click", handleSurprise);
modal.querySelector("[data-theme-surprise]")?.addEventListener("click", handleSurprise);
// Ouvrir la modale
exploreBtn?.addEventListener("click", () => {
if (typeof modal.showModal === "function") {
modal.showModal();
} else {
modal.setAttribute("open", "");
}
});
// Fermer la modale
const closeModal = () => {
if (typeof modal.close === "function") modal.close();
else modal.removeAttribute("open");
exploreBtn?.focus();
};
closeBtn?.addEventListener("click", closeModal);
// Fermeture au clic sur l'arrière-plan (backdrop)
modal.addEventListener("click", (event) => {
if (event.target === modal) closeModal();
});
// Sélection directe d'un thème dans la modale
modal.addEventListener("click", (event) => {
const selectBtn = event.target.closest("[data-theme-select]");
if (!selectBtn) return;
const themeId = selectBtn.dataset.themeSelect;
const applied = applyTheme(themeId, { persist: true, updateUrl: true, animate: true });
announce(`Design activé : ${applied.name} (${applied.subtitle}).`);
});
// État initial + abonnement aux futurs changements
const activeTheme = getThemeById(getActiveThemeId()) ?? THEMES[0];
syncUI(activeTheme);
onThemeChange(syncUI);
}
+143
View File
@@ -0,0 +1,143 @@
/**
* themes.js — Registre centralisé des thèmes visuels
* =============================================================================
* Source unique de vérité listant tous les webdesigns disponibles sur le site.
*
* POUR AJOUTER UN NOUVEAU THÈME :
* 1. Créer la feuille de style dédiée dans assets/css/themes/<id>.css
* (encapsulée dans @layer themes et scopée sur [data-theme="<id>"])
* 2. Lier cette feuille dans index.html
* 3. Ajouter son entrée dans le tableau THEMES ci-dessous
* 4. Ajouter son identifiant dans le micro-script anti-FOUC du <head>
*/
export const DEFAULT_THEME_ID = "classic";
export const THEME_STORAGE_KEY = "cm-theme";
export const THEME_QUERY_PARAM = "theme";
/**
* @typedef {object} ThemeDefinition
* @property {string} id - Identifiant technique (data-theme et ?theme=).
* @property {string} name - Nom court affiché dans l'interface.
* @property {string} subtitle - Sous-titre descriptif de l'esthétique.
* @property {string} description - Courte présentation affichée dans la modale.
* @property {string[]} tags - Étiquettes de tendance / style.
* @property {string[]} palette - Les 3 couleurs principales pour l'aperçu.
* @property {"light"|"dark"} colorScheme - Schéma chromatique natif (<meta color-scheme>).
* @property {string} metaThemeColor - Couleur appliquée à <meta name="theme-color">.
* @property {string[]} fonts - Feuilles Google Fonts chargées à la demande.
*/
/** @type {readonly ThemeDefinition[]} */
export const THEMES = Object.freeze([
Object.freeze({
id: "classic",
name: "Classique",
subtitle: "Sobriété institutionnelle",
description:
"Fond blanc cassé, anthracite profond et accent vert émeraude. Hiérarchie éditoriale rigoureuse et micro-animations discrètes.",
tags: ["Éditorial", "Sobre", "Institutionnel"],
palette: ["#f7f8f8", "#10201c", "#05bc8a"],
colorScheme: "light",
metaThemeColor: "#f7f8f8",
fonts: [],
}),
Object.freeze({
id: "neo-brutalist",
name: "Néo-Brutalisme",
subtitle: "Rétro-web 2027",
description:
"Grille modulaire marquée, bordures noires épaisses, ombres franches, fenêtres rétro et titres audacieux sur fonds de lecture clairs.",
tags: ["Rétro-web 2027", "Néo-brutalisme", "Contraste fort"],
palette: ["#ffe500", "#8b5cf6", "#111111"],
colorScheme: "light",
metaThemeColor: "#ffe500",
fonts: [
"https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&family=Space+Grotesk:wght@500;700&display=swap",
],
}),
Object.freeze({
id: "bento-grid",
name: "Grille Bento",
subtitle: "Modulaire asymétrique",
description:
"Fond gris neutre, tuiles blanches généreusement arrondies organisées en grilles asymétriques et accents vert émeraude.",
tags: ["Bento 2027", "Modulaire", "Clair"],
palette: ["#f4f5f7", "#ffffff", "#05bc8a"],
colorScheme: "light",
metaThemeColor: "#f4f5f7",
fonts: [],
}),
Object.freeze({
id: "obsidian-dark",
name: "Obsidienne",
subtitle: "Mode sombre architectural",
description:
"Surfaces obsidienne chaud sans noir pur, texte blanc perle et gris sauge haute lisibilité, accent émeraude lumineux.",
tags: ["Intentional Dark", "Architectural", "WCAG AAA"],
palette: ["#0d1110", "#151b19", "#2ce59b"],
colorScheme: "dark",
metaThemeColor: "#0d1110",
fonts: [],
}),
Object.freeze({
id: "liquid-glass",
name: "Liquid Glass",
subtitle: "Verre dépoli contrôlé",
description:
"Halos lumineux menthe et bleu-vert très clair derrière des cartes translucides en verre dépoli à fort contraste typographique.",
tags: ["Liquid Glass", "Translucide", "Lumineux"],
palette: ["#d8f8ec", "#ffffff", "#027f5c"],
colorScheme: "light",
metaThemeColor: "#eef7f5",
fonts: [],
}),
Object.freeze({
id: "editorial-type",
name: "Éditorial",
subtitle: "Typographie suisse radicale",
description:
"Papier ivoire chaud, grands titres serif contrastés, filets fins 1px, mise en page suisse en deux colonnes et zéro ombre.",
tags: ["Édition suisse", "Serif", "Minimaliste"],
palette: ["#faf8f5", "#141413", "#03996f"],
colorScheme: "light",
metaThemeColor: "#faf8f5",
fonts: [
"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap",
],
}),
]);
/**
* Retourne la définition complète d'un thème à partir de son identifiant.
* @param {string | null | undefined} id
* @returns {ThemeDefinition | undefined}
*/
export function getThemeById(id) {
if (!id) return undefined;
return THEMES.find((theme) => theme.id === id);
}
/**
* Indique si un identifiant correspond à un thème enregistré.
* @param {string | null | undefined} id
* @returns {boolean}
*/
export function isValidThemeId(id) {
return Boolean(getThemeById(id));
}
/**
* Tire un identifiant de thème au hasard, en excluant si possible le thème actif.
* @param {string | null} [excludeId]
* @returns {string}
*/
export function getRandomThemeId(excludeId = null) {
const candidates =
excludeId && THEMES.length > 1
? THEMES.filter((theme) => theme.id !== excludeId)
: THEMES;
const index = Math.floor(Math.random() * candidates.length);
return candidates[index]?.id ?? DEFAULT_THEME_ID;
}
+18 -19
View File
@@ -1,23 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img"
aria-label="MC, initiales de Matthieu Courcelle">
<title>MC — Matthieu Courcelle</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img"
aria-label="Logo Matthieu Courcelle">
<title>Matthieu Courcelle</title>
<defs>
<linearGradient id="logo-c-grad" x1="15%" y1="85%" x2="85%" y2="15%">
<stop offset="0%" stop-color="#028A63"/>
<stop offset="55%" stop-color="#05BC8A"/>
<stop offset="100%" stop-color="#3CE59D"/>
</linearGradient>
</defs>
<!-- Fond clair à coins arrondis, repris de la palette du site -->
<rect width="64" height="64" rx="12" fill="#F7F8F8"/>
<!-- Monogramme « C » arrondi en dégradé vert émeraude (grille 100x100) -->
<path class="logo-c" d="M 80 34 A 34 34 0 1 0 80 66"
fill="none" stroke="url(#logo-c-grad)" stroke-width="12" stroke-linecap="round"/>
<!-- Filet discret : garde l'icône lisible sur fond blanc comme sur fond sombre -->
<rect x="0.75" y="0.75" width="62.5" height="62.5" rx="11.25"
fill="none" stroke="#E3E6E6" stroke-width="1.5"/>
<!-- Monogramme tracé en chemins purs : aucune police système requise,
rendu identique partout. Style anguleux cohérent avec JetBrains Mono. -->
<g fill="none" stroke-width="5.5" stroke-linecap="butt" stroke-linejoin="miter">
<!-- M — encre principale -->
<path d="M11 44 V21 L20.5 33.5 L30 21 V44" stroke="#10201C"/>
<!-- C — accent underscorelab, cercle (43 ; 32,5) r=11,5, ouvert à droite -->
<path d="M50.39 23.69 A11.5 11.5 0 1 0 50.39 41.31" stroke="#05BC8A"/>
<!-- Trois barres obliques parallèles anthracite, espacement calibré à 5 unités -->
<g class="logo-bars" fill="none" stroke="#0E221C" stroke-width="9" stroke-linecap="round">
<line class="logo-bar-1" x1="32.9" y1="51.7" x2="42.9" y2="34.3"/>
<line class="logo-bar-2" x1="41.5" y1="64.7" x2="58.5" y2="35.3"/>
<line class="logo-bar-3" x1="57.1" y1="65.7" x2="67.1" y2="48.3"/>
</g>
<!-- Underscore : signature typographique reprise du prompt de terminal -->
<path d="M11 52 H53" stroke="#05BC8A" stroke-width="3.5" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

+69 -20
View File
@@ -150,10 +150,47 @@
<link rel="stylesheet" href="/assets/css/base.css">
<link rel="stylesheet" href="/assets/css/layout.css">
<link rel="stylesheet" href="/assets/css/components.css">
<link rel="stylesheet" href="/assets/css/themes/classic.css">
<link rel="stylesheet" href="/assets/css/themes/neo-brutalist.css">
<link rel="stylesheet" href="/assets/css/themes/bento-grid.css">
<link rel="stylesheet" href="/assets/css/themes/obsidian-dark.css">
<link rel="stylesheet" href="/assets/css/themes/liquid-glass.css">
<link rel="stylesheet" href="/assets/css/themes/editorial-type.css">
<link rel="stylesheet" href="/assets/css/utilities.css">
<link rel="stylesheet" href="/assets/css/theme-switcher.css">
<!-- Chargée uniquement à l'impression : ne pénalise pas le rendu écran -->
<link rel="stylesheet" href="/assets/css/print.css" media="print">
<!-- ==========================================================================
INITIALISATION SYNCHRONE DU THÈME (anti-FOUC)
Pose data-theme avant le premier rendu pour éviter tout flash visuel :
1. ?theme=<id> valide dans l'URL
2. Choix précédemment enregistré dans localStorage
3. Tirage aléatoire + sauvegarde dans localStorage
========================================================================== -->
<script>
(function () {
var VALID = ["classic", "neo-brutalist", "bento-grid", "obsidian-dark", "liquid-glass", "editorial-type"];
var KEY = "cm-theme";
var chosen = null;
try {
var param = new URLSearchParams(window.location.search).get("theme");
if (VALID.indexOf(param) !== -1) chosen = param;
} catch (e) {}
if (!chosen) {
try {
var saved = window.localStorage.getItem(KEY);
if (VALID.indexOf(saved) !== -1) chosen = saved;
} catch (e) {}
}
if (!chosen) {
chosen = VALID[Math.floor(Math.random() * VALID.length)];
try { window.localStorage.setItem(KEY, chosen); } catch (e) {}
}
document.documentElement.dataset.theme = chosen;
})();
</script>
<!-- ==========================================================================
SCRIPT
type="module" implique defer : le téléchargement est parallèle à
@@ -357,6 +394,11 @@
<body>
<!-- Indicateur de progression de lecture (piloté par motion.js) -->
<div class="reading-progress screen-only" data-reading-progress aria-hidden="true">
<span class="reading-progress__bar"></span>
</div>
<!-- Repère de focus pour le retour en haut de page (voir back-to-top.js).
tabindex="-1" le rend focusable par script sans l'insérer dans l'ordre
de tabulation naturel. -->
@@ -381,13 +423,24 @@
<a class="site-header__brand" href="#haut-de-page">
<!-- Le logo est décoratif : le nom est déjà écrit à côté en texte.
aria-hidden évite la double annonce par le lecteur d'écran. -->
<svg class="site-header__logo" viewBox="0 0 64 64" aria-hidden="true" focusable="false">
<g fill="none" stroke-width="5.5" stroke-linecap="butt" stroke-linejoin="miter">
<path d="M11 44 V21 L20.5 33.5 L30 21 V44" stroke="currentColor"/>
<path d="M50.39 23.69 A11.5 11.5 0 1 0 50.39 41.31" stroke="#05BC8A"/>
aria-hidden évite la double annonce par le lecteur d'écran.
Grille 100x100 calibrée à 5 unités ; tracés séparés prêts pour
l'animation et adaptation multi-thèmes via currentColor. -->
<svg class="site-header__logo" viewBox="0 0 100 100" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="logo-c-grad" x1="15%" y1="85%" x2="85%" y2="15%">
<stop offset="0%" stop-color="#028A63"/>
<stop offset="55%" stop-color="#05BC8A"/>
<stop offset="100%" stop-color="#3CE59D"/>
</linearGradient>
</defs>
<path class="logo-c" d="M 80 34 A 34 34 0 1 0 80 66"
fill="none" stroke="url(#logo-c-grad)" stroke-width="12" stroke-linecap="round"/>
<g class="logo-bars" fill="none" stroke="currentColor" stroke-width="9" stroke-linecap="round">
<line class="logo-bar logo-bar-1" x1="32.9" y1="51.7" x2="42.9" y2="34.3"/>
<line class="logo-bar logo-bar-2" x1="41.5" y1="64.7" x2="58.5" y2="35.3"/>
<line class="logo-bar logo-bar-3" x1="57.1" y1="65.7" x2="67.1" y2="48.3"/>
</g>
<path d="M11 52 H53" stroke="#05BC8A" stroke-width="3.5" stroke-linecap="round"/>
</svg>
courcelle_matthieu
</a>
@@ -497,13 +550,9 @@
Me contacter
</a>
<!--
onclick inline : exception assumée et unique dans ce projet.
window.print() n'a aucun sens sans JavaScript et le sortir dans un
module imposerait un fichier entier pour une ligne. Le bouton est
volontairement absent du flux d'impression.
-->
<button class="button button--secondary" type="button" onclick="window.print()">
<!-- Bouton d'impression piloté par main.js (data-print) : révèle
toutes les sections avant window.print() et reste masqué sur papier. -->
<button class="button button--secondary" type="button" data-print>
<svg class="button__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M7 9V3h10v6"/>
<rect x="4" y="9" width="16" height="7" rx="2"/>
@@ -517,7 +566,7 @@
<!-- ====================================================================
PRÉSENTATION
==================================================================== -->
<section class="intro" id="profil" data-section aria-labelledby="titre-profil">
<section class="intro" id="profil" data-section data-reveal aria-labelledby="titre-profil">
<h2 class="intro__heading" id="titre-profil">
Enseigner, transmettre, construire des outils qui servent
</h2>
@@ -567,7 +616,7 @@
<!-- ====================================================================
ENSEIGNEMENT
==================================================================== -->
<section class="section" id="enseignement" data-section aria-labelledby="titre-enseignement">
<section class="section" id="enseignement" data-section data-reveal aria-labelledby="titre-enseignement">
<h2 class="section-title" id="titre-enseignement">Enseignement</h2>
<article class="entry">
@@ -699,7 +748,7 @@
<!-- ====================================================================
COORDINATION
==================================================================== -->
<section class="section" id="coordination" data-section aria-labelledby="titre-coordination">
<section class="section" id="coordination" data-section data-reveal aria-labelledby="titre-coordination">
<h2 class="section-title" id="titre-coordination">Coordination pédagogique</h2>
<article class="entry">
@@ -730,7 +779,7 @@
<!-- ====================================================================
PROJETS
==================================================================== -->
<section class="section" id="projets" data-section aria-labelledby="titre-projets">
<section class="section" id="projets" data-section data-reveal aria-labelledby="titre-projets">
<h2 class="section-title" id="titre-projets">Projets</h2>
<article class="project">
@@ -825,7 +874,7 @@
<!-- ====================================================================
COMPÉTENCES
==================================================================== -->
<section class="section" id="competences" data-section aria-labelledby="titre-competences">
<section class="section" id="competences" data-section data-reveal aria-labelledby="titre-competences">
<h2 class="section-title" id="titre-competences">Compétences</h2>
<div class="grid">
@@ -935,7 +984,7 @@
<!-- ====================================================================
FORMATION
==================================================================== -->
<section class="section" id="formation" data-section aria-labelledby="titre-formation">
<section class="section" id="formation" data-section data-reveal aria-labelledby="titre-formation">
<h2 class="section-title" id="titre-formation">Formation</h2>
<div class="grid">
@@ -956,7 +1005,7 @@
<!-- ====================================================================
CONTACT
==================================================================== -->
<section class="section" id="contact" data-section aria-labelledby="titre-contact">
<section class="section" id="contact" data-section data-reveal aria-labelledby="titre-contact">
<h2 class="section-title" id="titre-contact">Contact</h2>
<div class="contact-block">
+11
View File
@@ -32,10 +32,21 @@ REQUIS=(
"assets/css/base.css"
"assets/css/layout.css"
"assets/css/components.css"
"assets/css/themes/classic.css"
"assets/css/themes/neo-brutalist.css"
"assets/css/themes/bento-grid.css"
"assets/css/themes/obsidian-dark.css"
"assets/css/themes/liquid-glass.css"
"assets/css/themes/editorial-type.css"
"assets/css/utilities.css"
"assets/css/theme-switcher.css"
"assets/css/print.css"
# --- Scripts ---
"assets/js/main.js"
"assets/js/themes.js"
"assets/js/modules/theme-manager.js"
"assets/js/modules/theme-switcher.js"
"assets/js/modules/motion.js"
"assets/js/modules/navigation.js"
"assets/js/modules/scroll-spy.js"
"assets/js/modules/back-to-top.js"