/* === compte.css — design neon violet, mise en page originale === */

#conteneur-compte {
    width: 686px;
    margin: 0 auto;
    background: #f0f0f0;
    border: 2px solid var(--neon);
    border-top: none;
    box-shadow: 0 0 15px var(--neon), 0 0 30px rgba(var(--neon-rgb),0.2);
    box-sizing: border-box;
}

/* ===== Onglets texte neon ===== */
#compte-onglets {
    display: flex;
    justify-content: stretch;
    border-top: 2px solid var(--neon);
    border-bottom: 2px solid var(--neon);
    background: #f0f0f0;
}
.compte-onglet-btn {
    flex: 1;
    padding: 10px 2px;
    background: transparent;
    color: #333;
    border: none;
    border-right: 1px solid rgba(var(--neon-rgb),0.3);
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s;
}
.compte-onglet-btn:last-child { border-right: none; }
.compte-onglet-btn:hover  { background: var(--neon); color: var(--on-neon, #000); }
.compte-onglet-btn.active { background: var(--neon); color: var(--on-neon, #000); }

/* ===== Zone de contenu ===== */
#contenu-onglet { background: white; }

/* ===== ONGLET ÉQUIPE — 2 colonnes ===== */
#onglet-equipe { min-height: 220px; }

#compte-equipe-layout { display: flex; width: 100%; }

#compte-equipe-gauche {
    width: 210px;
    flex-shrink: 0;
    border-right: 2px solid var(--neon);
    background: #f8f5ff;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
#compte-equipe-gauche-titre {
    font-size: 14px;
    font-weight: 900;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(var(--neon-rgb),0.3);
    width: 100%;
}
#compte-pokeball-cadre {
    width: 76px; height: 76px;
    border: 2px solid var(--neon);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px rgba(var(--neon-rgb),0.4);
    overflow: hidden;
    transition: all 0.3s;
}
#compte-pokeball-cadre:hover { box-shadow: 0 0 20px var(--neon); transform: scale(1.05); }
#info-dresseur {
    border: 2px solid var(--neon);
    border-radius: 12px;
    padding: 8px;
    font-size: 11px;
    color: #333;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 0 6px rgba(var(--neon-rgb),0.15);
    line-height: 1.7;
}

#compte-equipe-cartes {
    flex: 1;
    padding: 12px;
    background: white;
    display: flex;
    align-items: center;
}
#compte-equipe-cartes-cadre {
    width: 100%;
    border: 2px solid var(--neon);
    border-radius: 12px;
    padding: 10px;
    background: #f8f5ff;
    box-shadow: 0 0 12px rgba(var(--neon-rgb),0.15);
}
#liste-equipe.ac-equipe-cartes {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
}

/* Cartes équipe : fond teinté par le thème choisi (--neon-rgb) */
#liste-equipe .ac-pkm-carte {
    background: rgba(var(--neon-rgb), 0.14);
    border-color: rgba(var(--neon-rgb), 0.38);
    box-shadow: 0 2px 8px rgba(var(--neon-rgb), 0.16);
}
#liste-equipe .ac-pkm-carte .ac-carte-nom {
    color: var(--neon-deep);
}
#liste-equipe .ac-pkm-carte .ac-carte-niv {
    color: #555;
}
@media (hover: hover) and (pointer: fine) {
    #liste-equipe .ac-pkm-carte:hover {
        background: rgba(var(--neon-rgb), 0.22);
        border-color: rgba(var(--neon-rgb), 0.55);
        box-shadow: 0 6px 16px rgba(var(--neon-rgb), 0.28);
    }
    #liste-equipe .ac-pkm-carte:hover .ac-carte-nom,
    #liste-equipe .ac-pkm-carte:hover .ac-carte-nom-txt,
    #liste-equipe .ac-pkm-carte:hover .ac-carte-niv {
        color: var(--neon-deep);
    }
}

/* ===== STOCKAGE ===== */
.stockage-panel { padding: 16px; }
.stockage-liste-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-top: 1px solid rgba(var(--neon-rgb), 0.3);
    padding: 10px 8px 14px 8px;
}
.stockage-liste {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    align-content: flex-start;
    justify-items: stretch;
}
/* Grille aperçu équipe (onglet stockage) — hauteur fixe, pas de nom */
#stockage-icones-equipe.stockage-equipe-grille {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
    border: 2px solid var(--neon);
    border-radius: 10px;
    background: #f8f5ff;
}

