body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a2e;
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background-color: #e94560;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    margin-bottom: 30px;
}

button:hover { background-color: #ff3355; }

/* Conteneur des cartes */
.cartes-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* La scène 3D pour chaque carte */
.scene-carte {
    width: 200px;
    height: 300px;
    perspective: 1000px; /* Donne l'effet de profondeur */
    cursor: pointer;
}

/* La carte en elle-même */
.carte {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Classe ajoutée quand on clique pour retourner la carte */
.carte.retournee {
    transform: rotateY(180deg);
}

/* Les faces de la carte */
.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Le dos de la carte (ce qu'on voit en premier) */
.dos {
    background: linear-gradient(135deg, #16213e, #0f3460);
    border: 3px solid #ccc;
}
.dos::after {
    content: "?";
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
}

/* L'avant de la carte (la photo) */
.avant {
    background-color: #fff;
    transform: rotateY(180deg);
    color: black;
    overflow: hidden;
}

.avant img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.infos {
    padding: 10px;
}

/* Couleurs selon la rareté */
.Commune .avant { border: 4px solid #a0a0a0; }
.Rare .avant { border: 4px solid #007bff; box-shadow: 0 0 15px #007bff; }
.Epique .avant { border: 4px solid #9c27b0; box-shadow: 0 0 20px #9c27b0; }
.Legendaire .avant { border: 4px solid #ffc107; box-shadow: 0 0 30px #ffc107; background: linear-gradient(45deg, #fff3cd, #fff); }
