/* Le menu de la semaine (menu.js). Prefixe me-. Les ecrans pleins, les
   rangees de boutons et les titres de groupe viennent de muscu.css (mu-) :
   meme allure partout, et un seul endroit pour les regler. */

/* --- Dans Manger ---
   La rangee du menu, toujours la : voir le menu, en faire un. Discrete : le
   geste du moment, c'est le « + » juste en dessous. */
.me-barre { margin: 0 0 10px; }
.me-barre > button { min-height: 40px; font-size: .85rem; }
/* Le « + Choisir dans le menu » : le gabarit des propositions, trait
   discontinu vert, le signe en grand en haut a gauche. Un bouton : on remet
   la police et la couleur de la page. */
.habitude.me-tuile-pioche {
  font: inherit; color: var(--texte); border-color: var(--actif2);
  align-items: flex-start; justify-content: space-between;
}
.me-tuile-plus { font-size: 1.7rem; font-weight: 700; line-height: .9; color: var(--actif); }
.habitude.me-tuile-pioche .nom { color: var(--texte); text-align: left; padding-right: 0; font-weight: 600; }

/* --- La pioche --- */
.me-pioche-haut { margin: 0 0 6px; }
/* Deja mange : le plat reste visible (on voit ce qui a ete pris), mais il ne
   se choisit plus. L'etoile, elle, garde toute sa couleur. */
.me-pris .me-repas { opacity: .45; }
.me-pris .me-repas:active { background: var(--fond2); }
/* Plusieurs menus d'avance : on passe de l'un a l'autre. */
.me-menus { margin: 0 0 12px; }

/* --- Mes repas favoris : deux rangees de filtres, la note en etoiles --- */
.me-filtres { margin: -8px 0 12px; }
.me-filtres .jetons { flex-wrap: nowrap; overflow-x: auto; padding: 6px 6px 8px; margin: -6px -6px -2px; }
.me-filtres .jeton { flex: 0 0 auto; white-space: nowrap; }
.me-filtres .jetons { scrollbar-width: none; }
.me-filtres .jetons::-webkit-scrollbar { display: none; }
.me-fav-bas { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }

/* Deja note : un etat, pas une action. Lisible, mais sans l'allure d'un bouton. */
.me-fait { opacity: 1 !important; color: var(--actif) !important; background: none !important; border-color: transparent !important; font-weight: 600; }

/* Les petites marques : restes, pour deux repas, garde, pas pour moi. */
.me-marque {
  display: inline-block; font-size: .7rem; font-weight: 600; line-height: 1;
  padding: 4px 7px; border-radius: 6px; background: var(--fond3); color: var(--texte2);
}
.me-marque-deux { color: var(--info); }
.me-marque-oui { color: var(--actif); }
.me-marque-non { color: var(--alerte); }
.me-marque-perso { color: var(--attention); }

/* Retoucher : le geste de la fiche, et l'aide du menu. */
.me-gestes { margin: 4px 0 6px; }
.me-astuce { margin: -4px 0 10px; font-size: .78rem; }

/* Retoucher : une ligne par ingredient, le nom a gauche (le toucher pour le
   remplacer), les boutons - et + a droite, assez grands pour le pouce. */
.me-edit-resume { margin: 4px 0 14px; }
.me-edit-chiffre { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.me-edit-liste { margin-bottom: 8px; }
.me-edit-ligne { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bord); }
.me-edit-nom {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: none; border: none; padding: 6px 0; min-height: 44px; text-align: left;
  color: var(--texte); font-size: .95rem; font-weight: 600; line-height: 1.25;
}
.me-edit-changer { font-size: .72rem; font-weight: 600; color: var(--actif); }
.me-pas { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border-radius: 12px; font-size: 1.25rem; font-weight: 700; }
.me-edit-qte { flex: 0 0 76px; text-align: center; font-size: .86rem; font-variant-numeric: tabular-nums; color: var(--texte); }

