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

/* ---------- héros ---------- */
.e-pubs .hero { background: var(--hero); color: var(--sur-hero); border-radius: var(--r-4) var(--r-4) var(--r-4) var(--r-1); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; box-shadow: var(--ombre); }
.e-pubs .hero::before { content: ""; position: absolute; right: -70px; top: -90px; width: 230px; height: 230px; border-radius: 50%; background: var(--hero-2); }
.e-pubs .hero > * { position: relative; }
.e-pubs .hero-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.e-pubs .hero .etiquette { color: var(--sur-hero-2); }
.e-pubs .hero-net { font-size: clamp(2.6rem, 17cqw, 3.6rem); line-height: .95; letter-spacing: -.02em; }
.e-pubs .hero.compact .hero-net { font-size: clamp(2.2rem, 13cqw, 3rem); }
.e-pubs .hero-phrase { color: var(--sur-hero-2); font-size: var(--t-13); max-width: 34em; }
.e-pubs .hero-phrase b { color: var(--sur-hero); }
.e-pubs .horizon { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.e-pubs .horizon-piste { position: relative; height: 14px; border-radius: 7px; background: var(--hero-2); }
.e-pubs .horizon-piste i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--sur-hero); min-width: 8px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.e-pubs .horizon-piste b { position: absolute; top: -7px; bottom: -7px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--sur-hero); }
.e-pubs .horizon-piste b span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; font-family: var(--f-titre); font-stretch: 112%; font-size: var(--t-11); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--sur-hero); }
.e-pubs .hero.sous .horizon-piste i { background: var(--critique-doux); }
.e-pubs .horizon-bas { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-13); color: var(--sur-hero-2); }
.e-pubs .horizon-bas b { color: var(--sur-hero); font-variant-numeric: tabular-nums; }
.e-pubs .hero-compte { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hero-2); font-size: var(--t-13); color: var(--sur-hero-2); }
.e-pubs .hero-compte b { color: var(--sur-hero); font-size: var(--t-17); margin-right: 3px; }

