/* ============================================
   UX V3-B — Signature JC Coaching + 2026 polish
   Surcharge le styles.css original (pas de !important sauf strict néc.)
   ============================================ */

/* === 1. Theme signature : Lime + Dark Premium === */
:root {
    --bg-deep: #07090d;
    --neon-core: #c8ff3a;          /* Lime signature */
    --neon-primary: #4ade80;
    --neon-accent: #ff6b35;        /* Orange energy */
    --neon-soft: #8b5cf6;
    --glass-surface: rgba(18, 22, 31, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-card: 20px;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 24px rgba(200, 255, 58, 0.35);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-deep) !important;
    padding-top: max(80px, env(safe-area-inset-top)) !important;
    padding-bottom: max(120px, env(safe-area-inset-bottom)) !important;
}

/* === 2. Background FX moderne (orbs + grain) === */
.background-fx::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}
.orb-1 { background: var(--neon-core) !important; opacity: 0.18 !important; }
.orb-2 { background: var(--neon-accent) !important; opacity: 0.15 !important; }

/* === 3. Top header : safe-area + meilleur blur === */
.top-header {
    background: rgba(7, 9, 13, 0.85) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding-top: env(safe-area-inset-top);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* === 4. Tagline couleur signature === */
.top-header .text-cyan-400 { color: var(--neon-core) !important; }

/* === 5. Glass cards premium === */
.glass-card {
    background: var(--glass-surface) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 255, 58, 0.4), transparent);
    opacity: 0.6;
}

/* === 6. Tab bar : flottante + safe-area + meillerue visibilité === */
.tab-system {
    background: rgba(7, 9, 13, 0.92) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.05) inset !important;
    margin-bottom: env(safe-area-inset-bottom);
}
.tab-item { color: rgba(255, 255, 255, 0.45); }
.tab-item.active { color: var(--neon-core) !important; }
.tab-item.active .tab-icon { filter: drop-shadow(0 0 8px rgba(200, 255, 58, 0.6)); }

/* === 7. FAB central : signature lime === */
.fab-center {
    background: linear-gradient(135deg, var(--neon-core), var(--neon-primary)) !important;
    box-shadow: 0 0 24px rgba(200, 255, 58, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    border: 6px solid var(--bg-deep) !important;
}
.fab-center:active { transform: scale(0.95); }
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 24px rgba(200, 255, 58, 0.5), 0 8px 24px rgba(0,0,0,0.4); }
    50% { box-shadow: 0 0 40px rgba(200, 255, 58, 0.8), 0 12px 32px rgba(0,0,0,0.5); }
}

/* === 8. Boutons : meilleur feedback tactile === */
.btn-primary {
    background: linear-gradient(135deg, var(--neon-core), var(--neon-primary)) !important;
    color: #07090d !important;
    box-shadow: 0 4px 20px rgba(200, 255, 58, 0.35) !important;
    transition: transform 150ms ease, box-shadow var(--transition), filter var(--transition) !important;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}
.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 12px rgba(200, 255, 58, 0.5) !important;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled {
    background: rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.3) !important;
    box-shadow: none !important;
}
.btn-primary.loading-rabbit {
    background: linear-gradient(135deg, var(--neon-soft), #6366f1) !important;
    color: #fff !important;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6) !important;
}

.btn-secondary {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--glass-border) !important;
    color: #fff !important;
    transition: var(--transition);
    touch-action: manipulation;
}
.btn-secondary:active { transform: scale(0.97); background: rgba(200, 255, 58, 0.08) !important; }
.btn-secondary:hover { border-color: rgba(200, 255, 58, 0.3) !important; }

/* === 9. Form inputs : focus signature === */
select:focus, input:focus, textarea:focus {
    border-color: var(--neon-core) !important;
    background: rgba(200, 255, 58, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(200, 255, 58, 0.15) !important;
}
label { color: var(--neon-core) !important; }

/* === 10. Progress bar : signature lime === */
.progress-bar {
    background: linear-gradient(90deg, var(--neon-core), var(--neon-primary)) !important;
    box-shadow: 0 0 12px rgba(200, 255, 58, 0.5) !important;
}
.progress-container.complete {
    border-color: var(--neon-core) !important;
    box-shadow: 0 0 20px rgba(200, 255, 58, 0.6), 0 0 40px rgba(200, 255, 58, 0.3) !important;
}
.progress-text { color: var(--neon-core) !important; }

/* === 11. Option buttons (choix multiples) === */
.option-btn {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--glass-border) !important;
    color: rgba(255,255,255,0.7) !important;
    transition: var(--transition);
    touch-action: manipulation;
}
.option-btn:hover {
    background: rgba(200, 255, 58, 0.08) !important;
    border-color: rgba(200, 255, 58, 0.3) !important;
    color: #fff !important;
}
.option-btn.selected,
.option-btn.selected:hover {
    background: rgba(200, 255, 58, 0.18) !important;
    border-color: rgba(200, 255, 58, 0.6) !important;
    color: var(--neon-core) !important;
    box-shadow: 0 0 16px rgba(200, 255, 58, 0.25) !important;
}
.option-btn:active { transform: scale(0.97); }

