/* Styles de l'écran traqueur. Tout est préfixé par .e-traqueur et passe par les variables de core.css. */

/* ---- la carte du parcours : un point par visiteuse ---- */
.e-traqueur .cp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; align-items: end; min-height: 150px; }
.e-traqueur .cp-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; padding: 8px 2px 6px; border-radius: var(--r-2); background: var(--surface-2); }
.e-traqueur .cp-col.fin { background: var(--bon-doux); }
.e-traqueur .cp-pts { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; min-height: 50px; justify-content: flex-start; flex: 1; width: 100%; }
.e-traqueur .cp-pt { width: 12px; height: 12px; border-radius: 50%; background: var(--c5); flex: none; animation: tq-apparait .4s cubic-bezier(.2, .8, .2, 1); }
.e-traqueur .cp-col .chiffre { font-size: var(--t-17); line-height: 1; font-variant-numeric: tabular-nums; }
.e-traqueur .cp-col small { font-size: 10px; line-height: 1.1; color: var(--encre-2); text-align: center; overflow-wrap: anywhere; hyphens: auto; }
@keyframes tq-apparait { from { transform: scale(0); } }

/* ---- la liste des visites ---- */
.e-traqueur .vl { display: flex; flex-direction: column; }
.e-traqueur .vl-ligne { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--trait); min-width: 0; min-height: 44px; }
.e-traqueur .vl-ligne:last-child { border-bottom: 0; }
.e-traqueur .vl-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.e-traqueur .vl-haut b { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-15); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-traqueur .vl-sous { color: var(--encre-2); font-size: var(--t-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-traqueur .vl-bas { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--t-13); color: var(--encre-2); }
.e-traqueur .vl-bas b { color: var(--encre); }
.e-traqueur .vl-doute { display: inline-flex; align-items: center; gap: 4px; color: var(--attention); font-weight: 600; }
.e-traqueur .vl-doute .ico { width: 14px; height: 14px; }
.e-traqueur .mf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.e-traqueur .mf i { height: 6px; border-radius: 3px; background: var(--creux); }
.e-traqueur .mf i.on { background: var(--c5); }
.e-traqueur .mf i.achat { background: var(--bon); }

/* ---- la frise dans la feuille (le contenu est enveloppé dans .e-traqueur.fe) ---- */
.e-traqueur.fe { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.e-traqueur .fe-tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.e-traqueur .fe-tete > div { min-width: 0; display: flex; flex-direction: column; }
.e-traqueur .fe-tete .vignette { width: 84px; flex: none; }
.e-traqueur .fe-tete small { color: var(--encre-2); font-size: var(--t-13); }
.e-traqueur .fr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.e-traqueur .fr li { display: grid; grid-template-columns: 38px 18px minmax(0, 1fr); gap: 8px; position: relative; padding-bottom: 14px; }
.e-traqueur .fr li::before { content: ""; position: absolute; left: 38px; margin-left: 15px; top: 14px; bottom: -2px; width: 2px; background: var(--trait-fort); }
.e-traqueur .fr li:last-child::before { display: none; }
.e-traqueur .fr time { color: var(--encre-3); font-size: var(--t-11); padding-top: 2px; text-align: right; }
.e-traqueur .fr .fr-pt { width: 12px; height: 12px; border-radius: 50%; margin: 3px 0 0 3px; background: var(--c5); position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.e-traqueur .fr li > div { display: flex; flex-direction: column; min-width: 0; }
.e-traqueur .fr b { font-size: var(--t-15); font-weight: 700; }
.e-traqueur .fr small { color: var(--encre-2); font-size: var(--t-13); }
.e-traqueur .fr .fr-page .fr-pt, .fr .fr-defile .fr-pt { background: var(--trait-fort); }
.e-traqueur .fr .fr-defile b, .fr .fr-page b { font-weight: 500; color: var(--encre-2); font-size: var(--t-13); }
.e-traqueur .fr .fr-doute .fr-pt { background: var(--attention); width: 14px; height: 14px; margin: 2px 0 0 2px; }
.e-traqueur .fr .fr-doute b { color: var(--attention); }
.e-traqueur .fr .fr-achat .fr-pt { background: var(--bon); width: 16px; height: 16px; margin: 1px 0 0 1px; }
.e-traqueur .fr .fr-achat b { color: var(--bon); }

/* ---- par pub ---- */
.e-traqueur .pp-hero { background: var(--hero); color: var(--sur-hero); border-radius: var(--r-4) var(--r-4) var(--r-4) var(--r-1); padding: 16px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; box-shadow: var(--ombre); }
.e-traqueur .pp-hero::before { content: ""; position: absolute; right: -60px; top: -70px; width: 190px; height: 190px; border-radius: 50%; background: var(--hero-2); }
.e-traqueur .pp-hero > * { position: relative; }
.e-traqueur .pp-hero .etiquette { color: var(--sur-hero-2); }
.e-traqueur .pp-nom { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-17); overflow-wrap: anywhere; }
.e-traqueur .pp-nb { font-size: clamp(2.6rem, 17cqw, 3.4rem); line-height: .95; letter-spacing: -.02em; }
.e-traqueur .pp-hero p { color: var(--sur-hero-2); font-size: var(--t-13); }
.e-traqueur .ht { display: flex; flex-direction: column; }
.e-traqueur .ht-tete { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr)); gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--trait-fort); }
.e-traqueur .ht-tete small { font-size: 10px; line-height: 1.1; color: var(--encre-2); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.e-traqueur .ht-ligne { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--trait); min-height: 48px; }
.e-traqueur .ht-ligne:last-child { border-bottom: 0; }
.e-traqueur .ht-nom { display: flex; flex-direction: column; min-width: 0; padding-right: 4px; }
.e-traqueur .ht-nom b { font-size: var(--t-11); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.e-traqueur .ht-nom small { color: var(--encre-3); font-size: 10px; }
.e-traqueur .ht-cell { position: relative; height: 30px; border-radius: 8px; background: var(--creux); overflow: hidden; display: grid; place-items: center; min-width: 0; }
.e-traqueur .ht-cell i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c5-doux); }
.e-traqueur .ht-cell b { position: relative; font-size: var(--t-11); font-weight: 700; }

