/* Meud : page « Le plein » et « Autour de moi » (plein.html). S'appuie sur app.css. */

.lien-autour { background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; }

.puces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puces button {
  flex: 0 0 auto; min-height: 44px; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte); cursor: pointer;
}
.puces button[aria-checked="true"], .puces button.choisi { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.puces.petites button { min-height: 38px; font-size: 14px; padding: 6px 12px; }

.reglages { border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); margin-bottom: 12px; }
.reglages summary { padding: 12px 14px; cursor: pointer; font-size: 15px; color: var(--doux); }
.reglages summary span { color: var(--texte); font-weight: 600; }
.reglages-corps { display: grid; gap: 12px; padding: 0 14px 14px; }
.reglages-corps > label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--doux); }
.unite { display: flex; align-items: center; gap: 6px; color: var(--texte); }
.unite input { width: 84px; min-height: 44px; padding: 8px 10px; font: inherit; text-align: right; border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); color: var(--texte); }
.reglages-corps .interrupteur { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--texte); }
.reglages-corps .interrupteur input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 auto; }

.ou { display: grid; gap: 8px; margin: 4px 0 6px; }
.puce-ici {
  min-height: 48px; border-radius: 12px; font: inherit; font-weight: 650; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent-doux); color: var(--accent);
}
.puce-ici.actif { background: var(--accent); color: var(--accent-texte); }
.lieu input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte); }
.ou .resultats { margin: 0; }
.etat-plein { min-height: 1.5em; margin: 4px 0 10px; }

/* Tendance */
.tendance { border: 1px solid var(--bord); border-radius: 14px; background: var(--surface); padding: 12px 14px; margin-bottom: 14px; }
.tendance p { margin: 0 0 4px; font-size: 15px; }
.tendance .fleche { font-weight: 700; }
.tendance .hausse .fleche { color: var(--danger); }
.tendance .baisse .fleche { color: var(--ok-texte); }
.tendance svg { display: block; width: 100%; height: 48px; margin-top: 6px; }
.tendance .courbe { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tendance .aire { fill: var(--accent-doux); }

.carte-plein { height: 300px; margin-bottom: 14px; }

/* Étiquettes de prix sur la carte */
.pin { background: none; border: 0; }
.pin span {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 7px; border-radius: 8px; font: 700 13px/1.2 system-ui, sans-serif; color: #fff; background: #6b7280;
  box-shadow: 0 1px 3px rgba(0,0,0,.35); border: 2px solid #fff;
}
.pin span::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #fff; }
.pin.meilleur span { background: #15803d; font-size: 14px; }
.pin.bon span { background: #1f6f5c; }
.pin.ref span { background: #374151; }
.pin.perte span { background: #9ca3af; }
.pin.rupture span { background: #b83a3a; text-decoration: line-through; }
.pin.borne span { background: #2563eb; }
.pin.aire span { background: #7c3aed; }
.pin.meud span { background: #1f6f5c; }
.pin.moi span { background: #111827; }

/* Liste */
.liste-plein { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.fiche { border: 1px solid var(--bord); border-radius: 14px; background: var(--surface); padding: 12px 14px; }
.fiche.meilleure { border: 2px solid #15803d; }
.fiche-haut { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fiche h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.fiche .ou-est { margin: 2px 0 0; font-size: 14px; color: var(--doux); }
.fiche .prix { font-size: 22px; font-weight: 800; white-space: nowrap; }
.fiche .gain { margin: 8px 0 2px; font-weight: 700; font-size: 16px; }
.fiche .gain.plus { color: #15803d; }
.fiche .gain.moins { color: var(--doux); font-weight: 600; }
.fiche .detail { margin: 0; font-size: 14px; color: var(--doux); }
.fiche .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fiche .tag { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--fond); border: 1px solid var(--bord); color: var(--doux); }
.fiche .tag.ok { background: var(--ok-fond); color: var(--ok-texte); border-color: transparent; }
.fiche .tag.ko { background: var(--alerte-fond); color: var(--alerte-texte); border-color: transparent; }
.fiche .actions { display: flex; gap: 8px; margin-top: 10px; }
.fiche .actions .btn { min-height: 44px; font-size: 15px; }
@media (prefers-color-scheme: dark) {
  .fiche .gain.plus { color: #6fd08c; }
  .fiche.meilleure { border-color: #6fd08c; }
}

/* Compteur */
.compteur { border-radius: 14px; padding: 14px 16px; background: var(--accent-doux); color: var(--texte); margin: 8px 0 14px; }
.compteur p { margin: 0 0 6px; }
.compteur .gros { font-size: 22px; font-weight: 800; color: var(--accent); }
.compteur a { color: var(--accent); font-weight: 650; }
.sources { margin-top: 18px; }
.sources a { color: inherit; }

/* En roulant */
.roulant {
  position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: #15191d; color: #f3f1ec; overflow-y: auto;
}
.roulant-sur { margin: 0; font-size: 15px; color: #a3a9b1; }
.roulant-principal { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.roulant-principal .dans { font-size: 20px; margin: 0; color: #a3a9b1; }
.roulant-principal .distance { font-size: 64px; font-weight: 800; line-height: 1; margin: 4px 0 10px; }
.roulant-principal .nom { font-size: 28px; font-weight: 700; margin: 0; line-height: 1.2; }
.roulant-principal .prix { font-size: 26px; margin: 6px 0 0; }
.roulant-principal .gain { font-size: 30px; font-weight: 800; color: #6fd08c; margin: 12px 0 0; }
.roulant-principal .rien { font-size: 24px; line-height: 1.35; }
.roulant-suivante { font-size: 18px; color: #d4d2cc; border-top: 1px solid #353a41; padding-top: 12px; min-height: 1em; }
.roulant-suivante:empty { display: none; }
.roulant-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roulant-boutons .btn { min-height: 60px; font-size: 18px; background: transparent; color: inherit; border-color: #5d6570; }
.roulant-note { margin: 0; font-size: 13px; color: #a3a9b1; text-align: center; }

/* Feuille « Autour de moi » */
.feuille { position: fixed; inset: 0; z-index: 1600; }
.feuille-fond { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.feuille-corps {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  background: var(--surface); border-radius: 18px 18px 0 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  display: grid; gap: 12px;
}
.feuille-corps h2 { margin: 0; font-size: 20px; }
.feuille-choix { display: grid; gap: 8px; }
.feuille-choix button, .feuille-choix a.choix-lien {
  text-decoration: none;
  display: flex; align-items: center; gap: 14px; text-align: left; min-height: 64px; padding: 10px 14px;
  font: inherit; color: var(--texte); background: var(--fond); border: 1px solid var(--bord); border-radius: 14px; cursor: pointer;
}
.feuille-choix button.choisi { border: 2px solid var(--accent); }
.feuille-choix .ico { font-size: 26px; width: 34px; text-align: center; }
.feuille-choix small { display: block; color: var(--doux); font-size: 14px; }
.fiche.eclaire { box-shadow: 0 0 0 3px var(--accent); }
.onglets-plein { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--bord); }
.onglets-plein button { min-height: 48px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 650; color: var(--texte); cursor: pointer; line-height: 1.2; }
.onglets-plein button[aria-current="true"] { background: var(--accent); color: var(--accent-texte); }
.roulant-aller { margin-top: 18px; min-height: 64px; font-size: 20px; background: #ffffff; color: #15191d; border-color: #ffffff; }
.guide-auto { z-index: 1700; }
.guide-auto .guide-picto svg { width: 56px; height: 56px; }
@media (prefers-color-scheme: dark) { #carte-auto .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); } }
