:root {
    /* --- 1. COULEURS DE BASE (THÈME GOLD / ÉLÉGANCE) --- */
    --bg-body: radial-gradient(circle at 50% 0%, #1c1c2e 0%, #0a0a0a 100%);
    --bg-modal: #141414;
    --bg-card: rgba(255, 255, 255, 0.06); 
    --bg-input: #0a0a0a;
    --bg-header: transparent;
    --bg-session: #1a1a1a;
    --text-main: #e0e0e0; 
    --text-muted: #888888;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --accent: #ffd700;      
    --highlight: #4facfe;   
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #ffd700;
    --shadow-card: 0 4px 6px rgba(0,0,0,0.2);
    --shadow-neon: none; 
}

/* THÈME CYBERPUNK */
body.theme-cyberpunk { 
    --bg-body: linear-gradient(180deg, #180c2e 0%, #0d1b2a 100%); 
    --bg-modal: #130f1f;
    --bg-card: rgba(60, 20, 80, 0.25);
    --bg-input: #0b0814;
    --bg-session: rgba(100, 0, 100, 0.05);
    --text-main: #f0f0ff;
    --text-muted: #9ba0b5;
    --accent: #d54ea5;      
    --highlight: #00e0ff;   
    --border-color: rgba(213, 78, 165, 0.3);
    --border-focus: #00e0ff;
    --shadow-neon: 0 0 8px rgba(213, 78, 165, 0.2);
}

/* THÈME MATRIX */
body.theme-matrix { 
    --bg-body: #0d110d; 
    --bg-modal: #111611;
    --bg-card: rgba(20, 50, 20, 0.15);
    --bg-input: #050a05;
    --bg-session: #0a140a;
    --text-main: #a8e6cf; 
    --text-muted: #4b7a60;
    --font-main: "Courier New", Courier, monospace; 
    --accent: #4caf50;    
    --highlight: #69f0ae; 
    --border-color: rgba(76, 175, 80, 0.2);
    --border-focus: #69f0ae;
    --shadow-card: none;
    --shadow-neon: none;
}

/* THÈME LAVA */
body.theme-lava { 
    --bg-body: radial-gradient(circle at 50% 10%, #2b1d1d 0%, #141010 90%); 
    --bg-modal: #1f1a1a;
    --bg-card: rgba(255, 100, 50, 0.05);
    --bg-input: #140d0d;
    --bg-session: #261e1e;
    --text-main: #ffe0d0; 
    --text-muted: #8a6a6a;
    --accent: #ff6b35;    
    --highlight: #ff9e40; 
    --border-color: rgba(255, 107, 53, 0.2);
    --border-focus: #ff6b35;
}

/* --- STRUCTURE --- */
body {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100dvh;
    background: var(--bg-body); 
    background-color: #0a0a0a;
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0; padding: 0;
    display: flex; flex-direction: column; overflow: hidden;
    -webkit-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom);
    transition: background 0.5s ease, color 0.3s ease;
}

.status-bar-spacer { height: env(safe-area-inset-top); background: transparent; flex-shrink: 0; }

header { 
    padding: 10px 15px; display: grid; 
    grid-template-columns: 50px minmax(0, 1fr) 50px; 
    align-items: center; flex-shrink: 0; z-index: 10;
    background: var(--bg-header);
}

.header-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-main); opacity: 0.9; padding: 0; text-align: left; transition: opacity 0.2s; }
.header-btn:active { opacity: 0.5; }
.header-btn:last-child { text-align: right; }

.total-wrapper { display: flex; flex-direction: column; align-items: center; overflow: hidden; width: 100%; }

.total-big { 
    font-size: clamp(32px, 12vw, 60px); 
    font-weight: 800; 
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0,0,0,0.2); 
    line-height: 1.1;
    word-wrap: break-word; 
    text-align: center; 
    width: 100%;
    cursor: pointer;          
    -webkit-user-select: none; 
    user-select: none;
    transition: color 0.2s, transform 0.1s; 
}

