body {
    margin: 0;
    padding: 0;
    background: url('img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: sans-serif;
    position: relative;
}

.memory-container {
    background-color: transparent;
    padding: 15px;
    border-radius: 32px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(6, 90px);
    gap: 12px;
}

/* Cartes */
.card {
    width: 90px;
    height: 90px;
    perspective: 1000px;
    position: relative;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    backface-visibility: hidden;
    overflow: hidden;
}

.card-front {
    background-color: #eee;
    transform: rotateY(180deg);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background: url('img/card-back.jpg') center center no-repeat;
    background-size: cover;
}

/* Popup de victoire */
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 180px;
    background-color: rgba(255, 0, 0, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.popup-message {
    background-color: #dcdcdc;
    color: #000;
    font-size: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.popup-button {
    background-color: #fcd34d;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
}

.hidden {
    display: none;
}