/* ==========================================================================
   TAMETEO - CSS NÉO-PIXEL ART & ARCHITECTURE ACCORDÉON (70/30 <-> 10/90)
   ========================================================================== */

:root {
    --bg-dark: #12101e;
    --console-shell: #242038;
    --console-border: #0d0b17;
    --console-accent: #ff0055;
    
    --screen-bg: #1c1830;
    --screen-text: #f0f0ff;
    --screen-text-dim: #c4c2dc;
    
    --pixel-border-color: #100e1d;
    --pixel-border-size: 3px;
    
    --weather-bg: #1e1a38;
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.12);
    
    --accent-yellow: #fde047;
    --accent-mint: #6ee7b7;
    --accent-sky: #38bdf8;
    --accent-coral: #fb7185;
    --accent-purple: #c084fc;
    
    --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-pixel: var(--font-ui);
    --font-retro: 'Press Start 2P', monospace;
    --font-digit: 'VT323', monospace;
    
    --ease-accordion: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(15, 12, 28, 0.7);
}

input, textarea, select {
    user-select: text;
    -webkit-user-select: text;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 12, 28, 0.7);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
    border: 1px solid #4338ca;
}
::-webkit-scrollbar-thumb:hover {
    background: #818cf8;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-pixel);
    color: var(--screen-text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Arrière-plan Desktop immersif */
.desktop-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, #29204a 0%, #100c22 70%);
    z-index: -1;
    overflow: hidden;
}

.stars-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.7), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 230px 190px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 310px 80px, rgba(255,255,255,0.9), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 350px 350px;
    opacity: 0.35;
}

/* ==========================================================================
   BOÎTIER CONSOLE / SMARTPHONE (Format centré sur PC, plein écran sur mobile)
   ========================================================================== */

.console-case {
    width: 100%;
    max-width: 450px;
    height: 94vh;
    height: 94dvh;
    max-height: 920px;
    background-color: var(--console-shell);
    border: 4px solid var(--console-border);
    border-radius: 36px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 0 4px rgba(255, 255, 255, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: 12px 14px 16px 14px;
    position: relative;
    overflow: hidden;
    margin: auto;
}

@media (max-width: 480px) {
    .console-case {
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        padding: 0;
    }
}

/* En-tête matériel console (speaker + power LED) */
.console-bezel-top {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .console-bezel-top {
        display: none;
    }
}

.console-speaker {
    display: flex;
    gap: 5px;
}

.console-speaker span {
    width: 14px;
    height: 4px;
    background: #141124;
    border-radius: 2px;
}

.console-power-led {
    position: absolute;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: ledPulse 2.5s infinite ease-in-out;
}

@keyframes ledPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; filter: drop-shadow(0 0 4px #34d399); }
}

/* ==========================================================================
   ÉCRAN VIRTUEL & BARRE DE STATUT
   ========================================================================== */

.screen-viewport {
    flex: 1;
    background-color: var(--screen-bg);
    border: 3px solid var(--console-border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 480px) {
    .screen-viewport {
        border-radius: 0;
        border: none;
    }
}

/* Barre de statut supérieure */
.status-bar {
    min-height: 44px;
    background: rgba(16, 14, 29, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--screen-text-dim);
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    z-index: 20;
    flex-shrink: 0;
}

.status-brand {
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--accent-mint);
    letter-spacing: 1px;
    margin-right: 8px;
}

.status-time {
    font-family: var(--font-digit);
    font-size: 18px;
    color: var(--screen-text);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-audio-btn,
.status-readability-btn,
.status-zen-btn,
.status-account-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--screen-text);
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background-color 0.15s, border-color 0.15s;
}

.status-account-btn.is-synced {
    border-color: rgba(52, 211, 153, 0.65);
    background: rgba(16, 185, 129, 0.14);
}

.account-status-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #090812;
    background: #94a3b8;
}

.account-status-dot.status-synced {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.account-status-dot.status-syncing {
    background: #fbbf24;
}

.account-status-dot.status-offline,
.account-status-dot.status-error {
    background: #ef4444;
}

.status-readability-btn.is-active {
    background: var(--accent-yellow);
    color: #181425;
    border-color: #ffffff;
}

.status-audio-btn:active,
.status-readability-btn:active,
.status-zen-btn:active,
.status-account-btn:active {
    transform: scale(0.92);
}

.active-travel-banner-chip {
    min-height: 44px;
    padding: 4px 10px;
    margin-left: 6px;
    background: rgba(56, 189, 248, 0.18);
    border: 1.5px solid #38bdf8;
    border-radius: 999px;
    color: #e0f2fe;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}

/* ==========================================================================
   BANDEAU MÉTÉO COMPACT (TOP) & TIROIR MÉTÉO COMPLET (OVERLAY)
   ========================================================================== */

.weather-top-banner {
    flex-shrink: 0;
    background: #17132a;
    border-bottom: 2px solid var(--pixel-border-color);
    z-index: 18;
    padding: 4px 10px;
}

.weather-banner-main-btn {
    width: 100%;
    min-height: 46px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--screen-text);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.weather-banner-main-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.weather-banner-main-btn:active {
    transform: scale(0.99);
}

.compact-location-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-right-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.compact-right-meta .arrow-icon {
    font-size: 13px;
    color: var(--accent-yellow);
    background: #2a2444;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    padding: 4px 8px;
}

.weather-drawer {
    position: absolute;
    inset: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    background: var(--weather-bg, #161529);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.weather-drawer.is-open {
    opacity: 1;
    transform: translateY(0);
}

.weather-drawer-header {
    flex-shrink: 0;
    min-height: 48px;
    padding: 6px 12px;
    background: #131024;
    border-bottom: 2px solid var(--pixel-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.weather-drawer-title {
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-mint);
}

.weather-drawer-close-btn {
    min-height: 44px;
    min-width: 88px;
    padding: 6px 12px;
    background: #2b2548;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.compact-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-icon {
    font-size: 24px;
    animation: floatSlow 3s infinite ease-in-out;
}

.compact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.compact-city {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    color: var(--screen-text);
}

.compact-temp {
    font-family: var(--font-digit);
    font-size: 18px;
    color: var(--accent-yellow);
}

.compact-expand-btn {
    background: #2a2444;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.1s, background-color 0.2s;
}

.compact-expand-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.compact-expand-btn .arrow-icon {
    font-size: 12px;
    color: var(--accent-yellow);
    animation: bounceDown 1.2s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 2. Vue Complète (Dans le tiroir Météo) */
.weather-full-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Scrollbar personnalisée rétro */
.weather-full-view::-webkit-scrollbar {
    width: 5px;
}
.weather-full-view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Barre d'outils météo */
.weather-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.retro-btn-icon {
    background: #2b2548;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #0d0b17;
    color: var(--screen-text);
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform 0.1s;
}

.retro-btn-icon:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-text {
    font-size: 13px;
    font-weight: 700;
}

.weather-location {
    text-align: center;
    flex: 1;
    padding: 0 8px;
}

.city-name {
    font-family: var(--font-pixel);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-name {
    font-size: 13px;
    color: var(--screen-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weather-date-badge {
    text-align: center;
    color: var(--accent-mint);
    margin-bottom: 10px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
}

/* Bloc Température Principale */
.main-temperature-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.temp-huge-wrapper {
    display: flex;
    flex-direction: column;
}

.temp-huge {
    font-family: var(--font-digit);
    font-size: 64px;
    font-weight: 700;
    line-height: 0.9;
    color: #ffffff;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: -2px;
}

.temp-sub-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.weather-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-yellow);
    text-shadow: 1px 1px 0 #000;
}

.temp-range {
    font-size: 13px;
    color: var(--screen-text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.temp-range b {
    color: var(--screen-text);
}

.weather-animated-icon {
    font-size: 54px;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.4));
    animation: floatIcon 3.5s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Grille 4 Métriques */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.metric-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.metric-icon {
    font-size: 20px;
}

.metric-data {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text-dim);
    letter-spacing: 0.4px;
}

.metric-val {
    font-family: var(--font-pixel);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

/* Sections Prévisions */
.forecast-section {
    margin-bottom: 14px;
}

.section-title-retro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-mint);
    letter-spacing: 0.4px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.scroll-hint {
    font-size: 12px;
    color: var(--screen-text-dim);
}

/* Défilement Heure par Heure */
.hourly-scroll-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.hourly-scroll-container::-webkit-scrollbar {
    height: 4px;
}
.hourly-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.hourly-card {
    flex: 0 0 64px;
    min-height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    transition: transform 0.2s, background 0.2s;
}

.hourly-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.hourly-time {
    font-size: 12px;
    color: var(--screen-text-dim);
}

.hourly-icon {
    font-size: 20px;
}

.hourly-temp {
    font-family: var(--font-digit);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-yellow);
}

/* Liste 7 Jours */
.daily-forecast-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daily-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
}

.daily-day {
    flex: 2;
    font-weight: 600;
}

.daily-icon {
    flex: 1;
    text-align: center;
    font-size: 18px;
}

.daily-range {
    flex: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-family: var(--font-digit);
    font-size: 17px;
}

.daily-min {
    color: var(--screen-text-dim);
}

.daily-bar-mini {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.daily-bar-inner {
    height: 100%;
    background: linear-gradient(to right, var(--accent-sky), var(--accent-yellow));
    border-radius: 2px;
}

.daily-max {
    color: #ffffff;
    font-weight: 700;
}

/* Bannière d'appel vers le terrarium */
.terrar-cta-banner {
    margin-top: 10px;
    min-height: 44px;
    background: linear-gradient(90deg, #312152, #472d70);
    border: 2px dashed var(--accent-mint);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.terrar-cta-banner:hover {
    background: linear-gradient(90deg, #3c2a64, #563788);
    transform: scale(1.02);
}

.cta-pulse {
    color: var(--accent-yellow);
    animation: pulseCta 1s infinite alternate;
}

@keyframes pulseCta {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(2px); }
}

/* ==========================================================================
   VOLET TERRARIUM - LE MONDE DE TAMETEO
   ========================================================================== */

.panel-terrarium {
    flex: 1;
    min-height: 270px;
    background-color: #0f172a;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* DÉCOR MÉTÉO & BIOME */
.biome-environment {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    transition: background 1s ease;
}

/* Couleurs de ciel dynamiques selon le temps */
.theme-sunny .biome-environment {
    background: linear-gradient(180deg, #38bdf8 0%, #7dd3fc 45%, #bae6fd 85%);
}

.theme-cloudy .biome-environment {
    background: linear-gradient(180deg, #64748b 0%, #94a3b8 50%, #cbd5e1 85%);
}

.theme-rainy .biome-environment {
    background: linear-gradient(180deg, #334155 0%, #475569 50%, #64748b 85%);
}

.theme-snowy .biome-environment {
    background: linear-gradient(180deg, #93c5fd 0%, #bfdbfe 50%, #e2e8f0 85%);
}

.theme-stormy .biome-environment {
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 40%, #4338ca 85%);
}

.theme-night .biome-environment {
    background: linear-gradient(180deg, #09090b 0%, #18181b 40%, #27272a 85%);
}

/* Astres (Soleil / Lune) */
.celestial-body {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 38px;
    filter: drop-shadow(0 0 12px rgba(253, 224, 71, 0.6));
    animation: celestialSpin 20s infinite linear;
    transition: transform 0.5s ease;
}

@keyframes celestialSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Nuages Pixel-Art Défilants */
.pixel-clouds-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.pixel-cloud {
    position: absolute;
    background: #ffffff;
    box-shadow: 
        0 4px 0 #ffffff,
        0 -4px 0 #ffffff,
        4px 0 0 #ffffff,
        -4px 0 0 #ffffff,
        0 8px 0 rgba(0, 0, 0, 0.1);
    opacity: 0.85;
}

.cloud-1 {
    width: 60px;
    height: 16px;
    top: 25px;
    border-radius: 6px;
    animation: cloudDrift 22s infinite linear;
}

.cloud-2 {
    width: 90px;
    height: 20px;
    top: 50px;
    border-radius: 8px;
    opacity: 0.7;
    animation: cloudDrift 32s infinite linear -10s;
}

.cloud-3 {
    width: 45px;
    height: 14px;
    top: 85px;
    border-radius: 4px;
    opacity: 0.6;
    animation: cloudDrift 26s infinite linear -18s;
}

@keyframes cloudDrift {
    0% { transform: translateX(-150px); }
    100% { transform: translateX(500px); }
}

/* Étoiles Scintillantes pour la Nuit */
.stars-layer {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.theme-night .stars-layer {
    display: block;
    background-image: 
        radial-gradient(2px 2px at 15px 25px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 45px 65px, #fef08a, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 80px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 140px 90px, #fef08a, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 260px 70px, #fef08a, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 320px 20px, #fff, rgba(0,0,0,0));
    background-size: 250px 250px;
    animation: starTwinkle 3s infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Particules Météo (Pluie / Neige) */
.weather-particles-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), #38bdf8);
    animation: rainFall 0.7s infinite linear;
}

@keyframes rainFall {
    0% { transform: translateY(-20px) rotate(12deg); opacity: 0.8; }
    100% { transform: translateY(500px) rotate(12deg); opacity: 0.2; }
}

.snow-flake {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    box-shadow: 0 0 3px #ffffff;
    border-radius: 1px;
    animation: snowFall 3s infinite linear;
}

@keyframes snowFall {
    0% { transform: translateY(-10px) translateX(0); opacity: 1; }
    50% { transform: translateY(200px) translateX(15px); }
    100% { transform: translateY(400px) translateX(-10px); opacity: 0.3; }
}

/* Éclairs d'orage */
.lightning-flash {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
}

.lightning-active {
    animation: lightningZap 0.4s ease-out;
}

@keyframes lightningZap {
    0% { opacity: 0; }
    10% { opacity: 0.9; }
    20% { opacity: 0.1; }
    30% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Couches de Sol Pixelisé */
.ground-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 112px;
    z-index: 2;
    pointer-events: none;
}

.hills-far {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    height: 74px;
    background: #166534;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: 0.5;
    transform: scaleX(1.4);
}

.theme-snowy .hills-far {
    background: #94a3b8;
}

.hills-mid {
    position: absolute;
    bottom: 18px;
    left: -20px;
    right: -20px;
    height: 52px;
    background: #15803d;
    border-radius: 40% 60% 0 0 / 100% 100% 0 0;
}

.theme-snowy .hills-mid {
    background: #cbd5e1;
}

.grass-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 34px;
    background: #22c55e;
    border-top: 3px solid #16a34a;
    box-shadow: inset 0 -4px 0 #15803d;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 2px;
}

.theme-snowy .grass-ground {
    background: #f1f5f9;
    border-top: 3px solid #e2e8f0;
    box-shadow: inset 0 -4px 0 #cbd5e1;
}

.pixel-flower {
    font-size: 14px;
    animation: flowerSway 3s infinite ease-in-out alternate;
}

.f2 { animation-delay: 1s; }
.f3 { animation-delay: 2s; }

@keyframes flowerSway {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* Bandeau d'agrandissement en mode aperçu (30%) */
.compact-terrarium-prompt {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mode-tamagotchi .compact-terrarium-prompt {
    opacity: 0;
}

.prompt-badge {
    background: rgba(16, 14, 29, 0.85);
    border: 2px solid var(--accent-mint);
    box-shadow: 2px 2px 0 #000;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 6px;
    animation: promptPulse 1.8s infinite;
}

@keyframes promptPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==========================================================================
   ZONE CENTRALE DE LA CRÉATURE (TAMETEO)
   ========================================================================== */

.pet-stage-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 36px;
    z-index: 6;
    pointer-events: none;
}

.tameto-creature-wrapper {
    --pet-x: 0px;
    --pet-scale: 3.0;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    outline: none;
    transform: translateX(var(--pet-x)) scale(var(--pet-scale));
    transform-origin: center bottom;
    transition: transform 0.85s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Animations de la créature */
.pet-svg {
    display: block;
    overflow: visible;
}

.pet-sleep-zzz {
    animation: sleepZzzFloat 2.2s infinite ease-in-out;
}

.pet-sleep-zzz-delayed {
    animation-delay: 0.9s;
}

@keyframes sleepZzzFloat {
    0% { opacity: 0.2; transform: translateY(1px); }
    50% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0.2; transform: translateY(-4px); }
}

/* Respiration Idle */
.pet-body-group {
    transform-origin: 16px 29px;
    animation: petBreathe 2.4s infinite ease-in-out;
}

@keyframes petBreathe {
    0%, 100% { transform: scale(1, 1); }
    50% { transform: scale(1.04, 0.96); }
}

/* Clignement des yeux */
.pet-eye {
    transform-origin: center;
    animation: petBlink 4s infinite;
}

@keyframes petBlink {
    0%, 95%, 100% { transform: scaleY(1); }
    97% { transform: scaleY(0.1); }
}

/* Saut de joie */
.pet-jumping .tameto-creature-wrapper {
    animation: petJumpAnim 0.5s ease-out;
}

@keyframes petJumpAnim {
    0% { transform: translateX(var(--pet-x)) translateY(0) scale(var(--pet-scale), var(--pet-scale)); }
    35% { transform: translateX(var(--pet-x)) translateY(-38px) scale(calc(var(--pet-scale) * 0.9), calc(var(--pet-scale) * 1.1)) rotate(-4deg); }
    70% { transform: translateX(var(--pet-x)) translateY(4px) scale(calc(var(--pet-scale) * 1.07), calc(var(--pet-scale) * 0.9)) rotate(4deg); }
    100% { transform: translateX(var(--pet-x)) translateY(0) scale(var(--pet-scale), var(--pet-scale)); }
}

/* Grelottement de froid */
.is-cold .pet-body-group {
    animation: petShiver 0.25s infinite linear;
}

@keyframes petShiver {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* Champ de particules (cœurs, étoiles, nourritures volantes) */
.pet-particle-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
}

.floating-particle {
    position: absolute;
    font-size: 20px;
    animation: floatParticle 1.2s forwards ease-out;
    pointer-events: none;
}

@keyframes floatParticle {
    0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(var(--tx, 0), var(--ty, -60px)) scale(1.3); opacity: 0; }
}

/* ==========================================================================
   ÉLÉMENTS ÉTENDUS EN MODE TAMAGOTCHI (90%) - INTERFACE ÉPURÉE & AÉRÉE
   ========================================================================== */

.tamagotchi-extended-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 10px;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-sizing: border-box;
}

.mode-tamagotchi .tamagotchi-extended-ui {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 1. Ligne Supérieure : HUD 2 Paliers Réactif (Stats + 5 Actions Rapides) */
.tamagotchi-unified-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 6px 8px;
    background: rgba(14, 11, 26, 0.82);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
    flex-shrink: 0;
}

.user-stats-compact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.level-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    background: rgba(18, 15, 34, 0.88);
    border: 2px solid var(--accent-mint);
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 1px 1px 0 #000;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.18s ease;
}

.level-chip:hover {
    transform: scale(1.04);
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.5);
    border-color: #a7f3d0;
}

.level-num {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.xp-nano-track {
    width: 28px;
    height: 6px;
    background: #0d0b17;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.xp-nano-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    transition: width 0.3s ease;
}

.gems-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 36px;
    background: rgba(18, 15, 34, 0.88);
    border: 2px solid var(--accent-yellow);
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 1px 1px 0 #000;
    font-size: 13px;
    color: var(--accent-yellow);
    flex-shrink: 0;
}

.gems-chip b {
    font-family: var(--font-digit);
    font-size: 16px;
    line-height: 1;
}

.streak-chip {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 36px;
    background: rgba(18, 15, 34, 0.88);
    border: 2px solid #f97316;
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 1px 1px 0 #000;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #f97316;
    flex-shrink: 0;
}

.streak-chip b {
    font-family: var(--font-digit);
    font-size: 16px;
    color: #ffffff;
}

/* Bouton 1-clic Vue Épurée (Mode Zen) dans la barre de statistiques */
.zen-mode-toggle-chip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    background: rgba(49, 38, 84, 0.90);
    border: 2px solid var(--accent-mint);
    border-radius: 6px;
    padding: 4px 10px;
    box-shadow: 1px 1px 0 #000;
    color: var(--accent-mint);
    cursor: pointer;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    transition: transform 0.1s, background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.zen-mode-toggle-chip:hover {
    background: #43336f;
    color: #ffffff;
    border-color: #a7f3d0;
}

.zen-mode-toggle-chip:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* Bouton Flottant en Mode Zen pour restaurer les infos en 1 clic */
.zen-exit-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 55;
    display: none;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    background: rgba(22, 18, 41, 0.92);
    border: 2px solid var(--accent-mint);
    border-radius: 22px;
    padding: 8px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 10px rgba(110, 231, 183, 0.4);
    color: #ffffff;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    backdrop-filter: blur(8px);
    transition: transform 0.15s, box-shadow 0.15s;
    animation: zenPillPulse 2.4s infinite ease-in-out;
}

@keyframes zenPillPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(0,0,0,0.55), 0 0 8px rgba(110,231,183,0.3); }
    50% { transform: scale(1.04); box-shadow: 0 4px 18px rgba(0,0,0,0.7), 0 0 16px rgba(110,231,183,0.65); }
}

.zen-exit-pill:hover {
    background: rgba(35, 29, 65, 0.98);
    border-color: #a7f3d0;
}

.zen-exit-pill:active {
    transform: scale(0.96);
}

/* RÈGLES DU MODE ZEN : Masquage net et fluide des bandeaux de contrôles */
body.zen-active .weather-top-banner,
body.zen-active .bottom-control-panel {
    display: none !important;
}

body.zen-active .terrarium-top-stack,
body.zen-active .terrarium-hud-strip,
body.zen-active #dialogueBox,
body.zen-active .onboarding-banner,
body.zen-active .terrarium-preview-banner,
.panel-terrarium.zen-mode .terrarium-hud-strip,
.panel-terrarium.zen-mode #dialogueBox {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-20px) !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.zen-active .zen-exit-pill,
.panel-terrarium.zen-mode .zen-exit-pill {
    display: flex !important;
}

.quick-icons-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

.mini-icon-btn {
    width: 100%;
    min-height: 48px;
    height: auto;
    background: #251d3b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 1px 1px 0 #000;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s, background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.mini-icon-btn:hover {
    background: #352a53;
    border-color: rgba(255, 255, 255, 0.35);
}

.mini-icon-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.mini-icon-btn .btn-icon {
    font-size: 16px;
    line-height: 1;
    display: block;
    pointer-events: none;
}

.mini-icon-btn .btn-micro-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--screen-text-dim);
    white-space: nowrap;
    display: block;
    pointer-events: none;
}

.mini-icon-btn:hover .btn-micro-label {
    color: #ffffff;
}

.mini-icon-btn.chest-btn {
    border-color: #f59e0b;
    color: #fde047;
    animation: chestGlow 2s infinite alternate;
}

.mini-icon-btn.quests-btn {
    border-color: #38bdf8;
    color: #38bdf8;
}

.mini-icon-btn.bestiary-btn {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.mini-icon-btn.postcards-btn {
    border-color: #f97316;
    color: #fb923c;
}

.mini-icon-btn.custom-btn {
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

/* 2. Bulle de Dialogue RPG Compacte (Dans le flux vertical supérieur, zéro superposition) */
.retro-dialogue-box.compact-dialogue {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 26;
    background: rgba(22, 19, 41, 0.92);
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812, inset 1px 1px 0 rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px 8px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: opacity 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), max-height 0.25s ease;
    overflow: hidden;
    max-height: 78px;
    pointer-events: auto;
}

.retro-dialogue-box.compact-dialogue.is-dismissed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
}

.retro-dialogue-box.compact-dialogue:active {
    transform: scale(0.99);
}

.retro-dialogue-box.compact-dialogue::after {
    display: none;
}

.compact-dialogue .dialogue-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.dialogue-close-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.dialogue-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border-color: #ef4444;
}

.dialogue-close-btn:active {
    transform: scale(0.9);
}

.compact-dialogue .dialogue-avatar-mini {
    font-size: 14px;
}

.compact-dialogue .dialogue-name {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-mint);
    letter-spacing: 0.4px;
}

.compact-dialogue .dialogue-level-mini {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-yellow);
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 3px;
}

.compact-dialogue .dialogue-dots {
    color: var(--screen-text-dim);
    font-size: 13px;
    letter-spacing: 1px;
}

.compact-dialogue .dialogue-content {
    min-height: auto;
}

.compact-dialogue .dialogue-text {
    font-size: 14px;
    line-height: 1.35;
    color: #ffffff;
    font-weight: 600;
    margin: 0;
}

/* 3. Jauges Vivantes Compactes (1 Seule Ligne Horizontale !) */
.vitals-dock-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    margin-bottom: 6px;
    background: rgba(18, 15, 34, 0.88);
    border: 2px solid var(--pixel-border-color);
    border-radius: 8px;
    padding: 5px 8px;
    box-shadow: 2px 2px 0 #090812;
    backdrop-filter: blur(4px);
}

.vital-dock-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vital-dock-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}