/* ---------- le semis des pubs ---------- */
.e-pubs .semis-piste { position: relative; height: 128px; border-radius: var(--r-2); overflow: hidden; background: var(--creux); margin: 4px 14px 0 14px; }
.e-pubs .semis-zone { position: absolute; top: 0; bottom: 0; left: 0; }
.e-pubs .semis-zone.critique { background: var(--critique-doux); }
.e-pubs .semis-zone.bon { background: var(--bon-doux); }
.e-pubs .semis-seuil { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--encre); }
.e-pubs .point { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 2.5px var(--surface); animation: pubs-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; min-width: 14px; min-height: 14px; }
.e-pubs .point::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.e-pubs .point.bon { background: var(--bon); }
.e-pubs .point.critique { background: var(--critique); }
@keyframes pubs-pop { from { transform: translate(-50%, -50%) scale(.2); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.e-pubs .semis-axe { position: relative; height: 18px; margin: -4px 14px 0 14px; font-size: var(--t-11); color: var(--encre-2); font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; }
.e-pubs .semis-axe-seuil { position: absolute; transform: translateX(-50%); font-weight: 800; color: var(--encre); white-space: nowrap; }

/* ---------- filtres ---------- */
.e-pubs .barre-filtres { display: flex; flex-direction: column; gap: 8px; }
.e-pubs .tri-ligne { display: flex; align-items: center; gap: 10px; min-width: 0; }
.e-pubs .tri-ligne .etiquette { flex: none; }
.e-pubs .tri-ligne .puces { min-width: 0; flex: 1; }

/* ---------- carte d'une pub ---------- */
.e-pubs .pub-liste { display: flex; flex-direction: column; gap: 10px; }
.e-pubs .pub-carte, .e-pubs .camp-carte { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 12px 14px 14px 16px; min-width: 0; background: var(--surface); color: var(--encre); border-radius: var(--r-3) var(--r-3) var(--r-3) var(--r-1); box-shadow: var(--ombre), inset 4px 0 0 var(--trait-fort); text-align: left; transition: transform .12s; position: relative; overflow: hidden; }
.e-pubs .pub-carte:active, .e-pubs .camp-carte:active { transform: scale(.985); }
.e-pubs .pub-carte.bon, .e-pubs .camp-carte.bon { box-shadow: var(--ombre), inset 4px 0 0 var(--bon); }
.e-pubs .pub-carte.critique, .e-pubs .camp-carte.critique { box-shadow: var(--ombre), inset 4px 0 0 var(--critique); }
.e-pubs .pc-haut, .e-pubs .cc-haut { display: flex; align-items: center; gap: 10px; min-width: 0; }
.e-pubs .pc-vig { flex: none; width: 40px; }
.e-pubs .pc-vig .vignette-duree, .e-pubs .lg-vig .vignette-duree { display: none; }
.e-pubs .pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.e-pubs .pc-id b { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-15); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.e-pubs .pc-id small { color: var(--encre-2); font-size: var(--t-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-pubs .pc-roas { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.e-pubs .pc-roas b { font-size: var(--t-30); line-height: 1; }
.e-pubs .pc-roas small { color: var(--encre-2); font-size: var(--t-11); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.e-pubs .pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.e-pubs .mini-stat { display: flex; flex-direction: column; min-width: 0; }
.e-pubs .mini-stat small { color: var(--encre-2); font-size: var(--t-11); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-pubs .mini-stat b { font-size: var(--t-17); line-height: 1.15; white-space: nowrap; }
.e-pubs .roas-barre { position: relative; height: 8px; border-radius: 4px; background: var(--creux); overflow: visible; }
.e-pubs .roas-barre.haute { height: 14px; border-radius: 7px; }
.e-pubs .roas-barre i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; min-width: 4px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.e-pubs .roas-barre i.bon { background: var(--bon); }
.e-pubs .roas-barre i.critique { background: var(--critique); }
.e-pubs .roas-barre u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--encre); text-decoration: none; }

/* ---------- campagnes ---------- */
.e-pubs .cc-id { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; }
.e-pubs .cc-puce { width: 12px; height: 12px; border-radius: 4px; background: var(--teinte); grid-row: 1 / 3; }
.e-pubs .cc-id b { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-15); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-pubs .cc-id small { color: var(--encre-2); font-size: var(--t-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-pubs .cc-bas { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--trait); }
.e-pubs .cc-bande-titre { font-size: var(--t-11); color: var(--encre-2); }
.e-pubs .bande { display: flex; gap: 3px; height: 12px; }
.e-pubs .bande i { border-radius: 3px; min-width: 4px; }
.e-pubs .bande i.bon { background: var(--bon); }
.e-pubs .bande i.critique { background: var(--critique); }
.e-pubs .bande i.vide { background: var(--creux); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.e-pubs .cc-budget { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: var(--t-13); margin-top: 4px; }
.e-pubs .cc-budget > span:first-child { color: var(--encre-2); }
.e-pubs .cc-piste { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--creux); overflow: hidden; }
.e-pubs .cc-piste i { display: block; height: 100%; background: var(--teinte); border-radius: 3px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }

/* ---------- attribution ---------- */
.e-pubs .trio { background: var(--surface); border-radius: var(--r-4) var(--r-4) var(--r-4) var(--r-1); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--ombre); }
.e-pubs .trio-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.e-pubs .trio-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.e-pubs .trio-col { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px 10px 10px; border-radius: var(--r-2) var(--r-2) var(--r-2) var(--r-1); background: var(--teinte-doux); min-width: 0; }
.e-pubs .trio-col small { font-size: var(--t-11); font-weight: 700; color: var(--encre-2); line-height: 1.2; min-height: 2.4em; }
.e-pubs .trio-col b { font-size: var(--t-30); line-height: 1; color: var(--teinte); }
.e-pubs .trio-col span { font-size: var(--t-11); color: var(--encre-2); line-height: 1.25; }
.e-pubs .trio-col.ref { box-shadow: inset 0 0 0 2px var(--teinte); }
.e-pubs .trio-phrase { font-size: var(--t-13); color: var(--encre-2); }
.e-pubs .at-tete { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px 44px; gap: 8px; font-size: var(--t-11); color: var(--encre-3); text-align: right; margin-bottom: -6px; }
.e-pubs .at-rang { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px 44px; gap: 8px; align-items: center; font-size: var(--t-13); }
.e-pubs .at-lab { font-weight: 700; color: var(--teinte); }
.e-pubs .at-piste { height: 10px; border-radius: 3px 5px 5px 3px; background: var(--creux); position: relative; overflow: hidden; }
.e-pubs .at-piste i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teinte); border-radius: 3px 5px 5px 3px; min-width: 3px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.e-pubs .at-rang b { text-align: right; }
.e-pubs .at-roas { text-align: right; font-weight: 700; }

/* ---------- argent réel ---------- */
.e-pubs .cascade { display: flex; flex-direction: column; gap: 2px; }
.e-pubs .casc-ligne { display: flex; flex-direction: column; gap: 5px; padding: 9px 0; border-bottom: 1px solid var(--trait); min-height: 44px; width: 100%; text-align: left; }
.e-pubs .casc-ligne:last-child { border-bottom: 0; }
.e-pubs .casc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.e-pubs .casc-lab { font-weight: 600; font-size: var(--t-15); }
.e-pubs .casc-ligne.debut .casc-lab, .e-pubs .casc-ligne.total .casc-lab { font-family: var(--f-titre); font-weight: 800; }
.e-pubs .casc-tete b { font-size: var(--t-17); }
.e-pubs .casc-piste { position: relative; height: 12px; border-radius: 4px; background: var(--creux); overflow: hidden; }
.e-pubs .casc-piste i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--teinte, var(--c1)); animation: pubs-grandit .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes pubs-grandit { from { transform: scaleX(.05); opacity: .3; } to { transform: scaleX(1); opacity: 1; } }
.e-pubs .casc-ligne.total .casc-piste { height: 16px; }
.e-pubs .et-tete { display: flex; align-items: baseline; gap: 10px; }
.e-pubs .et-tete b { font-size: var(--t-44); line-height: 1; }

/* ---------- feuilles ---------- */
.e-pubs .f-tete { display: flex; gap: 12px; align-items: flex-start; }
.e-pubs .f-vig { flex: none; width: 76px; }
.e-pubs .f-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.e-pubs .f-id b { font-family: var(--f-titre); font-weight: 800; font-size: var(--t-17); line-height: 1.2; }
.e-pubs .f-accroche { font-size: var(--t-13); color: var(--encre-2); font-style: italic; }
.e-pubs .f-pas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.e-pubs .f-roas { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-3) var(--r-3) var(--r-3) var(--r-1); background: var(--creux); }
.e-pubs .f-roas-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.e-pubs .f-roas-val { font-size: var(--t-44); line-height: 1; }
.e-pubs .f-roas-bas { display: flex; justify-content: space-between; font-size: var(--t-11); color: var(--encre-2); }
.e-pubs .roas-barre { position: relative; height: 14px; border-radius: 7px; background: var(--surface); }
.e-pubs .roas-barre i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; min-width: 4px; }
.e-pubs .roas-barre i.bon { background: var(--bon); }
.e-pubs .roas-barre i.critique { background: var(--critique); }
.e-pubs .roas-barre u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--encre); }
.e-pubs .f-bloc { display: flex; flex-direction: column; gap: 8px; }
.e-pubs .f-bloc h3 { color: var(--encre-2); }
.e-pubs .lg-vig { display: block; width: 34px; flex: none; }
.e-pubs .et-tete { display: flex; align-items: baseline; gap: 10px; }
.e-pubs .et-tete b { font-size: var(--t-44); line-height: 1; }

