/* site.css -- Cooking2000, feuille unique mobile-first (S7 de
   specification-gabarits-generateur.md). Points de rupture : 600px
   (tablette), 900px (ordinateur). Polices systeme, pas de webfont. */

:root {
  --vert-900: #274d00;
  --vert-700: #4d7a1a;
  --vert-600: #6b9c2e;
  --vert-500: #8fca00; /* teinte historique, reservee aux accents */
  --vert-400: #a9d64f;
  --vert-100: #eef7dd;
  --texte: #202417;
  --texte-clair: #4c5342;
  --fond: #ffffff;
  --fond-alt: #f7faf1;
  --bordure: #d3ddc2;
  --focus: #1b4b91;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: var(--police);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--vert-900); }
a:hover { color: var(--vert-700); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Sur les fonds sombres (en-tete vert-900, barre de recherche vert-700),
   l'anneau de focus bleu (--focus) tombe sous 2:1 de contraste, quasi
   invisible au clavier (audit contraste WCAG). Blanc : >5:1 dans les deux
   cas. */
header :focus-visible,
.barre-recherche :focus-visible {
  outline-color: #fff;
}

/* Lien d'evitement */
.evitement {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--fond);
  color: var(--texte);
  padding: 0.75rem 1rem;
  z-index: 100;
  border: 2px solid var(--focus);
}
.evitement:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* En-tete */
header {
  position: relative;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--vert-900);
  color: #fff;
}
header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
header .logo img {
  display: block;
  height: 40px;
  width: auto;
  flex-shrink: 0;
}
/* Barre de recherche -- pleine largeur sous l'en-tete, visible sur toutes
   les pages (S4/S5.1) : jamais un lien cache derriere un clic. */
.barre-recherche {
  background: var(--vert-700);
  padding: 0.6rem 1rem;
}
.recherche-form {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}
.recherche-form input[type="search"] {
  flex: 1;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.recherche-form button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.9rem;
  background: var(--vert-900);
  color: #fff;
  border: 1px solid var(--vert-900);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}
.recherche-form button:hover { background: var(--vert-600); border-color: var(--vert-600); }

/* Suggestions instantanees (menu deroulant sous le champ) */
.recherche-resultats {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.35rem;
  background: var(--fond);
  color: var(--texte);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 97;
}
.recherche-resultats[hidden] { display: none; }
.recherche-resultats li { border-bottom: 1px solid var(--bordure); }
.recherche-resultats li:last-child { border-bottom: none; }
.recherche-resultats a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  justify-content: center;
  text-decoration: none;
  color: var(--texte);
}
.recherche-resultats a:hover,
.recherche-resultats a:focus-visible { background: var(--vert-100); }
.recherche-resultats .titre { font-weight: 600; }
.recherche-resultats .categorie { font-size: 0.8rem; color: var(--texte-clair); }
.recherche-resultats .recherche-voir-tout a { color: var(--vert-700); font-weight: 600; }

