feat(vitrine): modernisation UI (nav, home bento, typo, shortcodes)

- Header sticky, menu mobile, lien d’évitement et JS léger (site.js)
- Accueil : layouts/index.html, contenu structuré en front matter, grille bento
- Motif « parcours » en SVG statique (évite la casse minify sur path inline)
- CSS : tokens, clamp, focus-visible, prefers-reduced-motion, formulaire contact
- Footer aligné sur la charte (plus de styles inline Bootstrap)
- Shortcodes featureblock + card ; fonctionnalités en blocs featureblock
- Polices : Merienda + Source Sans 3 (remplace la pile à 5 Google Fonts)

Made-with: Cursor
This commit is contained in:
2026-04-22 18:47:41 +02:00
parent 1cc51e0745
commit a6b329a698
14 changed files with 798 additions and 214 deletions
+577 -104
View File
@@ -1,143 +1,543 @@
/* Charte Graphique P'titsPas */
/* Charte P'titsPas — vitrine modernisée (tokens + layout) */
@import url("https://fonts.googleapis.com/css2?family=Merienda:wght@400;700&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");
/* Variables de Couleurs */
:root {
--color-peche-doux: #FFD7A8;
--color-menthe-claire: #AEE1CD;
--color-rose-tendre: #F6B2C4;
--color-jaune-pale: #FFECB3;
--color-lavande: #E6E6FA; /* Approximation, à ajuster si vous avez un hex exact */
--color-corail-leger: #FFDAB9; /* Approximation, à ajuster */
--color-texte-principal: #333333;
--color-texte-secondaire: #555555;
--color-blanc: #FFFFFF;
--padding-module: 8px;
--color-peche-doux: #ffd7a8;
--color-menthe-claire: #aee1cd;
--color-rose-tendre: #f6b2c4;
--color-jaune-pale: #ffecb3;
--color-lavande: #e6e6fa;
--color-corail-leger: #ffdab9;
--color-texte-principal: #2c2c2c;
--color-texte-secondaire: #555;
--color-blanc: #fff;
--color-lien: #c45b6e;
--color-lien-hover: #a8485a;
--color-surface: rgba(255, 255, 255, 0.92);
--shadow-soft: 0 2px 12px rgba(44, 44, 44, 0.06);
--shadow-card: 0 4px 24px rgba(44, 44, 44, 0.08);
--radius-sm: 8px;
--radius-md: 16px;
--radius-lg: 24px;
--space-1: 0.5rem;
--space-2: 1rem;
--space-3: 1.5rem;
--space-4: 2rem;
--space-5: 3rem;
--font-display: "Merienda", cursive;
--font-body: "Source Sans 3", system-ui, sans-serif;
--header-height: 4rem;
--content-max: 72rem;
--nav-break: 52rem;
}
/* Import des polices (exemple avec Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Merienda:wght@400;700&family=Open+Sans:wght@400;700&family=Poppins:wght@700&family=Quicksand:wght@500;700&family=Montserrat:wght@400;700&display=swap');
/* Si vous avez une police script/brushed spécifique, elle devra être importée ici aussi, potentiellement localement */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
/* Styles de Base */
body {
font-family: 'Open Sans', sans-serif;
margin: 0;
font-family: var(--font-body);
font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
line-height: 1.65;
color: var(--color-texte-principal);
background-color: var(--color-blanc); /* Ou une teinte pastel très claire comme fond général */
background: linear-gradient(165deg, var(--color-blanc) 0%, var(--color-lavande) 35%, var(--color-menthe-claire) 100%);
background-attachment: fixed;
min-height: 100vh;
}
:focus-visible {
outline: 3px solid var(--color-menthe-claire);
outline-offset: 3px;
}
.skip-link {
position: absolute;
left: -9999px;
z-index: 1000;
padding: var(--space-2) var(--space-3);
background: var(--color-texte-principal);
color: var(--color-blanc);
font-weight: 600;
text-decoration: none;
border-radius: var(--radius-sm);
}
.skip-link:focus {
left: var(--space-2);
top: var(--space-2);
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* ——— Header ——— */
.site-header {
position: sticky;
top: 0;
z-index: 50;
background: color-mix(in srgb, var(--color-menthe-claire) 92%, transparent);
backdrop-filter: blur(10px);
border-bottom: 1px solid color-mix(in srgb, var(--color-texte-principal) 8%, transparent);
box-shadow: var(--shadow-soft);
}
.site-header__inner {
max-width: var(--content-max);
margin: 0 auto;
padding: var(--space-2) var(--space-3);
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-2);
min-height: var(--header-height);
}
.site-logo {
font-family: var(--font-display);
font-weight: 700;
font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
color: var(--color-texte-principal);
text-decoration: none;
white-space: nowrap;
}
.site-logo:hover {
text-decoration: none;
color: var(--color-lien-hover);
}
.site-nav {
position: relative;
display: flex;
align-items: center;
justify-content: flex-end;
}
.nav-toggle {
display: flex;
flex-direction: column;
justify-content: center;
gap: 6px;
width: 2.75rem;
height: 2.75rem;
padding: 0;
border: none;
border-radius: var(--radius-sm);
background: var(--color-blanc);
cursor: pointer;
box-shadow: var(--shadow-soft);
}
.nav-toggle__bar {
display: block;
width: 1.25rem;
height: 2px;
margin: 0 auto;
background: var(--color-texte-principal);
border-radius: 1px;
transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-nav.is-open .nav-toggle__bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}
.site-nav.is-open .nav-toggle__bar:nth-child(2) {
opacity: 0;
}
.site-nav.is-open .nav-toggle__bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}
.site-nav__list {
list-style: none;
margin: 0;
padding: 0;
line-height: 1.6;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: var(--space-1);
}
main {
padding: calc(var(--padding-module) * 3); /* 24px */
max-width: 960px;
.site-nav__list a {
display: block;
padding: var(--space-1) var(--space-2);
font-weight: 600;
font-size: 0.95rem;
color: var(--color-texte-principal);
text-decoration: none;
border-radius: var(--radius-sm);
transition: background-color 0.2s ease;
}
.site-nav__list a:hover {
background: var(--color-peche-doux);
text-decoration: none;
}
@media (max-width: 51.99rem) {
.nav-toggle {
display: flex;
}
.site-nav__panel {
position: absolute;
left: 0;
right: 0;
top: 100%;
max-height: 0;
overflow: hidden;
background: color-mix(in srgb, var(--color-blanc) 96%, var(--color-menthe-claire));
border-bottom: 1px solid color-mix(in srgb, var(--color-texte-principal) 8%, transparent);
transition: max-height 0.35s ease;
}
.site-nav.is-open .site-nav__panel {
max-height: 24rem;
}
.site-nav__list {
flex-direction: column;
padding: var(--space-3);
align-items: stretch;
}
.site-nav__list a {
text-align: center;
}
}
@media (min-width: 52rem) {
.nav-toggle {
display: none;
}
.site-nav {
flex: 1;
}
.site-nav__panel {
position: static;
max-height: none !important;
overflow: visible;
background: transparent;
border: none;
}
.site-nav__list {
justify-content: flex-end;
}
}
/* ——— Main ——— */
.site-main {
max-width: var(--content-max);
margin: 0 auto;
padding: var(--space-4) var(--space-3) var(--space-5);
}
.page-shell {
background: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
padding: var(--space-4);
}
.page-shell .content {
max-width: 52rem;
margin: 0 auto;
}
h1 {
font-family: 'Merienda', cursive; /* Police Script pour titres d'impact */
color: var(--color-texte-principal);
/* Peut nécessiter des ajustements de taille ou de graisse spécifiques */
/* font-weight: 700; /* ou 400 selon le style désiré */
}
h2, h3, h4, h5, h6 {
font-family: 'Poppins', sans-serif; /* Pour les sous-titres et autres titres */
color: var(--color-texte-principal);
}
/* Accroches et sous-titres (exemples) */
.accroche {
font-family: 'Quicksand', sans-serif;
font-family: var(--font-display);
font-weight: 700;
font-size: clamp(1.65rem, 1.2rem + 2vw, 2.35rem);
line-height: 1.25;
color: var(--color-texte-principal);
margin: 0 0 var(--space-3);
}
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-body);
font-weight: 700;
color: var(--color-texte-principal);
line-height: 1.3;
}
h2 {
font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}
h3 {
font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
}
.accroche {
font-weight: 600;
color: var(--color-texte-secondaire);
}
a {
color: var(--color-corail-leger); /* Corail léger pour les liens */
text-decoration: none;
color: var(--color-lien);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 3px;
}
a:hover {
text-decoration: underline;
color: var(--color-lien-hover);
}
/* Header / Navigation */
header nav {
background-color: var(--color-menthe-claire); /* Menthe claire pour le header */
padding: var(--padding-module) 0;
/* ——— Home ——— */
.home-hero {
position: relative;
overflow: hidden;
border-radius: var(--radius-lg);
background: var(--color-surface);
box-shadow: var(--shadow-card);
margin-bottom: var(--space-4);
}
header nav ul {
list-style-type: none;
padding: 0 calc(var(--padding-module) * 2);
text-align: center;
.home-hero__motif {
position: absolute;
inset: 0;
pointer-events: none;
}
.home-hero__motif-img {
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
animation: motifReveal 2s ease forwards 0.2s;
}
@media (prefers-reduced-motion: reduce) {
.home-hero__motif-img {
animation: none;
opacity: 0.16;
}
}
@keyframes motifReveal {
to {
opacity: 0.16;
}
}
.home-hero__inner {
position: relative;
z-index: 1;
display: grid;
gap: var(--space-4);
padding: var(--space-4);
}
@media (min-width: 48rem) {
.home-hero__inner {
grid-template-columns: 1fr 1.1fr;
align-items: center;
}
}
.home-hero__media {
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-soft);
}
.home-hero__media img {
width: 100%;
height: auto;
max-height: 22rem;
object-fit: cover;
display: block;
}
.home-hero__title {
margin-bottom: var(--space-2);
}
.home-bento {
display: grid;
gap: var(--space-3);
margin-bottom: var(--space-4);
}
@media (min-width: 48rem) {
.home-bento {
grid-template-columns: 1.4fr 1fr;
align-items: start;
}
}
.home-card {
background: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
padding: var(--space-4);
}
.home-card--ethics {
background: linear-gradient(145deg, var(--color-blanc), var(--color-jaune-pale));
}
.ethics-steps {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
}
header nav ul li {
display: inline;
margin-right: calc(var(--padding-module) * 2.5); /* 20px */
.ethics-steps li {
padding: var(--space-2);
background: var(--color-blanc);
border-radius: var(--radius-sm);
border-left: 4px solid var(--color-rose-tendre);
font-size: 0.95rem;
box-shadow: var(--shadow-soft);
}
header nav ul li a {
color: var(--color-texte-principal); /* Texte plus foncé sur fond pastel clair */
text-decoration: none;
padding: calc(var(--padding-module) * 1.5) var(--padding-module);
display: inline-block;
font-family: 'Quicksand', sans-serif;
font-weight: 700;
border-radius: calc(var(--padding-module) / 2); /* 4px */
.ethics-steps strong {
display: block;
font-family: var(--font-body);
margin-bottom: 0.15rem;
}
header nav ul li a:hover {
background-color: var(--color-peche-doux); /* Pêche doux au survol */
text-decoration: none;
.home-why {
background: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
padding: var(--space-4);
margin-bottom: var(--space-4);
}
/* Style pour l'image du logo sur la page d'accueil */
.home-why :first-child {
margin-top: 0;
}
.home-why :last-child {
margin-bottom: 0;
}
.home-cta {
text-align: center;
padding: var(--space-4);
background: linear-gradient(135deg, var(--color-peche-doux), var(--color-rose-tendre));
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
}
.home-cta h2,
.home-cta h3 {
margin-top: 0;
margin-bottom: var(--space-3);
}
.home-cta .cta-button {
margin: var(--space-1);
}
/* ——— Legacy / inner pages ——— */
.logo-accueil img {
width: 100%;
max-height: 400px;
object-fit: cover;
display: block;
margin-bottom: calc(var(--padding-module) * 4); /* 32px */
border-radius: var(--padding-module); /* Coins arrondis style galet */
width: 100%;
max-height: 400px;
object-fit: cover;
display: block;
margin-bottom: var(--space-4);
border-radius: var(--radius-sm);
}
.content-section {
background: var(--color-surface);
padding: var(--space-4);
margin-bottom: var(--space-3);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
}
/* Boutons */
button,
input[type="submit"],
.cta-button {
font-family: 'Quicksand', sans-serif;
font-family: var(--font-body);
font-weight: 700;
background-color: var(--color-peche-doux); /* Pêche doux pour les boutons primaires */
background: var(--color-peche-doux);
color: var(--color-texte-principal);
border: none;
padding: calc(var(--padding-module) * 1.5) calc(var(--padding-module) * 3);
border-radius: calc(var(--padding-module) * 3); /* Forme de galet allongé */
padding: var(--space-2) var(--space-4);
border-radius: 999px;
cursor: pointer;
text-decoration: none;
display: inline-block;
margin-top: var(--padding-module);
transition: background-color 0.3s ease;
margin-top: var(--space-1);
transition: background-color 0.2s ease, transform 0.15s ease;
box-shadow: var(--shadow-soft);
}
.cta-button {
text-decoration: none;
}
button:hover,
input[type="submit"]:hover,
.cta-button:hover {
background-color: var(--color-rose-tendre); /* Rose tendre au survol */
background: var(--color-rose-tendre);
text-decoration: none;
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
button:hover,
input[type="submit"]:hover,
.cta-button:hover {
transform: none;
}
}
/* Formulaires (basique) */
form div {
margin-bottom: calc(var(--padding-module) * 2);
margin-bottom: var(--space-2);
}
form label {
display: block;
margin-bottom: var(--padding-module);
font-family: 'Quicksand', sans-serif;
margin-bottom: var(--space-1);
font-weight: 600;
}
form input[type="text"],
@@ -145,36 +545,109 @@ form input[type="email"],
form input[type="tel"],
form textarea {
width: 100%;
padding: var(--padding-module);
border: 1px solid var(--color-menthe-claire);
border-radius: calc(var(--padding-module) / 2); /* 4px */
box-sizing: border-box; /* Important pour que padding ne change pas la largeur totale */
font-family: 'Open Sans', sans-serif;
padding: var(--space-2);
border: 1px solid color-mix(in srgb, var(--color-menthe-claire) 70%, var(--color-texte-principal));
border-radius: var(--radius-sm);
font-family: var(--font-body);
font-size: 1rem;
}
/* Sections de contenu - style galet */
.content-section {
background-color: var(--color-blanc);
padding: calc(var(--padding-module) * 3);
margin-bottom: calc(var(--padding-module) * 3);
border-radius: calc(var(--padding-module) * 2); /* 16px, angles arrondis */
box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Ombre douce */
.site-form {
max-width: 38rem;
margin: var(--space-4) auto;
padding: var(--space-4);
background: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
}
/* Footer */
footer {
background-color: var(--color-jaune-pale); /* Jaune pâle pour le footer */
padding: calc(var(--padding-module) * 2.5) 0;
text-align: center;
border-top: 1px solid var(--color-peche-doux);
margin-top: calc(var(--padding-module) * 5);
.site-form button[type="submit"] {
margin-top: var(--space-2);
}
footer p {
margin: var(--padding-module) 0;
font-size: 0.9em;
/* ——— Feature sections (shortcodes) ——— */
.feature-section {
background: var(--color-surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
padding: var(--space-4);
margin: var(--space-4) 0;
}
footer a {
.feature-section__title {
margin: 0 0 var(--space-2);
padding-bottom: var(--space-2);
border-bottom: 2px solid var(--color-menthe-claire);
}
.feature-section__body > :first-child {
margin-top: 0;
}
.feature-section__body > :last-child {
margin-bottom: 0;
}
.feature-grid {
display: grid;
gap: var(--space-3);
margin: var(--space-3) 0;
}
@media (min-width: 40rem) {
.feature-grid {
grid-template-columns: repeat(2, 1fr);
}
}
.feature-card {
background: color-mix(in srgb, var(--color-blanc) 88%, var(--color-lavande));
border-radius: var(--radius-sm);
padding: var(--space-3);
border: 1px solid color-mix(in srgb, var(--color-texte-principal) 6%, transparent);
}
.feature-card__title {
margin: 0 0 var(--space-1);
font-size: 1rem;
}
.feature-card__body {
margin: 0;
font-size: 0.95rem;
color: var(--color-texte-secondaire);
}
}
/* ——— Footer ——— */
.footer-site {
background: color-mix(in srgb, var(--color-jaune-pale) 88%, var(--color-blanc));
padding: var(--space-4) var(--space-3);
text-align: center;
border-top: 1px solid color-mix(in srgb, var(--color-peche-doux) 80%, transparent);
margin-top: var(--space-5);
}
.footer-site p {
margin: var(--space-1) 0;
font-size: 0.95rem;
color: var(--color-texte-secondaire);
}
.footer-site__links {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: var(--space-2) var(--space-3);
margin-top: var(--space-2);
}
.footer-site__links a {
color: var(--color-texte-principal);
font-weight: 600;
text-decoration: none;
}
.footer-site__links a:hover {
text-decoration: underline;
color: var(--color-lien-hover);
}