* { 
    box-sizing: border-box; 
}
body { 
    background-color: #10141b; 
    color: #c7d5e0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding-top: 80px; 
}

/* =========================================
   1. HEADER (EN-TÊTE)
   ========================================= */
.top-bar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 70px; 
    background: #0d1219; 
    display: flex; 
    justify-content: center; 
    z-index: 1000; 
    border-bottom: 1px solid #1a2531; 
}
.top-bar-inner { 
    width: 100%; 
    max-width: 1400px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
}
.logo { 
    font-size: 1.4em; 
    color: #ffffff; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-decoration: none; 
}
.top-actions { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

/* Boutons de connexion/déconnexion Steam */
.btn-steam-login { 
    transition: 0.2s; 
}
.btn-steam-login:hover { 
    opacity: 0.8; 
}
.btn-steam-logout { 
    background: #2a3f54; 
    color: white; 
    padding: 8px 15px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: 0.2s; 
}
.btn-steam-logout:hover { 
    background: #ff6b6b; 
}

/* =========================================
   2. CONTENEUR PRINCIPAL & MESSAGES
   ========================================= */
.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
    text-align: center; 
}
.error { 
    color: #ff6b6b; 
    font-weight: bold; 
    background: #2c1414; 
    padding: 15px; 
    border-radius: 5px; 
    border: 1px solid #ff6b6b; 
    margin-bottom: 20px; 
}

/* =========================================
   3. GRILLE D'AMIS ET FAVORIS (Étape 2)
   ========================================= */
.friends-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 10px; 
    background: #17202d; 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    text-align: left; 
}
.friend-item { 
    display: flex; 
    align-items: center; 
    background: #2a3f54; 
    padding: 10px; 
    border-radius: 5px; 
    cursor: pointer; 
    border: 1px solid transparent; 
}
.friend-item.is-favorite { 
    background: #1c2e40; 
    border: 1px solid #e1b12c; 
}
.fav-star { 
    margin-right: 10px; 
    cursor: pointer; 
    color: #8f98a0; 
    font-size: 1.2em; 
    user-select: none; 
}
.is-favorite .fav-star { 
    color: #e1b12c; 
}
.friend-item img { 
    width: 32px; 
    height: 32px; 
    border-radius: 4px; 
    margin-right: 10px; 
}
.btn-large { 
    padding: 15px 30px; 
    font-size: 1.1em; 
    background: #66c0f4; 
    border: none; 
    color: #0d1219; 
    font-weight: bold; 
    cursor: pointer; 
    border-radius: 4px; 
    transition: 0.2s;
}
.btn-large:hover {
    background: #4ca8e0;
}

/* =========================================
   4. ZONE DE PARTAGE & FILTRES (Étape 3)
   ========================================= */
.share-box { 
    background: #17202d; 
    padding: 15px; 
    margin-bottom: 20px; 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
    border-radius: 8px; 
}
.share-box input { 
    width: 350px; 
    padding: 10px; 
    background: #0d1219; 
    color: #66c0f4; 
    border: 1px solid #2a3f54; 
    border-radius: 4px; 
}
.btn-copy { 
    background: #2a3f54; 
    border: none; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s;
}
.btn-copy:hover {
    background: #3d5a72;
}

/* Menu Déroulant des Filtres */
.filters-container { 
    background: #17202d; 
    padding: 15px 20px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border: 1px solid #1a2531; 
    text-align: left; 
    min-height: 60px; 
}
.filter-label { 
    color: #8f98a0; 
    font-weight: bold; 
}
.filter-dropdown { 
    background: #0e141d; 
    color: white; 
    border: 1px solid #2a3f54; 
    padding: 10px 15px; 
    border-radius: 6px; 
    font-size: 1em; 
    cursor: pointer; 
    outline: none; 
    min-width: 200px; 
    font-family: inherit; 
    transition: 0.2s;
}
.filter-dropdown:focus { 
    border-color: #66c0f4; 
}
.filter-dropdown:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* =========================================
   5. ACCORDÉONS (Catégories de joueurs)
   ========================================= */