/* Page /recherche/ : formulaire pleine page + grille de resultats */
.recherche-form-page {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.recherche-form-page label { flex-basis: 100%; font-weight: 600; }
.recherche-form-page input[type="search"] {
  flex: 1;
  min-width: 200px;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.recherche-form-page button {
  min-height: 44px;
  padding: 0 1.1rem;
  background: var(--vert-900);
  color: #fff;
  border: 1px solid var(--vert-900);
  border-radius: 6px;
  cursor: pointer;
}
.recherche-form-page button:hover { background: var(--vert-700); }
/* margin-top: auto (2026-08-11, signale par Sensei -- catégorie qui
   "flotte" a des hauteurs differentes selon que la carte a 0, 1 ou 2
   lignes de badges-temps au-dessus, resultats de /recherche/ et
   /recherche/avancee/ desalignes sur une meme rangee) : .carte-recette a
   est desormais display:flex/flex-direction:column (cf. plus bas),
   cette marge auto pousse .categorie-resultat tout en bas de la carte
   quelle que soit la hauteur du contenu au-dessus -- sans effet sur les
   cartes qui n'ont pas ce bloc (categorie.html.j2 ne l'utilise pas,
   seul carteHtml() de recherche.js l'emet). */
.categorie-resultat { color: var(--texte-clair); font-size: 0.85rem; margin: auto 0.75rem 0.6rem; }

/* Lien "Recherche avancee" sous la barre de recherche (en-tete, toutes
   les pages) -- centre, blanc et gras pour rester bien visible sur le
   fond vert fonce de .barre-recherche (tache #290, 2026-08-11 ;
   repositionne/re-stylise le 2026-08-11, demande Sensei : "positionne
   au milieu", "un texte en blanc et en gras serait plus visible"). */
.lien-recherche-avancee {
  display: block;
  max-width: 480px;
  margin: 0.5rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
}
.lien-recherche-avancee:hover,
.lien-recherche-avancee:focus-visible { color: var(--vert-100); }

/* Page /recherche/avancee/ : formulaire de filtres (categorie + temps de
   preparation), recherches rapides, vitrine de decouverte. */
.recherche-avancee-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0 1.5rem;
  padding: 1rem;
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}
.champ-avancee-mot-cle { display: flex; flex-direction: column; gap: 0.35rem; }
.champ-avancee-mot-cle label { font-weight: 600; }
.champ-avancee-mot-cle input[type="search"] {
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.recherche-avancee-form fieldset {
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 0.75rem 1rem 1rem;
}
.recherche-avancee-form legend { font-weight: 600; padding: 0 0.4rem; }
.filtre-categories-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem 1rem;
}
.case-categorie {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
}
.filtre-temps { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.filtre-temps label { display: flex; align-items: center; gap: 0.4rem; min-height: 32px; }
.actions-recherche-avancee {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.actions-recherche-avancee button {
  min-height: 44px;
  padding: 0 1.1rem;
  background: var(--vert-900);
  color: #fff;
  border: 1px solid var(--vert-900);
  border-radius: 6px;
  cursor: pointer;
}
.actions-recherche-avancee button:hover { background: var(--vert-700); }

.recherche-suggestions { margin-bottom: 1.5rem; }
.recherche-suggestions p { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.recherche-suggestions a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  min-height: 44px;
  line-height: 1.6;
  background: var(--vert-100);
  color: var(--vert-900);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.recherche-suggestions a:hover,
.recherche-suggestions a:focus-visible { background: var(--vert-400); }

.vitrine-decouvrir { margin-bottom: 1.5rem; }

/* Menu : burger plein ecran mobile/tablette, panneau lateral repliable ordinateur */
.menu-burger {
  position: relative;
  z-index: 96;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  cursor: pointer;
  color: #fff;
}
.menu-burger::before {
  content: "\2630";
  font-size: 1.25rem;
}
#nav-principale.ouvert .menu-burger {
  background: var(--vert-700);
}
#nav-principale.ouvert .menu-burger::before {
  content: "\2715";
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.menu-fermer-item {
  display: flex;
  justify-content: flex-end;
  margin: -0.5rem -0.5rem 0.5rem 0;
}
.bouton-fermer-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--vert-100);
  color: var(--vert-900);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.bouton-fermer-menu span { font-size: 1.1rem; }

#nav-principale { position: relative; }
#menu-liste {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  position: fixed;
  inset: 0;
  background: var(--fond);
  color: var(--texte);
  overflow-y: auto;
  z-index: 90;
}
#nav-principale.ouvert #menu-liste { display: flex; }
#menu-liste .menu-section {
  font-weight: 700;
  color: var(--vert-700);
  margin-top: 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
#menu-liste .menu-item a {
  display: block;
  padding: 0.65rem 0.5rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--texte);
  border-radius: 4px;
}
#menu-liste .menu-item a:hover,
#menu-liste .menu-item a:focus-visible {
  background: var(--vert-100);
}
#menu-liste .menu-item.en-avant a { font-weight: 700; }
.badge-saison {
  display: inline-block;
  margin-left: 0.5rem;
  background: var(--vert-500);
  color: var(--vert-900);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-saison[hidden] { display: none; }

/* Fil d'ariane */
nav[aria-label="Fil d'Ariane"] { padding: 0.5rem 1rem; background: var(--fond-alt); }
nav[aria-label="Fil d'Ariane"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--texte-clair);
}
nav[aria-label="Fil d'Ariane"] li:not(:last-child)::after { content: "›"; margin-left: 0.35rem; }
nav[aria-label="Fil d'Ariane"] li[aria-current="page"] { color: var(--texte); font-weight: 600; }

