/**
 * Crepescule.fr — Design System & Optimisation Haute Performance
 * - Préserve intégralement le thème sombre + arrière-plan (img/app_bg.png) sur l'accueil, Amis, Aide, Profil, Codex, Récap
 * - Optimisation GPU (suppression des filtres blur animés .bg-orb et des effets lourds sur PC sans GPU & Mobile)
 * - Grille anti-débordement mobile pour les lignes de propositions (.crep-guess-row)
 */

:root {
    --crep-bg: #0f172a;
    --crep-surface: #1e293b;
    --crep-surface-soft: #334155;
    --crep-border: rgba(255, 255, 255, 0.12);
    --crep-text: #f8fafc;
    --crep-text-muted: #94a3b8;
    --crep-accent: #6366f1;
    --crep-accent-warm: #f59e0b;
    --crep-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   1. ANTI-LAG GPU : Suppression des filtres flous animés coûteux sur PC sans GPU
   ========================================================================== */
.bg-orb,
.orb-1,
.orb-2,
.orb-3 {
    display: none !important;
    animation: none !important;
    filter: none !important;
}

/* Désactivation des animations de filter (drop-shadow / blur) coûteuses sur CPU/iGPU */
.duel-hot-glow,
.duel-overtake-flash {
    filter: none !important;
}

/* Les panneaux sombres sont déjà quasi opaques (rgba 0.75-0.9) : le flou d'arrière-plan est invisible
   mais très coûteux au scroll sur PC sans GPU / mobiles d'entrée de gamme → on le neutralise. */
.glass,
.glass-card,
.glass-panel,
.content-wrapper,
.social-card,
.achievement-card,
.title-card,
.ui-panel,
.glass-btn,
.party-panel,
.backdrop-blur-sm,
.backdrop-blur-md,
.backdrop-blur-lg,
.backdrop-blur-xl,
.backdrop-blur-2xl {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.bg-animated {
    background-attachment: scroll !important;
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   2. LIGNES DE GUESS RESPONSIVES (ZÉRO DÉBORDEMENT MOBILE)
   ========================================================================== */
.crep-guess-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.crep-guess-word-col {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    flex: 0 1 44%;
    max-width: 48%;
}

@media (min-width: 640px) {
    .crep-guess-word-col {
        flex: 0 0 13rem;
        max-width: 13rem;
    }
}

.crep-guess-word-col .mot-guess {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.crep-guess-bar-col {
    flex: 1 1 auto;
    min-width: 3.25rem;
}

.crep-guess-score-col {
    flex: 0 0 auto;
    min-width: 3.75rem;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   3. BOUTON AIDE RAPIDE FLOTTANT DISCRET
   ========================================================================== */
#crep-floating-controls {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 640px) {
    #crep-floating-controls {
        bottom: 0.75rem;
        left: 0.75rem;
    }
}

.crep-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.crep-pill-btn:hover {
    transform: translateY(-1px);
    border-color: #818cf8;
}