.vital-dock-head b {
    font-family: var(--font-digit);
    font-size: 15px;
    color: var(--screen-text);
}

.vital-dock-bar {
    width: 100%;
    height: 5px;
    background: #0d0b17;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.vital-bar-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.4s ease-out;
}

.hunger-fill {
    background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.comfort-fill {
    background: linear-gradient(90deg, #38bdf8, #7dd3fc);
}

.mood-fill {
    background: linear-gradient(90deg, #f59e0b, #fde047);
}

/* 4. Les 3 Gros Boutons d'Action Rétro Équilibrés */
.actions-dock.compact-dock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}

.compact-dock .action-btn {
    border: 2px solid var(--pixel-border-color);
    border-radius: 8px;
    min-height: 54px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 
        2px 2px 0 #000,
        inset 1px 1px 0 rgba(255, 255, 255, 0.4),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
}

.compact-dock .action-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000;
}

.btn-feed {
    background: linear-gradient(180deg, #ff4757, #e84118);
    color: #ffffff;
}

.btn-protect {
    background: linear-gradient(180deg, #2ed573, #10ac84);
    color: #ffffff;
}

.btn-play {
    background: linear-gradient(180deg, #ffa502, #e67e22);
    color: #ffffff;
}

.compact-dock .action-btn-icon {
    font-size: 20px;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.3));
}

.compact-dock .action-btn-text {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

/* Bouton Replier vers météo complète */
.collapse-to-weather-bar {
    text-align: center;
}

.mini-collapse {
    background: rgba(16, 14, 29, 0.85);
    border: 1px solid var(--accent-mint);
    border-radius: 6px;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
    transition: transform 0.1s;
}

.mini-collapse:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.collapse-btn {
    background: rgba(16, 14, 29, 0.8);
    border: 2px solid var(--accent-mint);
    border-radius: 6px;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.1s;
}

.collapse-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* ==========================================================================
   MODAL POPUP RÉTRO : RECHERCHE DE VILLE
   ========================================================================== */

.retro-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 16, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.retro-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.retro-modal-box {
    width: 100%;
    max-width: 380px;
    background: #1f1a36;
    border: 4px solid var(--pixel-border-color);
    box-shadow: 6px 6px 0 #000, inset 2px 2px 0 rgba(255,255,255,0.15);
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.retro-modal-backdrop.is-open .retro-modal-box {
    transform: scale(1);
}

.modal-header {
    background: #161228;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--pixel-border-color);
}

.modal-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-yellow);
    letter-spacing: 0.4px;
}

.modal-close-btn {
    background: #ff4757;
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000;
    color: #fff;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.modal-body {
    padding: 14px;
    max-height: 75vh;
    overflow-y: auto;
}

.input-retro-group {
    display: flex;
    align-items: center;
    background: #100d1e;
    border: 2px solid var(--pixel-border-color);
    box-shadow: inset 2px 2px 0 #000;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.input-prefix {
    font-size: 16px;
    margin-right: 8px;
}

.retro-input {
    background: none;
    border: none;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 15px;
    width: 100%;
    outline: none;
}

.retro-input::placeholder {
    color: var(--screen-text-dim);
}

.gps-quick-btn {
    width: 100%;
    min-height: 44px;
    background: #2563eb;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: transform 0.1s;
}

.gps-quick-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.quick-cities-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text-dim);
    margin-bottom: 6px;
}

.quick-cities-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.chip-btn {
    background: #2e284f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--screen-text);
    font-family: var(--font-pixel);
    font-size: 13px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.chip-btn:hover {
    background: #413a6e;
}

.chip-btn:active {
    transform: scale(0.95);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.result-name {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}

.result-admin {
    font-size: 13px;
    color: var(--screen-text-dim);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   ÉTAPE 2 : NOUVEAUX STYLES & INTERFACES (PERSONNALISATION, DÉCORS, ÉCLATS)
   ========================================================================== */

/* 1. Bouton Test Météo dans la Barre de Statut */
.status-test-btn {
    background: #4338ca;
    border: 1px solid #6366f1;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
    transition: transform 0.1s, background-color 0.15s;
    letter-spacing: 0.3px;
    align-items: center;
    gap: 4px;
}

.status-test-btn:hover {
    background: #4f46e5;
}

.status-test-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* 2. Barre Supérieure en Mode Tamagotchi (Gamification & Personnalisation) */
.tamagotchi-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 0 4px;
}

.gems-pill {
    background: rgba(16, 14, 29, 0.88);
    border: 2px solid var(--accent-yellow);
    box-shadow: 2px 2px 0 #000;
    border-radius: 12px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.gem-icon {
    font-size: 14px;
    animation: gemPulse 1.5s infinite alternate;
}

@keyframes gemPulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(15deg); filter: drop-shadow(0 0 6px #fde047); }
}

.gem-amount {
    font-family: var(--font-digit);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-yellow);
    line-height: 1;
}

.gem-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text-dim);
}

