/* Filon — outil de veille des annonces auto, pour professionnels.
   Sobre : police du téléphone (San Francisco sur iPhone, Roboto sur Android), fonds neutres,
   bleu pour les actions, vert pour « sous ton max ». */

:root {
  --beton: #f2f3f5;        /* fond de page */
  --beton-2: #e6e8ec;      /* champs, contrôles segmentés */
  --plaque: #ffffff;       /* surfaces */
  --encre: #191b1f;
  --doux: #565d6b;
  --ligne: #d9dde3;
  --bleu: #1656b8;         /* actions */
  --bleu-fonce: #12489c;
  --bleu-texte: #1656b8;
  --bleu-doux: #e6eefb;
  --vert: #12784a;         /* sous ton max */
  --vert-doux: #e3f3ea;
  --rouge: #c4302b;
  --rouge-doux: #fbe9e8;
  --bande-ue: #1f3e9c;     /* bande bleue des plaques */
  --segment-actif: #ffffff;
  --voile: rgba(20, 22, 26, .5);
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chiffres: var(--police);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {     /* téléphone en mode sombre : style « sombre » validé */
  :root {
    --beton: #121417;
    --beton-2: #23272d;
    --plaque: #1b1e23;
    --encre: #eef1f4;
    --doux: #a3abb7;
    --ligne: #2e333a;
    --bleu: #2f6ad9;
    --bleu-fonce: #2559bd;
    --bleu-texte: #8ab1ff;
    --bleu-doux: #1c2c4a;
    --vert: #45c486;
    --vert-doux: #173325;
    --rouge: #ff7a72;
    --rouge-doux: #3a1e1e;
    --voile: rgba(0, 0, 0, .6);
    --segment-actif: #3d444f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--beton); color: var(--encre); }
body {
  font: 400 15px/1.45 var(--police);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  touch-action: manipulation;
}
a { color: var(--bleu-texte); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ico { width: 20px; height: 20px; flex: none; display: block; }
[hidden] { display: none !important; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--bleu-texte); outline-offset: 2px; }
.chargement { display: grid; place-items: center; height: 100vh; color: var(--doux); font-weight: 600; }

/* ── Structure ── */
.entete {
  position: sticky; top: 0; z-index: 20;
  padding: calc(var(--haut) + 10px) 16px 10px;
  background: var(--plaque);
  border-bottom: 1px solid var(--ligne);
  display: flex; align-items: center; gap: 12px;
}
.entete h1 { font-size: 19px; line-height: 1.2; margin: 0; flex: 1; font-weight: 700; letter-spacing: -.01em; }
.entete .barre-recherche { flex: 1; min-width: 0; }
.direct { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); font-weight: 600; flex: none; }
.direct i { width: 9px; height: 9px; border-radius: 50%; background: var(--ligne); display: inline-block; }
.direct.on i { background: var(--vert); animation: pouls 2.4s ease-out infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(18, 120, 74, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(18, 120, 74, 0); } }
.entete .barre-recherche ~ .direct .txt-direct { display: none; }   /* (sur Annonces, le point suffit) */
main { max-width: 820px; margin: 0 auto; padding: 14px 16px calc(var(--bas) + 96px); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 132px)); justify-content: space-around;
  padding: 0 4px var(--bas);
  background: var(--plaque);
  border-top: 1px solid var(--ligne);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px;
  text-decoration: none; font-size: 11.5px; font-weight: 600; color: var(--doux); position: relative;
  min-height: 56px;
}
.nav a svg.ico { width: 23px; height: 23px; }
.nav a.actif { color: var(--bleu-texte); }
.nav a.actif::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--bleu-texte); }
.nav a .pastille {
  position: absolute; top: 5px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--rouge); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center;
}

