:root {
  --fond: #faf6ee;
  --carte: #ffffff;
  --vert: #5e9c76;
  --vert-fonce: #3b7054;
  --vert-clair: #e5f1e9;
  --texte: #26302a;
  --doux: #667069;
  --bord: #ebe4d5;
  --rouge: #b84c38;
  --ombre: 0 1px 2px rgba(60, 50, 30, 0.05), 0 6px 18px rgba(60, 50, 30, 0.06);
  --rayon: 22px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: 'Segoe UI Variable Text', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  overscroll-behavior-y: none;
}

h1,
h2,
p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--vert-fonce);
  outline-offset: 2px;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
}

.page.avec-barre {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.page.centre {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.doux {
  color: var(--doux);
  font-size: 0.9rem;
}

.erreur {
  color: var(--rouge);
  font-weight: 600;
}

.carte {
  background: var(--carte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

.logo {
  font-size: 64px;
  line-height: 1;
}

/* ---------- Indicateur de synchronisation ---------- */

.synchro {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) 18px 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--doux);
  text-align: right;
}

.synchro.en-attente {
  color: #9a5b00;
}

.synchro.hors-connexion {
  color: #7a4a12;
}

.synchro + .page {
  padding-top: 8px;
}

/* ---------- Boutons ---------- */

.bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  transition: transform 0.12s ease, opacity 0.2s ease;
}

.bouton:active {
  transform: scale(0.97);
}

.bouton:disabled {
  opacity: 0.45;
}

.bouton.principal {
  background: var(--vert-fonce);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 112, 84, 0.28);
}

.bouton.secondaire {
  background: var(--carte);
  color: var(--vert-fonce);
  border: 2px solid var(--vert);
}

.bouton.danger {
  background: #fbeeeb;
  color: var(--rouge);
}

.bouton.grand {
  min-height: 76px;
  font-size: 1.2rem;
  border-radius: var(--rayon);
}

.bouton-emoji {
  font-size: 1.6rem;
}

.bouton.petit {
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 14px;
  background: var(--vert-clair);
  color: var(--vert-fonce);
  flex-shrink: 0;
}

.bouton.flottant {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(488px, calc(100% - 32px));
  z-index: 4;
}

.bouton.flottant:active {
  transform: translateX(-50%) scale(0.97);
}

.rond {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--carte);
  box-shadow: var(--ombre);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.rond:disabled {
  opacity: 0.3;
}

/* ---------- Accueil ---------- */

.accueil-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.titre-accueil {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--vert-fonce);
}

.personnes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.presence {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  min-width: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.presence-nom {
  font-weight: 700;
}

.presence-statut {
  font-size: 0.78rem;
  color: var(--doux);
  line-height: 1.25;
}

.presence-statut.en-ligne {
  color: var(--vert-fonce);
  font-weight: 700;
}

.presence-statut.en-ligne::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fae6a;
  margin-right: 5px;
}

.compteur {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(135deg, #ffffff 0%, var(--vert-clair) 100%);
}

.compteur-libelle {
  color: var(--doux);
  font-weight: 600;
}

.compteur-nombre {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nouveautes,
.invite-push,
.mode-courses {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 700;
  text-align: left;
  width: 100%;
}

.nouveautes {
  background: #fff6dd;
}

.chevron {
  font-size: 1.6rem;
  color: var(--doux);
}

.invite-push {
  font-weight: 400;
  margin-top: 4px;
}

.invite-push-icone {
  font-size: 1.8rem;
}

/* ---------- En-tête d'écran ---------- */

.entete {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entete h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.retour {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--carte);
  box-shadow: var(--ombre);
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 5px;
  flex-shrink: 0;
}

/* ---------- Onglets ---------- */

.onglets {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 4px;
  background: #f0e9da;
  border-radius: 18px;
  padding: 4px;
}

.onglets a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--doux);
  white-space: nowrap;
}

.onglets a.actif {
  background: var(--carte);
  color: var(--texte);
  box-shadow: var(--ombre);
}

