@font-face {
    font-family: "RussoOne";
    src: url("RussoOne-Regular.ttf");
}
@font-face {
    font-family: "CopperplateG";
    src: url("Copperplate Bold.ttf");
}

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

@keyframes bgEnter {
	from {
		transform: translateX(-100%);
	}
	to {
		transform: translateX(0%);
	}
}

@keyframes bgExit {
	from {
		transform: translateX(0%);
	}
	to {
		transform: translateX(100%);
	}
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: #7c4ce7;
}

#logo {
    position: relative;
    background-color: #0ff;
    display: flex;
    width: 30%;
}

.aspiration {
    transform: scale(0);
    opacity: 0;
    transition: all 1s;
    pointer-events: none;
}

.expiration {
    transform: scale(1);
    opacity: 1;
    transition: all 1s;
}

/* Menu aside */

@supports (background-blend-mode: overlay) {
    aside {
        background-image: radial-gradient(#c7c7c7, black);
        background-size: 300% 300%;
        animation: gradient 10s ease infinite;
        background-blend-mode: overlay;
    }

    #jeu, #resultat {
        background-image: radial-gradient(#8d8d8d, black);
        background-size: 100% 100%;
        background-blend-mode: overlay;
    }
}

aside {
    position: absolute;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;

    overflow: hidden;
	color: #7c4ce7;
	background-color: currentColor;
}

aside #buttons {
    display: flex;
    flex-direction: column;
    width: 30%;
    gap: 15px;
}

aside #commencePartie {
    display: flex;
    gap: 15px;
}

aside button {
    width: 100%;
    font-family: "RussoOne";
    font-size: 1.5rem;
    padding: 5px 0;
    background-color: black;
    border: 2px solid white;
    color: white;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
aside button:hover {
    color: black;
    background-color: white;
    border-color: black;
    cursor: pointer;
}

aside .retour {
    background: #03224c;
}
aside .retour:hover {
    color: #03224c;
    border-color: #03224c;
}

/* Jeu */

#chemin {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}

#chemin div {
    padding: 5px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid white;
    font-family: helvetica;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: filter 0.4s, background 0.4s;
}

#chemin div::after {
    content: "";
    inset: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-100%);
}

#chemin div.actuel::after {
    animation: bgEnter 0.4s ease forwards;
}
#chemin div.passe::after {
    animation: bgExit 0.4s ease forwards;
}

#chemin div.gagne {
    background-color: #3d9108;
}
#chemin div.perdu {
    background-color: #E2040E;
}

#jeu {
    width: 100dvw;
    height: 100dvh;
    /* background: #084C61; */
    color: #a48bf1;
    background-color: currentColor;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    opacity: 0;
    transition: opacity 0.2s, color 1s;
}

#jeu .alert {
    height: 2rem;
    padding: 10px;
}

#jeu .alert p {
    color: white;
    font-family: "helvetica";
    font-size: 2rem;
    font-weight: 600;
    display: none;
}

#toutTab div {
    color: black;
}

article[id*="tableau"]:not(#tableau0) {
    display: none;
}

article[id*="tableau"] {
    border: 1px solid black;
    width: fit-content;
}

article[id*="tableau"] div[class*="row"] {
    display: flex;
    background: cyan;
    transition: background 0.5s, transform 0.5s;
}
article[id*="tableau"] div[class*="row"].faux {
    background: #fc6060 !important;
    transform: scale(1.1);
    z-index: 2;
    position: relative;
}

article[id*="tableau"] div[class*="case"] {
    width: 3rem;
    height: 3rem;
    border: 1px solid black;
    text-transform: uppercase;
    font-family: Helvetica;
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}
article[id*="tableau"] div[class*="case"].lettre::after, article[id*="tableau"] div.case-1::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: -2;
}

article[id*="tableau"] div[class*="case"].bien-place::after {
    background: #19e519;
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
article[id*="tableau"] div[class*="case"].mal-place::after {
    background: #ffa500;
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: -1;
}

#clavier {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#clavier > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#clavier > div > div {
    padding: 5px;
    border: 1px solid white;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#clavier p {
    font-size: 1.25rem;
    font-family: "Helvetica";
    font-weight: 600;
    color: white;
}

#clavier div[id*="touche"] {
    background: #0ff;
    border-color: black;
}

#clavier div[id*="touche"].rien {
    opacity: 0.5;
}

#clavier div[id*="touche"].mal {
    background: #ffa500;
}

#clavier div[id*="touche"].bien {
    background: #19e519;
}
#clavier div[id*="touche"].bien p, #clavier div[id*="touche"].mal p, #clavier div[id*="touche"] p {
    color: black;    
}

