Séance 11
Objectifs
Être capable d’utiliser des variables CSS pour faciliter la personnalisation et la maintenance d’un site.
Savoir appliquer une palette de couleurs et une identité visuelle cohérente grâce aux variables.
Développer une identité graphique personnelle et professionnelle.
Méthode :
Afin d'améliorer la maintenabilité et d'éviter la répétition de valeurs, le CSS intègre un mécanisme de variables (Propriétés Personnalisées). Celles-ci permettent de centraliser la définition d'une valeur pour la réutiliser dans différents sélecteurs.
Pour nommer ces variables, on distingue deux stratégies principales : l'approche littérale et l'approche sémantique.
Dénomination Littérale (Basée sur la valeur) :
Exemple :
--color-blue-500: #0073e6;Analyse : Le nom de la variable décrit la valeur elle-même. C'est utile pour définir une palette de base, mais il ne communique aucune intention d'utilisation.
Dénomination Sémantique (Basée sur le contexte/l'utilité) :
Exemple :
--color-primary: #0073e6;Analyse : Le nom de la variable décrit son rôle dans l'interface (la "couleur principale"). C'est une abstraction de plus haut niveau.
L'approche sémantiques permet de modifier la charte graphique globale en ne changeant que les valeurs des variables. Les sélecteurs CSS qui les utilisent (ex: background: var(--color-bg-header);) restent inchangés. Cela permet de modifier le visuel d'ne application sans réécrire la logique des composants.
Méthode : Arborescence

Méthode : index.html
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portfolio de Vincent Vanneste</title>
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/accueil.css">
<!-- Import de polices externes (Google Fonts) --><link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Roboto:wght@400;700&display=swap"
rel="stylesheet">
<!-- Font Awesome CDN pour icônes --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
</head>
<body>
<header id="haut" aria-label="En-tête du site">
<figure aria-labelledby="figcaption-vv">
<img src="images/photo.jpg" alt="Photo de Vincent Vanneste">
<figcaption id="figcaption-vv">Vincent Vanneste</figcaption>
</figure>
<h1>Portfolio de Vincent Vanneste</h1>
<nav aria-label="Navigation principale">
<ul>
<li><a href="index.html">Accueil</a></li>
<li><a href="projets.html">Projets</a></li>
<li><a href="https://www.univ-littoral.fr/" target="_blank">ULCO</a></li>
</ul>
</nav>
</header>
<main aria-label="Contenu principal du site">
<nav aria-label="Navigation interne à la page">
<ul>
<li><a href="#about">À propos</a></li>
<li><a href="#competences">Compétences</a></li>
<li><a href="#experiences">Expériences</a></li>
<li><a href="#formations">Formations</a></li>
</ul>
</nav>
<!-- À propos --><section id="about" aria-labelledby="titre-about">
<h2 class="icon-about" id="titre-about">À propos</h2>
<p>Je suis directeur des études du DEUST WMI de Calais et j'enseigne les fondamentaux du développement web
(HTML, CSS, JavaScript, PHP). Passionné par la transmission des connaissances, j'accompagne mes
étudiants dans l'acquisition des compétences nécessaires pour réussir dans le secteur du numérique.</p>
<address role="contentinfo" aria-label="Coordonnées">
<dl>
<dt>Localisation :</dt>
<dd>Calais, France</dd>
<dt>Site :</dt>
<dd><a href="https://vincent-vanneste.fr/" target="_blank">vincent-vanneste.fr</a></dd>
<dt>Email :</dt>
<dd><a href="mailto:vincent.vanneste@univ-littoral.fr">vincent.vanneste@univ-littoral.fr</a></dd>
</dl>
</address>
</section>
<!-- Compétences --><section id="competences" aria-labelledby="titre-competences">
<h2 class="icon-competences" id="titre-competences">Compétences</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>Responsive</li>
<li>Accessibilité</li>
<li>JavaScript</li>
<li>PHP • Laravel 11</li>
<li>MySQL</li>
<li>Git & GitHub</li>
</ul>
</section>
<!-- Expériences --><section id="experiences" aria-labelledby="titre-experiences">
<h2 class="icon-experiences" id="titre-experiences">Expériences récentes</h2>
<ul>
<li>
<strong>Enseignant – Licence 1 Informatique</strong><br>
<time datetime="2025">2025</time> •
<address>
<a href="https://www.univ-littoral.fr/" target="_blank">ULCO</a>
</address><br>
Introduction à HTML, CSS, JS
</li>
<li>
<strong>Directeur des études – DEUST WMI</strong><br>
depuis <time datetime="2024">2024</time> •
<address>
<a href="https://www.univ-littoral.fr/" target="_blank">FCU ULCO</a>
</address>
</li>
</ul>
</section>
<!-- Formations --><section id="formations" aria-labelledby="titre-formations">
<h2 class="icon-formations" id="titre-formations">Formations</h2>
<ul>
<li>
<strong>Doctorat productique, automatique et informatique industrielle</strong><br>
<time datetime="2000">2000</time> •
<address>
<a href="https://www.univ-lille.fr/" target="_blank">Université de Lille</a>
</address>
</li>
<li>
<strong>CAPET Technologie</strong><br>
<time datetime="1998">1998</time> •
<address>
<a href="https://www.iufm-douai.fr/" target="_blank">IUFM Douais</a>
</address>
</li>
</ul>
</section>
</main>
<footer aria-label="Pied de page">
<p>© 2025 <strong>Vincent Vanneste</strong>. Tous droits réservés.</p>
<!-- Réseaux sociaux --><div class="socials" role="navigation" aria-label="Réseaux sociaux">
<a href="https://www.facebook.com/" target="_blank" aria-label="Facebook">
<i class="fab fa-facebook-f"></i>
</a>
<a href="https://www.linkedin.com/in/" target="_blank" aria-label="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="https://www.instagram.com/" target="_blank" aria-label="Instagram">
<i class="fab fa-instagram"></i>
</a>
<a href="https://x.com/" target="_blank" aria-label="X">
<i class="fab fa-x-twitter"></i>
</a>
</div>
</footer>
</body>
</html>
Méthode : projets.html
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portfolio - Projets</title>
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/projets.css">
<!-- Import de polices externes (Google Fonts) --><link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Roboto:wght@400;700&display=swap"
rel="stylesheet">
<!-- Font Awesome CDN pour icônes --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
</head>
<body>
<header id="haut" aria-label="En-tête du site">
<figure aria-labelledby="figcaption-vv">
<img src="images/photo.jpg" alt="Photo de Vincent Vanneste">
<figcaption id="figcaption-vv">Vincent Vanneste</figcaption>
</figure>
<h1>Portfolio de Vincent Vanneste</h1>
<nav aria-label="Navigation principale">
<ul>
<li><a href="index.html">Accueil</a></li>
<li><a href="projets.html">Projets</a></li>
<li><a href="https://www.univ-littoral.fr/" target="_blank">ULCO</a></li>
</ul>
</nav>
</header>
<main>
<section aria-labelledby="liste-projets" class="projets">
<h2 id="liste-projets">Liste des projets</h2>
<article aria-labelledby="titre-projet1">
<h3 id="titre-projet1"><a href="projets/projet1.html">Projet 1</a></h3>
<figure aria-labelledby="fig-projet1">
<img src="images/vignettes/projet1.jpg" alt="Aperçu du Projet 1">
<figcaption id="fig-projet1">Aperçu du Projet 1</figcaption>
</figure>
<p>Un projet qui présente les bases du HTML et de la mise en page.</p>
</article>
<article aria-labelledby="titre-projet2">
<h3 id="titre-projet2"><a href="projets/projet2.html">Projet 2</a></h3>
<figure aria-labelledby="fig-projet2">
<img src="images/vignettes/projet2.jpg" alt="Aperçu du Projet 2">
<figcaption id="fig-projet2">Aperçu du Projet 2</figcaption>
</figure>
<p>Un site en CSS avec une mise en forme responsive adaptée aux mobiles.</p>
</article>
<article aria-labelledby="titre-projet3">
<h3 id="titre-projet3"><a href="projets/projet3.html">Projet 3</a></h3>
<figure aria-labelledby="fig-projet3">
<img src="images/vignettes/projet3.jpg" alt="Aperçu du Projet 3">
<figcaption id="fig-projet3">Aperçu du Projet 3</figcaption>
</figure>
<p>Un mini-site en JavaScript avec des interactions simples.</p>
</article>
<article aria-labelledby="titre-projet4">
<h3 id="titre-projet4"><a href="projets/projet4.html">Projet 4</a></h3>
<figure aria-labelledby="fig-projet4">
<img src="images/vignettes/projet4.jpg" alt="Aperçu du Projet 4">
<figcaption id="fig-projet4">Aperçu du Projet 4</figcaption>
</figure>
<p>Une application web utilisant PHP et MySQL pour gérer des données.</p>
</article>
<article aria-labelledby="titre-projet5">
<h3 id="titre-projet5"><a href="projets/projet5.html">Projet 5</a></h3>
<figure aria-labelledby="fig-projet5">
<img src="images/vignettes/projet5.jpg" alt="Aperçu du Projet 5">
<figcaption id="fig-projet5">Aperçu du Projet 5</figcaption>
</figure>
<p>Un projet complet combinant HTML, CSS, JS et base de données.</p>
</article>
</section>
</main>
<footer aria-label="Pied de page">
<p>© 2025 <strong>Vincent Vanneste</strong>. Tous droits réservés.</p>
<!-- Réseaux sociaux --><div class="socials" role="navigation" aria-label="Réseaux sociaux">
<a href="https://www.facebook.com/" target="_blank" aria-label="Facebook">
<i class="fab fa-facebook-f"></i>
</a>
<a href="https://www.linkedin.com/in/" target="_blank" aria-label="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="https://www.instagram.com/" target="_blank" aria-label="Instagram">
<i class="fab fa-instagram"></i>
</a>
<a href="https://x.com/" target="_blank" aria-label="X">
<i class="fab fa-x-twitter"></i>
</a>
</div>
</footer>
</body>
</html>
Méthode : projets/projet1.html
<html lang="fr">
<head>
<base href="../">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Projet 1 - Portfolio de Vincent Vanneste</title>
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/projet.css">
<!-- Google Fonts --><link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Roboto:wght@400;700&display=swap"
rel="stylesheet">
<!-- Font Awesome --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
</head>
<body>
<header id="haut" aria-label="En-tête du site">
<figure aria-labelledby="figcaption-vv">
<img src="images/photo.jpg" alt="Photo de Vincent Vanneste">
<figcaption id="figcaption-vv">Vincent Vanneste</figcaption>
</figure>
<h1>Portfolio de Vincent Vanneste</h1>
<nav aria-label="Navigation principale">
<ul>
<li><a href="index.html">Accueil</a></li>
<li><a href="projets.html">Projets</a></li>
<li><a href="https://www.univ-littoral.fr/" target="_blank">ULCO</a></li>
</ul>
</nav>
</header>
<main>
<article aria-labelledby="titre-projet1" class="projets">
<header>
<h2 id="titre-projet1">Projet 1 <br> Découverte du HTML et du CSS</h2>
<figure>
<img src="images/projet1.jpg" alt="Capture d’écran du Projet 1">
<figcaption>Page d’accueil du projet HTML/CSS</figcaption>
</figure>
</header>
<section aria-labelledby="description-projet">
<h2 id="description-projet">Description du projet</h2>
<p>
Ce premier projet consiste à créer un mini-site en HTML et CSS.
L’objectif est de comprendre la structure d’une page web,
d’utiliser les balises sémantiques et d’appliquer les premières règles de style CSS.
</p>
</section>
<section aria-labelledby="objectifs-projet">
<h2 id="objectifs-projet">Objectifs pédagogiques</h2>
<ul>
<li>Découvrir la structure d’un document HTML5.</li>
<li>Apprendre à organiser un site web avec plusieurs pages liées.</li>
<li>Utiliser le CSS pour la mise en forme du contenu.</li>
<li>Publier le site sur GitHub Pages.</li>
</ul>
</section>
<section aria-labelledby="competences-visees">
<h2 id="competences-visees">Compétences visées</h2>
<ul>
<li>Structurer et organiser un site web en utilisant le HTML sémantique et les bonnes pratiques de
codage.</li>
<li>Mettre en forme et personnaliser l’apparence d’un site avec le CSS (Flexbox, Grid, couleurs,
polices, effets).</li>
<li>Créer un portfolio complet avec une navigation cohérente.</li>
<li>Intégrer des contenus multimédias accessibles et esthétiques.</li>
<li>Adapter un site aux différents écrans grâce au responsive design et aux media queries.</li>
<li>Déployer un site en ligne via GitHub Pages et le valider (W3C, Lighthouse).</li>
<li>Présenter et valoriser son travail avec une identité graphique cohérente.</li>
</ul>
</section>
<section aria-labelledby="resultat-projet">
<h2 id="resultat-projet">Résultat obtenu</h2>
<p>
Le projet final se compose d’une page d’accueil, d’une galerie de projets et d'une page par projet.
Le site est responsive et conforme aux standards du W3C.
</p>
<p>
<a href="" class="btn" target="_blank" rel="noopener">
<i class="fa-solid fa-eye"></i> Voir la démo
</a>
</p>
</section>
<nav class="nav-projets" aria-label="Navigation entre les projets">
<a href="projets/projet2.html" class="next">Projet suivant →</a>
</nav>
</article>
</main>
<footer aria-label="Pied de page">
<p>© 2025 <strong>Vincent Vanneste</strong>. Tous droits réservés.</p>
<!-- Réseaux sociaux --><div class="socials" role="navigation" aria-label="Réseaux sociaux">
<a href="https://www.facebook.com/" target="_blank" aria-label="Facebook">
<i class="fab fa-facebook-f"></i>
</a>
<a href="https://www.linkedin.com/in/" target="_blank" aria-label="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="https://www.instagram.com/" target="_blank" aria-label="Instagram">
<i class="fab fa-instagram"></i>
</a>
<a href="https://x.com/" target="_blank" aria-label="X">
<i class="fab fa-x-twitter"></i>
</a>
</div>
</footer>
</body>
</html>
Méthode : css/variables.css
/* ========================================================================== Variables Sémantiques ========================================================================== */:root { /* === Couleurs de Marque (Brand) === */--color-brand-primary: #0073e6;
--color-brand-dark: #004a99;
--color-brand-accent: #0066cc;
/* Utilisé pour les bordures, liens... */--color-brand-hover: #00a2ff;
/* Pour les survols interactifs */ /* === Couleurs de Fond (Background) === */--color-bg-body: linear-gradient(135deg, #e8f0ff 0%, #f9fcff 100%);
--color-bg-header: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-dark));
--color-bg-footer: linear-gradient(135deg, #1e3a5f, #0a2340, #224c80, #162d50);
--color-bg-nav-hover: #ddd;
--color-bg-card-light: #f0f8ff;
/* Pour dégradé carte projet */--color-bg-card-mid: #d0f0ff;
/* Pour dégradé carte projet */--color-bg-card: linear-gradient(135deg,
var(--color-text-inverted, #fff) 0%,
var(--color-bg-card-light, #f0f8ff) 25%,
var(--color-bg-card-mid, #d0f0ff) 50%,
var(--color-bg-card-light, #f0f8ff) 75%,
var(--color-text-inverted, #fff) 100%);
/* === Couleurs de Texte === */--color-text-primary: #222;
/* Corps de texte principal */--color-text-secondary: #333;
/* Plus clair (ex: survol nav) */--color-text-heading: #1e3a5f;
/* Titres (H1, H2) dans Main */--color-text-inverted: white;
/* Texte sur fonds sombres (header, footer) */--color-text-nav-link: #bfc5cb;
/* Liens nav header (discret) */--color-text-caption: #666;
/* Légendes projet */ /* === Couleurs de Bordure et UI === */--color-border-subtle: #ddd;
/* Bordures discrètes (header) */--color-border-medium: #ccc;
/* Bordures projet */--color-ui-nav-bar: white;
/* Barre animée nav */ /* === Polices === */--font-family-body: 'Poppins', Arial, sans-serif;
--font-family-heading: 'Roboto', sans-serif;
--font-weight-heading: 600;
/* === Échelle de Typographie Fluide === */--font-size-body: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
--font-size-caption-avatar: clamp(0.85rem, 0.8rem + 0.2vw, 1rem);
--font-size-caption-project: clamp(0.8rem, 0.75rem + 0.2vw, 0.85rem);
--font-size-p-project: clamp(0.85rem, 0.8rem + 0.2vw, 0.9rem);
--font-size-h1-header: clamp(2rem, 1.75rem + 1vw, 2.5rem);
--font-size-h1-main: clamp(2rem, 1.8rem + 0.5vw, 2.2rem);
--font-size-h2: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
--font-size-h3-project: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
--font-size-h2-project: clamp(1.5rem, 1.3rem + 1vw, 1.8rem);
--font-size-social-icon: clamp(1.5rem, 1.4rem + 0.5vw, 1.75rem);
/* === Espacements === */--spacing-xs: 8px;
/* 0.5rem */--spacing-sm: 10px;
/* 0.625rem */--spacing-md: 12px;
/* 0.75rem */--spacing-lg: 16px;
/* 1rem */--spacing-xl: 20px;
/* 1.25rem (ex: padding section) */--spacing-xxl: 32px;
/* 2rem */ /* === Tailles de Layout === */--avatar-size-mobile: 120px;
--avatar-size-desktop: 150px;
--container-max-width: 1000px;
/* === Arrondis (Borders) === */--border-radius-sm: 4px;
--border-radius-md: 6px;
--border-radius-lg: 8px;
/* === Ombres (Shadows) === */--shadow-card: 0 2px 6px rgba(0, 0, 0, 0.1);
--shadow-header: 0 4px 10px rgba(0, 0, 0, 0.15);
--shadow-image: 0 4px 8px rgba(0, 0, 0, 0.1);
--shadow-avatar-hover: 0 4px 12px rgba(0, 0, 0, 0.3);
--shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.2);
--shadow-text: 1px 1px 2px rgba(0, 0, 0, 0.25);
}
Méthode : css/style.css
/* ========================================================================== CSS Général ========================================================================== *//* --- Body --- */body {font-family: var(--font-family-body);
color: var(--color-text-primary);
line-height: 1.5;
font-size: var(--font-size-body);
margin: 0;
background: var(--color-bg-body);
transition: background 0.5s ease;
}
/* --- Médias fluides --- */img,video,iframe {max-width: 100%;
height: auto;
}
/* ========================================================================== En-tête (Header) ========================================================================== */body>header {
text-align: center;
color: var(--color-text-inverted);
padding: var(--spacing-xl);
background: var(--color-bg-header);
border-bottom: 2px solid var(--color-border-subtle);
box-shadow: var(--shadow-header);
transition: background 0.3s ease;
}
/* --- Header H1 --- */body>header h1 {
font-family: var(--font-family-heading);
font-size: var(--font-size-h1-header);
letter-spacing: 0.5px;
text-shadow: var(--shadow-text);
margin: 10px 0;
}
/* --- Header Figure --- */body>header figure {
margin: 0 auto 10px;
}
/* --- Image de profil --- */body>header img {
width: var(--avatar-size-mobile);
border-radius: 50%;
border: 3px solid var(--color-brand-accent);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body>header img:hover {
transform: scale(1.08) rotate(2deg);
box-shadow: var(--shadow-avatar-hover);
}
/* --- Légende (Figcaption) --- */body>header figcaption {
font-size: var(--font-size-caption-avatar);
margin-top: var(--spacing-xs);
}
/* --- Nav Principale (Liste) --- */body>header nav ul {
display: flex;
flex-direction: column;
/* Mobile First: empilé */align-items: center;
gap: var(--spacing-sm);
padding: 0;
margin: 10px 0 0;
list-style: none;
}
/* --- Nav Principale (Lien) --- */body>header nav a {
text-decoration: none;
color: var(--color-text-nav-link);
font-weight: bold;
padding: 6px 10px;
border-radius: var(--border-radius-sm);
position: relative;
overflow: hidden;
transition: color 0.3s ease;
}
body>header nav a:hover {
background-color: var(--color-bg-nav-hover);
color: var(--color-text-secondary);
}
/* --- Barre animée Nav --- */body>header nav a::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 0%;
height: 3px;
background: var(--color-ui-nav-bar);
transition: width 0.3s ease;
}
body>header nav a:hover::after {
width: 100%;
}
/* --- Clic Nav --- */body>header nav li:active {
transform: scale(0.9);
}
/* ========================================================================== Contenu Principal (Main) ========================================================================== */main {max-width: var(--container-max-width);
margin: auto;
}
/* --- Main H1 --- */main>h1 {
text-align: center;
color: var(--color-text-heading);
font-size: var(--font-size-h1-main);
margin: 20px 0;
}
/* --- Sections Main --- */main>section,
main>article {
padding: 0 15px;
}
/* --- Main H2 --- */main>section h2,
main>article h2 {
color: var(--color-text-heading);
font-size: var(--font-size-h2);
}
/* ========================================================================== Pied de page (Footer) ========================================================================== */footer {color: var(--color-text-inverted);
text-align: center;
padding: var(--spacing-xl);
background: var(--color-bg-footer);
background-size: 200% 200%;
transition: background-position 0.5s ease;
}
footer:hover {
background-position: right bottom;
}
footer p {
margin: 0;
}
/* --- Réseaux sociaux Footer --- */footer .socials {
display: flex;
justify-content: center;
gap: var(--spacing-xl);
margin-top: 15px;
}
footer .socials a {
font-size: var(--font-size-social-icon);
color: var(--color-text-inverted);
transition: transform 0.3s ease, color 0.3s ease;
}
footer .socials a:hover {
transform: translateY(-3px) scale(1.2);
color: var(--color-brand-hover);
}
/* ========================================================================== Responsive (Point de rupture) ========================================================================== *//* S'applique à partir de 768px et plus */@media (min-width: 768px) {
/* --- Restaure taille avatar desktop --- */body>header img {
width: var(--avatar-size-desktop);
}
/* --- Restaure nav horizontale --- */body>header nav ul {
flex-direction: row;
justify-content: center;
gap: 15px;
}
}
Méthode : css/accueil.css
/* ========================================================================== Mise en page Grid (Contenu principal) ========================================================================== */main { /***********************/ /* Mise en page (Grid) */ /***********************/display: grid;
/* "Mobile First" (1 colonne par défaut) */grid-template-columns: 1fr;
grid-template-areas: "nav" "about" "competences" "experiences" "formations"; /**********************/ /* Boîte & Espacement */ /**********************/gap: var(--spacing-sm);
/* 10px */}
/* --- Assignation des zones de la grille --- */main>nav {
grid-area: nav;
}
#about {grid-area: about;
}
#competences {grid-area: competences;
}
#experiences {grid-area: experiences;
}
#formations {grid-area: formations;
}
/* ========================================================================== Navigation Interne (dans Main) ========================================================================== *//* --- Liste de la navigation interne --- */main nav ul {
/***********/ /* Flexbox */ /***********/display: flex;
justify-content: center;
flex-wrap: wrap;
/**********************/ /* Boîte & Espacement */ /**********************/gap: var(--spacing-md);
/* 12px */padding: 0;
margin: var(--spacing-xl) 0;
/* 20px */ /******************/ /* Style de liste */ /******************/list-style: none;
}
/* --- Liens de la navigation interne --- */main nav a {
/**********************/ /* Boîte & Espacement */ /**********************/display: inline-block;
padding: 6px 12px;
/***************/ /* Typographie */ /***************/text-decoration: none;
color: var(--color-text-inverted);
font-weight: bold;
/****************************/ /* Couleurs & Arrière-plans */ /****************************/background-color: var(--color-brand-primary);
/************/ /* Bordures */ /************/border-radius: var(--border-radius-md);
/* 6px */ /***************/ /* Transitions */ /***************/transition: transform 0.2s ease;
}
/* --- Survol des liens de navigation interne --- */main nav a:hover {
/****************************/ /* Couleurs & Arrière-plans */ /****************************/background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-hover));
/*******************/ /* Transformations */ /*******************/transform: translateY(-3px) scale(1.05);
}
/* --- Focus (accessibilité) des liens de navigation interne --- */main nav a:focus {
/*********************/ /* Accessibilité (Focus) */ /*********************/ /* Valeur #005bb5 (proche de #0066cc) */outline: 3px solid var(--color-brand-accent);
outline-offset: 2px;
}
/* ========================================================================== Sections de Contenu ========================================================================== *//* --- Style général des sections --- */section { /***********************/ /* Animation & Effets */ /***********************/opacity: 0;
transform: translateY(15px);
animation: fadeIn 0.8s ease forwards;
}
/* --- Titres de section (h2) --- */section h2 {
/***************/ /* Typographie */ /***************/font-size: var(--font-size-h2);
color: var(--color-text-heading);
/**********************/ /* Boîte & Espacement */ /**********************/margin-top: 30px;
margin-bottom: var(--spacing-sm);
/* 10px */padding-bottom: 5px;
/************/ /* Bordures */ /************/border-bottom: 2px solid var(--color-border-subtle);
}
/* --- Paragraphes de section --- */section p {
/**********************/ /* Boîte & Espacement */ /**********************/margin-bottom: 15px;
/* On garde 15px pour l'instant */}
/* ========================================================================== Éléments de Contenu (Listes, Liens, Adresse) ========================================================================== *//* --- Listes à puces (dans section) --- */section ul {
/**********************/ /* Boîte & Espacement */ /**********************/padding-left: var(--spacing-xl);
/* 20px */margin-bottom: var(--spacing-xl);
/* 20px */}
/* --- Éléments de liste (dans section) --- */section li {
/**********************/ /* Boîte & Espacement */ /**********************/margin-bottom: var(--spacing-xs);
/* 8px */}
/* --- Liens (dans section) --- */section a {
/***************/ /* Typographie */ /***************/color: var(--color-brand-accent);
text-decoration: none;
}
section a:hover {
/***************/ /* Typographie */ /***************/text-decoration: underline;
}
/* --- Balise Adresse --- */address { /***************/ /* Typographie */ /***************/font-style: normal;
/**********************/ /* Boîte & Espacement */ /**********************/display: inline;
}
/* ========================================================================== Classes Utilitaires (Icônes) ========================================================================== *//* --- Base des icônes (pseudo-élément) --- */.icon-about::before,
.icon-competences::before,
.icon-experiences::before,
.icon-formations::before {
/**********************/ /* Boîte & Espacement */ /**********************/margin-right: var(--spacing-xs);
/* 8px */}
/* --- Icônes spécifiques (Emoji) --- */.icon-about::before {
content: "👤";
}
.icon-competences::before {
content: "💻";
}
.icon-experiences::before {
content: "📅";
}
.icon-formations::before {
content: "🎓";
}
/* ========================================================================== Animations ========================================================================== *//* --- Délais d'animation pour les sections --- */section:nth-of-type(2) {
animation-delay: 0.2s;
}
section:nth-of-type(3) {
animation-delay: 0.4s;
}
section:nth-of-type(4) {
animation-delay: 0.6s;
}
/* --- Définition de l’animation fadeIn --- */@keyframes fadeIn {
to {opacity: 1;
transform: translateY(0);
}
}
/* ========================================================================== Responsive (Point de rupture) ========================================================================== *//* S'applique à 768px OU PLUS *//* Rappel : les variables ne fonctionnent pas dans cette ligne, donc 768px est écrit en dur. */@media (min-width: 768px) {
main { /* Restaure la mise en page 3 colonnes pour les grands écrans */grid-template-columns: 1fr 1fr 1fr;
grid-template-areas: "nav nav nav" "about about about" "competences experiences formations";}
}
Méthode : css/projets.css
/* ========================================================================== Mise en page de la Grille "Projets" ========================================================================== */.projets { /***********************/ /* Mise en page (Grid) */ /***********************/display: grid;
/* C'est déjà responsive ! */grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
/**********************/ /* Boîte & Espacement */ /**********************/gap: var(--spacing-xl);
/* 20px */}
/* ========================================================================== Titre Principal de la Section "Projets" ========================================================================== */.projets>h2 {
/***********************/ /* Mise en page (Grid) */ /***********************/grid-column: 1 / -1;
/***************/ /* Typographie */ /***************/text-align: center;
font-size: var(--font-size-h2-project);
font-weight: var(--font-weight-heading);
/**********************/ /* Boîte & Espacement */ /**********************/padding-bottom: 5px;
/************/ /* Bordures */ /************/border-bottom: 2px solid var(--color-border-medium);
}
/* ========================================================================== Cartes de Projet (Article) ========================================================================== *//* --- Style de base des articles --- */.projets>article {
/**********************/ /* Boîte & Espacement */ /**********************/padding: var(--spacing-sm);
/* 10px */ /****************************/ /* Couleurs & Arrière-plans */ /****************************/ /* NOTE: Vous devez ajouter --color-bg-card-light, --color-bg-card-mid, et --color-bg-card à votre :root principal */background: var(--color-bg-card,
linear-gradient(135deg,
var(--color-text-inverted, #fff) 0%,
var(--color-bg-card-light, #f0f8ff) 25%,
var(--color-bg-card-mid, #d0f0ff) 50%,
var(--color-bg-card-light, #f0f8ff) 75%,
var(--color-text-inverted, #fff) 100%));
background-size: 300% 300%;
/********************/ /* Bordures & Ombre */ /********************/border: 1px solid var(--color-border-subtle);
border-radius: var(--border-radius-lg);
box-shadow: var(--shadow-card);
/***************/ /* Typographie */ /***************/text-align: left;
/******************/ /* Positionnement */ /******************/position: relative;
/***************/ /* Transitions */ /***************/transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* --- Survol des articles --- */.projets>article:hover {
/*******************/ /* Transformations */ /*******************/transform: translateY(-5px);
/********************/ /* Bordures & Ombre */ /********************/box-shadow: var(--shadow-card-hover);
/*************/ /* Animation */ /*************/animation: gradientMove 3s linear infinite;
}
/* ========================================================================== Contenu des Cartes (Typo, Images, Liens) ========================================================================== *//* --- Titres des projets (h3) --- */.projets h3 {
/**********************/ /* Boîte & Espacement */ /**********************/margin-top: 0;
/***************/ /* Typographie */ /***************/font-size: var(--font-size-h3-project);
}
/* --- Paragraphes des projets --- */.projets p {
/***************/ /* Typographie */ /***************/font-size: var(--font-size-p-project);
color: var(--color-text-secondary);
}
/* --- Conteneur Figure (pour image) --- */.projets figure {
/**********************/ /* Boîte & Espacement */ /**********************/margin: 0;
padding: 0;
}
/* --- Images des projets (fusion des doublons) --- */.projets figure img {
/**************/ /* Dimensions */ /**************/width: 100%;
height: auto;
/**********************/ /* Boîte & Espacement */ /**********************/display: block;
margin-bottom: var(--spacing-xs);
/* 8px */ /************/ /* Bordures */ /************/border-radius: var(--border-radius-sm);
/* 4px */border: 1px solid var(--color-border-medium);
/***************/ /* Transitions */ /***************/transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* --- Survol des images --- */.projets figure img:hover {
/*******************/ /* Transformations */ /*******************/transform: scale(1.05);
/********************/ /* Bordures & Ombre */ /********************/box-shadow: var(--shadow-text);
}
/* --- Légendes des images --- */.projets figure figcaption {
/***************/ /* Typographie */ /***************/font-size: var(--font-size-caption-project);
color: var(--color-text-caption);
text-align: center;
}
/* --- Liens des projets --- */.projets a {
/**********************/ /* Boîte & Espacement */ /**********************/display: inline-block;
/***************/ /* Typographie */ /***************/text-decoration: none;
color: var(--color-brand-accent);
font-weight: bold;
/***************/ /* Transitions */ /***************/transition: color 0.3s ease, transform 0.2s ease;
}
/* --- Survol des liens --- */.projets a:hover {
/***************/ /* Typographie */ /***************/color: var(--color-brand-dark);
text-decoration: underline;
/*******************/ /* Transformations */ /*******************/transform: translateY(-2px) scale(1.05);
}
/* --- Focus (accessibilité) des liens --- */.projets a:focus {
/*********************/ /* Accessibilité (Focus) */ /*********************/outline: 3px solid var(--color-brand-accent);
outline-offset: 2px;
}
/* ========================================================================== Animations (Keyframes) ========================================================================== *//* --- Animation du gradient au survol des cartes --- */@keyframes gradientMove {
0% {background-position: 0% 0%;
}
50% {background-position: 100% 100%;
}
100% {background-position: 0% 0%;
}
}
Méthode : css/projet.css
/* ========================================================================== En-tête d'Article ========================================================================== *//* --- Conteneur de l'en-tête (article>header) --- */article>header {
/**********************/ /* Boîte & Espacement */ /**********************/margin-bottom: var(--spacing-xxl);
/* 32px */ /***************************/ /* Alignement & Typographie */ /***************************/text-align: center;
}
/* --- Image de l'en-tête d'article --- */article>header img {
/**************/ /* Dimensions */ /**************/ /* C'est déjà parfaitement responsive ! */max-width: 100%;
height: auto;
/**********************/ /* Boîte & Espacement */ /**********************/margin-top: var(--spacing-xl);
/* 20px */ /********************/ /* Bordures & Ombre */ /********************/border-radius: var(--border-radius-lg);
box-shadow: var(--shadow-image);
}
/* ========================================================================== Titres de Section (H2) ========================================================================== *//* --- Style commun des H2 de section (avec icônes) --- */section h2 {
/***********/ /* Flexbox */ /***********/display: flex;
align-items: center;
/**********************/ /* Boîte & Espacement */ /**********************/gap: 0.5em;
margin-bottom: var(--spacing-lg);
/* 16px */ /***************/ /* Typographie */ /***************/font-size: var(--font-size-h2);
}
/* ========================================================================== Icônes des Titres (Pseudo-éléments) ========================================================================== *//* --- Icône Description 📝 --- */#description-projet::before {
/***********************/ /* Contenu (Pseudo-élément) */ /***********************/content: "\1F4DD";
/* Emoji "Note" (📝) */}
/* --- Icône Objectifs 🎯 --- */#objectifs-projet::before {
/***********************/ /* Contenu (Pseudo-élément) */ /***********************/content: "\1F3AF";
/* Emoji "Cible" (🎯) */}
/* --- Icône Compétences 🛠️ --- */#competences-visees::before {
/***********************/ /* Contenu (Pseudo-élément) */ /***********************/content: "\1F6E0";
/* Emoji "Outils" (🛠️) */}
/* --- Icône Résultat ✅ --- */#resultat-projet::before {
/***********************/ /* Contenu (Pseudo-élément) */ /***********************/content: "\2705";
/* Emoji "Coche" (✅) */}
Exemple :
See the Pen Séance 11-index by Vincent-Vanneste (@vincent-vanneste) on CodePen.
Exemple :
See the Pen Séance 11-projets by Vincent-Vanneste (@vincent-vanneste) on CodePen.
Exemple :
See the Pen Séance 11-projet1 by Vincent-Vanneste (@vincent-vanneste) on CodePen.