/* VivaFête — Advertising module (sponsored listings). Builds on the design tokens of vivafete.css. */

/* ---------- Sponsored strip (marketplace pages) ---------- */
.ads-strip { margin: 1.5rem 0 2rem; padding: 1.1rem 1.1rem 1.25rem; border-radius: var(--vf-radius); background: linear-gradient(180deg, #FFFDF9, #FBF4E6); border: 1px solid rgba(201,162,77,.35); }
.ads-strip__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .9rem; }
.ads-strip__why { font-size: .78rem; color: var(--vf-muted); }
.ads-strip__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ads-card { position: relative; display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border-radius: var(--vf-radius-sm); background: var(--vf-paper); border: 1px solid rgba(28,43,51,.08); box-shadow: var(--vf-shadow-soft); color: inherit; text-decoration: none; transition: transform .3s var(--vf-ease), box-shadow .3s var(--vf-ease); }
.ads-card:hover { transform: translateY(-3px); box-shadow: var(--vf-shadow); color: inherit; }
.ads-card__img { aspect-ratio: 16 / 9; background: var(--vf-sand) center / cover no-repeat; display: grid; place-items: center; color: var(--vf-gold-deep); font-size: 2rem; }
.ads-card__body { padding: .9rem 1rem 1rem; display: grid; gap: .35rem; }
.ads-card__label { position: absolute; top: .6rem; left: .6rem; }
.ads-card__title { font-family: var(--vf-font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; margin: 0; }
.ads-card__meta { font-size: .8rem; color: var(--vf-muted); }
.ads-card__cta { margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--vf-coral-deep); }
.ads-card__cta::after { content: " →"; }

/* ---------- Plan picker (radio cards) ---------- */
.ads-plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ads-plan { position: relative; display: block; cursor: pointer; }
.ads-plan input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ads-plan__box { height: 100%; padding: 1.25rem 1.25rem 1.1rem; border-radius: var(--vf-radius-sm); background: var(--vf-paper); border: 2px solid rgba(28,43,51,.1); transition: border-color .25s, box-shadow .25s; }
.ads-plan input:checked + .ads-plan__box { border-color: var(--vf-gold); box-shadow: var(--vf-shadow-soft); background: linear-gradient(180deg, #FFFDF9, #FBF4E6); }
.ads-plan input:focus-visible + .ads-plan__box { outline: 3px solid rgba(201,162,77,.5); outline-offset: 2px; }
.ads-plan__name { font-family: var(--vf-font-display); font-size: 1.35rem; font-weight: 600; }
.ads-plan__price { font-family: var(--vf-font-display); font-size: 2rem; line-height: 1.1; margin: .3rem 0 .15rem; }
.ads-plan__note { font-size: .75rem; color: var(--vf-muted); }
.ads-plan__tag { display: inline-block; margin-bottom: .5rem; }

/* ---------- Image picker ---------- */
.ads-images { display: flex; flex-wrap: wrap; gap: .75rem; }
.ads-image { position: relative; cursor: pointer; }
.ads-image input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ads-image__thumb { width: 120px; height: 80px; border-radius: 10px; background: var(--vf-sand) center / cover no-repeat; border: 2px solid rgba(28,43,51,.1); display: grid; place-items: end start; padding: .3rem; font-size: .7rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ads-image input:checked + .ads-image__thumb { border-color: var(--vf-gold); box-shadow: 0 0 0 3px rgba(201,162,77,.25); }

/* ---------- Creative preview ---------- */
.ads-preview { max-width: 360px; }
.ads-preview .ads-card { pointer-events: none; }
.ads-preview__hint { font-size: .78rem; color: var(--vf-muted); margin-top: .5rem; }

/* ---------- Availability ---------- */
.ads-availability { font-size: .85rem; padding: .6rem .8rem; border-radius: 10px; background: var(--vf-petrol-soft); color: var(--vf-petrol-deep); }
.ads-availability.is-ok { background: #DDF0E6; color: var(--vf-success); }
.ads-availability.is-full { background: #F8DDD9; color: var(--vf-danger); }

/* ---------- Stats ---------- */
.ads-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ads-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10px, 1fr); align-items: end; gap: 4px; height: 140px; padding: .5rem 0 0; border-bottom: 1px solid rgba(28,43,51,.12); }
.ads-bars__bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.ads-bars__imp { background: var(--vf-petrol-soft); border-radius: 4px 4px 0 0; min-height: 2px; }
.ads-bars__clk { background: var(--vf-coral); border-radius: 4px 4px 0 0; min-height: 0; }
.ads-bars__bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; background: var(--vf-ink); color: #fff; padding: .25rem .5rem; border-radius: 6px; margin-bottom: 4px; }
.ads-legend { display: flex; gap: 1rem; font-size: .75rem; color: var(--vf-muted); margin-top: .5rem; }
.ads-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; }
.ads-progress { height: 8px; border-radius: 999px; background: var(--vf-sand); overflow: hidden; }
.ads-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--vf-gold-light), var(--vf-gold)); }
.ads-perf { font-family: var(--vf-font-display); font-size: 1.6rem; font-weight: 600; }
.ads-perf--up { color: var(--vf-success); }
.ads-perf--down { color: var(--vf-warning); }

/* ---------- Admin ---------- */
.ads-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.ads-tabs a { padding: .45rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 500; background: var(--vf-paper); border: 1px solid rgba(28,43,51,.1); color: var(--vf-ink-soft); }
.ads-tabs a.is-active { background: var(--vf-petrol); color: #fff; border-color: var(--vf-petrol); }
.ads-tabs a small { opacity: .7; margin-left: .3rem; }
.ads-heat { font-size: .78rem; }
.ads-heat th, .ads-heat td { padding: .35rem .4rem; text-align: center; }
.ads-heat td:first-child, .ads-heat th:first-child { text-align: left; white-space: nowrap; }
.ads-heat__cell { width: 28px; height: 28px; line-height: 28px; border-radius: 6px; display: inline-block; font-weight: 600; }
.ads-heat__cell--0 { background: var(--vf-sand); color: var(--vf-muted); }
.ads-heat__cell--1 { background: #DDF0E6; color: var(--vf-success); }
.ads-heat__cell--2 { background: #FBEFD5; color: #8A5E0C; }
.ads-heat__cell--3 { background: #F8DDD9; color: var(--vf-danger); }
.ads-heat__cell--over { background: var(--vf-danger); color: #fff; }

/* ---------- Public page ---------- */
.ads-hero { padding: clamp(48px, 8vw, 110px) 0 clamp(32px, 5vw, 64px); background: radial-gradient(900px 420px at 10% -10%, rgba(233,215,163,.45), transparent 60%), radial-gradient(700px 360px at 95% 0%, rgba(217,232,235,.6), transparent 60%); }
.ads-rules { display: grid; gap: .75rem; }
.ads-rules li { display: flex; gap: .7rem; align-items: flex-start; }
.ads-rules li::before { content: "✦"; color: var(--vf-gold); margin-top: .25rem; font-size: .8rem; }
.ads-faq details { border-bottom: 1px solid rgba(28,43,51,.08); padding: .7rem 0; }
.ads-faq summary { cursor: pointer; font-weight: 600; }
.ads-faq p { margin: .5rem 0 0; color: var(--vf-ink-soft); }
.ads-inline-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ads-inline-actions input { min-width: 220px; }
.ads-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .88rem; }
.ads-timeline li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed rgba(28,43,51,.1); padding-bottom: .3rem; }
.ads-timeline span:last-child { color: var(--vf-muted); white-space: nowrap; }