.custom-pill-btn {
    background: #3b2a59;
    border: 2px solid var(--accent-mint);
    box-shadow: 2px 2px 0 #000;
    border-radius: 10px;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

.custom-pill-btn:hover {
    background: #4c3773;
}

.custom-pill-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* 3. Animation flottante du gain d'Éclats Météo (+10 ✨) */
.floating-gem-reward {
    position: absolute;
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
    z-index: 50;
    animation: floatReward 1.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes floatReward {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    20% { opacity: 1; transform: translateY(-20px) scale(1.2); }
    70% { opacity: 1; transform: translateY(-50px) scale(1); }
    100% { opacity: 0; transform: translateY(-70px) scale(0.9); }
}

/* 4. Aménagement Décor dans le Biome (Feu de camp, Tente, Parasol, Igloo...) */
.placed-prop-container {
    position: absolute;
    bottom: 50px;
    left: 14px;
    right: auto;
    transform: scale(1.2);
    transform-origin: bottom left;
    z-index: 4;
    pointer-events: auto;
    cursor: pointer;
    transition: bottom 0.35s ease, left 0.35s ease, transform 0.3s ease;
}

/* Feu de camp animé */
.prop-campfire-wrap {
    animation: campfireSway 1s infinite alternate ease-in-out;
}

@keyframes campfireSway {
    0% { transform: translateY(0); }
    100% { transform: translateY(-2px); }
}

.pixel-fire {
    animation: flameFlicker 0.4s infinite alternate;
    transform-origin: center bottom;
}

@keyframes flameFlicker {
    0% { transform: scale(1, 1); }
    50% { transform: scale(0.95, 1.08) skewX(-2deg); }
    100% { transform: scale(1.05, 0.95) skewX(2deg); }
}

/* Tente d'expédition */
.prop-tent-wrap {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Parasol de plage */
.prop-parasol-wrap {
    transform-origin: bottom center;
    animation: parasolBreeze 4s infinite ease-in-out alternate;
}

@keyframes parasolBreeze {
    0% { transform: rotate(-2deg); }
    100% { transform: rotate(2deg); }
}

/* 5. Modaux : Titres et Prévisualisation Personnalisation */
.modal-section-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-mint);
    margin: 12px 0 6px 0;
    letter-spacing: 0.4px;
}

.custom-preview-box {
    background: radial-gradient(circle, #2d2448 0%, #161226 80%);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transform: scale(1.2);
    transform-origin: center;
}

/* Grilles d'Options de Personnalisation */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.option-card {
    background: #19142b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--screen-text);
    outline: none;
    transition: transform 0.1s, border-color 0.15s, background-color 0.15s;
}

.option-card:hover:not(.is-locked) {
    background: #282046;
}

.option-card:active:not(.is-locked) {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.option-card.is-selected {
    border-color: var(--accent-mint);
    background: #251e3d;
    box-shadow: 0 0 8px rgba(110, 231, 183, 0.4), 2px 2px 0 #000;
}

.option-card.is-locked {
    opacity: 0.45;
    cursor: not-allowed;
    background: #120e20;
    border-style: dashed;
}

.option-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 2px solid #000;
}

.swatch-mint { background: #6ee7b7; box-shadow: inset -2px -2px 0 #10b981; }
.swatch-peach { background: #f472b6; box-shadow: inset -2px -2px 0 #db2777; }
.swatch-ice { background: #60a5fa; box-shadow: inset -2px -2px 0 #2563eb; }
.swatch-gold { background: #facc15; box-shadow: inset -2px -2px 0 #ca8a04; }
.swatch-galaxy { background: #c084fc; box-shadow: inset -2px -2px 0 #7e22ce; }

.option-icon {
    font-size: 20px;
}

.option-name {
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
}

.save-custom-btn {
    width: 100%;
    min-height: 46px;
    background: linear-gradient(180deg, #10b981, #059669);
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 15px;
    padding: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s;
}

.save-custom-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* 6. Onglets Rétro (Vestiaire & Décor) */
.retro-tabs-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--pixel-border-color);
    padding-bottom: 6px;
}

.tab-btn {
    flex: 1;
    min-height: 44px;
    background: #19142b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px 8px 0 0;
    color: var(--screen-text-dim);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.tab-btn.is-active {
    background: #332954;
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

.tab-pane {
    display: none;
}

.tab-pane.is-active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.tab-description {
    font-size: 13px;
    color: var(--screen-text-dim);
    margin-bottom: 12px;
    line-height: 1.35;
}

/* Grille des Équipements & Objets */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.equip-card {
    background: #1b162e;
    border: 2px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-align: center;
    position: relative;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    transition: transform 0.1s, border-color 0.15s, background-color 0.15s;
}

.equip-card:hover:not(.is-locked) {
    background: #2a2247;
    transform: translateY(-2px);
}

.equip-card.is-selected {
    border-color: var(--accent-mint);
    background: #241c3d;
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.4), 2px 2px 0 #000;
}

.equip-card.is-locked {
    opacity: 0.45;
    cursor: not-allowed;
    background: #120d20;
    border-style: dashed;
}

.equip-icon {
    font-size: 26px;
    margin-bottom: 2px;
}

.equip-title {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
}

.equip-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.badge-neutral { background: rgba(255,255,255,0.1); color: #ccc; }
.badge-rain { background: #0284c7; color: #fff; }
.badge-snow { background: #4f46e5; color: #fff; }
.badge-sun { background: #d97706; color: #fff; }
.badge-lock { background: #374151; color: #9ca3af; }

/* 7. Simulateur Météo (Outil Créateur) */
.sim-presets-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-preset-btn {
    min-height: 48px;
    background: #1d1833;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--screen-text);
    text-align: left;
    transition: transform 0.1s, background-color 0.15s, border-color 0.15s;
}

.sim-preset-btn:hover {
    background: #2b234b;
    transform: translateX(4px);
}

.sim-preset-btn.is-active {
    border-color: var(--accent-yellow);
    background: #2a2047;
    box-shadow: 0 0 8px rgba(253, 224, 71, 0.3);
}

.sim-icon {
    font-size: 28px;
}

.sim-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sim-name {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
}

.sim-desc {
    font-size: 13px;
    color: var(--screen-text-dim);
}

/* ==========================================================================
   ÉTAPE 3 : VISITEURS MÉTÉO, BESTIAIRE & MINI-JEU D'ARCADE
   ========================================================================== */

/* 1. Visiteur & Trésor Météo Rare dans le terrarium */
.weather-visitor-container {
    position: absolute;
    bottom: 58px;
    right: 12px;
    left: auto;
    transform: scale(1.18);
    transform-origin: bottom right;
    z-index: 25;
    pointer-events: auto;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: bottom 0.35s ease, right 0.35s ease, transform 0.2s ease;
}

.weather-visitor-container.is-visible {
    display: flex;
    animation: visitorPop 0.5s ease-out, visitorFloat 2.6s infinite ease-in-out 0.5s;
}

@keyframes visitorPop {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    70% { transform: scale(1.45) rotate(10deg); }
    100% { opacity: 1; }
}

@keyframes visitorFloat {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3)) drop-shadow(0 0 6px rgba(253, 224, 71, 0.5)); }
    50% { transform: translateY(-8px); filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2)) drop-shadow(0 0 14px rgba(253, 224, 71, 0.95)); }
}

.weather-visitor-container:hover {
    transform: translateY(-4px) scale(1.55) !important;
}

.weather-visitor-container:active {
    transform: scale(1.15) !important;
}

/* Bulle indicatrice désactivée pour ne pas encombrer l'écran */
.visitor-callout-pill {
    display: none !important;
}

/* Boutons dans la barre supérieure Tamagotchi */
.top-bar-actions {
    display: flex;
    gap: 6px;
}

.action-pill-btn {
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 10px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 6px 12px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.15s;
}

.action-pill-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.bestiary-pill-btn {
    background: #432a59;
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.bestiary-pill-btn:hover {
    background: #563673;
}

/* 2. Carnet du Bestiaire / Découvertes */
.bestiary-modal-box {
    max-width: 420px;
}

.bestiary-summary-bar {
    background: #17122b;
    border: 2px solid var(--accent-yellow);
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.1), 2px 2px 0 #000;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--screen-text);
    margin-bottom: 8px;
}

.bestiary-summary-bar b {
    color: var(--accent-yellow);
    font-family: var(--font-digit);
    font-size: 18px;
}

.bestiary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 2px;
}

.bestiary-card {
    background: #19142b;
    border: 2px solid var(--card-border);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    position: relative;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

.bestiary-card.is-discovered {
    border-color: var(--accent-mint);
    background: #201a36;
}

.bestiary-card.is-undiscovered {
    background: #120e20;
    border-style: dashed;
    opacity: 0.6;
}

.bestiary-icon-wrap {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.bestiary-silhouetted {
    filter: brightness(0) opacity(0.3);
    font-size: 26px;
}

.bestiary-title {
    font-weight: 700;
    font-size: 12px;
    color: #ffffff;
}

.bestiary-weather-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-sky);
    padding: 2px 6px;
    border-radius: 4px;
}

.bestiary-lore {
    font-size: 12px;
    color: var(--screen-text-dim);
    line-height: 1.3;
    margin-top: 2px;
}

/* 3. Mini-Jeu d'Arcade (Plein Écran Exclusif & Opaque) */
.minigame-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999999 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #090615 !important; /* 100% Opaque - Masque intégralement l'application */
    touch-action: none;
}

.minigame-overlay.is-active {
    display: flex;
    animation: arcadeFadeIn 0.2s ease;
}

body.minigame-open {
    overflow: hidden !important;
}

body.minigame-open .console-case {
    visibility: hidden !important;
}

body.minigame-open .status-bar,
body.minigame-open #weatherTopBanner,
body.minigame-open #weatherDrawer,
body.minigame-open #bottomControlPanel,
body.minigame-open #bottomSheetBackdrop {
    display: none !important;
}

.minigame-arcade-cabinet {
    width: 100%;
    max-width: 580px;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #110d22;
    border-left: 3px solid #2d214d;
    border-right: 3px solid #2d214d;
    box-shadow: 0 0 35px rgba(0,0,0,0.85);
    position: relative;
    overflow: hidden;
}

@keyframes arcadeFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Compte à rebours 3, 2, 1, GO ! */
.minigame-countdown {
    position: absolute;
    inset: 0;
    background: rgba(14, 11, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--font-retro);
    font-size: 48px;
    color: var(--accent-yellow);
    text-shadow: 4px 4px 0 #000;
    z-index: 120;
    animation: countdownPulse 0.6s infinite alternate;
}

.minigame-countdown.is-active {
    display: flex;
}

@keyframes countdownPulse {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 12px #fde047); }
}

/* Barre d'en-tête arcade (Plein écran) */
.minigame-header {
    height: 52px;
    background: #18122d;
    border-bottom: 3px solid #3b2d64;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 105;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.minigame-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.minigame-theme-badge {
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.minigame-stats {
    display: flex;
    align-items: center;
    gap: 14px;
}

.minigame-stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #cbd5e1;
}

.stat-value {
    font-family: var(--font-digit);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-yellow);
    line-height: 1;
}

.arcade-quit-btn {
    background: #dc2626;
    color: #ffffff;
    border: 2px solid #000;
    border-radius: 6px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.05s;
}

.arcade-quit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* Aire de jeu Arcade */
.minigame-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: crosshair;
    user-select: none;
    touch-action: none;
}

/* Décors dédiés selon chaque jeu */
.minigame-stage.stage-mode-runner {
    background: linear-gradient(180deg, #140d28 0%, #28174a 60%, #150f29 100%);
    background-image: 
        radial-gradient(circle at 18% 25%, rgba(254, 240, 138, 0.45) 1.5px, transparent 1.5px),
        radial-gradient(circle at 72% 18%, rgba(167, 243, 208, 0.5) 2px, transparent 2px),
        radial-gradient(circle at 45% 42%, rgba(192, 132, 252, 0.4) 1.5px, transparent 1.5px),
        radial-gradient(circle at 88% 50%, rgba(254, 240, 138, 0.35) 1.5px, transparent 1.5px);
    background-size: 100% 100%, 140px 140px, 180px 180px, 110px 110px, 150px 150px;
}

.minigame-stage.stage-mode-shield {
    background: radial-gradient(circle at center, #2e1a54 0%, #130a26 50%, #070410 85%);
}

.minigame-stage.stage-mode-flappy {
    background: linear-gradient(180deg, #090e1c 0%, #162447 45%, #0f3f6d 100%);
    background-image: 
        radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 80% 35%, rgba(186, 230, 253, 0.4) 1.5px, transparent 1.5px);
    background-size: 100% 100%, 130px 130px, 170px 170px;
}

/* Joueur Tameteo dans l'arcade (Agrandie & Belle visibilité) */
.minigame-player {
    position: absolute;
    width: 78px;
    height: 78px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.65));
}

.minigame-player.is-hit {
    animation: playerHitFlash 0.35s ease;
}

@keyframes playerHitFlash {
    0%, 100% { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.65)); }
    50% { filter: drop-shadow(0 0 20px #ef4444) brightness(1.8); }
}

/* Sol du Runner */
.minigame-ground-track {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 26%;
    background: #17112b;
    border-top: 4px solid #10b981;
    box-shadow: inset 0 4px 0 #059669;
    z-index: 5;
}

.stage-mode-runner .minigame-ground-track {
    display: block;
    background: repeating-linear-gradient(
        90deg,
        #150f28 0px,
        #150f28 24px,
        #21173d 24px,
        #21173d 48px
    );
    background-size: 48px 100%;
    animation: runnerTrackScroll 0.55s linear infinite;
}

@keyframes runnerTrackScroll {
    0% { background-position-x: 0px; }
    100% { background-position-x: -48px; }
}

/* Dôme de bouclier (Bouclier Céleste - Agrandie pour le grand Tameteo) */
.shield-arena-center {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-bubble-fx {
    position: absolute;
    width: 114px;
    height: 114px;
    border-radius: 50%;
    border: 3px solid #38bdf8;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0.05) 70%, transparent 100%);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.65);
    animation: shieldGlowPulse 2s infinite ease-in-out;
    pointer-events: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

@keyframes shieldGlowPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* Parapluie volant (Ascension Parapluie) */
.flappy-umbrella-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flappy-umbrella-dome {
    font-size: 34px;
    margin-bottom: -12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: umbrellaWobble 1.2s infinite ease-in-out alternate;
}

@keyframes umbrellaWobble {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* Objets en jeu (Dangers & Bonus universels) */
.arcade-game-item {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 10;
}

.arcade-game-item * {
    pointer-events: none;
}

.hazard-badge-tag {
    position: absolute;
    top: -10px;
    background: #facc15;
    color: #451a03;
    font-size: 12px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #78350f;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.8);
    animation: badgeBlink 0.6s infinite alternate;
}

@keyframes badgeBlink {
    0% { opacity: 0.8; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* 1. Runner Obstacles & Gems */
.runner-obstacle {
    width: 54px;
    height: 54px;
    background: rgba(185, 28, 28, 0.92);
    border: 3px solid #ef4444;
    border-radius: 12px;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.95), 2px 2px 0 #000;
    font-size: 30px;
    animation: hazardPulse 0.5s infinite alternate;
}

.runner-gem {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle, #fde047 30%, #ca8a04 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.95);
    font-size: 24px;
    animation: bonusGlow 0.8s infinite alternate;
}

/* 2. Shield Threats & Care */
.shield-threat {
    width: 58px;
    height: 58px;
    background: rgba(153, 27, 27, 0.92);
    border: 3px solid #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.95), 2px 2px 0 #000;
    font-size: 30px;
    cursor: pointer;
    touch-action: manipulation;
    animation: hazardPulse 0.5s infinite alternate;
    transition: transform 0.08s ease;
    position: relative;
}

.shield-threat::before,
.shield-care-orb::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
}

.shield-threat:hover, .shield-threat:active {
    transform: translate(-50%, -50%) scale(1.18);
}

.shield-care-orb {
    width: 48px;
    height: 48px;
    background: rgba(6, 78, 59, 0.92);
    border: 3px solid #10b981;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.95);
    font-size: 24px;
    cursor: pointer;
    animation: bonusGlow 0.8s infinite alternate;
    position: relative;
}

/* 3. Flappy Hazards & Rings */
.flappy-hazard {
    width: 58px;
    height: 58px;
    background: rgba(88, 28, 135, 0.9);
    border: 3px solid #ef4444;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.95);
    font-size: 30px;
    animation: hazardPulse 0.5s infinite alternate;
}

.flappy-ring {
    width: 48px;
    height: 74px;
    border: 4px dashed #facc15;
    border-radius: 24px;
    background: rgba(250, 204, 21, 0.12);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.85);
    font-size: 22px;
    animation: bonusGlow 0.8s infinite alternate;
}

@keyframes hazardPulse {
    0% { border-color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
    100% { border-color: #fca5a5; box-shadow: 0 0 20px rgba(239, 68, 68, 1); }
}

@keyframes bonusGlow {
    0% { transform: translate(-50%, -50%) scale(0.95); filter: brightness(1); }
    100% { transform: translate(-50%, -50%) scale(1.08); filter: brightness(1.25); }
}

/* Score flottant */
.arcade-float-points {
    position: absolute;
    font-family: var(--font-retro);
    font-size: 16px;
    font-weight: 900;
    text-shadow: 2px 2px 0 #000, 0 0 8px currentColor;
    pointer-events: none;
    z-index: 50;
    transform: translate(-50%, 0);
    animation: floatArcadePoints 0.7s forwards ease-out;
}

@keyframes floatArcadePoints {
    0% { transform: translate(-50%, 0) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -45px) scale(1.25); opacity: 0; }
}

.arcade-dust-particle {
    position: absolute;
    font-size: 16px;
    pointer-events: none;
    z-index: 45;
    transform: translate(-50%, -50%);
    animation: fadeDust 0.6s forwards ease-out;
}

@keyframes fadeDust {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -30px) scale(1.2); opacity: 0; }
}

/* Contrôles tactiles virtuels au bas de l'aire */
.minigame-touch-controls {
    min-height: 82px;
    height: auto;
    background: #140e26;
    border-top: 3px solid #3b2d64;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 16px;
    z-index: 105;
    flex-shrink: 0;
}

.arcade-action-button {
    width: 100%;
    max-width: 380px;
    min-height: 46px;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    border: 3px solid #000;
    border-radius: 8px;
    box-shadow: 3px 3px 0 #000, inset 0 1px 0 rgba(255,255,255,0.3);
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: transform 0.05s, filter 0.1s;
}

.arcade-action-button:active, .arcade-action-button.is-pressed {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    filter: brightness(1.2);
}

.arcade-action-button.btn-mode-shield {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

.arcade-action-button.btn-mode-flappy {
    background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%);
}

.arcade-touch-prompt {
    font-family: var(--font-pixel);
    font-weight: 600;
    font-size: 12px;
    color: #cbd5e1;
    text-align: center;
}

/* Écran des Résultats Finaux */
.minigame-results-modal {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 20, 0.92);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 130;
}

.minigame-results-modal.is-open {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.results-box {
    width: 100%;
    max-width: 320px;
    background: #1f1936;
    border: 4px solid var(--pixel-border-color);
    box-shadow: 6px 6px 0 #000;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results-title {
    font-family: var(--font-retro);
    font-size: 14px;
    color: var(--accent-yellow);
    letter-spacing: 0.5px;
}

.results-score-row, .results-reward-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 6px;
}

.results-score-row b {
    font-family: var(--font-digit);
    font-size: 24px;
    color: #ffffff;
}

.results-reward-row b {
    font-family: var(--font-digit);
    font-size: 26px;
    color: var(--accent-yellow);
}

.reward-glow {
    animation: gemPulse 1.2s infinite alternate;
}

.results-message {
    font-size: 12px;
    color: var(--screen-text-dim);
    line-height: 1.3;
}

/* ==========================================================================
   ÉTAPE 4 : STYLES DE GAMIFICATION COMPLÈTE & BOUTIQUE INTÉGRÉE
   ========================================================================== */

/* 1. Ligne de Statistiques de Gamification */
.gamification-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.level-pill {
    background: #181329;
    border: 2px solid var(--accent-mint);
    border-radius: 10px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 2px 2px 0 #000;
}

.level-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    letter-spacing: 0.4px;
}

.xp-mini-track {
    width: 44px;
    height: 6px;
    background: #0d0b17;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.xp-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    transition: width 0.3s ease;
}

.streak-pill {
    background: #181329;
    border: 2px solid #f97316;
    border-radius: 10px;
    padding: 4px 8px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #f97316;
    box-shadow: 2px 2px 0 #000;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 2. Barre de Navigation Rapide */
.top-nav-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.nav-pill-btn {
    flex: 1;
    min-height: 44px;
    background: #251d3b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: var(--screen-text);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 4px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: transform 0.1s, background-color 0.15s;
}

.nav-pill-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.chest-btn {
    border-color: #f59e0b;
    color: #fde047;
    animation: chestGlow 2s infinite alternate;
}

@keyframes chestGlow {
    0% { box-shadow: 2px 2px 0 #000; }
    100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.6), 2px 2px 0 #000; }
}

.quests-btn {
    border-color: #38bdf8;
    color: #38bdf8;
}

.quest-alert-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border: 1px solid #000;
    border-radius: 50%;
    display: none;
    animation: alertPulse 1s infinite;
}

.quest-alert-dot.is-active {
    display: block;
}

@keyframes alertPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.bestiary-btn {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.custom-btn {
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

.dialogue-level-mini {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-yellow);
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

/* 3. Boutique : Boutons d'Achat & Tags */
.option-status-tag {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.option-status-tag.owned {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid #10b981;
}

.option-status-tag.buy-tag {
    background: rgba(245, 158, 11, 0.25);
    color: #fde047;
    border: 1px solid #f59e0b;
}

.equip-action-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000;
    transition: transform 0.1s;
}

.equip-action-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.equip-now-btn {
    background: #10b981;
    color: #ffffff;
}

.buy-now-btn {
    background: #f59e0b;
    color: #000000;
    font-weight: 700;
}

.is-legendary {
    border-color: #f59e0b !important;
    background: radial-gradient(circle, #382452 0%, #1c152e 100%) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3), 2px 2px 0 #000 !important;
}

.badge-legend {
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6);
    color: #ffffff;
    font-weight: 700;
}

/* 4. Modal Quêtes */
.quests-modal-box {
    max-width: 420px;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-item-card {
    background: #19142b;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.quest-item-card.is-ready {
    border-color: var(--accent-yellow);
    background: #251d3d;
}

.quest-item-card.is-claimed {
    opacity: 0.6;
    border-color: #10b981;
}

.quest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quest-title-text {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
}

.quest-reward-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-yellow);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.quest-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.quest-progress-track {
    flex: 1;
    height: 8px;
    background: #0f0c1c;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.3s;
}

.claim-quest-btn {
    background: #10b981;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.1s;
}

.claim-quest-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.claim-quest-btn.is-pulse {
    animation: claimPulse 0.9s infinite alternate;
}

@keyframes claimPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px #34d399); }
    100% { transform: scale(1.06); filter: drop-shadow(0 0 8px #10b981); }
}

/* 5. Modal Coffre Quotidien */
.chest-modal-box {
    max-width: 360px;
}

.text-center {
    text-align: center;
}

.chest-animation-box {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.big-chest-icon {
    font-size: 58px;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
    animation: chestBounce 1.5s infinite ease-in-out alternate;
}

@keyframes chestBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.05); }
}

.chest-title {
    font-family: var(--font-retro);
    font-size: 13px;
    line-height: 1.4;
    color: var(--accent-yellow);
    margin-bottom: 6px;
}

.chest-subtext {
    font-size: 14px;
    color: var(--screen-text-dim);
    margin-bottom: 14px;
    line-height: 1.35;
}

.open-chest-action-btn {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    border-radius: 8px;
    color: #000;
    font-family: var(--font-pixel);
    font-size: 15px;
    padding: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.1s;
}

.open-chest-action-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* 6. Modal Montée de Niveau */
.levelup-modal-box {
    max-width: 340px;
    background: radial-gradient(circle, #382559 0%, #1a142e 90%);
    border: 4px solid var(--accent-yellow);
    box-shadow: 0 0 25px rgba(253, 224, 71, 0.4), 6px 6px 0 #000;
}

.levelup-badge-anim {
    font-size: 48px;
    margin-bottom: 6px;
    animation: levelupSpin 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes levelupSpin {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.levelup-title {
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--accent-yellow);
    margin-bottom: 4px;
}

.levelup-level-display {
    font-family: var(--font-digit);
    font-size: 38px;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 8px;
}

.levelup-congrats {
    font-size: 12px;
    color: var(--screen-text-dim);
    margin-bottom: 12px;
}

.levelup-bonus-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed var(--accent-yellow);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 13px;
    margin-bottom: 14px;
}

.levelup-bonus-pill b {
    font-family: var(--font-digit);
    font-size: 22px;
    color: var(--accent-yellow);
}

/* 7. Outils Créateur dans Test Météo */
.creator-tools-box {
    background: #151124;
    border: 2px solid #818cf8;
    box-shadow: 2px 2px 0 #000;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 14px;
}

.creator-tools-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: #a5b4fc;
    margin-bottom: 8px;
}

.creator-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.creator-btn {
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    border-radius: 6px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    min-height: 44px;
    padding: 8px 6px;
    cursor: pointer;
    transition: transform 0.1s;
    text-align: center;
}

.creator-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.btn-add-gems {
    background: linear-gradient(180deg, #ec4899, #db2777);
    color: #ffffff;
}

.btn-spawn-visitor {
    background: linear-gradient(180deg, #10b981, #059669);
    color: #ffffff;
}

.btn-reset-quests {
    background: linear-gradient(180deg, #0284c7, #0369a1);
    color: #ffffff;
}

.btn-finish-trip {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    color: #000000;
    font-weight: 700;
}

.btn-quick-trip {
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

/* ==========================================================================
   ÉTAPE 5 : MODE COMPAGNON DE VOYAGE & ALBUM DE CARTES POSTALES
   ========================================================================== */

/* 1. Sélecteur d'Onglets Rétro (🏠 Maison vs ✈️ Voyage) */
.app-mode-tabs-bar {
    display: flex;
    background: #110d21;
    border-bottom: 2px solid var(--pixel-border-color);
    padding: 6px 10px;
    gap: 6px;
    z-index: 15;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 100%;
}

.app-mode-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    background: #1d1733;
    border: 2px solid #2d244d;
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: var(--screen-text-dim);
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.app-mode-tab:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000;
}

.app-mode-tab.is-active {
    background: #2a214d;
    border-color: var(--accent-mint);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.2), 2px 2px 0 #000;
}

.tab-emoji {
    font-size: 14px;
    flex-shrink: 0;
}

.tab-label {
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.travel-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(249, 115, 22, 0.25);
    border: 1px solid #f97316;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: var(--font-pixel);
    font-weight: 700;
    color: #fb923c;
    margin-left: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.travel-pulse-dot {
    width: 5px;
    height: 5px;
    background: #f97316;
    border-radius: 50%;
    animation: alertPulse 1.2s infinite;
}

/* Badges Mode Voyage dans les barres météo */
.travel-mode-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #fb923c;
    background: rgba(249, 115, 22, 0.2);
    border: 1px dashed #f97316;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
    margin-bottom: 2px;
    letter-spacing: 0.4px;
}

.compact-travel-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #fb923c;
    background: rgba(249, 115, 22, 0.25);
    border: 1px solid #f97316;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 6px;
}

.travel-countdown-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 36px;
    background: rgba(26, 17, 43, 0.95);
    border: 2px solid #f97316;
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 1px 1px 0 #000;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #fb923c;
}

.travel-countdown-chip b {
    font-family: var(--font-digit);
    font-size: 15px;
    color: #ffffff;
}

/* Bouton cartes postales dans la barre unifiée */
.postcards-btn {
    border-color: #f59e0b;
    color: #fde047;
}

/* 1.bis Bannière incitative Voyage dans la vue Météo (70%) */
.weather-travel-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 8px 12px;
    margin: 6px 0 10px 0;
    box-shadow: 2px 2px 0 #000;
    gap: 8px;
    animation: ctaGlow 2.5s infinite alternate;
}

@keyframes ctaGlow {
    0% { border-color: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.3); }
    100% { border-color: #fde047; box-shadow: 0 0 12px rgba(253, 224, 71, 0.5); }
}

.cta-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.cta-banner-text .cta-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #fde047;
    letter-spacing: 0.4px;
}

