/* --- POLICE --- */
@font-face {
    font-family: 'Minecraftia';
    font-style: normal;
    font-weight: 400;
    src: local('Minecraftia'), url('../Minecraftia.woff') format('woff');
}

:root {
    --mc-gray: #8b8b8b;
    --mc-dark: #373737;
    --mc-light: #ffffff;
}
summary:hover span {
    text-decoration: underline;
    color: #85b6ee !important;
}
/* --- STRUCTURE PRINCIPALE --- */
body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #1e1e1e;
    background-image: url('assets/background/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    font-family: 'Minecraftia', sans-serif;
    color: white;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    opacity: 0.5;
    z-index: -1;
}

.app-container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-right: 3px solid #1a1a1a;
    opacity: 0.95;
}

#item-list {
    flex: 1;
    overflow-y: auto;
}

#search {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background: #111;
    border: none;
    border-bottom: 2px solid #333;
    color: white;
    font-size: 1rem;
    font-family: 'Minecraftia', sans-serif;
}

.item-row {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #333;
}

.item-row:hover { background: #3d3d3d; }

.item-row img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    image-rendering: pixelated;
}

/* --- PANNEAU DE DÉTAILS --- */
#details-panel {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 40px;
    box-sizing: border-box;
}

/* --- CRAFTING & UI MINECRAFT --- */
.recipes-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
    align-items: flex-start;
}

.crafting-container, .furnace-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #c6c6c6; 
    border: 3px solid #000; 
    box-shadow: inset 3px 3px 0px #ffffff, inset -3px -3px 0px #555555;
    image-rendering: pixelated; 
    width: fit-content;
}

.grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 64px);
    grid-template-rows: repeat(3, 64px);
    gap: 4px;
}

.slot {
    width: 64px;
    height: 64px;
    background: var(--mc-gray);
    border: 3px solid;
    border-color: var(--mc-dark) var(--mc-light) var(--mc-light) var(--mc-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

.category-title {
    color: #ffcc00;
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
    text-transform: uppercase;
}

/* --- SCROLLBAR PERSONNALISÉE --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #1e1e1e; }
::-webkit-scrollbar-thumb {
    background: #555; 
    border-radius: 5px;
    border: 2px solid #1e1e1e;
}
::-webkit-scrollbar-thumb:hover { background: #516f83; }

/* --- HEADER  --- */
header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 4px solid #000;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

header h1 {
    margin: 0;
    font-size: 28px;
    text-shadow: 3px 3px 0px #3f3f3f;
    letter-spacing: 2px;
}

header img {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: auto;
}

/* --- NAV --- */
.nav {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.nav a {
    background: #555;
    border: 2px solid #000;
    border-top-color: #ababab;
    border-left-color: #ababab;
    padding: 8px 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.nav a:hover {
    background: #8b8b8b;
    border-top-color: #dbdbdb;
    border-left-color: #dbdbdb;
}

/* --- FOOTER --- */
footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    background-color: #1a1a1a;
    color: #aaaaaa;
    border-top: 4px solid #000;
    flex-shrink: 0;
}

.no-recipe-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}