/* v1.86 — habillage premium (maquette validée) : Magasin PDR, Parc automobile, Techniciens. Préfixe pv-. */
@keyframes pv-shine { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(620%) skewX(-18deg); } }
@keyframes pv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pv-cine { 0% { opacity: 0; transform: scale(1.12) translateX(2%); } 5% { opacity: 1; } 30% { opacity: 1; } 36% { opacity: 0; transform: scale(1) translateX(-2%); } 100% { opacity: 0; } }
@keyframes pv-pan { from { transform: scale(1.04); } to { transform: scale(1.14) translateX(-3%); } }
@keyframes pv-streak { 0% { left: -40%; opacity: 0; } 10% { opacity: 1; } 60% { left: 110%; opacity: 1; } 61%, 100% { left: 110%; opacity: 0; } }
@keyframes pv-gam { 0%, 16% { transform: translateY(0); } 20%, 36% { transform: translateY(-22px); } 40%, 56% { transform: translateY(-44px); } 60%, 76% { transform: translateY(-66px); } 80%, 96% { transform: translateY(-88px); } 100% { transform: translateY(-110px); } }
@keyframes pv-beam { 0%, 100% { opacity: .2; transform: rotate(14deg); } 50% { opacity: .7; transform: rotate(22deg) translateX(40px); } }
@keyframes pv-spark { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(60px, 90px); } }
@keyframes pv-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.pv-hero { position: relative; height: 232px; margin: -4px 0 0; border-radius: 0 0 18px 18px; overflow: hidden; background: #05080f; color: #fff; }
.pv-hero .pv-bg { position: absolute; right: 0; top: 0; width: 74%; height: 100%; object-fit: cover; animation: pv-pan 22s ease-in-out infinite alternate; }
.pv-hero.cine .pv-bg { width: 100%; opacity: 0; animation: pv-cine calc(var(--n) * 6s) infinite; }
.pv-fade { position: absolute; inset: 0; background: linear-gradient(90deg, #0b1220 26%, rgba(11,18,32,.55) 60%, rgba(11,18,32,.2) 100%); z-index: 1; }
.pv-shine { position: absolute; top: 0; left: 0; width: 18%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent); animation: pv-shine 8s ease-in-out infinite; z-index: 1; }
.pv-streak { position: absolute; left: -40%; top: 58%; width: 40%; height: 2px; background: linear-gradient(90deg, transparent, #ff2a33, #fff, transparent); filter: drop-shadow(0 0 8px #ff2a33); animation: pv-streak 6s cubic-bezier(.6,0,.2,1) infinite; z-index: 2; }
.pv-bars::before, .pv-bars::after { content: ''; position: absolute; left: 0; right: 0; height: 12px; background: #000; z-index: 3; }
.pv-bars::before { top: 0; } .pv-bars::after { bottom: 0; }
.pv-ttl { position: absolute; left: 26px; top: 30px; display: flex; gap: 16px; align-items: center; z-index: 4; }
.pv-ico { width: 58px; height: 58px; border-radius: 14px; background: #d7141b; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(215,20,27,.45); flex-shrink: 0; }
.pv-ttl h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: .2px; color: #fff; }
.pv-ttl p { margin: 2px 0 0; color: #d5dce7; font-size: 14px; }
.pv-slogan { position: absolute; right: 26px; top: 28px; text-align: right; font-weight: 700; font-size: 14.5px; letter-spacing: 1.2px; line-height: 1.3; z-index: 4; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.pv-slogan b { color: #ff4d55; }
.pv-biglogo { position: absolute; right: 26px; top: 20px; height: 76px; width: auto; z-index: 4; filter: drop-shadow(0 0 18px rgba(215,20,27,.75)) drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.pv-hero.withlogo .pv-slogan { top: 106px; }
.pv-kpis { position: absolute; left: 22px; right: 22px; bottom: 0; display: grid; grid-template-columns: repeat(var(--k), minmax(0, 250px)); gap: 12px; z-index: 4; perspective: 900px; }
.pv-kpi { background: #fff; color: #13203a; border-radius: 12px 12px 0 0; padding: 13px 15px; display: flex; gap: 13px; align-items: center; box-shadow: 0 -6px 20px rgba(0,0,0,.2); animation: pv-rise .6s ease-out both; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.pv-kpi:hover { transform: translateY(-4px) rotateX(6deg); }
.pv-kpi .i { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.pv-kpi.red .i { background: #fee2e2; color: #d7141b; } .pv-kpi.navy .i { background: #e5e9f0; color: #13203a; } .pv-kpi.blue .i { background: #dbeafe; color: #1d4ed8; }
.pv-kpi.amber .i { background: #fef3c7; color: #b45309; } .pv-kpi.green .i { background: #dcfce7; color: #15803d; } .pv-kpi.violet .i { background: #ede9fe; color: #6d28d9; }
.pv-kpi small { display: block; font-size: 12px; color: #5b6b85; }
.pv-kpi b { font-size: 23px; font-weight: 800; line-height: 1.15; }
.pv-kpi em { font-style: normal; font-size: 11.5px; color: #5b6b85; margin-left: 6px; }
.pv-kpi.red b { color: #d7141b; }
.pv-gam { position: absolute; left: 100px; top: 112px; height: 22px; overflow: hidden; z-index: 4; }
.pv-gam div { animation: pv-gam 15s infinite; }
.pv-gam span { display: block; height: 22px; color: #ff4d55; font-weight: 700; font-size: 14px; letter-spacing: 2.4px; }
.pv-beam { position: absolute; top: -40px; width: 120px; height: 320px; background: linear-gradient(180deg, rgba(255,60,70,.35), transparent); filter: blur(14px); animation: pv-beam 7s ease-in-out infinite; z-index: 1; }
.pv-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 8px 2px #ff6b1a; animation: pv-spark 2.6s linear infinite; z-index: 2; }

/* cartes catégories PDR */
.pv-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.pv-cat { position: relative; height: 92px; border: 0; border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer; background: linear-gradient(135deg, #13203a, #0b1220); box-shadow: 0 6px 16px rgba(11,18,32,.18); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.pv-cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.pv-cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,18,32,0) 30%, rgba(11,18,32,.9) 100%); }
.pv-cat span { position: absolute; left: 10px; right: 8px; bottom: 8px; z-index: 1; color: #fff; font-weight: 700; font-size: 13.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-cat small { position: absolute; right: 8px; top: 8px; z-index: 1; background: rgba(11,18,32,.72); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 2px 7px; }
.pv-cat:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(11,18,32,.3); }
.pv-cat:hover img { transform: scale(1.12); }
.pv-cat.on { box-shadow: 0 0 0 3px #d7141b, 0 14px 28px rgba(215,20,27,.35); }
.pv-cat.on::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #d7141b; z-index: 2; }
.pv-cat-ph { position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, #24324d, #0b1220); }
.pv-thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; display: block; box-shadow: 0 3px 8px rgba(11,18,32,.18); background: #e5e9f0; }
.pv-chip { display: inline-flex; align-items: center; gap: 8px; background: #fee2e2; color: #991b1b; border-radius: 999px; padding: 4px 6px 4px 12px; font-weight: 600; font-size: 12.5px; }
.pv-chip button { border: 0; background: #d7141b; color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* parc automobile */
.pv-brands { display: flex; gap: 4px; overflow-x: auto; padding: 8px; background: #fff; border: 1px solid #e1e6ee; border-radius: 12px; margin: 14px 0 4px; scrollbar-width: thin; }
.pv-brand { flex: 0 0 78px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: #13203a; padding: 6px 4px; border-radius: 10px; cursor: pointer; transition: transform .2s; }
.pv-brand:hover { transform: translateY(-3px); }
.pv-brand img { width: 40px; height: 30px; object-fit: contain; }
.pv-brand.on { background: #d7141b; color: #fff; }
.pv-brand.on img { filter: brightness(0) invert(1); }
.pv-car { width: 96px; height: 56px; border-radius: 9px; object-fit: cover; box-shadow: 0 4px 12px rgba(11,18,32,.22); background: #eef1f5; display: block; }
.pv-car.sil { object-fit: contain; background: linear-gradient(180deg, #f6f8fb, #e5e9f0); padding: 4px; box-sizing: border-box; }
.pv-credit { font-size: 10.5px; color: #7a879b; margin-top: 4px; }
.pv-credit a { color: inherit; }

/* techniciens */
.pv-av { position: relative; width: 46px; height: 46px; border-radius: 50%; overflow: visible; flex-shrink: 0; }
.pv-av > svg, .pv-av > img { width: 46px; height: 46px; border-radius: 50%; display: block; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ring, #d7141b), 0 6px 14px rgba(11,18,32,.3); }
.pv-av i { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: var(--dot, #16a34a); }
.pv-bar { height: 7px; background: #eef1f5; border-radius: 4px; overflow: hidden; flex: 1; min-width: 60px; }
.pv-bar i { display: block; height: 100%; border-radius: 4px; transform-origin: left; animation: pv-grow 1s cubic-bezier(.2,.8,.2,1) both; }
.pv-band { position: relative; height: 54px; background: #0b1220; border-radius: 12px 12px 0 0; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 0 16px; color: #fff; }
.pv-band b { position: relative; font-size: 19px; }
.pv-band .wm { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); height: 38px; width: auto; }
.pv-band .bg { position: absolute; right: 0; top: -40px; width: 60%; opacity: .32; }

@media (max-width: 900px) {
  .pv-hero { height: auto; padding-bottom: 12px; }
  .pv-hero .pv-bg { width: 100%; }
  .pv-ttl { position: relative; left: 0; top: 0; padding: 22px 18px 10px; }
  .pv-slogan, .pv-biglogo, .pv-gam { display: none; }
  .pv-kpis { position: relative; left: 0; right: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px; }
  .pv-kpi { border-radius: 12px; }
}
html[data-theme="dark"] .pv-kpi, html[data-theme="dark"] .pv-brands { background: #111a2b; color: #e6ecf5; border-color: #24324d; }
html[data-theme="dark"] .pv-brand { color: #e6ecf5; }
html[data-theme="dark"] .pv-brand img:not(.on img) { filter: brightness(0) invert(.9); }

/* v1.87 — écran « accès réservé » */
.denied-page { max-width: 520px; margin: 9vh auto; text-align: center; padding: 34px 28px; background: #fff; border: 1px solid #E3E8F0; border-radius: 16px; box-shadow: 0 18px 40px -24px rgba(11,18,32,.35); }
.denied-page h2 { margin: 16px 0 8px; font-size: 22px; color: #0B1220; }
.denied-page p { color: #475569; line-height: 1.6; margin: 0 0 20px; }
.denied-ico { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #13203A, #0B1220); box-shadow: 0 0 0 6px rgba(215,20,27,.12); }
[data-theme="dark"] .denied-page { background: #111A2B; border-color: #24304A; }
[data-theme="dark"] .denied-page h2 { color: #fff; }
[data-theme="dark"] .denied-page p { color: #B6C0D4; }

/* v1.87 — téléphone : onglets qui défilent au lieu d'être coupés, tableaux qui défilent à l'intérieur de leur carte */
@media (max-width: 600px) {
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: 0 0 auto; white-space: nowrap; }
  .rc-client-row { flex-wrap: wrap; }
  .rc-client-row > div { flex: 1 1 100% !important; }
  .rc-client-row > .btn { width: 100%; justify-content: center; }
  table.table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