/* --- La semaine --- */
.me-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 2px 0 14px; }
.me-jeton {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; min-height: 54px; border-radius: 12px;
  background: var(--fond2); border: 1px solid var(--bord); color: var(--texte2);
}
.me-jeton-jour { font-size: .66rem; font-weight: 600; }
.me-jeton-date { font-size: 1.05rem; font-weight: 700; color: var(--texte); font-variant-numeric: tabular-nums; }
.me-jeton.on { background: var(--actif2); border-color: var(--actif2); color: #06210f; }
.me-jeton.on .me-jeton-date { color: #06210f; }

/* Les notes sous un repas deja note dans Manger. */
.me-note-repas { font-size: .82rem; color: var(--texte2); line-height: 1.4; padding: 8px 2px 0; }
.me-note-repas::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--attention); margin-right: 8px; vertical-align: .1em; }

.me-jour { flex: 1 0 auto; }
.me-repas {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 14px;
  background: var(--fond2); border: 1px solid var(--bord); color: var(--texte);
  flex-shrink: 0;
}
.me-repas:active { background: var(--fond3); }
.me-repas-quand { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .75rem; font-weight: 700; color: var(--texte2); }
.me-repas-nom { font-size: .98rem; font-weight: 600; line-height: 1.3; }
.me-repas-plus { font-size: .82rem; font-weight: 600; color: var(--attention); line-height: 1.3; }
/* Les notes d'un repas (glucides, restes) : un avis, pas une alarme. */
.me-alerte { font-size: .78rem; color: var(--texte2); line-height: 1.35; }
.me-alerte::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--attention); margin-right: 7px; vertical-align: .1em; }
.me-alerte-jour { margin: 8px 0 0; font-size: .85rem; }
.me-repas-dose { font-size: .8rem; color: var(--texte2); font-variant-numeric: tabular-nums; }
.me-total { margin: 14px 2px 18px; }
.me-total-chiffre { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.me-total .mu-aide { margin-top: 2px; }

/* --- La fiche recette --- */
.me-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 6px; }
.me-macros > div { background: var(--fond2); border: 1px solid var(--bord); border-radius: 12px; padding: 10px 4px; text-align: center; }
.me-macros dd { margin: 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.me-macros dt { font-size: .7rem; color: var(--texte2); margin-top: 2px; }
.me-par { margin: 0 0 4px; }
.me-titre { font-size: .95rem; margin: 18px 0 8px; }
.me-ingredients, .me-courses { list-style: none; margin: 0; padding: 0; }
.me-ingredients li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--bord); font-size: .92rem;
}
.me-qte { flex: 0 0 auto; color: var(--texte2); font-size: .85rem; font-variant-numeric: tabular-nums; text-align: right; }
.me-etapes { margin: 0; padding-left: 22px; }
.me-etapes li { font-size: .95rem; line-height: 1.55; margin-bottom: 10px; padding-left: 4px; }
.me-etapes li::marker { color: var(--actif); font-weight: 700; }
.me-avis { margin-top: 0; }
.me-choix { min-height: 48px; font-weight: 600; }
.me-choix.on { background: var(--actif2); border-color: var(--actif2); color: #06210f; }
.me-choix-non.on { background: var(--alerte); border-color: var(--alerte); color: #2a0707; }
.me-note-ou { text-align: center; margin: 8px 0 0; }

/* --- La liste de courses --- */
.me-compte { font-size: .85rem; color: var(--texte2); margin: -4px 0 2px; font-variant-numeric: tabular-nums; }
.me-article {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 50px; padding: 8px 2px; background: none; border: none;
  border-bottom: 1px solid var(--bord); border-radius: 0; color: var(--texte); font-size: .95rem;
}
.me-case {
  flex: 0 0 22px; height: 22px; border-radius: 7px; border: 2px solid var(--bord);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.me-article-nom { flex: 1; line-height: 1.3; }
.me-pris .me-case { background: var(--actif2); border-color: var(--actif2); }
.me-pris .me-case::after {
  content: ''; width: 10px; height: 5px; margin-top: -3px;
  border-left: 2.5px solid #06210f; border-bottom: 2.5px solid #06210f; transform: rotate(-45deg);
}
.me-pris .me-article-nom, .me-pris .me-qte { color: var(--texte2); text-decoration: line-through; text-decoration-color: var(--bord); }

/* --- PDF et exclusions --- */
.me-bas { margin-top: 0; }
.me-bas > button { min-height: 54px; font-size: 1rem; }
.me-bas > .me-pdf { flex: 0 0 96px; font-weight: 700; }
.me-exclus { width: 100%; min-height: 48px; margin: 2px 0 8px; font-size: .9rem; }
.me-interdit { font-size: .8rem; font-weight: 600; color: var(--alerte); }

/* Les repas affiches : quatre cases sur une ligne, sous les jours. */
.me-afficher { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -4px 0 14px; }
.me-case-repas {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 6px; border-radius: 12px; font-size: .8rem; font-weight: 600;
  background: var(--fond2); border: 1px solid var(--bord); color: var(--texte2);
}
.me-case-repas .me-case { flex: 0 0 18px; height: 18px; border-radius: 5px; }
.me-case-repas.on { color: var(--texte); }
.me-case-repas.on .me-case { background: var(--actif2); border-color: var(--actif2); }
.me-case-repas.on .me-case::after {
  content: ''; width: 8px; height: 4px; margin-top: -2px;
  border-left: 2px solid #06210f; border-bottom: 2px solid #06210f; transform: rotate(-45deg);
}

/* --- Les favoris : une etoile a cote de chaque repas --- */
.me-espace { flex: 1; }
.me-repas-boite { position: relative; }
.me-repas-boite .me-repas { padding-right: 58px; }
.me-etoile {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: none; border-radius: 12px; color: var(--texte2); flex: 0 0 auto;
}
.me-repas-boite .me-etoile { position: absolute; top: 6px; right: 6px; }
.me-etoile svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.me-etoile.on { color: var(--attention); }
.me-etoile.on svg { fill: currentColor; }
.me-etoile:active svg { transform: scale(.85); }
/* Changer / J'aime pas : sous l'etoile, dans la meme colonne de droite. La
   tuile grandit juste assez pour les trois boutons de 44 px. */
.me-repas-boite.me-avec-actions .me-repas { min-height: 146px; }
.me-actions { position: absolute; right: 6px; top: 52px; display: flex; flex-direction: column; gap: 2px; }
.me-actions-haut { top: 6px; }
.me-repas-boite.me-avec-actions:has(.me-actions-haut) .me-repas { min-height: 102px; }
.me-action {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: none; border-radius: 12px; color: var(--texte2);
}
.me-action svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.me-action:active svg { transform: scale(.85); }
.me-action-non.on { color: var(--alerte); }
.me-etoile-fiche { flex: 0 0 52px !important; height: 48px; background: var(--fond3); border: 1px solid var(--bord); }
.me-listes { margin: 4px 0 8px; }
.me-listes .me-exclus { margin: 0; }

/* --- La semaine composee par l'IA --- */
.me-remarque { margin: -4px 0 10px; }
.me-a-verifier { margin: -4px 0 12px; font-size: .85rem; color: var(--texte2); }
.me-a-verifier summary { cursor: pointer; font-weight: 600; color: var(--attention); min-height: 32px; }
.me-a-verifier ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.45; }
.me-preparer { margin-top: 12px; }
.me-envoi { margin: 4px 0 12px; padding-left: 18px; font-size: .92rem; line-height: 1.6; }

/* L'attente : une barre qui glisse, pas un compte a rebours qui mentirait. */
.me-attente-bloc { width: 100%; max-width: 320px; text-align: center; }
.me-attente-barre { position: relative; height: 6px; border-radius: 3px; background: var(--fond3); overflow: hidden; margin: 0 auto 18px; }
.me-attente-barre::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 3px; background: var(--actif);
  animation: me-glisse 1.6s cubic-bezier(.45, 0, .55, 1) infinite;
}
/* En transform plutot qu'en left : la barre glisse sans recalculer la page a
   chaque image. Elle fait 40 % de large : de -100 % a +250 % de sa largeur,
   elle entre par la gauche et sort par la droite. */
@keyframes me-glisse { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.me-attente-texte { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; min-height: 1.5em; }
@media (prefers-reduced-motion: reduce) {
  .me-attente-barre::after { animation: none; left: 30%; }
}

/* --- Refonte du menu (08/10/2026) --- */
/* La coche « suivi » : quatrieme bouton de la colonne de droite. */
.me-repas-boite.me-avec-actions:has(.me-action-suivi) .me-repas { min-height: 186px; }
.me-repas-boite.me-avec-actions:has(.me-actions-haut .me-action-suivi:only-child) .me-repas { min-height: 56px; }
.me-repas-boite.me-avec-actions:has(.me-actions-haut .me-action:nth-child(3)) .me-repas { min-height: 142px; }
.me-action-suivi.on { color: var(--actif); }
.me-action-suivi.on svg { stroke-width: 2.6; }
.me-tout-suivi { width: 100%; margin: 2px 0 10px; }

/* Ce qui compte dans la journee sans etre compose : repas geres soi-meme,
   place gardee pour le pain, le fromage ou le dessert. */
.me-hors-menu { margin: 4px 0 10px; padding: 10px 12px; border-radius: var(--rayon); background: var(--fond2); border: 1px dashed var(--bord); }
.me-hors-menu p { margin: 0; font-size: .84rem; color: var(--texte2); line-height: 1.45; }

/* Les outils du haut : « Mes goûts » et le « i » du viking. */
.me-outils { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: -2px 0 8px; }
.me-outils .discret { min-height: 40px; margin: 0; font-size: .86rem; }
.me-i {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--bord); background: var(--fond2);
  color: var(--info); font: 700 1.05rem/1 Georgia, 'Times New Roman', serif; font-style: italic;
}
.me-i:active { background: var(--fond3); }

/* Mes goûts */
.me-gouts { padding-bottom: 12px; }
.me-gouts .mu-groupe { margin-top: 20px; }
.me-gouts .mu-aide { margin-top: -2px; }
.me-gouts .jetons { flex-wrap: wrap; overflow: visible; }
.me-gouts-repas { margin: 10px 0 4px; }
.me-gouts-nom { font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.me-gouts-fixe { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.me-gouts-fixe input[type="text"] { flex: 1; min-width: 0; }
.me-gouts-fixe input[type="number"] { flex: 0 0 84px; text-align: right; font-variant-numeric: tabular-nums; }
.me-gouts-unite { font-size: .84rem; color: var(--texte2); }

/* Mes goûts, refait le 08/10/2026 : des groupes de lignes comme les reglages
   d'un telephone, au lieu des rangees de pastilles toutes du meme poids. */
.gx-titre {
  margin: 26px 4px 8px; font-size: .95rem; font-weight: 700; color: var(--texte);
  letter-spacing: -.005em; text-wrap: balance;
}
.me-gouts > .gx-titre:first-child { margin-top: 6px; }
.gx-groupe {
  border-radius: 16px; overflow: hidden;
  background: var(--fond2);
  box-shadow: inset 0 0 0 1px var(--bord), 0 6px 18px -12px rgba(0, 0, 0, .7);
}
.gx-ligne {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 54px; padding: 9px 14px; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--texte); font: inherit; font-size: .95rem; text-align: left;
}
/* Le trait entre deux lignes part du texte, pas du bord : on lit des lignes
   d'un meme groupe, pas des cases separees. */
.gx-ligne + .gx-ligne::before {
  content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px;
  background: rgba(255, 255, 255, .07);
}
button.gx-ligne { cursor: pointer; transition: background-color .15s ease-out; }
button.gx-ligne:active { background: var(--fond3); }
.gx-ligne:focus-visible, .gx-option:focus-visible { outline: 2px solid var(--actif); outline-offset: -2px; }
.gx-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.gx-sous { font-size: .8rem; color: var(--texte2); line-height: 1.35; }
.gx-val {
  flex: 0 1 auto; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .9rem; color: var(--texte2);
}
.gx-chevron { flex: 0 0 16px; width: 16px; height: 16px; color: var(--texte2); opacity: .7; margin-right: -4px; }
.gx-chevron svg, .gx-coche svg { display: block; width: 100%; height: 100%; }

/* L'interrupteur : la seule chose verte de la ligne quand il est allume. */
.gx-inter {
  flex: 0 0 auto; position: relative; width: 50px; height: 30px; min-height: 30px; padding: 0; margin: 0;
  border-radius: 999px; border: 0; background: var(--fond3);
  box-shadow: inset 0 0 0 1px var(--bord); cursor: pointer;
  transition: background-color .2s ease-out, box-shadow .2s ease-out;
}
.gx-inter::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #cfd3da; box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), background-color .2s ease-out;
}
.gx-inter.on { background: var(--actif2); box-shadow: inset 0 0 0 1px var(--actif2); }
.gx-inter.on::after { transform: translateX(20px); background: #fff; }
.gx-inter:focus-visible { outline: 2px solid var(--actif); outline-offset: 2px; }

/* Le selecteur dans la ligne : peu de choix, toujours visibles. */
.gx-seg {
  flex: 0 0 auto; display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px;
  background: var(--fond); box-shadow: inset 0 0 0 1px var(--bord);
}
.gx-seg button {
  min-width: 38px; min-height: 34px; padding: 0 9px; margin: 0; border: 0; border-radius: 8px;
  background: none; box-shadow: none; color: var(--texte2);
  font: inherit; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.gx-seg button.on { background: var(--fond3); color: var(--actif); box-shadow: 0 1px 3px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(74, 222, 128, .35); }
.gx-seg button:focus-visible { outline: 2px solid var(--actif); outline-offset: -2px; }

/* Le compteur de personnes. */
.gx-pas { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
.gx-pas button {
  width: 36px; height: 36px; min-height: 36px; padding: 0; margin: 0; border-radius: 50%;
  border: 0; background: var(--fond3); box-shadow: inset 0 0 0 1px var(--bord);
  color: var(--texte); font-size: 1.15rem; line-height: 1;
}
.gx-pas button:disabled { opacity: .35; }
.gx-pas span { min-width: 28px; text-align: center; font-weight: 700; font-size: 1.02rem; font-variant-numeric: tabular-nums; }

/* Un repas « Je m'en occupe » : ce qu'on prend et ses calories, sous sa ligne. */
.gx-fixe { padding-top: 4px; padding-bottom: 12px; }
.gx-fixe::before { display: none; }
.gx-fixe input[type="text"] { flex: 1; min-width: 0; }
.gx-fixe input[type="number"] { flex: 0 0 76px; text-align: right; font-variant-numeric: tabular-nums; }

.gx-note { margin: 8px 4px 0; font-size: .8rem; line-height: 1.45; color: var(--texte2); }

/* La fenetre du bas : une liste a cocher, la coche verte a droite. */
.gx-options {
  margin: 0 0 14px; border-radius: 14px; overflow: hidden;
  background: var(--fond); box-shadow: inset 0 0 0 1px var(--bord);
}
.gx-option {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 52px; padding: 9px 14px; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--texte); font: inherit; font-size: .95rem; text-align: left;
}
.gx-option + .gx-option::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: rgba(255, 255, 255, .07); }
.gx-option:active { background: var(--fond3); }
.gx-coche { flex: 0 0 18px; width: 18px; height: 18px; color: var(--actif); opacity: 0; transform: scale(.6); transition: opacity .15s ease-out, transform .2s cubic-bezier(.22, 1, .36, 1); }
.gx-option.on .gx-coche { opacity: 1; transform: none; }
.gx-option.on { font-weight: 600; }
/* Plusieurs choix possibles : une case vide se voit avant d'etre cochee. */
.gx-multi .gx-coche { opacity: 1; transform: none; flex-basis: 22px; width: 22px; height: 22px; padding: 2px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--bord); color: transparent; transition: background-color .15s ease-out, color .15s ease-out; }
.gx-multi .gx-option.on .gx-coche { background: var(--actif2); box-shadow: none; color: #06210f; }
@media (prefers-reduced-motion: reduce) {
  .gx-inter, .gx-inter::after, .gx-coche, .gx-seg button { transition: none; }
}

/* L'aide du viking */
.me-aide { display: flex; align-items: flex-end; gap: 12px; min-height: 150px; margin: 4px 0 10px; }
.me-aide-viking { flex: 0 0 92px; width: 92px; height: 132px; }
.me-aide-bulle {
  position: relative; flex: 1; margin: 0 0 40px; padding: 12px 14px; border-radius: 16px 16px 16px 4px;
  background: var(--fond3); border: 1px solid var(--bord); font-size: .95rem; line-height: 1.5; color: var(--texte);
}
.me-aide-points { display: flex; justify-content: center; gap: 6px; margin: 0 0 12px; }
.me-aide-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--bord); }
.me-aide-points i.on { background: var(--actif); }

