RÉFÉRENTIEL SÉCURITÉ ALIMENTAIRE · PRODUITS LAITIERS & FERMENTATION ACIDE MISE À JOUR : NOVEMBRE 2026 · SOURCES : ANSES / CNIEL / MINISTÈRE DE L’AGRICULTURE

Crème fraîche périmée (liquide ou épaisse) : peut-on la manger ? (Test d’acidité, grumeaux et moisissures)

Pot de crème fraîche et crème liquide au réfrigérateur
Crème fraîche épaisse ou liquide · Distinguer crème pasteurisée, UHT et crue
✅ OUI GÉNÉRALEMENT CONSOMMABLE · JUSQU’À 1 À 2 SEMAINES APRÈS LA DATE SI LE POT EST FERMÉ

Oui, on peut manger de la crème fraîche dont la date est dépassée de quelques jours à 2 semaines si le pot était hermétiquement scellé et conservé au frais.

La crème fraîche épaisse est ensemencée de ferments lactiques qui acidifient le milieu et empêchent naturellement le développement de bactéries pathogènes dangereuses (comme Listeria ou Salmonella). La crème liquide UHT (stérile avant ouverture) se garde même plusieurs semaines après sa date. Seuls les pots entamés présentant des moisissures colorées (vertes, roses, noires) ou une odeur de fromage fort ammoniacal doivent être jetés.

CRÈME ÉPAISSE FERMÉE +7 à 15 jours après date
CRÈME LIQUIDE UHT +3 à 4 semaines (DDM)
POT OUVERT Max 5 à 7 jours au frais
SIGNES À JETER Moisissures, gaz, odeur rance

Quel type de crème fraîche avez-vous dans votre réfrigérateur ?

Cliquez sur un profil pour afficher les consignes de consommation
✓ CONSOMMABLE 7 À 15 JOURS APRÈS LA DATE

Crème fraîche épaisse pasteurisée d’Isigny ou classique

La crème épaisse a subi une pasteurisation puis une maturation biologique par des bactéries lactiques. Tout comme pour le yaourt périmé, l’acidité lactique naturelle (pH autour de 4,5) constitue un rempart antibactérien remarquable. Même 1 à 2 semaines après la date, la crème est parfaitement saine, avec tout au plus un goût légèrement plus acidulé (type crème aigre ou sour cream).

Les 3 étapes du test de fraîcheur de la crème

  1. Le regard : observez la surface. Un petit liquide jaune clair qui surnage est du simple petit-lait (lactosérum) naturel qui s’est séparé de la matière grasse : il suffit de mélanger avec une cuillère propre. Si en revanche vous voyez des taches de couleur ou un aspect croûteux moisi, jetez.
  2. Le nez : une bonne crème fraîche dégage une odeur douce de lait frais ou une odeur légèrement fermentée agréable. Une odeur forte de beurre rance, d’étable ou de fromage pourri signale une altération des lipides.
  3. La langue : prélevez une demi-cuillère à café. Si le goût est piquant, pétillant ou très amer, la crème a tourné. Si elle est simplement un peu plus acide que d’habitude, elle est parfaite pour cuisiner une quiche, une sauce forestière ou un gâteau !

📚 Références médicales et sanitaires

  • CNIEL (Centre National Interprofessionnel de l’Économie Laitière) — Conservation et DLC des crèmes pasteurisées et stérilisées.
  • Ministère de l’Agriculture — Guide anti-gaspillage : consommer les produits laitiers après la date limite.
  • ANSES — Stabilité microbiologique et sécurité des laits et crèmes fermentés.

Avertissement officiel : Les avis et recommandations publiés sur Peut-on Manger sont rédigés selon les protocoles scientifiques de référence (ANSES, OMS, Centres Antipoison). En cas de doute individuel, de pathologie préexistante ou de réaction anormale, consultez immédiatement votre professionnel de santé ou un vétérinaire.