.stockage-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px 3px;
    text-align: center;
    transition: all 0.25s;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.stockage-item:hover { transform: translateY(-2px); box-shadow: 0 0 10px rgba(var(--neon-rgb),0.3); border-color: var(--neon); }
.stockage-item .stockage-item-sprite img,
.stockage-item img { width: 50px; height: 50px; object-fit: contain; cursor: pointer; }

/* Grille stockage (#stockage-liste) : même logique que équipe (cadre, pieds en bas, scale stock) */
#stockage-liste .stockage-item-sprite {
    position: relative;
    width: 50px;
    height: 60px;
    margin: 0 auto;
    flex-shrink: 0;
    overflow: visible;
}
#stockage-liste .stockage-item-sprite-inner {
    width: 50px;
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
#stockage-liste .stockage-item-sprite img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    object-position: center bottom;
    image-rendering: pixelated;
    flex-shrink: 0;
}
#stockage-liste .stockage-item-sprite img.pokemon-sprite--404[data-sprite-scale],
#stockage-liste .stockage-item-sprite img[data-sprite-scale] {
    transform: translateY(var(--pkm-sprite-offset-y, 0)) scale(var(--pkm-sprite-scale, 1));
    transform-origin: center bottom;
}
/* Clone : compensation transparence. Lumineux / Obscure : taille PNG normale. */
.stockage-item .stockage-item-sprite img.pokemon-sprite--forme-alt,
.stockage-item img.pokemon-sprite--forme-alt {
    object-position: center bottom;
    transform: scale(1.32);
    transform-origin: center bottom;
}
#stockage-icones-equipe.stockage-equipe-grille img.pokemon-sprite--forme-alt {
    object-position: center bottom;
    transform: scale(1.32);
    transform-origin: center bottom;
}
#relache-liste img.pokemon-sprite--forme-alt {
    object-position: center bottom;
    transform: scale(1.32);
    transform-origin: center bottom;
}
/* Même correction que profil.css (padding sprite très variable). */
.stockage-item .stockage-item-sprite img.pokemon-sprite--lumiere,
.stockage-item img.pokemon-sprite--lumiere,
#stockage-icones-equipe.stockage-equipe-grille img.pokemon-sprite--lumiere,
#relache-liste img.pokemon-sprite--lumiere {
    transform: none;
    transform-origin: center bottom;
}
.stockage-item .stockage-item-sprite img.pokemon-sprite--obscure,
.stockage-item img.pokemon-sprite--obscure,
#stockage-icones-equipe.stockage-equipe-grille img.pokemon-sprite--obscure,
#relache-liste img.pokemon-sprite--obscure {
    transform: scale(var(--pkm-sprite-scale, 1.38));
    transform-origin: center bottom;
}
#stockage-icones-equipe.stockage-equipe-grille img.pokemon-sprite--404[data-sprite-scale],
#relache-liste img.pokemon-sprite--404[data-sprite-scale],
#popup-sprite-cadre .cardSprite.pokemon-sprite--404[data-sprite-scale] {
    transform: translateY(var(--pkm-sprite-offset-y, 0)) scale(var(--pkm-sprite-scale, 1));
    transform-origin: center bottom;
}
.stockage-item input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.stockage-item label { color: #2c3e50; font-size: 9px; cursor: pointer; }
/* Favori (étoile) — coin haut-droit de la carte PKM stockage */
.stockage-item-sprite { overflow: visible; }
.stock-fav-star {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0 0 0 10px;
    background: rgba(0,0,0,0.28);
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    line-height: 22px;
    cursor: pointer;
    z-index: 6;
    transition: color 0.15s, background 0.15s;
}
.stock-fav-star:hover { background: rgba(0,0,0,0.45); color: #fff; }
.stock-fav-star.on {
    color: #ffd700;
    text-shadow: 0 0 4px rgba(255, 200, 0, 0.9);
    background: rgba(40, 20, 0, 0.55);
}
/* Retrait rapide équipe (aperçu VOTRE ÉQUIPE dans Stockage) */
.stock-btn-retirer-equipe {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    padding: 0;
    line-height: 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.92);
    color: #fff;
    cursor: pointer;
    z-index: 7;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.stock-btn-retirer-equipe:hover { background: #c0392b; }
/* Retrait rapide onglet Équipe (grandes cartes) */
.ac-btn-retirer-equipe {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 22px;
    font-size: 17px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.92);
    color: #fff;
    cursor: pointer;
    z-index: 8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.ac-btn-retirer-equipe:hover { background: #c0392b; }
.stockage-icones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.stockage-icones img { height: 28px; cursor: pointer; border: none; }

/* ===== INVENTAIRE ===== */
.objet-item { float:left; width:54px; cursor:pointer; margin:4px; text-align:center; border:2px solid transparent; border-radius:8px; padding:4px; transition:all 0.2s; }
.objet-item:hover { border-color:var(--neon); box-shadow:0 0 8px rgba(var(--neon-rgb),0.3); }
.objet-item img { border:none; width:38px; height:38px; object-fit:contain; }
.objet-item span { font-size:10px; display:block; color:#555; margin-top:2px; }
.clear { clear:both; }

/* ===== POPUP PKM — style neon ===== */
#popup-overlay {
    display: none; position: fixed; top:0; left:0;
    width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10001;
}
#popup-pokemon {
    display: none; position: fixed; top:50%; left:50%;
    transform: translate(-50%,-50%); z-index:10002;
    width: 560px;
    background: #f0f0f0;
    border: 2px solid var(--neon);
    border-radius: 16px;
    box-shadow: 0 0 30px var(--neon), 0 0 60px rgba(var(--neon-rgb),0.3);
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Header popup */
#popup-header {
    background: #f0f0f0;
    border-bottom: 2px solid var(--neon);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#popup-header-titre {
    font-size: 13px; font-weight: bold;
    color: #333; text-transform: uppercase; letter-spacing: 1px;
}
#popup-close-btn {
    background: transparent; border: 2px solid var(--neon);
    border-radius: 50%; width: 26px; height: 26px;
    color: var(--neon); font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-weight: bold; line-height: 1;
}
#popup-close-btn:hover { background: var(--neon); color: var(--on-neon, #000); }

/* Body popup */
#popup-body { display: flex; gap: 14px; padding: 14px; }

/* Colonne gauche */
#popup-col-gauche {
    width: 150px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
/* Même largeur que #popup-infos-base (100 % de la colonne gauche) */
#popup-sprite-cadre {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 120px;
    border: 2px solid var(--neon); border-radius: 12px;
    background: #f8f5ff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(var(--neon-rgb),0.2);
    position: relative;
    overflow: visible;
}
#popup-sprite-cadre .cardSprite { width: 100px; height: 100px; max-width: 95%; max-height: 95%; object-fit: contain; object-position: center bottom; }
#popup-sprite-cadre .cardSprite.pokemon-sprite--forme-alt {
    transform: scale(1.38);
    transform-origin: center bottom;
}
#popup-sprite-cadre .cardSprite.pokemon-sprite--lumiere {
    transform: none;
    transform-origin: center bottom;
}
#popup-sprite-cadre .cardSprite.pokemon-sprite--obscure {
    transform: scale(var(--pkm-sprite-scale, 1.43));
    transform-origin: center bottom;
}
#popup-sprite-cadre .cardSprite.pokemon-sprite--teracristal {
    transform: scale(var(--pkm-sprite-scale, 1));
    transform-origin: center bottom;
}
#popup-infos-base {
    width: 100%; border: 2px solid var(--neon); border-radius: 10px;
    padding: 8px 6px; background: white;
    text-align: center; box-sizing: border-box;
}
#popup-nom    { font-size: 14px; font-weight: bold; color: #2c3e50; margin-bottom: 2px; }
#popup-surnom { font-size: 10px; color: var(--neon); font-style: italic; }
#popup-niveau { font-size: 12px; color: var(--neon); font-weight: bold; margin: 4px 0; }
#popup-types  { margin: 2px 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; }
/* Icônes type (GIF ou WebP) : hauteur identique aux arènes (.ac-type-small), pas une image pleine taille native. */
#popup-types img.popup-type-icon {
    height: 14px;
    width: auto;
    max-height: 14px;
    object-fit: contain;
    vertical-align: middle;
}

