/* ==========================================================================
   1. VARIABLES & GLOBAL RESET
   ========================================================================== */
:root {
    /* Colors */
    --bg-main: #1c1c1f;
    --bg-card: #282830;
    --bg-input: #31313c;
    --text-main: #ffffff;
    --text-muted: #9e9eb1;
    --border-color: #424254;
    
    /* Brand Colors */
    --accent-blue: #5383e8;
    --accent-purple: #ff00ff;
    --accent-gold: #ffc107;
    --status-win: #5383e8;
    --status-loss: #e84057;

    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    margin: 0; 
    padding: 60px 20px 50px; /* Top padding for fixed banner */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

/* ==========================================================================
   2. TOP NAVIGATION BAR (GAME SELECTOR)
   ========================================================================== */
.main-header {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; 
    z-index: 1000;
}

.game-banner {
    height: 35px; 
    display: flex; 
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.game-item {
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: var(--transition-smooth); 
    position: relative; 
    overflow: hidden;
}

.game-label {
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 1px; 
    color: var(--text-muted); 
    z-index: 2;
}

/* Slanted Tabs Design */
.lol { background-color: #232328; clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%); margin-right: -1%; }
.tft { background-color: #1c1c21; clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%); }

.game-item:hover { flex: 1.2; z-index: 10; }
.game-item:hover .game-label { color: var(--bg-main); transform: scale(1.05); }
.game-item.lol:hover { background-color: #fbc531; }
.game-item.tft:hover { background-color: var(--accent-blue); }

/* Settings */
.language-switcher { 
    position: absolute; 
    top: 45px; 
    right: 20px; 
}

#lang-select {
    background-color: var(--bg-input); 
    color: var(--text-muted);
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    padding: 5px 8px; 
    cursor: pointer;
    outline: none;
}

#lang-select:hover { border-color: var(--accent-blue); color: var(--text-main); }

/* ==========================================================================
   3. HERO SECTION (LOGO & SEARCH)
   ========================================================================== */
.logo-container { text-align: center; margin: 40px 0; }
.logo-container h1 { font-size: 48px; font-weight: 800; margin: 0; letter-spacing: -1px; }
#fit-text {  transition: color 0.3s ease;}

.color-lol { color: #fbc531 !important; }      
.color-tft { color: #5383e8 !important; }      
.color-valorant { color: #ff4655 !important; }

.game-subtitle {
    margin-top: 5px; 
    font-size: 14px; 
    color: var(--text-muted);
    letter-spacing: 1px; 
    text-transform: uppercase;
}

/* Unified Search Bar */
.search-wrapper {
    display: flex; 
    align-items: center; 
    background-color: var(--bg-input);
    border-radius: 30px; 
    padding: 6px 20px; 
    width: 100%; 
    max-width: 800px; 
    margin-bottom: 25px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.search-wrapper:focus-within { border-color: var(--accent-blue); }

.region-select { background: transparent; border: none; color: var(--text-muted); cursor: pointer; outline: none; }
.divider { width: 1px; height: 20px; background-color: var(--border-color); margin: 0 15px; }
.search-input { flex: 1; background: transparent; border: none; color: var(--text-main); font-size: 15px; outline: none; }

/* ==========================================================================
   4. ACTION BUTTONS & CARDS
   ========================================================================== */
.quick-train-box, 
.about-section {
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: 12px; 
    width: 100%; 
    max-width: 800px; 
    padding: 20px; 
    text-align: center;
    cursor: pointer; 
    transition: var(--transition-smooth);
    margin-bottom: 30px;
}

.about-icon img{
    height: 10vh;
}

.about-container{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.quick-train-box:hover:not(.disabled-box),
.about-section:hover:not(.disabled-box) { 
    border-color: var(--accent-blue); 
    background-color: #2e2e38; 
    transform: translateY(-3px);
}

/* Disabled State */
.disabled-box {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
}

#loading { color: var(--text-muted); margin-bottom: 20px; font-weight: 500; }

/* ==========================================================================
   5. WORKOUT DASHBOARD
   ========================================================================== */
#workout-board {
    background-color: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: 12px; 
    padding: 30px; 
    width: 100%; 
    max-width: 600px; 
    text-align: center;
    position: relative; 
    overflow: hidden; 
    margin-bottom: 40px;
}

main{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* Champ Background Overlay */
#workout-board::before {
    content: ""; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--champ-bg); 
    background-size: cover; 
    background-position: center 25%;
    opacity: 0.15; 
    pointer-events: none; 
    transition: opacity 0.5s ease;
}

#workout-board > * { position: relative; z-index: 1; }

#game-status { font-size: 32px; font-weight: 800; margin-bottom: 5px; }
.status-win { color: var(--status-win); }
.status-loss { color: var(--status-loss); }
.stats-kda { color: var(--text-muted); margin-bottom: 25px; font-weight: 600; }

/* Exercises Grid */
.exercise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.exercise-item { 
    background: rgba(49, 49, 60, 0.7); 
    padding: 20px; 
    border-radius: 8px; 
    backdrop-filter: blur(4px); 
}
.ex-num { font-size: 32px; font-weight: 800; color: var(--text-main); }
.ex-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-top: 5px; font-weight: 700; }

/* Formula Disclaimer */
.workout-formula {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: var(--text-muted);
}
.workout-formula strong { color: var(--accent-blue); }

/* Fix pour l'image Duo (Fist Bump) */
.duo-emote-mini {
    width: 120px !important; /* Force la taille raisonnable */
    height: auto;
    margin-bottom: 10px;
}

.duo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 0, 255, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 0, 255, 0.2);
    margin-bottom: 20px;
}

.duo-title-group {
    text-align: center;
}

/* On s'assure que les stats Duo sont bien centrées */
.duo-grid {
    margin-top: 20px;
}

/* Style spécifique pour les exercices partagés */
.exercise-item.shared {
    border: 1px solid rgba(255, 0, 255, 0.3);
    background: rgba(40, 40, 55, 0.8);
}

/* ==========================================================================
   6. FEATURES GRID (MODES)
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 40px auto;
    width: 100%;
}

.feature-card {
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px 15px;
    transition: var(--transition-smooth);
    text-align: center;
}

.feature-card.action-box:not(.disabled-box):hover {
    transform: translateY(-5px);
}

/* Collateral (Duo) Mode Specific */
.collateral-box:hover:not(.disabled-box) {
    border-color: var(--accent-purple) !important;
    background: rgba(255, 0, 255, 0.05) !important;
    box-shadow: 0 10px 20px rgba(255, 0, 255, 0.1);
}

.feature-card.coming-soon { opacity: 0.5; cursor: default; }
.soon-badge {
    font-size: 9px;
    background: #444;
    padding: 2px 5px;
    border-radius: 3px;
    vertical-align: middle;
}

/* ==========================================================================
   7. MODALS & GLASSMORPHISM
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.onboarding-glass {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(83, 131, 232, 0.3);
    border-radius: 15px;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    color: white;
}

/* Custom Scrollbar for Glass Modal */
.onboarding-glass::-webkit-scrollbar { width: 6px; }
.onboarding-glass::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 10px; }

.close {
    position: absolute;
    right: 20px; top: 15px;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
}

.onboarding-header { text-align: center; margin-bottom: 30px; }
.header-icon { width: 120px; filter: drop-shadow(0 0 10px rgba(83, 131, 232, 0.3)); }

/* Roadmap Cards inside Modal */
.roadmap-card { display: flex; align-items: center; gap: 20px; padding: 15px 0; text-align: left;}
.card-visual img { width: 80px; height: 80px; object-fit: contain; }
.card-text h4 { margin: 0 0 5px; color: var(--accent-blue); }

.roadmap-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* ==========================================================================
   8. ADVICE SECTION & VISUALS
   ========================================================================== */
.advices-theme { border-color: rgba(255, 193, 7, 0.2); }

.advice-full-visual {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 20px 0;
    padding: 10px;
}

.advice-full-visual img { width: 100%; max-height: 250px; object-fit: contain; }

.cta-btn {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    background: linear-gradient(90deg, #00c8ff, #0072ff);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

/* ==========================================================================
   9. FOOTER & DISCLAIMER
   ========================================================================== */
.main-footer {
    margin-top: 60px;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 800px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.riot-disclaimer { line-height: 1.6; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.footer-links a { color: var(--accent-blue); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ==========================================================================
   10. RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .logo-container h1 { font-size: 36px; }
    .features-grid, .exercise-grid { grid-template-columns: 1fr; }
    .search-wrapper { flex-direction: column; border-radius: 20px; padding: 15px; }
    .divider { width: 100%; height: 1px; margin: 10px 0; }
    .onboarding-glass { padding: 25px; }
    .roadmap-card { flex-direction: column; text-align: center; }
}