.cta-banner-title {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
}

.cta-banner-title b {
    color: var(--accent-sky);
}

.cta-travel-btn {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: #000;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.1s;
    pointer-events: auto;
    z-index: 25;
}

.cta-travel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* 2. Écran d'incitation au voyage (Terrarium sans compagnon actif) */
.travel-empty-prompt {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    z-index: 20;
    pointer-events: auto;
    background: rgba(14, 11, 26, 0.65);
    backdrop-filter: blur(3px);
}

.travel-empty-prompt {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    pointer-events: auto;
    background: rgba(14, 11, 26, 0.72);
    backdrop-filter: blur(4px);
}

.travel-luggage-icon {
    font-size: 46px;
    margin-bottom: 6px;
    animation: chestBounce 1.8s infinite ease-in-out alternate;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.travel-empty-title {
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--accent-yellow);
    margin-bottom: 4px;
    letter-spacing: 0.4px;
}

.travel-empty-subtitle {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 12px;
}

.travel-empty-subtitle b {
    color: var(--accent-sky);
}

.create-travel-btn {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    border-radius: 10px;
    color: #000;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    min-height: 46px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.1s;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.create-travel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.view-postcards-btn-alt {
    background: rgba(30, 22, 54, 0.9);
    border: 2px solid var(--accent-purple);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: #d8b4fe;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.1s;
}

.view-postcards-btn-alt:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* 3. Modal Préparation du Voyage */
.travel-modal-box {
    max-width: 420px;
}

.travel-destination-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #141026;
    border: 2px solid #38bdf8;
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.destination-icon {
    font-size: 20px;
}

.destination-info {
    flex: 1;
}

.destination-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #7dd3fc;
    letter-spacing: 0.4px;
}

.destination-city-name {
    font-family: var(--font-pixel);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.change-travel-city-btn {
    background: #2563eb;
    border: 2px solid #000;
    box-shadow: 1px 1px 0 #000;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    min-height: 44px;
    padding: 6px 10px;
    cursor: pointer;
}

.travel-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #2d2350 0%, #151128 100%);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

.travel-avatar-preview {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.travel-preview-caption {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    margin-top: 4px;
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dice-name-btn {
    background: #4338ca;
    border: 1px solid #6366f1;
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    min-height: 44px;
    padding: 6px 10px;
    cursor: pointer;
}

.duration-chips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.duration-chip {
    background: #17122b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    min-height: 48px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.duration-chip .chip-time {
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.duration-chip .chip-sub {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--screen-text-dim);
}

.duration-chip.is-selected {
    border-color: #f59e0b;
    background: #2e2348;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), 2px 2px 0 #000;
}

.duration-chip.is-selected .chip-time {
    color: #fde047;
}

.travel-gear-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.gear-chip {
    background: #17122b;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    min-height: 54px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.gear-icon {
    font-size: 22px;
}

.gear-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text);
}

.gear-chip.is-selected {
    border-color: #38bdf8;
    background: #1b2749;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4), 2px 2px 0 #000;
}

.gear-chip.is-selected .gear-label {
    color: #7dd3fc;
}

.travel-color-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

.color-mini-chip {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    cursor: pointer;
    transition: transform 0.1s;
}

.color-mini-chip:active {
    transform: scale(0.92);
}

.color-mini-chip.is-selected {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 2px 2px 0 #000;
    transform: scale(1.08);
}

.hatch-travel-btn {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(180deg, #10b981, #059669);
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    border-radius: 10px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    padding: 12px;
    cursor: pointer;
    margin-top: 14px;
    transition: transform 0.1s;
}

.hatch-travel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* 4. Modal Au Revoir du Séjour */
.farewell-modal-box {
    max-width: 360px;
    background: radial-gradient(circle, #2d1d4d 0%, #150f28 100%);
    border: 4px solid var(--accent-yellow);
    box-shadow: 0 0 25px rgba(253, 224, 71, 0.3), 6px 6px 0 #000;
}

.farewell-anim-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 90px;
    margin-bottom: 6px;
}

.farewell-avatar {
    transform: scale(1.6);
}

.farewell-suitcase {
    font-size: 38px;
    animation: chestBounce 1.5s infinite ease-in-out alternate;
}

.farewell-title {
    font-family: var(--font-retro);
    font-size: 14px;
    line-height: 1.4;
    color: var(--accent-yellow);
    margin-bottom: 6px;
}

.farewell-message {
    font-size: 14px;
    color: var(--screen-text);
    line-height: 1.4;
    margin-bottom: 12px;
}

.farewell-reward-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed var(--accent-yellow);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 12px;
    margin-bottom: 14px;
}

.farewell-reward-pill b {
    font-family: var(--font-digit);
    font-size: 20px;
    color: var(--accent-yellow);
}

.claim-postcard-btn {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 3px solid #000;
    box-shadow: 3px 3px 0 #000;
    border-radius: 8px;
    color: #000;
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 10px;
    cursor: pointer;
    transition: transform 0.1s;
}

.claim-postcard-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* 5. Modal Album des Cartes Postales */
.postcards-modal-box {
    max-width: 420px;
}

.postcards-summary-bar {
    background: #17122b;
    border: 2px solid #f59e0b;
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: var(--screen-text);
    margin-bottom: 10px;
}

.postcards-summary-bar b {
    font-family: var(--font-digit);
    font-size: 18px;
    color: #fde047;
}

.postcards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 2px;
}

.empty-postcards-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: var(--screen-text-dim);
    font-size: 13px;
    line-height: 1.4;
}

.empty-postcards-hint .hint-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

/* Vignette miniature de Carte Postale dans la grille */
.postcard-thumb-card {
    background: #fdfaf2;
    border: 2px solid #854d0e;
    box-shadow: 3px 3px 0 #000;
    border-radius: 8px;
    padding: 8px;
    color: #1c1917;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}

.postcard-thumb-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #000;
}

.postcard-thumb-card:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000;
}

.postcard-thumb-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #b45309;
    padding-bottom: 3px;
    margin-bottom: 4px;
}

.postcard-thumb-city {
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    color: #78350f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.postcard-thumb-stamp {
    font-size: 12px;
    background: #fde047;
    border: 1px dashed #854d0e;
    padding: 1px 4px;
    border-radius: 2px;
}

.postcard-thumb-avatar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}

.postcard-thumb-name {
    font-weight: 700;
    font-size: 13px;
    color: #1c1917;
}

.postcard-thumb-date {
    font-size: 12px;
    color: #57534e;
    margin-top: 2px;
}

/* 6. Modal Vue Complète de la Carte Postale Vintage */
.postcard-view-box {
    max-width: 440px;
    background: #1c1630;
}

.vintage-postcard-card {
    background: #fbf7ee;
    border: 3px solid #854d0e;
    box-shadow: inset 0 0 25px rgba(180, 83, 9, 0.12), 4px 4px 0 #000;
    border-radius: 12px;
    padding: 14px;
    color: #1c1917;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.postcard-vintage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #854d0e;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.postcard-header-left {
    display: flex;
    flex-direction: column;
}

.postcard-banner-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #b45309;
    letter-spacing: 0.6px;
}

.postcard-destination-huge {
    font-family: var(--font-pixel);
    font-size: 20px;
    font-weight: 700;
    color: #78350f;
    line-height: 1.1;
}

.postcard-postmark-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.postcard-ink-stamp {
    width: 82px;
    height: 82px;
    border: 2px dashed #991b1b;
    border-radius: 50%;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #991b1b;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    line-height: 1.05;
    transform: rotate(-10deg);
    overflow: hidden;
}

.postcard-stamp-box {
    width: 48px;
    height: 52px;
    background: #fef08a;
    border: 2px solid #854d0e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 1px 1px 0 #000;
}

.postcard-vintage-body {
    display: flex;
    gap: 12px;
    align-items: center;
}

.postcard-photo-polaroid {
    background: #ffffff;
    border: 2px solid #a8a29e;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 105px;
    flex-shrink: 0;
}

.postcard-polaroid-img {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postcard-polaroid-caption {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #44403c;
    margin-top: 4px;
    text-align: center;
}

.postcard-letter-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.postcard-weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(180, 83, 9, 0.1);
    border: 1px solid #b45309;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #78350f;
    margin-bottom: 8px;
    width: fit-content;
}

.postcard-written-text {
    font-size: 14px;
    line-height: 1.4;
    color: #292524;
    font-style: italic;
    margin-bottom: 8px;
}

.postcard-signature {
    text-align: right;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: #b45309;
}

/* ==========================================================================
   ÉTAPE 6 : CYCLE DE VIE, ÉCLOSION D'ŒUF, URGENCE VITALE & PANTHÉON
   ========================================================================== */

/* 1. Bannière d'Urgence Vitale (État Critique — dans la pile verticale) */
.critical-emergency-banner {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(153, 27, 27, 0.96));
    border: 2px solid #fecaca;
    border-radius: 10px;
    padding: 8px 10px;
    z-index: 27;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.75), 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: criticalAlertShake 1.2s infinite ease-in-out;
}