/* La barre discrete de la preparation en fond, en haut de l'ecran. */
.me-barre-fond {
  position: fixed; left: 12px; right: 12px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 70;
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px 6px 14px; overflow: hidden;
  border-radius: 14px; background: rgba(23, 27, 37, .96); border: 1px solid var(--bord);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35); font-size: .86rem; color: var(--texte);
}
.me-barre-fond > span:not(.me-barre-trait) { flex: 1; }
.me-barre-trait { position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: var(--actif); animation: me-glisse 1.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes me-glisse { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .me-barre-trait { animation: none; width: 100%; opacity: .5; } }
.me-barre-pret { border-color: var(--actif2); }
.me-barre-voir { flex: 1; min-height: 40px; padding: 0; text-align: left; background: none; border: none; color: var(--actif); font-weight: 600; font-size: .9rem; }
.me-barre-fermer { flex: 0 0 auto; min-height: 36px; padding: 0 10px; border-radius: 10px; background: none; border: 1px solid var(--bord); color: var(--texte2); font-size: .8rem; }

/* Un ingredient de la fiche : touchable, pour ne plus jamais le proposer. */
.me-ingredient { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; min-height: 40px; padding: 6px 0; background: none; border: none; color: inherit; font: inherit; text-align: left; }
.me-ingredients li:has(.me-ingredient) { padding: 3px 0; }
/* Repas deja coche « suivi » : l'etoile, puis la coche seule dessous. */
.me-repas-boite.me-avec-actions:has(.me-actions:not(.me-actions-haut) .me-action-suivi:only-child) .me-repas { min-height: 100px; }
.mu-plein-haut .me-i { margin-left: auto; margin-right: 8px; align-self: center; }
.me-gouts .champ { margin-top: 20px; }
/* En bas, juste au-dessus de la barre de navigation : en haut, elle cachait le
   titre et les fleches des jours pendant toute la preparation. A droite, on
   laisse la place du bouton « + » de Manger. */
.me-barre-fond { top: auto; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); right: 84px; }
.me-aide:not(:has(.me-aide-viking)) { min-height: 0; }
.me-aide:not(:has(.me-aide-viking)) .me-aide-bulle { margin-bottom: 8px; border-radius: 16px; }
/* Supprimer un menu : discret, rouge seulement au second appui. */
.me-supprimer { width: 100%; margin: 4px 0 10px; color: var(--texte2); }
.me-supprimer.me-confirmer { color: var(--alerte); }
/* Les boutons du bas en clair : « Menu en PDF », « Liste en PDF » prennent
   leur place au lieu d'un « PDF » sec. */