/* ── Textes ── */
.titre-section { font-size: 14.5px; font-weight: 600; margin: 24px 2px 8px; color: var(--doux); }
.titre-section.premier { margin-top: 4px; }
.doux { color: var(--doux); }
.petit { font-size: 14px; }
.gras { font-weight: 700; }
.intro { margin: 2px 2px 14px; max-width: 62ch; }
.vide { text-align: center; color: var(--doux); padding: 40px 16px; max-width: 46ch; margin: 0 auto; }
.vide .gros { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--plaque); border: 1px solid var(--ligne); color: var(--encre); }
.vide .gros svg.ico { width: 26px; height: 26px; }
.erreur-txt { color: var(--rouge); font-weight: 600; font-size: 14px; margin: 6px 2px; }
.erreur-txt:empty { display: none; }
.ok { color: var(--vert); font-weight: 700; }
.ko { color: var(--rouge); font-weight: 700; }

/* ── Blocs ── */
.carte-bloc { background: var(--plaque); border: 1px solid var(--ligne); border-radius: 14px; padding: 14px; }
.carte-bloc + .carte-bloc { margin-top: 10px; }
.ligne { display: flex; align-items: center; gap: 10px; }
.ligne.espace { justify-content: space-between; }
.bandeau {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
  background: var(--bleu-doux); margin-bottom: 12px; font-size: 14.5px; line-height: 1.35;
}
.bandeau > svg.ico { color: var(--bleu-texte); }
.bandeau > span { flex: 1; min-width: 0; }
.bandeau .btn { flex: none; }
.bandeau.vert { background: var(--vert-doux); }
.bandeau.vert > svg.ico { color: var(--vert); }
.bandeau.alerte { background: var(--plaque); box-shadow: inset 0 0 0 1px var(--ligne); }
.bandeau.alerte > svg.ico { color: var(--bleu-texte); }
.bouton-icone { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--doux); display: grid; place-items: center; flex: none; }
.bouton-icone:hover { background: var(--beton-2); color: var(--encre); }

/* ── Boutons ── */
.btn {
  appearance: none; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 15px;
  background: var(--plaque); color: var(--encre); border: 1px solid var(--ligne);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: 46px;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--doux); }