@keyframes criticalAlertShake {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.02); filter: brightness(1.15); }
}

.critical-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.critical-icon-pulse {
    font-size: 16px;
    animation: alertPulse 0.8s infinite;
}

.critical-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-shadow: 1px 1px 0 #000;
}

.critical-timer-badge {
    background: #450a0a;
    border: 1px solid #f87171;
    color: #fef08a;
    font-family: var(--font-digit);
    font-size: 16px;
    padding: 2px 8px;
    border-radius: 4px;
    animation: alertPulse 0.6s infinite;
}

.critical-message {
    font-size: 13px;
    color: #fee2e2;
    margin: 0;
    line-height: 1.3;
}

.critical-actions {
    display: flex;
    gap: 6px;
    margin-top: 3px;
}

.critical-quick-btn {
    flex: 1;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 2px solid #ffffff;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
    transition: transform 0.1s;
}

.critical-quick-btn.feed {
    background: #10b981;
    color: #ffffff;
}

.critical-quick-btn.protect {
    background: #3b82f6;
    color: #ffffff;
}

.critical-quick-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* Animation de larmes et clignotement rouge sur le sprite */
.pet-svg.is-critical {
    animation: criticalPetFlash 0.8s infinite alternate;
}

@keyframes criticalPetFlash {
    0% { filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4)); }
    100% { filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.95)) hue-rotate(-20deg); }
}

.pet-crying-tears .tear-anim-1,
.pet-crying-tears .tear-anim-2 {
    animation: tearFall 0.9s infinite linear;
}

.pet-crying-tears .tear-anim-3,
.pet-crying-tears .tear-anim-4 {
    animation: tearFall 0.9s infinite linear 0.4s;
}

@keyframes tearFall {
    0% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(4px); opacity: 0.9; }
    100% { transform: translateY(6px); opacity: 0; }
}

/* 2. Envol Céleste de l'Ange */
.angel-ascend-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 60;
    pointer-events: none;
    background: radial-gradient(circle, rgba(14, 11, 26, 0.6) 0%, rgba(8, 6, 16, 0.85) 100%);
    backdrop-filter: blur(2px);
}

.angel-sprite-wrap {
    animation: angelFloatUp 3.4s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes angelFloatUp {
    0% { transform: translateY(50px) scale(0.9); opacity: 0; }
    20% { transform: translateY(20px) scale(1.1); opacity: 1; }
    50% { transform: translateY(-30px) scale(1); opacity: 1; }
    80% { transform: translateY(-90px) scale(0.85); opacity: 0.9; }
    100% { transform: translateY(-160px) scale(0.4); opacity: 0; }
}

.angel-farewell-text {
    margin-top: 16px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 15px;
    color: #fde047;
    letter-spacing: 0.4px;
    text-shadow: 0 0 8px #f59e0b, 1px 1px 0 #000;
    animation: textFadePulse 3s forwards;
}

@keyframes textFadePulse {
    0% { opacity: 0; transform: translateY(10px); }
    30% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.angel-wings-flutter {
    animation: wingFlap 0.6s infinite ease-in-out;
    transform-origin: center;
}

@keyframes wingFlap {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.85) translateY(-1px); }
}

.angel-halo-glow {
    animation: haloGlow 1.8s infinite alternate;
}

@keyframes haloGlow {
    0% { stroke: #facc15; filter: drop-shadow(0 0 3px #facc15); }
    100% { stroke: #fef08a; filter: drop-shadow(0 0 8px #fef08a); }
}

/* 3. Écran d'Éclosion de l'Œuf Mystérieux (Directement dans le terrarium, plein écran, sans superposition) */
.egg-hatch-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 10px 28px 10px;
    z-index: 60; /* Au premier plan absolu */
    overflow-y: auto;
    background: radial-gradient(circle at 50% 20%, rgba(35, 27, 65, 0.96) 0%, rgba(14, 11, 26, 0.98) 85%);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    box-sizing: border-box;
}

.egg-visual-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.egg-nest {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.egg-wobble-box {
    animation: eggIdleWobble 2.6s infinite ease-in-out;
    cursor: pointer;
    z-index: 2;
}

@keyframes eggIdleWobble {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-5deg) translateY(-2px); }
    75% { transform: rotate(5deg) translateY(-2px); }
}

.egg-wobble-box.is-cracking {
    animation: eggCracking 0.9s infinite linear !important;
}

@keyframes eggCracking {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-3px, 1px) rotate(-6deg); }
    40% { transform: translate(3px, -1px) rotate(6deg); }
    60% { transform: translate(-2px, -2px) rotate(-4deg); }
    80% { transform: translate(2px, 2px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.egg-straw-bed {
    position: absolute;
    bottom: 4px;
    font-size: 24px;
    z-index: 1;
}

.egg-status-tag {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-yellow);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-yellow);
    border-radius: 6px;
    padding: 3px 8px;
    letter-spacing: 0.4px;
    margin-top: 2px;
}

.egg-config-card {
    width: 100%;
    max-width: 360px;
    background: rgba(22, 18, 41, 0.92);
    border: 2px solid var(--pixel-border-color);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 2px 2px 0 #000;
}

.egg-card-header {
    text-align: center;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.egg-card-title {
    font-family: var(--font-pixel);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.egg-card-sub {
    font-size: 12px;
    color: var(--accent-mint);
    display: block;
    margin-top: 2px;
}

.egg-form-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.egg-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.egg-field-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text-dim);
    letter-spacing: 0.4px;
}

.egg-input-row {
    display: flex;
    gap: 6px;
}

.egg-random-name-btn {
    background: #312654;
    border: 2px solid var(--pixel-border-color);
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}

.egg-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.egg-opt-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    background: #1b162f;
    border: 2px solid #2e264f;
    border-radius: 7px;
    padding: 6px 4px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
    position: relative;
}

.egg-opt-btn.is-selected {
    border-color: var(--accent-mint);
    background: #272045;
    box-shadow: 0 0 8px rgba(110, 231, 183, 0.3), 1px 1px 0 #000;
}

.egg-opt-btn.is-locked {
    opacity: 0.78;
    cursor: pointer;
    border-style: dashed;
    border-color: #6366f1;
}

.egg-opt-btn.is-locked:hover {
    border-color: #fbbf24;
    background: #231b3d;
    transform: translateY(-1px);
}

.egg-lock-icon {
    font-size: 12px;
    color: #fbbf24;
    font-family: var(--font-pixel);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.45);
    padding: 1px 5px;
    border-radius: 4px;
    margin-top: 1px;
}

.egg-opt-name {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #ffffff;
}

.egg-opt-icon {
    font-size: 16px;
}

.egg-actions-dock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.egg-hatch-btn {
    background: linear-gradient(180deg, #10b981, #059669);
    border: 2px solid #6ee7b7;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 15px;
    font-weight: 700;
    min-height: 48px;
    padding: 10px 12px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4), 2px 2px 0 #000;
    transition: transform 0.1s;
    width: 100%;
}

.egg-hatch-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.egg-pantheon-shortcut-btn {
    background: #2c214d;
    border: 1px solid var(--accent-purple);
    border-radius: 6px;
    color: var(--accent-purple);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    min-height: 44px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
}