.currency-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.8;}

.location-badge { 
    font-size: 12px; background: rgba(255,255,255,0.05); padding: 6px 14px; border-radius: 20px; margin-top: 8px; 
    color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 85%; cursor: pointer; 
    border: 1px solid var(--border-color); transition: all 0.2s; display: inline-block;
}
.location-badge:active { background: rgba(255,255,255,0.1); transform: scale(0.98); }
.location-badge:hover, .location-badge.active { border-color: var(--highlight); color: var(--highlight); background: rgba(255,255,255,0.08); }

#list-container { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 120px; -webkit-overflow-scrolling: touch; }

.section-header { 
    font-size: 11px; font-weight: bold; color: var(--text-muted); 
    text-transform: uppercase; letter-spacing: 1.5px; 
    margin: 20px 0 10px 5px; opacity: 0.8;
}

/* CARDS */
.card {
    background: var(--bg-card); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px; padding: 12px; margin-bottom: 10px;
    display: flex; align-items: center; 
    touch-action: pan-y; position: relative;
    box-shadow: var(--shadow-card);
}
.card.favorite { 
    border-left: 3px solid var(--highlight); 
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}
.handle { color: var(--text-muted); font-size: 20px; padding: 10px 15px 10px 5px; cursor: grab; opacity: 0.5; }
.icon-box {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-right: 12px; background: rgba(0,0,0,0.2); 
    border: 1px solid var(--border-color);
}
.info { flex: 1; padding: 0 5px; min-width: 0; }
.drink-name { font-weight: 600; font-size: 15px; text-transform: capitalize; color: var(--text-main); margin-bottom: 3px;}
.subtotal { font-size: 12px; color: var(--text-muted); }
.price-tag { color: var(--accent); font-weight: 700; margin-right: 4px; }
.controls { display: flex; align-items: center; gap: 10px; margin-right: 5px; }
.btn-circle { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(255,255,255,0.05); color: var(--text-main); font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
.btn-circle:active { background: var(--highlight); color: #000; border-color: var(--highlight); }
.plus { background: rgba(255,255,255,0.1); }
.qty { font-size: 16px; font-weight: 700; min-width: 20px; text-align: center; color: var(--text-main); }
.delete-mini { font-size: 18px; background: none; border: none; color: var(--text-muted); padding: 0 0 0 10px; cursor: pointer; opacity: 0.6; }

/* BOUTONS FLOTTANTS */
.bottom-bar {
    position: absolute; bottom: calc(30px + env(safe-area-inset-bottom)); 
    left: 0; right: 0; display: flex; justify-content: center; gap: 25px;
    pointer-events: none; z-index: 90;
}
.fab { pointer-events: auto; border: none; cursor: pointer; border-radius: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,0.4); transition: transform 0.1s; }
.fab:active { transform: scale(0.92); }
.fab-add { width: 65px; height: 65px; background: var(--highlight); color: #000; font-size: 30px; border-radius: 24px; }
.fab-roulette { width: 45px; height: 45px; background: var(--bg-modal); border: 1px solid var(--border-color); font-size: 22px; margin-top: 10px; color: var(--text-main); }
.fab-save { width: 45px; height: 45px; background: var(--bg-modal); border: 1px solid var(--border-color); color: #00ff66; font-size: 20px; margin-top: 10px; }

.credits { position: absolute; bottom: env(safe-area-inset-bottom); width: 100%; text-align: center; font-size: 10px; color: var(--text-muted); pointer-events: none; padding-bottom: 8px; opacity: 0.5; }

/* MODALS */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 1000; align-items: center; justify-content: center; }
.modal-card { 
    background: var(--bg-modal); 
    color: var(--text-main);
    padding: 25px 20px; border-radius: 28px; width: 88%; max-width: 400px; max-height: 80vh; 
    text-align: center; 
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5), var(--shadow-neon); 
    overflow-y: auto; 
}

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.theme-btn { padding: 16px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); font-weight: 600; cursor: pointer; transition: 0.2s; }
.theme-btn:active { transform: scale(0.96); border-color: var(--highlight); }