(function() { // Injection immédiate des styles critiques runtime (Masquage encarts publicitaires vides et labels debug) try { if (!document.getElementById('pm-ui-runtime-overrides')) { var pmStyle = document.createElement('style'); pmStyle.id = 'pm-ui-runtime-overrides'; pmStyle.textContent = ' .pm-ad-label { display: none !important; } .pm-ad-slot:empty, .pm-ad-slot:not(:has(ins.adsbygoogle[data-ad-status="filled"])) { display: none !important; } /* Clean Card Media & Photos — 100% visible, zero overlay */ .pm-category-card-media { position: relative !important; width: 100% !important; aspect-ratio: 16 / 10 !important; overflow: hidden !important; background-color: #F3EFE6 !important; display: block !important; margin: 0 !important; padding: 0 !important; } .pm-category-card-media figure, .pm-category-card-img { width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; display: block !important; } .pm-category-card-media a { display: block !important; width: 100% !important; height: 100% !important; } .pm-category-card-media img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; transition: transform 0.3s ease !important; } .pm-category-card:hover .pm-category-card-media img { transform: scale(1.04) !important; } .pm-card-badge { display: none !important; } /* Universal Tabs & Profilers */ .pm-tabs, .pm-interactive-profiler, .pm-profiler { margin: 2rem 0 !important; } .pm-tabs-bar, .pm-profiler-nav, .pm-profiler-tabs { display: flex !important; gap: 8px !important; flex-wrap: wrap !important; border-bottom: 2px solid #EAE3D6 !important; margin-bottom: 1.5rem !important; } .pm-tab-btn, .pm-profiler-tab { background: none !important; border: none !important; padding: 10px 18px !important; font-size: 14px !important; font-weight: 600 !important; color: #55625E !important; cursor: pointer !important; border-bottom: 3px solid transparent !important; margin-bottom: -2px !important; transition: all 0.2s ease !important; border-radius: 6px 6px 0 0 !important; } .pm-tab-btn:hover, .pm-profiler-tab:hover { color: #2D5A4C !important; background: #FAF7F2 !important; } .pm-tab-btn.is-active, .pm-tab-btn[aria-selected="true"], .pm-profiler-tab.is-active, .pm-profiler-tab.active, .pm-profiler-tab[aria-selected="true"] { color: #2D5A4C !important; border-bottom-color: #2D5A4C !important; font-weight: 700 !important; } .pm-tab-panel, .pm-profiler-content, .pm-profiler-panel { display: none !important; } .pm-tab-panel.is-active, .pm-profiler-content.active, .pm-profiler-content.is-active, .pm-profiler-panel:not([hidden]) { display: block !important; } /* Search Box matching lafraise.app */ .pm-category-search-box { position: relative !important; display: flex !important; align-items: center !important; gap: 10px !important; flex: 1 1 320px !important; max-width: 480px !important; background-color: #FFFFFF !important; border: 1.5px solid #E2DACB !important; border-radius: 999px !important; padding: 8px 16px !important; box-sizing: border-box !important; box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important; transition: all 0.2s ease !important; } .pm-category-search-box:focus-within { border-color: #2D5A4C !important; box-shadow: 0 4px 14px rgba(45,90,76,0.15) !important; } .pm-search-icon { font-size: 15px !important; color: #78716C !important; flex-shrink: 0 !important; } .pm-hub-search-input { border: none !important; background: transparent !important; outline: none !important; font-family: monospace, sans-serif !important; font-size: 14px !important; color: #1C2826 !important; width: 100% !important; padding: 0 !important; } .pm-search-clear { border: none !important; background: #EAE3D6 !important; color: #55625E !important; width: 20px !important; height: 20px !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 11px !important; cursor: pointer !important; flex-shrink: 0 !important; transition: all 0.15s ease !important; } .pm-search-clear:hover { background: #2D5A4C !important; color: #FFFFFF !important; } /* Floating Dropdown Autocomplete matching lafraise.app */ .pm-search-dropdown { position: absolute !important; top: calc(100% + 8px) !important; left: 0 !important; right: 0 !important; background: #FFFFFF !important; border: 1px solid #EAE3D6 !important; border-radius: 16px !important; box-shadow: 0 12px 32px rgba(20,22,21,0.14), 0 4px 10px rgba(0,0,0,0.04) !important; max-height: 360px !important; overflow-y: auto !important; z-index: 1000 !important; padding: 6px 0 !important; scrollbar-width: thin !important; } .pm-search-dropdown-item { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 11px 18px !important; text-decoration: none !important; color: #1C2826 !important; font-family: monospace, sans-serif !important; font-size: 14px !important; border-bottom: 1px solid #F6F3EC !important; transition: background-color 0.15s ease !important; } .pm-search-dropdown-item:last-child { border-bottom: none !important; } .pm-search-dropdown-item:hover, .pm-search-dropdown-item.is-selected { background-color: #F7FAF8 !important; } .pm-search-dropdown-item-title { flex: 1 !important; padding-right: 14px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; color: #1C2826 !important; } .pm-search-dropdown-item-title strong { font-weight: 700 !important; color: #2D5A4C !important; } /* Color-coded Status Dots */ .pm-search-status-dot { width: 10px !important; height: 10px !important; border-radius: 50% !important; flex-shrink: 0 !important; display: inline-block !important; box-shadow: 0 0 0 2px rgba(255,255,255,0.9) !important; } .pm-search-status-dot.dot-danger { background-color: #EF4444 !important; } .pm-search-status-dot.dot-warning { background-color: #F59E0B !important; } .pm-search-status-dot.dot-safe { background-color: #10B981 !important; } .pm-search-dropdown-empty { padding: 16px 18px !important; text-align: center !important; color: #78716C !important; font-size: 13.5px !important; font-style: italic !important; } @media (max-width: 1024px) and (min-width: 769px) { .wp-block-post-template.pm-category-card-grid, .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; } } @media (max-width: 768px) { .pm-category-hub-container { padding: 1.25rem 1rem 3rem !important; } .wp-block-post-template.pm-category-card-grid, .wp-block-post-template { grid-template-columns: 1fr !important; gap: 16px !important; } .pm-thematic-nav { padding: 22px 18px 26px !important; margin: 3rem 0 2rem 0 !important; } .pm-thematic-grid { grid-template-columns: 1fr !important; gap: 14px !important; } .pm-category-toolbar { flex-direction: column !important; align-items: stretch !important; padding: 12px !important; gap: 12px !important; } .pm-category-search-box { width: 100% !important; max-width: 100% !important; flex: none !important; box-sizing: border-box !important; } .pm-category-filter-chips { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; gap: 8px !important; padding-bottom: 4px !important; margin: 0 -4px !important; padding-left: 4px !important; padding-right: 4px !important; scrollbar-width: none !important; } .pm-category-filter-chips::-webkit-scrollbar { display: none !important; } .pm-chip { flex-shrink: 0 !important; white-space: nowrap !important; font-size: 12px !important; padding: 7px 14px !important; } }'; (document.head || document.documentElement).appendChild(pmStyle); } } catch(e) {} function initPeutOnMangerUI() { // 0. Masquage propre des encarts publicitaires non remplis try { document.querySelectorAll('.pm-ad-label').forEach(function(lbl) { lbl.style.display = 'none'; }); document.querySelectorAll('.pm-ad-slot').forEach(function(slot) { var hasAd = slot.querySelector('ins.adsbygoogle[data-ad-status="filled"]'); if (!hasAd) { slot.style.display = 'none'; } }); } catch(e) {} // 1. Code couleur sémantique automatique sur les 2 000 fiches aliments historiques (.avis & .comment) var avisNodes = document.querySelectorAll('.avis'); avisNodes.forEach(function(el) { var raw = (el.textContent || '').trim(); var txt = raw.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); el.classList.remove('avis-danger', 'avis-warning', 'avis-safe', 'avis-autorise'); var state = 'safe'; if (txt.indexOf('deconseille') !== -1 || txt.indexOf('interdit') !== -1 || txt.indexOf('danger') !== -1 || txt.indexOf('toxique') !== -1 || txt.indexOf('a eviter') !== -1 || txt === 'non') { state = 'danger'; el.classList.add('avis-danger'); } else if (txt.indexOf('ok mais') !== -1 || txt.indexOf('prudence') !== -1 || txt.indexOf('attention') !== -1 || txt.indexOf('a limiter') !== -1 || txt.indexOf('sous condition') !== -1 || txt.indexOf('modere') !== -1) { state = 'warning'; el.classList.add('avis-warning'); } else { el.classList.add('avis-safe'); } var col = el.closest('.wp-block-column') || el.parentElement; if (col) { var comments = col.querySelectorAll('.comment'); comments.forEach(function(c) { c.classList.remove('comment-danger', 'comment-warning', 'comment-safe'); c.classList.add('comment-' + state); }); } }); // 2. Sélecteur Interactif Moderne (Segmented Control JS + Accessibilité ARIA) var calcCards = document.querySelectorAll('.pm-calc-card'); calcCards.forEach(function(card) { var radios = card.querySelectorAll('input[type="radio"]'); var labels = card.querySelectorAll('.pm-weight-tabs label, .pm-weight-tab, .pm-tabs-nav label, .pm-tab-label'); var panels = card.querySelectorAll('.pm-calc-panel, .pm-weight-panel, .pm-tab-panel'); function syncTabs() { var checkedId = null; radios.forEach(function(r) { if (r.checked) checkedId = r.id; }); labels.forEach(function(lbl) { var forId = lbl.getAttribute('for'); var innerRadio = lbl.querySelector('input[type="radio"]'); var isMatch = (forId && forId === checkedId) || (innerRadio && innerRadio.checked); lbl.classList.toggle('is-active', Boolean(isMatch)); lbl.setAttribute('aria-selected', isMatch ? 'true' : 'false'); }); if (checkedId) { var suffix = checkedId.replace('pm-prof-', '').replace('pm-w-', '').replace('pm-tab-', ''); panels.forEach(function(p, idx) { var isTarget = p.classList.contains('pm-panel-' + suffix) || (suffix === String(idx + 1)); p.classList.toggle('is-active', isTarget); if (isTarget) { p.style.display = 'block'; } else { p.style.display = 'none'; } }); } } radios.forEach(function(r) { r.addEventListener('change', syncTabs); }); labels.forEach(function(lbl) { lbl.setAttribute('role', 'tab'); lbl.setAttribute('tabindex', '0'); lbl.addEventListener('keydown', function(e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); lbl.click(); } }); }); syncTabs(); }); // 3b. Support Universel pour tous les onglets (.pm-tabs, .pm-interactive-profiler, .pm-profiler) document.querySelectorAll('.pm-tabs, .pm-interactive-profiler, .pm-profiler').forEach(function(container) { var tabs = container.querySelectorAll('.pm-tab-btn, .pm-profiler-tab'); var panels = container.querySelectorAll('.pm-tab-panel, .pm-profiler-content, .pm-profiler-panel'); tabs.forEach(function(tab) { tab.addEventListener('click', function(e) { e.preventDefault(); var targetId = tab.getAttribute('data-tab') || tab.getAttribute('data-target'); tabs.forEach(function(t) { var isTarget = (t === tab); t.classList.toggle('is-active', isTarget); t.classList.toggle('active', isTarget); t.setAttribute('aria-selected', isTarget ? 'true' : 'false'); }); panels.forEach(function(p) { var pId = p.id; var isTarget = (pId === targetId || pId === 'tab-' + targetId || pId === 'panel-' + targetId || ('panel-' + pId) === targetId || ('tab-' + pId) === targetId); p.classList.toggle('is-active', isTarget); p.classList.toggle('active', isTarget); if (isTarget) { p.removeAttribute('hidden'); p.style.display = 'block'; } else { p.setAttribute('hidden', 'hidden'); p.style.display = 'none'; } }); }); }); }); // 3. Sélecteur Profiler à boutons d'onglets (.pm-profiler-tab & .pm-profiler-panel) var profilers = document.querySelectorAll('.pm-profiler'); profilers.forEach(function(profiler) { var tabs = profiler.querySelectorAll('.pm-profiler-tab'); var panels = profiler.querySelectorAll('.pm-profiler-panel'); tabs.forEach(function(tab) { tab.addEventListener('click', function() { var targetId = tab.getAttribute('data-target'); tabs.forEach(function(t) { t.setAttribute('aria-selected', t === tab ? 'true' : 'false'); t.classList.toggle('is-active', t === tab); }); panels.forEach(function(p) { if (p.id === targetId) { p.removeAttribute('hidden'); p.style.display = 'block'; } else { p.setAttribute('hidden', 'hidden'); p.style.display = 'none'; } }); }); }); }); // 4. Catégories Hubs & Cocon initCategoryHubEnhancements(); initRelatedSilo(); } // 4. Catégories & Hubs : Moteur de recherche autocomplete lafraise.app avec pastilles de couleur et photos propres function initCategoryHubEnhancements() { var hubContainer = document.querySelector('.pm-category-hub-container'); var cardGrid = document.querySelector('.wp-block-post-template.pm-category-card-grid') || document.querySelector('.wp-block-post-template'); if (!hubContainer && !cardGrid) return; // 4a. Nettoyage absolu de tout badge couvrant la photo des fiches try { document.querySelectorAll('.pm-card-badge').forEach(function(b) { b.remove(); }); } catch(e) {} // 4b. Règle Zéro Parenthèses sur les libellés de structure try { var cleanTargets = document.querySelectorAll( '.pm-category-title, .pm-category-trust-badge, .pm-thematic-card-desc, .pm-chip, .pm-category-card-h3 a' ); cleanTargets.forEach(function(el) { if (el.children.length === 0 || el.tagName === 'A' || el.classList.contains('pm-chip')) { var txt = el.textContent || ''; if (txt.indexOf('(') !== -1 && txt.indexOf(')') !== -1) { var cleaned = txt .replace(/\(ex:\s*([^)]+)\)/gi, ': $1') .replace(/\(DLC Dépassée\)/gi, ': DLC Dépassée') .replace(/\(DDM\)/gi, ': DDM') .replace(/\(urgence botulisme\)/gi, '— urgence botulisme') .replace(/\(([^)]+)\)/g, function(match, inner) { return '— ' + inner; }); el.textContent = cleaned.replace(/\s+/g, ' ').trim(); } } }); var searchInp = document.getElementById('pm-hub-search'); if (searchInp && searchInp.placeholder && searchInp.placeholder.indexOf('(') !== -1) { searchInp.placeholder = searchInp.placeholder .replace(/\(ex:\s*([^)]+)\)/gi, ': $1') .replace(/\(([^)]+)\)/g, ': $1'); } } catch(e) {} // 4c. Remplacement de l'image de couverture manquante pour le Pain blanc try { var painCard = document.querySelector('a[href*="pain-blanc-vs-pain-levain-diabete"]'); if (painCard) { var cardArticle = painCard.closest('.pm-category-card') || painCard.closest('li'); if (cardArticle) { var mediaBox = cardArticle.querySelector('.pm-category-card-media'); if (mediaBox && !mediaBox.querySelector('img')) { mediaBox.innerHTML = '
Pain au levain artisanal et pain blanc pour diabète
'; } } } } catch(e) {} // 4d. Moteur de recherche et autocomplete lafraise.app avec pastilles sémantiques try { var searchBox = document.querySelector('.pm-category-search-box'); var input = document.getElementById('pm-hub-search'); if (!searchBox || !input) return; // Bouton Effacer ✕ var clearBtn = document.getElementById('pm-search-clear'); if (!clearBtn) { clearBtn = document.createElement('button'); clearBtn.type = 'button'; clearBtn.id = 'pm-search-clear'; clearBtn.className = 'pm-search-clear'; clearBtn.setAttribute('aria-label', 'Effacer la recherche'); clearBtn.innerHTML = '✕'; clearBtn.style.display = 'none'; searchBox.appendChild(clearBtn); } // Dropdown flottant var dropdown = document.getElementById('pm-search-dropdown'); if (!dropdown) { dropdown = document.createElement('div'); dropdown.id = 'pm-search-dropdown'; dropdown.className = 'pm-search-dropdown'; dropdown.style.display = 'none'; searchBox.appendChild(dropdown); } // Indexer tous les aliments de la grille var cardLis = Array.from(document.querySelectorAll('.wp-block-post-template > li')); var items = []; cardLis.forEach(function(li) { var link = li.querySelector('.pm-category-card-h3 a') || li.querySelector('h3 a') || li.querySelector('a'); if (!link) return; var rawTitle = (link.textContent || '').trim(); var cleanTitle = rawTitle.replace(/\s+/g, ' '); var url = link.href; var norm = cleanTitle.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); var status = 'safe'; // vert par défaut if (norm.indexOf('perime') !== -1 || norm.indexOf('depassee') !== -1 || norm.indexOf('jeter') !== -1 || norm.indexOf('toxique') !== -1 || norm.indexOf('mortel') !== -1 || norm.indexOf('interdit') !== -1 || norm.indexOf('danger') !== -1 || norm.indexOf('avarie') !== -1 || norm.indexOf('deconseille') !== -1) { status = 'danger'; // rouge } else if (norm.indexOf('gastro') !== -1 || norm.indexOf('diarrhee') !== -1 || norm.indexOf('glycemie') !== -1 || norm.indexOf('diabete') !== -1 || norm.indexOf('precaution') !== -1 || norm.indexOf('dose') !== -1 || norm.indexOf('moderation') !== -1 || norm.indexOf('vigilance') !== -1 || norm.indexOf('surveillance') !== -1 || norm.indexOf('cuisson') !== -1 || norm.indexOf('attention') !== -1 || norm.indexOf('limiter') !== -1 || norm.indexOf('condition') !== -1) { status = 'warning'; // jaune / ambre } items.push({ title: cleanTitle, norm: norm, url: url, status: status, element: li }); }); // Fonction de surbrillance de l'orthographe function highlightMatch(text, query) { var normText = text.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); var normQuery = query.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); var idx = normText.indexOf(normQuery); if (idx === -1) return text; var before = text.substring(0, idx); var match = text.substring(idx, idx + query.length); var after = text.substring(idx + query.length); return before + '' + match + '' + after; } // Carte d'état vide var emptyState = document.getElementById('pm-category-empty-state'); if (!emptyState && cardGrid) { emptyState = document.createElement('div'); emptyState.id = 'pm-category-empty-state'; emptyState.className = 'pm-empty-state-card'; emptyState.style.display = 'none'; emptyState.style.textAlign = 'center'; emptyState.style.padding = '3rem 1.5rem'; emptyState.style.backgroundColor = '#FFFFFF'; emptyState.style.border = '1px dashed #D6CEBE'; emptyState.style.borderRadius = '14px'; emptyState.style.margin = '2rem 0'; emptyState.innerHTML = '
🔍

