/* =========================================================
   Low Energy V1.1 — rendu minimal, admin-only via feature flag serveur.
   Le combat continue ; le DOM visible reste volontairement peu contrasté.
   ========================================================= */
.headerBar > .lowEnergySideButton {
    position:absolute;
    left:50%;
    top:-12px;
    bottom:auto;
    z-index:9;
    display:grid;
    place-items:center;
    width:32px;
    height:32px;
    margin:0;
    padding:0;
    border:1px solid rgba(255,255,255,.96);
    border-radius:12px;
    background:linear-gradient(180deg, rgba(38,59,125,.98) 0%, rgba(14,27,69,.96) 100%);
    color:#fff;
    font-size:17px;
    line-height:1;
    pointer-events:auto;
    cursor:pointer;
    touch-action:manipulation;
    box-shadow:0 3px 8px rgba(0,0,0,.74), inset 0 1px 0 rgba(255,255,255,.14);
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.78));
    transform:translateX(-50%);
    transition:transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.lowEnergySideButton > i { pointer-events:none; }
.lowEnergySideButton[hidden] { display:none !important; }
.lowEnergySideButton:hover,
.lowEnergySideButton:focus-visible {
    transform:translateX(-50%) scale(1.08);
    box-shadow:0 4px 10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.18);
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.95)) drop-shadow(0 0 5px rgba(255,255,255,.28));
    outline:0;
}
.lowEnergySideButton:active { transform:translateX(-50%) scale(.95); }


@media (max-width: 390px) {
    .headerBar > .lowEnergySideButton {
        top:-10px;
        width:30px;
        height:30px;
        border-radius:11px;
        font-size:16px;
    }
}

.lowEnergyOverlay {
    position:absolute;
    inset:0;
    z-index:2300;
    display:grid;
    place-items:center;
    padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));
    background:#010203;
    color:#9eabb4;
    font-family:"Poppins",Arial,sans-serif;
    pointer-events:auto;
    user-select:none;
    -webkit-user-select:none;
}
.lowEnergyOverlay[hidden] { display:none !important; }
.lowEnergyBattery {
    position:absolute;
    top:max(14px,calc(env(safe-area-inset-top) + 8px));
    right:max(15px,calc(env(safe-area-inset-right) + 10px));
    z-index:2;
    display:flex;
    align-items:center;
    gap:5px;
    color:#8f9da6;
    font-size:11px;
    line-height:1;
    opacity:.84;
    text-shadow:0 1px 2px rgba(0,0,0,.95);
    pointer-events:none;
}
.lowEnergyBattery[hidden] { display:none !important; }
.lowEnergyBattery > #lowEnergyBatteryIcon {
    width:15px;
    color:#9aa8b0;
    font-size:14px;
    text-align:center;
}
.lowEnergyBattery > strong {
    min-width:32px;
    color:#9aa8b0;
    font-size:10px;
    font-weight:750;
    letter-spacing:.01em;
}
.lowEnergyBatteryCharging {
    color:#a6b4bc;
    font-size:8px;
}
.lowEnergyBatteryCharging[hidden] { display:none !important; }
.lowEnergyCard {
    --low-energy-shift-x:0px;
    --low-energy-shift-y:0px;
    width:min(350px,100%);
    text-align:center;
    transform:translate(var(--low-energy-shift-x),var(--low-energy-shift-y));
}
.lowEnergyMoon {
    display:grid;
    place-items:center;
    width:48px;
    height:48px;
    margin:0 auto 8px;
    border:1px solid rgba(115,145,166,.16);
    border-radius:50%;
    background:rgba(85,120,145,.035);
    color:#7d9db4;
    font-size:22px;
}
.lowEnergyEyebrow {
    display:block;
    color:#526b7b;
    font-size:8px;
    font-weight:750;
    letter-spacing:.13em;
}
.lowEnergyTitle {
    display:block;
    margin-top:3px;
    color:#9ba7ae;
    font-size:15px;
    font-weight:850;
    line-height:1.05;
}
.lowEnergyZone {
    display:block;
    margin-top:7px;
    color:#6e94aa;
    font-size:11px;
    font-weight:800;
}
.lowEnergyEnemyVisual {
    display:grid;
    place-items:center;
    width:94px;
    height:94px;
    margin:12px auto 5px;
    opacity:.55;
}
.lowEnergyEnemyVisual img {
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    filter:brightness(.58) saturate(.58) contrast(.82);
}
.lowEnergyEnemyName {
    display:block;
    min-height:17px;
    color:#8f9ba2;
    font-size:10px;
    font-weight:750;
}
.lowEnergyStatus {
    margin:8px 0 0;
    color:#56798b;
    font-size:8px;
    font-weight:750;
}