/* CARTE */
#map { width: 100%; height: 300px; border-radius: 18px; margin: 15px 0; border: 1px solid var(--border-color); }
.leaflet-popup-content-wrapper { background: var(--bg-modal); color: var(--text-main); border-radius: 10px; text-align: center; padding: 5px; }
.leaflet-popup-tip { background: var(--bg-modal); }

.btn-map-action { border: none; padding: 10px; border-radius: 10px; font-size: 12px; font-weight: bold; width: 100%; cursor: pointer; margin-top: 6px; }
.btn-map-move { background: var(--highlight); color: #000; }
.btn-map-edit { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); }
.btn-map-delete { background: rgba(255, 68, 68, 0.1); color: #ff4444; border: 1px solid #ff4444; }

.map-stars { font-size: 20px; color: var(--text-muted); margin: 5px 0; cursor: pointer; }
.map-stars span.active { color: #ffd700; }

#move-toast { display: none; position: absolute; top: 80px; left: 50%; transform: translateX(-50%); background: var(--highlight); color: #000; padding: 12px 24px; border-radius: 30px; font-weight: 700; box-shadow: 0 10px 20px rgba(0,0,0,0.3); z-index: 2000; pointer-events: none; font-size: 13px; }

/* INPUTS & BOUTONS */
input { 
    width: 100%; box-sizing: border-box; padding: 16px; 
    background: var(--bg-input); 
    border: 1px solid var(--border-color); 
    color: var(--text-main); 
    border-radius: 14px; font-size: 16px; text-align: center; margin-bottom: 12px; 
    font-family: var(--font-main);
    transition: 0.2s;
}
input:focus { outline: none; border-color: var(--border-focus); background: var(--bg-card); }

.btn-full { width: 100%; padding: 14px; border-radius: 14px; border: none; font-size: 15px; font-weight: 600; margin-bottom: 8px; cursor: pointer; font-family: var(--font-main); transition: 0.2s; }
.btn-full:active { transform: scale(0.98); }
.btn-ok { background: var(--highlight); color: #000; }
.btn-cancel { background: transparent; color: var(--text-muted); border: 1px solid transparent; font-size: 14px;}
.btn-cancel:active { color: var(--text-main); }

.btn-place-pick { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    color: var(--text-main); 
    text-align: left; margin-bottom: 6px; 
    padding: 14px; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; 
    cursor: pointer; transition: all 0.2s; 
}
.btn-place-pick:active { border-color: var(--highlight); background: var(--bg-input); }
.place-pick-name { font-weight: 600; font-size: 15px; }
.place-pick-count { font-size: 11px; color: var(--text-muted); background: rgba(0,0,0,0.2); padding: 3px 8px; border-radius: 6px; }

/* HISTORIQUE */
.session-block { background: var(--bg-card); border-radius: 18px; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--border-color); }
.session-header { background: rgba(0,0,0,0.2); padding: 12px 15px; font-weight: 600; font-size: 14px; color: var(--text-main); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.session-header-right { display: flex; align-items: center; gap: 10px; }
.session-total-badge { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-focus); color: var(--border-focus); padding: 4px 8px; border-radius: 6px; font-size: 13px; font-weight: bold; min-width: 50px; text-align: center; }

.round-item { padding: 12px 15px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-main); }
.round-item:last-child { border-bottom: none; }
.round-info-left { flex:1; text-align:left;}
.round-location { display:block; font-size:11px; color:var(--highlight); margin-bottom:3px; font-weight:600; cursor: pointer; }
.round-time { color: var(--text-muted); font-size: 11px; margin-right:5px; opacity: 0.7;}
.round-details { color: var(--text-main); cursor: pointer; opacity: 0.9; }
.round-price { font-weight: bold; color: var(--text-main); margin-left: 10px; font-size: 14px; }
.btn-hist-delete { background: none; border: none; font-size: 18px; cursor: pointer; margin-left: 10px; opacity: 0.4; color: var(--text-muted); }

/* TUTO & TEXTE */
h2, h3 { margin-top: 0; font-weight: 700; letter-spacing: -0.5px; }
h4 { color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; margin-bottom: 10px; margin-top: 20px;}
.tuto-step { text-align: left; margin-bottom: 25px; font-size: 14px; color: var(--text-main); line-height: 1.6; }
.tuto-step strong { color: var(--highlight); display: inline-block; margin-bottom: 4px; font-size: 15px; }
.tuto-step ul { padding-left: 20px; margin-top: 5px; margin-bottom: 10px; list-style-position: outside; }
.tuto-step li { margin-bottom: 8px; color: var(--text-main); opacity: 0.9; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 50px; opacity: 0.2; margin-bottom: 15px; display: block; filter: grayscale(100%); }
.empty-state-text { font-size: 14px; line-height: 1.5; }

/* JEUX */
.coin-flip-container { perspective: 1000px; width: 150px; height: 150px; margin: 20px auto; }
.coin { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 3s ease-out; }
.coin-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; border: 4px solid #d4af37; box-shadow: inset 0 0 15px rgba(0,0,0,0.4); background: radial-gradient(circle at 30% 30%, #ffd700, #e6ac00); color: #b78a08; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.coin-back { transform: rotateY(180deg); background: radial-gradient(circle at 30% 30%, #e6ac00, #ffd700); }
.coin-inner { position: absolute; width: 88%; height: 88%; border: 1px dashed #b78a08; border-radius: 50%; opacity: 0.5; }
.coin-face::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%; box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.6); }

