:root { --couleur-fond: #121212; --couleur-texte: #ffffff; --couleur-theme: #00853F; --primary: #00C853; --secondary: #FDEF42; --danger: #E31B23; --dark: #111; --darker: #050505; --text: #fff; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial', 'Helvetica Neue', sans-serif; }
body { background-color: var(--couleur-fond); color: var(--couleur-texte); overflow-x: hidden; }

/* HEADER */
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: var(--dark); border-bottom: 2px solid #222; }
header h1 { color: var(--primary); font-family: 'Arial Black', sans-serif; font-size: 1.5rem; letter-spacing: 1px; }
nav { display: flex; align-items: center; }
nav a { color: #ccc; text-decoration: none; margin-left: 20px; font-weight: bold; transition: color 0.3s; }
nav a:hover { color: var(--primary); }
.nav-active { color: var(--primary) !important; }

/* ACCUEIL */
.theme-selector { padding: 40px 40px 20px 40px; display: flex; align-items: center; gap: 15px; }
.theme-selector label { font-weight: bold; font-size: 1.1rem; }
.theme-selector input[type="color"] { cursor: pointer; border: none; width: 40px; height: 40px; border-radius: 5px; background-color: transparent; }
.hero-banner { height: 60vh; background-color: #222; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; padding: 0 40px; border-bottom: 2px solid var(--couleur-theme); transition: border-color 0.3s; }
.hero-banner h2 { font-size: 3rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.hero-banner p { font-size: 1.2rem; max-width: 600px; margin-bottom: 20px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.category-row { padding: 30px 40px 10px 40px; }
.category-row h3 { margin-bottom: 15px; font-size: 1.4rem; border-left: 4px solid var(--couleur-theme); padding-left: 10px; transition: border-color 0.3s; }
.video-slider { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 20px; scroll-behavior: smooth; }
.video-slider::-webkit-scrollbar { display: none; }
.video-card { min-width: 250px; height: 140px; background-color: #2a2a2a; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; color: #888; border: 2px solid transparent; text-decoration: none; position: relative; overflow: hidden; padding: 0; }
.video-card:hover { transform: scale(1.08); z-index: 10; background-color: #333; color: var(--couleur-texte); border-color: var(--couleur-theme); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); }
.video-thumbnail { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.video-title-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 10px 10px 10px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); z-index: 2; text-align: left; color: white; font-weight: bold; font-size: 0.95rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.no-thumbnail-text { z-index: 2; padding: 10px; text-align: center; font-weight: bold; }
.empty-message { color: #888; font-style: italic; padding: 20px 0; }

/* AUTHENTIFICATION */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 20px; }
.auth-box { background-color: #222; padding: 40px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); text-align: center; width: 100%; max-width: 400px; border-top: 4px solid var(--couleur-theme); }
.auth-box input, .auth-box select { width: 100%; padding: 15px; margin: 10px 0; border: none; border-radius: 5px; background-color: #333; color: white; font-size: 1rem; }
.auth-box button { width: 100%; padding: 15px; background-color: var(--couleur-theme); color: white; border: none; border-radius: 5px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: opacity 0.3s; margin-top: 10px; }
.auth-box button:hover { opacity: 0.8; }
.erreur { color: var(--danger); margin-bottom: 15px; font-weight: bold; background: #111; padding: 10px; border-radius: 5px;}

/* DASHBOARD */
.dashboard-container { max-width: 900px; margin: 40px auto; padding: 0 20px; }
.welcome-msg { margin-bottom: 30px; }
.welcome-msg h2 { font-size: 2.2rem; margin-bottom: 5px; }
.welcome-msg p { color: #888; }
.dashboard-card { background: var(--dark); border: 1px solid #333; border-radius: 12px; padding: 25px; margin-bottom: 25px; }
.dashboard-card h3 { margin-bottom: 15px; color: var(--secondary); display: flex; align-items: center; gap: 10px; }
.dashboard-container select { width: 100%; padding: 12px; border-radius: 8px; background: #222; color: #fff; border: 1px solid #444; margin-bottom: 15px; font-size: 1rem; }
.btn-save { background: var(--primary); color: #000; font-weight: bold; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.btn-save:hover { background: #00e65c; transform: scale(0.98); }
.live-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }
.dashboard-card .live-card { background: #1a1a1a; border: 2px solid #333; border-radius: 12px; padding: 30px 20px; text-align: center; cursor: pointer; transition: 0.3s; text-decoration: none; display: block; color: white; }
.dashboard-card .live-card:hover { border-color: var(--secondary); transform: translateY(-5px); background: #222; }
.dashboard-card .live-card h4 { font-size: 1.4rem; margin-bottom: 10px; color: #fff; }
.dashboard-card .live-card p { font-size: 0.9rem; color: #aaa; }
.live-icon { font-size: 3rem; margin-bottom: 15px; }
#game-selection { display: none; margin-top: 20px; border-top: 1px solid #333; padding-top: 20px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
.game-btn { background: #222; border: 1px solid #444; border-radius: 8px; padding: 15px; text-align: center; text-decoration: none; color: white; font-weight: bold; transition: 0.2s; display: flex; flex-direction: column; gap: 8px; }
.game-btn:hover { background: #333; border-color: var(--primary); }
.game-btn.active-game { border-color: var(--primary); background: rgba(0, 200, 83, 0.1); }
.game-btn.disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.tools-list { list-style: none; }
.tools-list li { margin-bottom: 15px; }
.tools-list a { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: bold; transition: 0.2s; }
.tools-list a:hover { color: var(--primary); }
.btn-logout { background: var(--danger); color: white; text-decoration: none; padding: 12px 25px; border-radius: 8px; display: inline-block; font-weight: bold; margin-top: 10px; transition: 0.2s; border:none; cursor:pointer;}
.btn-logout:hover { background: #ff2a35; }

/* UPLOAD & EDIT */
.upload-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 40px 20px; }
.upload-box { background-color: #222; padding: 40px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); width: 100%; max-width: 600px; border-top: 4px solid var(--secondary); }
.upload-box input[type="text"], .upload-box select, .upload-box textarea { width: 100%; padding: 15px; margin: 10px 0; border: none; border-radius: 5px; background-color: #333; color: white; font-family: inherit; }
.upload-box textarea { resize: vertical; min-height: 120px; }
.upload-box button { width: 100%; padding: 15px; background-color: var(--secondary); color: #111; border: none; border-radius: 5px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: opacity 0.3s; margin-top: 20px; }
.upload-box button:hover { opacity: 0.8; }
.current-thumbnail { background-color: #1a1a1a; padding: 15px; border-radius: 5px; margin-bottom: 15px; text-align: center; border: 1px solid #444; }
.current-thumbnail img { max-width: 100%; max-height: 150px; border-radius: 5px; margin-top: 10px; }
.file-zone { background-color: #1a1a1a; border: 2px dashed #555; border-radius: 5px; padding: 15px; margin: 10px 0; transition: border-color 0.3s; }
.file-zone:hover { border-color: var(--secondary); }
.file-zone input[type="file"] { width: 100%; color: white; cursor: pointer; border: none; background: transparent; padding: 0; margin: 0; }

/* MANAGE & WATCH */
.manage-container { padding: 40px; max-width: 1200px; margin: 40px auto; }
.video-list { background-color: #222; border-radius: 10px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.video-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #444; }
.video-item:last-child { border-bottom: none; }
.manage-container .video-info h4 { margin-bottom: 5px; color: var(--primary); }
.manage-container .video-info p { font-size: 0.9rem; color: #aaa; }
.video-actions a { padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: bold; margin-left: 10px; font-size: 0.9rem; }
.btn-edit { background-color: var(--secondary); color: #111; }
.btn-delete { background-color: var(--danger); color: white; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.watch-container { padding: 40px; max-width: 1200px; margin: 40px auto; }
.video-player-wrapper { width: 100%; background-color: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.8); border: 2px solid var(--couleur-theme); }
.video-player-wrapper video { width: 100%; max-height: 70vh; outline: none; }
.watch-container .video-info { margin-top: 20px; background-color: #222; padding: 25px; border-radius: 10px; }
.video-title { font-size: 2rem; margin-bottom: 10px; color: var(--couleur-theme); }
.video-meta { color: #aaa; font-size: 1rem; margin-bottom: 20px; display: flex; gap: 20px; border-bottom: 1px solid #444; padding-bottom: 15px; }

/* FEED LIVES (Swipe) */
body.feed-page { background: #050505; color: white; font-family: 'Arial Black', sans-serif; margin: 0; text-align: center; }
.feed-page .live-card { background: linear-gradient(145deg, #111, #222); margin: 20px auto; padding: 25px; border-radius: 15px; width: 90%; max-width: 400px; cursor: pointer; border: 2px solid #444; transition: transform 0.2s, border-color 0.2s; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.feed-page .live-card:active { transform: scale(0.95); border-color: #FDEF42; }
.feed-page .badge { background: #E31B23; color: white; padding: 5px 12px; border-radius: 5px; font-weight: bold; font-size: 0.8rem; animation: pulse 1.5s infinite; display: inline-block; margin-bottom: 10px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(227, 27, 35, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(227, 27, 35, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 27, 35, 0); } }
.creator-name { font-size: 1.5rem; margin: 10px 0; color: #fff; }
.tap-to-join { font-size: 0.9rem; color: #888; font-family: Arial, sans-serif; }

/* ========================================================================= */
/* ARENA 3D (Full Screen)                                                    */
/* ========================================================================= */
body.arena-page { overflow: hidden; background-color: #050505; font-family: 'Arial Black', sans-serif; color: white; margin:0; padding:0;}
.arena-page * { -webkit-tap-highlight-color: transparent; }

/* BARRE SUPÉRIEURE ANTI-SUPERPOSITION */
.top-controls-bar { position: absolute; top: 10px; left: 0; width: 100%; display: flex; justify-content: space-between; padding: 0 10px; z-index: 1000; flex-wrap: wrap; gap: 5px; pointer-events: none; }
.top-controls-bar > * { pointer-events: auto; }
.host-controls { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.btn-game-top { background: rgba(0,0,0,0.8); color: white; border: 1px solid #444; padding: 6px 12px; border-radius: 8px; font-weight: bold; font-size: 0.8rem; cursor: pointer; text-decoration: none; }
.btn-game-top.quit { border-color: #888; }
.btn-game-top.bot { border-color: var(--danger); color: #ff5252; }
.btn-game-top.end { border-color: #FF9800; color: #FFD700; }

/* PLACEMENT DE L'INTERFACE HAUTE */
.battle-ui { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 95%; max-width: 500px; z-index: 10; }
.arena-page .progress-container { width: 100%; height: 12px; background: rgba(255,255,255,0.1); border-radius: 50px; border: 2px solid #fff; overflow: hidden; margin-bottom: 6px; }
#jauge-A { width: 0%; background: linear-gradient(90deg, var(--primary), #B2FF59); transition: width 0.3s ease; height: 100%; float: right; }
#jauge-B { width: 0%; background: linear-gradient(90deg, var(--danger), #FF5252); transition: width 0.3s ease; height: 100%; float: left; }
.score-board { display: flex; justify-content: space-between; margin-bottom: 8px; padding: 0 5px; }
.arena-page .player-info { display: flex; flex-direction: column; text-shadow: 2px 2px 4px #000; width: 48%;}
.player-name { font-size: 0.75rem; color: #fff; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.player-score { font-size: 1.2rem; font-weight: 900; color: var(--primary); transition: color 0.3s;}

#timer-container { position: absolute; top: 110px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; font-weight: bold; color: white; z-index: 10; text-shadow: 0 0 10px #000; }
#real-scoreboard { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); font-size: 2.5rem; font-weight: 900; color: white; background: rgba(0,0,0,0.8); padding: 5px 25px; border-radius: 20px; border: 2px solid #555; z-index: 10; box-shadow: 0 5px 15px rgba(0,0,0,0.5); white-space: nowrap; }
#level-indicator { position: absolute; top: 220px; left: 50%; transform: translateX(-50%); font-size: 1.1rem; font-weight: bold; color: var(--secondary); z-index: 10; text-shadow: 0 0 10px #000; text-align: center; width: 100%; white-space: nowrap; }

/* FIX DU TEXTE GÉANT POUR LE COMPTE À REBOURS */
#countdown { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: clamp(40px, 12vw, 100px); font-weight: 900; color: var(--primary); text-shadow: 0 0 30px #000; z-index: 20; pointer-events: none; white-space: nowrap; }

/* INTERFACE DUEL (TIR AU BUT) */
#duel-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 9999; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.duel-timer { font-size: 5rem; font-weight: 900; color: #FDEF42; text-shadow: 0 0 30px #FDEF42; margin: 15px 0; }
.duel-title { font-size: 2rem; color: white; text-transform: uppercase; font-weight: bold; text-align: center; margin-bottom: 15px; padding: 0 10px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 30px; width: 90%; max-width: 400px; }
.btn-choice { padding: 15px; border: 2px solid white; background: rgba(255,255,255,0.1); color: white; font-weight: bold; cursor: pointer; border-radius: 10px; transition: 0.3s; font-size: 1.1rem; }
.btn-choice:hover, .btn-choice.selected { background: #00C853; color: black; border-color: #00C853; box-shadow: 0 0 15px #00C853; }
.btn-panenka { border-color: #FDEF42; color: #FDEF42; }
.btn-panenka:hover, .btn-panenka.selected { background: #FDEF42; color: black; }

/* MODALES */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 5000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.profile-card { background: #1a1a1a; padding: 20px; border-radius: 15px; text-align: center; border: 1px solid var(--primary); width: 300px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.profile-card .close-btn { position: absolute; top: 10px; right: 15px; cursor: pointer; font-size: 1.5rem; color: #888; transition: 0.3s; }
.profile-card .close-btn:hover { color: white; }
.profile-card img { width: 90px; height: 90px; border-radius: 50%; border: 3px solid #00C853; object-fit: cover; margin-bottom: 10px; background: #333; }
.profile-card h3 { margin: 0 0 15px 0; font-size: 1.4rem; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.profile-card .btn-group { display: flex; gap: 10px; justify-content: center; }
.profile-card button { padding: 10px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; flex: 1; font-size: 0.95rem; }
.profile-card .btn-profil { background: #333; color: white; }
.profile-card .btn-profil:hover { background: #555; }
.profile-card .btn-mention { background: #00C853; color: black; }

/* TCHAT, WALLET, LEADERBOARD */
#chat-container { position: absolute; bottom: 85px; left: 10px; width: 65%; max-width: 300px; height: 180px; display: flex; flex-direction: column; z-index: 15; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0)); border-radius: 10px; overflow: hidden; pointer-events: auto; }
#chat-messages { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; }
#chat-messages::-webkit-scrollbar { display: none; }
.chat-msg { font-size: 0.85rem; color: #fff; text-shadow: 1px 1px 2px #000; animation: slideIn 0.3s ease; line-height: 1.3; text-align: left;}
.chat-msg span.pseudo { font-weight: bold; color: #aaa; cursor: pointer; transition: color 0.2s; }
.chat-msg span.pseudo:hover { color: #00C853; text-decoration: underline; }
.chat-msg.gift { color: #FFD700; font-weight: bold; text-align: center; background: rgba(255,215,0,0.2); padding: 6px; border-radius: 8px; border: 1px solid rgba(255,215,0,0.5); margin: 4px 0; box-shadow: 0 0 10px rgba(255,215,0,0.3);}
#chat-input-wrapper { display: flex; background: rgba(0,0,0,0.7); padding: 6px; border-top: 1px solid rgba(255,255,255,0.1); border-radius: 20px; margin: 0 5px 5px 5px;}
#chatInput { flex: 1; background: transparent; border: none; color: white; padding: 4px 8px; outline: none; font-size: 0.85rem; }
#chatSendBtn { background: var(--primary); border: none; padding: 5px 12px; border-radius: 15px; color: black; font-weight: bold; cursor: pointer; font-size: 0.8rem;}

#wallet-container { position: absolute; bottom: 85px; right: 10px; background: rgba(0,0,0,0.8); padding: 6px 15px; border-radius: 20px; color: #FFD700; font-weight: bold; z-index: 15; border: 1px solid #FFD700; font-size: 0.8rem; transition: transform 0.2s, background 0.2s;}
#leaderboard-container { position: absolute; top: 130px; left: 10px; width: 170px; background: rgba(0,0,0,0.7); border-radius: 10px; border: 1px solid #FFD700; color: white; z-index: 15; padding: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); text-align: left; }
.lb-title { text-align: center; color: #FFD700; font-size: 0.75rem; font-weight: bold; margin-bottom: 8px; text-transform: uppercase; }
.lb-item { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 4px; }
.lb-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.lb-rank-0 { color: #FFD700; font-weight: bold; }
.lb-rank-1 { color: #E0E0E0; font-weight: bold; }
.lb-rank-2 { color: #CD7F32; font-weight: bold; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* CONTRÔLES DU BAS (Masqués par défaut pour la synchro) */
.controls-wrapper { display: none; position: absolute; bottom: 15px; left: 0; width: 100%; justify-content: space-between; align-items: center; padding: 0 10px; z-index: 100; gap: 10px; }
.tap-zone { flex: 1; max-width: 150px; }
.btn-tap { width: 100%; padding: 12px; font-size: 1.1rem; border: none; border-radius: 12px; cursor: pointer; font-weight: 900; background: #fff; color: #000; box-shadow: 0 4px 0 #ccc; text-transform: uppercase; transition: transform 0.1s; }
.btn-tap:active { box-shadow: 0 0 0 #ccc; transform: translateY(4px); }
.gifts-zone { display: flex; gap: 8px; flex: 2; justify-content: flex-end; }
.btn-gift { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; border: none; cursor: pointer; transition: transform 0.1s; font-weight: bold; width: 55px; height: 55px; }
.btn-gift:active { transform: scale(0.85); }
.btn-gift span { font-size: 0.65rem; margin-top: 2px; }
.gift-rose { background: linear-gradient(45deg, #ff9a9e, #ff1493); color: white; box-shadow: 0 4px 10px rgba(255, 20, 147, 0.4);}
.gift-diamant { background: linear-gradient(45deg, #00ffff, #0000ff); color: white; box-shadow: 0 4px 10px rgba(0, 255, 255, 0.4);}
.gift-couronne { background: linear-gradient(45deg, #ffd700, #ff8c00); color: black; box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);}

/* DECOUVERTE (Format TikTok) */
body.decouverte-page { width: 100%; height: 100%; background-color: #000; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; overflow: hidden; margin:0; padding:0; }
.btn-retour { position: absolute; top: 20px; left: 20px; color: white; text-decoration: none; font-size: 1.5rem; font-weight: bold; z-index: 100; text-shadow: 1px 1px 5px rgba(0,0,0,0.8); }
.tiktok-feed { width: 100%; height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth; }
.tiktok-feed::-webkit-scrollbar { display: none; }
.video-container { width: 100%; height: 100vh; scroll-snap-align: start; position: relative; display: flex; justify-content: center; align-items: center; background-color: #111; }
.video-player { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.decouverte-page .video-info { position: absolute; bottom: 30px; left: 20px; color: white; z-index: 10; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); max-width: 70%; margin-top:0; background: transparent; padding: 0; border: none;}
.decouverte-page .video-info h3 { margin-bottom: 5px; font-size: 1.2rem; color: #fff;}
.decouverte-page .video-info p { font-size: 0.9rem; margin-bottom: 5px; color: #fff;}
.category-tag { display: inline-block; background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 10px; font-size: 0.8rem; }
.video-actions { position: absolute; bottom: 40px; right: 15px; display: flex; flex-direction: column; gap: 20px; z-index: 10; }
.action-btn { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.action-btn span { font-size: 0.8rem; font-weight: bold; }

/* PAGE PROFIL (SOCIAL) */
.profile-header { background: linear-gradient(to bottom, #222, #111); padding: 50px 20px 30px 20px; text-align: center; border-bottom: 3px solid var(--primary); position: relative; }
.profile-header img { width: 130px; height: 130px; border-radius: 50%; border: 4px solid var(--primary); object-fit: cover; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(0,200,83,0.4); background: #333; }
.profile-header h2 { font-size: 2.5rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; }
.profile-stats { display: flex; justify-content: center; gap: 40px; margin-top: 20px; color: #aaa; }
.stat-item { text-align: center; display: flex; flex-direction: column; gap: 5px; }
.stat-item span { font-size: 1.8rem; color: white; font-weight: 900; }
.profile-content { max-width: 1200px; margin: 40px auto; padding: 0 20px; min-height: 40vh; }
.tabs { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; border-bottom: 2px solid #333; padding-bottom: 0; }
.tab { background: none; border: none; color: #888; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: 0.3s; padding: 15px 25px; border-bottom: 3px solid transparent; }
.tab:hover { color: white; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.profile-content .video-card { min-width: unset; width: 100%; height: 250px; }
.profile-content .video-thumbnail { width: 100%; height: 100%; object-fit: cover; }

/* PAGE PARAMÈTRES */
.m-0 { margin: 0; }
.link-back { color: #888; text-decoration: none; }
.link-back:hover { color: var(--primary); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.settings-form label { display: block; margin-top: 15px; margin-bottom: 5px; color: #888; font-size: 0.9rem; }
.settings-form input[type="text"], .settings-form input[type="password"], .settings-form textarea { width: 100%; background: #1a1a1a; border: 1px solid #333; color: white; padding: 12px; border-radius: 8px; }
.avatar-upload-zone { text-align: center; margin-bottom: 20px; }
.avatar-preview { width: 100px; height: 100px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.avatar-label { cursor: pointer; color: var(--primary); font-size: 0.8rem; display: inline-block; margin-top: 10px; }
.d-none { display: none !important; }
.btn-save { width: 100%; margin-top: 20px; padding: 12px; background: var(--primary); border: none; border-radius: 8px; font-weight: bold; cursor: pointer; color: black; transition: 0.2s; }
.btn-save:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn-dark { background: #333; color: white; }
.msg-success { background: rgba(0, 200, 83, 0.2); color: var(--primary); padding: 15px; border-radius: 10px; border: 1px solid var(--primary); margin-bottom: 15px; }
.msg-error { background: rgba(227, 27, 35, 0.2); color: var(--danger); padding: 15px; border-radius: 10px; border: 1px solid var(--danger); margin-bottom: 15px; }
.danger-zone { margin-top: 30px; padding: 15px; background: rgba(227, 27, 35, 0.1); border: 1px solid var(--danger); border-radius: 10px; }
.danger-zone h4 { color: var(--danger); margin-bottom: 10px; }
.danger-zone p { font-size: 0.8rem; color: #888; margin-bottom: 15px; }
.btn-danger-outline { background: none; border: 1px solid var(--danger); color: var(--danger); padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-danger-outline:hover { background: var(--danger); color: white; }
.btn-edit-profile { display: inline-block; margin-top: 15px; padding: 8px 20px; background-color: transparent; color: var(--primary); border: 1px solid var(--primary); border-radius: 20px; text-decoration: none; font-weight: bold; font-size: 0.9rem; transition: all 0.3s ease; }
.btn-edit-profile:hover { background-color: var(--primary); color: #000; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 200, 83, 0.4); }

/* ========================================================================================= */
/* 🚨 FIX RESPONSIVE MOBILE POUR LES ARÈNES (FOOT, COURSE, BOXE)                             */
/* ========================================================================================= */
@media (max-width: 768px) {
    /* Header général */
    header { flex-direction: row; height: 60px; padding: 0 10px !important; flex-wrap: nowrap; overflow: hidden; gap: 5px; justify-content: space-between; align-items: center;} 
    header h1 { font-size: 1.1rem; white-space: nowrap; margin: 0; } 
    nav { display: flex; flex-direction: row; align-items: center; gap: 5px; flex-wrap: nowrap; } 
    nav a { margin-left: 0; font-size: 0.85rem; padding: 5px; } 

    /* UI Bataille (Jauges et Noms) */
    .battle-ui { top: 50px; width: 90%; margin-left: 10px; }
    .player-name { font-size: 0.6rem; }
    .player-score { font-size: 1.1rem; }

    /* Décalage vertical strict pour ne plus rien superposer */
    #timer-container { top: 90px; font-size: 1.2rem; }
    #leaderboard-container { top: 120px; left: 5px; width: 120px; padding: 5px; font-size: 0.7rem;}
    .lb-title { font-size: 0.65rem; }
    .lb-item { font-size: 0.7rem; }
    
    #real-scoreboard { top: 120px; font-size: 2rem; padding: 5px 15px; }
    #level-indicator { top: 170px; font-size: 0.9rem; }
    
    /* Conteneurs du bas (Chat, Wallet, Contrôles) */
    #chat-container { width: 60%; height: 150px; bottom: 80px; left: 5px; }
    .chat-msg { font-size: 0.75rem; }
    #chatInput { font-size: 0.75rem; padding: 2px 5px; }
    #chatSendBtn { font-size: 0.7rem; padding: 4px 8px; }

    #wallet-container { bottom: 80px; right: 5px; font-size: 0.8rem; padding: 4px 10px; }

    .controls-wrapper { padding: 0 5px; gap: 5px; bottom: 10px;}
    .tap-zone { max-width: 90px; }
    .btn-tap { padding: 10px; font-size: 0.9rem; }
    .btn-gift { width: 45px; height: 45px; padding: 5px; }
    .btn-gift span { font-size: 0.6rem; margin-top: 0; }
    
    .duel-title { font-size: 1.5rem; }
    .duel-timer { font-size: 4rem; }
    .studio-main {
        height: 100%!important;
    }
}