/* =========================================
   PAGE INDEX DES OBJETS (Grilles)
   ========================================= */
   .item-category {
    margin-bottom: 30px;
}

.item-category h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* Petit espace comme sur LoL */
}

.item-icon-link {
    display: block;
    width: 64px;
    height: 64px;
    border: 1px solid #1e2328;
    transition: border-color 0.2s;
}

.item-icon-link:hover {
    border-color: var(--accent-gold);
}

.item-icon-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   ARBRE DE RECETTES (Recipe Tree)
   ========================================= */
.recipe-tree-container {
    background-color: #05141e;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.recipe-tree, .recipe-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recipe-tree ul {
    padding-left: 24px;
    border-left: 1px solid #3c3c41; /* La ligne verticale */
    margin-left: 16px;
}

.recipe-tree li {
    position: relative;
    margin: 8px 0;
}

/* La petite ligne horizontale qui relie la ligne verticale à l'objet */
.recipe-tree ul li::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 16px; /* Centré sur l'icône */
    width: 24px;
    height: 1px;
    background-color: #3c3c41;
}

.recipe-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recipe-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
}

.recipe-details {
    display: flex;
    flex-direction: column;
}

.recipe-name {
    color: var(--accent-gold);
    font-weight: bold;
    text-decoration: none;
}

.recipe-cost {
    color: #f0e6d2;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.gold-text { color: #fcc200; }

/* =========================================
   INFOBOX OBJETS (Stats & Passifs)
   ========================================= */
/* Onglets internes à l'infobox */
.infobox-tabs {
    display: flex;
    background-color: #05141e;
    border-bottom: 1px solid var(--border-color);
}

.infobox-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.infobox-tab.active {
    color: var(--text-color);
    background-color: #111111;
}

.infobox-image img {
    /* max-width permet aux petites images de garder leur taille, 
       et aux grandes de ne pas déborder */
    max-width: 100%; 
    display: block;
    /* C'est CETTE ligne qui centre l'image au milieu de la boîte */
    margin: 0 auto; 
}
/* Lignes de statistiques */
.stat-row {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

/* Couleurs spécifiques des stats */
.stat-hp { color: #21B053; }
.stat-ar { color: #FFFF00 ; }
.stat-mr { color: #00FFFF; }

.stat-ap { color: #7A6DFF; } 
.stat-Mdmg { color: #66bdff; } 
.stat-as { color: #F5EE99; }
.stat-ad { color: #FF8C34; }
.stat-Pdmg { color: #fab356; }
.stat-Tdmg { color: #FFFFFF;}
.stat-critC { color: #ff4500; }
.stat-critD { color: #B4814C; }
.stat-vamp { color: #CC2051; }
.stat-leth { color: #FF6347; } 
.stat-mpen { color: #EE82EE; } 

.stat-te { color: #811ec3; } 
.stat-ms { color: #9FFF4D; } 
.stat-ah { color: #7ADECD; }
.stat-nrj { color: #f5f55e; }
.stat-gold { color: #E2BA3D; }


/* Passifs / Actifs */
.passive-block {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.passive-title {
    font-weight: bold;
    color: #fff;
}

.passive-title span {
    color: var(--accent-gold);
}

/* Tableau horizontal pour l'achat/revente */
.recipe-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    text-align: center;
}
.recipe-stats-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.recipe-stats-col strong { color: #aaa; }

/* =========================================
   MODIFICATEUR DE LAYOUT : 50/50
   ========================================= */
   .wiki-container.split-half .wiki-main-content {
    flex: 1; /* Prend la moitié de l'espace */
}

.wiki-container.split-half .infobox {
    width: auto; /* Annule la largeur fixe de 350px */
    flex: 1;     /* Prend l'autre moitié de l'espace */
}

/* =========================================
   TOOLTIPS OBJETS (Bulles au survol)
   ========================================= */
   .item-icon-link {
    display: block;
    width: 42px;
    height: 42px;
    border: 1px solid #1e2328;
    transition: border-color 0.2s;
    position: relative; /* CRUCIAL : Attache le tooltip à cette icône */
}

/* La boîte cachée par défaut */
.item-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%; /* S'affiche au-dessus de l'icône */
    left: 50%;
    transform: translateX(-50%); /* Le centre parfaitement au-dessus */
    width: 350px;
    background-color: #010a13; /* Bleu nuit très sombre */
    border: 1px solid #1e2328;
    border-top: 3px solid #205c8a; /* La fameuse barre bleue */
    z-index: 1000; /* S'assure qu'il passe au-dessus de TOUT */
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.9);
    transition: opacity 0.15s ease-in-out;
    pointer-events: none; /* Empêche les bugs si la souris touche le tooltip */
    
    /* Typographie du tooltip */
    font-size: 0.85rem;
    text-align: left;
    color: #a09b8c;
    font-family: Arial, sans-serif;
    cursor: default;
}

/* L'action magique : au survol du lien, le tooltip apparaît */
.item-icon-link:hover .item-tooltip {
    visibility: visible;
    opacity: 1;
}

/* --- Style interne du Tooltip (En-tête, Stats, Passifs) --- */
.tooltip-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1e2328;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.tooltip-header img {
    width: 36px;
    height: 36px;
    margin-right: 15px;
    border: 1px solid var(--border-color);
}
.tooltip-title {
    font-size: 1.1rem;
    color: #f0e6d2;
    font-weight: bold;
    flex-grow: 1;
}
.tooltip-gold {
    color: #fcc200;
    font-weight: bold;
}
.tooltip-stats {
    color: #32cd32; /* Vert des stats */
    border-bottom: 1px solid #1e2328;
    padding-bottom: 10px;
    margin-bottom: 10px;
    line-height: 1.6;
}
.tooltip-row {
    display: flex;
    margin-bottom: 8px;
}
.tooltip-label {
    width: 80px;
    flex-shrink: 0;
    color: #a09b8c;
}
.tooltip-text {
    flex-grow: 1;
    color: #f0e6d2;
}
.tooltip-text strong {
    color: var(--accent-gold);
}
/* Petites icônes dans la ligne "Recipe" */
.tooltip-mini-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    border: 1px solid var(--border-color);
    margin: 0 2px;
}

/* =========================================
   SÉPARATEUR D'OBJETS (Losange stylisé)
   ========================================= */
   .item-sep {
    display: block;
    width: 8px;
    height: 8px;
    border: 1px solid var(--accent-gold);
    background-color: #111111; /* Centre sombre */
    transform: rotate(45deg); /* Tourne le carré pour en faire un losange */
    align-self: center; /* Le centre verticalement par rapport aux images */
    margin: 0 5px; /* Ajoute un peu d'espace à gauche et à droite */
}