.me-bas > .me-pdf { flex: 1 1 0; font-weight: 600; }
.me-bas > button.principal { flex: 1.3 1 0; }

/* Un menu a valider : le bouton en haut. Valide : la date, discrete. */
.me-valider { margin: 0 0 12px; padding: 12px; border-radius: var(--rayon); background: rgba(74, 222, 128, .07); border: 1px solid rgba(74, 222, 128, .3); }
.me-valider p { margin: 0 0 10px; font-size: .9rem; line-height: 1.45; color: var(--texte); }
.me-valider .mu-bouton-large { margin: 0; }
.me-valide { margin: -2px 0 8px; font-size: .8rem; font-weight: 600; color: var(--actif); }

/* Les ingredients a ne plus voir : une case par ingredient. */
.me-coches { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.me-coche {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; text-align: left;
  border-radius: 12px; background: var(--fond2); border: 1px solid var(--bord); color: var(--texte); font-size: .92rem;
}
.me-coche .me-case { flex: 0 0 20px; height: 20px; border-radius: 6px; }
.me-coche.on { border-color: var(--alerte); }
.me-coche.on .me-case { background: var(--alerte); border-color: var(--alerte); }
.me-coche.on .me-case::after {
  content: ''; width: 9px; height: 4px; margin-top: -2px;
  border-left: 2px solid #2a0707; border-bottom: 2px solid #2a0707; transform: rotate(-45deg);
}
.me-gestes { flex-wrap: wrap; }

/* « Choisir dans le menu », fixe a gauche des repas qui defilent : le signe
   dans un rond, le texte centre dessous (Julien : « le texte est mal place »). */
.habitude.me-tuile-pioche {
  flex: 0 0 92px; width: 92px; min-height: 68px; padding: 8px 6px;
  align-items: center; justify-content: center; gap: 4px; text-align: center;
}
.habitude.me-tuile-pioche .me-tuile-plus {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(74, 222, 128, .14); font-size: 1.15rem; line-height: 1;
}
.habitude.me-tuile-pioche .nom { text-align: center; padding: 0; font-size: .74rem; line-height: 1.2; }
.me-changer-gouts { margin: 4px 0 14px; border: 1px solid var(--actif2); color: var(--actif); font-weight: 600; }

/* Le menu du jour refait le 08/10/2026 (« trop lourd, tuiles trop hautes ») :
   un seul groupe, un trait entre deux repas, et un bouton aux trois points a
   la place des quatre boutons empiles. */
.me-liste-jour {
  border-radius: 16px; overflow: hidden; background: var(--fond2);
  box-shadow: inset 0 0 0 1px var(--bord), 0 6px 18px -12px rgba(0, 0, 0, .7);
}
.me-liste-jour .me-ligne { position: relative; display: flex; align-items: stretch; }
.me-liste-jour .me-ligne + .me-ligne::before {
  content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: rgba(255, 255, 255, .08); z-index: 1;
}
.me-liste-jour .me-repas {
  flex: 1; min-width: 0; min-height: 0 !important; margin: 0; padding: 12px 4px 12px 14px;
  border: 0; border-radius: 0; background: none; gap: 3px;
}
.me-liste-jour .me-repas:active { background: var(--fond3); }
.me-liste-jour .me-repas-quand { font-size: .72rem; letter-spacing: .01em; }
.me-liste-jour .me-repas-quand svg { width: 13px; height: 13px; fill: var(--sucre); stroke: var(--sucre); stroke-width: 1.5; stroke-linejoin: round; }
.me-liste-jour .me-repas-nom { font-size: .95rem; }
.me-liste-jour .me-alerte { font-size: .76rem; }
.me-options {
  flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; margin: 0; align-self: stretch;
  display: grid; place-items: center; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--texte2);
}
.me-options svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.me-options:active { background: var(--fond3); color: var(--texte); }
.me-options:focus-visible { outline: 2px solid var(--actif); outline-offset: -3px; }
.me-liste-jour .me-pris .me-repas { opacity: .45; }

