/* =========================================================================
   Kiclic — Profil public d'un compte (kiclic.com/u/…)
   Portfolio public : donne envie de suivre le compte et d'être prévenu des
   prochains Ralis. Desktop-first, responsive jusqu'au mobile vertical.
   Dark par défaut + light. S'appuie sur colors_and_type.css (tokens + Rubik).
   Réutilise le vocabulaire visuel de la page publique d'un Rali (rp-*).
   ========================================================================= */

/* colors_and_type.css est chargé en <link> parallèle dans le <head> de la page
   (plus de @import : évitait de découvrir les polices en série après ce fichier). */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: clip;
}

/* ---------- Light theme (explicit toggle / resolved from OS) ---------- */
html[data-theme="light"] {
  --bg: #F4F4F7; --bg-elev-1: #FFFFFF; --bg-elev-2: #F7F7FA;
  --border: #E5E5EA; --border-soft: rgba(0,0,0,0.08);
  --surface-tint: rgba(0,0,0,0.05); --surface-tint-light: rgba(0,0,0,0.03); --surface-tint-strong: rgba(0,0,0,0.07);
  --fg: #0E0E12; --fg-secondary: #4B5563; --fg-muted: #8A93A2;
  --card-shadow: 0 8px 30px rgba(20,20,40,0.08);
}
html { --card-shadow: 0 18px 50px rgba(0,0,0,0.45); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Ambient backdrop ---------- */
.pp-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
/* Halos d'ambiance en radial-gradient STATIQUE (plus de filter: blur(130px)) :
   le flou runtime sur 3 cercles de ~700px en position:fixed étranglait le GPU
   mobile (écran blanc long + rendu saccadé). Un dégradé donne le même halo doux
   pour un coût de peinture quasi nul. */
.pp-bg .blob { position: absolute; border-radius: 50%; transition: opacity var(--t-base); }
.pp-bg .b1 { width: 640px; height: 640px; background: radial-gradient(circle, var(--amb-1, #5B8DEF) 0%, transparent 70%); top: -320px; left: 50%; transform: translateX(-70%); opacity: 0.14; }
.pp-bg .b2 { width: 700px; height: 700px; background: radial-gradient(circle, var(--amb-2, #E94E8B) 0%, transparent 70%); top: 24%; left: 50%; transform: translateX(20%); opacity: 0.09; }
.pp-bg .b3 { width: 540px; height: 540px; background: radial-gradient(circle, var(--amb-3, #B968C7) 0%, transparent 70%); bottom: -260px; left: 30%; opacity: 0.08; }
html[data-theme="light"] .pp-bg .blob { opacity: 0.08 !important; }

/* ===================== Top navigation ===================== */
.pp-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
/* Logo officiel <KiclicLogo> : le « Ki » (kiColor=auto = currentColor) suit le thème. */
.pp-brand { color: var(--fg); }
.pp-nav-right { display: flex; align-items: center; gap: 10px; }

/* Puce « compte connecté » — clic → profil public de l'utilisateur. */
.pp-nav-me { display: inline-flex; align-items: center; gap: 9px; padding: 4px 13px 4px 4px; border-radius: 9999px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); color: var(--fg); text-decoration: none; font-size: 13.5px; font-weight: 700; transition: background var(--t-fast), border-color var(--t-fast); }
.pp-nav-me:hover { background: var(--bg-elev-2); border-color: rgba(185,104,199,0.4); }
.pp-nav-me img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--k-gradient); }
.pp-nav-me .nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bouton « Mon espace » (→ /compte), même style que Connexion. */
.pp-nav-space { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9999px; border: 1px solid var(--border); background: var(--bg-elev-1); color: var(--fg); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast); }
.pp-nav-space:hover { border-color: rgba(185,104,199,0.4); transform: translateY(-1px); }
.pp-nav-space svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); border-radius: 9999px; }
.pp-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 9999px; background: transparent; color: var(--fg-muted); font-size: 12.5px; font-weight: 600; transition: color var(--t-fast), background var(--t-fast); }
.pp-seg button svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-seg button:hover { color: var(--fg); }
.pp-seg button.on { color: var(--fg); background: var(--bg-elev-2); box-shadow: 0 1px 2px rgba(0,0,0,0.18); }
html[data-theme="light"] .pp-seg button.on { box-shadow: 0 1px 3px rgba(20,20,40,0.10); }
.pp-nav-login { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9999px; border: 1px solid var(--border); background: var(--bg-elev-1); color: var(--fg); font-size: 13.5px; font-weight: 600; transition: border-color var(--t-fast), transform var(--t-fast); }
.pp-nav-login:hover { border-color: rgba(185,104,199,0.4); transform: translateY(-1px); }
.pp-nav-login svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ===================== Shell ===================== */
.pp-shell { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: clamp(16px, 2.4vw, 32px) clamp(16px, 4vw, 56px) 150px; }

/* ===================== Profile header ===================== */
.pp-header {
  position: relative; border-radius: 28px; overflow: hidden;
  background: var(--bg-elev-1); border: 1px solid var(--border-soft);
  box-shadow: var(--card-shadow);
}

/* ---- Cover banner ---- */
.pp-cover { position: relative; height: clamp(180px, 24vw, 300px); overflow: hidden; }
.pp-cover image-slot { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,0.7); }
.pp-cover image-slot::part(frame) {
  background:
    radial-gradient(70% 80% at 22% 16%, rgba(91,141,239,0.55), transparent 70%),
    radial-gradient(70% 80% at 84% 78%, rgba(233,78,139,0.55), transparent 70%),
    linear-gradient(135deg, #241036 0%, #0D0D1A 100%);
}
.pp-cover .cov-vig { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,10,14,0.10) 0%, transparent 36%, rgba(10,10,14,0.35) 78%, rgba(10,10,14,0.72) 100%); }
.pp-cover .cov-badges { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.cov-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9999px; background: rgba(10,10,12,0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.18); color: #fff; font-size: 12px; font-weight: 700; }
.cov-pill svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.cov-pill .star { fill: #FACC15; stroke: #FACC15; }
.cov-pill.live { background: rgba(16,185,129,0.22); border-color: rgba(16,185,129,0.5); }
.cov-pill.live .dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 8px #34D399; animation: ppPulse 1.4s var(--ease-out) infinite; }

/* ---- Identity block ---- */
.pp-id { position: relative; padding: 0 clamp(18px, 2.4vw, 34px) clamp(20px, 2.4vw, 30px); }
.pp-id-top { display: flex; align-items: flex-end; gap: 20px; }

.pp-avatar {
  position: relative; width: clamp(96px, 11vw, 132px); height: clamp(96px, 11vw, 132px);
  margin-top: clamp(-54px, -5vw, -64px); flex: 0 0 auto;
  border-radius: 30px; overflow: hidden; background: var(--bg-elev-2);
  border: 4px solid var(--bg-elev-1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.pp-avatar image-slot, .pp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-avatar image-slot::part(frame) { background: var(--k-gradient); }
/* Pro accounts get a gold ring */
body[data-account$="-pro"] .pp-avatar { border-color: transparent; background: var(--k-gradient-pro); padding: 4px; }
body[data-account$="-pro"] .pp-avatar .av-inner { position: absolute; inset: 4px; border-radius: 26px; overflow: hidden; background: var(--bg-elev-1); }
.pp-avatar .av-inner { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.pp-avatar .av-inner image-slot, .pp-avatar .av-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.pp-id-main { flex: 1 1 auto; min-width: 0; padding-bottom: 4px; }
.pp-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-name { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.025em; line-height: 1; margin: 0; }
.pp-verified { width: 24px; height: 24px; flex: 0 0 auto; }
.pp-verified svg { width: 100%; height: 100%; }
.pp-badge-pro { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 9999px; background: var(--k-gradient-pro); color: #3a2400; font-size: 12px; font-weight: 900; letter-spacing: 0.04em; box-shadow: 0 6px 18px rgba(245,158,11,0.32); }
.pp-badge-pro svg { width: 13px; height: 13px; stroke: #3a2400; stroke-width: 2.4; fill: none; }
.pp-handle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pp-handle { font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.pp-meta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9999px; background: var(--surface-tint-light); border: 1px solid var(--border-soft); font-size: 12.5px; font-weight: 600; color: var(--fg-secondary); }
.pp-meta-chip svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-meta-chip.cat { color: var(--k-violet); background: rgba(185,104,199,0.12); border-color: rgba(185,104,199,0.26); }
html[data-theme="light"] .pp-meta-chip.cat { color: #8B3FA0; }

/* ---- Actions (follow + bell + share) ---- */
.pp-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-bottom: 4px; }
.pp-follow {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 9999px; border: 0;
  background: var(--k-gradient-h); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  box-shadow: var(--shadow-button); transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.pp-follow svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 2.4; fill: none; }
.pp-follow:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(233,78,139,0.45); }
.pp-follow.on { background: var(--bg-elev-2); color: var(--fg-secondary); box-shadow: none; border: 1px solid var(--border-soft); }
.pp-follow.on .ic-add { display: none; }
.pp-follow .ic-check { display: none; }
.pp-follow.on .ic-check { display: block; }
.pp-iconbtn { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; transition: border-color var(--t-fast), transform var(--t-fast); position: relative; }
.pp-iconbtn:hover { border-color: rgba(185,104,199,0.45); transform: translateY(-2px); }
.pp-iconbtn svg { width: 19px; height: 19px; stroke: var(--fg); stroke-width: 2; fill: none; }
.pp-iconbtn.on { background: rgba(185,104,199,0.16); border-color: rgba(185,104,199,0.4); }
.pp-iconbtn.on svg { stroke: var(--k-violet); fill: var(--k-violet); }

/* ---- Bio ---- */
.pp-bio { margin: 18px 0 0; font-size: clamp(14.5px, 1.4vw, 16px); line-height: 1.6; color: var(--fg-secondary); max-width: 760px; text-wrap: pretty; }
.pp-bio b { color: var(--fg); font-weight: 700; }

/* ---- Links row ---- */
.pp-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pp-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 9999px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); font-size: 13px; font-weight: 700; transition: transform var(--t-fast), border-color var(--t-fast); }
.pp-link:hover { transform: translateY(-2px); border-color: rgba(185,104,199,0.4); }
.pp-link svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-link .gi { width: 22px; height: 22px; margin: -2px 0 -2px -4px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pp-link .gi svg { width: 13px; height: 13px; stroke: #fff; }
.pp-link.ig .gi { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.pp-link.web .gi { background: linear-gradient(135deg, #5B8DEF, #B968C7); }
.pp-link.book .gi { background: var(--k-gradient-pro); }
.pp-link.book .gi svg { stroke: #3a2400; }

/* ---- Stat strip ---- */
.pp-stats { display: grid; grid-template-columns: repeat(var(--stat-count, 4), 1fr); gap: 12px; margin-top: 22px; }
.pp-stat { min-width: 0; padding: 16px 18px; border-radius: 18px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.pp-stat .n { font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 2.6vw, 30px); line-height: 1; letter-spacing: -0.02em; }
.pp-stat .n.grad { background: var(--k-gradient-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pp-stat .l { font-size: 12px; font-weight: 600; color: var(--fg-muted); margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.pp-stat .l svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-stat.rate .n { display: inline-flex; align-items: center; gap: 6px; }
.pp-stat.rate .n svg { width: 22px; height: 22px; fill: #FACC15; stroke: #FACC15; }

/* ===================== Section scaffold ===================== */
.pp-content { margin-top: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: clamp(26px, 3.6vw, 44px); }
.pp-sect-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pp-sect-head .ic { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; background: rgba(185,104,199,0.14); color: var(--k-violet); display: flex; align-items: center; justify-content: center; }
.pp-sect-head .ic svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-sect-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -0.02em; }
.pp-sect-head .sub { font-size: 13px; color: var(--fg-muted); margin-top: 2px; }
.pp-sect-head .right { margin-left: auto; }

/* ===================== Featured next Rali ===================== */
.pp-featured {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(18px, 2.4vw, 34px);
  align-items: stretch; padding: clamp(16px, 1.8vw, 22px); border-radius: 26px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(91,141,239,0.10), transparent 52%),
    radial-gradient(120% 140% at 100% 100%, rgba(233,78,139,0.10), transparent 52%),
    var(--bg-elev-1);
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--card-shadow);
  position: relative;
}
.pp-featured::before {
  content: ''; position: absolute; inset: 0; border-radius: 26px; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, rgba(91,141,239,0.55), rgba(185,104,199,0.4), rgba(233,78,139,0.55));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pp-feat-flag { position: absolute; top: -13px; left: 26px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 9999px; background: var(--k-gradient-h); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: 0.03em; box-shadow: 0 8px 22px rgba(233,78,139,0.4); }
.pp-feat-flag svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2.4; fill: none; }

/* Featured visual */
/* min-width: 0 est indispensable : sans lui, un `aspect-ratio` combiné à un
   `min-height` transfère un minimum de largeur à la boîte, et la piste `1fr`
   de .pp-featured (min-width: auto) ne peut plus descendre en dessous → le
   visuel déborde de la carte sur mobile. */
.pp-feat-visual { position: relative; border-radius: 20px; overflow: hidden; min-height: 300px; min-width: 0; }
.pp-feat-visual image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-feat-visual image-slot::part(frame) {
  background:
    radial-gradient(60% 60% at 28% 22%, rgba(91,141,239,0.45), transparent 70%),
    radial-gradient(60% 60% at 76% 80%, rgba(233,78,139,0.45), transparent 70%),
    linear-gradient(150deg, #241036 0%, #0D0D1A 100%);
}
.pp-feat-visual .fv-vig { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 30%, transparent 52%, rgba(0,0,0,0.85) 100%); }
.pp-feat-visual .fv-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.pp-feat-visual .fv-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9999px; background: rgba(245,166,35,0.92); color: #221400; font-size: 11.5px; font-weight: 800; }
.pp-feat-visual .fv-ticket { margin-left: auto; text-align: center; padding: 8px 13px; border-radius: 14px; background: rgba(10,10,12,0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.18); }
.pp-feat-visual .fv-ticket .n { font-family: var(--font-display); font-weight: 900; font-size: 20px; line-height: 1; color: #fff; }
.pp-feat-visual .fv-ticket .u { font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.85); margin-top: 2px; }
.pp-feat-visual .fv-bot { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; }
.pp-feat-visual .fv-name { font-family: var(--font-display); font-weight: 900; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.06; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,0.7); }
.pp-feat-visual .fv-meta { margin-top: 7px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.92); text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.pp-feat-visual .fv-meta .d { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.6); }

/* Featured detail / countdown side */
.pp-feat-main { display: flex; flex-direction: column; padding: 6px 8px 6px 0; }
.pp-feat-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.pp-feat-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.06; margin: 8px 0 0; text-wrap: balance; }
.pp-feat-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--fg-secondary); text-wrap: pretty; }

.pp-count { margin-top: 18px; padding: 18px 18px 16px; border-radius: 20px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.pp-count .ch { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 14px; }
.pp-count .ch svg { width: 14px; height: 14px; stroke: var(--k-pink); stroke-width: 2; fill: none; }
.pp-count .cells { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.pp-cell { flex: 1 1 0; text-align: center; }
.pp-cell .num { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 3.2vw, 42px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--fg); }
.pp-cell.sec .num { color: var(--k-pink); }
.pp-cell .u { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); margin-top: 8px; }
.pp-sep { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1; color: var(--border); margin-top: 2px; }
html[data-theme="light"] .pp-sep { color: #C7CBD4; }

.pp-feat-foot { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.pp-avstack { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.pp-avstack .pile { display: flex; flex: 0 0 auto; }
.pp-avstack .pile span { width: 30px; height: 30px; border-radius: 50%; margin-left: -9px; border: 2px solid var(--bg-elev-1); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; overflow: hidden; }
.pp-avstack .pile span:first-child { margin-left: 0; }
.pp-avstack .pile span img { width: 100%; height: 100%; object-fit: cover; }
.pp-avstack .txt { font-size: 12.5px; color: var(--fg-secondary); line-height: 1.35; }
.pp-avstack .txt b { color: var(--fg); font-weight: 700; }
.pp-feat-cta { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 22px; border-radius: 14px; background: var(--k-gradient-h); color: #fff; font-size: 14.5px; font-weight: 800; box-shadow: var(--shadow-button); transition: transform var(--t-fast), box-shadow var(--t-fast); border: 0; }
.pp-feat-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(233,78,139,0.45); }
.pp-feat-cta svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 2.2; fill: none; }

/* ===================== Ralis grid ===================== */
.pp-filters { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); border-radius: 9999px; }
.pp-filters button { border: 0; background: transparent; color: var(--fg-muted); font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 9999px; transition: color var(--t-fast); white-space: nowrap; }
.pp-filters button:hover { color: var(--fg); }
.pp-filters button.on { color: #fff; background: var(--k-gradient-h); }
.pp-filters button .c { opacity: 0.7; font-weight: 600; }

/* Dropdown filtre Ralis — masqué par défaut, affiché en mobile (media query
   ≤620px). Style calqué sur le sélecteur de vue du calendrier. */
.pp-filterdrop { display: none; position: relative; }
.pp-filterdrop .dropbtn {
  height: 38px; padding: 0 14px; border-radius: 9999px; cursor: pointer; min-width: 118px;
  background: var(--bg-elev-1); border: 1px solid var(--border-soft); color: var(--fg);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
  transition: background var(--t-fast), border-color var(--t-fast); font-family: inherit;
}
.pp-filterdrop .dropbtn:hover { background: var(--bg-elev-2); border-color: var(--border); }
.pp-filterdrop .dropbtn .lbl { flex: 1 1 auto; text-align: left; }
.pp-filterdrop .dropbtn .cv { width: 14px; height: 14px; color: var(--fg-muted); transition: transform var(--t-fast); }
.pp-filterdrop .dropbtn .cv svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.pp-filterdrop.open .dropbtn .cv { transform: rotate(180deg); }
.pp-filterdrop .dropmenu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 176px; z-index: 60; padding: 6px;
  background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 54px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out);
}
html[data-theme="light"] .pp-filterdrop .dropmenu { box-shadow: 0 24px 54px rgba(30,30,60,0.18); }
.pp-filterdrop.open .dropmenu { opacity: 1; transform: none; pointer-events: auto; }
.pp-filterdrop .dropmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; cursor: pointer;
  background: transparent; color: var(--fg); font-size: 13.5px; font-weight: 600; text-align: left;
  transition: background var(--t-fast); font-family: inherit;
}
.pp-filterdrop .dropmenu button:hover, .pp-filterdrop .dropmenu button.on { background: var(--surface-tint-light); }
.pp-filterdrop .dropmenu button .ck { margin-left: auto; width: 15px; height: 15px; color: var(--k-violet); opacity: 0; }
.pp-filterdrop .dropmenu button.on .ck { opacity: 1; }
.pp-filterdrop .dropmenu button .ck svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.6; fill: none; }

.pp-rali-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pp-rcard {
  position: relative; border-radius: 20px; overflow: hidden; background: var(--bg-elev-1);
  border: 1px solid var(--border-soft); display: flex; flex-direction: column;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.pp-rcard:hover { transform: translateY(-4px); border-color: rgba(185,104,199,0.35); box-shadow: var(--card-shadow); }
.pp-rcard.is-hidden { display: none; }
.pp-rcard .rc-vis { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.pp-rcard .rc-vis image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-rcard .rc-grad { position: absolute; inset: 0; }
.pp-rcard[data-grad="1"] .rc-grad { background: radial-gradient(80% 90% at 24% 20%, rgba(91,141,239,0.5), transparent 70%), linear-gradient(150deg, #1b2747, #0D0D1A); }
.pp-rcard[data-grad="2"] .rc-grad { background: radial-gradient(80% 90% at 76% 24%, rgba(233,78,139,0.5), transparent 70%), linear-gradient(150deg, #2c1330, #0D0D1A); }
.pp-rcard[data-grad="3"] .rc-grad { background: radial-gradient(80% 90% at 30% 80%, rgba(185,104,199,0.5), transparent 70%), linear-gradient(150deg, #221a3a, #0D0D1A); }
.pp-rcard[data-grad="4"] .rc-grad { background: radial-gradient(80% 90% at 70% 30%, rgba(234,179,8,0.45), transparent 70%), linear-gradient(150deg, #2a2410, #0D0D1A); }
.pp-rcard .rc-vis .rc-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 54px; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5)); }
.pp-rcard .rc-status { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9999px; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.rc-status.soon { background: rgba(245,166,35,0.92); color: #221400; }
.rc-status.live { background: rgba(16,185,129,0.92); color: #052e22; }
.rc-status.done { background: rgba(10,10,12,0.6); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.18); }
.rc-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rc-status.live .dot { animation: ppPulse 1.3s var(--ease-out) infinite; }
.pp-rcard .rc-ticket { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 5px 10px; border-radius: 10px; background: rgba(10,10,12,0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.16); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 5px; }
.pp-rcard .rc-ticket svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2; fill: none; }
.pp-rcard .rc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1 1 auto; }
.pp-rcard .rc-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; line-height: 1.2; }
.pp-rcard .rc-meta { margin-top: 7px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.pp-rcard .rc-meta .d { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-muted); }
.pp-rcard .rc-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-soft); display: flex; align-items: center; gap: 8px; }
.pp-rcard .rc-foot .rc-win { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg-secondary); min-width: 0; }
.pp-rcard .rc-foot .rc-win svg { width: 14px; height: 14px; flex: 0 0 auto; stroke: #EAB308; stroke-width: 2; fill: none; }
.pp-rcard .rc-foot .rc-win b { color: var(--fg); font-weight: 700; }
.pp-rcard .rc-foot .rc-reg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--fg-secondary); }
.pp-rcard .rc-foot .rc-reg svg { width: 14px; height: 14px; stroke: var(--k-blue); stroke-width: 2; fill: none; }
.pp-rcard .rc-foot .rc-mini { margin-left: auto; font-family: var(--font-num); font-weight: 800; font-size: 13px; color: var(--k-pink); font-variant-numeric: tabular-nums; }
.pp-empty { display: none; text-align: center; padding: 50px 20px; color: var(--fg-muted); font-size: 14px; }
.pp-empty svg { width: 34px; height: 34px; stroke: var(--fg-muted); stroke-width: 1.6; fill: none; margin-bottom: 10px; }

/* ===================== Badges & marquant stats ===================== */
.pp-grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; }
.pp-panel { padding: clamp(18px, 2.2vw, 26px); border-radius: 22px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); }

.pp-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pp-badge { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border-radius: 16px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.pp-badge .bi { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.pp-badge .bi svg { width: 21px; height: 21px; stroke-width: 2; fill: none; }
.pp-badge .bt .bn { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.pp-badge .bt .bd { font-size: 11.5px; color: var(--fg-muted); margin-top: 2px; }
.pp-badge.b-verify .bi { background: rgba(91,141,239,0.16); } .pp-badge.b-verify .bi svg { stroke: #5B8DEF; }
.pp-badge.b-pro .bi { background: rgba(234,179,8,0.16); } .pp-badge.b-pro .bi svg { stroke: #EAB308; }
.pp-badge.b-streak .bi { background: rgba(233,78,139,0.16); } .pp-badge.b-streak .bi svg { stroke: #E94E8B; }
.pp-badge.b-top .bi { background: rgba(185,104,199,0.16); } .pp-badge.b-top .bi svg { stroke: #B968C7; }
.pp-badge.b-fast .bi { background: rgba(16,185,129,0.16); } .pp-badge.b-fast .bi svg { stroke: #10B981; }
.pp-badge.b-fans .bi { background: rgba(245,158,11,0.16); } .pp-badge.b-fans .bi svg { stroke: #F59E0B; }
.pp-badge.locked { opacity: 0.5; }
.pp-badge.locked .bi { background: var(--surface-tint-light); } .pp-badge.locked .bi svg { stroke: var(--fg-muted); }

/* cadence / rhythm highlight */
.pp-cadence { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(91,141,239,0.12), rgba(233,78,139,0.08)); border: 1px solid rgba(185,104,199,0.25); }
.pp-cadence .ci { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; background: var(--k-gradient-h); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(233,78,139,0.32); }
.pp-cadence .ci svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; }
.pp-cadence .ct .l { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fg-muted); }
.pp-cadence .ct .v { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin-top: 3px; }
.pp-cadence .ct .v b { background: var(--k-gradient-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* record stat */
.pp-record { padding: 20px 22px; border-radius: 18px; background: linear-gradient(135deg, rgba(234,179,8,0.10), rgba(245,158,11,0.04)); border: 1px solid rgba(234,179,8,0.24); }
.pp-record .rh { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.pp-record .rh .ti { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; background: rgba(234,179,8,0.18); color: #EAB308; display: flex; align-items: center; justify-content: center; }
.pp-record .rh .ti svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2; fill: none; }
.pp-record .rh h3 { margin: 0; font-size: 15px; font-weight: 800; }
.pp-record .rval { font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 4.4vw, 46px); line-height: 1; color: #EAB308; font-variant-numeric: tabular-nums; }
.pp-record .rval span { font-size: 0.5em; color: var(--fg-muted); -webkit-text-fill-color: var(--fg-muted); }
.pp-record .rsub { font-size: 13px; color: var(--fg-secondary); margin-top: 8px; }
.pp-record .rsub b { color: var(--fg); font-weight: 700; }

/* ===================== Infos pratiques ===================== */
.pp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pp-hours { display: flex; flex-direction: column; }
.pp-hrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border-soft); }
.pp-hrow:last-child { border-bottom: 0; }
.pp-hrow .hd { font-size: 14px; font-weight: 700; color: var(--fg); width: 88px; flex: 0 0 auto; }
.pp-hrow .hv { font-size: 14px; color: var(--fg-secondary); font-variant-numeric: tabular-nums; }
.pp-hrow.today { }
.pp-hrow.today .hd { color: var(--k-violet); }
.pp-hrow .closed { color: var(--fg-muted); }
.pp-hrow .now { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 9999px; background: rgba(16,185,129,0.14); color: #10B981; font-size: 11px; font-weight: 800; }
.pp-hrow .now .dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; box-shadow: 0 0 8px #10B981; }

.pp-map-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-soft); }
.pp-map { position: relative; height: clamp(220px, 30vw, 280px); background: var(--bg-elev-2, #0b0c11); }

/* Vraie carte Leaflet (tuiles CARTO, clair/sombre auto) — cf. Vitrine des Réglages */
.pp-realmap { position: absolute; inset: 0; display: none; }
.pp-realmap .leaflet-container { background: transparent; font-family: inherit; }
.pp-map-pin-wrap { background: none !important; border: 0 !important; }
.pp-map-pin { display: block; width: 20px; height: 20px; border-radius: 50%; background: #B968C7; border: 3px solid #fff; box-shadow: 0 2px 12px rgba(185,104,199,0.65); }
.pp-map-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--fg-muted); font-size: 13px; text-align: center; padding: 0 24px; }
.pp-map-empty svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1.7; fill: none; opacity: 0.7; }
.pp-addr { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-elev-2); border-top: 1px solid var(--border-soft); }
.pp-addr .ai { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; background: var(--k-gradient-h); color: #fff; display: flex; align-items: center; justify-content: center; }
.pp-addr .ai svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2; fill: none; }
.pp-addr .av { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-addr .ago { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: var(--k-gradient-h); color: #fff; display: flex; align-items: center; justify-content: center; }
.pp-addr .ago svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.2; fill: none; }

/* ===================== Sticky floating countdown pill ===================== */
.pp-dock {
  position: fixed; right: clamp(16px, 3vw, 28px); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 14px; border-radius: 9999px;
  background: color-mix(in srgb, var(--bg-elev-1) 86%, transparent); backdrop-filter: blur(20px) saturate(1.4);
  border: 1.5px solid transparent;
  background-image: linear-gradient(color-mix(in srgb, var(--bg-elev-1) 88%, transparent), color-mix(in srgb, var(--bg-elev-1) 88%, transparent)), var(--k-gradient-h);
  background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 18px 44px rgba(0,0,0,0.4), 0 0 0 5px rgba(185,104,199,0.07);
  cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-base);
  max-width: calc(100vw - 32px);
}
.pp-dock:hover { transform: translateY(-3px); box-shadow: 0 22px 52px rgba(0,0,0,0.46), 0 0 0 5px rgba(185,104,199,0.12); }
.pp-dock.hide { opacity: 0; pointer-events: none; transform: translateY(14px); }
.pp-dock .dk-ic { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--k-gradient-h); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(233,78,139,0.4); position: relative; }
.pp-dock .dk-ic svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.2; fill: none; }
.pp-dock .dk-ic::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--k-pink); opacity: 0; animation: ppRing 1.8s var(--ease-out) infinite; }
.pp-dock .dk-txt { min-width: 0; }
.pp-dock .dk-l { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.pp-dock .dk-name { font-size: 12.5px; font-weight: 700; color: var(--fg-secondary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.pp-dock .dk-time { font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; margin-top: 4px; background: var(--k-gradient-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pp-dock .dk-go { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border-radius: 9999px; background: var(--k-gradient-h); color: #fff; font-size: 13px; font-weight: 800; border: 0; box-shadow: 0 6px 18px rgba(233,78,139,0.34); }
.pp-dock .dk-go svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; fill: none; margin-right: 5px; }
body[data-sticky="off"] .pp-dock { display: none; }

@keyframes ppRing { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ppPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===================== Sticky app bar ===================== */
.pp-appbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 12px clamp(16px, 4vw, 40px) calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border-soft);
}
.pp-appbar .ab-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.pp-appbar .ab-id { display: flex; align-items: center; gap: 11px; flex: 1 1 auto; min-width: 0; }
.pp-appbar .ab-av { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; overflow: hidden; background: var(--k-gradient); }
.pp-appbar .ab-av img { width: 100%; height: 100%; object-fit: cover; }
.pp-appbar .ab-tx { min-width: 0; }
.pp-appbar .ab-tx .n { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 5px; min-width: 0; }
.pp-appbar .ab-tx .n .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pp-appbar .ab-tx .n svg { width: 14px; height: 14px; flex: 0 0 auto; fill: var(--k-blue); stroke: var(--k-blue); }
.pp-appbar .ab-tx .s { font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-appbar .ab-follow { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 9999px; border: 0; background: var(--k-gradient-h); color: #fff; font-size: 15px; font-weight: 800; box-shadow: var(--shadow-button); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.pp-appbar .ab-follow:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(233,78,139,0.42); }
.pp-appbar .ab-follow svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 2.4; fill: none; }
/* État suivi / en attente : mêmes règles que le bouton principal (.pp-follow) —
   neutre, coche à la place du +, plus de gradient. */
.pp-appbar .ab-follow .ic-check { display: none; }
.pp-appbar .ab-follow.on { background: var(--bg-elev-1); color: var(--fg-secondary); box-shadow: none; border: 1px solid var(--border-soft); }
.pp-appbar .ab-follow.on svg { stroke: var(--fg-secondary); }
.pp-appbar .ab-follow.on .ic-add { display: none; }
.pp-appbar .ab-follow.on .ic-check { display: block; }
.pp-appbar .ab-open { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border-radius: 12px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); color: var(--fg); font-size: 13.5px; font-weight: 700; }
.pp-appbar .ab-open svg { width: 16px; height: 16px; stroke: var(--fg-secondary); stroke-width: 2; fill: none; }

/* ===================== Toast ===================== */
.pp-toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%) translateY(14px); display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); font-size: 14px; font-weight: 700; box-shadow: 0 14px 40px rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity var(--t-base), transform var(--t-base); z-index: 80; }
html[data-theme="light"] .pp-toast { box-shadow: 0 14px 40px rgba(20,20,40,0.16); }
.pp-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.pp-toast svg { width: 17px; height: 17px; stroke: #34D399; stroke-width: 2.4; fill: none; }

/* ===== Mur d'authentification (visiteur anonyme) ===== */
.pp-authwall { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pp-authwall .aw-scrim { position: absolute; inset: 0; background: rgba(6,6,10,0.6); opacity: 0; transition: opacity var(--t-base); }
.pp-authwall.open .aw-scrim { opacity: 1; }
.pp-authwall .aw-card {
  position: relative; z-index: 1; width: 100%; max-width: 380px; padding: 28px 24px 24px; text-align: center;
  background: var(--bg-elev-1); border: 1px solid var(--border-soft); border-radius: 24px; box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(16px) scale(0.97); transition: opacity var(--t-base), transform var(--t-base) var(--ease-out);
}
html[data-theme="light"] .pp-authwall .aw-card { box-shadow: 0 30px 70px rgba(20,20,40,0.22); }
.pp-authwall.open .aw-card { opacity: 1; transform: none; }
.aw-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bg-elev-2); color: var(--fg-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.aw-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.aw-ic { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 16px; background: var(--k-gradient); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(233,78,139,0.4); }
.aw-ic svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2.2; fill: none; }
.aw-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--fg); }
.aw-title #awName { background: var(--k-gradient-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.aw-sub { margin: 0 0 20px; font-size: 13.5px; line-height: 1.5; color: var(--fg-secondary); }
.aw-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px 18px; margin-bottom: 10px; border-radius: 9999px; border: 1px solid var(--border); background: var(--bg-elev-2); color: var(--fg); font-size: 15px; font-weight: 800; text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast); }
.aw-btn:hover { transform: translateY(-1px); }
.aw-btn.primary { background: var(--k-gradient-h); color: #fff; border: 0; box-shadow: var(--shadow-button); }
.aw-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.aw-link { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--fg-muted); text-decoration: none; }
.aw-link:hover { color: var(--fg); }

/* ===== Popup « télécharge l'app » (bandeau bas, anonyme) ===== */
.pp-appdock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; align-items: center; gap: 13px;
  padding: 12px clamp(16px, 4vw, 40px) calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border-soft);
  transform: translateY(115%); transition: transform var(--t-base) var(--ease-out);
}
.pp-appdock.show { transform: none; }
/* Quand le popup est visible, il remplace l'app bar mobile (évite le doublon). */
body.promo-open .pp-appbar { display: none; }
.pp-appdock .ad-close { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--fg-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pp-appdock .ad-close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.pp-appdock .ad-ic { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; background: var(--k-gradient); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(233,78,139,0.4); }
.pp-appdock .ad-ic svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.2; fill: none; }
.pp-appdock .ad-tx { flex: 1 1 auto; min-width: 0; }
.pp-appdock .ad-t { font-size: 14px; font-weight: 800; color: var(--fg); }
.pp-appdock .ad-s { font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-appdock .ad-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pp-appdock .ad-cta { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 9999px; border: 1px solid var(--border); background: var(--bg-elev-1); color: var(--fg); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: transform var(--t-fast); }
.pp-appdock .ad-cta:hover { transform: translateY(-1px); }
.pp-appdock .ad-cta.primary { background: var(--k-gradient-h); color: #fff; border: 0; box-shadow: var(--shadow-button); }
@media (max-width: 620px) {
  .pp-appdock { flex-wrap: wrap; gap: 9px 10px; padding-top: 14px; }
  .pp-appdock .ad-s { display: none; }
  .pp-appdock .ad-ic { width: 36px; height: 36px; }
  .pp-appdock .ad-actions { width: 100%; }
  .pp-appdock .ad-actions .ad-cta { flex: 1 1 0; min-width: 0; }
}

/* ===================== Account-type visibility ===================== */
/* Pro-only blocks hidden unless the account has a Pro subscription */
body:not([data-account$="-pro"]) .only-pro { display: none !important; }
/* Establishment-only blocks hidden for individuals */
body:not([data-account^="etab"]) .only-etab { display: none !important; }
/* Individual-only blocks hidden for establishments */
body:not([data-account^="part"]) .only-part { display: none !important; }
/* Upsell shown only to non-Pro */
body[data-account$="-pro"] .only-free { display: none !important; }

/* ===================== Entrance ===================== */
@media (prefers-reduced-motion: no-preference) {
  .pp-rise { animation: ppRise .6s var(--ease-out) both; }
  .pp-rise.d1 { animation-delay: .05s; } .pp-rise.d2 { animation-delay: .12s; } .pp-rise.d3 { animation-delay: .2s; }
  @keyframes ppRise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ===================== Responsive ===================== */
@media (max-width: 1080px) {
  .pp-featured { grid-template-columns: 1fr; }
  /* En 1 colonne, l'image reprend le flux : c'est elle qui donne sa hauteur au
     cadre (hauteur réelle, largeur = 100 % du cadre, aucun recadrage).
     On n'utilise volontairement PAS `aspect-ratio` ici : WebKit ne dimensionne
     pas une ligne de grille `auto` à partir du ratio quand l'élément n'a que
     des enfants en position absolue → cadre effondré à 0 sur Safari iOS.
     Le min-height ne sert plus que de plancher au dégradé de secours quand il
     n'y a pas d'image, et sans aspect-ratio il ne peut plus se transférer en
     largeur minimale. */
  .pp-feat-visual { min-height: 240px; }
  .pp-feat-visual.has-img { min-height: 0; }
  .pp-feat-visual.has-img img { position: static; display: block; width: 100%; height: auto; }
  .pp-grid-2 { grid-template-columns: 1fr; }
  .pp-rali-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .pp-id-top { flex-wrap: wrap; }
  .pp-actions { width: 100%; order: 3; }
  .pp-follow { flex: 1 1 auto; justify-content: center; }
  .pp-stats { grid-template-columns: repeat(2, 1fr); }
  .pp-info-grid { grid-template-columns: 1fr; }
  .pp-dock .dk-go { display: none; }
}
@media (max-width: 620px) {
  .pp-rali-grid { grid-template-columns: 1fr; }
  .pp-badges { grid-template-columns: 1fr; }
  .pp-feat-foot { flex-direction: column; align-items: stretch; }
  .pp-feat-cta { justify-content: center; }
  .pp-nav-login .lab { display: none; }
  /* Topbar compacte : puce = avatar seul, on masque le nom et « Mon espace ». */
  .pp-nav-me .nm { display: none; }
  .pp-nav-me { padding: 3px; }
  .pp-nav-space { display: none; }
  .pp-appbar .ab-open { display: none; }
  .pp-appbar .ab-follow { padding: 13px 18px; }
  /* En-tête « Les Ralis » : le segment laisse place au dropdown compact. */
  .pp-filters { display: none; }
  .pp-filterdrop { display: inline-flex; }
  .pp-sect-head h2 { font-size: 20px; }
  .pp-dock { right: 12px; left: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .pp-dock .dk-name { max-width: none; }
}
@media (max-width: 420px) {
  .pp-stats { grid-template-columns: 1fr; }
}

/* =========================================================================
   Adaptations site réel : remplacement du custom element <image-slot> par
   de vrais <img>, avec fallback gradient quand l'image est absente.
   ========================================================================= */

/* Cover : gradient de secours visible tant qu'aucune image n'est chargée */
.pp-cover {
  background:
    radial-gradient(70% 80% at 22% 16%, rgba(91,141,239,0.55), transparent 70%),
    radial-gradient(70% 80% at 84% 78%, rgba(233,78,139,0.55), transparent 70%),
    linear-gradient(135deg, #241036 0%, #0D0D1A 100%);
}
.pp-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-cover img[src=""], .pp-cover img:not([src]) { display: none; }

/* Avatar / logo */
.pp-avatar .av-inner { background: var(--k-gradient); }
.pp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Visuel du Rali en vedette */
.pp-feat-visual {
  background:
    radial-gradient(60% 60% at 28% 22%, rgba(91,141,239,0.45), transparent 70%),
    radial-gradient(60% 60% at 76% 80%, rgba(233,78,139,0.45), transparent 70%),
    linear-gradient(150deg, #241036 0%, #0D0D1A 100%);
}
.pp-feat-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-feat-visual img[src=""], .pp-feat-visual img:not([src]) { display: none; }

/* Cartes Rali : image réelle par-dessus le gradient */
.pp-rcard .rc-vis img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pp-rcard .rc-vis img + .rc-emoji { display: none; }

/* États génériques (loading / error) repris du style global */
.pp-loading, .pp-error { display: flex; align-items: center; justify-content: center; min-height: 60vh; text-align: center; color: var(--fg-muted); }
.pp-loading .spin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--border-soft); border-top-color: var(--k-pink); animation: ppSpin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes ppSpin { to { transform: rotate(360deg); } }
.pp-error h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--fg); margin: 0 0 8px; }
.pp-error a.ehome { display: inline-block; margin-top: 14px; color: var(--k-blue); font-weight: 700; }

/* Avatar fallback : initiales centrées quand pas d'image */
.pp-av-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-display); font-weight: 900; font-size: 38px; color: #fff; }
[hidden] { display: none !important; }
