/* Krobien — styles (mobile d'abord).
   Écran principal façon appli de navigation : carte plein écran, puces de filtres en haut,
   boutons ronds flottants, panneau qui remonte du bas (réduit / moitié / plein écran).
   Identité : police Plus Jakarta Sans, dégradé « Aurore », une couleur par catégorie (voir CLAUDE.md).
   Vert / orange / rouge / gris réservés aux statuts. Le mode sombre redéfinit les variables. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("polices/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fond: #f4f6f8;        /* gris très clair, cartes blanches posées dessus (nouveau design) */
  --surface: #eaedf1;
  --fond-panneau: #ffffff; /* panneau et feuilles */
  --surface-2: #dde1e7;
  --texte: #0b0c10;       /* encre */
  --texte-doux: #4a5060;
  --texte-faible: #5f6673;
  --bordure: #e3e6ec;
  --accent: #0db561;      /* vert de la marque : boutons principaux, « + » (texte foncé dessus, jamais blanc) */
  --accent-fort: #0a9e54;
  --accent-texte: #0b0c10;
  --accent-doux: #ddf7e8;
  --accent-trait: #9fe3bf;
  --lien: #087a41;        /* vert lisible sur blanc */
  --citron: #daf07c;      /* petites touches d'accent */

  --ok: #087a41;          --ok-fond: #ddf7e8;
  --attention: #a75102;   --attention-fond: #fdf1e1;
  --rupture: #c62828;     --rupture-fond: #fdeceb;  /* rouge foncé, réservé aux ruptures */
  --inconnu: #5f696c;     --inconnu-fond: #eceef1;
  --a-confirmer: #5f696c; --a-confirmer-fond: #eceef1;  /* gris : prix figé (« incertain / à venir ») */

  /* Pastilles de prix sur la carte : couleurs pleines + texte blanc, lisibles sur les deux fonds */
  --repere-ok: #178a43;
  --repere-probable: var(--repere-ok); /* « Probable » : texte et contour verts sur fond */
  --repere-attention: #b45d00;
  --repere-rupture: #c62828;
  --repere-inconnu: #6a7477;  /* gris : texte blanc à 4,8 pour 1 */
  --repere-a-confirmer: #6a7477;

  /* Choisi (puces de catégorie, Meilleur choix) : couleur pleine en clair, teintée en sombre */
  --vert-actif: var(--ok);       --vert-actif-texte: var(--fond);  --vert-actif-ombre: rgba(8, 122, 65, .28);
  --corail-actif: var(--accent); --corail-actif-texte: var(--accent-texte); --corail-actif-ombre: rgba(13, 181, 97, .35);
  --foret-actif: var(--texte);   --foret-actif-texte: var(--fond);
  --logo: #0b0c10;  /* « krobien » : encre en clair, presque blanc en sombre */

  --ombre: 0 1px 2px rgba(11, 12, 16, .05), 0 6px 20px rgba(11, 12, 16, .08);
  --ombre-flottante: 0 2px 4px rgba(11, 12, 16, .10), 0 6px 18px rgba(11, 12, 16, .14);
  --ombre-forte: 0 2px 6px rgba(11, 12, 16, .08), 0 12px 32px rgba(13, 181, 97, .22);
  --panneau-visible: 220px; /* mis à jour par app.js selon la position du panneau */
  --filtre-icones-carte: none;
  color-scheme: light dark;
}

/* Mode sombre : automatique (suit le téléphone) sauf si l'utilisateur a choisi « Clair »… */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --fond: #121212;      /* gris neutre très foncé (pas de vert) */
    --fond-panneau: #1e1e1e; /* panneau, feuilles et cartes */
    --surface: #262626;   /* champs et encarts, posés sur le panneau */
    --surface-2: #303030;
    --texte: #ededed;
    --texte-doux: #b8b8b8;
    --texte-faible: #9e9e9e;
    --bordure: #2e2e2e;
    --accent: #2fcf7c;    /* vert de la marque, un peu adouci, texte foncé dessus */
    --accent-fort: #4bdc90;
    --accent-texte: #121212;
    --accent-doux: #12301f;
    --accent-trait: #1f6b44;
    --lien: #5be3a0;      /* vert lisible sur fond sombre */
    --citron: #8fc1a6;    /* plus de citron en sombre */

    --ok: #5be3a0;        --ok-fond: #12301f;
    --attention: #e0b26a; --attention-fond: #2e2618;
    --rupture: #ef5350;   --rupture-fond: #2b1716;  /* toujours avec l'icône ✕ */
    --inconnu: #b0b0b0;   --inconnu-fond: #2a2a2a;
    --a-confirmer: #b0b0b0; --a-confirmer-fond: #2a2a2a;
    --repere-ok: #3d7a5e;   /* pastilles vertes de la carte : désaturées, texte blanc à 5 pour 1 */
    --repere-probable: #8fc1a6;

    /* Choisi (puces, Meilleur choix) : fond légèrement teinté et texte coloré, rien qui flashe */
    --vert-actif: #12301f;   --vert-actif-texte: #5be3a0; --vert-actif-ombre: transparent;
    --corail-actif: #12301f; --corail-actif-texte: #5be3a0; --corail-actif-ombre: transparent;
    --foret-actif: #2e2e2e;  --foret-actif-texte: #ededed;
    --logo: #f2f3f5;

    --ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
    --ombre-flottante: 0 2px 4px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .45);
    --ombre-forte: 0 2px 6px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .45);
    --filtre-icones-carte: invert(1);
    color-scheme: dark;
  }
}

/* …ou forcé quand il a choisi « Sombre » (réglage mémorisé sur le téléphone) */
:root[data-theme="sombre"] {
  --fond: #121212;      /* gris neutre très foncé (pas de vert) */
  --fond-panneau: #1e1e1e; /* panneau, feuilles et cartes */
  --surface: #262626;   /* champs et encarts, posés sur le panneau */
  --surface-2: #303030;
  --texte: #ededed;
  --texte-doux: #b8b8b8;
  --texte-faible: #9e9e9e;
  --bordure: #2e2e2e;
  --accent: #2fcf7c;    /* vert de la marque, un peu adouci, texte foncé dessus */
  --accent-fort: #4bdc90;
  --accent-texte: #121212;
  --accent-doux: #12301f;
  --accent-trait: #1f6b44;
  --lien: #5be3a0;      /* vert lisible sur fond sombre */
  --citron: #8fc1a6;    /* plus de citron en sombre */

  --ok: #5be3a0;        --ok-fond: #12301f;
  --attention: #e0b26a; --attention-fond: #2e2618;
  --rupture: #ef5350;   --rupture-fond: #2b1716;  /* toujours avec l'icône ✕ */
  --inconnu: #b0b0b0;   --inconnu-fond: #2a2a2a;
  --a-confirmer: #b0b0b0; --a-confirmer-fond: #2a2a2a;
  --repere-ok: #3d7a5e;   /* pastilles vertes de la carte : désaturées, texte blanc à 5 pour 1 */
  --repere-probable: #8fc1a6;

  /* Choisi (puces, Meilleur choix) : fond légèrement teinté et texte coloré, rien qui flashe */
  --vert-actif: #12301f;   --vert-actif-texte: #5be3a0; --vert-actif-ombre: transparent;
  --corail-actif: #12301f; --corail-actif-texte: #5be3a0; --corail-actif-ombre: transparent;
  --foret-actif: #2e2e2e;  --foret-actif-texte: #ededed;
  --logo: #f2f3f5;

  --ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
  --ombre-flottante: 0 2px 4px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .45);
  --ombre-forte: 0 2px 6px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .45);
  --filtre-icones-carte: invert(1);
  color-scheme: dark;
}

:root[data-theme="clair"] { color-scheme: light; }

/* --- Base ---------------------------------------------------------------------- */

* { box-sizing: border-box; }

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

body {
  margin: 0; height: 100%; overflow: hidden; /* appli plein écran : seul le panneau défile */
  background: var(--fond);
  color: var(--texte);
  font: 500 16px/1.45 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }

a { color: var(--lien); }

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

button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

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

[hidden] { display: none !important; }

/* Icônes Lucide : même trait partout, couleur héritée du texte (donc du thème) */
.icone {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icone-pleine { fill: currentColor; }

/* --- Carte plein écran ----------------------------------------------------------- */

.carte { position: fixed; inset: 0; z-index: 0; background: var(--surface); }
.carte-indisponible { margin: 120px 24px; text-align: center; color: var(--texte-doux); font-weight: 700; }

/* Mentions de la carte (bouton « i » compact), sous la barre des filtres */
.maplibregl-ctrl-top-right { top: var(--haut-controles, calc(env(safe-area-inset-top) + 66px)); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--fond); color: var(--texte-doux); }
.maplibregl-ctrl-attrib a { color: var(--lien); }
.maplibregl-ctrl-attrib-button { filter: var(--filtre-icones-carte); }
/* Crédits de la carte (ⓘ) : zone de 44 px, le dessin reste petit */
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button {
  width: 44px; height: 44px; background-position: center; background-repeat: no-repeat; }
.maplibregl-ctrl-attrib.maplibregl-compact { min-height: 44px; min-width: 44px; }

/* Pastille de prix : pastille blanche, rond de la couleur de la catégorie avec son icône, prix en gras.
   Le statut d'une station change le rond (gris = pas d'info, orange = incertain) et son icône ;
   une rupture reste toute rouge, avec ✕ (jamais la couleur seule). */