Aucun aliment ne correspond à votre recherche

Essayez avec un autre mot-clé ou réinitialisez les filtres.

'; var queryContainer = document.querySelector('.pm-category-query') || cardGrid.parentElement; if (queryContainer) { queryContainer.appendChild(emptyState); } } var activeChipFilter = 'all'; function applyFilters() { var query = (input.value || '').trim(); var normQuery = query.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ''); if (query.length > 0) { clearBtn.style.display = 'flex'; } else { clearBtn.style.display = 'none'; dropdown.style.display = 'none'; dropdown.innerHTML = ''; } var visibleCount = 0; var matchesForDropdown = []; items.forEach(function(item) { var matchText = !normQuery || item.norm.indexOf(normQuery) !== -1; var matchChip = (activeChipFilter === 'all') || (item.status === activeChipFilter); if (matchText && matchChip) { item.element.style.display = ''; visibleCount++; } else { item.element.style.display = 'none'; } if (normQuery && item.norm.indexOf(normQuery) !== -1) { matchesForDropdown.push(item); } }); if (emptyState) { emptyState.style.display = (visibleCount === 0) ? 'block' : 'none'; } // Remplir le dropdown autocomplete façon lafraise.app if (normQuery.length > 0) { if (matchesForDropdown.length === 0) { dropdown.innerHTML = '
Aucun aliment trouvé pour « ' + query + ' »
'; } else { var dropHtml = ''; matchesForDropdown.slice(0, 8).forEach(function(m) { var highlighted = highlightMatch(m.title, query); var dotClass = 'dot-' + m.status; dropHtml += '' + '' + highlighted + '' + '' + ''; }); dropdown.innerHTML = dropHtml; } dropdown.style.display = 'block'; } } input.addEventListener('input', applyFilters); input.addEventListener('focus', function() { if (input.value.trim().length > 0) { applyFilters(); } }); clearBtn.addEventListener('click', function() { input.value = ''; applyFilters(); input.focus(); }); document.addEventListener('click', function(e) { if (!searchBox.contains(e.target)) { dropdown.style.display = 'none'; } }); input.addEventListener('keydown', function(e) { if (e.key === 'Escape') { dropdown.style.display = 'none'; } }); // Gestion des chips de filtre var chips = document.querySelectorAll('.pm-chip'); chips.forEach(function(chip) { chip.addEventListener('click', function() { chips.forEach(function(c) { c.classList.remove('is-active'); }); this.classList.add('is-active'); activeChipFilter = this.getAttribute('data-filter') || 'all'; applyFilters(); }); }); } catch(e) {} } function initRelatedSilo() { var section = document.getElementById('pm-related-silo'); if (!section) return; var siloMap = { "dates-depassees-manger-ou-jeter": { "title": "Dates Dépassées : 4 fiches de référence", "catName": "Conservation & Dates Dépassées", "catUrl": "https://peut-on-manger.com/categorie/dates-depassees-manger-ou-jeter/", "items": [ {"title": "Steak haché périmé : frais ou décongelé, manger ou jeter ?", "url": "https://peut-on-manger.com/aliment/steak-hache-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/steak_hache_perime_editorial_v2.jpg", "badge": "DLC Stricte"}, {"title": "Yaourt périmé de 15 jours : peut-on le manger sans risque ?", "url": "https://peut-on-manger.com/aliment/yaourt-perime-15-jours/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/yaourt_perime_editorial_v2.jpg", "badge": "DDM Souple"}, {"title": "Lardons périmés : odeur, couleur grise et règles de cuisson", "url": "https://peut-on-manger.com/aliment/lardons-perimes-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/lardons_perimes_editorial_v2.jpg", "badge": "DLC Viande"}, {"title": "Beurre ouvert périmé ou rance : conservation et cuisson", "url": "https://peut-on-manger.com/aliment/beurre-ouvert-perime-rance/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/beurre_ouvert_perime_editorial.jpg", "badge": "Conservation"}, {"title": "Cordon bleu périmé : tolérance post-DLC et cuisson four", "url": "https://peut-on-manger.com/aliment/cordon-bleu-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/cordon_bleu_perime_editorial.jpg", "badge": "DLC Volailles"}, {"title": "Saumon fumé ouvert ou périmé : listériose et texture", "url": "https://peut-on-manger.com/aliment/saumon-fume-ouvert-perime/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/saumon_fume_ouvert_editorial.jpg", "badge": "Poisson Fumé"} ] }, "alimentation-animale": { "title": "Toxicologie Vétérinaire : 4 fiches de référence", "catName": "Alimentation Animale", "catUrl": "https://peut-on-manger.com/categorie/alimentation-animale/", "items": [ {"title": "Chocolat pour chien : dose toxique mortelle et urgence vitale", "url": "https://peut-on-manger.com/aliment/chocolat-chien/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/chocolat_chien_editorial_v2.jpg", "badge": "Toxique Mortel"}, {"title": "Raisin frais ou sec pour chien : danger d'insuffisance rénale aiguë", "url": "https://peut-on-manger.com/aliment/raisin-chien/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/raisin_chien_editorial_v2.jpg", "badge": "Toxique Mortel"}, {"title": "Carotte pour chien crue ou cuite : bienfaits et portions sûres", "url": "https://peut-on-manger.com/aliment/carotte-pour-chien-crue-cuite/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/carotte_chien_editorial.jpg", "badge": "Autorisé"}, {"title": "Courgette pour chat : transit, constipation et cuisson recommandée", "url": "https://peut-on-manger.com/aliment/courgette-pour-chat-transit/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/courgette_chat_editorial.jpg", "badge": "Autorisé"}, {"title": "Pomme de terre pour chien crue ou cuite : danger solanine", "url": "https://peut-on-manger.com/aliment/pomme-de-terre-chien/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pomme_de_terre_chien_editorial_v2.jpg", "badge": "Cuit Uniquement"}, {"title": "Lait pour chat : intolérance lactose et alternatives", "url": "https://peut-on-manger.com/aliment/lait-chat/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/lait_chat_editorial_v2.jpg", "badge": "Digestibilité"} ] }, "bebe-dme": { "title": "Diversification Menée par l'Enfant : 4 fiches de référence", "catName": "Bébé & DME", "catUrl": "https://peut-on-manger.com/categorie/bebe-dme/", "items": [ {"title": "Miel pour bébé avant 1 an : danger vital du botulisme infantile", "url": "https://peut-on-manger.com/aliment/miel-bebe-1-an/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/miel_bebe_editorial_v2.jpg", "badge": "Interdit < 1 an"}, {"title": "Avocat pour bébé DME : textures fondantes, découpe et portions", "url": "https://peut-on-manger.com/aliment/avocat-bebe-dme/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/avocat_bebe_editorial.jpg", "badge": "Dès 6 mois"}, {"title": "Crevettes pour bébé DME : introduction allergène et texture", "url": "https://peut-on-manger.com/aliment/crevettes-bebe-dme/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/crevettes_bebe_dme_editorial_v2.jpg", "badge": "Allergène"}, {"title": "Œufs de caille pour bébé DME : risques d'étouffement et découpe", "url": "https://peut-on-manger.com/aliment/oeufs-de-caille-bebe-dme/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/oeufs_caille_dme_editorial_v2.jpg", "badge": "Cuisson Dure"} ] }, "diabete-sante": { "title": "Santé Digestive & Glycémie : 4 fiches de référence", "catName": "Diabète & Santé", "catUrl": "https://peut-on-manger.com/categorie/diabete-sante/", "items": [ {"title": "Banane, riz, pomme, œuf : alimentation en cas de diarrhée ou gastro", "url": "https://peut-on-manger.com/aliment/banane-diarrhee-que-manger-gastro/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/banane_gastro_editorial_v2.jpg", "badge": "Régime BRAT"}, {"title": "Pain blanc vs pain au levain : impact sur le diabète et la glycémie", "url": "https://peut-on-manger.com/aliment/pain-blanc-vs-pain-levain-diabete/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pain_levain_diabete_editorial_v2.jpg", "badge": "Index Glycémique"}, {"title": "Yaourt en cas de diarrhée ou gastro : probiotiques et tolérance", "url": "https://peut-on-manger.com/aliment/yaourt-diarrhee-gastro/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/yaourt_gastro_editorial_v2.jpg", "badge": "Probiotiques"}, {"title": "Confiture en cas de diarrhée ou gastro : sucres rapides et alternatives", "url": "https://peut-on-manger.com/aliment/confiture-diarrhee-gastro/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/confiture_gastro_editorial_v2.jpg", "badge": "Prudence"} ] }, "charcuterie": { "title": "Charcuterie & Salaisons : 4 fiches de référence", "catName": "Charcuterie", "catUrl": "https://peut-on-manger.com/categorie/charcuterie/", "items": [ {"title": "Pastrami enceinte : pourquoi est-il déconseillé et alternatives", "url": "https://peut-on-manger.com/aliment/pastrami/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pastrami_editorial.jpg", "badge": "À Éviter Cru"}, {"title": "Jambon périmé blanc ou cru : peut-on le manger après la date ?", "url": "https://peut-on-manger.com/aliment/jambon-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/jambon_blanc_perime_editorial_v2.jpg", "badge": "Règles DLC"}, {"title": "Lardons périmés : odeur, couleur grise et règles de cuisson", "url": "https://peut-on-manger.com/aliment/lardons-perimes-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/lardons_perimes_editorial_v2.jpg", "badge": "Cuisson Forte"}, {"title": "Pâté enceinte : risques de listériose et exceptions en conserve", "url": "https://peut-on-manger.com/aliment/pate/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pate_editorial_v2.jpg", "badge": "Déconseillé"} ] }, "produits-laitiers": { "title": "Fromages & Produits Laitiers : 4 fiches de référence", "catName": "Produits Laitiers", "catUrl": "https://peut-on-manger.com/categorie/produits-laitiers/", "items": [ {"title": "Chaussée aux Moines enceinte : autorisation et croûte", "url": "https://peut-on-manger.com/aliment/chausse-aux-moines/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/chaussee_aux_moines_editorial_v2.jpg", "badge": "Autorisé"}, {"title": "Saint Albray enceinte : règles sanitaires et pâte molle", "url": "https://peut-on-manger.com/aliment/saint-albray/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/saint_albray_editorial_v2.jpg", "badge": "Autorisé"}, {"title": "Pavé d'Affinois enceinte : pasteurisation et précautions de croûte", "url": "https://peut-on-manger.com/aliment/pave-daffinois/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pave_daffinois_editorial.jpg", "badge": "Sous Condition"}, {"title": "Fromage blanc périmé : opercule bombé, odeur et tolérance", "url": "https://peut-on-manger.com/aliment/fromage-blanc-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/fromage_blanc_editorial_v2.jpg", "badge": "DDM Souple"} ] }, "poissons-et-fruits-de-mer": { "title": "Poissons & Fruits de Mer : 4 fiches de référence", "catName": "Poissons et Fruits de Mer", "catUrl": "https://peut-on-manger.com/categorie/poissons-et-fruits-de-mer/", "items": [ {"title": "Moules enceinte : marinières, frites et cuisson à cœur", "url": "https://peut-on-manger.com/aliment/moules/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/moules_editorial_v2.jpg", "badge": "Bien Cuites"}, {"title": "Surimi enceinte : bâtonnets, sushis et salades sans risque", "url": "https://peut-on-manger.com/aliment/surimi/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/surimi_editorial_v2.jpg", "badge": "Pasteurisé Sûr"}, {"title": "Huîtres enceinte : pourquoi sont-elles interdites crues et cuissons", "url": "https://peut-on-manger.com/aliment/huitres/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/huitres_editorial_v2.jpg", "badge": "Interdit Cru"}, {"title": "Tartare de poisson enceinte : saumon, thon cru et risques infectieux", "url": "https://peut-on-manger.com/aliment/tartare-de-poisson/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/tartare_poisson_editorial.jpg", "badge": "Interdit"} ] }, "viandes": { "title": "Viandes & Volailles : 4 fiches de référence", "catName": "Viandes", "catUrl": "https://peut-on-manger.com/categorie/viandes/", "items": [ {"title": "Bavette de bœuf enceinte : cuisson à cœur et toxoplasmose", "url": "https://peut-on-manger.com/aliment/bavette/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/bavette_editorial_v2.jpg", "badge": "Bien Cuite"}, {"title": "Magret de canard enceinte : température à cœur et risques", "url": "https://peut-on-manger.com/aliment/magret-de-canard/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/magret_canard_editorial.jpg", "badge": "Bien Cuit"}, {"title": "Steak haché périmé : frais ou décongelé, manger ou jeter ?", "url": "https://peut-on-manger.com/aliment/steak-hache-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/steak_hache_perime_editorial_v2.jpg", "badge": "DLC Stricte"}, {"title": "Poulet périmé : odeur, couleur et sécurité bactérienne", "url": "https://peut-on-manger.com/aliment/poulet-perime-manger-ou-jeter/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/poulet_perime_editorial_v2.jpg", "badge": "Attention"} ] }, "plats-cuisines": { "title": "Plats Cuisinés : 4 fiches de référence", "catName": "Plats Cuisinés", "catUrl": "https://peut-on-manger.com/categorie/plats-cuisines/", "items": [ {"title": "Quiche lorraine enceinte : œufs, lardons cuits et pâte brisée", "url": "https://peut-on-manger.com/aliment/quiche-lorraine/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/quiche_lorraine_editorial.jpg", "badge": "Cuite au Four"}, {"title": "Welsh enceinte : cheddar fondu, bière mijotée et œuf", "url": "https://peut-on-manger.com/aliment/welsh/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/welsh_editorial_v2.jpg", "badge": "Autorisé Chaud"}, {"title": "Truffade enceinte : tome fraîche au lait cru et cuisson", "url": "https://peut-on-manger.com/aliment/truffade/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/truffade_editorial_v2.jpg", "badge": "Chauffée à Cœur"}, {"title": "Aligot aveyronnais enceinte : tome fraîche et purée", "url": "https://peut-on-manger.com/aliment/aligot/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/aligot_aveyronnais_editorial_v2.jpg", "badge": "Bien Chaud"} ] }, "desserts": { "title": "Desserts & Douceurs : 4 fiches de référence", "catName": "Desserts", "catUrl": "https://peut-on-manger.com/categorie/desserts/", "items": [ {"title": "Mousse au chocolat enceinte : risques d'œufs crus et alternatives", "url": "https://peut-on-manger.com/aliment/mousse-au-chocolat/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/mousse_chocolat_editorial.jpg", "badge": "Pasteurisée Uniq."}, {"title": "Tarte tropézienne enceinte : crème mousseline et fraîcheur", "url": "https://peut-on-manger.com/aliment/tarte-tropezienne/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/tarte_tropezienne_editorial_v2.jpg", "badge": "Ultra-Fraîche"}, {"title": "Pastel de nata enceinte : flan portugais cuit à haute température", "url": "https://peut-on-manger.com/aliment/pastel-de-nata/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/pastel_de_nata_editorial_v2.jpg", "badge": "Autorisé"}, {"title": "Crème anglaise industrielle enceinte : brique UHT pasteurisée", "url": "https://peut-on-manger.com/aliment/creme-anglaise-industrielle/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/creme_anglaise_editorial_v2.jpg", "badge": "Industrielle Sûre"} ] }, "condiments": { "title": "Sauces & Condiments : 4 fiches de référence", "catName": "Condiments", "catUrl": "https://peut-on-manger.com/categorie/condiments/", "items": [ {"title": "Mayonnaise Thomy enceinte : œufs pasteurisés et tube hermétique", "url": "https://peut-on-manger.com/aliment/mayonnaise-thomy/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/mayonnaise_thomy_editorial_v2.jpg", "badge": "Sécurisée"}, {"title": "Sauce tartare enceinte : industrielle pasteurisée vs maison", "url": "https://peut-on-manger.com/aliment/sauce-tartare/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/sauce_tartare_editorial_v2.jpg", "badge": "Industrielle Sûre"}, {"title": "Tzatziki frais enceinte : yaourt grec, ail et concombre bien lavé", "url": "https://peut-on-manger.com/aliment/tzatziki/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/tzatziki_frais_editorial_v2.jpg", "badge": "Bien Lavé"}, {"title": "Sauce bourguignonne enceinte : vin rouge mijoté et réduction", "url": "https://peut-on-manger.com/aliment/sauce-bourguignone/", "img": "https://peut-on-manger.com/wp-content/uploads/2026/11/sauce_bourguignonne_editorial.jpg", "badge": "Évaporation Alcool"} ] } }; var currentCatSlug = ""; var breadcrumbs = document.querySelectorAll(".rank-math-breadcrumb a, .pm-category-breadcrumbs-wrap a"); breadcrumbs.forEach(function(a) { var href = a.getAttribute("href") || ""; var m = href.match(/\/categorie\/([a-z0-9\-]+)\/?/); if (m && m[1]) { currentCatSlug = m[1]; } }); if (!currentCatSlug || !siloMap[currentCatSlug]) { var fullText = (document.body ? document.body.textContent || "" : "").toLowerCase(); if (fullText.indexOf("chien") !== -1 || fullText.indexOf("chat") !== -1 || fullText.indexOf("vétérinaire") !== -1) { currentCatSlug = "alimentation-animale"; } else if (fullText.indexOf("bébé") !== -1 || fullText.indexOf("dme") !== -1 || fullText.indexOf("diversification") !== -1) { currentCatSlug = "bebe-dme"; } else if (fullText.indexOf("diabète") !== -1 || fullText.indexOf("glycémique") !== -1 || fullText.indexOf("gastro") !== -1 || fullText.indexOf("diarrhée") !== -1) { currentCatSlug = "diabete-sante"; } else if (fullText.indexOf("périmé") !== -1 || fullText.indexOf("dlc") !== -1 || fullText.indexOf("ddm") !== -1) { currentCatSlug = "dates-depassees-manger-ou-jeter"; } else if (fullText.indexOf("fromage") !== -1 || fullText.indexOf("lait") !== -1) { currentCatSlug = "produits-laitiers"; } else if (fullText.indexOf("poisson") !== -1 || fullText.indexOf("crevette") !== -1 || fullText.indexOf("moule") !== -1) { currentCatSlug = "poissons-et-fruits-de-mer"; } else if (fullText.indexOf("viande") !== -1 || fullText.indexOf("bœuf") !== -1 || fullText.indexOf("canard") !== -1) { currentCatSlug = "viandes"; } else if (fullText.indexOf("dessert") !== -1 || fullText.indexOf("chocolat") !== -1 || fullText.indexOf("gâteau") !== -1) { currentCatSlug = "desserts"; } else { currentCatSlug = "charcuterie"; } } var silo = siloMap[currentCatSlug] || siloMap["dates-depassees-manger-ou-jeter"]; var currentPath = window.location.pathname.replace(/\/$/, ""); var titleEl = document.getElementById("pm-related-silo-title"); var descEl = document.getElementById("pm-related-silo-desc"); if (titleEl && silo.title) titleEl.textContent = silo.title; if (descEl && silo.catName) { descEl.textContent = "Fiches recommandées et vérifiées au sein de cette catégorie :"; } var itemsToDisplay = []; silo.items.forEach(function(it) { var itemPath = it.url.replace(/^https?:\/\/[^\/]+/, "").replace(/\/$/, ""); if (itemPath !== currentPath) { itemsToDisplay.push(it); } }); var grid = document.getElementById("pm-related-silo-grid"); if (grid && itemsToDisplay.length > 0) { while (grid.firstChild) { grid.removeChild(grid.firstChild); } itemsToDisplay.slice(0, 4).forEach(function(it) { var card = document.createElement("a"); card.className = "pm-related-card"; card.href = it.url; card.setAttribute("aria-label", it.title); var imgWrap = document.createElement("div"); imgWrap.className = "pm-related-card-img-wrap"; var img = document.createElement("img"); img.src = it.img; img.alt = it.title; img.className = "pm-related-card-img"; img.loading = "lazy"; var badge = document.createElement("span"); badge.className = "pm-related-card-badge"; badge.textContent = it.badge; imgWrap.appendChild(img); imgWrap.appendChild(badge); var content = document.createElement("div"); content.className = "pm-related-card-content"; var h3 = document.createElement("h3"); h3.className = "pm-related-card-title"; h3.textContent = it.title; var cta = document.createElement("span"); cta.className = "pm-related-card-cta"; cta.textContent = "Consulter la fiche →"; content.appendChild(h3); content.appendChild(cta); card.appendChild(imgWrap); card.appendChild(content); grid.appendChild(card); }); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initPeutOnMangerUI); } else { initPeutOnMangerUI(); } })();