.e-pubs .f-corps, .e-pubs.f-corps { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* tour 2 : note du héros, fondu de bord sur les puces qui défilent, seuil sous le ROAS */
.e-pubs .hero > p.discret { color: var(--sur-hero-2); font-size: var(--t-13); line-height: 1.35; margin: 0; }
.e-pubs .puces { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); padding-right: 24px; }
.e-pubs .pc-roas small { text-transform: none; letter-spacing: 0; font-size: var(--t-11); }

.e-pubs { --t-11: .75rem; }

.e-pubs .hero .discret + .horizon { margin-top: 34px; }


/* ======== ajouts pour le vrai cockpit ======== */
/* vignette d'une pub (image réelle, repli sans image) */
.e-pubs .vig { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-2) var(--r-2) var(--r-2) var(--r-1); overflow: hidden; background: var(--creux); }
.e-pubs .vig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.e-pubs .vig.sans-image { display: flex; align-items: center; justify-content: center; color: var(--encre-3); }
.e-pubs .vig.sans-image .ico { width: 40%; height: auto; max-height: 60%; }
.e-pubs .pc-vig { width: 38px; }
.e-pubs .lg-vig { width: 30px; }
.e-pubs .f-vig { width: 72px; }
/* héros quand la donnée est inconnue : gris, jamais un chiffre à zéro */
.e-pubs .hero.inconnu { background: var(--creux); color: var(--encre); box-shadow: inset 0 0 0 2px var(--trait-fort); }
.e-pubs .hero.inconnu::before { background: var(--surface); }
.e-pubs .hero.inconnu .etiquette, .e-pubs .hero.inconnu .hero-phrase, .e-pubs .hero.inconnu .hero-note, .e-pubs .hero.inconnu .horizon-bas { color: var(--encre-2); }
.e-pubs .hero.inconnu .hero-phrase b, .e-pubs .hero.inconnu .horizon-bas b { color: var(--encre); }
.e-pubs .hero.inconnu .hero-compte { border-top-color: var(--trait-fort); color: var(--encre-2); }
.e-pubs .hero.inconnu .hero-compte b { color: var(--encre); }
.e-pubs .hero-net.nd { font-size: clamp(1.6rem, 9cqw, 2.4rem); line-height: 1.05; letter-spacing: 0; }
.e-pubs .hero-note { margin: 0; }
.e-pubs .horizon.sans-barre { margin-top: 6px; }
.e-pubs .hero .hero-note + .horizon { margin-top: 28px; }
.e-pubs .hero .hero-note + .horizon.sans-barre { margin-top: 8px; }
.e-pubs .barre-filtres .puces { -webkit-mask-image: none; mask-image: none; padding-right: 0; }
.e-pubs .tri-ligne .puces { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); padding-right: 24px; }
.e-pubs .pc-id small, .e-pubs .cc-id small { max-width: 100%; }
.e-pubs .pub-zone { display: block; min-width: 0; }
.e-pubs .pub-table { display: none; min-width: 0; }
.e-pubs .camp-liste { display: flex; flex-direction: column; gap: 10px; }
.e-pubs .cc-puce { background: var(--teinte, var(--c1)); }
.e-pubs .at-rang { grid-template-columns: 62px minmax(0, 1fr) 34px 56px; }
.e-pubs .at-euro { text-align: right; color: var(--encre-2); font-size: var(--t-13); }
.e-pubs .tb-nom { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.e-pubs .tb-nom .vig { width: 30px; flex: none; }
.e-pubs .tb-nom span:last-child { white-space: normal; max-width: 22em; font-weight: 600; }
.e-pubs .pub-table td, .e-pubs .pub-table th { white-space: nowrap; }
.e-pubs .pub-table tr[data-clic] { cursor: pointer; }
.e-pubs .large, .e-pubs .demi, .e-pubs .carte { min-width: 0; }
.e-pubs .est-bon-texte { color: var(--bon); }
.e-pubs .est-critique-texte { color: var(--critique); }
.e-pubs .casc-lab { min-width: 0; }
@container app (min-width: 700px) {
  .e-pubs .hero { padding: 26px 30px 24px; gap: 10px; }
  .e-pubs .hero-net { font-size: 4.4rem; }
  .e-pubs .hero.compact .hero-net { font-size: 3.4rem; }
  .e-pubs .hero-net.nd { font-size: 2.2rem; }
  .e-pubs .hero-phrase { font-size: var(--t-15); }
  .e-pubs .pub-liste, .e-pubs .camp-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .e-pubs .barre-filtres { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
  .e-pubs .barre-filtres .puces { flex-wrap: wrap; }
  .e-pubs .semis-piste { height: 180px; }
  .e-pubs .trio { padding: 20px 24px; }
  .e-pubs .trio-col b { font-size: 2.6rem; }
  .e-pubs .f-roas-val { font-size: 3.2rem; }
}
@container app (min-width: 1100px) {
  .e-pubs .pub-zone .pub-liste { display: none; }
  .e-pubs .pub-zone .pub-table { display: block; }
  .e-pubs .camp-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* tableau des pubs sur grand écran : tout tient sans défiler */
.e-pubs .pub-table th { white-space: normal; line-height: 1.15; vertical-align: bottom; font-size: var(--t-11); letter-spacing: .03em; padding-left: 8px; padding-right: 8px; }
.e-pubs .pub-table td { padding-left: 8px; padding-right: 8px; }
.e-pubs .pub-table td:first-child, .e-pubs .pub-table th:first-child { min-width: 250px; white-space: normal; padding-left: 12px; }
.e-pubs .pub-table td:first-child span { white-space: normal; max-width: none; }
.e-pubs .pub-table td:not(:first-child), .e-pubs .pub-table th:not(:first-child) { text-align: right; }
.e-pubs .pub-table td:nth-child(2), .e-pubs .pub-table th:nth-child(2) { text-align: left; }
