/* Adjugé! — front. Extrait de app.css (Pagination, feed groupé/récent, remise du bien, solde séquestré).
   Les app.*.css sont chargés DANS L'ORDRE (la cascade en dépend) ;
   ne pas réordonner les <link>. */
/* ---------- Pagination : infinite scroll du feed & « voir plus » ---------- */
/* Sentinelle observée par l'IntersectionObserver : elle réclame la page
   suivante. Hauteur non nulle pour être franchement observable. */
.feed-sentinel {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 0 24px;
}
.feed-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--orange);
  animation: feedspin 0.7s linear infinite;
}
@keyframes feedspin { to { transform: rotate(360deg); } }
/* Chargement initial du feed : spinner centré sous la barre de recherche,
   tout le reste du contenu masqué (anti-flash). Quand #screen-feed porte
   .loading, on cache tous ses enfants directs sauf l'en-tête et le spinner. */
/* Splash de PREMIER chargement : logo SEUL, centré au milieu de l'écran (sans
   spinner), façon écran de démarrage d'app. Plein écran (position:fixed) pour un
   centrage vertical parfait, par-dessus tout (z-index 40). */
.feed-loading {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg);
}
.brand-mark-splash {
  width: min(80vw, 340px); height: auto; object-fit: contain;
  /* Entrée stylée PUIS respiration douce pendant l'attente (chaînées). */
  animation: splashIn 0.85s cubic-bezier(0.18, 0.7, 0.2, 1) both,
             splashBreathe 2.8s 0.9s ease-in-out infinite;
}
/* Arrivée : surgit en zoom net (le flou se lève) avec un léger dépassement. */
@keyframes splashIn {
  0%   { opacity: 0; transform: scale(0.55); filter: blur(10px); }
  55%  { opacity: 1; filter: blur(0); }
  72%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
/* Respiration (vivant, pas figé) — reprise après l'entrée. */
@keyframes splashBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
/* Départ : le logo s'envole (zoom + fondu + flou) et le voile crème s'efface. */
.feed-loading.leaving { animation: splashVeilOut 0.5s ease forwards; }
.feed-loading.leaving .brand-mark-splash {
  animation: splashOut 0.5s cubic-bezier(0.6, 0, 0.85, 0.2) forwards;
}
@keyframes splashOut {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to   { opacity: 0; transform: scale(1.7); filter: blur(8px); }
}
@keyframes splashVeilOut { to { opacity: 0; } }
/* L'accueil de 1re visite (« Comment ça marche ») n'est plus un mot sous le logo :
   il vit dans l'overlay d'onboarding (#welcome-overlay, app.onboarding.css/js),
   posé par-dessus le feed au boot. Le splash garde sa durée standard. */
/* Pendant le splash : tout le reste du contenu du feed est masqué. */
#screen-feed.loading > *:not(#feed-loading) { display: none; }
/* RECHARGEMENT du feed (retour d'un onglet, ≠ premier lancement) : on ne montre
   PAS le splash logo mais un spinner LÉGER, le temps du fetch — le contenu reste
   masqué sous .loading puis est révélé d'un coup (plus de flash « ancien → neuf »).
   Le spinner est caché par défaut ; .reload masque le logo et le montre. */
.feed-reload-spin { display: none; }
.feed-loading.reload .brand-mark-splash { display: none; }
.feed-loading.reload .feed-reload-spin { display: block; }

/* Splash de RECHARGEMENT sur une URL PROFONDE (/a/{id}, /profil…) : MÊME logo
   que l'accueil, centré plein écran sur le fond crème, par-dessus l'écran ciblé
   tant que ses données ne sont pas là (anti « flash écran vide → pop-in »).
   Au-dessus du contenu et de la tabbar (z-index 50), SOUS les modales (59+).
   Le serveur le révèle (retire `hidden`) sur une URL profonde ; le JS le retire
   dès que l'écran est rendu. */
.app-splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
/* Entrée DOUCE (fondu) plutôt que le zoom dramatique de l'accueil : ici c'est un
   voile de chargement (souvent < 1 s), pas une révélation de marque → un zoom
   interrompu ferait « buggé ». Respiration discrète pour rester vivant. */
.app-splash .brand-mark-splash {
  animation: appSplashIn 0.28s ease both,
             splashBreathe 2.8s 0.3s ease-in-out infinite;
}
@keyframes appSplashIn { from { opacity: 0; } to { opacity: 1; } }
/* Sortie : le logo s'efface (zoom léger + fondu) et le voile crème se dissout,
   révélant le contenu déjà rendu dessous. Réutilise les keyframes du splash. */
.app-splash.leaving { animation: splashVeilOut 0.42s ease forwards; }
.app-splash.leaving .brand-mark-splash {
  animation: splashOut 0.42s cubic-bezier(0.6, 0, 0.85, 0.2) forwards;
}

/* Entrée du CONTENU une fois le splash parti : montée + fondu, en cascade sur
   les premiers blocs (cats → sections → « Enchères récentes » → toolbar → grille). */
#screen-feed.content-enter > *:not(#feed-loading) {
  animation: contentRise 0.5s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}