main { padding: 1rem; max-width: 1100px; margin: 0 auto; }

article h1 {
  font-size: 1.6rem;
  color: var(--vert-900);
  margin: 0.25rem 0 0.75rem;
}

/* Badges d'infos */
.infos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
}
.infos li {
  background: var(--vert-100);
  border: 1px solid var(--bordure);
  color: var(--vert-900);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
}

/* Disposition en colonnes -- mobile : tout empile */
.colonnes {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.lateral {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.lateral figure { margin: 0; }
.lateral figcaption {
  font-size: 0.8rem;
  color: var(--texte-clair);
  margin-top: 0.35rem;
}
.photo-article {
  margin: 0 0 1.5rem;
}
.photo-article img {
  border-radius: 8px;
  max-width: 100%;
  width: 403px;
  height: auto;
}

/* Lecteur video natif embarque dans une section de texte (bloc construit
   a la main par outils/parser/importer_video_chevre.py, 2026-08-08 --
   pages /fromages/passionnement-chevre-{1,2,3}/). Responsive : le
   width="600" en dur de la balise <video> reste une largeur maximale,
   jamais un debordement sur mobile. */
.video-episode {
  margin: 1rem 0 1.5rem;
  text-align: center;
}
.video-episode video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.video-episode .video-telecharger {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

h2 { color: var(--vert-900); font-size: 1.2rem; border-bottom: 2px solid var(--vert-400); padding-bottom: 0.3rem; }
h3 { color: var(--vert-700); font-size: 1rem; margin-top: 1.25rem; }

.ingredients { list-style: none; margin: 0 0 1rem; padding: 0; }
.ingredients li { margin-bottom: 0.15rem; }
.ingredients label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.3rem 0.25rem;
  cursor: pointer;
  border-radius: 4px;
}
.ingredients label:hover { background: var(--fond-alt); }
.ingredients input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  margin-top: 0.15rem;
  accent-color: var(--vert-700);
}
.ingredients input:checked + * ,
.ingredients label:has(input:checked) {
  color: var(--texte-clair);
  text-decoration: line-through;
}

.etapes {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
.etapes li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
/* Pause narrative entre etapes (2026-08-05) : deux <ol class="etapes">
   directement adjacents (aucun <h3> entre eux) ne peuvent provenir que
   d'une ligne vide laissee dans le textarea "Preparation" -- un groupe
   titre ("# Titre") est toujours precede de son <h3>, donc jamais
   adjacent a un <ol> de cette facon. Marge du haut ajoutee uniquement
   dans ce cas, pour un blanc net (~2.5rem avec la marge basse
   existante) sans avoir besoin d'un titre de section. */
.etapes + .etapes { margin-top: 1.5rem; }

.credit-auteur {
  list-style: none;
  padding-left: 0rem;
  margin: 1.25rem 0 1rem;
  font-weight: 600;
}
/* Demande Sensei (2026-08-05) : les 3 lignes (auteur/restaurant/adresse)
   doivent se lire comme UN SEUL bloc compact, pas comme une liste de
   points distincts (qui avait le meme espacement que .etapes li) --
   marge quasi nulle entre lignes, plus visible (font-weight ci-dessus)
   SANS toucher a la taille de police. */
.credit-auteur li { margin-bottom: 0.15rem; padding-left: 0.25rem; }
.credit-auteur a { text-decoration: underline; }

.conseils {
  margin-top: 2rem;
  background: var(--fond-alt);
  border-left: 4px solid var(--vert-500);
  border-radius: 4px;
  padding: 1rem 1.25rem;
}
.conseils h2 { font-size: 1.05rem; border: none; margin: 0 0 0.5rem; }
.conseils h3 { font-size: 0.95rem; margin-top: 1rem; }
.conseils ul { margin: 0 0 0.25rem; padding-left: 1.3rem; }
.conseils li { margin-bottom: 0.5rem; }
.conseils a { text-decoration: underline; }

.tags { margin-top: 2rem; border-top: 1px solid var(--bordure); padding-top: 1rem; }
.tags ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags a {
  display: inline-block;
  background: var(--vert-100);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  font-size: 0.85rem;
}

footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  background: var(--fond-alt);
  border-top: 1px solid var(--bordure);
  font-size: 0.85rem;
  color: var(--texte-clair);
}
footer p { margin: 0.25rem 0; }
footer a { color: var(--vert-900); }

/* Grille de cartes recette (pages categorie, accueil, 404) */
.nb-recettes { color: var(--texte-clair); margin-top: -0.5rem; }
.note-copyright { color: var(--texte-clair); font-size: 0.85rem; font-style: italic; }
.avertissement-alcool {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--fond-alt);
  border: 1px solid var(--vert-400);
  border-radius: 8px;
}
.avertissement-alcool img { flex-shrink: 0; }
.avertissement-alcool p { margin: 0; font-size: 0.95rem; }
.avertissement-alcool a { font-weight: 600; }