/* Résultat */

#resultat {
    position: absolute;
    inset: 0;
    width: 100dvw;
    height: 100dvh;

    font-family: "RussoOne", "Helvetica";

    text-align: center;
    color: #7c4ce7;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

#resultat * {
    color: white;
}

#resultat > article {
    width: 100%;
    height: 100%;
    transform: translateY(0);
    transition: transform 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#resultat > article > * {
    width: 75%;
}

#resultat h1 {
    font-size: clamp(1rem, 2vw, 2rem);
}

#resultat #statsInfos > p {
    text-align: left;
}

#resultat article #statsInfos > .comboMax {
    min-width: 200px;
    background-color: black;
    border: 2px solid skyblue;
    padding: 5px 0;
    position: relative;
}

#resultat article #valeurDiv {
    background-color: black;
    border: 3px solid #d4af37;
    padding: 10px;
    margin: 0 auto;
}

#resultat #valeurDiv p {
    font-size: clamp(2.5rem, 6vw, 6rem);
    color: white;
    background: -webkit-linear-gradient(#b88b33 19.5%, #e8d3a4 45%, #b88b33 72.3%, #e8d3a4 92.7%, #b88b33);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

#resultat #stats {
    width: 75%;
}

#resultat #stats > * {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: auto 25%;
    gap: 5px;
}

#resultat .noteParent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#resultat .note {
    border: 2px solid skyblue;
    padding: 5px 0;
    width: 25%;
    background-color: black;
    transition: background 1s;
}

#resultat .note p {
    text-shadow: 0 0 5px rgba(0,0,0,0.75);
    opacity: 0;
    transition: opacity 1s;
    position: relative;
    z-index: 1;
}

#resultat .or {
    background-color: #d4af37;
}
#resultat .vert {
    background-color: #25a843;
}
#resultat .vert-jaune {
    background-color: #92b525;
}
#resultat .jaune {
    background-color: #ffc107;
}
#resultat .orange {
    background-color: #e2620e;
}
#resultat .rouge {
    background-color: #c50215;
}

#resultat .comboMax p {
    opacity: 0;
    transition: opacity 1s;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 5px rgba(0,0,0,0.75);
}

#resultat .jauge {
    width: 0;
    height: 100%;
    position: absolute;
    inset: 0;
    transition: width 1s;
}

#resultat > a {
    position: absolute;
    bottom: 5px;
}

#resultat .retourMenu {
    border: 2px solid skyblue;
    color: white;
    background: black;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    padding: 10px;
    font-family: "RussoOne";
    cursor: pointer;
}
#resultat .retourMenu:hover {
    color: black;
    background: white;
    border-color: black;
}

/* DISABLED */

*[disabled="disabled"] {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: #666 !important;
}

/* Logo SVG */

svg g > path, svg g > rect {
    animation: apparition 5s ease-in-out infinite;
    transform-origin: 50% 50%;
    transform-box: fill-box;
}

svg g > rect {
    animation: apparitionFond 5s ease-in-out infinite;
}

@keyframes apparition {
    from, to {
        transform: scale(0);
    }

    20% {
        transform: scale(1);
    }

    80% {
        transform: scale(1);
    }
}

@keyframes apparitionFond {
    from, to {
        transform: scale(0);
    }

    25% {
        transform: scale(1);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(0);
    }
}

svg g:nth-of-type(1) > path {transform: scale(0); animation-delay: 0s;}
svg g:nth-of-type(2) > path {transform: scale(0); animation-delay: 0.2s;}
svg g:nth-of-type(3) > path {transform: scale(0); animation-delay: 0.4s;}
svg g:nth-of-type(4) > path {transform: scale(0); animation-delay: 0.6s;}
svg g:nth-of-type(5) > path {transform: scale(0); animation-delay: 0.8s;}
svg g:nth-of-type(6) > path {transform: scale(0); animation-delay: 1s;}
svg g:nth-of-type(7) > path {transform: scale(0); animation-delay: 1.2s;}

svg g:nth-of-type(1) > rect {transform: scale(0); animation-delay: 1.4s;}
svg g:nth-of-type(2) > rect {transform: scale(0); animation-delay: 1.6s;}
svg g:nth-of-type(3) > rect {transform: scale(0); animation-delay: 1.8s;}
svg g:nth-of-type(4) > rect {transform: scale(0); animation-delay: 2s;}
svg g:nth-of-type(5) > rect {transform: scale(0); animation-delay: 2.2s;}
svg g:nth-of-type(6) > rect {transform: scale(0); animation-delay: 2.4s;}
svg g:nth-of-type(7) > rect {transform: scale(0); animation-delay: 2.6s;}