#screen-feed.content-enter > *:nth-child(3) { animation-delay: 0.05s; }
#screen-feed.content-enter > *:nth-child(4) { animation-delay: 0.10s; }
#screen-feed.content-enter > *:nth-child(5) { animation-delay: 0.15s; }
#screen-feed.content-enter > *:nth-child(n+6) { animation-delay: 0.19s; }
@keyframes contentRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Tabbar MASQUÉE pendant le splash (écran propre au lancement), puis elle
   glisse + apparaît une fois le chargement fini — via la transition de #tabbar
   (le translateX(-50%) de centrage est conservé). */
#screen-feed.loading:not([hidden]) ~ #tabbar { opacity: 0; transform: translate(-50%, 44px); }
#screen-feed.loading:not([hidden]) ~ #tabbar .tabbar-pill,
#screen-feed.loading:not([hidden]) ~ #tabbar .tabbar-solo { pointer-events: none; }
/* En-tête du feed (logo + chips) MASQUÉ pendant le splash : glissé vers le HAUT
   (le translateX(-50%) de centrage est conservé), il redescend une fois le
   chargement fini via la transition de #feed-header. Même esprit que la tabbar. */
#screen-feed.loading:not([hidden]) ~ #feed-header {
  opacity: 0; transform: translate(-50%, -56px); pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark-splash,
  .feed-loading.leaving, .feed-loading.leaving .brand-mark-splash,
  .app-splash .brand-mark-splash,
  .app-splash.leaving, .app-splash.leaving .brand-mark-splash,
  #screen-feed.content-enter > *:not(#feed-loading) { animation: none; }
}

/* Bouton « voir plus » (historique d'enchères, questions, porte-monnaie,
   mes annonces) : discret, pleine largeur, façon leboncoin. */
.load-more {
  display: block; width: 100%; margin: 10px 0 2px; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  color: var(--ink-soft); font-size: 14px; font-weight: 700; cursor: pointer;
}
.load-more:hover { background: var(--chip-bg); }
.load-more:disabled { opacity: 0.55; cursor: default; }