.btn:active { transform: translateY(1px); }
.btn svg.ico { width: 18px; height: 18px; }
.btn.principal { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.btn.principal:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.btn.danger { background: var(--rouge-doux); color: var(--rouge); border-color: transparent; }
.btn.plein { width: 100%; }
.btn.petit { min-height: 40px; padding: 7px 12px; font-size: 14.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.boutons.centre { justify-content: center; margin-top: 16px; }
.plus { display: flex; justify-content: center; margin: 18px 0; }
.sentinelle { padding: 18px 0; text-align: center; }

/* ── Contrôles segmentés (Ma liste / Toutes) et choix ── */
.segments { display: flex; gap: 6px; padding: 2px 0 10px; }
.segments.modes { gap: 8px; align-items: center; }
.segments.modes .groupe { flex: 1; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--beton-2); }
.segments.modes .groupe button {
  border: 0; background: transparent; border-radius: 9px; min-height: 38px; font-weight: 600; font-size: 14.5px; color: var(--doux);
}
.segments.modes .groupe button[aria-pressed="true"] { background: var(--segment-actif); color: var(--encre); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.segments.modes .vue { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--ligne); background: var(--plaque); color: var(--encre); display: grid; place-items: center; flex: none; }
.segments.choix { flex-wrap: wrap; }
.segments.choix button {
  border: 1px solid var(--ligne); background: var(--plaque); border-radius: 999px; padding: 8px 14px; min-height: 40px;
  font-weight: 500; font-size: 14.5px; color: var(--encre);
}
.segments.choix button[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: #fff; }

/* ── Recherche ── */
.barre-recherche {
  display: flex; align-items: center; gap: 6px; background: var(--beton); border: 1px solid transparent;
  border-radius: 12px; padding: 3px 3px 3px 12px; margin: 0;
}
.barre-recherche:focus-within { border-color: var(--bleu-texte); background: var(--plaque); }
.barre-recherche .loupe { color: var(--doux); }
.barre-recherche input[type=search] {
  border: 0; background: transparent; padding: 8px 2px; min-height: 42px; flex: 1; min-width: 0; outline: none; font-size: 16px; color: var(--encre);
}
.barre-recherche input[type=search]::-webkit-search-decoration { display: none; }
.btn-filtres {
  flex: none; border: 0; border-radius: 9px; background: var(--plaque); padding: 0 12px; min-height: 40px;
  font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--encre);
}
.btn-filtres svg.ico { width: 18px; height: 18px; }
.btn-filtres .nb { background: var(--bleu); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; font-size: 12.5px; line-height: 20px; text-align: center; padding: 0 6px; }
.puces { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce-filtre {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; color: var(--bleu-texte);
  background: var(--bleu-doux); border-radius: 999px; padding: 6px 10px 6px 12px; min-height: 34px; font-weight: 600; font-size: 13.5px;
}
.puce-filtre svg.ico { width: 16px; height: 16px; }
.info-recherche > * { margin: 0 2px 10px; }
.info-recherche .compris b { color: var(--encre); }
.lien-lbc { display: inline-block; font-weight: 600; text-decoration: none; }
.lien-lbc:hover { text-decoration: underline; }
.pilule {
  position: fixed; top: calc(var(--haut) + 76px); left: 50%; transform: translateX(-50%); z-index: 40;
  border: 0; border-radius: 999px; padding: 8px 16px 8px 12px; font-weight: 700; font-size: 14.5px;
  background: var(--bleu); color: #fff; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 18px rgba(22, 86, 184, .35); animation: fondu .2s ease-out;
}
.pilule svg.ico { width: 18px; height: 18px; }

/* ── Formulaires ── */
label.champ { display: block; margin-bottom: 14px; }
label.champ > span { display: block; font-size: 14px; font-weight: 600; color: var(--doux); margin: 0 2px 6px; }
label.champ > small { display: block; margin: 5px 2px 0; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--ligne); background-color: var(--beton); border-radius: 10px; padding: 11px 12px;
  min-height: 48px; outline: none; font-size: 16px; color: var(--encre);
}
select {
  appearance: none; padding-right: 34px; background-repeat: no-repeat; background-size: 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
}
select.compact { width: auto; min-width: 124px; min-height: 42px; padding: 8px 32px 8px 10px; }
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--bleu-texte); background-color: var(--plaque); box-shadow: 0 0 0 3px var(--bleu-doux); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }

.interrupteur { position: relative; width: 52px; height: 32px; flex: none; display: inline-block; }
.interrupteur input { opacity: 0; width: 100%; height: 100%; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.interrupteur span { position: absolute; inset: 0; border-radius: 999px; background: var(--ligne); transition: background-color .2s; }
.interrupteur span::after { content: ""; position: absolute; width: 26px; height: 26px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.interrupteur input:checked + span { background: var(--bleu); }
.interrupteur input:checked + span::after { transform: translateX(20px); }
.interrupteur input:focus-visible + span { outline: 3px solid var(--bleu-texte); outline-offset: 2px; }

/* ── Annonces : grandes cartes ── */
.cartes { display: grid; gap: 12px; }
@media (min-width: 760px) { .cartes { grid-template-columns: 1fr 1fr; } }
.annonce { background: var(--plaque); border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.annonce.nouvelle { animation: arrivee 2.2s ease-out; }
@keyframes arrivee { 0%, 35% { border-color: var(--bleu-texte); box-shadow: 0 0 0 2px var(--bleu-doux); } 100% { box-shadow: 0 0 0 0 transparent; } }
.photo { position: relative; aspect-ratio: 3 / 2; background: var(--beton-2); overflow: hidden; }
.photo img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .sans { position: absolute; inset: 0; display: grid; place-items: center; color: var(--doux); }
.photo .sans svg.ico { width: 40px; height: 40px; opacity: .6; }
.photo .pastilles { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; z-index: 1; }
.puce { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
  background: rgba(20, 22, 26, .78); color: #fff; }
.puce svg.ico { width: 14px; height: 14px; }
.puce.accent { background: var(--bleu); color: #fff; }
.corps { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.corps .nom { font-weight: 600; font-size: 16.5px; line-height: 1.25; text-wrap: balance; }
.corps .titre-vendeur { color: var(--doux); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.corps .etiquette { font-size: 14px; font-weight: 600; color: var(--vert); }
.prix { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin: 4px 0 2px; }
.montant { font-family: var(--chiffres); font-weight: 700; font-size: 21px; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prix .max { color: var(--doux); font-size: 13.5px; white-space: nowrap; }
.sous-max { font-size: 13px; font-weight: 600; color: var(--vert); background: var(--vert-doux); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.infos { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--doux); font-size: 13.5px; font-variant-numeric: tabular-nums; align-items: center; }
.infos .avec-ico { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.infos .avec-ico svg.ico { width: 16px; height: 16px; }
.infos b { color: var(--encre); font-weight: 600; }
.annonce .lien-fiche { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.annonce .lien-fiche:hover .nom { text-decoration: underline; text-underline-offset: 3px; }
.annonce > .actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.annonce > .actions .btn { flex: 1; }
.annonce.squelette { min-height: 320px; background: linear-gradient(100deg, var(--plaque) 40%, var(--beton) 50%, var(--plaque) 60%) 0 0 / 200% 100%; animation: brille 1.3s linear infinite; }
@keyframes brille { to { background-position: -200% 0; } }

/* ── Annonces : liste compacte (photo à gauche) ── */
.cartes.compactes { gap: 8px; }
.annonce.compacte { flex-direction: row; gap: 12px; padding: 10px; text-decoration: none; color: inherit; align-items: stretch; }
.annonce.compacte:hover { border-color: var(--doux); }
.annonce.compacte .vignette { position: relative; flex: none; width: 104px; height: 82px; border-radius: 8px; overflow: hidden; background: var(--beton-2); }
.annonce.compacte .vignette img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.annonce.compacte .vignette .sans { position: absolute; inset: 0; display: grid; place-items: center; color: var(--doux); }
.annonce.compacte .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.annonce.compacte .ligne-haut { display: flex; gap: 8px; align-items: flex-start; }
.annonce.compacte .nom { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.annonce.compacte .montant { font-size: 16.5px; line-height: 1.3; }
.annonce.compacte .titre-vendeur { color: var(--doux); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.annonce.compacte .infos { font-size: 13px; gap: 0 10px; }
.annonce.compacte .infos.bas { justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
.annonce.compacte .infos.bas > :first-child { min-width: 0; overflow: hidden; }
.annonce.compacte .infos.bas > :first-child > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annonce.compacte .infos.bas > :last-child { flex: none; }
.pastilles-compactes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.mini { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--beton-2); color: var(--doux); white-space: nowrap; }
.mini.accent { background: var(--bleu-doux); color: var(--bleu-texte); }
.mini.vert { background: var(--vert-doux); color: var(--vert); }

/* ── Ma liste ── */
.voiture { display: flex; gap: 12px; align-items: center; }
.voiture .info { flex: 1; min-width: 0; cursor: pointer; border-radius: 8px; }
.voiture .nom { font-weight: 600; font-size: 15.5px; }
.voiture .details { color: var(--doux); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voiture .stat { font-size: 13.5px; font-weight: 600; color: var(--doux); }
.voiture .max { text-align: right; flex: none; }
.voiture .max b { display: block; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.voiture .max span { font-size: 12.5px; color: var(--doux); }
.voiture.pause .info, .voiture.pause .max { opacity: .5; }

/* ── Feuilles (fenêtres qui montent du bas) ── */
.voile { position: fixed; inset: 0; background: var(--voile); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fondu .15s; }
@keyframes fondu { from { opacity: 0; } }
.feuille {
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--plaque);
  border-radius: 18px 18px 0 0; padding: 10px 16px calc(var(--bas) + 18px); animation: monte .22s ease-out;
}
@keyframes monte { from { transform: translateY(24px); } }
@media (min-width: 700px) { .voile { align-items: center; } .feuille { border-radius: 18px; } }
.feuille .poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--ligne); margin: 0 auto 10px; }
.feuille h2 { margin: 4px 0 16px; font-size: 18px; line-height: 1.25; }
.bas-feuille { margin-top: 18px; position: sticky; bottom: calc(-18px - var(--bas)); background: var(--plaque); padding: 10px 0 calc(var(--bas) + 18px); }
.bas-feuille .btn { flex: 1; }
.resultat-import { max-height: 40vh; overflow: auto; border: 1px solid var(--ligne); border-radius: 10px; padding: 6px 10px; margin: 10px 0; font-size: 14.5px; }
.resultat-import div { padding: 5px 0; border-bottom: 1px solid var(--ligne); }
.resultat-import div:last-child { border-bottom: 0; }
.mdp { font: 600 19px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--beton); box-shadow: inset 0 0 0 1px var(--ligne); border-radius: 10px; padding: 12px; text-align: center; letter-spacing: .05em; user-select: all; }

/* ── Réglages, admin ── */
.reglage { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ligne); }
.reglage:last-child { border-bottom: 0; }
.reglage .txt { flex: 1; min-width: 0; }
.reglage .txt small { display: block; color: var(--doux); font-size: 13.5px; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tableau td { padding: 8px 4px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.chiffre { background: var(--beton); border-radius: 10px; padding: 10px 12px; }
.chiffre b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.chiffre span { color: var(--doux); font-size: 13.5px; }
.ligne-alerte { padding: 7px 0; border-bottom: 1px solid var(--ligne); font-size: 14px; }
.ligne-alerte:last-child { border-bottom: 0; }
.ligne-alerte.grave { color: var(--rouge); }

/* ── Connexion ── */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion .boite { width: 100%; max-width: 380px; }
.connexion .logo { width: 52px; height: 52px; border-radius: 13px; display: block; margin: 0 0 14px; }
.connexion h1 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; }
.connexion p { color: var(--doux); margin: 0 0 22px; }

/* ── Messages ── */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bas) + 80px); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--encre); color: var(--plaque); padding: 11px 14px; border-radius: 10px; font-weight: 500; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: monte .2s ease-out; }
.toast.erreur { background: var(--rouge); color: #fff; }

/* Moins d'animations si le téléphone le demande */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
main > .titre-section:first-child { margin-top: 6px; }

/* ── Fiche d'une annonce (par-dessus la page) ── */
html.fiche-ouverte { overflow: hidden; }
.fiche {
  position: fixed; inset: 0; z-index: 45; overflow-y: auto; overscroll-behavior: contain;
  background: var(--beton); animation: glisse .18s ease-out;
}
.fiche:focus { outline: none; }
@keyframes glisse { from { transform: translateX(14px); opacity: .7; } }
.fiche .barre-haut {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 4px;
  min-height: calc(var(--haut) + 52px); padding: var(--haut) 14px 0 2px;
  background: var(--plaque); border-bottom: 1px solid var(--ligne);
}
.fiche .retour {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 4px; flex: none;
  border: 0; background: none; color: var(--bleu-texte); font-size: 16px; font-weight: 500; border-radius: 10px;
}
.fiche .retour svg.ico { width: 24px; height: 24px; }
.fiche .titre-court { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; justify-content: flex-end;
  opacity: 0; transition: opacity .15s; font-weight: 600; font-size: 15px; }
.fiche .titre-court .nom { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fiche .titre-court .prix-court { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.fiche.defile .titre-court { opacity: 1; }
.fiche.defile .source-fiche { display: none; }
.source-fiche { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--doux); background: var(--beton-2); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.fiche .contenu { max-width: 760px; margin: 0 auto; padding-bottom: calc(var(--bas) + 92px); }

.galerie { position: relative; background: var(--beton-2); aspect-ratio: 16 / 10; max-height: 52vh; width: 100%; }
.galerie .rail { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.galerie .rail::-webkit-scrollbar { display: none; }
.galerie .rail img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; display: block; }
.galerie .compteur { position: absolute; right: 12px; bottom: 12px; background: rgba(20, 22, 26, .74); color: #fff;
  font-size: 13px; font-weight: 600; border-radius: 6px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.galerie.vide-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--doux); max-height: 200px; }
.galerie.vide-photo svg.ico { width: 48px; height: 48px; opacity: .7; }

.fiche .section { background: var(--plaque); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fiche .section + .section { margin-top: 8px; }
@media (min-width: 760px) {
  .fiche .galerie { border-radius: 0 0 14px 14px; overflow: hidden; }
  .fiche .section { margin: 12px 0 0; border: 1px solid var(--ligne); border-radius: 14px; }
  .fiche .section + .section { margin-top: 12px; }
}
.fiche h1 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; text-wrap: balance; }
.fiche h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; }
.titre-vendeur-fiche { margin: -6px 0 0; color: var(--doux); font-size: 14px; }
.gros-prix { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.titre-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.marge-0 { margin: 0; }
.marge-haut-0 { margin-top: 0; }
.gras-moyen { font-weight: 600; }
.tres-petit { font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 10px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.chip svg.ico { width: 16px; height: 16px; }
.chip.vert { background: var(--vert-doux); color: var(--vert); }
.chip.bleu { background: var(--bleu-doux); color: var(--bleu-texte); }
.chip.neutre { background: var(--beton-2); color: var(--doux); }
.faits { margin: 0; padding-top: 12px; border-top: 1px solid var(--ligne); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.faits dt { font-size: 13px; color: var(--doux); }
.faits dd { margin: 2px 0 0; font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lieux { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 8px; }
.lieux li { display: flex; align-items: center; gap: 10px; }
.lieux svg.ico { color: var(--doux); }
.note-fiche { display: flex; align-items: flex-start; gap: 8px; text-align: left; border: 1px dashed var(--ligne); background: var(--beton);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; color: var(--encre); }
.note-fiche svg.ico { color: var(--doux); width: 18px; height: 18px; margin-top: 2px; }
.note-fiche .texte-note { white-space: pre-line; }

.echelle { position: relative; height: 74px; margin: 4px 0 0; }
.echelle .piste { position: absolute; left: 0; right: 0; top: 30px; height: 6px; border-radius: 3px; background: var(--beton-2); }
.echelle .bande { position: absolute; top: 25px; height: 16px; border: 2px solid var(--bleu-texte); border-radius: 8px; background: var(--bleu-doux); }
.echelle .trait-mediane { position: absolute; top: 19px; width: 2px; height: 28px; margin-left: -1px; border-radius: 1px; background: var(--encre); }
.echelle .pastille-prix { position: absolute; top: 25px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: var(--encre); box-shadow: 0 0 0 3px var(--plaque); }
.echelle .pastille-prix.vert { background: var(--vert); }
.echelle .etiq { position: absolute; white-space: nowrap; font-size: 13px; line-height: 16px; font-variant-numeric: tabular-nums; }
.echelle .etiq.haut { top: 0; font-weight: 600; }
.echelle .etiq.haut.point.vert { color: var(--vert); }
.echelle .etiq.bas { top: 52px; color: var(--doux); }
.textes-marche { display: flex; flex-direction: column; gap: 4px; }
.resultat { margin: 0; font-size: 15px; font-weight: 600; }
.resultat.vert { color: var(--vert); }
.options-en-plus { background: var(--beton); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.options-en-plus ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.options-en-plus li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.options-en-plus b { font-weight: 600; color: var(--vert); font-variant-numeric: tabular-nums; }
.lien-bouton { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 6px 0;
  min-height: 40px; color: var(--bleu-texte); font-weight: 600; font-size: 15px; }
.lien-bouton svg.ico { width: 18px; height: 18px; }
.comparables { display: flex; flex-direction: column; margin-top: 10px; }
.comparable { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--ligne);
  color: inherit; text-decoration: none; }
.comparable:last-child { border-bottom: 0; }
.comparable .g { display: flex; flex-direction: column; min-width: 0; }
.comparable .montant { font-size: 17px; }
a.comparable:hover .gras-moyen { text-decoration: underline; }
.lignes { margin: 0; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.lignes > div { display: flex; justify-content: space-between; gap: 12px; }
.lignes dt { color: var(--doux); }
.lignes dd { margin: 0; font-weight: 600; white-space: nowrap; }
.total-marge { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-marge.vert { color: var(--vert); }
.total-marge.rouge { color: var(--rouge); }
.reperes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.reperes li { display: flex; align-items: center; gap: 10px; }
.reperes li.bon svg.ico { color: var(--vert); }
.reperes li.a-prevoir svg.ico { color: var(--rouge); }
.reperes .txt { flex: 1; min-width: 0; }
.reperes .cout { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.equipements { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.points-modele { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.points-modele li { display: flex; align-items: flex-start; gap: 10px; }
.points-modele svg.ico { color: var(--doux); margin-top: 1px; }
.texte-point { font-size: 14.5px; color: var(--doux); }
.description-texte { margin: 0; white-space: pre-line; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.description-texte.ouverte { display: block; -webkit-line-clamp: unset; }
.barre-fiche { position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: var(--plaque); border-top: 1px solid var(--ligne);
  padding: 12px 16px calc(var(--bas) + 12px); }
.barre-fiche .dedans { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.barre-fiche .btn { min-height: 48px; }
.barre-fiche .btn.principal { flex: 1; }
.btn-favori { flex: none; min-width: 120px; }
.btn-favori[aria-pressed="true"] { background: var(--bleu-doux); color: var(--bleu-texte); border-color: var(--bleu-texte); }
.squelette-ligne { height: 14px; border-radius: 7px; background: var(--beton-2); width: 60%; }
.squelette-ligne.large { width: 90%; height: 18px; }

/* ── Favoris ── */
.favoris { display: flex; flex-direction: column; gap: 8px; }
.favori { display: flex; align-items: flex-start; gap: 2px; background: var(--plaque); border: 1px solid var(--ligne); border-radius: 12px; padding: 10px 2px 10px 10px; }
.favori.parti { background: var(--beton); }
.lien-favori { flex: 1; min-width: 0; display: flex; gap: 12px; color: inherit; text-decoration: none; }
.lien-favori:hover .nom { text-decoration: underline; text-underline-offset: 3px; }
.favori .vignette { position: relative; flex: none; width: 84px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--beton-2); }
.favori .vignette img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.favori .vignette .sans { position: absolute; inset: 0; display: grid; place-items: center; color: var(--doux); }
.favori .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.favori .nom { max-width: 100%; font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favori .montant { font-size: 17px; }
.etat-favori { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--doux); }
.etat-favori i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--doux); flex: none; }
.etat-favori.en-ligne i { background: var(--vert); border-color: var(--vert); }
.etat-favori.baisse { color: var(--vert); font-weight: 600; }
.etat-favori.baisse svg.ico { width: 15px; height: 15px; }
.note-favori { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; color: var(--encre); margin-top: 2px; }
.note-favori svg.ico { width: 15px; height: 15px; color: var(--doux); margin-top: 2px; }
.note-favori span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.etoile-favori { color: var(--bleu-texte); width: 44px; height: 44px; margin-top: -6px; }
.etoile-favori svg.ico { width: 22px; height: 22px; }
