body {
	background: #cc0019;
	color: #fceeb8;
	font-family: 'BioRhyme', serif;
}

a {
	color: #fff;
}

a:hover,
a:focus {
	color: #fceeb8;
}

.codrops-header {
	background: none;
}

.codrops-header__tagline,
.codrops-demos,
.content__description,
.content__meta {
	font-family: 'Roboto Condensed', sans-serif;
}

.codrops-demos a.current-demo {
	color: #fceeb8;
}

.calendar {
	-webkit-perspective: 2500px;
	perspective: 2500px;
}

.cube__side,
.no-js .cube {
	border: 3px solid #fff;
	outline: 1px solid #fff;
	background: #f0f0f0 url(../img/c1.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/c2.png);
}

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

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

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

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

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

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

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

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

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


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

.cube__number,
.no-js .cube::after {
	font-weight: 700;
	color: #cc0019;
	background: #fff;
	width: 100%;
	text-align: center;
	top: 50%;
	height: 1.5em;
	line-height: 1.5;
	bottom: auto;
	margin: -0.75em 0 0;
}

.cube--inactive .cube__number,
.no-js .cube--inactive::after {
	color: #cac9c9;
}

/* Styles pour les cubes verrouillés */
.cube--locked {
	position: relative;
	filter: grayscale(0.7);
	transition: opacity 0.3s ease;
}

.cube--locked .cube__side {
	background-color: rgba(0, 0, 0, 0.3);
}

.cube--locked .cube__number {
	color: #999;
	opacity: 0.6;
}

.cube__lock-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 2em;
	pointer-events: none;
	z-index: 10;
	opacity: 0.8;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animation shake pour les cubes verrouillés cliqués */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.js .content__block {
	width: 100%;
	padding: 0 5vw 0 20vw;
}

.js .content__description {
	padding: 0 0 0 4vw;
}

.content__number {
	color: #000;
	font-weight: bold;
	line-height: 0.5;
	letter-spacing: -0.175em;
	font-size: 30vw;
	left: -5vw;
	bottom: 8vh;
}

.content__title {
	font-size: 6vw;
}

.title {
	color: #fceeb8;
	right: auto;
	left: 3vw;
}

/* Styles pour la chasse au trésor */
.treasure-hunt {
	margin: 2em 0;
	padding: 0 4vw;
}

.treasure-hunt__clues {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2em;
	margin-bottom: 2em;
	justify-content: center;
}

.clue-box {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
	border: 3px solid #fceeb8;
	border-radius: 15px;
	padding: 1.5em 1.2em;
	min-width: 200px;
	flex: 1;
	max-width: 240px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	position: relative;
	overflow: hidden;
	backdrop-filter: blur(10px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
				0 0 0 0 rgba(252, 238, 184, 0.3);
}

.clue-box::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(252, 238, 184, 0.1) 0%, transparent 70%);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.clue-box:hover::before {
	opacity: 1;
}

.clue-box:hover {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
	border-color: #fff;
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
				0 0 20px rgba(252, 238, 184, 0.4);
}

.clue-box:active {
	transform: translateY(-4px) scale(1.01);
}

.clue-box.clue-box--revealed {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
	border-color: #fff;
	border-width: 3px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25),
				0 0 15px rgba(252, 238, 184, 0.5);
}

