/* CITY QUEST — partage (boutons, aperçu du visuel) et écrans de célébration plein écran. */

/* ---------- Boutons de partage ---------- */
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-actions .btn { flex: 1 1 160px; }
.share-quest { display: grid; gap: 8px; margin: 4px 0 16px; }
.quest-won { display: grid; gap: 12px; }
/* Vert WhatsApp avec texte sombre : 10,9:1 (le blanc sur ce vert n'atteint pas 4,5:1). */
.btn-whatsapp { background: #25d366; color: #0b2614; border-color: #25d366; }
.btn-whatsapp:hover { background: #3ee07a; color: #0b2614; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Aperçu du visuel (ordinateur ou navigateur sans partage de fichiers) ---------- */
.share-preview { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 14, .78); backdrop-filter: blur(6px); animation: cq-fade .2s ease-out; }
.share-preview-card { width: min(440px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 14px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.share-preview-card img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.share-preview-actions { display: grid; gap: 10px; }

/* ---------- Célébration ---------- */
html.has-celebration, html.has-celebration body { overflow: hidden; }
.celebration { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    color: #fff; text-align: center; overflow-y: auto;
    background: radial-gradient(circle at 50% 30%, rgba(255, 122, 0, .45), transparent 55%), linear-gradient(160deg, #101014 0%, #1c130b 60%, #2d1705 100%); }
.celebration-victory { background: radial-gradient(circle at 50% 28%, rgba(255, 209, 102, .55), transparent 50%), linear-gradient(160deg, #1a0f05 0%, #3a1c03 55%, #6b3200 100%); }
.celebration.is-leaving { animation: cq-fade .25s ease-in reverse forwards; }
.celebration-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebration-card { position: relative; width: min(460px, 100%); display: grid; justify-items: center; gap: 10px; }

.celebration-burst { position: relative; width: 168px; height: 168px; display: grid; place-items: center; margin-bottom: 6px; }
.celebration-burst::before { content: ""; position: absolute; inset: -70px; border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 209, 102, .35) 0deg 8deg, transparent 8deg 22deg);
    -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
    animation: cq-spin 14s linear infinite; }
.celebration-burst span { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; font-size: 84px; line-height: 1;
    background: radial-gradient(circle at 35% 30%, #fff, #ffe7c2); border: 6px solid #ffd166;
    box-shadow: 0 0 0 10px rgba(255, 209, 102, .18), 0 18px 50px rgba(255, 122, 0, .55);
    animation: cq-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.celebration-step .celebration-burst span { border-color: #2ec4b6; box-shadow: 0 0 0 10px rgba(46, 196, 182, .18), 0 18px 50px rgba(46, 196, 182, .45); }

.celebration-kicker { margin: 0; font-size: .85rem; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: #ffd166; animation: cq-rise .5s .15s both; }
.celebration h2 { margin: 0; font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.1; color: #fff; animation: cq-rise .5s .25s both; }
.celebration-quest { margin: 0; color: rgba(255, 255, 255, .82); font-weight: 600; animation: cq-rise .5s .32s both; }
.celebration-sub { margin: 4px 0 0; color: rgba(255, 255, 255, .82); animation: cq-rise .5s .38s both; }
.celebration-xp { margin: 6px 0 0; font-size: clamp(3.2rem, 15vw, 4.6rem); font-weight: 900; line-height: 1; letter-spacing: -.02em;
    background: linear-gradient(180deg, #fff 20%, #ffd166 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 8px 24px rgba(255, 122, 0, .55)); animation: cq-pop .6s .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.celebration-xp small { font-size: .4em; letter-spacing: .1em; }
.celebration-levelup { margin: 4px 0 0; padding: 10px 18px; border-radius: 999px; background: linear-gradient(90deg, #ffd166, #ff9a1f); color: var(--text); font-weight: 700;
    box-shadow: 0 10px 30px rgba(255, 154, 31, .45); animation: cq-pop .6s .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.celebration-level { width: 100%; display: grid; gap: 8px; color: rgba(255, 255, 255, .85); animation: cq-rise .5s .55s both; }
.celebration-level progress { width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .15); -webkit-appearance: none; appearance: none; }
.celebration-level progress::-webkit-progress-bar { background: rgba(255, 255, 255, .15); border-radius: 999px; }
.celebration-level progress::-webkit-progress-value { background: linear-gradient(90deg, #ff7a00, #ffd166); border-radius: 999px; }
.celebration-level progress::-moz-progress-bar { background: linear-gradient(90deg, #ff7a00, #ffd166); border-radius: 999px; }
.celebration-actions { width: 100%; display: grid; gap: 10px; margin-top: 14px; animation: cq-rise .5s .65s both; }

@keyframes cq-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes cq-rise { 0% { transform: translateY(16px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes cq-spin { to { transform: rotate(360deg); } }
@keyframes cq-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .celebration *, .celebration *::before, .celebration, .share-preview { animation: none !important; }
}


/* Page « Rejoignez-nous » */
.join-hero { text-align: center; padding: 32px 20px; margin-bottom: 16px; border-radius: 24px; color: #fff;
    background: radial-gradient(circle at 85% 10%, rgba(255, 122, 0, 0.45), transparent 55%), linear-gradient(135deg, #101014, #2d1705); }
.join-kicker { margin: 0; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffb877; font-size: 0.85rem; }
.join-count { margin: 4px 0 0; font-weight: 900; line-height: 1; font-size: clamp(4rem, 22vw, 7.5rem);
    background: linear-gradient(180deg, #ffd166, #ff7a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.join-title { margin: 6px 0 18px; font-size: 1.35rem; color: #fff; }
.join-stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0 0 20px; }
.join-stats li { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.95rem; }
.join-stats strong { color: #ffb877; }