/* Colonne droite */
#popup-col-droite { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.popup-section {
    border: 2px solid var(--neon); border-radius: 10px;
    padding: 8px 10px; background: white;
    box-shadow: 0 0 4px rgba(var(--neon-rgb),0.08);
}
.popup-section-titre {
    font-size: 10px; font-weight: bold; color: var(--neon);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 6px; padding-bottom: 5px;
    border-bottom: 1px solid rgba(var(--neon-rgb),0.25);
}
/* Barres HP / XP */
.popup-barre-ligne {
    display: flex; justify-content: space-between;
    font-size: 11px; margin-bottom: 3px;
}
.popup-barre-ligne .lbl { color: #666; }
.popup-barre-ligne .val { color: #333; font-weight: bold; }
.popup-barre {
    height: 8px; background: #e9ecef;
    border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.popup-barre-fill { height: 100%; border-radius: 4px; transition: width 0.4s; }

/* Infos objet/capture */
.popup-info-ligne {
    display: flex; justify-content: space-between;
    font-size: 11px; padding: 3px 0;
    border-bottom: 1px solid rgba(var(--neon-rgb),0.1);
}
.popup-info-ligne:last-child { border-bottom: none; }
.popup-info-ligne .lbl { color: #888; }
.popup-info-ligne .val { color: #333; font-weight: bold; }

/* Grille palmarès */
#popup-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
}
.popup-stat-case {
    border: 1px solid rgba(var(--neon-rgb),0.3); border-radius: 7px;
    padding: 5px; text-align: center; background: #f8f5ff;
    transition: all 0.2s;
}
.popup-stat-case:hover { border-color: var(--neon); box-shadow: 0 0 6px rgba(var(--neon-rgb),0.2); }
.popup-stat-case .sc-lbl { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.popup-stat-case .sc-val { font-size: 14px; font-weight: bold; color: #333; margin-top: 2px; }

/* ===== STOCKAGE 2 colonnes ===== */
#onglet-stockage > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
#stockage-layout {
    display: flex;
    min-height: 260px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
#stockage-col-gauche {
    width: 190px;
    flex-shrink: 0;
    border-right: 2px solid var(--neon);
    background: #f8f5ff;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#stockage-col-droite {
    flex: 1;
    padding: 14px 12px;
    background: white;
    overflow-x: hidden;
    overflow-y: visible;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
/* Recherche sous ENREGISTRER (colonne droite) */
.stockage-recherche-pkm-wrap {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(var(--neon-rgb), 0.25);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
.stockage-col-titre {
    font-size: 13px;
    font-weight: 900;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(var(--neon-rgb),0.3);
    margin-bottom: 6px;
}

/* ===== INVENTAIRE — flex-wrap propre ===== */
#inventaire-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
    align-items: flex-start;
    align-content: flex-start;
}
.objet-item {
    float: none !important;
    width: 60px;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 6px 4px;
    transition: all 0.2s;
    background: #f8f5ff;
    flex-shrink: 0;
}
.objet-item:hover {
    border-color: var(--neon);
    box-shadow: 0 0 8px rgba(var(--neon-rgb),0.35);
    background: var(--neon);
}
.objet-item:hover span { color: #000; }
.objet-item img { border:none; width:51px; height:27px; object-fit:contain; display:block; margin:0 auto; }
.objet-item span { font-size:11px; display:block; color:#333; margin-top:3px; font-weight:bold; }

/* ===== INVENTAIRE 2 colonnes ===== */
#onglet-inventaire > #inventaire-layout {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
#inventaire-layout {
    display: flex;
    min-height: 260px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-items: stretch;
}
#inventaire-col-gauche {
    width: 200px;
    flex-shrink: 0;
    border-right: 2px solid var(--neon);
    background: #f8f5ff;
    padding: 14px 12px;
    align-self: stretch;
}
#inventaire-col-droite {
    flex: 1;
    min-width: 0;
    min-height: 480px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#inventaire-sous-onglets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(var(--neon-rgb),0.25);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}
.inventaire-liste-scroll,
#inventaire-liste-scroll {
    flex: 1 1 auto;
    min-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#inventaire-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    padding: 4px;
}