/* 4. Profil de vie & Identité figée */
.profile-modal-box {
    max-width: 380px;
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #141026;
    border: 2px solid var(--accent-mint);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.profile-avatar-preview {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1b162f;
    border: 2px solid var(--pixel-border-color);
    border-radius: 8px;
    flex-shrink: 0;
}

.profile-main-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-name {
    font-family: var(--font-pixel);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.profile-lock-tag {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 2px 6px;
    border-radius: 4px;
}

.profile-stats-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-chip {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.profile-chip.age {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fde047;
}

.profile-chip.level {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #6ee7b7;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.profile-detail-cell {
    background: #17132c;
    border: 1px solid var(--pixel-border-color);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-detail-cell .cell-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--screen-text-dim);
}

.profile-detail-cell .cell-val {
    font-size: 14px;
    color: #ffffff;
}

.profile-lock-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(180, 83, 9, 0.15);
    border: 1px solid #b45309;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.profile-lock-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #fde68a;
}

.profile-actions-dock {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.profile-pantheon-btn,
.profile-wardrobe-btn,
.profile-readability-btn {
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
}

.profile-pantheon-btn {
    background: #3b2857;
    border: 2px solid var(--accent-purple);
    color: #ffffff;
}

.profile-wardrobe-btn {
    background: #2563eb;
    border: 2px solid #60a5fa;
    color: #ffffff;
}

.profile-readability-btn {
    grid-column: 1 / -1;
    background: #1e293b;
    border: 2px solid #94a3b8;
    color: #f8fafc;
}

.profile-readability-btn.is-active {
    background: #fef08a;
    border-color: #eab308;
    color: #181425;
}

/* 5. Panthéon des Étoiles Modal */
.pantheon-modal-box {
    max-width: 420px;
}

.pantheon-summary-bar {
    background: #17122b;
    border: 2px solid #facc15;
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 8px;
}

.pantheon-summary-bar b {
    color: #facc15;
    font-family: var(--font-digit);
    font-size: 16px;
}

.pantheon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 4px;
}

.pantheon-memorial-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: radial-gradient(circle at 10% 50%, #20183b 0%, #151128 100%);
    border: 2px solid #6366f1;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 2px 2px 0 #000;
}

.memorial-angel-wrap {
    width: 50px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.memorial-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.memorial-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.memorial-name {
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.memorial-level-tag {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    padding: 2px 6px;
    border-radius: 4px;
}

.memorial-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.memorial-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.memorial-badge.age {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
}

.memorial-badge.date {
    background: rgba(255, 255, 255, 0.08);
    color: var(--screen-text-dim);
}

.memorial-badge.retirement {
    background: rgba(250, 204, 21, 0.22);
    border: 1px solid #facc15;
    color: #fef08a;
}

.memorial-quote {
    font-size: 13px;
    color: var(--screen-text-dim);
    font-style: italic;
    line-height: 1.35;
}

.pantheon-empty-card {
    text-align: center;
    padding: 24px 12px;
    background: #141026;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.pantheon-empty-icon {
    font-size: 32px;
    margin-bottom: 6px;
}

.pantheon-empty-title {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 4px;
}

.pantheon-empty-sub {
    font-size: 13px;
    color: var(--screen-text-dim);
    margin: 0;
    line-height: 1.4;
}

.pantheon-footer-action {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 6. Modal Hommage & Décès Paisible */
.death-modal-box {
    max-width: 360px;
    background: radial-gradient(circle, #2d1d4d 0%, #150f28 100%);
    border: 4px solid #facc15;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.35), 6px 6px 0 #000;
}

.death-angel-halo-wrap {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.death-title {
    font-family: var(--font-retro);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #fef08a;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 6px;
}

.death-message {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.death-heritage-box {
    background: #141026;
    border: 2px solid var(--accent-mint);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
}

.heritage-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    margin-bottom: 3px;
}

.heritage-value {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.death-actions-dock {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-force-critical {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    color: #ffffff;
}

.btn-trigger-death {
    background: linear-gradient(180deg, #7c3aed, #4c1d95);
    color: #ffffff;
}

.dialogue-age-mini {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-mint);
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 2px;
}

/* ==========================================================================
   OPTIMISATIONS RESPONSIVES MULTI-ÉCRANS (PC, Tablette, Mobiles Grands & Petits)
   ========================================================================== */

@media (max-width: 480px) {
    .retro-modal-backdrop {
        padding: 8px;
    }
    
    .retro-modal-box {
        max-height: 94vh;
        max-height: 94dvh;
    }

    .tamagotchi-extended-ui {
        padding: 6px 8px;
    }

    .actions-dock.compact-dock {
        gap: 6px;
    }
}

@media (max-width: 380px) {
    .status-bar {
        padding: 4px 6px;
    }
    
    .status-brand {
        font-size: 13px;
        margin-right: 4px;
        letter-spacing: 0.4px;
    }
    
    .status-time {
        font-size: 16px;
    }

    .status-right {
        gap: 4px;
    }

    .status-test-btn {
        padding: 4px 6px;
        font-size: 12px;
    }

    .status-test-btn .test-btn-subtext {
        display: none;
    }

    .app-mode-tabs-bar {
        padding: 4px 6px;
        gap: 4px;
    }

    .app-mode-tab {
        padding: 6px;
        font-size: 13px;
    }

    .tab-emoji {
        font-size: 14px;
    }

    .travel-status-pill {
        font-size: 12px;
        padding: 1px 5px;
    }

    .tamagotchi-unified-bar {
        padding: 5px 6px;
        gap: 4px;
    }

    .mini-icon-btn {
        min-height: 48px;
        height: auto;
    }

    .mini-icon-btn .btn-icon {
        font-size: 15px;
    }

    .mini-icon-btn .btn-micro-label {
        font-size: 12px;
    }
    
    .level-chip, .gems-chip, .streak-chip, .travel-countdown-chip {
        padding: 3px 5px;
        font-size: 12px;
    }

    .xp-nano-track {
        width: 20px;
    }
}





/* ========================================================================= */
/* ÉTAPE 7 : SALLE D'ARCADE MÉTÉO (3 JEUX) & POKÉDEX MÉTÉO ENCYCLOPÉDIE      */
/* ========================================================================= */

/* 1. Modal Salle d'Arcade (Hub de sélection des 3 jeux) */
.arcade-hub-modal-box {
    max-width: 580px;
    width: 95%;
    background: #19142b;
    border: 3px solid #8b5cf6;
    box-shadow: 6px 6px 0 #0c0818, inset 0 0 15px rgba(139, 92, 246, 0.2);
}

.arcade-hub-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
}

/* Carte Recommandation Météo x2 */
.arcade-recom-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 2px solid #eab308;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.arcade-recom-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #fde047;
    font-weight: 700;
}

.recom-sparkle {
    font-size: 14px;
    animation: sparkleSpin 2s infinite ease-in-out;
}

@keyframes sparkleSpin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

.recom-multiplier-chip {
    margin-left: auto;
    background: #eab308;
    color: #451a03;
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 1px 1px 0 #000;
    animation: chipGlow 1.5s infinite alternate;
}

@keyframes chipGlow {
    0% { transform: scale(0.96); filter: brightness(1); }
    100% { transform: scale(1.04); filter: brightness(1.2); }
}

.arcade-recom-text {
    font-size: 13px;
    color: #f1f5f9;
    line-height: 1.35;
    margin: 0;
}

/* Grille des 3 jeux d'arcade */
.arcade-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.arcade-game-card {
    background: #211a38;
    border: 2px solid #3b2d64;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 3px 3px 0 #0d0a1a;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.arcade-game-card:hover {
    transform: translateY(-2px);
    border-color: #a78bfa;
    box-shadow: 4px 4px 0 #000, 0 0 10px rgba(167, 139, 250, 0.3);
}

.arcade-game-card.is-recommended {
    border-color: #facc15;
    background: linear-gradient(180deg, #281e47 0%, #1c1532 100%);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.35), 3px 3px 0 #000;
}

.game-card-recom-badge {
    position: absolute;
    top: -10px;
    right: -4px;
    background: #eab308;
    color: #451a03;
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #78350f;
    box-shadow: 1px 1px 0 #000;
    z-index: 2;
    animation: badgePulse 1.2s infinite alternate;
}

@keyframes badgePulse {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.05); }
}

.arcade-card-icon {
    font-size: 28px;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.arcade-card-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
}

.arcade-card-title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 5px;
}

.arcade-card-title {
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
}

.arcade-genre-pill {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.arcade-genre-pill.runner {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

.arcade-genre-pill.shield {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

.arcade-genre-pill.flappy {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid #a855f7;
}

.arcade-card-desc {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.35;
    margin: 0 0 8px 0;
    flex: 1;
}

.arcade-card-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

.arcade-record-label {
    font-size: 12px;
    color: #cbd5e1;
}

.arcade-record-label b {
    color: #fde047;
    font-family: var(--font-digit);
    font-size: 15px;
}

.arcade-launch-btn {
    width: 100%;
    min-height: 44px;
    padding: 8px 6px;
    border-radius: 6px;
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.05s, filter 0.15s;
}

.arcade-launch-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.arcade-launch-btn.btn-runner {
    background: #2563eb;
    color: #ffffff;
}

.arcade-launch-btn.btn-shield {
    background: #dc2626;
    color: #ffffff;
}

.arcade-launch-btn.btn-flappy {
    background: #9333ea;
    color: #ffffff;
}

.arcade-modal-bottom-tip {
    font-size: 12px;
    color: #cbd5e1;
    background: rgba(0,0,0,0.25);
    padding: 8px 10px;
    border-radius: 6px;
    text-align: center;
}

/* 2. Mini-Briefing Visuel Ultra Lisible (2s avant départ) */
.minigame-briefing {
    position: absolute;
    inset: 0;
    background: rgba(12, 9, 23, 0.92);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 125;
    padding: 16px;
}

.briefing-box {
    max-width: 360px;
    width: 100%;
    background: #1e1736;
    border: 3px solid #facc15;
    border-radius: 12px;
    box-shadow: 6px 6px 0 #000, 0 0 20px rgba(250, 204, 21, 0.25);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.briefing-title {
    font-family: var(--font-retro);
    font-size: 13px;
    color: #fde047;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 0 #000;
}

.briefing-legend-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.briefing-rule {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 8px;
    border: 2px solid;
}

.briefing-rule.danger-rule {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    animation: dangerRuleGlow 1s infinite alternate;
}

@keyframes dangerRuleGlow {
    0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); }
}

.briefing-rule.bonus-rule {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    animation: bonusRuleGlow 1s infinite alternate;
}

@keyframes bonusRuleGlow {
    0% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.85); }
}

.briefing-badge {
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #000;
}

.briefing-badge.danger-badge {
    background: #ef4444;
    color: #fff;
}

.briefing-badge.bonus-badge {
    background: #10b981;
    color: #fff;
}

.briefing-rule b {
    font-size: 14px;
    color: #ffffff;
}

.briefing-sub {
    font-size: 12px;
    color: #cbd5e1;
}

.briefing-hint {
    font-size: 13px;
    color: #e2e8f0;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 10px;
    border-radius: 6px;
    width: 100%;
}

.briefing-countdown {
    font-family: var(--font-retro);
    font-size: 32px;
    color: #facc15;
    text-shadow: 3px 3px 0 #000;
    animation: countdownPulse 0.6s infinite alternate;
}

/* Badge Multiplicateur Météo x2 en jeu */
.minigame-multiplier-badge {
    background: #eab308;
    color: #451a03;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid #78350f;
    box-shadow: 1px 1px 0 #000;
    animation: badgePulse 1s infinite alternate;
}

/* 3. POKÉDEX MÉTÉO (Encyclopédie Rétro Complète) */
.pokedex-modal-box {
    max-width: 660px;
    width: 95%;
    max-height: 90vh;
    background: #17122b;
    border: 3px solid #ec4899;
    box-shadow: 6px 6px 0 #090614, inset 0 0 18px rgba(236, 72, 153, 0.2);
    display: flex;
    flex-direction: column;
}

.pokedex-header {
    background: linear-gradient(90deg, #831843 0%, #4c1d95 100%);
    border-bottom: 2px solid #ec4899;
}

.pokedex-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    overflow-y: auto;
}

/* Bannière de Progression */
.pokedex-progress-banner {
    background: #1f1838;
    border: 2px solid #8b5cf6;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.1), 3px 3px 0 #0d091b;
}

.pokedex-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.pokedex-count-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pokedex-label {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 700;
}

.pokedex-count-val {
    font-family: var(--font-digit);
    font-size: 20px;
    color: #facc15;
}

.pokedex-percent-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    background: rgba(139, 92, 246, 0.3);
    color: #e9d5ff;
    border: 1px solid #8b5cf6;
    padding: 2px 7px;
    border-radius: 4px;
}

.pokedex-bar-track {
    width: 100%;
    height: 12px;
    background: #0f0a1c;
    border: 2px solid #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 1px 1px 2px #000;
}

.pokedex-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899 0%, #a855f7 50%, #38bdf8 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
}

/* Paliers de Récompenses (3, 6, 9, 12) */
.pokedex-milestones-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.milestone-chip {
    background: #1c1633;
    border: 2px solid #3b2d64;
    border-radius: 8px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.2s ease;
}

.milestone-chip.is-claimable {
    border-color: #facc15;
    background: linear-gradient(180deg, #2c214d 0%, #1c1532 100%);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.4), 2px 2px 0 #000;
    animation: claimablePulse 1.2s infinite alternate;
}

@keyframes claimablePulse {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

.milestone-chip.is-claimed {
    border-color: #10b981;
    background: #13241e;
    opacity: 0.85;
}

.milestone-chip.legendary.is-claimable {
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.6), 2px 2px 0 #000;
}

.milestone-chip-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.milestone-chip-step {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 700;
}

.milestone-chip-reward {
    font-size: 12px;
    color: #fde047;
    font-weight: 700;
}

.milestone-claim-btn {
    width: 100%;
    min-height: 44px;
    padding: 6px 4px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #000;
    cursor: pointer;
    background: #3b2d64;
    color: #e2e8f0;
}

.milestone-chip.is-claimable .milestone-claim-btn {
    background: #eab308;
    color: #451a03;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
}

.milestone-chip.is-claimable .milestone-claim-btn:hover {
    filter: brightness(1.15);
}

.milestone-chip.is-claimed .milestone-claim-btn {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #047857;
    cursor: default;
}

/* Filtres de Climat */
.pokedex-filters-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 8px 2px;
    flex-shrink: 0;
    min-height: 42px;
    box-sizing: border-box;
    scrollbar-width: thin;
}

.pokedex-filter-pill {
    white-space: nowrap;
    min-height: 44px;
    padding: 8px 12px;
    background: #1c1532;
    border: 2px solid #3b2d64;
    border-radius: 20px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pokedex-filter-pill:hover {
    color: #ffffff;
    border-color: #8b5cf6;
}

.pokedex-filter-pill.is-active {
    background: #8b5cf6;
    border-color: #c084fc;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Grille des 12 cartes Pokédex */
.pokedex-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 2px;
}

.pokedex-card {
    background: #1f1838;
    border: 2px solid #3b2d64;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 2px 2px 0 #000;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pokedex-card:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #000, 0 0 10px rgba(139, 92, 246, 0.25);
}

.pokedex-card.is-discovered.rarity-common {
    border-color: #10b981;
}

.pokedex-card.is-discovered.rarity-rare {
    border-color: #8b5cf6;
    box-shadow: 2px 2px 0 #000, 0 0 8px rgba(139, 92, 246, 0.3);
}

.pokedex-card.is-discovered.rarity-legendary {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #2b1f47 0%, #1a1330 100%);
    box-shadow: 2px 2px 0 #000, 0 0 12px rgba(245, 158, 11, 0.4);
}

.pokedex-card.is-undiscovered {
    background: #130f24;
    border: 2px dashed #2d244a;
    opacity: 0.75;
}

.pokedex-card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pokedex-card-num {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #cbd5e1;
}

.pokedex-rarity-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.pokedex-rarity-badge.common {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.pokedex-rarity-badge.rare {
    background: rgba(139, 92, 246, 0.25);
    color: #c084fc;
}

.pokedex-rarity-badge.legendary {
    background: rgba(245, 158, 11, 0.25);
    color: #fde047;
    font-weight: bold;
}

.pokedex-rarity-badge.unknown {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
}

.pokedex-sprite-stage {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    position: relative;
}

.pokedex-sprite-ambient {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
}

.pokedex-sprite-wrap {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pokedex-card-meta {
    width: 100%;
    margin-bottom: 4px;
}

.pokedex-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.pokedex-weather-tag {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    display: inline-block;
}

.pokedex-weather-tag.locked {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
}

.pokedex-card-lore {
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.35;
    margin: 0 0 6px 0;
    flex: 1;
}

.pokedex-card-lore.hint-text {
    color: #c4b5fd;
}

.pokedex-card-footer {
    width: 100%;
    margin-top: auto;
}

.pokedex-encounter-badge {
    font-size: 12px;
    color: #fde047;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 6px;
    border-radius: 4px;
    display: block;
    width: 100%;
}

.pokedex-encounter-badge.locked {
    color: #cbd5e1;
}

/* Responsive pour mobiles */
@media (max-width: 540px) {
    .arcade-games-grid {
        grid-template-columns: 1fr;
    }
    
    .pokedex-milestones-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .pokedex-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================================================= */
/* TAMETEO 2.0 : TOASTS RÉTRO, BRIEFING MATINAL, APERÇU 70/30 VIVANT & APPÂTS */
/* ========================================================================= */

/* 1. Toasts Rétro Non-Bloquants (Phase 1.2) */
.retro-toast-container {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: min(92vw, 410px);
}

.retro-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(15, 12, 28, 0.96);
    border: 2px solid #818cf8;
    color: #f8fafc;
    font-family: var(--font-pixel);
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
    animation: toastSlideIn 0.22s ease-out;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.retro-toast.toast-success { border-color: #34d399; }
.retro-toast.toast-warn { border-color: #fbbf24; }
.retro-toast.toast-error { border-color: #f87171; }
.retro-toast.is-fading {
    opacity: 0;
    transform: translateY(-8px);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2. Briefing Matinal Intelligent 12h & Coach Météo (Phase 2.2) */
.morning-briefing-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.85), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(129, 140, 248, 0.55);
    border-radius: 12px;
    padding: 9px 11px;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.briefing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 6px;
}

.briefing-coach-badge {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #fde047;
    letter-spacing: 0.3px;
}

.briefing-sun-times {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
}

.briefing-headline {
    font-size: 14px;
    line-height: 1.35;
    color: #f8fafc;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.briefing-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.briefing-chip {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    font-weight: 600;
}

.briefing-chip.chip-alert {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

.briefing-chip.chip-warn {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fde68a;
}

.briefing-chip.chip-good {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(52, 211, 153, 0.55);
    color: #a7f3d0;
}

/* 3. Prévisions Horaires Interactives & Badges % Pluie (Phase 2.1 & 2.2) */
.hourly-card {
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hourly-card:hover {
    transform: translateY(-2px);
    border-color: #fde047;
}

.hourly-card.is-selected {
    background: rgba(99, 102, 241, 0.38);
    border-color: #fde047;
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.45);
}

.hourly-prob-badge {
    font-size: 12px;
    color: #38bdf8;
    font-weight: 700;
    line-height: 1;
}

.daily-prob-badge {
    font-size: 12px;
    color: #38bdf8;
    font-weight: 700;
    min-width: 44px;
    text-align: right;
}

.daily-prob-badge.is-empty {
    visibility: hidden;
}

.hourly-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(99, 102, 241, 0.28);
    border: 1px solid #818cf8;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #fef08a;
}

.hourly-preview-reset-btn {
    background: #fde047;
    color: #1e1b4b;
    border: none;
    border-radius: 6px;
    min-height: 44px;
    padding: 6px 10px;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* 4. Bandeau Conseil Météo dans #weatherTopBanner & Styles Tameteo 3.0 */
.compact-coach-bubble {
    font-size: 12px;
    color: #fef9c3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Pile verticale supérieure du terrarium (zéro chevauchement garanti) */
.terrarium-top-stack {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    z-index: 26;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.terrarium-top-stack > * {
    pointer-events: auto;
}

/* HUD flottant discret en haut du terrarium (1 seule ligne stricte) */
.terrarium-hud-strip {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    min-height: 44px;
    z-index: 22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    pointer-events: none;
}

.terrarium-hud-strip > * {
    pointer-events: auto;
}

.hud-stats-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.hud-reward-shortcut-btn {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 9px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 999px;
    color: #181425;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.terrarium-preview-banner,
.onboarding-banner {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 28;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.terrarium-preview-banner {
    background: rgba(91, 33, 182, 0.94);
    color: #f3e8ff;
}

.onboarding-banner {
    background: rgba(15, 118, 110, 0.96);
    border-color: #5eead4;
    color: #ecfdf5;
    padding: 10px 12px;
}

.onboarding-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.onboarding-step-badge {
    background: #fef08a;
    color: #181425;
    border-radius: 999px;
    padding: 2px 8px;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.onboarding-text {
    font-size: 13px;
    line-height: 1.35;
}

.onboarding-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.onboarding-finish-btn {
    min-height: 44px;
    padding: 4px 12px;
    border-radius: 8px;
    border: 2px solid #090812;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #181425;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 0 #090812;
}

.onboarding-skip-btn {
    min-height: 44px;
    min-width: 58px;
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Bulle interactive 1-tap flottant proprement au-dessus de la créature (compense scale 3.0) */
.pet-need-bubble {
    pointer-events: auto;
    margin-bottom: 84px;
    min-height: 44px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid #090812;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), 2px 2px 0 #090812;
    background: #fef08a;
    color: #181425;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 12;
    animation: needBubbleBob 1.7s infinite ease-in-out;
}

.pet-need-bubble.severity-critical {
    background: #fecaca;
    color: #7f1d1d;
    border-color: #ef4444;
}

.pet-need-bubble.severity-warning {
    background: #fed7aa;
    color: #7c2d12;
    border-color: #f97316;
}

@keyframes needBubbleBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Jauge interactive d'éclosion tactile */
.egg-warmth-wrap {
    width: 100%;
    max-width: 300px;
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(25, 20, 48, 0.9);
    border: 2px solid rgba(251, 191, 36, 0.45);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.egg-warmth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #fef3c7;
}

.egg-warmth-track {
    width: 100%;
    height: 10px;
    background: #0d0b17;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.egg-warmth-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #fde047);
    transition: width 0.25s ease;
}

.egg-warm-step-btn {
    min-height: 44px;
    width: 100%;
    background: linear-gradient(180deg, #f97316, #ea580c);
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.egg-warm-step-btn:disabled {
    background: #15803d;
    opacity: 0.9;
    cursor: default;
}

.egg-hatch-btn.is-ready-hatch {
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.7), 3px 3px 0 #090812;
    border-color: #fde047;
}

/* Panneau Bas Fixe (4 Jauges + Dock 4 Boutons) */
.bottom-control-panel {
    flex-shrink: 0;
    background: #141126;
    border-top: 3px solid var(--pixel-border-color);
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.vitals-panel-v3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vital-bars-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.health-fill {
    background: linear-gradient(90deg, #ef4444, #22c55e);
}

.health-fill.is-danger {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.hygiene-fill {
    background: linear-gradient(90deg, #06b6d4, #67e8f9);
}

.thermal-comfort-widget {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thermal-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--screen-text);
}

.thermal-head-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.thermal-wet-badge {
    background: rgba(56, 189, 248, 0.25);
    border: 1px solid #38bdf8;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 12px;
    color: #bae6fd;
    font-weight: 700;
}

.thermal-slider-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #0d0b17;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
    display: flex;
}

.thermal-zone-cold {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    border-radius: 999px 0 0 999px;
}

.thermal-zone-ideal {
    width: 22.5%;
    height: 100%;
    background: #22c55e;
}

.thermal-zone-hot {
    width: 37.5%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 0 999px 999px 0;
}

.thermal-pointer {
    position: absolute;
    top: -3px;
    width: 10px;
    height: 16px;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid #090812;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    transition: left 0.35s ease;
}

.thermal-pointer.is-alert {
    background: #ef4444;
    border-color: #fef08a;
}

.primary-bottom-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.dock-btn-v3 {
    position: relative;
    min-height: 50px;
    padding: 6px 4px;
    background: #241e3f;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812, inset 1px 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.dock-btn-v3:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.dock-btn-v3.is-open {
    background: #3b2f66;
    border-color: var(--accent-yellow);
}

.dock-btn-icon {
    font-size: 18px;
    line-height: 1;
}

.dock-btn-label {
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
}

.dock-alert-dot {
    position: absolute;
    top: 4px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    border: 1.5px solid #090812;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

/* Bottom-sheets exclusives Tameteo 3.0 */
.bottom-sheet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(8, 7, 18, 0.72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
}

.bottom-sheet-panel {
    width: 100%;
    max-height: 78%;
    overflow-y: auto;
    background: #1a1533;
    border: 3px solid var(--pixel-border-color);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.65);
    border-radius: 16px 16px 12px 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.14);
}

.sheet-title {
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-yellow);
}

.sheet-close-btn {
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    background: #2b2548;
    border: 2px solid var(--pixel-border-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.sheet-hygiene-bar-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sheet-hygiene-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #e0f2fe;
}

.sheet-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sheet-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet-action-btn {
    min-height: 54px;
    padding: 8px 10px;
    background: #251e42;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
}

.sheet-action-btn.wide {
    width: 100%;
}

.sheet-action-btn.accent {
    background: linear-gradient(135deg, #3730a3, #4c1d95);
    border-color: #a78bfa;
}

.sheet-action-btn.is-cooldown {
    opacity: 0.72;
}

.sheet-action-ico {
    font-size: 22px;
    flex-shrink: 0;
}

.sheet-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sheet-action-text b {
    font-size: 13px;
}

.sheet-action-text small {
    font-size: 12px;
    color: var(--screen-text-dim);
}

.recommended-loadout-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(30, 41, 59, 0.9));
    border: 2px solid rgba(52, 211, 153, 0.55);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recom-loadout-badge {
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    color: #6ee7b7;
}

.recom-loadout-preview {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.recom-loadout-btn {
    min-height: 44px;
    width: 100%;
    padding: 8px 12px;
    background: #10b981;
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 8px;
    color: #06281e;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.recom-loadout-btn.is-optimal {
    background: #334155;
    color: #e2e8f0;
}

.equip-quick-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.equip-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--screen-text-dim);
}

.equip-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.quick-equip-chip {
    min-height: 46px;
    padding: 6px 8px;
    background: #251e42;
    border: 2px solid var(--pixel-border-color);
    border-radius: 9px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.quick-equip-chip.is-selected {
    background: #312e81;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 1px var(--accent-yellow);
}

.quick-equip-ico {
    font-size: 20px;
    flex-shrink: 0;
}

.quick-equip-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.quick-equip-meta b {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-equip-meta small {
    font-size: 12px;
    color: var(--screen-text-dim);
}

.sheet-shop-link-btn {
    min-height: 46px;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 10px;
    color: #181425;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.sheet-more-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sheet-more-btn {
    position: relative;
    min-height: 50px;
    padding: 8px 10px;
    background: #251e42;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.sheet-more-btn.wide-span {
    grid-column: 1 / -1;
}

.sheet-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

@media (max-height: 700px), (max-width: 380px) {
    .tameto-creature-wrapper {
        --pet-scale: 2.5;
    }

    .pet-need-bubble {
        margin-bottom: 66px;
    }

    .bottom-control-panel {
        padding: 6px 8px 8px;
        gap: 6px;
    }

    .dock-btn-v3 {
        min-height: 46px;
    }

    .placed-prop-container {
        bottom: 50px;
        left: 10px;
        transform: scale(1.05);
    }

    .weather-visitor-container {
        bottom: 56px;
        right: 10px;
        transform: scale(1.05);
    }
}

/* 5. Jardin & Appât Météo Asynchrone dans le Pokédex (Phase 4.1) */
.weather-bait-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(52, 211, 153, 0.45);
    border-radius: 10px;
    padding: 9px 10px;
    margin-bottom: 10px;
}

.bait-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.bait-title {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: #6ee7b7;
}

.bait-status-pill {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.bait-status-pill.is-active {
    background: rgba(16, 185, 129, 0.25);
    color: #fde047;
    border-color: #34d399;
    font-weight: 700;
}

.bait-desc {
    font-size: 13px;
    color: #e2e8f0;
    margin: 0 0 7px 0;
    line-height: 1.35;
}

.bait-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.bait-choice-btn {
    background: rgba(30, 41, 59, 0.9);
    border: 1.5px solid rgba(148, 163, 184, 0.35);
    border-radius: 7px;
    min-height: 44px;
    padding: 8px 6px;
    color: #f8fafc;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bait-choice-btn:hover {
    border-color: #6ee7b7;
    transform: translateY(-1px);
}

.bait-choice-btn.is-selected {
    background: rgba(16, 185, 129, 0.32);
    border-color: #fde047;
    color: #fef08a;
    font-weight: 700;
}

/* 6. Arcade : Badge de vitesse, Profil : Évolution, Retraite Céleste & Backup JSON (Phases 3, 4 & 5) */
.minigame-speed-badge {
    background: rgba(56, 189, 248, 0.22);
    border: 1px solid #38bdf8;
    color: #bae6fd;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 6px;
}

.profile-chip.evo {
    background: rgba(250, 204, 21, 0.2);
    border: 1px solid rgba(250, 204, 21, 0.5);
    color: #fde047;
}

.profile-retire-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #181425;
    border: 2px solid #fde047;
    border-radius: 8px;
    min-height: 44px;
    padding: 8px 10px;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.profile-save-backup-box {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.backup-label {
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 12px;
    color: #cbd5e1;
}

.backup-btns-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.backup-btn {
    background: rgba(30, 41, 59, 0.9);
    border: 1.5px solid #6366f1;
    border-radius: 7px;
    min-height: 44px;
    padding: 8px 10px;
    color: #e2e8f0;
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.backup-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #fde047;
}

.postcard-actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

/* ==========================================================================
   ACCESSIBILITÉ SPRINT 1 : FORMULAIRES, FOCUS CLAVIER, MOTION & HAUTE LISIBILITÉ
   ========================================================================== */

.retro-label {
    display: block;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 13px;
    color: var(--screen-text-dim);
    margin-bottom: 4px;
}

.retro-input-boxed {
    width: 100%;
    min-height: 44px;
    background: #100d1e;
    border: 2px solid var(--pixel-border-color);
    box-shadow: inset 2px 2px 0 #000;
    border-radius: 8px;
    padding: 8px 10px;
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 15px;
}

.retro-action-secondary {
    width: 100%;
    min-height: 44px;
    background: #2b2548;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #000;
    border-radius: 8px;
    color: #f8fafc;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 12px;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--accent-yellow) !important;
    outline-offset: 2px !important;
}

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

/* Mode Haute Lisibilité (Police sans-serif propre + contraste renforcé) */
body.high-readability-mode {
    --font-pixel: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-retro: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-digit: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --screen-bg: #0c0a18;
    --weather-bg: #100e20;
    --screen-text: #ffffff;
    --screen-text-dim: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.13);
    --card-border: rgba(255, 255, 255, 0.38);
}

body.high-readability-mode *,
body.high-readability-mode .city-name,
body.high-readability-mode .temp-huge,
body.high-readability-mode .weather-badge,
body.high-readability-mode .compact-dock .action-btn-text,
body.high-readability-mode .critical-title,
body.high-readability-mode .death-title,
body.high-readability-mode .briefing-title,
body.high-readability-mode .floating-gem-reward,
body.high-readability-mode .arcade-float-points {
    text-shadow: none !important;
}

body.high-readability-mode .retro-dialogue-box.compact-dialogue,
body.high-readability-mode .bottom-control-panel,
body.high-readability-mode .bottom-sheet-panel,
body.high-readability-mode .weather-top-banner,
body.high-readability-mode .weather-drawer,
body.high-readability-mode .thermal-comfort-widget,
body.high-readability-mode .retro-modal-box,
body.high-readability-mode .morning-briefing-card {
    background: #0b0916 !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

body.high-readability-mode .compact-dialogue .dialogue-text,
body.high-readability-mode .briefing-headline,
body.high-readability-mode .tab-description {
    font-size: 15px;
    line-height: 1.45;
}

/* ==========================================================================
   SPRINT 3 : SURVIE RÉELLE, URGENCE VITALE, PENSION & JOURNAL D'ABSENCE
   ========================================================================== */

.vital-health-col .vital-dock-head {
    flex-wrap: wrap;
    gap: 2px 4px;
}

.health-hearts-row {
    font-size: 12px;
    line-height: 1;
    letter-spacing: -1px;
}

.health-stage-pill {
    margin-top: 2px;
    align-self: flex-start;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #bbf7d0;
}

.health-stage-pill.stage-tired {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
    color: #fef08a;
}

.health-stage-pill.stage-sick {
    background: rgba(249, 115, 22, 0.25);
    border-color: #f97316;
    color: #fed7aa;
}

.health-stage-pill.stage-vital_urgency,
.health-stage-pill.stage-dead {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fecaca;
}

.health-stage-pill.stage-boarded {
    background: rgba(56, 189, 248, 0.24);
    border-color: #38bdf8;
    color: #bae6fd;
}

.panel-terrarium.is-vital-urgency {
    box-shadow: inset 0 0 28px rgba(239, 68, 68, 0.72);
    animation: vitalUrgencyPulse 1.4s infinite ease-in-out;
}

@keyframes vitalUrgencyPulse {
    0%, 100% { box-shadow: inset 0 0 18px rgba(239, 68, 68, 0.45); }
    50% { box-shadow: inset 0 0 36px rgba(239, 68, 68, 0.85); }
}

.pet-svg.is-vital-urgency {
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.85));
}

.boarding-active-banner {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 25;
    min-height: 44px;
    padding: 5px 10px;
    background: rgba(12, 74, 110, 0.94);
    border: 2px solid #38bdf8;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 10px;
    color: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.boarding-banner-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.boarding-checkout-btn {
    min-height: 44px;
    padding: 6px 10px;
    background: #0ea5e9;
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 8px;
    color: #082f49;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.sheet-action-btn.boarding-wide {
    margin-top: 2px;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.45), rgba(30, 27, 75, 0.85));
    border-color: #38bdf8;
}

.journal-duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    border: 1.5px solid #818cf8;
    color: #e0e7ff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.journal-summary-card {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 1.45;
    color: #f8fafc;
}

.journal-summary-card p {
    margin: 0;
}

.journal-events-list {
    margin: 0 0 12px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: #cbd5e1;
}

.boarding-status-box {
    background: rgba(14, 165, 233, 0.16);
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #e0f2fe;
}

.boarding-plans-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.boarding-plan-btn {
    min-height: 58px;
    padding: 10px;
    background: #251e42;
    border: 2px solid var(--pixel-border-color);
    box-shadow: 2px 2px 0 #090812;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
}

.boarding-plan-btn span {
    color: var(--accent-yellow);
    font-weight: 700;
    font-size: 13px;
}

.boarding-plan-btn.featured {
    background: linear-gradient(135deg, #1e3a8a, #312e81);
    border-color: #38bdf8;
}

.boarding-checkout-full {
    width: 100%;
    min-height: 44px;
}

.death-cause-badge {
    display: inline-block;
    margin: 4px auto 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.22);
    border: 1.5px solid rgba(248, 113, 113, 0.65);
    color: #fecaca;
    font-size: 13px;
    font-weight: 700;
}

.memorial-badge.cause {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.memorial-extra-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: #cbd5e1;
}

.memorial-climates,
.memorial-heritage-chip {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
}

body.high-readability-mode .boarding-active-banner,
body.high-readability-mode .journal-summary-card,
body.high-readability-mode .boarding-status-box,
body.high-readability-mode .ritual-section-card {
    background: #0b0916 !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
}

/* ==========================================================================
   SPRINT 4 : CIEL CONTINU, EFFETS RARES, MICRO-INTERACTIONS & RITUELS
   ========================================================================== */

/* Nuances continues du ciel selon l'heure réelle */
.sky-phase-dawn .biome-environment {
    background: linear-gradient(180deg, #4c1d95 0%, #db2777 38%, #fdba74 88%);
}

.sky-phase-day.theme-sunny .biome-environment {
    background: linear-gradient(180deg, #0284c7 0%, #38bdf8 48%, #bae6fd 88%);
}

.sky-phase-golden .biome-environment {
    background: linear-gradient(180deg, #1d4ed8 0%, #ea580c 52%, #fde047 92%);
}

.sky-phase-dusk .biome-environment {
    background: linear-gradient(180deg, #0f172a 0%, #7e22ce 48%, #f43f5e 90%);
}

.sky-phase-night .biome-environment {
    background: linear-gradient(180deg, #09090b 0%, #1e1b4b 48%, #312e81 90%);
}

/* Effets atmosphériques rares */
.rare-rainbow-arc {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 120px;
    border-radius: 240px 240px 0 0;
    background: radial-gradient(circle at 50% 100%,
        transparent 56%,
        rgba(168, 85, 247, 0.55) 57%,
        rgba(59, 130, 246, 0.55) 62%,
        rgba(34, 197, 94, 0.55) 67%,
        rgba(250, 204, 21, 0.55) 72%,
        rgba(239, 68, 68, 0.55) 77%,
        transparent 79%
    );
    pointer-events: none;
    z-index: 1;
}

.biome-nightlight-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 72%, rgba(250, 204, 21, 0.25) 0%, rgba(15, 23, 42, 0.55) 65%);
    pointer-events: none;
    z-index: 3;
}

.biome-environment.rare-frost {
    box-shadow: inset 0 0 32px rgba(186, 230, 253, 0.65);
}

.biome-environment.rare-heatwave {
    box-shadow: inset 0 0 36px rgba(249, 115, 22, 0.55);
}

.biome-environment.rare-full-moon .celestial-body {
    filter: drop-shadow(0 0 22px rgba(254, 249, 195, 0.95));
    transform: scale(1.18);
}

.placed-prop-container {
    pointer-events: auto;
    cursor: pointer;
}

.pixel-flower {
    pointer-events: auto;
    cursor: pointer;
    padding: 4px;
}

/* HUD Lien ❤️ & Bouton Rituels */
.hud-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bond-chip {
    background: rgba(15, 12, 28, 0.78);
    border: 1.5px solid rgba(244, 114, 182, 0.55);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    color: #fbcfe8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hud-ritual-btn {
    min-height: 44px;
    padding: 4px 10px;
    background: rgba(30, 27, 75, 0.88);
    border: 1.5px solid rgba(167, 139, 250, 0.6);
    border-radius: 999px;
    color: #ede9fe;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.hud-ritual-btn.has-reflex {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-color: #fef08a;
    color: #181425;
}

.rare-event-banner {
    position: relative;
    top: auto;
    right: auto;
    align-self: flex-end;
    z-index: 23;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(88, 28, 135, 0.88);
    border: 1.5px solid #e879f9;
    color: #fdf4ff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    pointer-events: auto;
}

/* Hotspots météo tactiles ancrés en bas à gauche (jamais sur le compagnon) */
.biome-interactive-layer {
    position: absolute;
    left: 8px;
    bottom: 6px;
    z-index: 22;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    pointer-events: none;
}

.biome-hotspot {
    pointer-events: auto;
    min-height: 44px;
    padding: 4px 10px;
    background: rgba(17, 13, 34, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 2px 2px 0 #090812;
    border-radius: 999px;
    color: #f8fafc;
    font-family: var(--font-pixel);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.weather-resource-drop {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 23;
    min-height: 44px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #065f46, #047857);
    border: 2px solid #6ee7b7;
    box-shadow: 2px 2px 0 #090812;
    border-radius: 999px;
    color: #ecfdf5;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    animation: needBubbleBob 1.8s infinite ease-in-out;
}

body.zen-active .biome-interactive-layer,
body.zen-active .rare-event-banner,
body.zen-active .weather-resource-drop {
    display: none !important;
}

/* Modale Rituels du Jour */
.ritual-section-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ritual-section-title {
    font-family: var(--font-pixel);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-yellow);
}

.ritual-briefing-tip,
.ritual-evening-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #e2e8f0;
}

.backup-reflex-box {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #34d399;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #ecfdf5;
}

.backup-reflex-btn {
    min-height: 44px;
    padding: 6px 12px;
    background: #10b981;
    border: 2px solid #090812;
    border-radius: 8px;
    color: #06281e;
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.backup-backpack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.resources-chips-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.resource-stat-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    color: #f8fafc;
}

.ritual-bond-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #fbcfe8;
}

.bond-fill {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.ritual-evening-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ritual-evening-actions button {
    min-height: 44px;
}

/* ==========================================================================
   SPRINT 5 : ARBRE DE VIE, SILHOUETTES, HÉRITAGE & INSPECTEUR DEV
   ========================================================================== */

@keyframes mythicAuraPulse {
    0%, 100% { opacity: 0.72; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

.legend-mythic-aura,
.egg-heir-aura {
    transform-origin: center;
    animation: mythicAuraPulse 2.6s ease-in-out infinite;
}

.egg-heir-banner {
    width: 100%;
    max-width: 340px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(250, 204, 21, 0.2));
    border: 2px solid #facc15;
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    margin: 6px auto 10px;
}

.egg-heir-title {
    font-size: 13px;
    font-weight: 800;
    color: #fde047;
}

.egg-heir-desc {
    font-size: 12px;
    color: #f8fafc;
    margin-top: 2px;
}

.profile-chip.personality {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid #f472b6;
    color: #fbcfe8;
}

.profile-chip.generation {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #4ade80;
    color: #bbf7d0;
}

.profile-tree-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 2px solid #16a34a;
    background: linear-gradient(135deg, #065f46, #047857);
    color: #ecfdf5;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 0 #022c22;
}

/* Inspecteur d'évolution développeur (#testWeatherModal) */
.dev-evo-inspector-box {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 14px;
}

.dev-evo-preview-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
}

.dev-evo-live-preview {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.dev-evo-live-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dev-evo-live-caption {
    font-size: 13px;
    font-weight: 700;
    color: #fef08a;
}

.dev-evo-live-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dev-evo-action-btn {
    background: #1e293b;
    color: #e2e8f0;
    border: 2px solid #38bdf8;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 12px;
}

.dev-evo-sublabel {
    font-size: 12px;
    font-weight: 800;
    color: #86efac;
    margin: 8px 0 6px;
}

.dev-evo-stages-grid,
.dev-evo-forms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.dev-evo-btn {
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 2px solid #334155;
    background: #1e1b36;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.dev-evo-btn.is-active {
    border-color: #facc15;
    background: #3b2f63;
    color: #fef08a;
}

/* Modal Carnet Arbre de Vie (#treeOfLifeModal) */
.tree-modal-box {
    max-width: 480px;
}

.tree-hero-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.18));
    border: 2px solid rgba(110, 231, 183, 0.55);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}

.tree-pet-preview {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.tree-hero-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tree-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.tree-pet-name {
    font-size: 16px;
    color: #ffffff;
}

.tree-stage-badge {
    background: rgba(250, 204, 21, 0.2);
    border: 1px solid #facc15;
    color: #fef08a;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.tree-form-title {
    font-size: 14px;
    font-weight: 800;
    color: #a7f3d0;
}

.tree-age-gen-meta {
    font-size: 12px;
    color: #cbd5e1;
}

.tree-trait-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(168, 85, 247, 0.25);
    border: 1px solid #c084fc;
    color: #f3e8ff;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

.tree-section-card {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}

.tree-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
}

.tree-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #fde047;
    margin-bottom: 8px;
}

.tree-progress-fill {
    background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.tree-hint-sub {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 6px;
}

.tree-personality-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tree-pers-icon {
    font-size: 26px;
    line-height: 1;
}

.tree-pers-desc {
    font-size: 12px;
    color: #e2e8f0;
    margin-top: 2px;
}

.tree-pers-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tree-pers-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    color: #f8fafc;
}

.tree-climate-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.tree-climate-row {
    display: grid;
    grid-template-columns: 78px 1fr 40px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e2e8f0;
}

.tree-climate-row.is-dominant {
    color: #fef08a;
    font-weight: 700;
}

.tree-climate-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.tree-climate-fill {
    height: 100%;
    border-radius: 999px;
}

.tree-climate-fill.clim-sunny { background: linear-gradient(90deg, #f59e0b, #fde047); }
.tree-climate-fill.clim-rainy { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.tree-climate-fill.clim-cold { background: linear-gradient(90deg, #60a5fa, #e0f2fe); }
.tree-climate-fill.clim-night { background: linear-gradient(90deg, #6366f1, #c084fc); }

.tree-care-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #fbcfe8;
    margin-bottom: 5px;
}

.care-quality-fill {
    background: linear-gradient(90deg, #f43f5e, #ec4899, #4ade80);
}

.tree-forms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.tree-form-card {
    background: rgba(30, 27, 54, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tree-form-card.is-discovered {
    border-color: rgba(56, 189, 248, 0.55);
}

.tree-form-card.is-current {
    border-color: #facc15;
    background: rgba(67, 56, 202, 0.35);
}

.tree-form-card.is-locked-silhouette .tree-form-svg svg {
    filter: brightness(0.18) contrast(1.2);
    opacity: 0.78;
}

.tree-form-name {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
}

.tree-form-hint {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.3;
}

.tree-heir-card {
    border-color: rgba(250, 204, 21, 0.55);
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(15, 23, 42, 0.85));
}

.tree-heir-desc {
    font-size: 12px;
    color: #f8fafc;
    margin-bottom: 8px;
}

#btnCreateHeirEgg {
    width: 100%;
    min-height: 44px;
}

.tree-lineage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lineage-node-card {
    background: rgba(30, 27, 54, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
}

.lineage-node-card.is-alive {
    border-color: #4ade80;
}

.lineage-node-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #ffffff;
}

.lineage-gen-pill {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #bae6fd;
}

.lineage-status-tag {
    margin-left: auto;
    font-size: 12px;
    color: #bbf7d0;
}

.lineage-node-sub,
.lineage-trait-line {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 3px;
}

.lineage-trait-line {
    color: #fde047;
}

body.high-readability-mode .tree-hero-card,
body.high-readability-mode .tree-section-card,
body.high-readability-mode .tree-form-card,
body.high-readability-mode .lineage-node-card,
body.high-readability-mode .dev-evo-inspector-box,
body.high-readability-mode .egg-heir-banner {
    background: #0b0916 !important;
    border-color: rgba(255, 255, 255, 0.58) !important;
}

/* ==========================================================================
   SPRINT 6 : CUISINE MÉTÉO, BOUTIQUE PROGRESSIVE, ARCADE & PWA
   ========================================================================== */

.kitchen-wide-btn {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(30, 27, 54, 0.92));
}

.ritual-kitchen-shortcut {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
}

.kitchen-modal-box {
    max-width: 480px;
}

.kitchen-resources-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.kitchen-res-chip {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fef08a;
}

.kitchen-pantry-grid,
.kitchen-recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kitchen-pantry-card,
.kitchen-recipe-card {
    background: rgba(30, 27, 54, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kitchen-recipe-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #ffffff;
}

.pantry-count-badge {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #4ade80;
    color: #bbf7d0;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 800;
}

.kitchen-recipe-desc {
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.35;
}

.kitchen-recipe-cost {
    font-size: 12px;
    color: #fde047;
}

.kitchen-action-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    border: 2px solid #000000;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    padding: 8px 10px;
}

.kitchen-action-btn.use-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.kitchen-action-btn.craft-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #181425;
}

.kitchen-action-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    background: #334155;
    color: #cbd5e1;
}

.arcade-quota-banner {
    background: rgba(16, 185, 129, 0.16);
    border: 2px solid #34d399;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.arcade-quota-banner.is-depleted {
    background: rgba(245, 158, 11, 0.16);
    border-color: #fbbf24;
}

.arcade-quota-pill {
    font-size: 13px;
    font-weight: 800;
    color: #fef08a;
}

.arcade-quota-banner small {
    font-size: 12px;
    color: #e2e8f0;
}

.equip-card.is-progression-locked {
    opacity: 0.82;
    border-style: dashed;
    border-color: rgba(248, 113, 113, 0.55);
}

.equip-action-btn.locked-prog-btn {
    background: #334155;
    color: #fca5a5;
    font-size: 12px;
    border-color: #ef4444;
}

.profile-notif-btn,
.profile-pwa-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 2px solid #38bdf8;
    background: rgba(14, 116, 144, 0.32);
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 8px 12px;
}

.profile-notif-btn.is-active {
    border-color: #4ade80;
    background: rgba(21, 128, 61, 0.35);
    color: #dcfce7;
}

.profile-pwa-btn {
    border-color: #facc15;
    background: rgba(161, 98, 7, 0.35);
    color: #fef08a;
    justify-content: center;
    align-items: center;
}

body.high-readability-mode .kitchen-pantry-card,
body.high-readability-mode .kitchen-recipe-card,
body.high-readability-mode .arcade-quota-banner,
body.high-readability-mode .profile-notif-btn,
body.high-readability-mode .profile-pwa-btn,
body.high-readability-mode .wizard-card,
body.high-readability-mode .wizard-city-preview,
body.high-readability-mode .account-profile-card,
body.high-readability-mode .onboarding-banner {
    background: #0b0916 !important;
    border-color: rgba(255, 255, 255, 0.58) !important;
}

/* ==========================================================================
   TAMETEO 3.1 : ANTI-SUPERPOSITION HUD MOBILE, WIZARD CONFIG & TUTO PROGRESSIF
   ========================================================================== */

/* HUD strictement sur 1 ligne sur petits écrans (360px+) */
.terrarium-hud-strip.has-reward-visible .hud-ritual-label {
    display: none;
}

@media (max-width: 420px) {
    .terrarium-hud-strip .xp-nano-track {
        display: none;
    }

    .terrarium-hud-strip .level-chip,
    .terrarium-hud-strip .gems-chip,
    .terrarium-hud-strip .bond-chip,
    .terrarium-hud-strip .streak-chip {
        padding: 3px 6px;
        font-size: 12px;
    }

    .terrarium-hud-strip .hud-ritual-label {
        display: none;
    }

    .terrarium-hud-strip .hud-ritual-btn {
        min-width: 44px;
        padding: 4px 8px;
    }
}

/* Masquage complet des distractions pendant la configuration & l'éclosion */
body.setup-wizard-active #weatherTopBanner,
body.setup-wizard-active #terrariumTopStack,
body.setup-wizard-active #biomeInteractiveLayer,
body.setup-wizard-active #weatherResourceDrop,
body.setup-wizard-active #weatherVisitorContainer,
body.setup-wizard-active #petNeedBubble,
body.setup-wizard-active #bottomControlPanel,
body.egg-stage-active #weatherTopBanner,
body.egg-stage-active #terrariumTopStack,
body.egg-stage-active #biomeInteractiveLayer,
body.egg-stage-active #weatherResourceDrop,
body.egg-stage-active #weatherVisitorContainer,
body.egg-stage-active #bottomControlPanel {
    display: none !important;
}

/* Mode Visite Guidée Progressive (révélation étape par étape sans superposition) */
body.tutorial-active #weatherTopBanner,
body.tutorial-active #terrariumHudStrip,
body.tutorial-active #dialogueBox,
body.tutorial-active #petNeedBubble,
body.tutorial-active #biomeInteractiveLayer,
body.tutorial-active #weatherResourceDrop,
body.tutorial-active #weatherVisitorContainer,
body.tutorial-active #rareEventBanner,
body.tutorial-active #criticalEmergencyBanner,
body.tutorial-active #boardingActiveBanner,
body.tutorial-active .vital-dock-col,
body.tutorial-active #thermalComfortWidget,
body.tutorial-active .dock-btn-v3,
body.tutorial-active .dock-alert-dot {
    display: none !important;
}

/* Étape 1/4 : Câlin uniquement dans un terrarium totalement épuré */
body.tutorial-active[data-tuto-step="cuddle"] #bottomControlPanel {
    display: none !important;
}

/* Étape 2/4 : Soins / Premier repas -> révèle Santé, Faim et le bouton Soins */
body.tutorial-active[data-tuto-step="feed"] #bottomControlPanel {
    display: flex !important;
}

body.tutorial-active[data-tuto-step="feed"] .vital-health-col,
body.tutorial-active[data-tuto-step="feed"] .vital-hunger-col {
    display: flex !important;
}

body.tutorial-active[data-tuto-step="feed"] #dockCareBtn {
    display: flex !important;
}

/* Étape 3/4 : Météo & Tenue -> révèle Bandeau Météo + Thermique + Soins & Équiper */
body.tutorial-active[data-tuto-step="equip"] #weatherTopBanner {
    display: block !important;
}

body.tutorial-active[data-tuto-step="equip"] #bottomControlPanel,
body.tutorial-active[data-tuto-step="equip"] .vital-health-col,
body.tutorial-active[data-tuto-step="equip"] .vital-hunger-col,
body.tutorial-active[data-tuto-step="equip"] #thermalComfortWidget,
body.tutorial-active[data-tuto-step="equip"] #dockCareBtn,
body.tutorial-active[data-tuto-step="equip"] #dockEquipBtn {
    display: flex !important;
}

/* Étape 4/4 : Tout est révélé et prêt pour jouer */
body.tutorial-active[data-tuto-step="ready"] #weatherTopBanner {
    display: block !important;
}

body.tutorial-active[data-tuto-step="ready"] #terrariumHudStrip,
body.tutorial-active[data-tuto-step="ready"] #bottomControlPanel,
body.tutorial-active[data-tuto-step="ready"] .vital-dock-col,
body.tutorial-active[data-tuto-step="ready"] #thermalComfortWidget,
body.tutorial-active[data-tuto-step="ready"] .dock-btn-v3 {
    display: flex !important;
}

/* Halo de guidage sur l'élément cible du tutoriel */
.tuto-spotlight {
    outline: 3px solid #fde047 !important;
    outline-offset: 2px;
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.78), 2px 2px 0 #090812 !important;
    animation: tutoSpotlightPulse 1.4s infinite ease-in-out;
}

.tameto-creature-wrapper.tuto-spotlight {
    outline: none !important;
    filter: drop-shadow(0 0 14px rgba(250, 204, 21, 0.95)) !important;
    box-shadow: none !important;
}

@keyframes tutoSpotlightPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.18); }
}

/* ==========================================================================
   ASSISTANT DE CONFIGURATION PAS-À-PAS (#setupWizardOverlay)
   ========================================================================== */
.setup-wizard-overlay {
    position: absolute;
    inset: 0;
    z-index: 75;
    background: radial-gradient(circle at 50% 15%, rgba(30, 27, 75, 0.98), rgba(11, 9, 22, 0.99));
    padding: 16px 12px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

.wizard-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    background: #17132c;
    border: 2px solid rgba(167, 139, 250, 0.55);
    border-radius: 14px;
    box-shadow: 4px 4px 0 #090812;
    padding: 18px 16px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wizard-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.wizard-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wizard-brand {
    font-family: var(--font-retro);
    font-size: 13px;
    color: var(--accent-mint);
    letter-spacing: 0.8px;
}

.wizard-step-badge {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
    color: #e0f2fe;
    white-space: nowrap;
}

.wizard-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #0d0b17;
    border: 1px solid rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #38bdf8);
    transition: width 0.25s ease;
}

.wizard-step-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.wizard-title {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.wizard-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #cbd5e1;
}

.wizard-auth-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.wizard-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #0c1022;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    padding: 4px;
}

.wizard-tab-btn {
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5e1;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wizard-tab-btn.is-active {
    background: #10b981;
    border-color: #34d399;
    color: #ffffff;
}

.wizard-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.wizard-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.wizard-field label {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.wizard-field .retro-input,
.wizard-search-row .retro-input,
.egg-input-row .retro-input,
.retro-input-boxed {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    background: #0c1022;
    border: 2px solid rgba(148, 163, 184, 0.42);
    border-radius: 10px;
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.3;
    box-sizing: border-box;
    outline: none;
}

.wizard-field .retro-input::placeholder,
.wizard-search-row .retro-input::placeholder,
.egg-input-row .retro-input::placeholder,
.retro-input-boxed::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.wizard-field .retro-input:focus,
.wizard-search-row .retro-input:focus,
.egg-input-row .retro-input:focus,
.retro-input-boxed:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.24);
    outline: none;
}

.wizard-error-msg {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.22);
    border: 1.5px solid #f87171;
    color: #fecaca;
    font-size: 12px;
    font-weight: 700;
}

.wizard-primary-btn,
.wizard-secondary-btn,
.wizard-ghost-btn,
.wizard-geoloc-btn {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #090812;
    box-shadow: 2px 2px 0 #090812;
}

.wizard-primary-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    width: 100%;
}

.wizard-primary-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.wizard-secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #f8fafc;
    width: 100%;
}

.wizard-ghost-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    color: #e2e8f0;
    flex-shrink: 0;
}

.wizard-geoloc-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    width: 100%;
}