/* ---- abandons ---- */
.e-traqueur .dt { display: flex; flex-direction: column; gap: 14px; }
.e-traqueur .dt-ligne { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.e-traqueur .dt-haut { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.e-traqueur .dt-haut b:first-child { font-size: var(--t-15); font-weight: 700; min-width: 0; }
.e-traqueur .dt-haut .chiffre { font-size: var(--t-22); line-height: 1; color: var(--attention); font-variant-numeric: tabular-nums; flex: none; }
.e-traqueur .dt-barre { height: 7px; border-radius: 4px; background: var(--creux); overflow: hidden; }
.e-traqueur .dt-barre i { display: block; height: 100%; border-radius: 4px; background: var(--attention); }
.e-traqueur .dt-ligne small { color: var(--encre-2); font-size: var(--t-13); }

.e-traqueur .pl { display: flex; flex-direction: column; gap: 12px; }
.e-traqueur .pl-ligne { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.e-traqueur .pl-nom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.e-traqueur .pl-nom b:first-child { font-size: var(--t-13); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.e-traqueur .pl-nom .chiffre { font-size: var(--t-17); flex: none; font-variant-numeric: tabular-nums; }
.e-traqueur .pl-barre { height: 8px; border-radius: 4px; background: var(--creux); overflow: hidden; }
.e-traqueur .pl-barre i { display: block; height: 100%; border-radius: 4px; background: var(--c5); }
.e-traqueur .pl-ligne small { color: var(--encre-2); font-size: var(--t-11); }

/* ---- ajouts propres à l'écran branché ---- */
.e-traqueur .tq-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.e-traqueur .tq-haut .discret { min-width: 0; }
.e-traqueur .tq-note { padding: 0 2px; }
.e-traqueur .vl-sous, .e-traqueur .vl-bas { min-width: 0; }
.e-traqueur .tq-vignette { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-2); flex: none; background: var(--creux); }
.e-traqueur .fe-frise { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.e-traqueur .large, .e-traqueur .demi { min-width: 0; }
@container app (min-width: 700px) {
  .e-traqueur .tq-mob { display: none; }
  .e-traqueur .pp-hero { padding: 24px 28px; }
  .e-traqueur .pp-nb { font-size: 4rem; }
  .e-traqueur .cp { min-height: 190px; gap: 8px; }
  .e-traqueur .cp-col small { font-size: var(--t-11); }
  .e-traqueur .vl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .e-traqueur .vl .vide { grid-column: 1 / -1; }
  .e-traqueur .ht-nom b { font-size: var(--t-13); }
  .e-traqueur .ht-tete small { font-size: var(--t-11); }
}
@container app (max-width: 699px) {
  .e-traqueur .tq-mob + .carte > .carte-tete h3 { display: none; }
}
