/* ============================================================
   COERVER® TUNISIE — Features: smart WhatsApp, back-to-top,
   micro-interactions, app demo, player card, game, data blocks
   ============================================================ */

/* ── 25. Smart WhatsApp menu ── */
.wa-menu {
  position: fixed; z-index: 99990; right: 20px; bottom: 92px; width: min(320px, calc(100vw - 40px));
  background: rgba(16,18,17,.92); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 16px; color: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.96); transform-origin: 90% 100%;
  transition: opacity .3s, transform .45s cubic-bezier(.16,1,.3,1), visibility 0s linear .3s;
}
.wa-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .45s cubic-bezier(.16,1,.3,1); }
.wa-menu-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.wa-menu-head .av { width: 40px; height: 40px; border-radius: 50%; background: #000; border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; }
.wa-menu-head .av img { width: 30px; }
.wa-menu-head b { display: block; font: 700 .98rem/1.2 var(--font-body); }
.wa-menu-head span { font-size: .78rem; color: #25d366; display: inline-flex; align-items: center; gap: 6px; }
.wa-menu-head span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 3px rgba(37,211,102,.25); }
.wa-menu p { font-size: .88rem; color: rgba(255,255,255,.7); margin: 4px 4px 10px; }
.wa-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 14px; margin-bottom: 6px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); color: #fff; font: 600 .92rem/1.2 var(--font-body); text-align: left; transition: background .2s, transform .3s cubic-bezier(.16,1,.3,1); }
.wa-opt:hover { background: rgba(37,211,102,.16); transform: translateX(3px); }
.wa-opt::after { content: '›'; color: #25d366; font-size: 1.3rem; line-height: 1; }
.wa-float.is-open { transform: rotate(-12deg) scale(1.05); }
.wa-float { transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .3s; }

/* ── 29. Back-to-top football ── */
.to-top {
  position: fixed; z-index: 99980; right: 26px; bottom: 96px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(16,18,17,.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 34px rgba(0,0,0,.4);
  opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity .35s, transform .5s cubic-bezier(.16,1,.3,1), visibility 0s linear .35s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .5s cubic-bezier(.16,1,.3,1); }
.to-top svg { width: 26px; height: 26px; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.to-top:hover svg { transform: translateY(-4px) rotate(-90deg); }
.to-top.kick svg { animation: kick .9s cubic-bezier(.3,0,.2,1); }
@keyframes kick { 0% { transform: none; } 35% { transform: translateY(-26px) rotate(-260deg); } 70% { transform: translateY(2px) rotate(-360deg); } 100% { transform: none; } }
body:has(.wa-menu.open) .to-top { opacity: 0; pointer-events: none; }

/* ── 28. Micro-interactions ── */
.pop { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 40% { transform: scale(.94); } 100% { transform: none; } }
.scroll-progress::after {
  content: ''; position: absolute; right: -7px; top: -6px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff radial-gradient(circle at 50% 50%, #111 0 22%, transparent 24%); box-shadow: 0 2px 6px rgba(0,0,0,.5);
  transform: scaleX(var(--inv, 1));
}
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200000; }

/* ── 27. Dark mode for light pages (follows phone/computer setting) ── */
@media (prefers-color-scheme: dark) {
  .pg-mentions-legales .legal-page, .pg-politique-confidentialite .legal-page { background: #000 !important; }
  .pg-mentions-legales .legal-section, .pg-politique-confidentialite .legal-section { background: #111214 !important; border-color: rgba(255,255,255,.08) !important; }
  body.pg-mentions-legales .legal-page .legal-section :is(h2, p, li, strong), body.pg-politique-confidentialite .legal-page .legal-section :is(h2, p, li, strong) { color: rgba(255,255,255,.86) !important; }
  .pg-politique-confidentialite :is(.legal-summary, .legal-highlight) { background: #111214 !important; color: rgba(255,255,255,.86) !important; }
}

@media (prefers-reduced-motion: reduce) { .pop, .to-top.kick svg { animation: none; } }
.scroll-progress { transform: none !important; width: 0; overflow: visible; }
.scroll-progress::after { transform: none; }
@media (max-width: 900px) { .scroll-progress::after { display: none; } .to-top { right: 22px; bottom: 90px; width: 42px; height: 42px; } }

/* ── 26. App demo ── */
.phone.demo .tabbar span, .phone.demo .s-login .s-btn, .phone.demo .roll-row .pill { cursor: pointer; pointer-events: auto; }
.phone.demo .tabbar span:hover { color: #fff; }
.screen .msg { max-width: 78%; margin: .5em 0; padding: .7em .9em; border-radius: 1em 1em 1em .3em; background: #1b1e25; font-size: .85em; line-height: 1.35; color: rgba(255,255,255,.88); }
.screen .msg.me { margin-left: auto; border-radius: 1em 1em .3em 1em; background: var(--app-yellow); color: #000; }
.demo-hint { text-align: center; margin-top: 18px; font: 600 .8rem/1 var(--font-body); color: rgba(255,255,255,.6); letter-spacing: .02em; }
.demo-hint::before { content: '👆 '; }
.app-hero .phone-wrap { display: flex; flex-direction: column; align-items: center; }
.screen:not(.on) { pointer-events: none; }

/* ── 17. Player card ── */
.pcard-section { background: var(--h-light) !important; color: #1d1d1f; }
.pcard-grid { display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: clamp(30px, 6vw, 80px); align-items: center; }
.pcard-form .section-title { color: #1d1d1f !important; margin: 14px 0 12px; }
.pcard-note { color: #6e6e73; margin-bottom: 26px; }
.pf { display: grid; gap: 7px; margin-bottom: 14px; }
.pf > span, .pf-stat span { font: 600 .82rem/1 var(--font-body); color: #6e6e73; }
.pf input[type=text], .pf select, .pf input[type=file] { font: 500 1rem/1.2 var(--font-body); color: #1d1d1f; padding: 14px 16px; border-radius: 14px; border: 1px solid #d2d2d7; background: #fff; width: 100%; }
.pf input[type=file] { padding: 11px; cursor: pointer; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin: 10px 0 26px; padding: 20px; background: #fff; border-radius: 20px; border: 1px solid rgba(0,0,0,.05); }
.pf-stat { display: grid; grid-template-columns: 80px 1fr 30px; align-items: center; gap: 10px; }
.pf-stat input { accent-color: #2e7d32; width: 100%; }
.pf-stat b { font: 800 1.1rem/1 var(--font-display); text-align: right; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.h-btn.ghost.dark { color: #1d1d1f; border-color: #1d1d1f; }
.h-btn.ghost.dark:hover { background: #1d1d1f; color: #fff; }
.pcard-preview { position: relative; display: grid; place-items: center; }
.pcard-preview::before { content: ''; position: absolute; inset: 10%; background: radial-gradient(circle, rgba(76,175,80,.35), transparent 65%); filter: blur(30px); }
.pcard-preview canvas { position: relative; width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); animation: floaty 6s ease-in-out infinite; }
@media (max-width: 900px) { .pcard-grid { grid-template-columns: 1fr; } .pcard-preview { order: -1; } .pcard-preview canvas { max-width: 300px; } .pf-stats { grid-template-columns: 1fr; } }

/* ── 18. Juggling game ── */
.game-section { background: #000 !important; color: #fff; }
.game-grid { display: grid; grid-template-columns: 1fr minmax(300px, 480px); gap: clamp(30px, 6vw, 80px); align-items: center; }
.game-copy .section-title em { font-style: normal; color: var(--green); }
.game-copy p { color: rgba(255,255,255,.72); font-size: 1.1rem; margin: 16px 0 26px; }
.game-scores { display: flex; gap: 14px; margin-bottom: 26px; }
.game-scores div { padding: 16px 22px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); min-width: 120px; }
.game-scores small { display: block; font: 700 .72rem/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.game-scores b { font: 900 2.6rem/1 var(--font-display); color: var(--green); }
.game-stage { position: relative; aspect-ratio: 3 / 4; border-radius: 30px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 100px rgba(0,0,0,.6), 0 0 80px rgba(76,175,80,.2); touch-action: none; user-select: none; -webkit-user-select: none; }
.game-stage canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.game-overlay { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; cursor: pointer; }
.game-overlay.show { opacity: 1; pointer-events: auto; }
.game-overlay b { font: 900 clamp(2.4rem, 6vw, 3.6rem)/1 var(--font-display); text-transform: uppercase; }
.game-overlay span { color: rgba(255,255,255,.8); }
@media (max-width: 900px) { .game-grid { grid-template-columns: 1fr; } .game-stage { max-width: 440px; width: 100%; margin: 0 auto; } }
body:has(.game-stage:hover) .ball-cursor { opacity: 0 !important; }

/* ── 16. Exercice de la semaine ── */
.geste { background: #000; color: #fff; padding: clamp(70px, 11vh, 130px) 0; border-top: 1px solid rgba(255,255,255,.06); }
.geste-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.geste-media { position: relative; aspect-ratio: 9 / 16; max-height: 640px; border-radius: 30px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 40px 100px rgba(0,0,0,.6), 0 0 70px rgba(76,175,80,.2); }
.geste-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.geste-badge { position: absolute; top: 16px; left: 16px; font: 800 .68rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; background: var(--app-yellow); color: #000; padding: 8px 12px; border-radius: 20px; }
.geste-steps { list-style: none; counter-reset: g; display: grid; gap: 14px; margin-top: 30px; }
.geste-steps li { counter-increment: g; display: grid; grid-template-columns: 48px 1fr; gap: 4px 14px; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.geste-steps li::before { content: counter(g); grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--green-gradient); color: #000; font: 900 1.4rem/1 var(--font-display); }
.geste-steps b { font: 700 1.1rem/1.2 var(--font-body); }
.geste-steps span { color: rgba(255,255,255,.68); }
@media (max-width: 900px) { .geste-grid { grid-template-columns: 1fr; } .geste-media { max-width: 320px; width: 100%; margin: 0 auto; } }

/* ── 19–24. Data blocks (hidden until filled) ── */
.db-block:not(.has-data) { display: none !important; }
.db-block { background: #000; color: #fff; }
/* 19 chiffres */
.db-chiffres { padding: 0 0 clamp(60px, 9vh, 100px); }
.db-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.db-stat { padding: 28px; border-radius: 24px; background: linear-gradient(160deg, #101114, #08090b); border: 1px solid rgba(255,255,255,.08); }
.db-stat b { display: block; font: 900 clamp(2.8rem, 5vw, 4.2rem)/1 var(--font-display); }
.db-stat sup { font-size: .45em; color: var(--green); vertical-align: top; }
.db-stat span { color: rgba(255,255,255,.65); }
/* 20 semaine */
.db-semaine { background: var(--h-light) !important; color: #1d1d1f; padding: 90px 0 !important; }
.db-semaine .section-title { color: #1d1d1f !important; margin: 12px 0 18px; }
.db-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.db-legend i { font-style: normal; font: 600 .8rem/1 var(--font-body); padding: 7px 12px; border-radius: 20px; color: #fff; }
.db-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.db-day { background: #fff; border-radius: 20px; padding: 16px; border: 1px solid rgba(0,0,0,.06); }
.db-day h4 { font: 700 1.05rem/1 var(--font-body); margin-bottom: 12px; }
.db-slot { border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: #fff; }
.db-slot b { display: block; font: 700 .95rem/1.2 var(--font-body); } .db-slot span { font-size: .8rem; opacity: .9; }
.p-mini { background: #66BB6A; } .p-performance { background: #2e7d32; } .p-advanced { background: #1b4d22; } .p-elite { background: #000; box-shadow: inset 0 0 0 2px #f3e63a; }
/* 21 progression */
.db-progression { padding: clamp(80px, 12vh, 140px) 0; }
.db-ba-grid { display: grid; grid-template-columns: 1fr minmax(280px, 520px); gap: clamp(30px, 6vw, 80px); align-items: center; }
.db-ba { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; }
.db-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.db-ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.db-ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.db-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.db-ba-handle::after { content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-weight: 800; }
.db-ba-l, .db-ba-r { position: absolute; bottom: 14px; font: 700 .72rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; padding: 8px 11px; border-radius: 20px; background: rgba(0,0,0,.55); pointer-events: none; }
.db-ba-l { left: 14px; } .db-ba-r { right: 14px; }
/* 22 partenaires */
.db-partenaires { padding: 60px 0; border-top: 1px solid rgba(255,255,255,.08); text-align: center; }
.db-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px 56px; margin-top: 26px; }
.db-logos img { height: 44px; width: auto; filter: grayscale(1) brightness(1.8); opacity: .6; transition: filter .4s, opacity .4s; }
.db-logos a:hover img, .db-logos span:hover img { filter: none; opacity: 1; }
/* 23 actualités */
.db-actualites { padding: clamp(80px, 12vh, 140px) 0; }
.db-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 40px; }
.db-new { border-radius: 24px; overflow: hidden; background: #0e0f11; border: 1px solid rgba(255,255,255,.08); color: #fff; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.db-new:hover { transform: translateY(-6px); }
.db-new-img { aspect-ratio: 16 / 10; background: center / cover no-repeat; }
.db-new-body { padding: 22px; } .db-new time { font: 700 .74rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.db-new h3 { font: 700 1.3rem/1.2 var(--font-body); margin: 10px 0 8px; } .db-new p { color: rgba(255,255,255,.68); line-height: 1.5; }
/* 24 compte à rebours */
.db-evenement { position: relative; z-index: 5; }
.db-cd { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 26px; padding: 16px 20px; background: linear-gradient(90deg, #0b2a12, #14451f, #0b2a12); border-bottom: 1px solid rgba(255,255,255,.1); }
.db-cd-t { font: 800 1rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.db-cd-n { display: flex; align-items: baseline; gap: 4px 8px; }
.db-cd-n b { font: 900 1.8rem/1 var(--font-display); color: var(--app-yellow); min-width: 1.4em; text-align: right; }
.db-cd-n small { font-size: .78rem; color: rgba(255,255,255,.7); margin-right: 6px; }
.db-cd-btn { font: 700 .78rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; padding: 11px 16px; border-radius: 30px; background: #fff; color: #000; }
@media (max-width: 900px) { .db-ba-grid { grid-template-columns: 1fr; } }
.pcard-section .section-tag { color: #2e7d32 !important; }
@media (max-width: 768px) { .geste-badge { font-size: .74rem; } }