/* Bandeau d'annonce en tete de page d'accueil uniquement (config
   accueil-configuration.json / ecran admin /accueil), tache 2026-08-23.
   Cache par defaut ([hidden], attribut pose par le gabarit) --
   bandeau-annonce.js decide de l'afficher selon la fermeture memorisee
   en localStorage (identifiant derive du texte : un nouveau message
   reapparait automatiquement). */
.bandeau-annonce {
  position: relative;
  background: var(--vert-100);
  border-bottom: 1px solid var(--vert-400);
  text-align: center;
  padding: 0.6rem 2.5rem;
}
.bandeau-annonce p { margin: 0; font-size: 0.95rem; color: var(--vert-900); }
.bandeau-annonce a { font-weight: 600; margin-left: 0.4rem; }
#bandeau-annonce-fermer {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--vert-900);
  font-size: 1.3rem;
  cursor: pointer;
}
#bandeau-annonce-fermer:hover,
#bandeau-annonce-fermer:focus-visible {
  background: var(--vert-400);
}

/* Calculateur d'IMC (/sante/calculimc/) */
.form-imc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 22rem;
  margin: 1.5rem 0;
  padding: 1.1rem;
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}
.champ-imc { display: flex; flex-direction: column; gap: 0.35rem; }
.champ-imc label { font-weight: 600; font-size: 0.9rem; }
.champ-imc input {
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-family: inherit;
}
.form-imc button {
  align-self: flex-start;
  padding: 0.6rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--vert-900);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.form-imc button:hover { background: var(--vert-700); }
.resultat-imc {
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--vert-100);
  border: 1px solid var(--vert-400);
  border-radius: 8px;
}
.resultat-imc:empty { display: none; }

/* Formulaire de contact (/contact/, 2026-08-14) */
.form-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 32rem;
  margin: 1.5rem 0;
  padding: 1.1rem;
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}
.champ-contact { display: flex; flex-direction: column; gap: 0.35rem; }
.champ-contact label { font-weight: 600; font-size: 0.9rem; }
.champ-contact input, .champ-contact textarea {
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}
.form-contact button {
  align-self: flex-start;
  padding: 0.6rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--vert-900);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.form-contact button:hover { background: var(--vert-700); }
/* Champ piege (honeypot) : hors ecran plutot que display:none/visibility:hidden
   (certains robots ignorent ces 2 proprietes precisement parce qu'elles sont
   le premier reflexe des developpeurs -- le decalage hors ecran reste discret
   sans etre un signal aussi immediatement reconnaissable). */