.onglets b {
  background: var(--vert-clair);
  color: var(--vert-fonce);
  border-radius: 10px;
  padding: 0 7px;
  font-size: 0.78rem;
}

.mode-courses.actif {
  background: var(--vert-clair);
}

.interrupteur {
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: #d8d2c4;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.interrupteur::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.interrupteur.actif {
  background: var(--vert-fonce);
}

.interrupteur.actif::after {
  transform: translateX(22px);
}

/* ---------- Articles ---------- */

.rayon {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--doux);
  margin: 6px 4px 10px;
}

.articles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article,
.achat,
.ordre {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
}

.article {
  animation: apparaitre 0.25s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.article.coche {
  opacity: 0.4;
  transform: translateX(12px);
}

@keyframes apparaitre {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.case {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 3px solid var(--vert);
  background: #fff;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.case:active {
  transform: scale(0.9);
}

.article.achete .case,
.article.coche .case {
  background: var(--vert-fonce);
  border-color: var(--vert-fonce);
}

.article-corps {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 56px;
  text-align: left;
}

.article-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.article-texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.article-nom {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.article.achete .article-nom {
  text-decoration: line-through;
  text-decoration-color: var(--doux);
  color: var(--doux);
}

.article-detail,
.article-achat {
  font-size: 0.85rem;
  color: var(--doux);
}

.achat {
  padding-left: 14px;
}

.achat.nouveau {
  background: #fff6dd;
}

.pastille {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vide {
  text-align: center;
  color: var(--doux);
  padding: 36px 16px;
  font-weight: 600;
}

.vide-emoji {
  font-size: 3rem;
}

/* ---------- Catalogue ---------- */

.grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.grille-rayons {
  grid-template-columns: repeat(2, 1fr);
}

.vignette {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 6px;
  min-height: 112px;
  text-align: center;
  transition: transform 0.12s ease;
}

.vignette:active {
  transform: scale(0.95);
}

.vignette-emoji {
  font-size: 2.6rem;
  line-height: 1.1;
}

.vignette-nom {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.rayon-vignette {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px;
  min-height: 78px;
  text-align: left;
}

.rayon-vignette .vignette-emoji {
  font-size: 2.2rem;
}

.rayon-vignette .vignette-nom {
  font-size: 0.95rem;
}

.vignette-present {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vert-fonce);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ---------- Feuille ---------- */

.voile {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(38, 48, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fondu 0.2s ease;
}

.feuille {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--fond);
  border-radius: 28px 28px 0 0;
  padding: 24px 18px calc(22px + env(safe-area-inset-bottom));
  animation: monter 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feuille form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feuille-fermer {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #efe8d9;
  font-size: 1rem;
}

@keyframes fondu {
  from {
    opacity: 0;
  }
}

@keyframes monter {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

.fiche-titre {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 48px;
}

.fiche-titre h2 {
  font-size: 1.5rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fiche-emoji {
  font-size: 3rem;
  line-height: 1;
}

.note {
  background: var(--carte);
  border-radius: 14px;
  padding: 10px 14px;
}

label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--doux);
  margin-top: 4px;
}

.champ {
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  border: 2px solid var(--bord);
  border-radius: 16px;
  background: var(--carte);
  font-size: 1.05rem;
}

.champ:focus {
  outline: none;
  border-color: var(--vert);
}

.quantite {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grand-rond {
  width: 58px;
  height: 58px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--vert-fonce);
}

.champ-quantite {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex: 1;
  min-width: 0;
}

.unites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.puce {
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 23px;
  background: var(--carte);
  border: 2px solid var(--bord);
  font-weight: 600;
}

.puce.actif {
  background: var(--vert-fonce);
  border-color: var(--vert-fonce);
  color: #fff;
}

.feuille .bouton {
  margin-top: 8px;
}

/* ---------- Réglages ---------- */

.bloc {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ordre {
  padding: 8px 10px 8px 14px;
}

.ordre-rang {
  width: 24px;
  color: var(--doux);
  font-weight: 700;
  font-size: 0.85rem;
}

.ordre-nom {
  flex: 1;
  font-weight: 700;
  min-width: 0;
}

.ordre .rond {
  box-shadow: none;
  background: var(--vert-clair);
  color: var(--vert-fonce);
  font-weight: 800;
}

/* ---------- Annonce ---------- */

.annonce-zone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
}

.annonce {
  background: var(--texte);
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: monter 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Historique : le bouton « Ajouter à nouveau » occupe sa propre ligne, facile à atteindre du pouce. */
.rachat {
  flex-wrap: wrap;
  padding: 12px 14px;
}

.rachat .bouton.petit {
  width: 100%;
}

/* ---------- Modifications simultanées ---------- */

.conflits {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conflits h3 {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--doux);
}

.conflit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.conflits .conflit {
  background: var(--carte);
  border-radius: 16px;
  padding: 12px 14px;
}

.conflit .bouton.petit {
  align-self: flex-start;
}

.bloc.nouveau {
  background: #fff6dd;
}

/* ---------- Catalogue personnel ---------- */

.vignette-precision {
  font-size: 0.72rem;
  color: var(--doux);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.fiche-precision {
  color: var(--doux);
  font-size: 0.9rem;
}

.format {
  display: flex;
  gap: 10px;
}

.format .champ:first-child {
  flex: 1;
  min-width: 0;
}

.format select.champ {
  width: auto;
  flex-shrink: 0;
}

.lien {
  align-self: flex-start;
  min-height: 44px;
  color: var(--vert-fonce);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fiche-infos {
  background: var(--carte);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--doux);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- Scanner ---------- */

.viseur {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #1d2420;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
}

.viseur video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viseur.indisponible {
  aspect-ratio: auto;
  padding: 18px;
  background: var(--carte);
  color: var(--doux);
}

.viseur.indisponible video {
  display: none;
}

.viseur p {
  position: relative;
  padding: 0 16px;
}

.viseur-ligne {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 3px;
  border-radius: 2px;
  background: #ff5a4d;
  box-shadow: 0 0 12px rgba(255, 90, 77, 0.8);
}

.format .bouton.petit {
  min-height: 54px;
}

/* ---------- Photos de produits ---------- */

.photo-produit {
  object-fit: cover;
  border-radius: 14px;
  background: var(--fond);
}

.vignette-emoji.photo-produit {
  width: 56px;
  height: 56px;
}

.fiche-emoji.photo-produit,
.photo-proposee {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
}

/* ---------- Prix ---------- */

.saisie-prix {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.champ-prix {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: right;
}

.prix-euro {
  align-self: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--doux);
  padding-right: 4px;
}

.case-promotion {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 1rem;
  color: var(--texte);
  margin-top: 0;
}

.case-promotion input {
  width: 26px;
  height: 26px;
  accent-color: var(--vert-fonce);
}

/* Proposition de prix en mode courses : posée en bas de l'écran, la liste reste utilisable derrière. */
.bandeau-prix {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(500px, calc(100% - 20px));
  max-height: 80dvh;
  overflow-y: auto;
  z-index: 6;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid var(--vert);
  box-shadow: 0 10px 34px rgba(40, 60, 45, 0.28);
  animation: monter 0.25s ease;
}

.bandeau-prix-titre {
  padding-right: 48px;
}

.bandeau-prix .feuille-fermer {
  top: 8px;
  right: 8px;
}

.bloc-prix {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bloc-prix h3 {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--doux);
}

.prix-tuiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.prix-tuile {
  background: var(--carte);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prix-tuile.principale {
  grid-column: 1 / -1;
  background: var(--vert-clair);
}

.prix-libelle,
.prix-detail {
  font-size: 0.76rem;
  color: var(--doux);
}

.prix-valeur {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--texte);
}

.prix-tuile.principale .prix-valeur {
  font-size: 1.7rem;
}

.releves {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.releve {
  width: 100%;
  min-height: 52px;
  background: var(--carte);
  border-radius: 14px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  text-align: left;
  align-items: baseline;
}

.releve-date {
  font-size: 0.82rem;
  color: var(--doux);
}

.releve-prix {
  font-weight: 800;
  text-align: right;
}

.releve-detail {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--doux);
}

.etiquette {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #efe8d9;
  color: var(--texte);
  font-size: 0.72rem;
  font-weight: 700;
}

.etiquette.promo {
  background: #fde7c2;
}

/* Courbe d'évolution : une seule série, trait fin, repères discrets. */
.courbe {
  margin: 0;
  background: var(--carte);
  border-radius: 16px;
  padding: 10px 12px;
}

.courbe svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.courbe-trait {
  fill: none;
  stroke: var(--vert-fonce);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.courbe-repere {
  stroke: var(--bord);
  stroke-width: 1;
}

.courbe-point {
  fill: var(--vert-fonce);
  stroke: var(--carte);
  stroke-width: 2;
}

.courbe-point.choisi {
  fill: var(--texte);
}

.courbe-cible {
  fill: transparent;
  cursor: pointer;
}

.courbe figcaption {
  font-size: 0.82rem;
  color: var(--doux);
  text-align: center;
  margin-top: 4px;
}

.courbe figcaption strong {
  color: var(--texte);
}

/* ---------- Paniers ---------- */

.terminer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  text-align: left;
  width: 100%;
  border: 2px solid var(--vert);
}

.bascule {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f0e9da;
  border-radius: 16px;
  padding: 4px;
}

.bascule button {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--doux);
}

.bascule button.actif {
  background: var(--carte);
  color: var(--texte);
  box-shadow: var(--ombre);
}

.panier {
  width: 100%;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.panier-date {
  font-size: 0.82rem;
  color: var(--doux);
}

.panier-magasin {
  font-weight: 800;
  font-size: 1.05rem;
}

.panier-qui {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--doux);
  margin-top: 4px;
}

.prix-tuiles.deux {
  grid-template-columns: 1fr 1fr;
}

li.releve {
  list-style: none;
}

/* ---------- Statistiques ---------- */

.lien-statistiques {
  align-self: center;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.stat-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-titre {
  margin: 6px 4px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--texte);
}

.stat-ligne {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

/* Le texte reste dans l'encre habituelle : la flèche et le signe portent le sens. */
.variation {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--texte);
  white-space: nowrap;
}

.stat-comparaison {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}

.stat-prix-magasin {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.95rem;
}

/* Graphique des dépenses : barres fines, sommet arrondi, repères discrets. */
.graphique {
  margin: 0;
  background: var(--carte);
  border-radius: 16px;
  padding: 14px 12px 10px;
}

.barres {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 150px;
}

.barre-colonne {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.barre-piste {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--bord);
}

.barre {
  width: min(24px, 70%);
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: var(--vert);
}

.barre-colonne.choisie .barre {
  background: var(--vert-fonce);
}

.barre-mois {
  font-size: 0.72rem;
  color: var(--doux);
}

.barre-colonne.choisie .barre-mois {
  color: var(--texte);
  font-weight: 700;
}

.graphique figcaption {
  font-size: 0.85rem;
  color: var(--doux);
  text-align: center;
  margin-top: 8px;
}

.graphique figcaption strong {
  color: var(--texte);
}

/* Mois dont les paniers n'ont aucun montant connu : un repère, pas une barre. */
.barre-inconnue {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--doux);
  padding-bottom: 4px;
}

/* ---------- Corrections de la recette sur ordinateur ---------- */

.prix-pour {
  font-size: 1rem;
  font-weight: 600;
  color: var(--doux);
}

.prix-soit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--texte);
}

.note.alerte {
  background: #fde7c2;
  color: #5c3b06;
  font-size: 0.92rem;
  /* Laisse la place du bouton de fermeture, en haut à droite de la fiche. */
  margin-right: 48px;
}