.wizard-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: #94a3b8;
    font-size: 12px;
    margin: 2px 0;
}

.wizard-divider::before,
.wizard-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.wizard-guest-hint {
    margin: -4px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #94a3b8;
    text-align: center;
}

.wizard-connected-box {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(16, 185, 129, 0.16);
    border: 2px solid #34d399;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wizard-connected-badge {
    font-size: 12px;
    font-weight: 700;
    color: #6ee7b7;
}

.wizard-quick-cities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.wizard-city-chip {
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
    color: #f8fafc;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.wizard-city-chip.is-selected {
    background: rgba(56, 189, 248, 0.28);
    border-color: #38bdf8;
    color: #e0f2fe;
}

.wizard-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.wizard-checklist li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
    color: #e2e8f0;
}

#accountGuestSection .wizard-auth-tabs {
    margin-bottom: 12px;
}

.wizard-city-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    background: #100d20;
}

.wizard-city-result-btn {
    min-height: 44px;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-city-result-btn:hover {
    background: rgba(56, 189, 248, 0.22);
}

.wizard-city-preview,
.wizard-companion-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-city-preview .preview-icon,
.wizard-companion-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.wizard-city-preview .preview-meta,
.wizard-companion-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wizard-city-preview .preview-meta small,
.wizard-companion-text small {
    font-size: 12px;
    color: #cbd5e1;
}

.wizard-nav-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.wizard-nav-row .wizard-primary-btn {
    flex: 1;
}

/* ==========================================================================
   MODALE COMPTE CLOUD & PROFIL (#accountModal, #customModal)
   ========================================================================== */
.profile-account-btn,
.profile-replay-tuto-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 2px solid #34d399;
    background: rgba(16, 185, 129, 0.22);
    color: #ecfdf5;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 8px 12px;
}

.profile-replay-tuto-btn {
    border-color: #a78bfa;
    background: rgba(139, 92, 246, 0.24);
    color: #ede9fe;
}

.account-profile-card {
    background: rgba(16, 185, 129, 0.14);
    border: 2px solid #34d399;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.account-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #34d399;
    color: #a7f3d0;
    font-size: 12px;
    font-weight: 700;
}

.account-display-name {
    font-size: 16px;
    color: #ffffff;
}

.account-display-email,
.account-last-sync {
    font-size: 12px;
    color: #cbd5e1;
}

.account-actions-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.account-logout-btn {
    border-color: rgba(248, 113, 113, 0.65);
    color: #fecaca;
}

@media (prefers-reduced-motion: reduce) {
    .tuto-spotlight,
    .pet-need-bubble,
    .weather-resource-drop,
    .critical-emergency-banner {
        animation: none !important;
    }
}