/* ---------- Feed groupé : sections de catégories personnalisées ---------- */
#feed-sections { display: flex; flex-direction: column; }
.feed-section { margin-top: 0; }
.feed-section-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 8px 8px; background: none; border: none; text-align: left;
  cursor: pointer; transition: opacity 0.1s;
}
.feed-section-head:active { opacity: 0.7; }
.fs-titlewrap { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.fs-icon { font-size: 21px; flex-shrink: 0; }
.fs-txt { min-width: 0; }
.fs-title { font-size: 17px; font-weight: 900; letter-spacing: -0.3px; }
.fs-sub { font-size: 11.5px; font-weight: 800; color: var(--orange); margin-top: 1px; }
.fs-chev { font-size: 22px; color: var(--muted); flex-shrink: 0; line-height: 1; }
/* Section « À la une » (boost payant) : tête non cliquable (pas de page « voir
   plus ») + titre en accent doré, cohérent avec le badge ⭐ des cartes. */
.feed-section-boost .feed-section-head { cursor: default; }
.feed-section-boost .fs-title { color: #E8830F; }
/* Rangée horizontale d'aperçu (façon Vinted/leboncoin), scroll au doigt. Les
   cartes sont DIMENSIONNÉES À LA LARGEUR (≈ 2 par écran + un aperçu de la 3ᵉ) au
   lieu d'un 150px fixe : sur les sections peu fournies (1–2 annonces) une carte
   plus large remplit l'écran au lieu de laisser un grand vide à droite. */
.fs-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 0 4px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
/* Inset latéral de 8px porté par les cartes de BORD (pas par le `padding`
   horizontal du conteneur) : sur un scroller `overflow-x` + `-webkit-overflow-
   scrolling: touch`, WebKit iOS n'honore pas de façon fiable le padding-left/right
   (la 1ʳᵉ carte collait au bord à 0px, la dernière voyait son padding-right rogné),
   alors que la grille « Enchères récentes » (.grid, padding 0 8px) est, elle, à
   8px. Des marges sur :first/:last-child alignent le carrousel sur la grille et le
   titre de section (8px), sans rien changer entre les cartes (gap 12px). */
.fs-row > .g-card:first-child { margin-left: 8px; }
.fs-row > .g-card:last-child { margin-right: 8px; }
.fs-row::-webkit-scrollbar { display: none; }
.fs-row .g-card {
  flex: 0 0 44%; min-width: 150px; max-width: 200px; scroll-snap-align: start;
}
.fs-row .g-photo { height: auto; aspect-ratio: 1 / 1; }
/* Section à UNE annonce : carte pleine largeur (hero) → remplit l'écran au lieu
   d'un carrousel à une carte perdu dans le vide (cf. fs-solo posé par
   renderFeedSections). Photo en PAYSAGE à hauteur fixe (plus large que haute).
   Le fond est peint en `cover` (coverBg) : les proportions de l'image sont
   TOUJOURS conservées (jamais aplatie/étirée), elle est seulement recadrée pour
   remplir le cadre — aucune déformation. */
.fs-row.fs-solo .g-card { flex: 1 1 auto; min-width: 0; max-width: none; }
.fs-row.fs-solo .g-photo { aspect-ratio: auto; height: 210px; }

/* ---------- Feed : bandeau « Enchères récentes » + pilule localisation ---- */
.feed-recent-head {
  display: flex; align-items: center; gap: 10px; padding: 18px 8px 8px;
}
.feed-recent-title {
  flex: 1; font-size: 19px; font-weight: 900; letter-spacing: -0.4px;
}
/* Barre d'outils de filtres rapides du feed (scrollable horizontalement,
   comme la barre de recherche) : « Clôture aujourd'hui » + localisation. */
.feed-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 12px; overflow-x: auto; scrollbar-width: none;
}
.feed-toolbar::-webkit-scrollbar { display: none; }
.feed-toolbar .filters-pill { flex-shrink: 0; }
#feed-ending-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Sous-titre de l'écran liste (« Recommandé pour vous ») ---------- */
.list-head-titles { min-width: 0; }
.list-subtitle { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* ---------- Remise du bien : modes de remise (Vendre + paiement) ---------- */
.deliv-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.deliv-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #FFFFFF; cursor: pointer;
}
.deliv-opt.on { border-color: var(--orange); background: #FFF8F3; }
.deliv-opt.disabled { opacity: 0.5; }
.deliv-opt input { position: absolute; opacity: 0; pointer-events: none; }
.deliv-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.deliv-ico { font-size: 22px; flex-shrink: 0; }
.deliv-name { display: block; font-size: 14.5px; font-weight: 800; }
.deliv-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
/* Pastille de sélection (case cochée OU mode choisi) */
.deliv-check {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  border: 2px solid var(--faint); background: #FFFFFF; position: relative;
}
.deliv-opt.on .deliv-check, .deliv-opt input:checked ~ .deliv-check {
  border-color: var(--orange); background: var(--orange);
}
.deliv-opt.on .deliv-check::after, .deliv-opt input:checked ~ .deliv-check::after {
  content: '✓'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: #FFFFFF;
  font-size: 13px; font-weight: 900;
}
.deliv-opts.single .deliv-opt { cursor: default; }
.deliv-opts.single .deliv-check { display: none; }
.deliv-note {
  margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45;
}
.deliv-note strong { color: var(--ink); font-weight: 800; }
.deliv-handover-note {
  margin-top: 14px; font-size: 13px; color: var(--ink); line-height: 1.5;
  background: var(--chip-bg); border-radius: 14px; padding: 14px;
}

/* ---------- Feuille de remise : recherche de point relais ---------- */
.relay-search { display: flex; gap: 8px; margin-top: 6px; }
.relay-search .f-input { flex: 1; margin-top: 0; }
.relay-search .cta { width: auto; flex-shrink: 0; padding: 0 18px; min-height: 0; }
.relay-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.relay-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 13px;
  background: #FFFFFF;
}
.relay-row.on { border-color: var(--orange); background: #FFF8F3; }
.relay-main { flex: 1; min-width: 0; }
.relay-name { font-size: 14px; font-weight: 800; }
.relay-addr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.relay-dist { font-size: 11.5px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.relay-empty { font-size: 13px; color: var(--muted); padding: 8px 2px; }

/* ---------- Détail du prix (façon Vinted) : article + protection ---------- */
.price-detail {
  margin-top: 16px; padding: 14px; border-radius: 14px;
  background: var(--chip-bg); display: flex; flex-direction: column; gap: 9px;
}
.pd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.pd-val { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* « Protection acheteurs » est cliquable (ouvre la feuille explicative) */
.pd-info {
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  color: var(--orange-dark); text-decoration: underline; text-underline-offset: 2px;
}
.pd-info::after { content: ' ⓘ'; text-decoration: none; }
.pd-total { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.pd-total .pd-label { color: var(--ink); font-weight: 800; font-size: 15px; }
.pd-total .pd-val { color: var(--ink); font-weight: 900; font-size: 16px; }
#delivery-pay { margin-top: 14px; }

/* ---------- Feuille « Protection acheteurs » (explicatif) ---------- */
.protect-shield {
  width: 64px; height: 64px; border-radius: 999px; margin: 8px auto 4px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--green-bg); color: var(--green-ink);
}
/* Bouclier SVG (cf. .shield-ic) dans la pastille verte et la ligne « Frais ». */
.protect-shield svg { width: 1em; height: 1em; display: block; }
.protect-intro {
  margin-top: 8px; font-size: 13.5px; color: var(--ink); line-height: 1.5;
  text-align: center;
}
.protect-block { display: flex; gap: 13px; margin-top: 18px; }
.protect-ic { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.protect-txt { min-width: 0; }
.protect-h { font-size: 14.5px; font-weight: 800; margin-bottom: 3px; }
.protect-txt p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.protect-txt em { font-style: normal; font-weight: 700; color: var(--ink); }
#protection-ok { margin-top: 22px; }

/* ---------- Feuille « Détails du prix » (ouverte depuis le prix) ---------- */
.pdx-item { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.pdx-thumb {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: var(--chip-bg);
}
.pdx-item-txt { min-width: 0; }
.pdx-item-title {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pdx-item-price { font-size: 14px; font-weight: 900; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pdx-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line); margin-top: 4px;
}
.pdx-label {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: none; border: 0; padding: 0; text-align: left;
}
.pdx-ic { font-size: 18px; flex-shrink: 0; }
/* SEULE l'icône « Frais de Protection acheteurs » est le bouclier (SVG/emoji,
   vert) — JAMAIS celle du « Total » (💳, intacte). */
.pdx-shield { display: inline-flex; align-items: center; color: var(--green-ink); }
.pdx-shield svg { width: 1em; height: 1em; display: block; }
.pdx-info { cursor: pointer; }
.pdx-info::after { content: 'ⓘ'; color: var(--muted2); font-size: 13px; }
.pdx-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pdx-total .pdx-label { font-weight: 800; }
.pdx-total .pdx-val { font-weight: 900; }
.pdx-note {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}

/* ---------- Panneau « Remise du bien » sur la fiche ---------- */
.fulfil-card {
  margin: 16px 0; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px; background: #FFFFFF;
}
.fulfil-head { display: flex; }
.fulfil-badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; background: var(--chip-bg); color: var(--ink);
}
.fulfil-badge.hold { background: #FDEEE3; color: var(--orange-dark); }
.fulfil-badge.ship { background: #E6EEFB; color: #2456B8; }
.fulfil-badge.done { background: var(--green-bg); color: var(--green-ink); }
.fulfil-badge.dispute { background: #FBE6E6; color: #B83232; }
.fulfil-body { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.fulfil-line { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.fulfil-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.fulfil-actions:empty { margin-top: 0; }
.fulfil-actions .cta { min-height: 46px; }

/* ---------- Vendre : net estimé du vendeur (après commission) ---------- */
.sell-net-hint {
  margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: var(--green-bg); color: var(--green-ink);
  font-size: 13px; font-weight: 700; line-height: 1.45;
}
.sell-net-hint:empty { display: none; }
.recap-net {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 13px 14px; border-radius: 13px; background: var(--green-bg);
}
.recap-net-label { font-size: 12.5px; font-weight: 700; color: var(--green-ink); flex: 1; min-width: 0; }
/* La valeur (« au moins 97 € ») ne se coupe JAMAIS : c'est le libellé qui
   absorbe la largeur, le montant reste d'un seul tenant. */
.recap-net-val {
  font-size: 15px; font-weight: 900; color: var(--green-ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}

/* ---------- Feuille « Montant en attente » (détail du séquestre) ---------- */
/* Total rappelé en tête de la feuille (== escrow_cents), puis une ligne par
   vente en cours (réutilise .p-row / .p-row-tap / .w-amount du porte-monnaie). */
.pending-total {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 10px; padding: 12px 14px; border-radius: 13px;
  background: var(--chip-bg); font-size: 14px; font-weight: 700; color: var(--ink);
}
.pending-total strong {
  font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums;
}
/* État « action requise » (envoi à expédier / litige) : orange, distinct de la
   date de libération (neutre). */
.p-row-time.pending-warn { color: var(--orange-dark); font-weight: 700; }