/* L'en-tete du menu : le « i », les trois points, Fermer. */
.mu-plein-haut .me-options-haut { flex: 0 0 44px; align-self: center; border-radius: 50%; height: 44px; margin-right: 2px; }
/* Les jours et les cases des repas, moins hauts (08/10/2026). */
.me-jours { gap: 4px; margin: 0 0 10px; }
.me-jeton { min-height: 44px; padding: 4px 0 5px; gap: 0; border-radius: 12px; }
.me-jeton-jour { font-size: .6rem; line-height: 1.1; }
.me-jeton-date { font-size: .98rem; line-height: 1.15; }
.me-afficher { margin: 0 0 12px; gap: 5px; }
.me-case-repas { min-height: 40px; padding: 4px 8px; font-size: .8rem; }
.me-case-repas .me-case { flex-basis: 16px; height: 16px; }
.mu-plein-haut .me-options-haut { box-shadow: inset 0 0 0 1px var(--bord); }
.me-marque-sain { color: var(--actif); background: rgba(74, 222, 128, .12); }

/* Ce que je ne mange pas, toutes les recettes (08/10/2026). */
.gx-ligne-forte .gx-nom { font-weight: 700; }
.gx-note-haut { margin: -2px 4px 8px; }
.gx-allergies .gx-option.on { font-weight: 700; }
.gx-allergies.gx-multi .gx-option.on .gx-coche { background: var(--alerte); color: #fff; }
.gx-recherche {
  width: 100%; margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 1rem;
  background: var(--fond2); color: var(--texte); border: 1px solid var(--bord);
}
.gx-recherche:focus { outline: 2px solid var(--actif); outline-offset: 1px; }
.gx-ajouter { color: var(--actif); font-weight: 600; }
.gx-exclus .gx-val { color: var(--alerte); }
.gx-filtres { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 6px; padding-bottom: 2px; }
.gx-filtres::-webkit-scrollbar { display: none; }
.gx-filtres .jeton { flex: 0 0 auto; white-space: nowrap; }
.gx-recettes { margin-top: 6px; }
.gx-vide { padding: 18px 14px; margin: 0; }

/* Ce que je ne mange pas, en une recherche (08/10/2026 soir). */
.gx-action {
  flex: 0 0 auto; min-height: 36px; padding: 0 12px; margin: 0; border-radius: 10px;
  font: inherit; font-size: .82rem; font-weight: 700; border: 1px solid var(--bord); background: var(--fond3); color: var(--texte);
}
.gx-action + .gx-action { margin-left: -4px; }
.gx-exclure { color: var(--actif); }
.gx-allergie { color: var(--alerte); }
.gx-retirer { color: var(--texte2); background: none; }
.gx-ligne-allergie .gx-nom > span:first-child { font-weight: 700; }
.gx-ligne-allergie .gx-sous { color: var(--alerte); }
.gx-vide-interdits { padding: 14px 4px; }

/* Les trois points a droite de « Voir mon menu » / « Faire un menu ». */
.me-barre { align-items: stretch; }
.me-barre .me-options-barre { flex: 0 0 44px; width: 44px; min-height: 44px; border-radius: 12px; background: var(--fond2); box-shadow: inset 0 0 0 1px var(--bord); }

/* Faire un menu : deux raccourcis cote a cote, et une grande case de consignes. */
.me-raccourcis { gap: 8px; margin: 4px 0 6px; }
.me-raccourcis button { flex: 1; min-width: 0; }
#meDemande { min-height: 190px; resize: vertical; line-height: 1.45; }

/* Retirer un repas d'un appui, et le trou qu'il laisse (14/11/2026). Le bouton
   reste discret : un mot gris a cote des trois points, pas un bouton rouge qui
   crierait sur chaque repas. */
.me-pas-la {
  flex: 0 0 auto; align-self: center; margin: 0; padding: 6px 8px; min-height: 36px;
  border: 1px solid var(--bord); border-radius: 10px; background: none; box-shadow: none;
  color: var(--texte2); font-size: .72rem; white-space: nowrap;
}
.me-pas-la:active { background: var(--fond3); color: var(--texte); }
.me-liste-jour .me-trou { align-items: center; padding: 10px 8px 10px 14px; gap: 10px; }
.me-trou-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.me-trou-raison { font-size: .9rem; color: var(--texte2); font-style: italic; }
.me-trou-remettre {
  flex: 0 0 auto; margin: 0; padding: 6px 10px; min-height: 36px; border: 1px solid var(--bord);
  border-radius: 10px; background: none; box-shadow: none; color: var(--actif); font-size: .78rem;
}