.champ-piege {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.message-erreur-contact {
  margin: 1rem 0;
  padding: 0.85rem 1.1rem;
  background: #fbe6e6;
  border: 1px solid #e08a8a;
  border-radius: 8px;
}

/* Page-index /sante/ */
.liste-sante {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
}
.liste-sante li { margin: 0.6rem 0; }

.picto-alcool { text-align: center; margin: 1.5rem 0; }
.picto-alcool img { margin: 0 auto; }

.grille-recettes {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}
.carte-recette a {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--texte);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
}
.carte-recette a:hover,
.carte-recette a:focus-visible { border-color: var(--vert-600); }
.carte-recette img:not(.badge-noel) { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Conteneur de la vignette (image + badge "Nouveau" superpose) --
   position: relative independamment de la mise en page du lien parent
   (bloc simple pour .carte-recette, flex colonne + centrage pour
   .accueil-aujourdhui-lien), pour que le badge se cale toujours sur le
   coin haut-gauche de l'IMAGE elle-meme, jamais sur celui du lien entier
   (demande Sensei, 2026-07-29 -- badge "Nouveau" pour les recettes/
   dossiers crees il y a moins de 30 jours, remplace le checknew() JS du
   site d'origine). */
.vignette-recette { position: relative; display: block; }
.badge-nouveau {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 5;
  background: var(--vert-700);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
/* Sur la page d'accueil, la vignette "Aujourd'hui" est limitee a 260px
   (cf. .accueil-aujourdhui-lien picture/img) -- la vignette doit suivre
   la meme largeur pour que le badge reste cale sur l'image, pas sur la
   largeur pleine de la colonne. */
.accueil-aujourdhui-lien .vignette-recette { width: 100%; max-width: 260px; }

/* Logo "Recette de Noel" (demande Sensei, 2026-07-29) -- octobre a
   decembre, sur les recettes taguees recette.noel=1 (cf. est_periode_noel()
   / charger_recette_carte()). Repris tel quel de
   site-original/www/image/x-mas/xmastree.gif (equivalent du tag JS
   thisxmas de l'ancien afficherecette2014()). Coin haut-DROIT de la
   vignette pour ne jamais chevaucher le badge "Nouveau" (haut-gauche) --
   les deux peuvent s'afficher ensemble sur une recette a la fois neuve et
   taguee Noel. */
.badge-noel {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 5;
  width: 24px;
  height: 32px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

/* Variante texte du badge "Nouveau" pour les listes sans image (ex.
   page /dossiers/, cf. dossiers_index.html.j2) -- meme information,
   affichee en ligne a cote du lien plutot qu'en superposition. */
.badge-nouveau-texte {
  display: inline-block;
  background: var(--vert-700);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}

/* Variante texte du badge "Noel" (demande Sensei, 2026-07-29) pour la page
   /dossiers/ (dossier.noel, coche cote admin) -- meme principe que
   .badge-nouveau-texte ci-dessus, coexiste avec elle sur une meme ligne. */
.badge-noel-texte {
  display: inline-block;
  background: var(--vert-900);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}
.carte-recette h2,
.carte-recette h3 {
  position: relative;
  font-size: 0.95rem;
  border: none;
  padding: 0.6rem 0.75rem 0.25rem;
  margin: 0;
  color: var(--texte);
}

/* Infobulle accessible : nom complet, masque visuellement par defaut,
   affiche au survol ET au focus clavier (pas seulement :hover). Reste
   dans l'arbre d'accessibilite via aria-describedby quel que soit l'etat
   visuel. */
.infobulle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.carte-recette a:hover .infobulle,
.carte-recette a:focus-visible .infobulle {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 100%;
  margin-bottom: 0.4rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--vert-900);
  color: #fff;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.3;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.badges-temps {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--texte-clair);
}
/* Separateur visuel entre badges (2026-07-30, demande Sensei : "Prep. : 1
   minute  Pas de cuisson" se lisait comme une seule phrase confuse, faute
   de separateur -- meme motif que .liste-ingredients li::after). */
.badges-temps li::after { content: "·"; margin-left: 0.35rem; color: var(--bordure); }
.badges-temps li:last-child::after { content: none; }

/* Grille de varietes (ex. /dossiers/poire-automne-hiver/ : nom + saison +
   photo par variete, cf. parse_articles.py _transformer_grille_varietes_poire
   -- 2026-07-27, demande Sensei : presentation en grille perdue par le
   nettoyeur generique de texte). */
.grille-varietes {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.grille-varietes li { display: flex; flex-direction: column; align-items: center; }
.grille-varietes img {
  width: 100%;
  max-width: 150px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}
.grille-varietes p { margin: 0; font-size: 0.95rem; }
.nom-variete { font-weight: 600; color: var(--vert-900); }

/* Tableau de contenu editorial (ex. /dossiers/champignon-cueillette/,
   section "Les centres antipoison" : paires Ville/Numero de telephone --
   2026-08-12, tache #292, premiere vraie balise <table> reconstruite par
   le generateur -- aucun style prevu jusqu'ici, ces tableaux etaient
   toujours aplatis en paragraphes par le nettoyeur de texte partage). */
.tableau-contenu {
  border-collapse: collapse;
  margin: 1rem 0;
  width: auto;
}
.tableau-contenu th,
.tableau-contenu td {
  border: 1px solid var(--bordure);
  padding: 0.5rem 0.9rem;
  text-align: left;
}
.tableau-contenu th {
  background: var(--vert-100);
  color: var(--vert-900);
  font-weight: 600;
}
/* Ligne de sous-groupe (un seul <td colspan> a la place d'une vraie ligne
   de donnees, ex. "Situation actuelle" -> une seule cellule "Georges
   Billon" avant sa fiche -- ou une note de bas de tableau colspan sur
   plusieurs pages du lot #318-322) -- distincte visuellement d'un <th>
   d'en-tete de colonne. */
.tableau-contenu td.ligne-groupe {
  background: #fdf8ee;
  font-weight: 600;
}

/* Calendrier de saisonnalite (ex. /dossiers/saisons-poissons/ et
   saisons-poissons2/ -- 2026-08-12, demande Sensei apres la tache #292 :
   "je veux recuperer l'equivalent en plus moderne", accepte comme du
   HTML/CSS fige en base plutot qu'un ecran de saisie). Source d'origine :
   3 couleurs bgcolor litterales (navy/#0000FF/#FFFFFF) sur chaque <td>,
   remplacees ici par 3 classes semantiques formant un degrade d'intensite
   (clair = hors saison, bleu moyen = en saison, bleu fonce = pic
   d'abondance) -- plus lisible que l'original, ou le "navy" (en saison)
   etait visuellement plus sombre que le bleu vif du "pic". Premiere
   utilisation d'un bloc <table> avec en-tetes de ligne/colonne (th
   scope) sur le nouveau site. */
.tableau-scroll {
  overflow-x: auto;
  margin: 1rem 0;
}
.calendrier-saisons {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
.calendrier-saisons th,
.calendrier-saisons td {
  border: 1px solid var(--bordure);
  padding: 0.4rem 0.6rem;
  text-align: center;
  white-space: nowrap;
}
.calendrier-saisons thead th {
  background: var(--vert-100);
  color: var(--vert-900);
  font-weight: 600;
}
.calendrier-saisons th[scope="row"] {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: var(--fond);
  z-index: 1;
}
.calendrier-saisons td.saison-hors { background: var(--fond); }
.calendrier-saisons td.saison-normale { background: #bcdcf5; color: #14314d; }
.calendrier-saisons td.saison-pic { background: #1f5f96; color: #fff; font-weight: 600; }

.legende-saisons {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  font-size: 0.9rem;
}
.legende-saisons li { display: flex; align-items: center; gap: 0.4rem; }
.legende-saisons .pastille {
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
  border: 1px solid var(--bordure);
  display: inline-block;
}
.legende-saisons .saison-hors .pastille { background: var(--fond); }
.legende-saisons .saison-normale .pastille { background: #bcdcf5; }
.legende-saisons .saison-pic .pastille { background: #1f5f96; }

.lien-saison-suivante {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  font-weight: 600;
}

/* Pagination */
.pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 1.5rem 0;
  gap: 0.5rem 1rem;
}
.pagination li:empty { display: none; }
.pagination a {
  padding: 0.6rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  text-decoration: none;
}

/* Accueil : logo tres visible en tete de page (accueil.html.j2, cf.
   accueil-configuration.json pour le contenu editorial ci-dessous) */
.accueil-logo {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.accueil-logo-image {
  display: block;
  margin: 0 auto;
  width: clamp(280px, 55vw, 627px);
  height: auto;
}
.accueil-logo-accroche {
  margin: 0.75rem 0 0;
  color: var(--texte-clair);
  font-size: 1.05rem;
}

/* Cartes generiques de l'accueil (sortir/deguster, actualite, aujourd'hui) */
.carte-accueil {
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.carte-accueil h2 { margin-top: 0; }
.carte-accueil ul { list-style: none; margin: 0; padding: 0; }
.carte-accueil li { margin: 0.4rem 0; }
.carte-accueil .lien-fort { font-weight: 600; }

.accueil-cartes { margin: 1.5rem 0; }
.carte-sortir-deguster ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.carte-sortir-deguster li { margin: 0; }

.accueil-une {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (max-width: 640px) {
  .accueil-une { grid-template-columns: 1fr; }
}
.accueil-aujourdhui-lien {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  text-align: center;
}
.accueil-aujourdhui-lien picture,
.accueil-aujourdhui-lien img:not(.badge-noel) {
  border-radius: 8px;
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.accueil-aujourdhui-titre {
  font-weight: 600;
  color: var(--texte);
}

.accueil-mises-en-avant { margin: 2rem 0; }

/* Grille des 14 categories (accueil, /recettes/) */
.grille-categories {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.grille-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  min-height: 44px;
  background: var(--vert-100);
  border-radius: 8px;
  text-decoration: none;
  color: var(--vert-900);
  font-weight: 600;
}
.grille-categories a:hover,
.grille-categories a:focus-visible { background: var(--vert-400); }
.grille-categories .nb { font-weight: 400; font-size: 0.8rem; color: var(--texte-clair); }

/* Bouton "Remonter en haut" (pages d'ensemble : categories, dossiers,
   europe, sante, index par-ingredient, regroupements) : masque par defaut,
   revele des 25% de defilement de la page par haut-de-page.js.
   visibility:hidden (et pas juste opacity) pour rester hors du parcours
   clavier/lecteur d'ecran tant qu'il n'est pas affiche. */
.bouton-haut {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--vert-900);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.bouton-haut.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.bouton-haut:hover,
.bouton-haut:focus-visible {
  background: var(--vert-700);
}
@media print {
  .bouton-haut { display: none; }
}

/* Dossiers (regroupements par ingredient/theme, dossier.html.j2 et
   index-ingredients.html.j2) */
.sommaire-dossier {
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
}
.sommaire-dossier ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.sommaire-dossier a {
  text-decoration: none;
  font-weight: 600;
}
.sommaire-dossier a:hover,
.sommaire-dossier a:focus-visible { text-decoration: underline; }

.liste-ingredients {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.liste-ingredients li::after { content: "·"; margin-left: 0.75rem; color: var(--bordure); }
.liste-ingredients li:last-child::after { content: none; }
.entree-a-venir { color: var(--texte-clair); }

/* Dossiers editoriaux (article.html.j2, fr/dossier/*.htm) : liens croises
   entre pages d'une meme famille (tripes, choix-bieres...) */
.voir-aussi-dossier {
  background: var(--fond-alt);
  border: 1px solid var(--bordure);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 2rem 0 1rem;
}
.voir-aussi-dossier h2 { margin-top: 0; font-size: 1.1rem; }
.voir-aussi-dossier ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

/* Page 404 */
.mention-erreur { color: var(--texte-clair); font-size: 0.85rem; }
#suggestions-404 ul { list-style: none; padding: 0; }
#suggestions-404 a { font-weight: 600; }

/* Tablette : ~600px -- image et ingredients cote a cote */
@media (min-width: 600px) {
  .lateral {
    flex-direction: row;
    align-items: flex-start;
  }
  .lateral figure { flex: 0 0 45%; max-width: 45%; }
  .lateral section { flex: 1; }

  #menu-liste {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    background: transparent;
    color: inherit;
    padding: 0;
  }
  .menu-burger { display: none; }
  .menu-fermer-item { display: none; }
  #menu-liste .menu-section { display: none; }
  #menu-liste .menu-item a { color: #fff; padding: 0.5rem 0.6rem; }
  #menu-liste .menu-item a:hover,
  #menu-liste .menu-item a:focus-visible { background: rgba(255,255,255,0.15); }
}

/* Ordinateur : ~900px -- deux colonnes, image+ingredients a gauche, preparation a droite */
@media (min-width: 900px) {
  header { padding: 1rem 2rem; }
  .barre-recherche { padding: 0.6rem 2rem; }
  main { padding: 2rem; }

  .colonnes {
    flex-direction: row;
    align-items: flex-start;
  }
  .lateral {
    flex: 0 0 38%;
    max-width: 38%;
    flex-direction: column;
  }
  .lateral figure { flex: none; max-width: none; }
  .preparation { flex: 1; }
}

/* Impression : masquer navigation/menu, contenu propre sur une page */
@media print {
  header, .barre-recherche, nav[aria-label="Navigation principale"], nav[aria-label="Fil d'Ariane"],
  .evitement, .tags, footer { display: none; }
  .colonnes { display: block; }
  .lateral, .preparation { max-width: 100%; }
  a { color: inherit; text-decoration: none; }
}