/* Pas de « position » ici : MapLibre place lui-même chaque repère (position absolue) */
.repere {
  --fond-repere: #fff; --texte-repere: #0b0c10;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 3px; border: 0; border-radius: 999px;
  background: var(--fond-repere); color: var(--texte-repere);
  font: 800 13px/1.15 "Plus Jakarta Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); cursor: pointer;
}
/* Plus précis que les badges de statut (.statut-probable…), qui ne doivent pas changer la pastille */
.repere.repere { background: var(--fond-repere); color: var(--texte-repere); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.grappe { z-index: 2; } .repere.repere { z-index: 3; } .repere.meilleur { z-index: 4; } .repere.actif { z-index: 5; } /* les prix passent devant les grappes */
@media (prefers-color-scheme: dark) { :root:not([data-theme="clair"]) .repere:not(.meilleur):not(.statut-rupture) { --fond-repere: #262626; --texte-repere: #ededed; } }
:root[data-theme="sombre"] .repere:not(.meilleur):not(.statut-rupture) { --fond-repere: #262626; --texte-repere: #ededed; }
.repere::after { /* petite pointe vers le lieu */
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--fond-repere); border-bottom: 0;
}
.repere .rond {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cat, var(--carburant-vif)); color: var(--cat-sur, #fff);
}
.repere .icone { width: 14px; height: 14px; }
.repere.statut-a_confirmer .rond, .repere.statut-inconnu .rond,
.repere.repere-annonce.moment-a_venir .rond, .repere.repere-annonce.disponibilite-reserve .rond { background: var(--repere-inconnu); color: #fff; }
.repere.statut-incertain .rond { background: var(--repere-attention); color: #fff; }
.repere.statut-rupture { --fond-repere: var(--repere-rupture); --texte-repere: #fff; background: var(--repere-rupture); color: #fff; }
.repere.statut-rupture .rond { background: rgba(255, 255, 255, .22); color: #fff; }
/* Meilleur choix : la pastille prend la couleur du carburant, rond blanc, un peu plus grande */
.repere.meilleur { --fond-repere: var(--carburant-vif); --texte-repere: #fff; padding: 4px 12px 4px 4px; font-size: 14px; }
.repere.meilleur .rond { width: 26px; height: 26px; background: #fff; color: var(--carburant-vif); }
.repere.actif { outline: 3px solid var(--accent); outline-offset: 2px; }



/* Pastille regroupée avec ses voisines : elle laisse la place à la pastille « nombre » */
.repere.dans-grappe { display: none; }
/* Zone à toucher de 44 px (le dessin reste fin) : pastille ~27 px → intérieur 23 + 2 × 12 = 47 */
.repere::before { content: ""; position: absolute; inset: -12px -4px; }

/* Pastille « nombre » : plusieurs bons plans au même endroit. La toucher zoome dessus.
   Bordure de la couleur de la catégorie (vert de la marque pour « Autour de toi »). */
.grappe {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: 4px solid var(--cat, #0db561); border-radius: 999px;
  background: #0b0c10; color: #fff; font: 800 16px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); cursor: pointer; z-index: 2;
}
.grappe.a-cote { min-width: 44px; height: 44px; padding: 0 8px; font-size: 14px; border-width: 3px; }
.grappe:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cat-autour { --cat: #0db561; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="clair"]) .grappe { background: #fff; color: #0b0c10; } }
:root[data-theme="sombre"] .grappe { background: #fff; color: #0b0c10; }
body.hors-ligne .grappe { filter: grayscale(1); }

.point-utilisateur {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(255, 122, 89, .28);
}

/* --- Barre du haut : logo + filtres rapides ----------------------------------------- */

.barre-haut {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px 12px;
  pointer-events: none; /* la carte reste manipulable entre les puces */
}
.barre-haut > * { pointer-events: auto; }

/* Logo : « krobien » toujours en minuscules, d'une seule couleur ; slogan dessous */
.marque-nom, .ecran-chargement-nom { text-transform: lowercase; letter-spacing: -.035em; color: var(--logo); }
.slogan { margin: 2px 0 0; font-size: .8rem; font-weight: 600; color: var(--texte-doux); }

/* --- Écran de chargement (lancement, réveil du serveur) ---------------------------- */

.ecran-chargement {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-content: center; justify-items: center;
  gap: 10px; padding: 24px; background: var(--fond); text-align: center;
  transition: opacity .4s ease; /* fondu vers la carte */
}
.ecran-chargement.disparait { opacity: 0; pointer-events: none; }
.ecran-chargement img { border-radius: 22px; box-shadow: var(--ombre-forte); }
.ecran-chargement-nom { margin: 8px 0 0; font-size: 2.2rem; font-weight: 800; letter-spacing: -.035em; }
.ecran-chargement-message { margin: 0; color: var(--texte-doux); font-weight: 600; min-height: 1.5em; }
/* Logo + nom : apparition en fondu doux avec un léger zoom */
.ecran-chargement-logo {
  display: grid; justify-items: center; gap: 10px;
  animation: apparition-logo .55s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes apparition-logo { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
/* « Réveil du serveur… » : discret, en bas, sans décaler le logo */
.ecran-chargement-message:empty { visibility: hidden; }
.ecran-chargement:not(.hors-ligne) .ecran-chargement-message {
  position: absolute; left: 0; right: 0; bottom: calc(14% + env(safe-area-inset-bottom));
  color: var(--texte-faible); font-size: .9rem; font-weight: 600; animation: apparition-texte .6s ease both;
}
@keyframes apparition-texte { from { opacity: 0; } to { opacity: 1; } }
/* « Réduire les animations » : pas de zoom, juste un fondu très court */
@media (prefers-reduced-motion: reduce) {
  .ecran-chargement-logo { animation: apparition-texte .2s ease both; }
  .ecran-chargement { transition-duration: .15s; }
}

/* Sans réseau : la barre s'efface, place au message et au bouton « Réessayer » */
/* sélecteurs précis : ils l'emportent sur le style général des boutons */
.ecran-chargement:not(.hors-ligne) .ecran-chargement-aide,
.ecran-chargement:not(.hors-ligne) .ecran-chargement-reessayer { display: none; }
.ecran-chargement.hors-ligne .ecran-chargement-message { color: var(--texte); font-size: 1.1rem; }
.ecran-chargement.hors-ligne .ecran-chargement-aide { display: block; margin: 0; max-width: 260px; color: var(--texte-doux); }
.ecran-chargement.hors-ligne .ecran-chargement-reessayer { display: inline-flex; margin-top: 14px; min-width: 180px; justify-content: center; }

.filtres-rapides {
  display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 4px 12px 8px 2px; margin-bottom: -4px;
}
.filtres-rapides::-webkit-scrollbar { display: none; }
.groupe-puces { display: flex; gap: 8px; }
.separateur-puces { flex: none; width: 1px; height: 26px; background: var(--bordure); margin: 0 2px; }

.puce {
  flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 7px 15px;
  border: 0; border-radius: 999px; background: var(--fond); color: var(--texte);
  font-weight: 800; font-size: .92rem; box-shadow: var(--ombre-flottante); white-space: nowrap;
}
.puce[aria-checked="true"], .puce[aria-pressed="true"] { background: var(--actif); color: var(--actif-texte); }
.puce-enseigne { font-weight: 700; }
/* Dans la fiche (signalement), les puces sont posées sur un fond uni : ombre plus discrète */
.feuille .puce { box-shadow: none; border: 1.5px solid var(--bordure); }
.feuille .puce[aria-checked="true"] { border-color: var(--actif-vif); }
.feuille .groupe-puces { flex-wrap: wrap; }

/* --- Boutons ronds flottants (à droite, au-dessus du panneau) ------------------------ */

.boutons-flottants {
  position: fixed; right: 12px; z-index: 10;
  bottom: calc(var(--panneau-visible) + 12px);
  display: grid; gap: 10px; transition: bottom .3s cubic-bezier(.2, .8, .2, 1), opacity .2s;
}
.bouton-rond {
  display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%;
  background: var(--fond); color: var(--texte); box-shadow: var(--ombre-flottante);
}
.bouton-rond .icone { width: 22px; height: 22px; }
.bouton-rond-accent { color: var(--lien); }
/* Panneau en plein écran, ou boutons qui toucheraient la barre du haut (petit écran) : ils s'effacent */
body:has(.panneau[data-position="plein"]) .boutons-flottants,
body.flottants-masques .boutons-flottants { opacity: 0; pointer-events: none; }
body.flottants-compacts #bouton-recentrer, body.flottants-compacts #boussole { display: none; }
body.flottants-minimal #bouton-localiser { display: none; }

/* --- Panneau du bas -------------------------------------------------------------------- */

/* Invisible tant qu'il n'est pas à sa place : pas de « saut » de son contenu au démarrage */
.panneau:not(.place) { visibility: hidden; }
.panneau {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; flex-direction: column;
  background: var(--fond-panneau); border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 24px rgba(16, 24, 40, .16);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  touch-action: none; /* réduit / moitié : glisser le doigt déplace le panneau */
  will-change: transform;
}
.panneau.sans-animation { transition: none; }
.panneau[data-position="plein"] { touch-action: auto; border-radius: 20px 20px 0 0; }

.poignee {
  flex: none; display: grid; place-items: center; width: 100%; height: 44px; margin-bottom: -14px; /* zone de 44 px, même place qu'avant */
  border: 0; background: none; padding: 0; touch-action: none;
}
.poignee span { width: 42px; height: 5px; border-radius: 99px; background: var(--surface-2); }

.panneau-contenu {
  flex: 1; overflow: hidden; padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.panneau[data-position="plein"] .panneau-contenu { overflow-y: auto; }

/* minmax(0, 1fr) : un long texte sur une ligne (« Rechercher une ville… ») ne peut pas élargir l'en-tête */
.panneau-tete { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-bottom: 6px; touch-action: none; }

.champ-recherche {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 16px;
  border: 0; border-radius: 16px; background: var(--surface); color: var(--texte-doux);
  font-weight: 600; text-align: left;
}
.champ-recherche .icone { color: var(--texte-faible); }
.champ-recherche.rempli { color: var(--texte); font-weight: 800; }
.champ-recherche.rempli .icone { color: var(--lien); }
.champ-recherche span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ma station / Mes stations (favoris), en haut du panneau : visible même replié */
.mes-stations { display: grid; gap: 8px; }
.mes-stations:empty { display: none; }
.etiquette-mes-stations { margin: 0; color: var(--texte-doux); font-size: .85rem; font-weight: 800; }
.ma-station {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 60px; padding: 8px 14px; border: 1.5px solid var(--bordure); border-radius: 16px;
  background: var(--fond); text-align: left;
}
.ma-station-texte { display: grid; gap: 4px; min-width: 0; }
.ma-station-nom { display: flex; align-items: center; gap: 6px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ma-station-nom .icone { flex: none; width: 1em; height: 1em; color: var(--lien); }
.ma-station-lieu { overflow: hidden; text-overflow: ellipsis; color: var(--texte-doux); font-weight: 600; font-size: .9rem; }
.ma-station-detail { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ma-station-detail .badge { flex: none; }
.ma-station-heure { color: var(--texte-doux); font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-station-prix { flex: none; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lien-toutes { justify-self: start; padding: 4px 2px; border: 0; background: none; color: var(--lien); font-weight: 800; }
.liste-mes-stations { display: grid; gap: 8px; margin-bottom: 12px; }
.encart-ajouter {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px;
  border: 1.5px dashed var(--bordure); border-radius: 16px; background: var(--actif-doux);
  color: var(--texte); text-align: left; line-height: 1.3;
}
.encart-ajouter .icone { flex: none; width: 22px; height: 22px; color: var(--lien); }

/* « Ajouter à mes stations ? » : carte en haut de l'écran, devant tout */
.proposition {
  inset: auto; margin: 0; /* annule le style par défaut des « popover » */
  position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%);
  z-index: 3000; width: min(420px, calc(100% - 32px)); padding: 14px 16px; border: 0; border-radius: 18px;
  background: var(--fond); color: var(--texte); box-shadow: var(--ombre-forte);
}
.proposition p { margin: 0 0 12px; font-weight: 600; line-height: 1.35; }
.proposition-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.proposition-boutons button { justify-content: center; min-height: 46px; }
.statut-texte-confirme, .statut-texte-probable { color: var(--ok); }
.statut-texte-a_confirmer { color: var(--a-confirmer); }
.statut-texte-incertain { color: var(--attention); }
.statut-texte-rupture { color: var(--rupture); }
.statut-texte-inconnu { color: var(--texte-doux); }

.reglages {
  /* Les réglages passent à la ligne : pas de défilement horizontal (seule la ligne de catégories défile) */
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 2px 0 6px;
}
.reglages::-webkit-scrollbar { display: none; }
.reglages > * { flex: none; }

.ligne-autonomie {
  display: flex; align-items: center; gap: 6px; min-height: 44px;
  padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--surface); font-size: .92rem;
}
.ligne-autonomie label { font-weight: 800; }
.ligne-autonomie input {
  width: 3.6em; min-height: 44px; padding: 2px 6px; text-align: center; font-weight: 800; font-size: 16px; /* 16 px : pas de zoom sur iPhone */
  border: 0; border-radius: 999px; background: var(--fond); font-variant-numeric: tabular-nums;
}
.ligne-autonomie > span { font-weight: 700; color: var(--texte-doux); padding-right: 8px; }
.ligne-autonomie .bouton-icone { width: 44px; height: 44px; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.aide { color: var(--texte-doux); font-size: .85rem; margin: 0; font-weight: 500; }

.titre-liste { margin: 18px 0 0; font-size: 1.2rem; scroll-margin-top: 8px; }

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

.bouton-principal, .bouton-secondaire {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 18px; border-radius: 16px; font-weight: 800;
  text-decoration: none; letter-spacing: -.01em;
}
.bouton-principal { border: 0; background: var(--accent); color: var(--accent-texte); box-shadow: 0 6px 16px var(--corail-actif-ombre); }
.bouton-principal:active { background: var(--accent-fort); }
.bouton-principal:disabled { opacity: .55; }
/* Boutons de la couleur du contexte (aujourd'hui : la couleur de la catégorie, voir data-categorie plus bas).
   « + » et « Publier » restent au vert de la marque partout. */
#bouton-meilleur, #meilleur .bouton-principal, #contenu-station .bouton-principal, .bouton-actif {
  background: var(--actif); color: var(--actif-texte); box-shadow: 0 6px 16px var(--actif-ombre);
}
#bouton-meilleur { background: var(--vert-actif); color: var(--vert-actif-texte); box-shadow: 0 6px 16px var(--vert-actif-ombre); }
.bouton-secondaire { border: 1.5px solid var(--bordure); background: var(--fond); color: var(--texte); }
.bouton-geant { width: 100%; min-height: 56px; font-size: 1.1rem; border-radius: 18px; }

.bouton-icone {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: var(--surface); color: var(--texte-doux);
}

/* --- Statuts : couleur + icône + texte (jamais la couleur seule) ---------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 7px; border-radius: 999px; font-size: .85rem; font-weight: 800; white-space: nowrap;
}
.statut-disponible, .statut-confirme { color: var(--ok); background: var(--ok-fond); }
/* Probable : même vert, mais en contour (moins affirmé que Confirmé) */
.statut-probable { color: var(--ok); background: transparent; box-shadow: inset 0 0 0 1.5px var(--ok); }
.statut-a_confirmer { color: var(--a-confirmer); background: var(--a-confirmer-fond); }
.statut-incertain { color: var(--attention); background: var(--attention-fond); }
.statut-rupture { color: var(--rupture); background: var(--rupture-fond); }
.statut-inconnu { color: var(--inconnu); background: var(--inconnu-fond); }

/* Bonne affaire : couleur du contexte (verte pour le carburant) */
.badge-affaire { color: var(--actif-lien); background: var(--actif-doux); }

.etiquette-neutre {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px;
  background: var(--surface); color: var(--texte-doux); font-size: .8rem; font-weight: 700;
}

/* --- Carte « meilleur choix » -------------------------------------------------------- */

.carte-meilleur {
  margin: 14px 0 4px; padding: 16px; border-radius: 22px;
  border: 1.5px solid var(--actif-trait); background: var(--fond-panneau); box-shadow: var(--ombre-forte);
}
.surtitre {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px;
  color: var(--lien); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em;
}

.meilleur-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.meilleur-tete h2 { margin: 0; font-size: 1.5rem; }
.meilleur-tete p { margin: 4px 0 0; color: var(--texte-doux); font-size: .92rem; }

.prix-grand { font-size: 2.2rem; font-weight: 800; line-height: 1; white-space: nowrap; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.prix-grand small { font-size: .85rem; font-weight: 700; color: var(--texte-doux); letter-spacing: 0; }

/* Unité « €/L » après un prix, plus petite que le prix */
.unite { font-size: .62em; font-weight: 700; color: var(--texte-doux); letter-spacing: 0; white-space: nowrap; }

.ligne-statut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: .92rem; }
.raison { margin: 8px 0; color: var(--texte-doux); font-size: .92rem; }
.economie {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px;
  background: var(--actif-doux); color: var(--actif-lien); font-weight: 800;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.actions > * { flex: 1 1 140px; }

.autres-choix { margin-top: 12px; border-top: 1px solid var(--bordure); padding-top: 4px; }
.autres-choix summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; color: var(--texte-doux); }
.autres-choix ol { margin: 0; padding: 0; list-style: none; }
.autres-choix button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left;
  min-height: 48px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--bordure); background: none; font-weight: 700;
}
.autres-choix strong { font-variant-numeric: tabular-nums; }
.autres-choix li:last-child button { border-bottom: 0; }

/* --- Liste ------------------------------------------------------------------------------ */

.champ-rayon {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px 0 14px; border-radius: 999px;
  background: var(--surface); font-weight: 800; font-size: .92rem;
}
.champ-rayon select { min-height: 36px; border: 0; border-radius: 999px; padding: 2px 8px; }
.champ-rayon select, .champ {
  min-height: 44px; font-size: 16px; padding: 6px 12px; border: 1.5px solid var(--bordure); border-radius: 12px;
  background: var(--fond); color: var(--texte); font-weight: 700;
}
.champ { width: 100%; }

.interrupteur {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); font-weight: 800; font-size: .92rem; white-space: nowrap;
}
.interrupteur input { width: 22px; height: 22px; accent-color: var(--accent); }

.etat { color: var(--texte-doux); margin: 4px 0 4px; font-size: .9rem; font-weight: 600; }

.liste { list-style: none; margin: 0 0 16px; padding: 0; }

.separateur-liste {
  display: flex; align-items: center; gap: 6px; padding: 18px 2px 6px;
  color: var(--texte-faible); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}

.station {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; text-align: left;
  padding: 14px 6px; border: 0; border-bottom: 1px solid var(--bordure); border-radius: 0; background: none;
}
.station.actif { background: var(--actif-doux); border-radius: 12px; }
.station-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.station-nom { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.station-nom .icone { color: var(--lien); width: 1em; height: 1em; }
.station-adresse { color: var(--texte-doux); font-size: .9rem; }
.station-prix {
  grid-row: 1 / span 2; grid-column: 2; align-self: start; text-align: right;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.station-prix small { display: block; font-size: .8rem; font-weight: 700; color: var(--texte-doux); letter-spacing: 0; }
.station-prix small.moins-cher { color: var(--lien); }
.station-bas {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px;
  font-size: .85rem; font-weight: 600; color: var(--texte-doux);
}

/* Rupture : jamais en tête, regroupée en bas et grisée */
.station-rupture { opacity: .5; filter: grayscale(1); }

/* --- Feuilles modales (fiche, lieu, itinéraire) ------------------------------------------ */

.feuille {
  width: 100%; max-width: 600px; max-height: 90vh; margin: auto auto 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  border: 0; border-radius: 26px 26px 0 0; background: var(--fond-panneau); color: var(--texte);
  overflow-y: auto; box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
}
.feuille::before { /* poignée */
  content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: var(--surface-2);
}
.feuille::backdrop { background: rgba(10, 14, 22, .5); }
@media (min-width: 700px) { .feuille { margin: auto; border-radius: 26px; } }

.feuille-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.feuille-tete h2 { margin: 0; font-size: 1.6rem; }
.feuille-tete p { margin: 4px 0 0; color: var(--texte-doux); }

.etiquette { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-weight: 800; }

.resultats { list-style: none; margin: 8px 0 0; padding: 0; }
.resultats button {
  width: 100%; min-height: 52px; padding: 10px 6px; text-align: left; display: flex; justify-content: space-between; align-items: center;
  border: 0; border-bottom: 1px solid var(--bordure); background: none; font-weight: 700;
}

.pile-boutons { display: grid; gap: 10px; }

/* Signalement refusé : encart bien visible, avec quoi faire */
.refus {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; padding: 14px 16px;
  border: 1.5px solid var(--attention); border-radius: 16px; background: var(--attention-fond);
}
.refus > .icone { flex: none; width: 26px; height: 26px; margin-top: 1px; color: var(--attention); }
.refus strong { display: block; font-size: 1.05rem; }
.refus p { margin: 4px 0 0; line-height: 1.4; }
.verification-position { display: flex; align-items: center; gap: 10px; margin: 8px 0 18px; font-weight: 700; color: var(--texte-doux); }
.verification-position .icone { color: var(--lien); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.actions-fiche { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.actions-fiche .bouton-principal { grid-column: 1 / -1; }
.actions-fiche .bouton-secondaire { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: .85rem; }
.actions-fiche .bouton-secondaire .icone { width: 1.35em; height: 1.35em; color: var(--lien); }
.actions-fiche [aria-pressed="true"] { border-color: var(--actif-trait); background: var(--actif-doux); }

.encart { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-weight: 600; }
.encart .icone { color: var(--texte-doux); }
details.encart { display: block; }
details.encart summary { cursor: pointer; font-weight: 800; }

.carburants-fiche { list-style: none; margin: 0; padding: 0; }
.carburant-fiche { padding: 14px 4px; border-bottom: 1px solid var(--bordure); }
.carburant-fiche.choisi { margin: 0 -10px; padding: 14px 14px; border: 0; border-radius: 16px; background: var(--actif-doux); }
.carburant-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.carburant-tete strong { font-size: 1.1rem; font-weight: 800; }
.carburant-prix { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.carburant-texte { margin: 4px 0 2px; font-weight: 600; }
.details { margin: 6px 0 0; padding: 0; list-style: none; color: var(--texte-doux); font-size: .9rem; display: grid; gap: 4px; }
.details li { display: flex; align-items: center; gap: 7px; }
.details .icone { color: var(--texte-faible); }

.titre-section { margin: 22px 0 8px; font-size: 1.05rem; }
.signalements { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; color: var(--texte-doux); }
.signalements li { display: flex; align-items: center; gap: 7px; }
.signalements .icone.statut-disponible, .signalements .icone.statut-rupture { background: none; }

/* Signalement : très gros boutons */
.choix-signalement { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.gros-choix {
  min-height: 108px; padding: 12px; border-radius: 20px; border: 2px solid transparent;
  font-size: 1.15rem; font-weight: 800; display: grid; place-items: center; gap: 6px;
}
.gros-choix .icone { width: 2.2rem; height: 2.2rem; }
.gros-choix.statut-disponible { border-color: var(--ok); }
.gros-choix.statut-rupture { border-color: var(--rupture); }
/* Signaler une erreur : discret en bas de la fiche, puis 3 choix */
.lien-erreur {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin: 18px 0 4px;
  padding: 12px; border: 0; background: none; color: var(--texte-doux); font-weight: 700; font-size: .92rem;
}
.lien-erreur .icone { width: 1.05em; height: 1.05em; }
.choix-erreur { display: grid; gap: 10px; margin: 10px 0 14px; }
.choix-erreur button {
  display: grid; gap: 3px; width: 100%; min-height: 58px; padding: 10px 16px; text-align: left;
  border: 1.5px solid var(--bordure); border-radius: 16px; background: var(--fond); color: var(--texte);
}
.choix-erreur button span { color: var(--texte-doux); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choix-erreur button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-doux); }
.detail-erreur { display: grid; gap: 6px; margin-bottom: 14px; }
.detail-erreur label { font-weight: 800; }
.detail-erreur .aide { margin: 0; }
.choix-file { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.choix-file button { min-height: 62px; border-radius: 16px; border: 1.5px solid var(--bordure); background: var(--fond); font-weight: 800; }
.choix-file button:last-child { grid-column: 1 / -1; color: var(--texte-doux); }

/* Réglages : choix de l'apparence */
.choix-apparence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choix-apparence button {
  display: grid; justify-items: center; gap: 6px; min-height: 76px; padding: 10px 4px;
  border: 1.5px solid var(--bordure); border-radius: 16px; background: var(--fond); font-weight: 800; font-size: .9rem;
}
.choix-apparence button .icone { width: 22px; height: 22px; color: var(--texte-doux); }
.choix-apparence button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-doux); color: var(--lien); }
.choix-apparence button[aria-checked="true"] .icone { color: var(--lien); }

/* Installer l'appli (réglages) */
.installer { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--bordure); }
.installer .bouton-principal { width: 100%; justify-content: center; }
.installer .aide { margin: 10px 0 0; }
.installer-ok { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.etapes-installation { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.etapes-installation li { display: flex; align-items: center; gap: 12px; line-height: 1.35; }
.etapes-installation .icone, .installer-ok .icone {
  flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 10px;
  background: var(--accent-doux); color: var(--lien);
}

/* --- Écran d'accueil (premier lancement) et choix du lieu ------------------------------ */

.feuille.premier-lancement { max-height: 100dvh; min-height: 88dvh; }
.feuille.premier-lancement .fermer { visibility: hidden; } /* on choisit d'abord un lieu */
#titre-lieu { outline: none; } /* reçoit la sélection à l'ouverture, sans anneau */

.separateur-ou { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--texte-faible); font-weight: 700; font-size: .85rem; }
.separateur-ou::before, .separateur-ou::after { content: ""; flex: 1; height: 1px; background: var(--bordure); }
.zone-recherche .etiquette { margin-top: 0; }

.aide-position { margin: 14px 0 0; padding: 14px; border-radius: 16px; background: var(--surface); font-size: .92rem; }
.aide-position > p { margin: 0 0 8px; }
.aide-position-titre { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--attention); }
.aide-position details { margin-top: 6px; border-top: 1px solid var(--bordure); padding-top: 6px; }
.aide-position summary { cursor: pointer; font-weight: 800; min-height: 40px; display: flex; align-items: center; }
.aide-position ol { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 6px; }

/* Navigateur intégré (Instagram, TikTok…) */
.bandeau-integre {
  margin: 0 0 14px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--accent-trait);
  background: var(--accent-doux); font-size: .92rem;
}
.bandeau-integre p { margin: 0 0 6px; }
.bandeau-titre { display: flex; align-items: flex-start; gap: 8px; font-weight: 800; color: var(--lien); }
.bandeau-titre .icone { margin-top: .15em; }
.bandeau-integre ol { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 4px; }
.bandeau-integre .bouton-secondaire { width: 100%; min-height: 44px; }
.bandeau-integre .aide { margin-top: 10px; }
.bandeau-compact { margin: 0; padding: 10px 12px; font-size: .85rem; }
.bandeau-compact p { margin: 0; }
.bandeau-compact .bandeau-titre { margin-bottom: 2px; }
.lien-bouton { border: 0; padding: 0; background: none; color: var(--lien); font-weight: 800; text-decoration: underline; }

/* Fiche : carburants non vendus */
.non-vendus { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--texte-doux); font-size: .92rem; }
.non-vendus .icone { margin-top: .15em; color: var(--texte-faible); }

/* « Tu y étais ? » */
.retour-question { margin: 0 0 6px; font-size: 1.1rem; outline: none; }
.retour-aide { margin-top: 12px; text-align: center; }

/* --- Divers --------------------------------------------------------------------------- */

.toast {
  inset: auto; margin: 0; border: 0; /* annule le style par défaut des « popover » */
  position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%);
  z-index: 3000; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--texte); color: var(--fond); font-weight: 700; box-shadow: var(--ombre-forte);
}

.pied { margin: 8px 0 0; color: var(--texte-faible); font-size: .75rem; text-align: center; }
.pied a { color: inherit; }

.chargement { opacity: .6; }

/* --- Grand écran : panneau latéral fixe à gauche (comme Google Maps sur ordinateur) ------ */

@media (min-width: 900px) {
  .panneau {
    top: 128px; bottom: 16px; left: 16px; /* sous les deux lignes de puces du haut */ right: auto; width: 410px; height: auto !important;
    transform: none !important; border-radius: 22px; touch-action: auto;
  }
  .poignee { display: none; }
  .panneau-contenu { overflow-y: auto; padding-top: 16px; }
  .barre-haut { padding-left: 16px; }
  .boutons-flottants { bottom: 24px; right: 16px; }
  body:has(.panneau[data-position="plein"]) .boutons-flottants { opacity: 1; pointer-events: auto; }
}

/* --- Catégories et annonces ------------------------------------------------------------- */

/* Barre du haut : catégories, puis les sous-filtres de la catégorie choisie */
.barre-haut { align-items: flex-start; }
.pile-filtres { flex: 1; min-width: 0; display: grid; gap: 2px; }

/* Ce qui ne sert qu'au carburant, ou qu'aux annonces (selon la catégorie choisie) */
body:not([data-mode="carburant"]) .seulement-carburant { display: none !important; }
body:not([data-mode="annonces"]) .seulement-annonces { display: none !important; }

/* Puce de catégorie choisie : ancien style par famille, remplacé plus bas par la couleur de la catégorie */
.puce-categorie[aria-checked="true"].couleur-vert { background: var(--vert-actif); color: var(--vert-actif-texte); }
.puce-categorie[aria-checked="true"].couleur-corail { background: var(--corail-actif); color: var(--corail-actif-texte); }
.puce-categorie[aria-checked="true"].couleur-foret { background: var(--foret-actif); color: var(--foret-actif-texte); }

/* Moment : en cours (vert actif) / à venir (gris) — toujours avec une icône et un texte */
.moment-en_cours { color: var(--ok); background: var(--ok-fond); }
.moment-a_venir { color: var(--texte-faible); background: var(--surface); }
.etiquette-neutre.verifie { color: var(--ok); }
.etiquette-neutre .icone { width: 13px; height: 13px; }

/* Prix d'annonce : « Gratuit » ou « Prix non indiqué » à la place du nombre */
.prix-mot { font-size: 1rem; font-weight: 800; }
.prix-mot.gratuit { color: var(--ok); }
.prix-mot.non-indique { color: var(--texte-faible); font-weight: 700; }

/* Pastilles d'annonces sur la carte */

/* Fiche annonce */
.prix-annonce { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 14px 0 6px; }
.prix-annonce .prix-mot { font-size: 1.6rem; }
.dates-annonce { display: flex; align-items: center; gap: 6px; margin: 6px 0 14px; color: var(--texte-doux); font-weight: 700; }

/* --- Ajouter un bon plan, « Toujours valable ? » (étape 3) ------------------------------- */

/* Bouton « + » : vert de la marque, comme les boutons principaux (signe foncé, jamais blanc) */
.bouton-rond-plus { background: var(--accent); color: var(--accent-texte); }
.bouton-rond-plus .icone { width: 26px; height: 26px; stroke-width: 2.5; }

.bouton-large { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.champ-adresse { margin-top: 10px; }
.lieu-choisi {
  display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 12px;
  border-radius: 14px; background: var(--ok-fond); color: var(--texte);
}
.lieu-choisi .icone { flex: none; color: var(--ok); margin-top: 2px; }
.lieu-choisi small { display: block; margin-top: 2px; color: var(--texte-doux); font-weight: 600; }

.ligne-prix { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; margin-top: 12px; }
.ligne-prix label, .ligne-dates label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.ligne-prix label[hidden] { display: none; }
/* Sans quantité (entrée, objet) : le prix prend toute la largeur */
.ligne-prix:has(#ajout-bloc-quantite[hidden]) > label:first-child { grid-column: 1 / -1; }
.champ-unite { display: flex; align-items: center; gap: 6px; }
/* width: 0 + flex-grow : le champ prend la place qui reste, sans déborder de sa colonne */
.champ-unite .champ { flex: 1 1 auto; width: 0; min-width: 0; }
.champ-unite select.champ { flex: none; width: 5.2em; padding-left: 8px; padding-right: 4px; }
.apercu-prix { grid-column: 1 / -1; margin: 0; color: var(--ok); font-weight: 800; min-height: 1.4em; }
.ligne-dates { display: grid; gap: 12px; margin: 18px 0 14px; } /* l'une sous l'autre : lisible sur mobile */
.ligne-dates .champ { min-width: 0; }
.erreur-formulaire {
  margin: 0 0 12px; padding: 12px; border-radius: 12px;
  background: var(--rupture-fond); color: var(--rupture); font-weight: 700;
}
#formulaire-annonce .bouton-geant { width: 100%; }

/* Fiche annonce : confirmation et « Toujours valable ? » */
.confirmation-annonce { display: flex; align-items: center; gap: 6px; margin: -6px 0 14px; color: var(--texte-faible); font-weight: 700; }
.confirmation-annonce.confirme { color: var(--ok); }
.bloc-valable { margin: 4px 0 12px; }
p.bloc-valable { display: flex; align-items: center; gap: 6px; }
.choix-valable { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix-valable .gros-choix { min-height: 76px; }
.choix-valable .gros-choix .icone { width: 1.7rem; height: 1.7rem; }
.gros-choix[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }

/* --- Dons et créateurs, mobile d'abord (étape 4) ------------------------------------------------ */

/* « Masquer les réservés » : seulement dans les catégories où l'on peut réserver */
body:not([data-reservable="1"]) .seulement-reservable { display: none !important; }

/* Petits écrans (iPhone SE, Android 360 px) : les 3 premières catégories tiennent en entier */
@media (max-width: 400px) {
  .barre-haut { gap: 6px; padding-left: 10px; }
  .filtres-rapides { gap: 6px; }
  .groupe-puces { gap: 6px; }
  .puce { padding: 7px 12px; font-size: .9rem; }
}

/* Réservé : badge gris avec icône et texte, annonce un peu effacée (mais lisible) */
.disponibilite-reserve { color: var(--texte-doux); background: var(--surface-2); }
.annonce-reservee .station-nom, .annonce-reservee .station-prix { color: var(--texte-doux); }

/* « Sur place uniquement » et « adresse approximative » */
.encadre-sur-place {
  display: grid; gap: 6px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px;
  background: var(--accent-doux); color: var(--texte); font-weight: 700; font-size: .95rem;
}
.encadre-sur-place p { margin: 0; }
.encadre-sur-place p, p.encadre-sur-place { display: flex; align-items: flex-start; gap: 8px; }
.encadre-sur-place .icone { flex: none; margin-top: 2px; color: var(--accent-fort); }
p.encadre-sur-place { margin: 0 0 12px; }
.note-approximative {
  display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 6px;
  color: var(--attention); font-weight: 700; font-size: .92rem;
}
.note-approximative .icone { flex: none; margin-top: 2px; }

/* Formulaire : description, compteur, case à cocher, aide du prix */
textarea.champ { min-height: 88px; padding: 10px 12px; line-height: 1.4; resize: vertical; font-weight: 600; }
.compteur { margin: 4px 2px 0; text-align: right; color: var(--texte-faible); font-size: .85rem; font-weight: 700; }
.facultatif { color: var(--texte-faible); font-weight: 600; font-size: .85rem; }
.case-a-cocher {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 10px 0 0; padding: 10px 2px;
  font-weight: 800; cursor: pointer;
}
.case-a-cocher input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.case-a-cocher small { display: block; margin-top: 2px; color: var(--texte-doux); font-weight: 600; }
.aide-champ { color: var(--texte-doux); font-weight: 600; font-size: .85rem; }
[data-prix-mode][hidden] { display: none; }

/* Barre fixée en bas de la feuille, à portée du pouce : « Publier », et les boutons de l'auteur.
   Elle recouvre le bas de la feuille (marges négatives = espace intérieur de la feuille). */
.barre-publier, .barre-auteur {
  position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); z-index: 2;
  margin: 14px -18px calc(-22px - env(safe-area-inset-bottom));
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--fond-panneau); box-shadow: 0 -8px 18px rgba(21, 61, 50, .10);
}
.barre-publier .erreur-formulaire { margin-bottom: 10px; }
.barre-auteur { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.barre-auteur button { min-height: 52px; padding: 8px 10px; font-size: .95rem; line-height: 1.2; text-align: center; }
/* Le champ qui reçoit le clavier n'est jamais caché derrière la barre « Publier » */
#feuille-ajouter { scroll-padding-bottom: 120px; }

/* Itinéraire vers une adresse approximative */
#note-itineraire { margin: 0 0 12px; }

/* --- Couleur du contexte ------------------------------------------------------------------------
   data-couleur (sur body, la fiche ou le formulaire) : l'ancien réglage par famille. Les noms « corail »
   et « foret » sont restés dans le code, mais ce sont le vert de la marque et l'encre. Depuis le nouveau
   design, data-categorie (plus bas) donne à chaque catégorie sa propre couleur.
   --actif-vif : la couleur franche du contexte (traits, bordures), lisible sur le fond. */
:root { --actif: var(--corail-actif); --actif-texte: var(--corail-actif-texte); --actif-ombre: var(--corail-actif-ombre);
  --actif-doux: var(--accent-doux); --actif-trait: var(--accent-trait); --actif-lien: var(--lien); --actif-vif: var(--accent); }
[data-couleur="vert"] { --actif: var(--vert-actif); --actif-texte: var(--vert-actif-texte); --actif-ombre: var(--vert-actif-ombre);
  --actif-doux: var(--ok-fond); --actif-trait: var(--ok); --actif-lien: var(--ok); --actif-vif: var(--ok); }
[data-couleur="corail"] { --actif: var(--corail-actif); --actif-texte: var(--corail-actif-texte); --actif-ombre: var(--corail-actif-ombre);
  --actif-doux: var(--accent-doux); --actif-trait: var(--accent-trait); --actif-lien: var(--lien); --actif-vif: var(--accent); }
[data-couleur="foret"] { --actif: var(--foret-actif); --actif-texte: var(--foret-actif-texte); --actif-ombre: rgba(21, 61, 50, .2);
  --actif-doux: var(--surface); --actif-trait: var(--bordure); --actif-lien: var(--texte); --actif-vif: var(--texte); }


/* --- Bouton « Filtres » du carburant -------------------------------------------------------------- */
.puce-filtres { display: inline-flex; align-items: center; gap: 6px; }
.puce-filtres .icone { width: 18px; height: 18px; }

/* --- « Autour de toi » ---------------------------------------------------------------------------- */
.groupe-autour { list-style: none; margin: 0 0 6px; padding: 14px 0 4px; border-bottom: 1px solid var(--bordure); }
.groupe-tete {
  display: flex; align-items: center; gap: 8px; margin: 0 0 2px;
  font-weight: 800; font-size: .95rem; color: var(--actif-texte-groupe, var(--texte));
}
.groupe-tete .icone-categorie {
  flex: none; width: 32px; height: 32px; padding: 6px; border-radius: 10px;
  background: var(--actif); color: var(--actif-texte); stroke-width: 2.2;
}
.cartes-autour { list-style: none; margin: 0; padding: 0; }
.cartes-autour .station { border-left: 4px solid var(--actif-vif); padding-left: 12px; border-bottom: 0; border-radius: 0 12px 12px 0; }
.cartes-autour li + li .station { margin-top: 6px; }
.economie-plein {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px;
  background: var(--ok-fond); color: var(--ok); font-weight: 800; font-size: .85rem;
}
.economie-plein .icone { width: 13px; height: 13px; }
.voir-tout {
  display: flex; align-items: center; justify-content: flex-end; width: 100%; min-height: 44px; padding: 0 4px;
  border: 0; background: none; color: var(--texte); font-weight: 800; font-size: .92rem;
}
.voir-tout span { color: var(--texte-doux); font-weight: 700; margin-left: 4px; }

/* Repères « Autour de toi » : couleur et icône de la catégorie */

/* --- Hors ligne ------------------------------------------------------------------------------------------ */
/* Sous les catégories, en haut de l'écran : visible quelle que soit la position du panneau */
.bandeau-hors-ligne {
  display: flex; align-items: flex-start; gap: 8px; margin: 2px 12px 0 2px; padding: 8px 12px; border-radius: 12px;
  box-shadow: var(--ombre-flottante);
  background: var(--attention-fond); color: var(--texte); font-weight: 700; font-size: .92rem;
}
.bandeau-hors-ligne[hidden] { display: none; }
.bandeau-hors-ligne .icone { flex: none; margin-top: 1px; color: var(--attention); }
/* Pas de recommandation sur des prix peut-être périmés */
body.hors-ligne #bouton-meilleur, body.hors-ligne #meilleur, body.hors-ligne .economie-plein,
body.hors-ligne .economie, body.hors-ligne .badge-affaire { display: none !important; }
/* Disponibilité : badges grisés (l'icône et le texte restent lisibles) */
body.hors-ligne .badge { color: var(--texte-doux) !important; background: var(--surface-2) !important; box-shadow: none !important; }
body.hors-ligne .repere { filter: grayscale(1); }
/* Actions qui ont besoin du réseau */
body.hors-ligne #bouton-ajouter, body.hors-ligne [data-action=signaler], body.hors-ligne [data-action=erreur],
body.hors-ligne [data-action-annonce=oui], body.hors-ligne [data-action-annonce=non],
body.hors-ligne [data-action-annonce=signaler], body.hors-ligne .barre-auteur button { opacity: .5; }

/* --- Bandeau « Installe Krobien » --------------------------------------------------------------------- */
.bandeau-installer {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px;
  padding: 10px 6px 10px 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--bordure);
}
.bandeau-installer[hidden] { display: none; }
.bandeau-installer-titre { margin: 0; font-weight: 800; }
.bandeau-installer-aide { margin: 2px 0 0; color: var(--texte-doux); font-size: .9rem; font-weight: 600; line-height: 1.35; }
.bandeau-installer .bouton-principal { min-height: 44px; padding: 8px 14px; }
.bandeau-installer .bouton-icone { background: none; }
.icone-en-ligne { width: 1.05em; height: 1.05em; vertical-align: -.18em; margin: 0 2px; }

/* --- Écrans : Accueil, Favoris, Profil, Bienvenue ; barre du bas (partie 2) -------------------------- */
:root {
  --hauteur-onglets: calc(62px + env(safe-area-inset-bottom)); /* barre du bas, barre d'accueil de l'iPhone comprise */
  --tuile: #ffffff;       /* tuiles et cartes de l'Accueil : blanc sur le fond gris clair */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) { --tuile: var(--fond-panneau); }
}
:root[data-theme="sombre"] { --tuile: var(--fond-panneau); }

/* La carte, sa barre du haut et le panneau ne s'affichent que sur une catégorie ou l'onglet Carte */
body:not([data-vue="carte"]):not([data-vue="categorie"]) :is(#carte, .barre-haut, .boutons-flottants, #panneau) { display: none; }
body[data-vue="carte"] #bouton-retour { display: none; }
body:not([data-vue="carte"]) .seulement-vue-carte { display: none !important; }
body[data-vue="bienvenue"] .barre-onglets { display: none; }

/* Le panneau et les boutons ronds se posent au-dessus de la barre du bas */
.panneau { bottom: var(--hauteur-onglets); }
.panneau-contenu { padding-bottom: 24px; }
.boutons-flottants { bottom: calc(var(--panneau-visible) + var(--hauteur-onglets) + 12px); }
@media (min-width: 900px) {
  .panneau { bottom: calc(16px + var(--hauteur-onglets)); }
  .boutons-flottants { bottom: calc(24px + var(--hauteur-onglets)); }
}

.vue {
  position: fixed; inset: 0; z-index: 5; overflow-y: auto; overscroll-behavior: contain;
  background: var(--fond);
}
.vue[hidden] { display: none; }
.page {
  max-width: 720px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--hauteur-onglets) + 28px);
}
.titre-page { margin: 8px 0 6px; font-size: 1.6rem; letter-spacing: -.025em; }

/* Barre du bas, à portée du pouce (centrée sur un grand écran) */
.barre-onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--hauteur-onglets);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
  padding: 4px max(4px, calc((100% - 560px) / 2)) env(safe-area-inset-bottom);
  background: var(--tuile); border-top: 1px solid var(--bordure);
}
.onglet {
  display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 54px; padding: 4px 0;
  border: 0; background: none; color: var(--texte-doux); font-size: .75rem; font-weight: 700;
}
.onglet .icone { width: 23px; height: 23px; }
.onglet[aria-current="page"] { color: var(--logo); font-weight: 800; }
.onglet-publier { color: var(--texte); }
.onglet-publier .rond {
  display: grid; place-items: center; width: 50px; height: 50px; margin-top: -20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-texte); box-shadow: 0 4px 12px var(--corail-actif-ombre);
}
.onglet-publier .rond .icone { width: 26px; height: 26px; stroke-width: 2.5; }

/* Catégorie ouverte depuis l'Accueil : flèche retour en haut à gauche */
.bouton-retour {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-top: 4px; border: 0;
  border-radius: 50%; background: var(--fond); color: var(--texte); box-shadow: var(--ombre-flottante);
}
.bouton-retour .icone { width: 22px; height: 22px; }

/* Onglet Carte : sélecteur compact de la catégorie affichée */
.puce-selecteur { display: inline-flex; align-items: center; gap: 7px; padding-left: 12px; }
.puce-selecteur .icone { width: 18px; height: 18px; }
.puce-selecteur .chevron { width: 16px; height: 16px; color: var(--texte-doux); }
.choix-categories { display: grid; gap: 8px; }
.choix-categorie {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px;
  border: 1.5px solid var(--bordure); border-radius: 16px; background: var(--fond-panneau); color: var(--texte);
  font-weight: 800; text-align: left;
}
.choix-categorie[aria-checked="true"] { border-color: var(--texte); background: var(--surface); }

/* Favoris et Profil */
.liste-favoris { display: grid; gap: 8px; }
.favoris-vide { margin: 48px auto 0; max-width: 22em; text-align: center; color: var(--texte-doux); font-weight: 600; }
.favoris-vide .icone { width: 40px; height: 40px; color: var(--texte-faible); }
.favoris-vide p { margin: 8px 0 0; }
.bloc-profil { margin-top: 22px; }
.bloc-profil > .etiquette { margin-top: 0; }
.pied-profil { margin-top: 10px; text-align: left; line-height: 1.6; }

/* Bienvenue (première ouverture) */
.vue-bienvenue { z-index: 40; }
.bienvenue {
  min-height: 100%; max-width: 480px; margin: 0 auto; display: grid; align-content: center; justify-items: center;
  gap: 6px; padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); text-align: center;
}
.bienvenue > img { border-radius: 22px; box-shadow: var(--ombre-forte); }
.bienvenue .marque-nom { margin-top: 12px; font-size: 2.2rem; }
.bienvenue .slogan { font-size: .95rem; }
.bienvenue-carte {
  width: 100%; margin-top: 26px; padding: 20px 18px 10px; border: 1.5px solid var(--bordure); border-radius: 22px;
  background: var(--tuile); display: grid; gap: 10px;
}
.bienvenue-carte h1 { margin: 0; font-size: 1.3rem; }
.bienvenue-carte p { margin: 0 0 6px; color: var(--texte-doux); font-weight: 600; }
.bienvenue-carte .bouton-geant { width: 100%; }
.lien-plus-tard {
  min-height: 44px; border: 0; background: none; color: var(--texte); font-weight: 800; text-decoration: underline;
  text-underline-offset: 3px;
}
.note-bienvenue { margin: 14px 0 0; color: var(--texte-doux); font-size: .85rem; font-weight: 600; }

/* --- Ville devinée (partie 3) : bandeau discret de l'Accueil ------------------------------------------- */
.bandeau-ville {
  display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 8px 12px;
  border-radius: 14px; background: var(--surface); color: var(--texte-doux); font-size: .9rem; font-weight: 600;
}
.bandeau-ville[hidden] { display: none; }
.bandeau-ville > .icone { flex: none; width: 18px; height: 18px; margin-top: 12px; color: var(--ok); }
.bandeau-ville p { margin: 0; line-height: 1.4; padding-top: 10px; }
.bandeau-ville strong { color: var(--texte); }
.bandeau-ville .lien-bouton { min-height: 44px; margin: -12px 0 -12px; padding: 0 4px; color: var(--lien); font-size: inherit; }
.credit-dbip { display: block; margin: 2px 0 6px; font-size: .75rem; font-weight: 600; }
.credit-dbip a { color: var(--texte-faible); }
.liste-confidentialite { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--texte-doux); font-size: .92rem; }
/* « Ma position » n'a pas marché : le message, bien lisible, juste au-dessus de la recherche de ville */
#info-localisation { margin: 10px 0 0; color: var(--texte); font-weight: 700; }

/* --- Invendus du jour (partie 4) ---------------------------------------------------------------------- */
/* « Jusqu'à 19 h » : l'heure de fin, bien visible */
.badge-jusqua { color: var(--attention); background: var(--attention-fond); }
.repere .heure-fin { font-weight: 700; opacity: .9; }
/* Alimentaire, Invendus du jour : « Réservé aux commerçants… » */
.encadre-commercants {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px;
  background: var(--attention-fond); color: var(--texte); font-weight: 700; font-size: .92rem; line-height: 1.35;
}
.encadre-commercants .icone { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--attention); }
.ligne-jusqua { margin: 14px 0 18px; }
.ligne-jusqua label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.ligne-jusqua .aide { margin: 6px 0 0; }

.ligne-dates[hidden], .ligne-jusqua[hidden], .encadre-commercants[hidden] { display: none; }

/* --- Nouveau design, partie 0 : dégradé de la marque et couleurs des catégories -------------------------
   Une couleur par catégorie, toujours la même (avec toujours la même icône) : vif (tuiles), vif2 (fin du
   dégradé), sur (texte posé sur le vif), texte (lisible sur le fond de la page), fond (badges pâles).
   Les Dons et les économies partagent le même vert : un don, c'est l'économie maximale. */
:root {
  --aurore: linear-gradient(135deg, #2bf5a0, #22d3ee 50%, #a78bfa);
  --carburant-vif: #7c3aed; --carburant-vif2: #5b21b6; --carburant-sur: #ffffff; --carburant-texte: #6d28d9; --carburant-fond: #f1ebfe;
  --lot-vif: #2563eb; --lot-vif2: #1d4ed8; --lot-sur: #ffffff; --lot-texte: #1d4ed8; --lot-fond: #e6eefe;
  --destockage-vif: #22d3ee; --destockage-vif2: #06b6d4; --destockage-sur: #0b0c10; --destockage-texte: #0e7490; --destockage-fond: #ddf7fb;
  --don-vif: #2bd97f; --don-vif2: #16c172; --don-sur: #0b0c10; --don-texte: #0f7a46; --don-fond: #ddf7e8;
  --brocante-vif: #ff9a2e; --brocante-vif2: #f97316; --brocante-sur: #0b0c10; --brocante-texte: #a84c06; --brocante-fond: #fff0dd;
  --sortie-vif: #ff5fa8; --sortie-vif2: #ec4899; --sortie-sur: #0b0c10; --sortie-texte: #be185d; --sortie-fond: #fee6f1;
  --createur-vif: #ffd43b; --createur-vif2: #facc15; --createur-sur: #0b0c10; --createur-texte: #854d0e; --createur-fond: #fff6cf;
  --sport-vif: #a3e635; --sport-vif2: #84cc16; --sport-sur: #0b0c10; --sport-texte: #3f6212; --sport-fond: #eefbd3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) { --carburant-texte: #c4b0ff; --carburant-fond: #241a3d; --lot-texte: #9dbeff; --lot-fond: #14213f; --destockage-texte: #67e3f5; --destockage-fond: #0c2b33; --don-texte: #5be3a0; --don-fond: #12301f; --brocante-texte: #ffb866; --brocante-fond: #35220c; --sortie-texte: #ff94c6; --sortie-fond: #3a1528; --createur-texte: #ffe066; --createur-fond: #33290a; --sport-texte: #bef264; --sport-fond: #1f2a10; }
}
:root[data-theme="sombre"] { --carburant-texte: #c4b0ff; --carburant-fond: #241a3d; --lot-texte: #9dbeff; --lot-fond: #14213f; --destockage-texte: #67e3f5; --destockage-fond: #0c2b33; --don-texte: #5be3a0; --don-fond: #12301f; --brocante-texte: #ffb866; --brocante-fond: #35220c; --sortie-texte: #ff94c6; --sortie-fond: #3a1528; --createur-texte: #ffe066; --createur-fond: #33290a; --sport-texte: #bef264; --sport-fond: #1f2a10; }
.cat-carburant { --cat: var(--carburant-vif); --cat2: var(--carburant-vif2); --cat-sur: var(--carburant-sur); --cat-texte: var(--carburant-texte); --cat-fond: var(--carburant-fond); }
.cat-lot { --cat: var(--lot-vif); --cat2: var(--lot-vif2); --cat-sur: var(--lot-sur); --cat-texte: var(--lot-texte); --cat-fond: var(--lot-fond); }
.cat-destockage { --cat: var(--destockage-vif); --cat2: var(--destockage-vif2); --cat-sur: var(--destockage-sur); --cat-texte: var(--destockage-texte); --cat-fond: var(--destockage-fond); }
.cat-don { --cat: var(--don-vif); --cat2: var(--don-vif2); --cat-sur: var(--don-sur); --cat-texte: var(--don-texte); --cat-fond: var(--don-fond); }
.cat-brocante { --cat: var(--brocante-vif); --cat2: var(--brocante-vif2); --cat-sur: var(--brocante-sur); --cat-texte: var(--brocante-texte); --cat-fond: var(--brocante-fond); }
.cat-sortie { --cat: var(--sortie-vif); --cat2: var(--sortie-vif2); --cat-sur: var(--sortie-sur); --cat-texte: var(--sortie-texte); --cat-fond: var(--sortie-fond); }
.cat-createur { --cat: var(--createur-vif); --cat2: var(--createur-vif2); --cat-sur: var(--createur-sur); --cat-texte: var(--createur-texte); --cat-fond: var(--createur-fond); }
.cat-sport { --cat: var(--sport-vif); --cat2: var(--sport-vif2); --cat-sur: var(--sport-sur); --cat-texte: var(--sport-texte); --cat-fond: var(--sport-fond); }
/* Icône d'une catégorie (tuiles de l'Accueil, bons plans, choix de la catégorie sur la carte) */
[class*="cat-"] .tuile-icone { background: var(--cat-fond); color: var(--cat-texte); }

/* Accueil (nouveau design) : en-tête vert de la marque, tuiles photo 2 par ligne, carburant du moment en
   violet, carte « Autour de toi » et bons plans avec photo. Sur PC : barre latérale, tuiles en grille,
   bons plans à gauche et carte à droite. */
.hero {
  padding: calc(12px + env(safe-area-inset-top)) 16px 20px; border-radius: 0 0 28px 28px;
  background: var(--cat, #0db561); color: var(--cat-sur, #0b0c10);
}
.hero-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.marque { display: flex; align-items: center; gap: 8px; min-width: 0; }
.repere-logo { flex: none; width: 24px; height: 32px; }
.marque-nom { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.hero .marque, .hero .marque-nom { color: #0b0c10; }
.hero-titre { margin: 10px 0 0; font-size: clamp(1.8rem, 8.4vw, 3.2rem); line-height: 1.04; letter-spacing: -.035em; }
.hero-sous-titre { margin: 6px 0 0; font-weight: 700; opacity: .88; }
.hero-ou { display: flex; gap: 8px; margin-top: 14px; }
.ville {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 0 14px;
  border: 0; border-radius: 16px; background: #fff; color: #0b0c10; font-weight: 800; font-size: .95rem;
  box-shadow: 0 4px 14px rgba(11, 12, 16, .16);
}
.ville #accueil-ville-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ville .icone { flex: none; width: 18px; height: 18px; color: #087a41; }
.ville .chevron { margin-left: auto; width: 16px; height: 16px; color: #4a5060; }
.autour-de-moi {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 50px; padding: 0 14px;
  border: 0; border-radius: 16px; background: #0b0c10; color: #fff; font-weight: 800; font-size: .95rem; white-space: nowrap;
}
@media (max-width: 380px) { .ville, .autour-de-moi { padding: 0 11px; } .ville .chevron { display: none; } }

/* Version de démo : une petite ligne discrète en haut à droite, le lien vers Meaux dedans */
.ligne-demo { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; font-weight: 700; }
.badge-demo { padding: 3px 8px; border-radius: 999px; background: #0b0c10; color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.ligne-demo .lien-bouton { min-height: 44px; padding: 0 2px; color: #0b0c10; font-size: inherit; text-underline-offset: 3px; }

.page.accueil { padding-top: 4px; }
.accueil .bandeau-installer, .accueil .bandeau-hors-ligne, .accueil .bandeau-ville { margin-top: 14px; }
.section-titre { margin: 24px 0 10px; font-size: 1.25rem; letter-spacing: -.02em; }
.section-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lien-section { min-height: 44px; padding: 0; border: 0; background: none; color: var(--lien); font-weight: 800; white-space: nowrap; }
.section-sous-titre { margin: -6px 0 10px; color: var(--texte-doux); font-weight: 600; font-size: .9rem; }

/* Tuile : la photo, le rond de la couleur de la catégorie, le nom et le nombre en blanc */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tuile {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end; width: 100%; height: 100%;
  aspect-ratio: 16 / 10.5; min-height: 96px; padding: 10px 12px; border: 0; border-radius: 20px;
  background: var(--cat, #0b0c10); color: #fff; text-align: left; box-shadow: var(--ombre);
}
.tuile-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.tuile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(11, 12, 16, .86) 0%, rgba(11, 12, 16, .35) 48%, transparent 75%);
}
.tuile .tuile-icone {
  display: grid; place-items: center; position: absolute; left: 9px; top: 9px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--cat); color: var(--cat-sur); box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}
.tuile .tuile-icone .icone { width: 19px; height: 19px; }
.tuile-nom { display: block; font-weight: 800; font-size: 1rem; line-height: 1.15; }
.tuile-nombre { display: block; margin-top: 1px; font-weight: 700; font-size: .8rem; opacity: .95; }
.tuile-nombre.tuile-vide { font-style: italic; font-weight: 600; opacity: .85; } /* plus discret */
.tuile[data-tuile="tout"] { background: var(--texte); color: var(--fond); }
.tuile[data-tuile="tout"]::after { display: none; }
.tuile[data-tuile="tout"] .tuile-icone { background: var(--fond); color: var(--texte); }

/* Carburant du moment : bandeau violet, le vrai prix du n° 1 du Meilleur choix */
.direct {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 0;
  border-radius: 20px; background: var(--cat); color: var(--cat-sur); text-align: left; box-shadow: var(--ombre);
}
.direct .rond-direct { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #5b21b6; }
.direct .rond-direct .icone { width: 22px; height: 22px; }
.direct-texte { display: block; font-size: .85rem; font-weight: 700; }
.direct-prix { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.direct-prix .unite { color: inherit; opacity: .9; }

/* Carte « Autour de toi » (aperçu : la toucher ouvre la vraie carte) */
.mini-carte {
  position: relative; height: 230px; border-radius: 22px; overflow: hidden; background: var(--surface);
  box-shadow: var(--ombre); cursor: pointer;
}
.pastille-apercu {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; pointer-events: none;
  background: var(--fond-panneau); color: var(--texte); font-weight: 800; font-size: .8rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.pastille-apercu .rond { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cat); color: var(--cat-sur); }
.pastille-apercu .rond .icone { width: 13px; height: 13px; }
.mini-carte .maplibregl-ctrl-attrib { font-size: 10px; }

/* Bon plan : photo, catégorie, titre, infos, prix (prix barré et économie seulement avec une vraie référence) */
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plan {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%;
  padding: 8px; border: 0; border-radius: 20px; background: var(--fond-panneau); color: var(--texte); text-align: left;
  box-shadow: var(--ombre);
}
.plan-photo { position: relative; overflow: hidden; width: 96px; height: 96px; border-radius: 14px; background: var(--cat); }
.plan-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plan-photo .tuile-icone {
  display: grid; place-items: center; position: absolute; left: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--cat); color: var(--cat-sur);
}
.plan-photo .tuile-icone .icone { width: 16px; height: 16px; }
.plan-texte { min-width: 0; display: grid; gap: 2px; }
.plan-categorie { justify-self: start; padding: 3px 9px; border-radius: 999px; background: var(--cat-fond); color: var(--cat-texte); font-size: .75rem; font-weight: 800; }
.plan-titre { display: block; font-weight: 800; line-height: 1.22; overflow-wrap: anywhere; }
.plan-infos { display: block; color: var(--texte-doux); font-size: .85rem; font-weight: 600; }
.plan-prix { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; font-size: 1.15rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-prix s { color: var(--texte-doux); font-size: .85rem; font-weight: 600; }
.plan .economie-plein { margin: 0; justify-self: start; }
.plans-vide { padding: 16px; border: 1.5px dashed var(--bordure); border-radius: 16px; color: var(--texte-doux); font-weight: 600; }
.plans-vide p { margin: 0 0 10px; }
.plans-vide p:last-child { margin: 0; }
.plans .etat { padding: 8px 2px; }
.pied-accueil { margin-top: 18px; text-align: center; }

@media (min-width: 640px) { .tuiles { grid-template-columns: repeat(4, 1fr); } }

/* --- PC (900 px et plus) : barre latérale à gauche, tout l'écran utilisé --------------------------------- */
@media (min-width: 900px) {
  :root { --hauteur-onglets: 0px; --barre-laterale: 240px; }
  .barre-onglets {
    top: 0; right: auto; bottom: 0; width: var(--barre-laterale); height: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 22px 14px;
    border-top: 0; border-right: 1px solid var(--bordure);
  }
  .onglets-logo { display: flex !important; margin: 0 8px 22px; }
  .onglets-logo .repere-logo { color: var(--accent); }
  .onglet {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 50px; padding: 0 14px;
    border-radius: 14px; font-size: 1rem;
  }
  .onglet[aria-current="page"] { background: var(--fond); }
  .onglet-publier { order: 9; justify-content: center; margin-top: 16px; min-height: 54px; background: var(--accent); color: var(--accent-texte); }
  .onglet-publier .rond { width: auto; height: auto; margin: 0; background: none; box-shadow: none; color: inherit; }
  .onglet-publier .rond .icone { width: 22px; height: 22px; }
  .vue, .carte, .barre-haut { left: var(--barre-laterale); }
  .panneau { left: calc(var(--barre-laterale) + 16px); }
  .page { max-width: none; padding-left: 40px; padding-right: 40px; }
  .page.accueil { padding-top: 8px; }
  .hero { padding: 30px 40px 34px; border-radius: 0 0 36px 36px; }
  .hero-haut { justify-content: flex-end; }
  .hero-accueil .marque { display: none; }
  .hero-titre { margin-top: 0; }
  .hero-ou { max-width: 620px; }
  .tuiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tuile { aspect-ratio: 16 / 9; }
  .direct { max-width: 620px; }
  .accueil-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
  .accueil-plans { order: -1; }
  .accueil-carte { position: sticky; top: 16px; }
  .mini-carte { height: min(560px, calc(100vh - 120px)); }
  .plans { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
@media (min-width: 1500px) {
  .tuiles { grid-template-columns: repeat(8, 1fr); }
  .tuile { aspect-ratio: 3 / 4; }
}
.sprite-logo { position: absolute; width: 0; height: 0; overflow: hidden; }
.onglets-logo { display: none !important; }
@media (min-width: 900px) {
  .onglets-logo { display: flex !important; }
  .vue-bienvenue { left: 0; }
}

/* --- Nouveau design, partie A : la couleur de la catégorie partout (puces, boutons, fiche) ---------------
   data-categorie (sur body, la fiche, le formulaire, un groupe « Autour de toi ») remplace le vert / corail :
   chaque catégorie a sa couleur franche, avec son dessin lisible dessus (--<code>-sur). */
[data-categorie] { --actif: var(--cat); --actif-texte: var(--cat-sur); --actif-ombre: color-mix(in srgb, var(--cat) 35%, transparent);
  --actif-doux: var(--cat-fond); --actif-trait: var(--cat); --actif-lien: var(--cat-texte); --actif-vif: var(--cat-texte); }
[data-categorie="carburant"] { --cat: var(--carburant-vif); --cat-sur: var(--carburant-sur); --cat-texte: var(--carburant-texte); --cat-fond: var(--carburant-fond); }
[data-categorie="lot"] { --cat: var(--lot-vif); --cat-sur: var(--lot-sur); --cat-texte: var(--lot-texte); --cat-fond: var(--lot-fond); }
[data-categorie="destockage"] { --cat: var(--destockage-vif); --cat-sur: var(--destockage-sur); --cat-texte: var(--destockage-texte); --cat-fond: var(--destockage-fond); }
[data-categorie="don"] { --cat: var(--don-vif); --cat-sur: var(--don-sur); --cat-texte: var(--don-texte); --cat-fond: var(--don-fond); }
[data-categorie="brocante"] { --cat: var(--brocante-vif); --cat-sur: var(--brocante-sur); --cat-texte: var(--brocante-texte); --cat-fond: var(--brocante-fond); }
[data-categorie="sortie"] { --cat: var(--sortie-vif); --cat-sur: var(--sortie-sur); --cat-texte: var(--sortie-texte); --cat-fond: var(--sortie-fond); }
[data-categorie="createur"] { --cat: var(--createur-vif); --cat-sur: var(--createur-sur); --cat-texte: var(--createur-texte); --cat-fond: var(--createur-fond); }
[data-categorie="sport"] { --cat: var(--sport-vif); --cat-sur: var(--sport-sur); --cat-texte: var(--sport-texte); --cat-fond: var(--sport-fond); }
[data-categorie="autour"] { --cat: #0db561; --cat-sur: #0b0c10; --cat-texte: var(--lien); --cat-fond: var(--accent-doux); }
#bouton-meilleur { background: var(--actif); color: var(--actif-texte); box-shadow: 0 6px 16px var(--actif-ombre); }

/* Catégorie ouverte : la flèche retour et le titre, de la couleur de la catégorie */
body[data-categorie] .bouton-retour { background: var(--cat); color: var(--cat-sur); }
body[data-categorie] .bouton-retour { width: auto; min-width: 44px; padding: 0 14px 0 11px; gap: 6px; display: inline-flex; align-items: center; border-radius: 999px; }
.titre-categorie { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1rem; white-space: nowrap; }
.titre-categorie .icone { display: none; }
@media (max-width: 400px) { body[data-categorie] .bouton-retour { padding: 0 12px 0 10px; } .titre-categorie { font-size: .92rem; } }
.puce-selecteur { background: var(--cat); color: var(--cat-sur); }
.puce-selecteur .chevron { color: inherit; }

/* Fiche d'un bon plan : bandeau de la couleur de la catégorie, gros bouton « Y aller » */
.bandeau-fiche {
  display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; padding: 10px 12px; border-radius: 18px;
  background: var(--cat); color: var(--cat-sur); font-weight: 800;
}
.bandeau-fiche .rond-fiche { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #0b0c10; flex: none; }
.bandeau-fiche small { display: block; font-weight: 700; opacity: .9; }
@media (min-width: 900px) { .panneau { width: 440px; } }
.feuille .bandeau-fiche, .feuille .bandeau-fiche small { color: var(--cat-sur); }

/* --- Favoris, Profil, Bienvenue, Publier (nouveau design) -------------------------------------------------- */
.hero-page { padding-bottom: 24px; }
.hero-page .hero-titre { margin-top: 6px; font-size: clamp(1.8rem, 7.6vw, 2.8rem); }
.page-sous-hero { padding-top: 6px; }
.vue-favoris-cartes, .liste-favoris { display: grid; gap: 10px; }
.liste-favoris .ma-station { border: 0; background: var(--fond-panneau); box-shadow: var(--ombre); border-radius: 18px; min-height: 64px; }
.favoris-vide .icone { color: var(--createur-texte); }
/* Profil : chaque réglage dans une carte blanche */
.bloc-profil { margin-top: 16px; padding: 14px; border-radius: 20px; background: var(--fond-panneau); box-shadow: var(--ombre); }
.bloc-profil .champ-recherche { background: var(--surface); }
.choix-apparence button[aria-checked="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }

/* Bienvenue : tout l'écran au vert de la marque, trois photos, gros boutons */
.vue-bienvenue { background: #0db561; color: #0b0c10; }
.bienvenue { gap: 10px; max-width: 520px; }
.bienvenue-marque { justify-content: center; }
.bienvenue-marque .repere-logo { width: 30px; height: 40px; color: #0b0c10; }
.bienvenue .marque-nom { margin: 0; font-size: 2rem; color: #0b0c10; }
.bienvenue-titre { margin: 4px 0 0; font-size: clamp(2.1rem, 10vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.bienvenue-texte { margin: 0; max-width: 30ch; font-weight: 600; }
.bienvenue-photos { display: flex; justify-content: center; gap: 10px; margin: 6px 0 0; }
.bienvenue-photos img { width: 24vw; max-width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; box-shadow: 0 6px 18px rgba(11, 12, 16, .2); }
.bienvenue-photos img:nth-child(2) { margin-top: 14px; }
.bienvenue-carte { margin-top: 12px; border: 0; box-shadow: 0 10px 30px rgba(11, 12, 16, .18); }
.bienvenue-carte h1 { font-size: 1.35rem; }
.bienvenue-carte #bienvenue-position { background: #0b0c10; color: #fff; box-shadow: none; }
.note-bienvenue { color: #0b0c10; opacity: .8; }
@media (max-height: 700px) { .bienvenue-photos { display: none; } }

/* Publier : le titre et sa promesse */
.sous-titre-feuille { display: block; margin-top: 2px; color: var(--texte-doux); font-size: .92rem; font-weight: 600; letter-spacing: 0; }
.bienvenue-carte { color: var(--texte); }

/* --- Mode simple : textes plus grands, 4 grandes tuiles, gros boutons, pas d'animation -------------------- */
html.simple { font-size: 125%; }
body { font-size: 1rem; } /* 16 px, ou 20 px en mode simple */
html.simple *, html.simple *::before, html.simple *::after { animation: none !important; transition: none !important; }
html:not(.simple) .seulement-simple { display: none !important; }
html.simple .pas-simple, html.simple #titre-accueil,
html.simple #accueil-direct, html.simple .accueil-colonnes, html.simple .hero-ou .autour-de-moi,
html.simple .barre-onglets [data-onglet="favoris"], html.simple .onglet-publier { display: none !important; }
html.simple .barre-onglets { grid-template-columns: repeat(3, 1fr); }
html.simple .tuiles { gap: 12px; margin-top: 18px; }
html.simple .tuile { aspect-ratio: 1; }
html.simple .tuile .tuile-icone { width: 48px; height: 48px; }
html.simple .tuile-nom { font-size: 1.2rem; }
.boutons-simple { display: grid; gap: 12px; margin-top: 16px; }
.boutons-simple .bouton-geant { min-height: 64px; }
.lien-mode-simple { display: block; margin: 18px auto 0; }
.ligne-interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ligne-interrupteur .etiquette { margin: 0; }
.bascule { flex: none; position: relative; width: 60px; height: 44px; padding: 0; border: 0; background: none; }
.bascule::before { content: ""; position: absolute; left: 2px; top: 6px; width: 56px; height: 32px; border-radius: 999px; background: var(--surface-2); }
.bascule::after { content: ""; position: absolute; left: 5px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.bascule[aria-checked="true"]::before { background: var(--accent); }
.bascule[aria-checked="true"]::after { left: 29px; }
/* « Comment ça marche ? » : 3 images, 3 phrases */
.etapes-aide { display: grid; gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }
.etapes-aide li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 22px; background: var(--fond-panneau); box-shadow: var(--ombre); }
.etapes-aide img { width: 110px; height: 110px; object-fit: cover; border-radius: 16px; }
.etapes-aide b { display: block; font-size: 1.1rem; line-height: 1.2; margin-bottom: 4px; }
.etapes-aide .numero { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 50%; background: var(--accent); color: var(--accent-texte); font-weight: 800; }
@media (min-width: 900px) {
  .etapes-aide { grid-template-columns: repeat(3, 1fr); max-width: 1100px; }
  .etapes-aide li { grid-template-columns: 1fr; }
  .etapes-aide img { width: 100%; height: 200px; }
  .boutons-simple, #aide-compris { max-width: 540px; }
  html.simple .tuiles { grid-template-columns: repeat(4, 1fr); max-width: 1100px; }
}

/* Écran de chargement (« Réveil du serveur… ») : nouvelles couleurs, logo vert */
.ecran-chargement { background: #f4f6f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="clair"]) .ecran-chargement { background: #0b0c10; } }
:root[data-theme="sombre"] .ecran-chargement { background: #0b0c10; }
.ecran-chargement img { box-shadow: 0 12px 32px rgba(13, 181, 97, .3); }

/* Profil : lien vers la vitrine (/?vitrine=1 : on reste sur la vitrine même avec une ville choisie) */
#lien-vitrine { display: inline-flex; align-items: center; min-height: 44px; color: var(--lien); font-weight: 800; }

/* --- Partie B : photos, prix d'origine, état du stock (étape 5) ---------------------------------------- */
/* Liste : la photo de l'annonce (vignette) à gauche, ou l'illustration de sa catégorie */
.station.annonce { grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 12px; }
.station.annonce .annonce-visuel { grid-row: 1 / span 2; grid-column: 1; align-self: start; }
.station.annonce .station-tete, .station.annonce .station-adresse { grid-column: 2; }
.station.annonce .station-prix { grid-column: 3; }
.annonce-visuel, .plan-photo .illustration {
  display: grid; place-items: center; overflow: hidden; width: 64px; height: 64px; border-radius: 14px;
  background: var(--cat); color: var(--cat-sur);
}
.annonce-visuel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.annonce-visuel .illustration { display: grid; place-items: center; width: 100%; height: 100%; }
.annonce-visuel .illustration .icone { width: 28px; height: 28px; }
.plan-photo .illustration { width: 100%; height: 100%; border-radius: 0; }
.plan-photo .illustration .icone { width: 38px; height: 38px; }
/* Fiche : la grande photo en haut */
.fiche-photo { margin: 0 0 12px; overflow: hidden; border-radius: 18px; background: var(--surface-2); }
.fiche-photo img { display: block; width: 100%; max-height: min(46vh, 420px); object-fit: cover; }
.titre-fiche-annonce { margin-top: 2px; }
#contenu-annonce .feuille-tete { align-items: flex-start; }
#contenu-annonce .feuille-tete .bandeau-fiche { flex: 1; min-width: 0; margin-bottom: 12px; }
/* Prix d'origine barré et « −40 % » (seulement avec un vrai prix d'origine) */
.prix-origine { color: var(--texte-doux); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.prix-annonce .prix-origine { font-size: 1.05rem; }
.badge-reduction { color: var(--ok); background: var(--ok-fond); }
/* « Il en reste peu » : orange franc, bien visible ; texte foncé (contraste > 7:1, clair et sombre) */
.badge-peu, .repere .reste-peu { background: #ff9f1c; color: #0b0c10; }
.repere .reste-peu { padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.repere .reste-peu.epuise { background: var(--surface-2); color: var(--texte-doux); }
/* « Épuisé » : grisé en bas de la liste pendant 6 h, puis masqué */
.disponibilite-epuise { color: var(--texte-doux); background: var(--surface-2); }
.annonce-epuisee .station-nom, .annonce-epuisee .station-prix { color: var(--texte-doux); }
.annonce-epuisee .annonce-visuel, .fiche-photo.annonce-epuisee img { filter: grayscale(1); opacity: .6; }
.repere.repere-annonce.disponibilite-epuise { opacity: .75; }
.repere.repere-annonce.disponibilite-epuise .rond { background: var(--repere-inconnu); color: #fff; }
/* Barre de l'auteur : l'état du stock en un toucher */
.barre-etats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.barre-etats.quatre { grid-template-columns: 1fr 1fr; }
.barre-etats .etiquette { grid-column: 1 / -1; margin: 0; }
.bouton-etat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1.5px solid var(--bordure); border-radius: 14px; background: var(--fond-panneau); color: var(--texte); font-weight: 800;
}
.bouton-etat[aria-pressed="true"] { border-color: var(--texte); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--texte); }
.bouton-etat.etat-peu[aria-pressed="true"] { border-color: #ff9f1c; background: #ff9f1c; color: #0b0c10; box-shadow: none; }
/* Formulaire : la photo */
.facultatif.obligatoire { color: var(--rupture); }
.conseil-photo { margin: 2px 0 8px; }
.zone-photo { display: grid; gap: 8px; }
.choisir-photo { cursor: pointer; }
.choisir-photo:focus-within { outline: 3px solid var(--lien); outline-offset: 2px; }
.apercu-photo { display: flex; align-items: center; gap: 12px; }
.apercu-photo img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
#ajout-bloc-origine { grid-column: 1 / -1; }

/* --- Passe de finition (16 novembre 2026), lot 1 --------------------------------------------------------- */
/* En-têtes sans catégorie (Accueil, aide) : toujours le vert de la marque, même après une visite dans une
   catégorie (ils prenaient sa couleur : Accueil violet après Carburant). */
.hero:not([class*="cat-"]) { --cat: #0db561; --cat-sur: #0b0c10; }
/* Champs sur plusieurs lignes : la police de l'appli (le navigateur mettait une police de machine à écrire) */
textarea, select, input, button { font-family: inherit; }
/* Liste des annonces : le prix sous le titre, comme sur l'Accueil (le titre ne tient plus sur 4 lignes) */
.station.annonce { grid-template-columns: 64px minmax(0, 1fr); }
.station.annonce .annonce-visuel { grid-row: 1 / span 3; }
.station.annonce .station-prix {
  grid-column: 2; grid-row: auto; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
  font-size: 1.25rem; margin-top: 2px;
}
.station.annonce .station-prix small { display: inline; }
/* Fiche : « Partager » et « Favori » se partagent toute la largeur (plus de vide à droite) */
.actions-fiche:not(:has(.bouton-secondaire ~ .bouton-secondaire ~ .bouton-secondaire)) { grid-template-columns: 1fr 1fr; }
/* Apparence : l'icône du choix coché suit la couleur du texte (elle était vert foncé sur noir) */
.choix-apparence button[aria-checked="true"] .icone { color: inherit; }
/* Prix d'origine : même largeur que « Prix total », et « facultatif » sur la ligne du titre */
#ajout-bloc-origine { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 10px; }
#ajout-bloc-origine > * { grid-column: 1 / -1; }
#ajout-bloc-origine > .champ-unite { grid-column: 1; }
#ajout-bloc-origine .facultatif { display: inline; margin-left: 4px; }
/* Mode simple : la ligne « Démo » passe sous le logo (elle le chevauchait) */
html.simple .hero-haut { flex-wrap: wrap; row-gap: 0; }
html.simple .ligne-demo .lien-bouton { white-space: nowrap; }
/* Catégorie cochée (formulaire, sélecteur de la carte) : la couleur franche de la catégorie, en clair comme
   en sombre (reste de l'ancien style : vert sombre éteint pour les Dons en mode sombre) */
[data-categorie] .puce-categorie[aria-checked="true"] { background: var(--actif); color: var(--actif-texte); border-color: var(--actif); }

/* --- Passe de finition, lot 2 : petites animations, Bienvenue en sombre ------------------------------------- */
/* Une seule famille d'animations, courtes : ce qu'on touche s'enfonce un peu, le message arrive en glissant,
   l'état choisi (stock) se pose. Rien en mode simple (voir html.simple), ni si le téléphone demande de
   « réduire les animations ». */
:root { --vite: .14s; --courbe: cubic-bezier(.2, .8, .2, 1); }
.tuile, .plan, .bouton-principal, .bouton-secondaire, .bouton-etat, .puce, .station, .choix-apparence button {
  transition: transform var(--vite) var(--courbe);
}
:is(.tuile, .plan, .bouton-principal, .bouton-secondaire, .bouton-etat, .puce, .choix-apparence button):active { transform: scale(.97); }
.station:active { transform: scale(.99); }
.toast:popover-open { animation: arrivee-toast .22s var(--courbe) both; }
@keyframes arrivee-toast { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bouton-etat[aria-pressed="true"] { animation: etat-choisi .22s var(--courbe); }
@keyframes etat-choisi { from { transform: scale(.94); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Bienvenue : « Ma position » bien visible en sombre aussi (il était noir sur une carte presque noire) */
.bienvenue-carte #bienvenue-position { background: var(--texte); color: var(--fond-panneau); }

/* --- Données publiques (DATAtourisme, OpenAgenda) : badge « Source officielle » et lien vers la fiche d'origine */
.etiquette-neutre.source-officielle { white-space: normal; }
.lien-origine { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px;
  margin: 8px 0 4px; text-decoration: none; }
.lien-origine .icone { width: 1.1em; height: 1.1em; }

/* Import des sorties en cours : un message visible, avec un petit rond qui tourne (arrêté si le téléphone
   demande de réduire les animations, et en mode simple) */
.bandeau-import { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--accent-doux); color: var(--texte); font-weight: 700; font-size: .95rem; }
.rond-attente { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--bordure);
  border-top-color: var(--lien); animation: rond-attente .9s linear infinite; }
@keyframes rond-attente { to { transform: rotate(360deg); } }

/* --- Sport & plein air : rappel de prudence sur les randos, longueur de la boucle ------------------------- */
.encadre-prudence { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 10px 12px; border-radius: 14px;
  background: var(--brocante-fond); color: var(--texte); font-weight: 700; font-size: .95rem; }
.encadre-prudence .icone { flex: none; width: 1.2em; height: 1.2em; margin-top: 2px; color: var(--brocante-texte); }
.infos-rando { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.infos-rando li { padding: 6px 12px; border-radius: 999px; background: var(--cat-fond); color: var(--cat-texte); font-weight: 800; font-size: .95rem; }
/* Accueil : avec 8 catégories, la tuile « Tout voir sur la carte » est seule sur sa ligne : elle la remplit */
@media (max-width: 899px) {
  .tuiles > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tuiles > li:last-child:nth-child(odd) .tuile { aspect-ratio: auto; min-height: 88px; }
}

/* --- Pages légales (liens) et annonce retirée sur l'Accueil (pourquoi, « Je conteste ») ------------------ */
.liens-legaux { margin: 10px 0 0; line-height: 2.2; font-size: .95rem; }
.liens-legaux a { padding: 8px 0; }
.mes-retraits { display: grid; gap: 10px; margin: 8px 0 12px; }
.retrait { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--attention-fond);
  color: var(--texte); border: 1px solid var(--bordure); }
.retrait p { margin: 0; }
.retrait-titre { display: flex; gap: 8px; align-items: flex-start; font-weight: 800; }
.retrait-titre .icone { flex: none; width: 1.2em; height: 1.2em; margin-top: 2px; color: var(--attention); }
.retrait textarea.champ { min-height: 64px; }
.retrait button { justify-self: start; }

/* --- Mon compte : feuille de connexion (code par e-mail ou SMS) et bloc du Profil --------------------------- */
.compte-etape { display: grid; gap: 8px; }
.compte-etape .groupe-puces { margin-bottom: 4px; }
.compte-raison { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: var(--accent-doux); color: var(--texte); font-weight: 700; }
.compte-bienvenue { margin: 6px 0 0; font-weight: 800; }
.champ-code { font-size: 1.4rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.compte-pseudo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.compte-pseudo .icone { color: var(--lien); }
.bouton-danger { color: var(--rupture); }