.lowEnergySessionStats {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px 10px;
    width:min(286px,88%);
    margin:13px auto 0;
    padding:9px 11px 7px;
    border:1px solid rgba(137,166,184,.08);
    border-radius:9px;
    background:rgba(255,255,255,.018);
}
.lowEnergySessionStats > div {
    display:grid;
    gap:2px;
}
.lowEnergySessionStats span {
    color:#465b68;
    font-size:7px;
    font-weight:650;
}
.lowEnergySessionStats strong {
    color:#82949f;
    font-size:10px;
    font-weight:800;
}
.lowEnergySessionStats small {
    grid-column:1 / -1;
    color:#35434c;
    font-size:6px;
    font-weight:650;
}

.lowEnergyLootSection {
    width:min(320px,94%);
    margin:17px auto 0;
    padding-top:9px;
    border-top:1px solid rgba(137,166,184,.10);
}
.lowEnergyLootHeader {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:0 2px 8px;
    color:#536a78;
    font-size:7px;
    line-height:1;
}
.lowEnergyLootHeader strong {
    color:#6f818c;
    font-size:8px;
    letter-spacing:.08em;
}
.lowEnergyLoot {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:7px;
    min-height:0;
}
.lowEnergyLoot .battleRewardItem {
    flex:0 0 50px;
    min-width:50px;
    padding:3px;
    border-color:rgba(197,219,236,.12);
    background:rgba(255,255,255,.022);
    box-shadow:none;
    filter:brightness(.72) saturate(.70);
}
.lowEnergyLoot .battleRewardItemVisual {
    width:38px;
    height:38px;
}
.lowEnergyLoot .battleRewardItemVisual img {
    max-width:35px;
    max-height:35px;
    filter:brightness(.82) saturate(.76) drop-shadow(0 2px 3px rgba(0,0,0,.35));
}
.lowEnergyLoot .battleRewardItemVisual--creature img {
    max-width:none;
    max-height:none;
}
.lowEnergyLoot .battleRewardItemAmount {
    top:-6px;
    color:#b5b09c;
    font-size:10px;
    line-height:13px;
    text-shadow:0 1px 2px rgba(0,0,0,.78);
}
.lowEnergyLoot .battleRewardGlyphBase,
.lowEnergyLoot .battleRewardGlyphSet {
    filter:brightness(.76) saturate(.68) drop-shadow(0 2px 3px rgba(0,0,0,.32));
}
.lowEnergyLootEmpty {
    margin:3px 0 0;
    color:#3f505b;
    font-size:7px;
    font-weight:650;
}
.lowEnergyLootEmpty[hidden] { display:none !important; }

.lowEnergyFarmedCrystals {
    display:grid;
    grid-template-columns:auto auto auto;
    align-items:center;
    justify-content:center;
    gap:4px 6px;
    margin-top:15px;
    color:#657681;
    font-size:8px;
    font-weight:700;
}
.lowEnergyFarmedCrystals img {
    width:14px;
    height:14px;
    object-fit:contain;
    opacity:.60;
    filter:saturate(.65) brightness(.78);
}
.lowEnergyFarmedCrystals strong {
    color:#89959c;
    font-size:11px;
    font-weight:800;
}
.lowEnergyFarmedCrystals small {
    grid-column:1 / -1;
    color:#35434c;
    font-size:6px;
    font-weight:650;
}
.lowEnergyExit {
    min-width:205px;
    min-height:38px;
    margin-top:17px;
    padding:0 15px;
    border:1px solid rgba(105,145,166,.24);
    border-radius:10px;
    background:#09202f;
    color:#8da6b5;
    font:800 9px/1 "Poppins",Arial,sans-serif;
    letter-spacing:.04em;
    cursor:pointer;
    touch-action:manipulation;
}
.lowEnergyExit:active { transform:scale(.97); }

/* Stopper les animations/transitions sous l'écran noir évite de faire tourner
   le GPU pour une interface qui n'est plus visible. */
body.low-energy-mode-active .gameContainer * {
    animation-play-state:paused !important;
    transition:none !important;
    will-change:auto !important;
}
body.low-energy-mode-active .pwaInstallPrompt { display:none !important; }
body.low-energy-mode-active .combat-damage-float,
body.low-energy-mode-active #damageAnimation,
body.low-energy-mode-active #clickOverlay,
body.low-energy-mode-active #floatingBoostHud { display:none !important; }

@media (max-width:520px) {
    .lowEnergyEnemyVisual { width:88px; height:88px; }
    .lowEnergyTitle { font-size:14px; }
    .lowEnergyLootSection { width:min(300px,96%); }

    /* reward-tray.css compacte les .battleRewardItem mobiles avec des lignes
       à 0px ; le mode Low Energy réutilise ces classes mais doit conserver
       une vraie carte visible autour de l'icône. */
    .lowEnergyLoot {
        align-items:flex-start;
    }
    .lowEnergyLoot .battleRewardItem {
        flex:0 0 48px;
        min-width:48px;
        min-height:46px;
        grid-template-rows:auto;
        align-content:center;
        justify-items:center;
        padding:3px;
    }
    .lowEnergyLoot .battleRewardItemVisual {
        width:38px;
        height:38px;
    }
    .lowEnergyLoot .battleRewardItemAmount {
        top:-7px;
    }
}
