.cube__side,
.no-js .cube {
	border: 0.75vw solid #fff;
	outline: 1px solid #fff;
	background: #f0f0f0 url(../img/mandala.png) no-repeat center center;
}

.cube:not(.cube--inactive):nth-child(2n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(2n) {
	background-image: url(../img/mandala2.png);
}

.cube:not(.cube--inactive):nth-child(3n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(3n) {
	background-image: url(../img/mandala3.png);
}

.cube:not(.cube--inactive):nth-child(4n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(4n) {
	background-image: url(../img/mandala4.png);
}

.cube:not(.cube--inactive):nth-child(5n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(5n) {
	background-image: url(../img/mandala5.png);
}

.cube:not(.cube--inactive):nth-child(6n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(6n) {
	background-image: url(../img/mandala6.png);
}

.cube:not(.cube--inactive):nth-child(7n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(7n) {
	background-image: url(../img/mandala7.png);
}

.cube:not(.cube--inactive):nth-child(8n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(8n) {
	background-image: url(../img/mandala8.png);
}

.cube:not(.cube--inactive):nth-child(9n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(9n) {
	background-image: url(../img/mandala9.png);
}

.cube:not(.cube--inactive):nth-child(10n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(10n) {
	background-image: url(../img/mandala10.png);
}

.cube:not(.cube--inactive):nth-child(11n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(11n) {
	background-image: url(../img/mandala11.png);
}

.cube:not(.cube--inactive):nth-child(12n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(12n) {
	background-image: url(../img/mandala12.png);
}

.cube:not(.cube--inactive):nth-child(13n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(13n) {
	background-image: url(../img/mandala13.png);
}

.cube:not(.cube--inactive):nth-child(14n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(14n) {
	background-image: url(../img/mandala14.png);
}

.cube:not(.cube--inactive):nth-child(15n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(15n) {
	background-image: url(../img/mandala15.png);
}

.cube:not(.cube--inactive):nth-child(16n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(16n) {
	background-image: url(../img/mandala16.png);
}

.cube:not(.cube--inactive):nth-child(17n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(17n) {
	background-image: url(../img/mandala17.png);
}

.cube:not(.cube--inactive):nth-child(18n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(18n) {
	background-image: url(../img/mandala18.png);
}

.cube:not(.cube--inactive):nth-child(19n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(19n) {
	background-image: url(../img/mandala19.png);
}

.cube:not(.cube--inactive):nth-child(20n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(20n) {
	background-image: url(../img/mandala20.png);
}

.cube:not(.cube--inactive):nth-child(21n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(21n) {
	background-image: url(../img/mandala21.png);
}

.cube:not(.cube--inactive):nth-child(22n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(22n) {
	background-image: url(../img/mandala22.png);
}

.cube:not(.cube--inactive):nth-child(23n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(23n) {
	background-image: url(../img/mandala23.png);
}

.cube:not(.cube--inactive):nth-child(24n) .cube__side,
.no-js .cube:not(.cube--inactive):nth-child(24n) {
	background-image: url(../img/mandala24.png);
}

.cube--inactive .cube__side,
.no-js .cube--inactive {
	background: #e1e0e0;
}


/* With JS we insert a number span into the cube */

.cube__number,
.no-js .cube::after {
	font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif;
	font-weight: 700;
	line-height: 2.5;
	width: 2em;
	height: 2em;
	padding: 0 0 0 0.25em;
	text-align: center;
	letter-spacing: -0.05em;
	color: #fff;
	border-radius: 100% 0 0 0;
	background: #f8af8d;
}

.cube:nth-child(2n):not(.cube--inactive) .cube__number,
.no-js .cube:nth-child(2n):not(.cube--inactive)::after {
	background: #f8d18d;
}

.cube:nth-child(3n):not(.cube--inactive) .cube__number,
.no-js .cube:nth-child(3n):not(.cube--inactive)::after {
	background: #8df88d;
}

.cube--inactive .cube__number,
.no-js .cube--inactive::after {
	background: #aaa;
}

.js .content__block {
	text-align: right;
}

.content__number {
	font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif;
	font-size: 40vw;
	font-weight: bold;
	line-height: 0.5;
	right: 0;
	bottom: 30vh;
	text-indent: -0.175em;
	letter-spacing: -0.175em;
	color: #fff;
}

.meetles-logo-header {
    width: 100%;
    text-align: center;
    margin: 30px 0 10px;
}

.meetles-logo-header img {
    width: 350px;
    height: auto;
    display: inline-block;
    opacity: 0.95;

	animation: waterWave 5s ease-in-out infinite;
}

@keyframes waterWave {
    0% { transform: translateY(0) scale(1); filter: blur(0px); }
    50% { transform: translateY(2px) scale(1.02); filter: blur(1px); }
    100% { transform: translateY(0) scale(1); filter: blur(0px); }
}

.meetles-logo-header img:hover {
    transform: scale(1.05);
}

.subtitle {
	font-size: 25px;
    line-height: 0px;
}

/* Container du contenu */
.content__block {
    position: relative;
}

/* Image Meetle dans la vue ouverte */
.content__image {
    position: absolute;
    left: -5vw;
    bottom: 20vh;
    width: 26vw;
    max-width: 450px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

/* Lorsque le block devient visible */
.content__block--current .content__image {
    opacity: 1;
    transform: translateY(0);
}

/* CASE MYSTÈRE DORÉE */
.cube--mystery .cube__side {
    background: linear-gradient(135deg, #f7d776, #ffef9f, #d4af37);
    background-size: 300% 300%;
    animation: goldShine 3s ease-in-out infinite;
    border: 1vw solid #fff8dc;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6),
                0 0 10px rgba(255, 215, 0, 0.6) inset;
}

/* Numéro de la case mystère */
.cube--mystery .cube__number {
    background: #d4af37 !important;
    color: #442;
}

/* Animation scintillante */
@keyframes goldShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Légère vibration de luxe */
.cube--mystery {
    animation: mysteryWiggle 4s ease-in-out infinite;
}

@keyframes mysteryWiggle {
    0% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
}

.cube--mystery {
    animation: mysteryWiggle 3s ease-in-out infinite;
}

/* Empêche les mandalas d'écraser l'effet doré */
.cube--mystery .cube__side {
    background-image: none !important;
	background-size: 300% 300%;
    animation: goldShine 3s ease-in-out infinite;
}

.cube--opened {
    pointer-events: none;
}

.cube--opened .cube__side {
    opacity: 0.5;
    filter: grayscale(80%);
}

.meetles-alert {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #222;
    color: #fff;
    padding: 15px 18px;
    border-radius: 8px;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    transform: translateY(-20px);
    z-index: 99999;
}

.meetles-alert.show {
    opacity: 1;
    transform: translateY(0);
}

.emoji {
    font-size: 1.4em;
    margin-right: 6px;
}

/* --- POPUP MEETLES --- */
.meetles-popup {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    padding: 18px 25px;
    border-radius: 10px;
    color: #fff;
    opacity: 0;
    transition: all 0.6s ease;
    font-size: 17px;
    z-index: 99999;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

.meetles-popup.show {
    bottom: 35px;
    opacity: 1;
}

.meetles-popup-content a {
    color: #ffd700;
    text-decoration: underline;
}

/* Popup Meetles */
#meetles-popup {
    padding: 20px 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    max-width: 500px;
    margin: 20px auto;
    cursor: pointer;
}

/* Affichage */
#meetles-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Succès : vert */
#meetles-popup.success {
    background: #32c671;
    box-shadow: 0 0 15px rgba(50, 198, 113, 0.6);
}

/* Erreur : rouge */
#meetles-popup.error {
    background: #e04444;
    box-shadow: 0 0 15px rgba(224, 68, 68, 0.6);
}

#meetles-popup a{
	color:#fff;
}
#meetles-popup a:hover{
	color:#000;
}

.back-to-site {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.85);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease-out;
    z-index: 9999;
}

.back-to-site:hover {
    background: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Bouton Palmarès (même style que back-to-site mais autre couleur) */
.back-to-hof {
    background: #9dbd93;      /* vert Meetles */
    border-color: #9dbd93;
	right: 20px;
    left: auto;
	color:#fff;
}

/* Survol du bouton Palmarès */
.back-to-hof:hover {
    background: #82a577;
    border-color: #82a577;
	color:#f9e7c8;
}

/* Version MOBILE */
@media (max-width: 768px) {

    /* On place les deux boutons côte à côte sous le logo */
    .back-to-site,
    .back-to-hof {
        position: static;        /* ils sortent du mode fixed */
        display: inline-block;
        margin: 10px 5px;
        width: auto;
    }

    /* On centre les deux boutons */
    .buttons-wrapper {
        text-align: center;
        margin-bottom: 10px;
    }

    /* On réduit un peu la taille */
    .back-to-site,
    .back-to-hof {
        padding: 8px 14px;
        font-size: 15px;
    }
}

.advent-ended {
    max-width: 900px;
    margin: 40px auto 20px;
    padding: 30px 25px;
    text-align: center;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.advent-ended h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.advent-ended p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.advent-ended-highlight {
    margin-top: 25px;
    font-weight: 700;
    font-size: 1.15rem;
}

.btn-advent-draw {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 36px;
    border-radius: 40px;
    background: linear-gradient(135deg, #ff4d4d, #c80000);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
    transition: transform .15s ease;
}

.btn-advent-draw:hover {
    transform: translateY(-2px);
}
