:root {
  --primary-color: #5a9fdb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fond de la page */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

/* Section des comptes */
.comptes {
    width: 250px;
    background-color: #5a9fdb;
    border: 5px solid #4981b1;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Titre des comptes */
.comptes h1 {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
}

/* Bouton Louer */
button {
    width: 100%;
    padding: 10px;
    background-color: #fcdf03;
    border: 5px solid #ccb502;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1em;
}

button:hover {
    background-color: #ffe83c;
}

/* Conteneur des items dans l'inventaire */
.inventaire {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

/* Style des éléments de l'inventaire */
div {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Petal Commun */
.petal_Commun {
    background-color: #7eef6d;
    border: 5px solid #66c258;
    color: #333;
}

/* Petal Rare */
.petal_Rare {
    background-color: #56ccf2;
    border: 5px solid #3399cc;
    color: #fff;
}

/* Petal Epique */
.petal_Epique {
    background-color: #9c27b0;
    border: 3px solid #8e24aa;
    color: #fff;
}

/* Quantité en haut à droite */
.amount {
    position: absolute;
    top: 0px;
    right: 0px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    border-radius: 50%;
    padding: 3px 6px;
    text-shadow: 1px 1px 2px black, 0 0 25px rgba(0,0,0,0.3), 0 0 5px rgba(0,0,0,0.2);
}

/* Nom des éléments en bas */
.name {
    position: absolute;
    bottom: 5px;
    left: 2px;
    right: 2px;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    text-shadow: 1px 1px 2px black, 0 0 25px rgba(0,0,0,0.3), 0 0 5px rgba(0,0,0,0.2);
}



/* Ajout d'une animation sur les éléments d'inventaire */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.inventaire div {
    animation: fadeIn 0.5s ease-out;
}
