diff --git a/index.html b/index.html index 52f2ca1..6ab7832 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,24 @@ - + - - - - - - - - AssurezMoi — Comparateur de mutuelles santé + + + + + + + + + + + + + + +
diff --git a/public/.htaccess b/public/.htaccess index 2830860..49a19eb 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -7,28 +7,79 @@ Options -Indexes Deny from all -# ─── Bloquer l'accès direct aux fichiers cachés (.htaccess, .env, etc.) ───── +# ─── Bloquer l'accès direct aux fichiers cachés ────────────────────────────── Order allow,deny Deny from all -# ─── Headers de sécurité ───────────────────────────────────────────────────── +# ─── Cache long terme pour assets statiques (hachés par Vite) ─────────────── + + ExpiresActive On + + # HTML → toujours revalider + ExpiresByType text/html "access plus 0 seconds" + + # JS / CSS (noms hachés par Vite → 1 an) + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + ExpiresByType text/css "access plus 1 year" + + # Images + ExpiresByType image/webp "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + ExpiresByType image/x-icon "access plus 1 year" + ExpiresByType image/vnd.microsoft.icon "access plus 1 year" + + # Vidéo + ExpiresByType video/mp4 "access plus 1 year" + ExpiresByType video/webm "access plus 1 year" + + # Polices + ExpiresByType font/woff2 "access plus 1 year" + ExpiresByType font/woff "access plus 1 year" + + # JSON (données dynamiques → courte durée) + ExpiresByType application/json "access plus 1 hour" + + + # Assets immutables (Vite génère des noms hachés) + + Header set Cache-Control "public, max-age=31536000, immutable" + + + # HTML → pas de cache + + Header set Cache-Control "no-cache, no-store, must-revalidate" + Header set Pragma "no-cache" + + + # JSON → courte durée + + Header set Cache-Control "public, max-age=3600, must-revalidate" + + + # Headers de sécurité Header always set X-Content-Type-Options "nosniff" Header always set X-Frame-Options "SAMEORIGIN" Header always set Referrer-Policy "strict-origin-when-cross-origin" -# ─── SPA routing (React Router / Vite) ────────────────────────────────────── +# ─── Compression gzip ──────────────────────────────────────────────────────── + + AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json + AddOutputFilterByType DEFLATE image/svg+xml font/woff2 font/woff + + +# ─── SPA routing (React / Vite) ────────────────────────────────────────────── RewriteEngine On RewriteBase / - # Ne pas réécrire les fichiers et dossiers existants RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - - # Tout le reste → index.html RewriteRule ^ index.html [L] diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..7a337d1 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/components/ComparisonSection.jsx b/src/components/ComparisonSection.jsx index ab8278e..d54c9e9 100644 --- a/src/components/ComparisonSection.jsx +++ b/src/components/ComparisonSection.jsx @@ -105,7 +105,7 @@ export default function ComparisonSection() { @@ -140,7 +140,7 @@ export default function ComparisonSection() { key={m.rang} initial={{ opacity: 0, y: 24 }} whileInView={{ opacity: 1, y: 0 }} - viewport={{ once: false }} + viewport={{ once: true }} transition={{ delay: i * 0.1, duration: 0.45 }} > @@ -162,7 +162,7 @@ export default function ComparisonSection() { key={m.rang} initial={{ opacity: 0, x: -16 }} whileInView={{ opacity: 1, x: 0 }} - viewport={{ once: false }} + viewport={{ once: true }} transition={{ delay: i * 0.06, duration: 0.4 }} > diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 031cac5..588d4fb 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -33,7 +33,7 @@ export default function Footer() { @@ -41,6 +41,8 @@ export default function Footer() { AssurezMoi @@ -70,7 +72,7 @@ export default function Footer() {

@@ -95,7 +97,7 @@ export default function Footer() {

@@ -120,7 +122,7 @@ export default function Footer() {

@@ -142,7 +144,7 @@ export default function Footer() { diff --git a/src/components/GuideSection.jsx b/src/components/GuideSection.jsx index 13adee9..1f9984c 100644 --- a/src/components/GuideSection.jsx +++ b/src/components/GuideSection.jsx @@ -78,7 +78,7 @@ export default function GuideSection({ bgSrc }) { @@ -99,7 +99,7 @@ export default function GuideSection({ bgSrc }) { key={i} initial={{ opacity: 0, y: 12 }} whileInView={{ opacity: 1, y: 0 }} - viewport={{ once: false }} + viewport={{ once: true }} transition={{ delay: i * 0.07, duration: 0.4 }} > @@ -115,7 +115,7 @@ export default function GuideSection({ bgSrc }) { @@ -144,7 +144,7 @@ export default function GuideSection({ bgSrc }) { diff --git a/src/components/MutuelleCard.jsx b/src/components/MutuelleCard.jsx index 747eabe..f27cb4d 100644 --- a/src/components/MutuelleCard.jsx +++ b/src/components/MutuelleCard.jsx @@ -19,6 +19,8 @@ export function LogoMutuelle({ mutuelle, className = '' }) { setFaviconError(true)} />