Les Adjectifs en Français – Ressources Pédagogiques

Les Adjectifs en Français – Ressources Pédagogiques

/* Variables CSS pour les couleurs et dimensions */
:root {
–primary-color: #9c27b0;
–primary-light: #e1bee7;
–primary-dark: #7b1fa2;
–text-color: #333;
–light-bg: #f5f5f5;
–card-bg: #f8f9fa;
–border-color: #e9ecef;
–heading-color: #2c3e50;
–secondary-text: #666;
–card-shadow: 0 2px 5px rgba(0,0,0,0.05);
–hover-shadow: 0 5px 15px rgba(0,0,0,0.1);
–container-padding: 20px;
–card-padding: 20px;
–border-radius: 8px;
–transition-speed: 0.3s;
}

/* Reset et styles généraux */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
font-size: 16px; /* Base pour les unités rem */
scroll-behavior: smooth;
}

body {
font-family: ‘Segoe UI’, Tahoma, Geneva, Verdana, sans-serif;
background-color: var(–light-bg);
color: var(–text-color);
line-height: 1.6;
padding: 10px;
overflow-x: hidden;
}

/* Container principal */
.container {
width: 100%;
max-width: 100%;
margin: 0 auto;
background-color: white;
padding: var(–container-padding);
border-radius: var(–border-radius);
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Titres et textes */
h1 {
color: var(–heading-color);
text-align: center;
margin-bottom: 20px;
font-size: 1.8rem;
position: relative;
padding-bottom: 10px;
}

h1::after {
content: ”;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background-color: var(–primary-color);
border-radius: 2px;
}

.intro {
margin-bottom: 25px;
font-size: 1rem;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}

.intro p {
margin-bottom: 10px;
}

/* Grille de ressources */
.resources-grid {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin-top: 20px;
}

/* Cartes de ressources */
.resource-card {
background-color: var(–card-bg);
border-radius: var(–border-radius);
padding: var(–card-padding);
text-align: center;
transition: all var(–transition-speed) ease;
box-shadow: var(–card-shadow);
text-decoration: none;
color: var(–text-color);
border: 2px solid var(–border-color);
display: block;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}

.resource-card:hover, .resource-card:focus {
transform: translateY(-3px);
box-shadow: var(–hover-shadow);
border-color: var(–primary-color);
outline: none;
}

.resource-card:active {
transform: translateY(1px);
}

.resource-card h3 {
margin-top: 0;
color: var(–primary-color);
font-size: 1.2rem;
}

.resource-card p {
margin: 8px 0;
font-size: 0.95rem;
color: var(–secondary-text);
}

.examples {
margin-top: 10px;
font-style: italic;
color: var(–heading-color);
font-size: 0.9rem;
}

.icon {
font-size: 1.8rem;
margin-bottom: 10px;
color: var(–primary-color);
}

/* Pied de page */
footer {
margin-top: 30px;
text-align: center;
font-size: 0.85rem;
color: var(–secondary-text);
padding-top: 15px;
border-top: 1px solid var(–border-color);
}

/* Animation de chargement progressif */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}

.fade-in {
animation: fadeIn 0.5s ease forwards;
opacity: 0;
}

.resources-grid .resource-card:nth-child(1) { animation-delay: 0.1s; }
.resources-grid .resource-card:nth-child(2) { animation-delay: 0.2s; }
.resources-grid .resource-card:nth-child(3) { animation-delay: 0.3s; }
.resources-grid .resource-card:nth-child(4) { animation-delay: 0.4s; }
.resources-grid .resource-card:nth-child(5) { animation-delay: 0.5s; }
.resources-grid .resource-card:nth-child(6) { animation-delay: 0.6s; }
.resources-grid .resource-card:nth-child(7) { animation-delay: 0.7s; }
.resources-grid .resource-card:nth-child(8) { animation-delay: 0.8s; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
:root {
–text-color: #e1e1e1;
–light-bg: #121212;
–card-bg: #1e1e1e;
–border-color: #333;
–heading-color: #f1f1f1;
–secondary-text: #b0b0b0;
}

.container {
background-color: #1e1e1e;
}

.resource-card:hover {
border-color: var(–primary-light);
}

h1::after {
background-color: var(–primary-light);
}
}

/* Media Queries pour la responsivité */
/* Tablettes */
@media screen and (min-width: 600px) {
.resources-grid {
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}

h1 {
font-size: 2rem;
}

.container {
padding: 25px;
}

.intro {
font-size: 1.05rem;
}
}

/* Desktops et grands écrans */
@media screen and (min-width: 900px) {
.resources-grid {
grid-template-columns: repeat(3, 1fr);
gap: 25px;
}

h1 {
font-size: 2.2rem;
margin-bottom: 30px;
}

.container {
padding: 30px;
}

.intro {
font-size: 1.1rem;
}

.resource-card {
padding: 25px;
}

.resource-card h3 {
font-size: 1.4rem;
}

.icon {
font-size: 2.2rem;
}

body {
padding: 20px;
}
}

/* Très grands écrans */
@media screen and (min-width: 1200px) {
.resources-grid {
grid-template-columns: repeat(4, 1fr);
}
}

/* Écrans très petits */
@media screen and (max-width: 350px) {
:root {
–container-padding: 12px;
–card-padding: 12px;
}

.container {
padding: 15px;
}

.resource-card {
padding: 15px;
}

h1 {
font-size: 1.5rem;
}

html {
font-size: 14px; /* Légèrement plus petit pour les petits écrans */
}
}

/* Support pour les appareils à écran tactile */
@media (hover: none) {
.resource-card {
border-left: 4px solid var(–primary-color);
}

.resource-card:active {
background-color: var(–primary-light);
color: var(–primary-dark);
}
}

/* Supports pour l’impression */
@media print {
body {
background-color: white;
padding: 0;
}

.container {
box-shadow: none;
max-width: 100%;
}

.resource-card {
break-inside: avoid;
border: 1px solid #ddd;
}

.resources-grid {
display: block;
}

.resource-card {
margin-bottom: 15px;
}
}

// Script pour observer l’apparition des éléments
document.addEventListener(‘DOMContentLoaded’, function() {
// Vérifie si le navigateur prend en charge les animations
const prefersReducedMotion = window.matchMedia(‘(prefers-reduced-motion: reduce)’).matches;

if (prefersReducedMotion) {
// Si l’utilisateur préfère réduire les animations, les désactiver
document.querySelectorAll(‘.fade-in’).forEach(el => {
el.style.opacity = ‘1’;
el.style.transform = ‘translateY(0)’;
el.style.animation = ‘none’;
});
}

// Pour l’accessibilité des liens
document.querySelectorAll(‘.resource-card’).forEach(card => {
card.setAttribute(‘aria-label’, card.querySelector(‘h3’).textContent + ‘ – En savoir plus’);
});
});