.coin-wrapper { position: relative; width: 150px; height: 180px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; perspective: 1000px; }
.coin-flip-container { width: 110px; height: 110px; position: relative; z-index: 2; }
.coin-flip-container.jumping { animation: coinJump 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.coin-shadow { width: 70px; height: 15px; background: rgba(0, 0, 0, 0.3); border-radius: 50%; margin-top: -8px; z-index: 1; filter: blur(4px); transition: all 0.1s; opacity: 1; transform: scale(1); }
.coin-shadow.active { animation: shadowShrink 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

.dice-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 25px; }
.dice-controls button { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); cursor: pointer; transition: 0.2s; font-weight: 500; }
.dice-controls button:active, .dice-controls button.active { background: var(--highlight); color: #000; font-weight: 700; border-color: var(--highlight); }

#dice-container { display: flex; justify-content: center; gap: 25px; margin: 40px 0; min-height: 90px; perspective: 1000px; }
.scene { width: 65px; height: 65px; cursor: pointer; position: relative; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transform: translateZ(-32.5px); transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cube__face { position: absolute; width: 65px; height: 65px; background: #fff; border: 1px solid #ccc; border-radius: 10px; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 15px rgba(0,0,0,0.1); }
.cube__face--1  { transform: rotateY(  0deg) translateZ(32.5px); }
.cube__face--2  { transform: rotateY( 90deg) translateZ(32.5px); }
.cube__face--3  { transform: rotateY(180deg) translateZ(32.5px); }
.cube__face--4  { transform: rotateY(-90deg) translateZ(32.5px); }
.cube__face--5  { transform: rotateX( 90deg) translateZ(32.5px); }
.cube__face--6  { transform: rotateX(-90deg) translateZ(32.5px); }
.dot { width: 13px; height: 13px; background: #222; border-radius: 50%; position: absolute; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
/* Dots position */
.cube__face--1 .dot:nth-child(1) { top: 26px; left: 26px; }
.cube__face--2 .dot:nth-child(1) { top: 12px; left: 12px; } .cube__face--2 .dot:nth-child(2) { bottom: 12px; right: 12px; }
.cube__face--3 .dot:nth-child(1) { top: 12px; left: 12px; } .cube__face--3 .dot:nth-child(2) { top: 26px; left: 26px; } .cube__face--3 .dot:nth-child(3) { bottom: 12px; right: 12px; }
.cube__face--4 .dot:nth-child(1) { top: 12px; left: 12px; } .cube__face--4 .dot:nth-child(2) { top: 12px; right: 12px; } .cube__face--4 .dot:nth-child(3) { bottom: 12px; left: 12px; } .cube__face--4 .dot:nth-child(4) { bottom: 12px; right: 12px; }
.cube__face--5 .dot:nth-child(1) { top: 12px; left: 12px; } .cube__face--5 .dot:nth-child(2) { top: 12px; right: 12px; } .cube__face--5 .dot:nth-child(3) { bottom: 12px; left: 12px; } .cube__face--5 .dot:nth-child(4) { bottom: 12px; right: 12px; } .cube__face--5 .dot:nth-child(5) { top: 26px; left: 26px; }
.cube__face--6 .dot:nth-child(1) { top: 10px; left: 12px; } .cube__face--6 .dot:nth-child(2) { top: 10px; right: 12px; } .cube__face--6 .dot:nth-child(3) { top: 26px; left: 12px; } .cube__face--6 .dot:nth-child(4) { top: 26px; right: 12px; } .cube__face--6 .dot:nth-child(5) { bottom: 10px; left: 12px; } .cube__face--6 .dot:nth-child(6) { bottom: 10px; right: 12px; }

.lock-indicator { position: absolute; top: -45px; left: 50%; transform: translateX(-50%); font-size: 24px; display: none; z-index: 100; text-shadow: 0 4px 8px rgba(0,0,0,0.3); pointer-events: none; }
.scene.locked .lock-indicator { display: block; animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* ROUE */
.wheel-container { position: relative; width: 280px; height: 280px; margin: 0 auto 20px auto; }
#wheel-canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99); border: 4px solid var(--bg-card); }
.wheel-pointer { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 36px; color: #fff; z-index: 10; text-shadow: 0 3px 6px rgba(0,0,0,0.6); }
.name-tag { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 20px; font-size: 13px; color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
.name-tag:active { background: rgba(255, 68, 68, 0.1); border-color: #ff4444; }
.name-tag span { opacity: 0.5; font-size: 10px; }

/* CRÉDITS */
.credits-scroll { max-height: 50vh; overflow-y: auto; text-align: left; padding: 0 10px; margin-bottom: 15px; }
.credits-section { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.credits-section:last-child { border: none; }
.credits-section h4 { color: var(--text-main); margin: 0 0 12px 0; text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; opacity: 0.7; }
.credits-section p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.5; }
.dev-name { font-size: 20px !important; font-weight: 700; color: var(--highlight) !important; text-shadow: 0 0 15px rgba(0,0,0,0.2); letter-spacing: -0.5px; }
.credits-list { list-style: none; padding: 0; margin: 0; }
.credits-list li { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.credits-list strong { color: var(--text-main); font-weight: 600; }

/* ANIMATIONS & EASTER EGGS */
@keyframes coinJump { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-120px) scale(1.2); } 100% { transform: translateY(0) scale(1); } }
@keyframes shadowShrink { 0% { transform: scale(1); opacity: 0.4; } 40% { transform: scale(0.5); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.4; } }
@keyframes bounceIn { 0% { transform: translateX(-50%) scale(0); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes shakeHard { 0% { transform: translate(1px, 1px) rotate(0deg); } 10% { transform: translate(-3px, -2px) rotate(-1deg); } 20% { transform: translate(-3px, 0px) rotate(1deg); } 30% { transform: translate(3px, 2px) rotate(0deg); } 40% { transform: translate(1px, -1px) rotate(1deg); } 50% { transform: translate(-1px, 2px) rotate(-1deg); } 60% { transform: translate(-3px, 1px) rotate(0deg); } 70% { transform: translate(3px, 1px) rotate(-1deg); } 80% { transform: translate(-1px, -1px) rotate(1deg); } 90% { transform: translate(1px, 2px) rotate(0deg); } 100% { transform: translate(1px, -2px) rotate(-1deg); } }
.shake-screen { animation: shakeHard 0.5s; }
.money-bill { position: absolute; top: -50px; pointer-events: none; z-index: 9999; animation: moneyFall linear forwards; }
@keyframes moneyFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(110vh) rotate(360deg); opacity: 0; } }

/* Animation AFFOND */
@keyframes affondPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.4); opacity: 1; color: #ff0000; text-shadow: 0 0 20px red; }
    100% { transform: scale(1); opacity: 1; color: #ff4444; text-shadow: 0 0 10px red; }
}
.affond-anim {
    animation: affondPulse 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    font-size: 32px !important;
    font-weight: 900 !important;
    color: #ff4444 !important;
    letter-spacing: 2px;
}
#dice-message {
    height: 30px; margin-top: 20px; font-weight: bold; font-size: 20px; color: var(--highlight);
    text-shadow: 0 0 10px rgba(0,0,0,0.5); min-height: 30px;
}

/* --- FORCE PORTRAIT --- */
#landscape-warning {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 10000;
    flex-direction: column; justify-content: center; align-items: center;
    color: white; text-align: center;
}
@media screen and (orientation: landscape) { #landscape-warning { display: flex; } }
.rotate-icon { font-size: 50px; margin-bottom: 20px; animation: rotatePhone 2s infinite ease-in-out; }
@keyframes rotatePhone { 0% { transform: rotate(-90deg); } 50% { transform: rotate(0deg); } 100% { transform: rotate(-90deg); } }

/* --- FAUX APPEL iOS --- */
.fake-call-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; background: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ios-background-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 30%, #3a3a3a 0%, #1a1a1a 100%);
    filter: blur(40px); opacity: 0.9;
}
.ios-call-content {
    position: relative; z-index: 2; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 12vh 20px 8vh 20px; box-sizing: border-box;
    color: white; text-align: center;
}
.ios-top-section { display: flex; flex-direction: column; align-items: center; }
.ios-contact-name { font-size: 36px; font-weight: 500; letter-spacing: 0.5px; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.ios-contact-label { font-size: 18px; color: rgba(255, 255, 255, 0.6); margin-bottom: 0; }
.ios-contact-avatar {
    width: 100px; height: 100px; border-radius: 50%;
    background: #8e8e93; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.ios-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ios-bottom-section { width: 100%; max-width: 350px; margin: 0 auto; }
.ios-actions-grid { display: flex; justify-content: space-between; margin-bottom: 60px; padding: 0 10px; }
.ios-action-item { display: flex; flex-direction: column; align-items: center; opacity: 0; animation: fadeIn 1s forwards; animation-delay: 0.5s; }
.ios-small-btn { font-size: 20px; margin-bottom: 8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.ios-action-item span { font-size: 12px; color: rgba(255,255,255,0.9); }
.ios-answer-buttons { display: flex; justify-content: space-between; align-items: flex-start; }
.ios-big-btn-wrapper { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ios-big-btn-wrapper span { font-size: 14px; font-weight: 500; }
.ios-big-btn { width: 75px; height: 75px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; color: white; }
.ios-big-btn:active { transform: scale(0.9); filter: brightness(0.8); }
.ios-big-btn svg { width: 32px; height: 32px; fill: white; }
.decline { background: #eb4e3d; } .decline svg { transform: rotate(135deg); }
.accept { background: #30d158; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- THEME BILLIONAIRE (VIP) --- */
body.theme-billionaire { 
    --bg-body: radial-gradient(circle at 50% 30%, #1a1500 0%, #000 100%); 
    --bg-modal: #0f0c00;
    --bg-card: rgba(255, 215, 0, 0.08);
    --bg-input: #141000;
    --bg-session: #141000;
    --text-main: #fff; 
    --text-muted: #aa9950;
    --accent: #ffd700;      
    --highlight: #e5c100;   
    --border-color: rgba(255, 215, 0, 0.3);
    --border-focus: #ffd700;
    --shadow-card: 0 4px 15px rgba(255, 215, 0, 0.15);
    --shadow-neon: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* --- THEME NEON (VIP) --- */
body.theme-neon { 
    --bg-body: #050505; 
    --bg-modal: #0a0a0a;
    --bg-card: rgba(0, 243, 255, 0.05);
    --bg-input: #000;
    --bg-session: #0f0f0f;
    --text-main: #fff; 
    --text-muted: #008891;
    --accent: #00f3ff;      
    --highlight: #bc13fe;   
    --border-color: rgba(0, 243, 255, 0.4);
    --border-focus: #00f3ff;
    --shadow-card: 0 0 15px rgba(0, 243, 255, 0.15);
    --shadow-neon: 0 0 20px rgba(0, 243, 255, 0.4);
}
body.theme-neon .btn-full { border: 1px solid var(--border-color); box-shadow: 0 0 5px var(--border-color); }

/* --- BOUTON FERMER STICKY --- */
.close-sticky {
    position: sticky; top: -10px; float: right; margin-top: -15px; margin-right: -10px; margin-bottom: -30px;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(4px); border: 1px solid var(--border-color); border-radius: 50%;
    color: var(--text-muted); font-size: 18px; font-weight: bold; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100;
}
.close-sticky:active { transform: scale(0.9); background: var(--highlight); color: #000; }

/* --- WIDGET VIP FLOTTANT (CORRIGÉ) --- */
#vip-widget {
    position: fixed;
    /* On le remonte à 120px du bas pour ne pas toucher les boutons */
    bottom: 120px; 
    right: 20px;
    
    /* On met un z-index plus petit (95) pour qu'il reste DERRIÈRE les fenêtres (Modals) */
    z-index: 95; 
    
    background: #FFDD00; /* OR */
    color: #000;
    border: 2px solid #fff;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    padding: 10px 18px; /* Un tout petit peu plus compact */
    border-radius: 50px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: floatWidget 3s ease-in-out infinite;
}

#vip-widget:active {
    transform: scale(0.95);
}

@keyframes floatWidget {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* --- JEU DES DOIGTS --- */
.finger-circle {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 6px solid white;
    transform: translate(-50%, -50%) scale(0);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    opacity: 0.8;
    pointer-events: none; /* Important pour que le touch continue */
}

.finger-winner {
    background: white;
    border-color: #FFDD00;
    box-shadow: 0 0 50px #FFDD00;
    z-index: 100;
    animation: pulseWinner 0.5s infinite alternate;
}

@keyframes popIn { from { transform: translate(-50%, -50%) scale(0); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes pulseWinner { from { transform: translate(-50%, -50%) scale(1.1); } to { transform: translate(-50%, -50%) scale(1.3); } }

/* --- THEME ACID (VIP) --- */
body.theme-acid {
    --bg-color: #050505;       /* Noir quasi pur (très sombre) */
    --card-bg: #111111;        /* Gris très foncé pour les blocs */
    --text-main: #ffffff;      /* Blanc éclatant */
    --text-muted: #888888;
    --highlight: #ccff00;      /* LE FLUO : Un Vert/Jaune Acide */
    --border-color: #ccff00;   /* Bordures fluo fines */
    --bg-input: #1a1a1a;
    
    /* Pas de dégradé, juste du sombre pur pour le contraste */
    background: #050505;
}

/* La barre en haut reste noire pour se fondre */
body.theme-acid .status-bar-spacer {
    background-color: #050505 !important;
}

/* Le bouton flottant (+) devient Fluo */
body.theme-acid .fab {
    background: #ccff00;
    color: #000; /* Icône noire sur fond fluo */
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.4); /* Lueur fluo */
}

/* Les petits ajustements pour que ça claque */
body.theme-acid .total-big {
    color: #ccff00;
    text-shadow: 0 0 10px rgba(204, 255, 0, 0.3);
}

body.theme-acid .bar-badge {
    background: #ccff00;
    color: #000;
    border: none;
}