.accordion-header { 
    padding: 12px 20px; 
    margin-top: 15px; 
    border-radius: 6px; 
    cursor: pointer; 
    display: flex; 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: bold; 
    transition: 0.2s; 
    user-select: none; 
}
.main-accordion { 
    background: #1a2531; 
    border-left: 4px solid #66c0f4; 
}
.main-accordion:hover { 
    background: #2a3f54; 
}
.sub-accordion { 
    background: #17202d; 
    border-left: 4px solid #e1b12c; 
    margin-top: 10px; 
    margin-bottom: 10px; 
    padding: 10px 15px; 
    font-size: 0.95em; 
    border: 1px solid #1a2531; 
}
.sub-accordion:hover { 
    background: #1c2e40; 
}
.accordion-header .chevron { 
    transition: transform 0.3s; 
    font-size: 0.8em; 
    color: #8f98a0; 
    margin-left: auto; 
}
.accordion-header.collapsed .chevron { 
    transform: rotate(-90deg); 
}
.header-left { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.game-count { 
    color: #8f98a0; 
    font-weight: normal; 
    font-size: 0.9em; 
}
.sub-header-avatar { 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    border: 2px solid #0d1219; 
    margin-left: -10px; 
}
.sub-header-avatar:first-child { 
    margin-left: 0; 
}
.accordion-content { 
    overflow: hidden; 
    padding-left: 5px; 
}

/* =========================================
   6. CARTES DE JEUX (Vignettes)
   ========================================= */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
    margin-top: 10px; 
    margin-bottom: 15px; 
}
.game-card { 
    background: #17202d; 
    padding: 10px; 
    border-radius: 8px; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    transition: 0.2s; 
    border: 1px solid #1a2531; 
}
.game-card:hover { 
    transform: translateY(-3px); 
    border: 1px solid #66c0f4; 
}
.game-card img.capsule { 
    width: 100%; 
    border-radius: 4px; 
    margin-bottom: 8px; 
}
.owners { 
    display: flex; 
    justify-content: center; 
    margin-top: auto; 
    padding-top: 8px; 
    border-top: 1px solid #2a3f54; 
}
.owners img { 
    width: 25px; 
    height: 25px; 
    border-radius: 50%; 
    border: 2px solid #17202d; 
    margin-left: -8px; 
}
.owners img:first-child { 
    margin-left: 0; 
}

/* =========================================
   7. FENÊTRE MODALE (Popup Infos Jeu)
   ========================================= */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(13, 18, 25, 0.9); 
    backdrop-filter: blur(5px); 
    align-items: center; 
    justify-content: center; 
}
.modal-content { 
    background: #17202d; 
    padding: 20px; 
    border-radius: 8px; 
    max-width: 650px; 
    width: 90%; 
    position: relative; 
    max-height: 90vh; 
    overflow-y: auto; 
    color: white; 
    border: 1px solid #2a3f54; 
}
.close-btn { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    font-size: 24px; 
    cursor: pointer; 
    color: #8f98a0; 
    background: rgba(0,0,0,0.5); 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.close-btn:hover { 
    color: #ffffff; 
    background: #ff6b6b; 
}
.game-desc { 
    text-align: left; 
    background: #0d1219; 
    padding: 12px; 
    border-radius: 4px; 
    font-size: 0.9em; 
    margin: 15px 0; 
    line-height: 1.5; 
}
.tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px; 
    margin-top: 10px; 
}
.tag { 
    background: #2a3f54; 
    padding: 3px 8px; 
    border-radius: 3px; 
    font-size: 0.8em; 
    font-weight: bold; 
}
.highlight-tags .tag { 
    background: #66c0f4; 
    color: #0d1219; 
}
.media-gallery { 
    display: flex; 
    gap: 8px; 
    overflow-x: auto; 
    padding-bottom: 10px; 
}
.media-gallery img { 
    width: 220px; 
    border-radius: 4px; 
    flex-shrink: 0; 
}
.steam-btn { 
    display: inline-block; 
    background: linear-gradient(90deg, #1b2838 0%, #2a3f54 100%); 
    color: white; 
    padding: 10px 20px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: bold; 
    border: 1px solid #66c0f4; 
    transition: 0.2s; 
}
.steam-btn:hover { 
    background: #66c0f4; 
    color: #0d1219; 
}

/* =========================================
   8. ANIMATIONS & LOADERS
   ========================================= */
.loader { 
    border: 3px solid #2a3f54; 
    border-top: 3px solid #66c0f4; 
    border-radius: 50%; 
    width: 16px; 
    height: 16px; 
    animation: spin 1s linear infinite; 
    display: inline-block; 
    margin-right: 10px; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}