/* === 12. Coach cards : selection plus visible === */
.coach-card {
    background: rgba(255,255,255,0.04) !important;
    border: 2px solid var(--glass-border) !important;
    transition: var(--transition);
}
.coach-card:hover {
    background: rgba(200, 255, 58, 0.06) !important;
    border-color: rgba(200, 255, 58, 0.3) !important;
}
.coach-card.selected {
    background: rgba(200, 255, 58, 0.16) !important;
    border-color: rgba(200, 255, 58, 0.6) !important;
    box-shadow: 0 0 24px rgba(200, 255, 58, 0.25) !important;
}

/* === 13. Lang selector : style cohérent === */
.lang-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--glass-border) !important;
}
.lang-btn:hover {
    background: rgba(200, 255, 58, 0.1) !important;
    border-color: var(--neon-core) !important;
}
.lang-dropdown {
    background: rgba(13, 17, 23, 0.98) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6) !important;
}
.lang-option:hover {
    background: rgba(200, 255, 58, 0.1) !important;
    color: #fff !important;
}
.lang-option.active {
    background: rgba(200, 255, 58, 0.15) !important;
    color: var(--neon-core) !important;
}

/* === 14. Hyper badge : lime signature === */
.hyper-badge {
    color: var(--neon-core) !important;
    background: linear-gradient(135deg, rgba(200, 255, 58, 0.18), rgba(74, 222, 128, 0.12)) !important;
    border: 1px solid rgba(200, 255, 58, 0.4) !important;
}
@keyframes hyperBadgePulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(200, 255, 58, 0.3), 0 0 24px rgba(200, 255, 58, 0.2);
        border-color: rgba(200, 255, 58, 0.4);
    }
    50% {
        box-shadow: 0 0 24px rgba(200, 255, 58, 0.55), 0 0 40px rgba(200, 255, 58, 0.3);
        border-color: rgba(200, 255, 58, 0.75);
    }
}

/* === 15. Accessibilité : focus visible === */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--neon-core);
    outline-offset: 2px;
    border-radius: 8px;
}

/* === 16. Scroll momentum iOS === */
.glass-card,
.tab-system,
.top-header {
    -webkit-overflow-scrolling: touch;
}

/* === 17. PWA install banner === */
.pwa-install-banner {
    background: rgba(7, 9, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(200, 255, 58, 0.3) !important;
}
.pwa-btn-install {
    background: linear-gradient(135deg, var(--neon-core), var(--neon-primary)) !important;
    color: #07090d !important;
    font-weight: 700;
}

/* === 18. Logo main : subtle glow === */
.logo-main {
    filter: drop-shadow(0 0 12px rgba(200, 255, 58, 0.4)) !important;
}

/* === 19. Transitions entre sections (fade + slide) === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.glass-card { animation: fadeIn 350ms cubic-bezier(0.16, 1, 0.3, 1); }

/* === 20. Toast container style === */
.toast-container {
    position: fixed !important;
    top: max(80px, env(safe-area-inset-top)) !important;
    right: 16px !important;
    left: 16px !important;
    z-index: 9000 !important;
    pointer-events: none;
}
.toast {
    background: rgba(7, 9, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-left: 4px solid var(--neon-core) !important;
    color: #fff !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 10px;
    pointer-events: auto;
    animation: toastIn 350ms cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Montserrat', system-ui;
    font-size: 0.9rem;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* === 21. Reduce motion : respect préférence système === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .glass-card, .toast { animation: none; }
}

/* === 22. Donation modal style cohérent === */
.donation-modal-content {
    background: rgba(7, 9, 13, 0.96) !important;
    border: 1px solid rgba(200, 255, 58, 0.3) !important;
}
.donation-btn-modal {
    background: rgba(255,255,255,0.05) !important;
    border: 2px solid rgba(200, 255, 58, 0.3) !important;
}
.donation-btn-modal:hover {
    background: rgba(200, 255, 58, 0.15) !important;
    border-color: rgba(200, 255, 58, 0.6) !important;
}
.donation-btn-modal .donation-amount { color: var(--neon-core) !important; }
.donation-btn-custom .donation-amount { color: var(--neon-soft) !important; }
.custom-send {
    background: linear-gradient(135deg, var(--neon-soft), var(--neon-core)) !important;
    color: #07090d !important;
}

/* === 23. Streak & XP badges: pop lime === */
#streak-badge,
#header-level-badge {
    background: rgba(200, 255, 58, 0.08) !important;
    border-color: rgba(200, 255, 58, 0.25) !important;
    color: var(--neon-core) !important;
}
.xp-bar-mini-inner {
    background: linear-gradient(90deg, var(--neon-core), var(--neon-primary)) !important;
    box-shadow: 0 0 8px rgba(200, 255, 58, 0.5) !important;
}

/* === 24. Mode "device small" === */
@media (max-width: 380px) {
    body { font-size: 14px; }
    .top-header h1 { font-size: 1.05rem !important; }
    .glass-card { padding: 16px !important; border-radius: 16px !important; }
}

/* === 25. Skeleton -> hidden state propre === */
#app-skeleton.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms ease;
}