.clue-box.clue-box--revealed::after {
	content: '✨';
	position: absolute;
	top: 15px;
	right: 15px;
	font-size: 1.5em;
	animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
	0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
	50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

.clue-box__emoji {
	display: block;
	font-size: 2.5em;
	margin-bottom: 0.3em;
	line-height: 1;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
	animation: float 3s ease-in-out infinite;
}

.clue-box[data-clue="1"] .clue-box__emoji {
	animation-delay: 0s;
}

.clue-box[data-clue="2"] .clue-box__emoji {
	animation-delay: 0.5s;
}

.clue-box[data-clue="3"] .clue-box__emoji {
	animation-delay: 1s;
}

@keyframes float {
	0%, 100% { transform: translateY(0px) rotate(0deg); }
	50% { transform: translateY(-10px) rotate(5deg); }
}

.clue-box:hover .clue-box__emoji {
	transform: translateY(-5px) scale(1.15) rotate(-5deg);
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.clue-box.clue-box--revealed .clue-box__emoji {
	animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
	0% { transform: scale(1) rotate(0deg); }
	25% { transform: scale(1.3) rotate(-10deg); }
	50% { transform: scale(1.2) rotate(10deg); }
	75% { transform: scale(1.3) rotate(-5deg); }
	100% { transform: scale(1.2) rotate(0deg); }
}

.clue-box__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #cc0019 0%, #a00015 100%);
	color: #fff;
	width: 35px;
	height: 35px;
	border-radius: 10px;
	font-weight: bold;
	font-size: 1.1em;
	margin-bottom: 0.8em;
	box-shadow: 0 4px 15px rgba(204, 0, 25, 0.4),
				inset 0 2px 5px rgba(255, 255, 255, 0.2);
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

.clue-box:hover .clue-box__number {
	transform: rotate(5deg) scale(1.1);
	box-shadow: 0 6px 20px rgba(204, 0, 25, 0.5),
				inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.clue-box.clue-box--revealed .clue-box__number {
	background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
	box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4),
				inset 0 2px 5px rgba(255, 255, 255, 0.2);
}

.clue-box__text {
	margin: 0;
	font-size: 0.95em;
	min-height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-family: 'Roboto Condensed', sans-serif;
	line-height: 1.4;
	color: #fceeb8;
	position: relative;
	z-index: 1;
	transition: all 0.3s ease;
	padding-top: 0.3em;
}

.clue-box--revealed .clue-box__text {
	font-weight: 600;
	color: #fff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.treasure-hunt__answer {
	display: flex;
	gap: 1em;
	margin: 2em 0;
	justify-content: center;
	flex-wrap: wrap;
}

.treasure-hunt__input {
	flex: 1;
	min-width: 250px;
	max-width: 400px;
	padding: 1em 1.5em;
	font-size: 1.2em;
	border: 2px solid #fceeb8;
	background: rgba(255, 255, 255, 0.1);
	color: #fceeb8;
	border-radius: 5px;
	font-family: 'Roboto Condensed', sans-serif;
	outline: none;
	transition: all 0.3s ease;
}

.treasure-hunt__input:focus {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
	box-shadow: 0 0 10px rgba(252, 238, 184, 0.3);
}

.treasure-hunt__input::placeholder {
	color: rgba(252, 238, 184, 0.6);
}

.treasure-hunt__submit {
	padding: 1em 2em;
	font-size: 1.2em;
	background: #cc0019;
	color: #fff;
	border: 2px solid #cc0019;
	border-radius: 5px;
	cursor: pointer;
	font-family: 'Roboto Condensed', sans-serif;
	font-weight: bold;
	transition: all 0.3s ease;
	outline: none;
}

.treasure-hunt__submit:hover {
	background: #a00015;
	border-color: #a00015;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(204, 0, 25, 0.4);
}

.treasure-hunt__submit:active {
	transform: translateY(0);
}

.treasure-hunt__result {
	margin-top: 2em;
	padding: 1.5em;
	border-radius: 10px;
	font-size: 1.3em;
	text-align: center;
	font-family: 'Roboto Condensed', sans-serif;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(-20px);
	transition: all 0.5s ease;
}

.treasure-hunt__result.treasure-hunt__result--show {
	opacity: 1;
	transform: translateY(0);
}

.treasure-hunt__result.treasure-hunt__result--success {
	background: rgba(76, 175, 80, 0.3);
	border: 2px solid #4caf50;
	color: #a5d6a7;
}

.treasure-hunt__result.treasure-hunt__result--error {
	background: rgba(244, 67, 54, 0.3);
	border: 2px solid #f44336;
	color: #ffcdd2;
}

@media screen and (max-width: 50.75em) {
	.js .content__block {
		padding: 4em 2em 0;
		-webkit-justify-content: flex-start;
		-ms-flex-pack: start;
		justify-content: flex-start;
	}
	.content__number {
		bottom: 30vh;
	}
	
	.treasure-hunt {
		padding: 0 1em;
	}
	
	.treasure-hunt__clues {
		flex-direction: column;
		gap: 1.5em;
	}
	
	.clue-box {
		max-width: 100%;
	}
	
	.treasure-hunt__answer {
		flex-direction: column;
	}
	
	.treasure-hunt__input,
	.treasure-hunt__submit {
		width: 100%;
		max-width: 100%;
	}
}
